Skip to content

Conversation

@vsemozhetbyt
Copy link
Contributor

@vsemozhetbytvsemozhetbyt commented Mar 20, 2018

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

ES6 nits:

  1. Replace remaining vars with lets.
  2. Replace a common function with an arrow function in .forEach() argument.

RegExp nits:

  1. Simplify [A-Za-z0-9-_] into [\w-].
  2. Remove capturing and not capturing parentheses in includeExpr RegExp: there is no need to group in its case + includeExpr is used only in .match() call that does not return capturing.
  3. Replace .match() with .test() in a boolean context.

Logic nits:

  1. Remove excess check: .match() with g flag can only return null or non-empty array (it cannot return an array with 0 length) + incCount may be changed only after this check.

I've built the docs on Windows (using #19330) before and after these changes and both doc sets are identical + test/doctool/test-make-doc.js is OK.

@nodejs-github-botnodejs-github-bot added doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. labels Mar 20, 2018
@vsemozhetbyt
Copy link
ContributorAuthor

CI-lite: https://ci.nodejs.org/job/node-test-pull-request-lite/277/

Let me know if we need full CI for this.

@vsemozhetbytvsemozhetbyt added refactor to ES6+ fast-track PRs that do not need to wait for 48 hours to land. labels Mar 20, 2018
@vsemozhetbyt
Copy link
ContributorAuthor

Landed in 1d42b20

@vsemozhetbytvsemozhetbyt deleted the tools-doc-preprocess branch March 21, 2018 10:41
vsemozhetbyt added a commit that referenced this pull request Mar 21, 2018
PR-URL: #19473 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Richard Lau <[email protected]>
targos pushed a commit that referenced this pull request Mar 24, 2018
PR-URL: #19473 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Richard Lau <[email protected]>
MylesBorins pushed a commit that referenced this pull request Aug 17, 2018
PR-URL: #19473 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Richard Lau <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Aug 17, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.fast-trackPRs that do not need to wait for 48 hours to land.toolsIssues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@vsemozhetbyt@tniessen@richardlau@MylesBorins@nodejs-github-bot