Rule Proposal: comment-capitalizing
See original GitHub issueFrom requireCapitalizedComments and disallowCapitalizedComments.
This rule will enforce which the first character is an upper case or a lower case.
{
"comment-capitalizing": ["error", "always" or "never"],
// or
"comment-capitalizing": [
"error",
{
"capitalize": "always" or "never",
"markers": ["*"],
"ignorePattern": "^\s*(?:eslint|jshint|jslint|istanbul|global|exported|jscs|falls?\s?through)",
"ignoreInlineComments": false,
"overrides": {
"block": null, // e.g. "always", {capitalize: "always", markers: ["!"]}, ...
"line": null
}
}
]
}
"always"
(default) - Requires the first alphabetical character of a comment to be uppercase, unless it is part of a multi-line textblock."never"
- Requires the first alphabetical character of a comment to be lowercase.markers
(default is["*"]
) - If the head of comments matched to markers, this rule cut the matched part off, then checks the comment capitalizing. (this is similar to the markers option of spaced-comment rule)ignorePattern
(default is"^\s*(?:eslint|jshint|jslint|istanbul|global|exported|jscs|falls?\s?through)"
) - If the comment content (except the part thatmarkers
option has matched) matches the given regexp pattern, this rule ignore the comment.ignoreInlineComments
(default isfalse
) - If this istrue
, this rule will be applied to only comments which are at the head of each line. (fromrequireCapitalizedComments
’sinlined
option)overrides
- People can override setting for each line or block comment.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:18 (17 by maintainers)
Top Results From Across the Web
Proposed rule: Private Fund Advisers - SEC.gov
“Commission”) is proposing for public comment 17 CFR 275.206(4)-10 (new rule ... Discussion of Proposed Rules for Private Fund Advisers .
Read more >3. Capitalization Rules - GovInfo
The full names of existing or proposed organized bodies and their shortened names are capitalized ; other substitutes, which are most often regarded...
Read more >Rulemakings and Proposals for Comment - NCUA
The NCUA periodically solicits public comment on proposed rules and regulations, and other matters and publishes these notices in the ...
Read more >IRS Issues Proposed Regs on Capitalizing Cost of Intangibles
[11] The proposed regulations require capitalization of amounts paid to acquire, ... The IRS and Treasury Department invite comments on this safe harbor ......
Read more >Capitalization of Interest in Connection with Loan Workouts ...
NASCUS Comments on Proposed Rule: Capitalization of Interest in Connection with Loan Workouts and Modifications [RIN 3133 – AF30].
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@eslint/eslint-tsc I don’t know if we still want to expedited-accept JSCS compat issues or if we should go through the usual new rule process. I have a couple of open questions about non-ASCII and non-letter characters, but this otherwise seems like an actionable proposal and I think this should be accepted.
If we are not expediting JSCS compat issues, I will champion this rule.
@nzakas I’d like to propose a modification to @mysticatea’s proposal in that case: