From c6c0575486f4e7fb529771e78cec4684e9228715 Mon Sep 17 00:00:00 2001 From: davebulaval Date: Tue, 24 Feb 2026 19:24:41 -0500 Subject: [PATCH 1/2] feat: enhance .editorconfig and add .gitattributes - Add max_line_length = 99 to .editorconfig (Baseline convention) - Add web file types (css, html, js, jsx, ts, tsx) to indent rules - Add .sh (LF) and .bat (CRLF) line ending rules - Add .gitattributes for consistent line ending normalization Closes #327 Co-Authored-By: Claude Opus 4.6 --- .../.editorconfig | 9 +++++- .../.gitattributes | 28 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 {{ cookiecutter.__project_name_kebab_case }}/.gitattributes diff --git a/{{ cookiecutter.__project_name_kebab_case }}/.editorconfig b/{{ cookiecutter.__project_name_kebab_case }}/.editorconfig index 15ff9da6..f9eca780 100644 --- a/{{ cookiecutter.__project_name_kebab_case }}/.editorconfig +++ b/{{ cookiecutter.__project_name_kebab_case }}/.editorconfig @@ -10,8 +10,9 @@ trim_trailing_whitespace = true [*.py] indent_style = space indent_size = 4 +max_line_length = 99 -[*.{yml,yaml,json,toml}] +[*.{yml,yaml,json,toml,css,html,js,jsx,ts,tsx}] indent_style = space indent_size = 2 @@ -20,3 +21,9 @@ indent_style = tab [*.md] trim_trailing_whitespace = false + +[*.sh] +end_of_line = lf + +[*.bat] +end_of_line = crlf diff --git a/{{ cookiecutter.__project_name_kebab_case }}/.gitattributes b/{{ cookiecutter.__project_name_kebab_case }}/.gitattributes new file mode 100644 index 00000000..219e1432 --- /dev/null +++ b/{{ cookiecutter.__project_name_kebab_case }}/.gitattributes @@ -0,0 +1,28 @@ +# Auto detect text files and normalize line endings +* text=auto + +# Force LF for text files +*.py text eol=lf +*.sh text eol=lf +*.yml text eol=lf +*.yaml text eol=lf +*.md text eol=lf +*.txt text eol=lf +*.json text eol=lf +*.toml text eol=lf +Dockerfile text eol=lf + +# Windows scripts keep CRLF +*.ps1 text eol=crlf +*.bat text eol=crlf + +# Binary files +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.zip binary +*.gz binary +*.tar binary +*.whl binary From fb691424f143937d407450e37b1fcb0f5908ebc3 Mon Sep 17 00:00:00 2001 From: davebulaval Date: Tue, 24 Feb 2026 19:45:09 -0500 Subject: [PATCH 2/2] fix: exclude .cruft.json from detect-secrets pre-commit hook The cruft create command generates a .cruft.json with a commit hash that detect-secrets flags as a "Hex High Entropy String" false positive. This was causing the Integration CI to fail on every PR. Co-Authored-By: Claude Opus 4.6 --- .../.pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/{{ cookiecutter.__project_name_kebab_case }}/.pre-commit-config.yaml b/{{ cookiecutter.__project_name_kebab_case }}/.pre-commit-config.yaml index 56e37d17..d0a423b0 100644 --- a/{{ cookiecutter.__project_name_kebab_case }}/.pre-commit-config.yaml +++ b/{{ cookiecutter.__project_name_kebab_case }}/.pre-commit-config.yaml @@ -46,6 +46,7 @@ repos: hooks: - id: detect-secrets args: ['--baseline', '.secrets.baseline'] + exclude: '^\.cruft\.json$' - repo: local hooks: {%- if cookiecutter.with_conventional_commits|int %}