@typescript-eslint/naming-convention is not working with modifiers on interface selector

3.2k Views Asked by At

I want to have an automatic linting for exported interfaces with the typescript-eslint plugin. But once I add the modifier that checks for an interface to be exported, it throws an completely useless error message that does not make any sense to me.

This works but however, it does not check if the interface is exported to another module in my project:

"@typescript-eslint/naming-convention": [
  "warn",
  {
    "selector": ["interface"],
    "format": ["PascalCase"]
  }
]

This does not work, since I added the modifier array that should make it check if the interface is exported or not:

"@typescript-eslint/naming-convention": [
  "warn",
  {
    "selector": ["interface"],
    "modifiers": ["exported"],
    "format": ["PascalCase"]
  }
]

And this is the error message I am getting from the above:

Configuration for rule "@typescript-eslint/naming-convention" is invalid: Value "PascalCase" should be array. Value "PascalCase" should be null. Value "PascalCase" should match exactly one schema in oneOf. Value "PascalCase" should be array. Value "PascalCase" should be null. Value "PascalCase" should match exactly one schema in oneOf. Value {"selector":"interface","modifiers":"exported","format":"PascalCase"} should NOT have additional properties. Value "PascalCase" should be array. Value "PascalCase" should be null. Value "PascalCase" should match exactly one schema in oneOf. Value {"selector":"interface","modifiers":"exported","format":"PascalCase"} should NOT have additional properties. Value {"selector":"interface","modifiers":"exported","format":"PascalCase"} should NOT have additional properties. Value "PascalCase" should be array. Value "PascalCase" should be null. Value "PascalCase" should match exactly one schema in oneOf. Value "PascalCas...
0

There are 0 best solutions below