diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 1ec6df216048..cacb6666fddf 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -84,6 +84,22 @@ Install [`eslint-config-prettier`](https://github.com/prettier/eslint-config-pre **Note: Make sure you have `eslint-config-prettier@4.0.0` or newer.** +## Usage with Airbnb + +Airbnb has two configs, a base one [`eslint-config-airbnb-base`](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb-base) and one that includes rules for React [`eslint-config-airbnb`](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb). + +First you'll need to install the config according to the instructions in one of the links above. `npx install-peerdeps --dev eslint-config-airbnb` or `npx install-peerdeps --dev eslint-config-airbnb-base` should work if you are using **npm 5+**. + +Then you should add `airbnb` (or `airbnb-base`) to your `extends` section of `.eslintrc`. You might also want to turn on `plugin:@typescript-eslint/recommended` as well to enable all of the recommended rules. + +```json +{ + "extends": ["airbnb-base", "plugin:@typescript-eslint/recommended"] +} +``` + +**Note: You can use Airbnb's rules alongside Prettier, see [Usage with Prettier](#usage-with-prettier)** + ## Supported Rules