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

Ensure line endings are correct on Windows #1230

Merged
merged 1 commit into from
Jan 2, 2017

Conversation

anaisbetts
Copy link
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

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
@anaisbetts
Copy link
Contributor Author

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.

@anaisbetts
Copy link
Contributor Author

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

@jongalloway
Copy link
Contributor

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

anaisbetts added a commit to anaisbetts/javascript that referenced this pull request Dec 28, 2016
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 vercel/hyper#1230, xojs/eslint-config-xo#35
@matheuss matheuss merged commit f139ca8 into vercel:master Jan 2, 2017
@matheuss
Copy link
Member

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 🤗

@anaisbetts
Copy link
Contributor Author

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

@anaisbetts anaisbetts deleted the gitattributes branch January 2, 2017 20:10
tylerong pushed a commit to tylerong/hyper that referenced this pull request Jul 3, 2017
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
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

3 participants