Skip to content

tools: fix nits in tools/doc/type-parser.js - #19612

Closed
vsemozhetbyt wants to merge 1 commit into
nodejs:masterfrom
vsemozhetbyt:tools-doc-type-parser
Closed

tools: fix nits in tools/doc/type-parser.js#19612
vsemozhetbyt wants to merge 1 commit into
nodejs:masterfrom
vsemozhetbyt:tools-doc-type-parser

Conversation

@vsemozhetbyt

@vsemozhetbytvsemozhetbyt commented Mar 26, 2018

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

Style nits:

  • Remove redundant variable.
  • Rename and regroup variables for consistency.
  • Rearrange export to reduce indentation level (unnecessarily increases diff, unfortunately).
  • Replace common function by arrow function in .forEach() argument.
  • Replace .indexOf() with .includes().
  • Unify string concatenation, replace with template strings.

HTML nit:

  • Remove extra line break in the output (reduces overall docs size by 78 KB).

Logic nit:

  • Throw when type slot is empty (on things like { }, { | type }, { type | }).

@vsemozhetbytvsemozhetbyt added the fast-track PRs that do not need to wait for 48 hours to land. label Mar 26, 2018
@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 26, 2018
@vsemozhetbyt

Copy link
Copy Markdown
ContributorAuthor

@vsemozhetbytvsemozhetbyt added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 26, 2018
vsemozhetbyt added a commit that referenced this pull request Mar 28, 2018
PR-URL: #19612
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
@vsemozhetbyt

Copy link
Copy Markdown
ContributorAuthor

Landed in 5d387e9

@vsemozhetbyt
vsemozhetbyt deleted the tools-doc-type-parser branch March 28, 2018 08:14
targos pushed a commit that referenced this pull request Apr 2, 2018
PR-URL: #19612
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
@targostargos mentioned this pull request Apr 4, 2018
MylesBorins pushed a commit that referenced this pull request Aug 17, 2018
PR-URL: #19612
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
@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

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.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.

6 participants

@vsemozhetbyt@Leko@XadillaX@trivikr@MylesBorins@nodejs-github-bot