mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 21:38:03 -05:00
committed by
Jordan Harband
parent
4380284b05
commit
cd720b4c7b
@@ -2,7 +2,7 @@
|
||||
|
||||
[](http://badge.fury.io/js/eslint-config-airbnb-base)
|
||||
|
||||
This package provides Airbnb's base JS .eslintrc as an extensible shared config.
|
||||
This package provides Airbnb's base JS .eslintrc (without React plugins) as an extensible shared config.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -12,13 +12,15 @@ We export two ESLint configurations for your usage.
|
||||
|
||||
Our default export contains all of our ESLint rules, including ECMAScript 6+. It requires `eslint` and `eslint-plugin-import`.
|
||||
|
||||
If you use yarn, run `yarn add --dev eslint-config-airbnb-base eslint-plugin-import`, or see below for npm instructions.
|
||||
|
||||
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 simply run
|
||||
Linux/OSX users can run
|
||||
```sh
|
||||
(
|
||||
export PKG=eslint-config-airbnb-base;
|
||||
@@ -45,7 +47,7 @@ Our default export contains all of our ESLint rules, including ECMAScript 6+. It
|
||||
npm install --save-dev eslint-config-airbnb-base eslint@^#.#.# eslint-plugin-import@^#.#.#
|
||||
```
|
||||
|
||||
2. Add `"extends": "airbnb-base"` to your .eslintrc
|
||||
2. Add `"extends": "airbnb-base"` to your .eslintrc.
|
||||
|
||||
### eslint-config-airbnb-base/legacy
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@ We export three ESLint configurations for your usage.
|
||||
|
||||
### eslint-config-airbnb
|
||||
|
||||
Our default export contains all of our ESLint rules, including ECMAScript 6+ and React. It requires `eslint`, `eslint-plugin-import`, `eslint-plugin-react`, and `eslint-plugin-jsx-a11y`.
|
||||
Our default export contains all of our ESLint rules, including ECMAScript 6+ and React. It requires `eslint`, `eslint-plugin-import`, `eslint-plugin-react`, and `eslint-plugin-jsx-a11y`. If you don't need React, see [eslint-config-airbnb-base](https://npmjs.com/eslint-config-airbnb-base).
|
||||
|
||||
If you use yarn, run `yarn add --dev eslint-config-airbnb-base eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11`, and see below for npm instructions.
|
||||
|
||||
1. Install the correct versions of each package, which are listed by the command:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user