-
Notifications
You must be signed in to change notification settings - Fork 30.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
tools: enable stricter linting in lib directory #14403
Conversation
lib/repl.js
Outdated
@@ -1058,7 +1058,7 @@ REPLServer.prototype.defineCommand = function(keyword, cmd) { | |||
cmd = {action: cmd}; | |||
} else if (typeof cmd.action !== 'function') { | |||
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', | |||
'action', 'function', cmd.action); | |||
'action', 'function', cmd.action); |
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.
do we not break on all arguments if we break on any? For some reason I thought that was the more used style throughout the codebase
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 have not noticed that as the predominant style, although I would welcome that change personally. I'll do that here, if no one objects.
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.
ah, doesn't make much of a difference to me, so up to you. I was mainly just curious. Maybe that was just for cpp code.
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.
Too late, I did it. :-D
lib/.eslintrc.yaml
Outdated
@@ -1,4 +1,13 @@ | |||
rules: | |||
indent: [error, 2, {ArrayExpression: first, | |||
CallExpression: {arguments: first}, |
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.
Speaking of indentation, shouldn't these be indented a bit further to align with the third argument above 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.
Yes. Yes they should. 😐
ESLint 4.x provides stricter indentation linting than previous versions. In preparation for enabling the stricter indentation linting, adjust the indentation of four lines in lib/net.js and lib/repl.js.
Enable ESLint 4.x linting and disable legacy linting in the lib directory. While doing this, some indentation in the .eslintrc.yaml file itself was noticed to be incorrect. Fixed that too.
|
ESLint 4.x provides stricter indentation linting than previous versions. In preparation for enabling the stricter indentation linting, adjust the indentation of four lines in lib/net.js and lib/repl.js. PR-URL: #14403 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Enable ESLint 4.x linting and disable legacy linting in the lib directory. While doing this, some indentation in the .eslintrc.yaml file itself was noticed to be incorrect. Fixed that too. PR-URL: #14403 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Marking as |
ESLint 4.x provides stricter indentation linting than previous versions. In preparation for enabling the stricter indentation linting, adjust the indentation of four lines in lib/net.js and lib/repl.js. PR-URL: nodejs#14403 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Enable ESLint 4.x linting and disable legacy linting in the lib directory. While doing this, some indentation in the .eslintrc.yaml file itself was noticed to be incorrect. Fixed that too. PR-URL: nodejs#14403 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
ESLint 4.x provides stricter indentation linting than previous versions. In preparation for enabling the stricter indentation linting, adjust the indentation of four lines in lib/net.js and lib/repl.js. Backport-PR-URL: #14520 Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net> PR-URL: #14403 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Enable ESLint 4.x linting and disable legacy linting in the lib directory. While doing this, some indentation in the .eslintrc.yaml file itself was noticed to be incorrect. Fixed that too. Backport-PR-URL: #14520 Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net> PR-URL: #14403 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
First commit:
Second commit:
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
tools lib net repl