Acronyms incorrectly detected as upper-case
See original GitHub issueFaulty Behavior
fix: JTD types -> JSON schema types
✖ subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case]
The above fails as the linter detects the subject as being upper-case, even though it’s just an acronym.
Affected packages
- cli
- core
- prompt
- config-angular
Possible Solution
Check that all letters in the word are uppercase and assume it’s an acronym, ignoring any title-case lints. Skip for 1 letter words.
Steps to Reproduce (for bugs)
Lint the above commit message with @commitlint/config-conventional
.
Your Environment
Executable | Version |
---|---|
commitlint --version |
17.0.3 |
git --version |
2.34.1 |
node --version |
16.15.1 |
@commitlint/config-conventional |
17.0.3 |
Issue Analytics
- State:
- Created a year ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Spell Check Doesn't Work With Uppercase Words in Microsoft ...
Right-click any term with a red underline and click "Add to Dictionary." Word will never mark the term as if it were incorrectly...
Read more >Capitalization of explanation of abbreviations
So: don't capitalize if the words are "common" and capitalize if the acronym refers to proper names. See also page 81 in this...
Read more >Capital Letters in Acronyms and Abbreviations | Editor's Manual
Many abbreviations are capitalized (MBA, VP, DNA, ATM, URL), while others are lowercased (e.g., i.e., etc., laser). Some abbreviations may be ...
Read more >Implement ESLint rule that detects camel-case acronym ...
In #668, we decided that acronyms in camel-case or pascal-case need to be fully capitalized (e.g. accountID , siteURL , someJSON ).
Read more >Why do some newspapers not use uppercase letters ... - Quora
Many newspapers lowercase acronyms of five or more letters if they're pronounced as words. So, Ebitda rather than EBITDA. But ASPCA is often...
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
If you both agree now I’ll tag along. Up for a creating a PR?
That would be a different check.
Please no. There are too many internal acronyms that would have to be maintained, and for three-letter acronyms almost all of them would be in the list anyway. Then, when you use one that just happens not to be on the list, you get cryptic errors about… what exactly? “Acronym not known”?
It’s not that complicated, in my opinion. This is a case where it’s beginning to get in the way of work and a simple, sane solution like the above would suffice in all but the most egregious cases.