Fix eslint errors on Windows (#4364)

* Fix eslint errors on Windows

On Windows, when run `npm run lint`, a **LOT** of the following errors
appeared:
```
 error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
```

This error only occurs on Windows because the `linebreak-style` eslint
setting was set to "unix". This is fixed by making the eslint config
file a Javascript script and setting the platform based on the build
platform.

Thus, the `linebreak-style` will be "windows" or "unix" depending on the
users platform.

* Remove linespace ending check in Lint

Add .gitattributes that will convert line endings automatically to LF when uploading to GitHub

* Remove bat file extension from gitattributes

Include lint check for line endings

* Change tabs to spaces

* Force LF line endings for each file upon downloading

Restore eslint linebreak style check for unix since LF line endings will be enforced

* Add a few more text files to the gitattributes

* Added png as binary file to gitattributes file

This was necessary because git was showing that the CRLF line endings were being converted to LF for PNG files on Windows
This commit is contained in:
Addison Elliott
2017-11-25 15:06:52 -06:00
committed by Florent Vilmart
parent 4bccf96ae7
commit dd55bbe700

15
.gitattributes vendored Normal file
View File

@@ -0,0 +1,15 @@
* text=auto eol=lf
*.js text
*.html text
*.less text
*.json text
*.css text
*.xml text
*.md text
*.txt text
*.yml text
*.sql text
*.sh text
*.png binary