-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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(lint): Change endOfLine rules to better support linting on Windows #20078
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [638858b]
Page Load Metrics (1536 ± 38 ms)
Bundle size diffs
|
Codecov Report
@@ Coverage Diff @@
## develop #20078 +/- ##
========================================
Coverage 69.43% 69.43%
========================================
Files 990 990
Lines 37428 37428
Branches 10039 10039
========================================
Hits 25986 25986
Misses 11442 11442 |
@@ -63,7 +63,7 @@ | |||
"lint:lockfile:dedupe:fix": "yarn dedupe", | |||
"lint:lockfile": "lockfile-lint --path yarn.lock --allowed-hosts npm yarn github.com codeload.github.com --empty-hostname true --allowed-schemes \"https:\" \"git+https:\" \"npm:\" \"patch:\" \"workspace:\"", | |||
"lint:shellcheck": "./development/shellcheck.sh", | |||
"lint:styles": "stylelint -- */**/*.scss", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change necessary because lint wasn't running at all on Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the second bullet point in the PR description: "on Windows, produced the error The command line is too long.
"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Before this PR, if you run eslint on Windows, you will get thousands of CRLF errors like this:
You can fix them with
yarn lint:fix
, but they will probably come back again, depending on your git and text editor settings.Meanwhile, git commits everything as LF, so it shouldn't affect Mac/Linux.
Notes:
fix(lint): Change endOfLine rules to better support linting on Windows eslint-config#311
"lint:styles": "stylelint -- */**/*.scss",
and on Windows, produced the error
The command line is too long.
Changed to the valid
"lint:styles": "stylelint '*/**/*.scss'",