-
Notifications
You must be signed in to change notification settings - Fork 3.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
Update gulp-eslint version to 4.0 #12450
Conversation
For a more sane code review without whitespace-only changes, use this link: https://github.com/ampproject/amphtml/pull/12450/files?w=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.
My only comment is about making sure that gulp lint
still picks up custom rules defined in elint-rules
folder, my worry is that maybe gulp-eslint
v4 has followed the path of eslint
v4 and removed support for rulesPath
in favour of either rulesdir
or plugins
.
One way to verify is using the banned spread operator. In any file change a function call like foo(bar);
to foo(...bar);
and run gulp lint
if it does not complain, custom rules are not being picked up.
@aghassemi The rules in
Output:
|
Double-verified by making sure that adding a spread operator will result in a lint error :) |
Thanks @rsimha-amp . LGTM. |
This PR does the following:
gulp-eslint
used bygulp lint
to 4.0ecmaFeatures
section of.eslintrc
(we've already setecmaVersion
to 6) (See https://eslint.org/docs/user-guide/migrating-to-2.0.0#language-options)indent
rule (See https://eslint.org/docs/user-guide/migrating-to-4.0.0#indent-rewrite)no-multi-spaces
rule (See https://eslint.org/docs/user-guide/migrating-to-4.0.0#-the-no-multi-spaces-rule-is-more-strict-by-default)Partial fix for #12181
Follow up to #12350