Skip to content
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

Closed
wants to merge 4 commits into from
Closed

Conversation

NickNaso
Copy link
Member

@NickNaso NickNaso commented Oct 6, 2017

…e literals

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. labels Oct 6, 2017
Copy link
Contributor

@rmg rmg left a 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!

@@ -87,11 +85,9 @@ module.exports = {
}

if (typeUrl) {
typeLinks.push('<a href="' + typeUrl + '" class="type">&lt;' +
typeTextFull + '&gt;</a>');
typeLinks.push(`<a href="${typeUrl}" class="type">&lt;${typeTextFull}&gt;</a>`);
Copy link
Contributor

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">&lt;${typeTextFull}&gt;</a>`);

Copy link
Member Author

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

Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assuming so, landing now.

@Trott Trott added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Oct 6, 2017
@@ -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`);
Copy link
Member

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.

Copy link
Member

@gibfahn gibfahn left a 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.

@NickNaso
Copy link
Member Author

NickNaso commented Oct 9, 2017

Ok I just done

@gibfahn
Copy link
Member

gibfahn commented Oct 9, 2017

gireeshpunathil pushed a commit that referenced this pull request Oct 11, 2017
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]>
@gireeshpunathil
Copy link
Member

Landed in 8c6c060
Thanks for the contribution!

addaleax pushed a commit to addaleax/ayo that referenced this pull request Oct 12, 2017
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]>
targos pushed a commit that referenced this pull request Oct 18, 2017
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants