(linebreak-style) Expected linebreaks to be 'LF' but found 'CRLF'. (eslint) (linebreak-style) Expected linebreaks to be 'LF' but found 'CRLF'. (eslint) unix unix

(linebreak-style) Expected linebreaks to be 'LF' but found 'CRLF'. (eslint)


The main solution was that Windows by default using CRLF, like my WebStorm.

1)first step is to change on WebStorm default encoding like there:

https://www.jetbrains.com/phpstorm/help/configuring-line-separators.html

2)And change it on Status Bar

https://www.jetbrains.com/phpstorm/help/status-bar.html

Save it! and

OKAY No lint warnings.


Run this in your terminal or cmd prompt

git config core.autocrlf falsegit rm --cached -r .git reset --hard

Note - Make sure you don't have any un-committed changes else it will be deleted!


If you are using Vs-Code just run this command in terminal:

yarn run lint --fix

I am not sure, if this will work for all editors, but definitely worths trying.