1.0.1 • Published 1 year ago
eslint-plugin-typescript-inheritance v1.0.1
eslint-plugin-typescript-inheritance
ESLint typescript plugin to control inheritance. By default it forbids all inheritance except inheritance of abstract classes. See rule description for the details.
Installation
:warning: This tutorial implies that typescript-eslint is installed and linting with type information is set up
npm install eslint-plugin-typescript-inheritance --save-dev
Note: If you installed ESLint globally then you must also install eslint-plugin-typescript-inheritance
globally.
Usage
Add typescript-inheritance
to the plugins section. You can omit the eslint-plugin-
prefix:
{
"plugins": ["typescript-inheritance"]
}
Then enable all rules with recommended configuration:
{
"extends": ["plugin:typescript-inheritance/recommended"]
}
Or configure the rules you want to use under the rules section:
{
"rules": {
"typescript-inheritance/no-class-inheritance": ["error"]
}
}
Supported Rules
Name | Description |
---|---|
typescript-inheritance/no-class-inheritance | Forbids usage of class inheritance except inheritance of abstract classes (by default) |
1.0.1
1 year ago
1.0.0
1 year ago
1.0.0-next.4
1 year ago
1.0.1-next.1
1 year ago
1.0.0-next.5
1 year ago
1.0.0-next.6
1 year ago
1.0.0-next.2
1 year ago
1.0.0-next.3
1 year ago
1.0.0-next.1
1 year ago