Eslint erro when adding rule @typescript-eslint/interface-name-prefix

Viewed 16106

When I add the rule,

"@typescript-eslint/interface-name-prefix": [ "error", { "prefixWithI": "always" }]

give the following error message:

Definition for rule '@typescript-eslint/interface-name-prefix' was not found.eslint(@typescript-eslint/interface-name-prefix)

1 Answers

The rule @typescript-eslint/interface-name-prefix has been removed as you can see here.

You can achieve the same effect of [ "error", { "prefixWithI": "always" }] with the following:

{
  "@typescript-eslint/naming-convention": [
    "error",
    {
      "selector": "interface",
      "format": ["PascalCase"],
      "custom": {
        "regex": "^I[A-Z]",
        "match": true
      }
    }
  ]
}
Related