Replaced string concats with template literals#15858
Replaced string concats with template literals#15858Ethan-Arrowood wants to merge 4 commits intonodejs:masterfrom
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.
-1 I think these kinds of changes make things less readable.
There was a problem hiding this comment.
I apologize I think prettier made these changes automatically.
There was a problem hiding this comment.
Ah ok. There are other instances of this in this file that should also be reverted.
tools/lint-js.js
Outdated
| 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.
I prefer the added parentheses so the order of operations is immediately clear.
There was a problem hiding this comment.
Another prettier auto-change. My mistake.
|
@mscdex I've gone back through and reverted all Prettier edits |
tools/lint-js.js
Outdated
| } | ||
| if (code === 0) | ||
| process.exit(failures ? 1 : 0); | ||
| if (code === 0) process.exit(failures ? 1 : 0); |
There was a problem hiding this comment.
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.jswith template literals.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
Tools