FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: fix more type case inconsistencies by silverwind · Pull Request #11697 · nodejs/node · GitHub

/ node Public

doc: fix more type case inconsistencies - #11697

Closed
silverwind wants to merge 1 commit into
nodejs:masterfrom
silverwind:type-fixes-part-2
Closed

doc: fix more type case inconsistencies#11697
silverwind wants to merge 1 commit into
nodejs:masterfrom
silverwind:type-fixes-part-2

Conversation

silverwind commented Mar 5, 2017
edited
Loading

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

Turns out I missed quite a few types in ff13619 because my sed skills weren't up to par. This commit should fix all remaining issues with primitive type cases.

I also made the syntax with multiple types consistent by removing any whitespace between curly braces. If more people prefer {type | type | type} over {type|type|type}, I can also change to that.

Type replacement was done with:

sed -i -E 's#(\{|\|)\s+?(Boolean|Null|Undefined|Number|String|Symbol)\s+?(\||\})#\1\L\2\3#g' *.md

nodejs-github-bot added the doc Issues and PRs related to the documentations. label Mar 5, 2017
Comment thread doc/api/buffer.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Integer needs to be fixed as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Integer is not a valid type. Shall we change them all to number?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think it would make sense to be specific to keep Integer here because it doesn’t really make sense to pass in non-integer numbers here… the upper-casing is a bit weird but I’d be okay with it, as long as we try to be consistent

(also /cc @ameliavoncat whose awesome PRs also touch these parts of the docs and who might want to keep track of this discussion)

silverwind Mar 6, 2017
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yeah, I guess it's better to keep it as-is. Per our rule discussed in the last PR, everything except the six primitives should be uppercased.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@silverwind in your commit that changed the case in the doctool, Integer was changed to integer. Either way it doesn't seem right to me that number and integer have different cases.

silverwind Mar 6, 2017
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think I'll move it out of jsPrimitives and into typeMap, possibly linking it to number docs.

Comment thread doc/api/crypto.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can you drop the spaces before the colons in this file? We don’t do that anywhere else in the docs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

done

Copy link
Copy Markdown
Contributor Author

@TimothyGu d5d4274 fixes the Integer inconsistency in the doctool. I also added the missing undefined type, which results in a few new links in the doc. I still think we should keep it at Integer because we only lowercase the six primitives.

Copy link
Copy Markdown
Member

I still think we should keep it at Integer because we only lowercase the six primitives.

But the issue at hand is that an integer is expressed as a number primitive.

I also just looked at a proposal in TypeScript to add integral types, and though not yet accepted, it also uses lower cased type name (int). And AFAICT, there isn't any disagreement in that thread about its capitalization.

Copy link
Copy Markdown
Contributor Author

@TimothyGu okay, lowercased integer. I guess a argument could be made about it not being a valid constructor. It's really a odd type, but I see its value in documentation.

silverwind force-pushed the type-fixes-part-2 branch 2 times, most recently from 6acf5f0 to 2d3068b Compare March 8, 2017 16:14

Copy link
Copy Markdown
Contributor Author

Landed in 5f32024.

silverwind closed this Mar 8, 2017
silverwind added a commit that referenced this pull request Mar 8, 2017
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: #11697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
silverwind deleted the type-fixes-part-2 branch March 8, 2017 16:22
silverwind added a commit to silverwind/node that referenced this pull request Mar 8, 2017
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: nodejs#11697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Mar 13, 2017
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: nodejs#11697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
jungx098 pushed a commit to jungx098/node that referenced this pull request Mar 21, 2017
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: nodejs#11697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>

Copy link
Copy Markdown
Contributor

Do we want to backport to v6.x?

Copy link
Copy Markdown
Contributor Author

I'd say it's not strictly necessary, but it could make landing future doc backports easier.

Ideally, these commits should be landed in tandem:

ff13619
9be03a2
172be50
5f32024

Copy link
Copy Markdown
Contributor

@silverwind would you be willing to put together a PR with those commits?

Copy link
Copy Markdown
Contributor Author

@MylesBorins not right now, I'm busy on other projects. But if you can wait a bit, I can put something together later.

Copy link
Copy Markdown
Contributor Author

Backport in #13054

gibfahn pushed a commit that referenced this pull request May 16, 2017
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: #11697
Backport-PR-URL: #13054
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
MylesBorins pushed a commit that referenced this pull request May 18, 2017
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: #11697
Backport-PR-URL: #13054
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
silverwind added a commit to silverwind/node that referenced this pull request May 18, 2017
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: nodejs#11697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
gibfahn pushed a commit to gibfahn/node that referenced this pull request Jun 17, 2017
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: nodejs#11697
Backport-PR-URL: nodejs#13054
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
gibfahn pushed a commit that referenced this pull request Jun 20, 2017
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: #11697
Backport-PR-URL: #13054
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2017
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: #11697
Backport-PR-URL: #13054
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
MylesBorins mentioned this pull request Jul 18, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL