Skip to content

Fix for CRLF issue #1078

Merged
texodus merged 2 commits intoperspective-dev:masterfrom
darjama:fixCRLF
Jun 9, 2020
Merged

Fix for CRLF issue #1078
texodus merged 2 commits intoperspective-dev:masterfrom
darjama:fixCRLF

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!

@texodus texodus merged commit 59e1510 into perspective-dev:master Jun 9, 2020
@sc1f sc1f mentioned this pull request Jun 19, 2020
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

Development

Successfully merging this pull request may close these issues.

4 participants