-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
lib: remove excess indentation #14090
Conversation
@@ -71,8 +71,7 @@ function fatalError(e) { | |||
Error.captureStackTrace(o, fatalError); | |||
process._rawDebug(o.stack); | |||
} | |||
if (process.execArgv.some( | |||
(e) => /^--abort[_-]on[_-]uncaught[_-]exception$/.test(e))) { | |||
if (process.execArgv.some((e) => /^--abort[_-]on[_-]uncaught[_-]exception$/.test(e))) { |
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 seems to be above 80 chars.
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.
As of May, the linter doesn't enforce the line-length rule on lines with regular expression literals. See #12807 for rationale. (Working as intended here too, IMO. I find this much more readable than either the current formatting or any other reasonable formatting I was able to come up with.)
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 suppose one way to keep it readable and under 80 chars is to assign the regular expression to a variable on the previous line and use the variable here. I would prefer to avoid that because it means this PR is more than formatting changes. I'm not sure how reasonable that is of me, though. :-D
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.
Thanks for the info!
I think it would still be nice to move the expression up in it's own variable though, since it prevents the RegExp from being recreated multiple times.
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 is inside fatalError()
so I don't think RegExp re-creation is an issue. If the RegExp passes, process.abort()
is called. If the RegExp fails, process.exit()
is called.
In anticipation of stricter linting for indentation, remove instances of extra indentation that will be flagged by the new rules.
81130af
to
2c385d9
Compare
Landed in 0d22858 |
In anticipation of stricter linting for indentation, remove instances of extra indentation that will be flagged by the new rules. PR-URL: nodejs#14090 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
In anticipation of stricter linting for indentation, remove instances of extra indentation that will be flagged by the new rules. PR-URL: #14090 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
In anticipation of stricter linting for indentation, remove instances of extra indentation that will be flagged by the new rules. PR-URL: #14090 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
In anticipation of stricter linting for indentation, remove instances of extra indentation that will be flagged by the new rules. PR-URL: #14090 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
In anticipation of stricter linting for indentation, remove instances of extra indentation that will be flagged by the new rules. PR-URL: nodejs#14090 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
In anticipation of stricter linting for indentation, remove instances of extra indentation that will be flagged by the new rules. Backport-PR-URL: #14835 PR-URL: #14090 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
In anticipation of stricter linting for indentation, remove instances of extra indentation that will be flagged by the new rules. Backport-PR-URL: #14835 PR-URL: #14090 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
In anticipation of stricter linting for indentation, remove instances of
extra indentation that will be flagged by the new rules.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
lib tools