eslint-plugin-typescript-inheritance
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

eslint-plugin-typescript-inheritance

npm version npm downloads/month npm downloads license

ESLint typescript plugin to control inheritance. By default it forbids all inheritance except inheritance of abstract classes. See rule description for the details.

Installation

⚠️ 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)

Package Sidebar

Install

npm i eslint-plugin-typescript-inheritance

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

86.9 kB

Total Files

34

Last publish

Collaborators

  • lsndr