Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

addaleax
Copy link
Member

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

eslint

@addaleax addaleax added the tools Issues and PRs related to the tools directory. label Feb 21, 2017
.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
Copy link
Member

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 ¯\(ツ)

Copy link
Member

@Trott Trott left a 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`.
@addaleax
Copy link
Member Author

@vsemozhetbyt
Copy link
Contributor

@addaleax Thank you, Sorry.

@addaleax
Copy link
Member Author

@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. ¯\_(ツ)_/¯

Copy link
Contributor

@silverwind silverwind left a 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).

@addaleax
Copy link
Member Author

Landed in 049709b, 5c1ec6e

@addaleax addaleax closed this Feb 24, 2017
@addaleax addaleax deleted the eslint-bom branch February 24, 2017 00:56
addaleax added a commit that referenced this pull request Feb 24, 2017
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>
addaleax added a commit that referenced this pull request Feb 24, 2017
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>
addaleax added a commit that referenced this pull request Feb 24, 2017
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>
addaleax added a commit that referenced this pull request Feb 24, 2017
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>
@italoacasas italoacasas mentioned this pull request Feb 25, 2017
@jasnell
Copy link
Member

jasnell commented Mar 7, 2017

This would need a backport PR for v6 and v4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants