# eslint-config-airbnb-base

> Airbnb's base JS ESLint config, following our styleguide

Latest version **15.0.0** (published 2021-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-config-airbnb-base
pnpm add eslint-config-airbnb-base
yarn add eslint-config-airbnb-base
bun add eslint-config-airbnb-base
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: esm support; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no types.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 15.0.0 |
| Published | 2021-11-09 |
| First published | 2016-04-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | ^10.12.0 \|\| >=12.0.0 |
| Dependencies | 4 |
| Unpacked size | 91.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 148216 |
| Author | Jake Teton-Landis |
| Maintainers | airbnbeng, lencioni, etienne_tripier, noratarano, ljharb, sharmilajesupaul |
| Keywords | eslint, eslintconfig, config, airbnb, javascript, styleguide, es2015, es2016, es2017, es2018 |

## Links

- npm: https://www.npmjs.com/package/eslint-config-airbnb-base
- Repository: https://github.com/airbnb/javascript
- Issues: https://github.com/airbnb/javascript/issues
- npm.io page: https://npm.io/package/eslint-config-airbnb-base

## Dependencies (4)

- [semver](https://npm.io/package/semver.md) ^6.3.0
- [object.assign](https://npm.io/package/object.assign.md) ^4.1.2
- [object.entries](https://npm.io/package/object.entries.md) ^1.1.5
- [confusing-browser-globals](https://npm.io/package/confusing-browser-globals.md) ^1.0.10

## 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

- 15.0.0 (latest) — 2021-11-09
- 14.2.1 — 2020-11-06
- 14.2.0 — 2020-06-11
- 14.1.0 — 2020-03-13
- 14.0.0 — 2019-08-10
- 13.2.0 — 2019-07-01
- 13.1.0 — 2018-08-13
- 13.0.0 — 2018-06-21
- 12.1.0 — 2017-10-16
- 12.0.2 — 2017-10-05
- 12.0.1 — 2017-09-27
- 12.0.0 — 2017-09-02
- 11.3.2 — 2017-08-22
- 11.3.1 — 2017-07-24
- 11.3.0 — 2017-07-24
- … 30 more at https://npm.io/package/eslint-config-airbnb-base/versions

## README

# eslint-config-airbnb-base <sup>[![Version Badge][npm-version-svg]][package-url]</sup>

[![npm version](https://badge.fury.io/js/eslint-config-airbnb-base.svg)][package-url]

[![github actions][actions-image]][actions-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

This package provides Airbnb's base JS .eslintrc (without React plugins) as an extensible shared config.

## Usage

We export two ESLint configurations for your usage.

### eslint-config-airbnb-base

Our default export contains all of our ESLint rules, including ECMAScript 6+. It requires `eslint` and `eslint-plugin-import`.

1. Install the correct versions of each package, which are listed by the command:

  ```sh
  npm info "eslint-config-airbnb-base@latest" peerDependencies
  ```

  If using **npm 5+**, use this shortcut

  ```sh
  npx install-peerdeps --dev eslint-config-airbnb-base
  ```

  If using **yarn**, you can also use the shortcut described above if you have npm 5+ installed on your machine, as the command will detect that you are using yarn and will act accordingly.
  Otherwise, run `npm info "eslint-config-airbnb-base@latest" peerDependencies` to list the peer dependencies and versions, then run `yarn add --dev <dependency>@<version>` for each listed peer dependency.


  If using **npm < 5**, Linux/OSX users can run

  ```sh
  (
    export PKG=eslint-config-airbnb-base;
    npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
  )
  ```

  Which produces and runs a command like:

  ```sh
    npm install --save-dev eslint-config-airbnb-base eslint@^#.#.# eslint-plugin-import@^#.#.#
  ```

  If using **npm < 5**, Windows users can either install all the peer dependencies manually, or use the [install-peerdeps](https://github.com/nathanhleung/install-peerdeps) cli tool.

  ```sh
  npm install -g install-peerdeps
  install-peerdeps --dev eslint-config-airbnb-base
  ```

  The cli will produce and run a command like:

  ```sh
  npm install --save-dev eslint-config-airbnb-base eslint@^#.#.# eslint-plugin-import@^#.#.#
  ```

2. Add `"extends": "airbnb-base"` to your .eslintrc.

### eslint-config-airbnb-base/legacy

Lints ES5 and below. Requires `eslint` and `eslint-plugin-import`.

1. Install the correct versions of each package, which are listed by the command:

  ```sh
  npm info "eslint-config-airbnb-base@latest" peerDependencies
  ```

  Linux/OSX users can run
  ```sh
  (
    export PKG=eslint-config-airbnb-base;
    npm info "$PKG" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG"
  )
  ```

  Which produces and runs a command like:

  ```sh
  npm install --save-dev eslint-config-airbnb-base eslint@^#.#.# eslint-plugin-import@^#.#.#
  ```

2. Add `"extends": "airbnb-base/legacy"` to your .eslintrc

See [Airbnb's overarching ESLint config](https://npmjs.com/eslint-config-airbnb), [Airbnb's JavaScript styleguide](https://github.com/airbnb/javascript), and the [ESlint config docs](https://eslint.org/docs/user-guide/configuring#extending-configuration-files) for more information.

### eslint-config-airbnb-base/whitespace

This entry point only errors on whitespace rules and sets all other rules to warnings. View the list of whitespace rules [here](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/whitespace.js).

## Improving this config

Consider adding test cases if you're making complicated rules changes, like anything involving regexes. Perhaps in a distant future, we could use literate programming to structure our README as test cases for our .eslintrc?

You can run tests with `npm test`.

You can make sure this module lints with itself using `npm run lint`.

[package-url]: https://npmjs.org/package/eslint-config-airbnb-base
[npm-version-svg]: https://versionbadg.es/airbnb/javascript.svg
[license-image]: https://img.shields.io/npm/l/eslint-config-airbnb-base.svg
[license-url]: LICENSE.md
[downloads-image]: https://img.shields.io/npm/dm/eslint-config-airbnb-base.svg
[downloads-url]: https://npm-stat.com/charts.html?package=eslint-config-airbnb-base
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/airbnb/javascript
[actions-url]: https://github.com/airbnb/javascript/actions

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