check-file/filename-naming-convention application is not working as expected with custom matching
mkhstar opened this issue · comments
Describe the bug
check-file/filename-naming-convention application is not working as expected with custom matching
Expected behavior
I expected it to work with custom glob matching
Plugin configuration
"check-file/filename-naming-convention": [
"error",
{
"**/tests/e2e/*": "*.{spec,test}.e2e.ts",
},
]
Desktop (please complete the following information):
- OS: macos
Additional context
It prints the error The filename "my-controller.spec.e2e.ts" does not match the "*.{spec,test}.e2e.ts" pattern
Even thought console.log(micromatch.isMatch('my-controller.spec.e2e.ts', '*.{spec,test}.e2e.ts'))
// returns true
Is there anything i am doing wrong or is there a bug with this?
@mkhstar How about this?
"check-file/filename-naming-convention": [
"error",
{
"**/tests/e2e/*.ts": "*.{spec,test}.e2e",
},
]
Thanks that seems to work. So we shouldn't add the extension right?
Thanks that seems to work. So we shouldn't add the extension right?
Yes, the rule only validates the name part.