Rule proposal: Prevent common typos in comments
See original GitHub issuePeople often write node.js
, NodeJS
, etc, instead of Node.js
. Would be nice to have a rule to detect such mistakes in code comments.
Just like the prevent-abbreviations
rule, we could let users either add their own additions or completely replace the built-ins.
The rule format could be like this:
[
{
test: /\bnode\.?js\b/gi,
value: 'Node.js'
},
{
test: /\bStack\s?Overflow\b/gi,
value: 'Stack Overflow'
},
{
test: /\bjavascript\b/gi,
value: 'JavaScript'
},
{
test: [/\bmac\s?OS(?!\s?X)\b/gi, /(mac\s?)?OS\s?X/gi],
value: 'macOS'
},
{
test: /\bYou\s?Tube\b/gi,
value: 'YouTube'
},
{
test: /\bGit\s?Hub\b/gi,
value: 'GitHub'
}
];
Some more:
ios => iOS reddit => Reddit Gulp.js => Gulp gulp.js => Gulp Grunt.js => Grunt grunt.js => Grunt svg => SVG url => URL css => CSS html => HTML png => PNG jpg => JPG jpeg => JPEG NPM => npm Npm => npm bitcoin => Bitcoin Devops => DevOps Url => URL JQuery => jQuery IOS => iOS Typescript => TypeScript typescript => TypeScript
Opinionated ones: application => app applications => apps
Suggestions welcome for more.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (6 by maintainers)
Top Results From Across the Web
SEC Reopens Comment Periods for Several Rulemaking ...
The Securities and Exchange Commission today reopened the public comment periods for 11 Commission rulemaking releases and one request for ...
Read more >Trade Regulation Rule on Commercial Surveillance and ...
Specifically, the Commission invites comment on whether it should implement new trade regulation rules or other regulatory alternatives ...
Read more >Employee or Independent Contractor Classification under ...
The Department further believes that this proposal will protect workers from misclassification while at the same time providing a consistent ...
Read more >Rule 60. Relief from a Judgment or Order - Law.Cornell.Edu
For extended discussion of the old common law writs and equitable remedies, ... from judgments are specified in the rules as it is...
Read more >10 Common Punctuation Mistakes and How to Avoid Them
The Problem: The use of single or double quotation marks when nothing is being quoted. Example to avoid: We offer the 'best price...
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
@fregante I considered making it a separate package upfront, but I want to make it easy to iterate on the rule format and additions first. I think it’s easier to extract it into a separate package later on.
This is now accepted.