eslint-plugin-unicorn icon indicating copy to clipboard operation
eslint-plugin-unicorn copied to clipboard

unicorn/filename-case: add option to disallow uppercase in kebab case

Open chiawendt opened this issue 2 years ago • 2 comments

When kebab case is configured

"unicorn/filename-case": [
	"error",
	{
		"cases": {
			"kebabCase": true
		}
	}
]

, the rule still accepts Article.ts as a valid name. I want to disallow this, and the file should be named article.ts

chiawendt avatar Feb 16 '23 10:02 chiawendt

Add the "pascalCase": true to cases. Or if you need to use more complicated rule, I recommend to use eslint-plugin-filename-rules.

say8425 avatar Mar 13 '23 05:03 say8425

Probably this should be changed even without adding an option. The notion of "kebab case" has been popularized mostly by Lodash, so Lodash's case converting functions can be considered kind of canonical. _.kebabCase('Article')article

thorn0 avatar May 20 '23 10:05 thorn0