-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
tools: enable unicode-bom ESLint rule #11479
Conversation
.eslintrc.yaml
Outdated
@@ -51,6 +51,10 @@ rules: | |||
# http://eslint.org/docs/rules/#strict-mode | |||
strict: [2, global] | |||
|
|||
# UTF Byte Order Mark | |||
# http://eslint.org/docs/rules/#unicode-bom | |||
unicode-bom: 2 |
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.
For consistency with the rest of the file, please place unicode-bom
under Stylistic Issues
in alphabetical order with the other rules (so last in the list of Stylistic Issues). No need for a comment or anything, as there's a link at the top of Stylistic Issues
, although I don't mind the comment either, so ¯\(ツ)/¯
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.
LGTM with a nit + if CI linter is green
Disallow UTF-8 Byte Order Marks in the source tree. That Node can read these files is still tested by `test/sequential/test-module-loading.js`.
@Trott done! |
@addaleax Thank you, Sorry. |
@vsemozhetbyt No problem! I noticed it a bit too late myself. 😄 Also, it’s not like there was an actual rule for this before, it’s just something that occasionally throws off editors. ¯\_(ツ)_/¯ |
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.
LGTM. I checked our .editorconfig
and we're already covered through charset = utf-8
(as opposed to utf-8-bom
).
PR-URL: #11479 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Disallow UTF-8 Byte Order Marks in the source tree. That Node can read these files is still tested by `test/sequential/test-module-loading.js`. PR-URL: #11479 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #11479 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Disallow UTF-8 Byte Order Marks in the source tree. That Node can read these files is still tested by `test/sequential/test-module-loading.js`. PR-URL: #11479 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This would need a backport PR for v6 and v4 |
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
eslint