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

@tianmind-studio tianmind-studio commented Jun 14, 2026

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.

Refresh

  • Rebased on main at 9ed12aea07.
  • Current head: be489b4a4d.

Validation

  • git check-attr -a -- desktop/windows/electron.vite.config.ts desktop/windows/eslint.config.mjs desktop/windows/.prettierrc.yaml desktop/windows/src/renderer/src/lib/goals.test.ts -> text: auto, eol: lf for all four 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 53, CRLF 0
    • desktop/windows/.prettierrc.yaml -> LF 4, CRLF 0
    • root README.md remained CRLF 174, showing the rule is scoped.
  • Fresh-checkout files with local Windows app Prettier: prettier --check electron.vite.config.ts eslint.config.mjs .prettierrc.yaml src/renderer/src/lib/goals.test.ts -> passed.
  • git diff --check origin/main...HEAD
  • C:\\Program Files\\Git\\bin\\sh.exe -c 'scripts/pre-commit'

@tianmind-studio tianmind-studio force-pushed the codex/windows-prettier-eol branch from e607818 to be489b4 Compare June 16, 2026 15:25
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