# eslint-plugin-babel

> an eslint rule plugin companion to babel-eslint

Latest version **5.3.1** (published 2020-06-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-babel
pnpm add eslint-plugin-babel
yarn add eslint-plugin-babel
bun add eslint-plugin-babel
```

## 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 | 5.3.1 |
| Published | 2020-06-30 |
| First published | 2015-06-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 1 |
| Unpacked size | 149.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 382 |
| Author | Jason Quense @monasticpanic |
| Maintainers | danez, existentialism, hzoo, jameshenry, kaicataldo, loganfsmyth, monastic.panic, mysticatea, nicolo-ribaudo, not-an-aardvark, sebmck, zertosh |
| Keywords | babel, eslint, eslintplugin, eslint-plugin, babel-eslint |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-babel
- Repository: https://github.com/babel/eslint-plugin-babel
- Homepage: https://github.com/babel/eslint-plugin-babel#readme
- Issues: https://github.com/babel/eslint-plugin-babel/issues
- npm.io page: https://npm.io/package/eslint-plugin-babel

## Dependencies (1)

- [eslint-rule-composer](https://npm.io/package/eslint-rule-composer.md) ^0.3.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

- 5.3.1 (latest) — 2020-06-30
- 5.3.0 — 2018-11-15
- 5.2.1 — 2018-09-27
- 5.2.0 — 2018-09-06
- 5.1.0 — 2018-04-20
- 5.0.0 — 2018-03-31
- 4.1.2 — 2017-07-25
- 4.1.1 — 2017-03-06
- 4.1.0 — 2017-02-27
- 4.0.1 — 2017-01-18
- 4.0.0 — 2016-11-17
- 3.3.0 — 2016-06-21
- 3.2.0 — 2016-04-07
- 3.1.0 — 2016-02-04
- 3.0.0 — 2015-11-25
- … 7 more at https://npm.io/package/eslint-plugin-babel/versions

## README

# eslint-plugin-babel

An `eslint` plugin companion to `babel-eslint`. `babel-eslint` does a great job at adapting `eslint`
for use with Babel, but it can't change the built in rules to support experimental features.
`eslint-plugin-babel` re-implements problematic rules so they do not give false positives or negatives.

> Requires Node 4 or greater

### Install

```sh
npm install eslint-plugin-babel --save-dev
```

Load the plugin in your `.eslintrc` file:

```json
{
  "plugins": [
    "babel"
  ]
}
```

Finally enable all the rules you would like to use (remember to disable the
original ones as well!).

```json
{
  "rules": {
    "babel/new-cap": 1,
    "babel/camelcase": 1,
    "babel/no-invalid-this": 1,
    "babel/object-curly-spacing": 1,
    "babel/quotes": 1,
    "babel/semi": 1,
    "babel/no-unused-expressions": 1,
    "babel/valid-typeof": 1
  }
}
```
### Rules

Each rule corresponds to a core `eslint` rule, and has the same options.

🛠: means it's autofixable with `--fix`.

- `babel/new-cap`: Ignores capitalized decorators (`@Decorator`)
- `babel/camelcase`: doesn't complain about optional chaining (`var foo = bar?.a_b;`)
- `babel/no-invalid-this`: doesn't fail when inside class properties (`class A { a = this.b; }`)
- `babel/object-curly-spacing`: doesn't complain about `export x from "mod";` or `export * as x from "mod";` (🛠)
- `babel/quotes`: doesn't complain about JSX fragment shorthand syntax (`<>foo</>;`)
- `babel/semi`: doesn't fail when using `for await (let something of {})`. Includes class properties (🛠)
- `babel/no-unused-expressions`: doesn't fail when using `do` expressions or [optional chaining](https://github.com/tc39/proposal-optional-chaining) (`a?.b()`).
- `babel/valid-typeof`: doesn't complain when used with [BigInt](https://github.com/tc39/proposal-bigint) (`typeof BigInt(9007199254740991) === 'bigint'`).

#### Deprecated

| Rule                             | Notes                              |
|:---------------------------------|:-----------------------------------|
| `babel/generator-star-spacing`   | Use [`generator-star-spacing`](http://eslint.org/docs/rules/generator-star-spacing) since eslint@3.6.0 |
| `babel/object-shorthand`         | Use [`object-shorthand`](http://eslint.org/docs/rules/object-shorthand) since eslint@0.20.0 |
| `babel/arrow-parens`             | Use [`arrow-parens`](http://eslint.org/docs/rules/arrow-parens) since eslint@3.10.0 |
| `babel/func-params-comma-dangle` | Use [`comma-dangle`](http://eslint.org/docs/rules/comma-dangle) since eslint@3.8.0 |
| `babel/array-bracket-spacing`    | Use [`array-bracket-spacing`](http://eslint.org/docs/rules/array-bracket-spacing) since eslint@3.9.0 |
| `babel/flow-object-type`         | Use [`flowtype/object-type-delimiter`](https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-object-type-delimiter) since eslint-plugin-flowtype@2.23.0 |
| `babel/no-await-in-loop`         | Use [`no-await-in-loop`](http://eslint.org/docs/rules/no-await-in-loop) since eslint@3.12.0 |

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