-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[chore]: use unicorn/filename-case
eslint rule
#1080
Comments
We could allow kebab-case and PascalCase both currently. For markdown files, I think we don't need too much rules for restricting its name. Because we need to append some language tags ( "unicorn/filename-case": [
"error",
{
"cases": {
"kebabCase": true,
"pascalCase": true,
"ignore": [
/.*\.md$/,
/.*\.(yml|yaml)$/,
],
}
}
] |
That feels down to the fact that this rule may not apply to our situation. |
Or we write a script to do this. Because the main rule of eslint is the code specification, not the filename specification. Its an AST we will not be using. How do you feel? |
yes, you are right. other issue sindresorhus/eslint-plugin-unicorn#1577 .There seem to be other special problems |
That's what I want to mention. We are putting ourselves into a complicated situation: create another tool. If we only use kebab-case then we have nothing to worry about. For My main point is to make our project rules simple and easy to maintain. Any thoughts? |
Do not worry, just write an git hook . that's enough |
Let's go for it. |
Previously, we discussed the specification of file names (see: #714)
But this is all built on an ego-driven basis and we need to have a rule to help us check this.
Rule Link: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md
The following rules, which I have just come up with, may not be perfect.
The text was updated successfully, but these errors were encountered: