Skip to content

[codex] Keep Windows app checkouts on LF#7934

Open
tianmind-studio wants to merge 1 commit into
BasedHardware:mainfrom
tianmind-studio:codex/windows-prettier-eol
Open

[codex] Keep Windows app checkouts on LF#7934
tianmind-studio wants to merge 1 commit into
BasedHardware:mainfrom
tianmind-studio:codex/windows-prettier-eol

Conversation

@tianmind-studio

Copy link
Copy Markdown
Contributor

Summary

  • Add a scoped .gitattributes file under desktop/windows.
  • Force text files in the Windows app subtree to check out with LF line endings.
  • Keep Git checkout behavior aligned with the existing .editorconfig and Prettier setup.

Why

On this Windows checkout, desktop/windows files were written with CRLF because core.autocrlf=true. The Windows app already declares end_of_line = lf in .editorconfig, so ESLint/Prettier reported almost every line as Delete ␍, hiding the real lint findings.

This keeps the policy local to desktop/windows instead of changing the whole repository or weakening Prettier with endOfLine: auto.

Validation

  • Before this change on the Windows checkout: ESLint JSON contained 30,011 messages, including 29,948 prettier/prettier messages; sampled messages were Delete ␍.
  • git check-attr -a -- desktop/windows/electron.vite.config.ts desktop/windows/eslint.config.mjs desktop/windows/.prettierrc.yaml -> text: auto, eol: lf for all three files.
  • Fresh detached worktree from this branch with core.autocrlf=true:
    • desktop/windows/electron.vite.config.ts -> LF 26, CRLF 0
    • desktop/windows/eslint.config.mjs -> LF 32, CRLF 0
    • desktop/windows/src/renderer/src/lib/goals.test.ts -> LF 43, CRLF 0
    • desktop/windows/.prettierrc.yaml -> LF 4, CRLF 0
    • root README.md remained CRLF 174, showing the rule is scoped.
  • prettier --check electron.vite.config.ts eslint.config.mjs .prettierrc.yaml src/renderer/src/lib/goals.test.ts in the fresh worktree -> passed.
  • Fresh worktree ESLint JSON dropped to 432 total messages, with Delete ␍ count 0; remaining messages are existing real lint/format findings.
  • git diff --cached --check -> passed.
  • C:\Program Files\Git\bin\bash.exe scripts/pre-commit -> passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant