Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix npm install on Windows throwing "Expected linebreaks to be 'LF'but found 'CRLF'" #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zlamma
Copy link

@zlamma zlamma commented Jun 21, 2016

… from eslint

This applies the same fix as ractivejs/rcu#29

Fix by using the per repository .gitattributes overrides

Rationale: The Windows' default is 'auto', which will result in checking out CRLF and, as a result, eslint complaining.

Since eslint is being used and its linebreak-style can't be dynamic to say CRLF when checking under windows, this is the only real option.

Windows editors support Unix EOLs just fine, so this should really be OK. The worst that can happen is someone that didn't rebuild commits Windows EOLs in his fork, which will get caught by the eslint checks on the pull requests.

… but found 'CRLF'" from eslint

Fix by using the [per repository .gitattributes overrides](https://help.github.com/articles/dealing-with-line-endings/#per-repository-settings)

Rationale: The Windows' default is 'auto', which will result in checking out CRLF and, as a result, eslint complaining.

Since eslint is being used and its [linebreak-style](http://eslint.org/docs/rules/linebreak-style) can't be dynamic to say CRLF when checking under windows, this is the only real option.

Windows editors support Unix EOLs just fine, so this should really be OK. The worst that can happen is someone that didn't rebuild commits Windows EOLs in his fork, which will get caught by the eslint checks on the pull requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant