From 5ff3ff53a6e2f62e6a716ecbf197e00e1dfd7df7 Mon Sep 17 00:00:00 2001 From: LyAhn Date: Sat, 4 Jul 2026 20:26:05 +0100 Subject: [PATCH] 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. --- .gitattributes | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..601d738 --- /dev/null +++ b/.gitattributes @@ -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