Closed carsonpowers closed 6 years ago
@sabrick Interesting. I never heard or seen anyone with this problem. Will investigate. Is it only an ESLint error or does it actually not install?
I updated my comment slightly. "npm install" runs fine. The error occurs with "npm start". Here's a screenshot of the start of the error block.
I suspect this is a Windows issue? Just a guess.
What about that warning?
WARNING in webpack: Using NoErrorsPlugin is deprecated. Use NoEmitOnErrorsPlugin instead.
@ls-guillaume-lambert Pretty sure that's not related. Nonetheless, I should update webpack 👍
I assume the issue is happening on Windows due to the way git automatically formats the files when pulling a repo, but I am not sure.
The culprit is in this webpack rule: https://github.com/inooid/react-redux-card-game/blob/master/webpack/webpack.config.js#L31-L36
Look at this: http://eslint.org/docs/rules/linebreak-style#using-this-rule-with-version-control-systems
Thanks for the links @ls-guillaume-lambert, much appreciated! The webpack rule is definitely a little overkill. Warning seems to be good enough, but completely stopping the build is definitely too much 👍 .
For the ESLint link, I'll look into the .gitattributes
file that seems really interesting. I'll try and figure out whether it's a local file or a file that's checked into the repo 🤔
After investigating this should be fixed at the user. ESLint is correctly warning against the wrong kind of linebreaks 👍
On Windows > npm install > npm start >
"error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style"
Solution:
react-redux-card-game (directory) > .eslintrc (file) > rules > add "linebreak-style": 0,