Skip to content

Instantly share code, notes, and snippets.

View RadValentin's full-sized avatar

Valentin Radulescu RadValentin

View GitHub Profile
@RadValentin
RadValentin / linebreak-style.md
Created March 4, 2017 15:19
How to stop ESLint/XO CRLF linebreak-style warnings in Windows

If you clone a git repo that enforces a linebreak-style: unix on a Windows machine then ESLint will probably throw the warning below even if you've made no local changes.

Expected linebreaks to be LF but found CRLF.  linebreak-style

In order to fix this you'll need to tell git to default to Unix style line endings rather that OS defaults.

git config --global core.eol lf
git config --global core.autocrlf input