Skip to content

Commit dd55bbe

Browse files
addisonElliottflovilmart
authored andcommitted
Fix eslint errors on Windows (parse-community#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
1 parent 4bccf96 commit dd55bbe

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.gitattributes

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* text=auto eol=lf
2+
3+
*.js text
4+
*.html text
5+
*.less text
6+
*.json text
7+
*.css text
8+
*.xml text
9+
*.md text
10+
*.txt text
11+
*.yml text
12+
*.sql text
13+
*.sh text
14+
15+
*.png binary

0 commit comments

Comments
 (0)