eslint-plugin-unicorn
eslint-plugin-unicorn copied to clipboard
unicorn/filename-case: add option to disallow uppercase in kebab case
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
Add the "pascalCase": true to cases. Or if you need to use more complicated rule, I recommend to use eslint-plugin-filename-rules.
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