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

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

Closed
wants to merge 1 commit into from
Closed

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

wants to merge 1 commit into from

Conversation

vsemozhetbyt
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt commented Mar 26, 2018

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 | }).

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

@vsemozhetbyt vsemozhetbyt 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
Contributor Author

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>
@targos targos 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>
@MylesBorins MylesBorins mentioned this pull request Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. fast-track PRs that do not need to wait for 48 hours to land. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants