Error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
See original GitHub issueI’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:
- Created 6 years ago
- Comments:11 (2 by maintainers)
Top GitHub Comments
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
You need to add on package.json, under rules this line:
So it will look like:
“rules”: { “linebreak-style”: 0, “global-require”: 0, …
And remove the other stuff you’ve added.