Another way in is on the Prettier side: endOfLine: "auto" in the config makes it keep whatever line ending the file already has, so it stops rewriting CRLF to LF and lint-staged has nothing odd to react to. The eol=lf in .gitattributes is still the cleaner team fix, since it makes every checkout the same instead of relying on each tool respecting the existing endings.