Closed
Description
Hi there,
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
{
"rules": {
camelcase: 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'typeLike',
format: ['PascalCase'],
},
],
},
};
type Foo = {
'foo-bar': string;
};
interface Bar {
'foo-bar': string;
}
Expected Result
It is supposed to be error:
1: 3 error Type property name 'foo-bar' must match one of the following formats: camelCase @typescript-eslint/naming-convention
Actual Result
No error.
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
5.10.0 |
@typescript-eslint/parser |
5.10.0 |
TypeScript |
4.5.4 |
ESLint |
8.7.0 |
node |
16.13.2 |