# eslint-plugin-class-extends

> ESLint rule to prevent extending classes.

Latest version **2.0.0** (published 2021-11-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-class-extends
pnpm add eslint-plugin-class-extends
yarn add eslint-plugin-class-extends
bun add eslint-plugin-class-extends
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-11-30 |
| First published | 2017-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 1 |
| Unpacked size | 12.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Wes Baker |
| Maintainers | wesbaker |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-class-extends
- Repository: https://github.com/wesbaker/eslint-plugin-class-extends
- Issues: https://github.com/wesbaker/eslint-plugin-class-extends/issues
- npm.io page: https://npm.io/package/eslint-plugin-class-extends

## Dependencies (1)

- [requireindex](https://npm.io/package/requireindex.md) ~1.2.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2021-11-30
- 1.0.0 — 2020-05-08
- 0.0.6 — 2017-04-14
- 0.0.5 — 2017-04-14
- 0.0.4 — 2017-04-14
- 0.0.3 — 2017-04-14
- 0.0.1 — 2017-04-14

## README

# eslint-plugin-class-extends

ESLint rule to prevent extending classes.

## Installation

You'll first need to install [ESLint](http://eslint.org):

```
$ npm i eslint --save-dev
```

Next, install `eslint-plugin-class-extends`:

```
$ npm install eslint-plugin-class-extends --save-dev
```

**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-class-extends` globally.

## Usage

Add `class-extends` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
  "plugins": ["class-extends"]
}
```

Then configure the rules you want to use under the rules section.

```json
{
  "rules": {
    "class-extends/react-extends-only": 2
  }
}
```

## Recommended

This plugin exports a `recommended` configuration that includes the one rule to
prevent extending classes other than `[React.]Component` and
`[React.]PureComponent`.

To enable this configuration use the `extends` property in your `.eslintrc`
config file:

```json
{
  "extends": [
    "eslint:recommended",
    "plugin:react/recommended",
    "plugin:class-extends/recommended"
  ]
}
```

## Supported Rules

- [react-extends-only](docs/rules/react-extends-only.md)

---
_Source: https://npm.io/package/eslint-plugin-class-extends · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
