-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Glob to exclude __tests__ folder is not working as expected #38
Comments
@saulo-okada-zs monorepo has more context, could you share a minimal reproducible monorepo project on github so I can work on this? |
Hey @dukeluo! Meanwhile, here is some info about our monorepo:
I've been doing some tests since yesterday and noticed one interesting behaviour
|
I was able to workaround this issue |
I'm experiencing this behavior as well (so might be worth re-opening this issue). What I'm noticing is if I want to exclude the I've been able to work around it by moving this rule to the "overrides": [
{
"plugins": ["check-file"],
"files": ["src/**/!(__tests__)/*"],
"rules": {
"check-file/folder-naming-convention": ["error", {
"**/*": "KEBAB_CASE"
}]
}
}, |
You have to write like that:
where XXX is CAMEL, KEBAB, ... |
Describe the bug
I'm currently working in a monorepo and want to enforce the Kebab Case convention for my
domains
folder but exclude all the__tests__
folders inside it.I've tried to use the expression described in the documentation but it does not work as expected on my project.
If I use the full path, it works as expected. But if I change the intermediate folders for
/**/
, then it doesn't work.Expected behavior
Files inside the
__tests__
should not throwcheck-file/folder-naming-convention
errorPlugin configuration
Project structure
If applicable, add a minimal reproducible project structure generated by the
tree
cmd like the one below.. ├── domains │ ├── sub-domain-a │ │ ├── src │ │ │ └── __tests__ │ │ │ │ └── test.ts │ ├── sub-domain-b │ │ ├── app │ │ │ └── __tests__ │ │ │ │ └── test.js │ ├── sub-domain-c │ │ ├── feature-a │ │ │ ├── src │ │ │ │ └── __tests__ │ │ │ │ │ └── test.js ├── libs ├── scripts ├── package-lock.json ├── package.json └── .eslintrc.base.json
Desktop:
The text was updated successfully, but these errors were encountered: