-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Replaced string concats with template literals #15858
Replaced string concats with template literals #15858
Conversation
tools/lint-js.js
Outdated
}; | ||
|
||
// Check if we should fix errors that are fixable | ||
if (process.argv.indexOf('-F') !== -1) | ||
cliOptions.fix = true; | ||
if (process.argv.indexOf('-F') !== -1) cliOptions.fix = true; |
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.
-1 I think these kinds of changes make things less readable.
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 apologize I think prettier made these changes automatically.
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 ok. There are other instances of this in this file that should also be reverted.
tools/lint-js.js
Outdated
|
||
// Calculate and format the data for displaying | ||
const elapsed = process.hrtime(startTime)[0]; | ||
const mins = padString(Math.floor(elapsed / 60), 2, '0'); | ||
const secs = padString(elapsed % 60, 2, '0'); | ||
const passed = padString(successes, 6, ' '); | ||
const failed = padString(failures, 6, ' '); | ||
var pct = Math.ceil(((totalPaths - paths.length) / totalPaths) * 100); | ||
var pct = Math.ceil((totalPaths - paths.length) / totalPaths * 100); |
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 prefer the added parentheses so the order of operations is immediately clear.
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.
Another prettier auto-change. My mistake.
@mscdex I've gone back through and reverted all Prettier edits |
tools/lint-js.js
Outdated
@@ -139,8 +139,7 @@ if (cluster.isMaster) { | |||
printProgress(); | |||
outFn('\r\n'); | |||
} | |||
if (code === 0) | |||
process.exit(failures ? 1 : 0); | |||
if (code === 0) process.exit(failures ? 1 : 0); |
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.
One here yet.
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.
About to board my plane so other edits will have to wait until I get home (unless my plane has internet).
@Trott it seems like it is failing on node-test-commit-osx. Any idea on how I could remedy this? |
@Ethan-Arrowood That looks like a Ci infrastructure glitch and not anything to do with the changes here. I don't think you need to do anything about it. |
Re-running CI on OS X only: https://ci.nodejs.org/job/node-test-commit-osx/12970/ |
Replace string concatenation in `tools/lint-js.js` with template literals. PR-URL: nodejs#15858 Reviewed-By: Rich Trott <rtrott@gmail.com>
Landed in 27b5bf1. |
Replace string concatenation in `tools/lint-js.js` with template literals. PR-URL: #15858 Reviewed-By: Rich Trott <rtrott@gmail.com>
Replace string concatenation in `tools/lint-js.js` with template literals. PR-URL: nodejs/node#15858 Reviewed-By: Rich Trott <rtrott@gmail.com>
Replace string concatenation in `tools/lint-js.js` with template literals. PR-URL: #15858 Reviewed-By: Rich Trott <rtrott@gmail.com>
Replace string concatenation in `tools/lint-js.js` with template literals. PR-URL: #15858 Reviewed-By: Rich Trott <rtrott@gmail.com>
Replace string concatenation in `tools/lint-js.js` with template literals. PR-URL: #15858 Reviewed-By: Rich Trott <rtrott@gmail.com>
Replaced string concatenation in
tools/lint-js.js
with template literals.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
Tools