question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style

See original GitHub issue

I’m currently using windows, to fix this issue I tried adding an .eslintrc with /*eslint linebreak-style: ["error", "windows"]*/, but then I got this error :

D:\apps\react-cool-starter>yarn build:client yarn build:client v1.0.2 $ yarn clean:client && better-npm-run build:client running better-npm-run in D:\apps\react-cool-starter Executing script: clean:client

to be executed: “rimraf ./build/public/assets” running better-npm-run in D:\apps\react-cool-starter Executing script: build:client

to be executed: “webpack --progress --hide-modules --config ./tools/webpack/webpack.client.babel.js” Hash: 6385ef822779212c8ca4 Version: webpack 3.6.0 Time: 23660ms 4 assets

ERROR in ./src/client.js Module build failed: Module failed because of a eslint error.

D:\apps\react-cool-starter\src\client.js 3:1 error Parsing error: The keyword ‘import’ is reserved

? 1 problem (1 error, 0 warnings)

error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

185reactions
crescent-igorcommented, Jun 6, 2018

If you are using vscode i would recommend you to click the option at the bottom-right of the window and set it to LF from CRLF…this fixed my errors

36reactions
martin2786commented, Sep 24, 2017

You need to add on package.json, under rules this line:

"linebreak-style": 0,

So it will look like:

“rules”: { “linebreak-style”: 0, “global-require”: 0, …

And remove the other stuff you’ve added.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
If you want it in crlf (Windows Eol), go to File -> Preferences -> Settings. Type ...
Read more >
Fixing the linebreak-style eslint error for Windows #171 - GitHub
On Windows, with the current eslint setup, you get this error: Expected linebreaks to be 'LF' but found 'CRLF' . The eslint site...
Read more >
JavaScript : Expected linebreaks to be 'LF' but found 'CRLF ...
JavaScript : Expected linebreaks to be 'LF ' but found ' CRLF ' linebreak - style [ Gift : Animated Search Engine :...
Read more >
Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
The linebreaks (new lines) used in windows operating system are usually carriage returns (CR) followed by a line feed (LF) making it a...
Read more >
linebreak-style - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found