inooid / react-redux-card-game

A web version of Blizzard's Hearthstone game built with React, Redux and ImmutableJS
MIT License
107 stars 20 forks source link

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

Closed carsonpowers closed 6 years ago

carsonpowers commented 7 years ago

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,

inooid commented 7 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?

carsonpowers commented 7 years ago

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.

glambert commented 7 years ago

What about that warning?

WARNING in webpack: Using NoErrorsPlugin is deprecated. Use NoEmitOnErrorsPlugin instead.

inooid commented 7 years ago

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

glambert commented 7 years ago

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

inooid commented 7 years ago

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 🤔

inooid commented 6 years ago

After investigating this should be fixed at the user. ESLint is correctly warning against the wrong kind of linebreaks 👍