Skip to content

Add .gitattributes to normalize line endings to LF#108

Merged
danielchalmers merged 1 commit into
mainfrom
chore/gitattributes-eol
Jun 17, 2026
Merged

Add .gitattributes to normalize line endings to LF#108
danielchalmers merged 1 commit into
mainfrom
chore/gitattributes-eol

Conversation

@danielchalmers

@danielchalmers danielchalmers commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a .gitattributes that forces text files to check out with LF in every working tree, overriding core.autocrlf. PNG/ZIP assets stay binary.

Why

The repo has no .gitattributes and Windows clones typically run core.autocrlf=true, so the working tree gets CRLF while Prettier defaults to endOfLine: "lf". That makes npm run format:check fail locally on every text file (41 of them) even though the committed blobs are LF and CI (Linux) passes. This pins LF everywhere so local and CI behavior match.

Verification

After re-applying attributes to the working tree:

  • src/shared/constants.ts line endings: CRLF → LF
  • prettier . --check"All matched files use Prettier code style!" (previously failed on 41 files)

Independent of #107 — branched off main.

Force text files to check out with LF in every working tree regardless
of core.autocrlf, so Prettier's default endOfLine: "lf" stays green on
Windows. Resolves local `prettier --check` failures caused by CRLF
checkouts; CI (Linux) already used LF.
@danielchalmers danielchalmers force-pushed the chore/gitattributes-eol branch from faac35d to 695c09a Compare June 17, 2026 19:25
@danielchalmers danielchalmers merged commit 42e9126 into main Jun 17, 2026
7 of 8 checks passed
@danielchalmers danielchalmers deleted the chore/gitattributes-eol branch June 17, 2026 19:38
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