-
Notifications
You must be signed in to change notification settings - Fork 30k
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
doc,lib,test: capitalize comment sentences #24996
Conversation
Not an objection, but an observation/concern: I'm not sure how I feel about codifying the backticks-to-surround-code in comments. That's a markdown typography convention, not a widely-understood convention for plain-text comments. (We understand it because we're editing markdown all the time.) |
With all this churn, and the brittle magic number for line length to ignore, I wonder if what we really should do is stop leaving nits for capitalizing comments. Make peace with the fact that some comments will be capitalized and others won't. This does not significantly improve our code. Still not feeling an objection, but wondering if that's where I'm headed and curious if others feel the same or not.... |
We use a lot of markdown and having them as code comments should be natural for anyone working on the source. Having them in the docs might be less ideal. Do you have a good alternative at hand?
I was not sure if it's to early to open this PR or not but I would like to reduce that magic number from time to time (each couple minor releases) so that at some point we don't have a character limit at all. It was just a way to limit the churn a bit.
While I agree that it's not a huge improvement, it's just a one time task as most of our small improvements. As soon as the rule is fully introduces we do not have to worry about any of it again :) Since we are human, it's difficult to stop leaving the nits for such things. |
@BridgeAR No. I think I'm OK with it. It's not ideal IMO but I also don't have a better idea, so I shouldn't block progress. If I ever think of a better idea, I can open a PR changing it to something else. :-D
Worth a shot! Thanks for explaining that.
I certainly can't dispute that. Very true. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for the improved rule.
e919311
to
6874daf
Compare
Rebased due to conflicts. Lite CI https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/1925/ |
@nodejs/linting @nodejs/documentation PTAL |
It would be great to get another review. |
This activates the eslint capitalize comment rule for comments above 50 characters.
6874daf
to
eccc1db
Compare
Rebased due to conflicts. CI before landing: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/1980/ |
This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: nodejs#24996 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 50dd555 |
This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: #24996 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: nodejs#24996 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This expands the eslint capitalize comment rule to be active for comments
above 50 characters (instead of 62) and ignores starting words which contain
#
or[
.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes