I had this error when running lint test, how solve this error:
(linebreak-style) Expected linebreaks to be 'LF' but found 'CRLF'. (eslint)
PS: Maybe it will be helpfull: I'm using Windows (WebStorm), and the project is running and debugging in Debian.
The linebreaks (new lines) used in windows operating system are usually carriage returns (CR) followed by a line feed (LF) making it a carriage return line feed (CRLF) whereas Linux and Unix use a simple line feed (LF). The corresponding control sequences are "\n" (for LF) and "\r\n" for (CRLF).
The Quick FixAt the bottom right of the screen in VS Code there is a little button that says “LF” or “CRLF”: Click that button and change it to your preference. Voila, the file you are editing now has the correct line breaks.
CR = Carriage Return ( \r , 0x0D in hexadecimal, 13 in decimal) — moves the cursor to the beginning of the line without advancing to the next line. LF = Line Feed ( \n , 0x0A in hexadecimal, 10 in decimal) — moves the cursor down to the next line without returning to the beginning of the line.
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 false
git rm --cached -r .
git reset --hard
Note - Make sure you don't have any un-committed changes else it will be deleted!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With