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: update capitalized-comments eslint rule #26849

Closed
wants to merge 6 commits into from

Conversation

BridgeAR
Copy link
Member

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

@nodejs-github-bot nodejs-github-bot added http Issues or PRs related to the http subsystem. tools Issues and PRs related to the tools directory. labels Mar 22, 2019
.eslintrc.js Outdated Show resolved Hide resolved
@@ -358,7 +358,7 @@ const errorTests = [
send: ')',
expect: 'undefined'
},
// npm prompt error message
// `npm` prompt error message.
Copy link
Member

Choose a reason for hiding this comment

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

I kind of chafe at markdown in comments, so this is (from my perspective) mildly unfortunate. Not blocking--only commenting in case you have another idea. (Maybe we can just add |npm to the end of the ignorePatterns regexp? Maybe long-term goal can be that the whole regexp will just be a set of words separated by pipe characters like var|let|const|npm?

Copy link
Member Author

Choose a reason for hiding this comment

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

We could add a couple of words to the blacklist but I guess it might become relatively big if we only use a blacklist. So I would definitely keep the current ignore pattern as it overall worked very well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm, I personally would say this specific case actually benefits by making clear that npm is something specific. If it would be a more generic word, it would be difficult to distinguish it from the rest of the comment.

Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

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

Churn, baby, churn!

Copy link
Contributor

@vsemozhetbyt vsemozhetbyt left a comment

Choose a reason for hiding this comment

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

With some nits: 1) eliminate introduced inconsistencies with adjacent lowercased comments (diff is weird in these cases — some GitHub bug adds extra space?); 2) some doubts if the first word is actually a mentioned variable (false-positive).

doc/api/domain.md Outdated Show resolved Hide resolved
doc/api/domain.md Outdated Show resolved Hide resolved
doc/api/errors.md Outdated Show resolved Hide resolved
doc/api/http.md Outdated Show resolved Hide resolved
lib/_stream_readable.js Outdated Show resolved Hide resolved
test/parallel/test-http-res-write-end-dont-take-array.js Outdated Show resolved Hide resolved
test/parallel/test-http-res-write-end-dont-take-array.js Outdated Show resolved Hide resolved
test/parallel/test-https-agent-create-connection.js Outdated Show resolved Hide resolved
test/parallel/test-stream-big-push.js Outdated Show resolved Hide resolved
test/parallel/test-stream3-pause-then-read.js Outdated Show resolved Hide resolved
@BridgeAR BridgeAR force-pushed the stricter-capitalize-comments branch from fbb4308 to 665055d Compare March 24, 2019 22:19
@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 24, 2019

Rebased due to conflicts. I incorporated all feedback in the "fixup" commits. PTAL.

Lite CI https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/3025/
Lite CI https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/3026/

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 24, 2019
@BridgeAR BridgeAR force-pushed the stricter-capitalize-comments branch from 443f712 to 3de5713 Compare March 25, 2019 15:34
@BridgeAR
Copy link
Member Author

Rebased due to conflicts.

Lite CI https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/3035/

BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 27, 2019
PR-URL: nodejs#26849
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 27, 2019
This strictens the rule to apply from 20 characters on instead of
from 30.

PR-URL: nodejs#26849
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
@BridgeAR
Copy link
Member Author

Landed in b08a867 and 3914142.

@BridgeAR BridgeAR closed this Mar 27, 2019
BethGriggs pushed a commit that referenced this pull request Apr 5, 2019
PR-URL: #26849
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
BethGriggs pushed a commit that referenced this pull request Apr 5, 2019
This strictens the rule to apply from 20 characters on instead of
from 30.

PR-URL: #26849
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
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. http Issues or PRs related to the http subsystem. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants