chore: enforce LF line endings via .gitattributes
Prettier enforces endOfLine: lf, but core.autocrlf=true was converting working-copy files to CRLF on checkout, which would flip format:check red after every branch switch. eol=lf keeps LF in the working tree; binary assets and Windows scripts are exempted.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# Keep LF in the working copy for all text files (prettier enforces LF)
|
||||
* text=auto eol=lf
|
||||
|
||||
# Windows scripts that genuinely need CRLF
|
||||
*.bat text eol=crlf
|
||||
*.cmd text eol=crlf
|
||||
*.ps1 text eol=crlf
|
||||
|
||||
# Binary assets — never touch line endings
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.webp binary
|
||||
*.gif binary
|
||||
*.ico binary
|
||||
*.icns binary
|
||||
*.woff binary
|
||||
*.woff2 binary
|
||||
*.ttf binary
|
||||
*.otf binary
|
||||
*.mp4 binary
|
||||
*.onnx binary
|
||||
Reference in New Issue
Block a user