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 for CRLF issue #1078

Merged
merged 2 commits into from Jun 9, 2020
Merged

Fix for CRLF issue #1078

merged 2 commits into from Jun 9, 2020

Conversation

darjama
Copy link
Contributor

@darjama darjama commented Jun 5, 2020

I've added a rule to catch the CRLF formatting in the ESlint config. However, according to https://eslint.org/docs/rules/linebreak-style the problem would appear to lie at least partly in the way git automatically converts the formatting on windows machines (although it's possibly coming from the windows based code editors. to quote:

If you use git, you may want to add a line to your .gitattributes file to prevent git from converting linebreaks in .js files:
*.js text eol=lf

So I've added that line to the .gitattributes as well.

Please note that this pull request doesn't change all the existing files with CLRF end of line sequences, but should help for future changes. If you'd like me to submit an additional pull request for existing files or work it into this one please let me know.

@timkpaine timkpaine added enhancement Feature requests or improvements JS labels Jun 5, 2020
Copy link
Member

@texodus texodus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, this is exactly the right fix for this!

@texodus
Copy link
Member

texodus commented Jun 9, 2020

Thanks for the PR, much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests or improvements JS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants