Socket
Book a DemoInstallSign in
Socket

eslint-plugin-typescript-inheritance

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-typescript-inheritance

ESLint typescript plugin to control class inheritance

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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

: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

NameDescription
typescript-inheritance/no-class-inheritanceForbids usage of class inheritance except inheritance of abstract classes (by default)

Keywords

eslint

FAQs

Package last updated on 16 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts