-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
[v6.x backport] tools: update ESLint to v4.0.0 #14340
Conversation
Make the "can we lint?" check in Makefile and vcbuild.bat depend on bin/eslint.js rather than lib/eslint.js. In ESLint 4.0.0, lib/eslint.js is not present. The lint rules call bin/eslint.js so check for that instead. PR-URL: nodejs#13645 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: James M Snell <[email protected]>
@@ -1,4 +1,25 @@ | |||
/* eslint-disable indent, no-tabs */ | |||
// Copyright Joyent, Inc. and other Node contributors. |
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 that change supposed to be here?
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.
The copyright is in the file in master, so I assumed 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.
/cc @jasnell
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.
Oh, wait, I see, the copyright has not been restored to the v6.x-staging branch, at least not yet. OK, I'll remove it.
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.
Removed. Thanks.
.eslintrc.yaml
Outdated
@@ -117,18 +124,19 @@ rules: | |||
}, { | |||
selector: "ThrowStatement > CallExpression[callee.name=/Error$/]", | |||
message: "Use new keyword when throwing an Error." | |||
}, { | |||
selector: "CallExpression[callee.object.name='assert'][callee.property.name='fail'][arguments.length=1]", |
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.
This rule should not be removed. It was in a semver-major change: #12293
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.
I took the rule out because it was part of a merge conflict when cherry-picking, and in those cases, I err on the side of more lenient linting in previous releases. I think you're right, and I should restore it.
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.
OK, I restored the rule. Thanks!
Update ESLint and configuration to version 4.0.0. PR-URL: nodejs#13645 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: James M Snell <[email protected]>
landed in fcb27fa...4ffe804 |
Make the "can we lint?" check in Makefile and vcbuild.bat depend on bin/eslint.js rather than lib/eslint.js. In ESLint 4.0.0, lib/eslint.js is not present. The lint rules call bin/eslint.js so check for that instead. Backport-PR-URL: #14340 PR-URL: #13645 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: James M Snell <[email protected]>
Update ESLint and configuration to version 4.0.0. Backport-PR-URL: #14340 PR-URL: #13645 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: James M Snell <[email protected]>
Update ESLint and configuration to version 4.0.0.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
tools