support multiple wildcard matching
Yokozuna59 opened this issue · comments
Reda Al Sulais commented
Hi there! I'm currently have the following eslint config:
{
// ...
"check-file/filename-naming-convention": [
"error",
{
"**/*.ts": "KEBAB_CASE"
}
]
}
And it's working fine with regular (single wildcard) files:
.
├── sample-sample.ts
└── sample.ts
But in multiple wildcards, it throws errors for it:
.
├── sample.test.ts
├── sample-test.spec.ts
├── sample.d.css.ts
├── sample.config.ts
└── sample.d.ts
Huan commented
The rule filename-naming-convention
can ignore the middle file extensions. You need to set like this:
"check-file/filename-naming-convention": [
"error",
{
"**/*.ts": "KEBAB_CASE"
},
{
"ignoreMiddleExtensions": true
}
]
See more at here.
Reda Al Sulais commented
Oh, sorry! wasn't aware of that.