Ensure line endings are correct on Windows #1230

Merged
merged 1 commit into from Jan 2, 2017

Projects

None yet

3 participants

@paulcbetts
Contributor

This allows Windows users to check out the repo and send in PRs without messing up the line endings, see https://help.github.com/articles/dealing-with-line-endings for more

@paulcbetts paulcbetts Ensure line endings are correct on Windows
This allows Windows users to check out the repo and send in PRs without messing up the line endings, see https://help.github.com/articles/dealing-with-line-endings for more
35848de
@paulcbetts
Contributor

Can we get this merged? Without this it's hard for any Windows user to contribute because every file is marked as changed because of line endings.

@paulcbetts
Contributor

This is actually even worse - because of the "linebreak-style" lint, I can't even push a branch because I'll get thousands of linter errors

@paulcbetts paulcbetts referenced this pull request in sindresorhus/eslint-config-xo Dec 24, 2016
Open

linebreak-style makes it impossible for Windows users to contribute #35

@jongalloway
Contributor

Yep, I'd been planning to submit this as well. Check out with no changes fails lint on Windows.

@paulcbetts paulcbetts added a commit to paulcbetts/javascript that referenced this pull request Dec 28, 2016
@paulcbetts paulcbetts linebreak-style makes it impossible for Windows users to contribute
Any project that currently uses eslint-config-airbnb checked out on Windows results in thousands of linter errors since the line endings will be CRLF, making it impossible to contribute to these projects as a Windows user without nerfing the linter entirely.

A better way to enforce this is not via a linter, but via a .gitattributes file (https://help.github.com/articles/dealing-with-line-endings). When you do this, Git will ensure the repo internally is LF, but on Win32 will check out files as CRLF (this is a builtin case of a clean/smudge filter)

Refs zeit/hyper#1230, sindresorhus/eslint-config-xo#35
b7e4347
@matheuss matheuss merged commit f139ca8 into zeit:master Jan 2, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@matheuss
Collaborator
matheuss commented Jan 2, 2017

Thank you and sorry for the delay, @paulcbetts! When I was porting Hyper to Windows, I always used git on macOS (I use a VM for Windows) – I never experienced this issue. Thank you again 🤗

@paulcbetts
Contributor

@matheuss I'm still working on the linter, we probably will have to explicitly disable this. eslint/eslint#7823 is the current shitshow

@paulcbetts paulcbetts deleted the paulcbetts:gitattributes branch Jan 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment