Search code examples
windowsunixwebstormlinteslint

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


I had this error when running lint test, how solve this error:

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

enter image description here

PS: Maybe it will be helpfull: I'm using Windows (WebStorm), and the project is running and debugging in Debian.


Solution

  • 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.