-
Notifications
You must be signed in to change notification settings - Fork 889
'ignored' option badly handled in file-name-casing #4836
Comments
Can you paste your exact tslint config? It's hard to tell if it's a config error or a bug in the rule. |
I updated issue text.
Tried using like in here https://palantir.github.io/tslint/rules/file-name-casing/
|
It looks like we have some tests for the rules:
file-name-casing:
- true
- ".ts": ignore
".tsx": pascal-case |
|
Ah, sorry, it should be |
Hi @adidahiya , {
"rules": {
"file-name-casing": [
true,
{
".ts": "kebab-case",
".compoent.ts": "camel-case"
}
]
}
} And there are two files But if i consider this config for the same files {
"rules": {
"file-name-casing": [
true,
{
".compoent.ts": "camel-case",
".ts": "kebab-case",
}
]
}
}
Its because of this line So do i need to write more strict regex in the config file or is it a bug in the code? |
@tanmoyopenroot that issue is separate from the one reported here. you need a more strict regex. I opened a PR for the |
🤖 Beep boop! 👉 TSLint is deprecated 👈 and you should switch to typescript-eslint! 🤖 🔒 This issue is being locked to prevent further unnecessary discussions. Thank you! 👋 |
Bug Report
Reproduction
Try using
file-name-casing
havingignored
option.TSLint will show you a warning
Warning: file-name-casing - Unexpected casing option provided: ignored
.This is because of line https://github.com/palantir/tslint/blob/master/src/rules/fileNameCasingRule.ts#L87
since
validCasingOptions
does not contian 'ignored' option. Since line https://github.com/palantir/tslint/blob/master/src/rules/fileNameCasingRule.ts#L43 misses it.tslint.yaml:
Tried using like in here https://palantir.github.io/tslint/rules/file-name-casing/
Actual behavior
ignored
option claimed in docs but cannot be used.Expected behavior
ability to use
ignored
option.The text was updated successfully, but these errors were encountered: