question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rule proposal: Prevent common typos in comments

See original GitHub issue

People 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:open
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sindresorhuscommented, Dec 26, 2020

@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.

0reactions
sindresorhuscommented, Jan 30, 2021

This is now accepted.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found