-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Replace string concatenation in tools/doc/type-parser.js with templat… #15827
Conversation
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 contribution!
tools/doc/type-parser.js
Outdated
@@ -87,11 +85,9 @@ module.exports = { | |||
} | |||
|
|||
if (typeUrl) { | |||
typeLinks.push('<a href="' + typeUrl + '" class="type"><' + | |||
typeTextFull + '></a>'); | |||
typeLinks.push(`<a href="${typeUrl}" class="type"><${typeTextFull}></a>`); |
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 makes the linter sad :-(
But we can make it happy by moving the arg to the next line like so:
typeLinks.push(
`<a href="${typeUrl}" class="type"><${typeTextFull}></a>`);
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 you're right I change it right now
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.
@rmg - hope you are good with the changes now?
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.
assuming so, landing now.
doc/guides/writing-tests.md
Outdated
@@ -148,8 +148,8 @@ const http = require('http'); | |||
let request = 0; | |||
let response = 0; | |||
process.on('exit', function() { | |||
assert.equal(request, 1, 'http server "request" callback was not called'); | |||
assert.equal(response, 1, 'http request "response" callback was not called'); | |||
assert.equal(request, 1, `http server "request" callback was not called`); |
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.
Nit: I find this change unnecessary as there is no concatenation.
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.
LGTM with the changes to writing-tests.md
removed. @NickNaso if you could push another commit to your branch that removes them that would be great, otherwise it can be done by whoever lands this.
Ok I just done |
Replace string concatenation in tools/doc/type-parser.js with template literals PR-URL: #15827 Reviewed-By: Ryan Graham <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
Landed in 8c6c060 |
Replace string concatenation in tools/doc/type-parser.js with template literals PR-URL: nodejs/node#15827 Reviewed-By: Ryan Graham <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
Replace string concatenation in tools/doc/type-parser.js with template literals PR-URL: #15827 Reviewed-By: Ryan Graham <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
…e literals
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)