Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To integrate this plugin with `eslint-config-prettier`, you can use the `"recomm
npm install --save-dev eslint-config-prettier
```

2. Then all you need in your `.eslintrc.json` is:
2. Then you need to add `plugin:prettier/recommended` as the last extension in your `.eslintrc.json`:

```json
{
Expand All @@ -78,12 +78,27 @@ To integrate this plugin with `eslint-config-prettier`, you can use the `"recomm

This does three things:

1. Enables `eslint-plugin-prettier`.
2. Sets the `prettier/prettier` rule to `"error"`.
3. Extends the `eslint-config-prettier` configuration.
* Enables `eslint-plugin-prettier`.
* Sets the `prettier/prettier` rule to `"error"`.
* Extends the `eslint-config-prettier` configuration.

You can then set Prettier's own options inside a `.prettierrc` file.

3. In order to support special ESLint plugins (e.g. [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react)), add extra exclusions for the plugins you use like so:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the numbering here is a bit confusing because there is a separate numbered list directly above this line. Can you change the list above this one to use bullet points (by prefixing each line with * rather than numbers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I’ve changed it.


```json
{
"extends": [
"plugin:prettier/recommended",
"prettier/flowtype",
"prettier/react",
"prettier/standard"
]
}
```

For the list of every available exclusion rule set, please see the [readme of eslint-config-prettier](https://github.com/prettier/eslint-config-prettier/blob/master/README.md).

## Options

> Note: While it is possible to pass options to Prettier via your ESLint configuration file, it is not recommended because editor extensions such as `prettier-atom` and `prettier-vscode` **will** read [`.prettierrc`](https://prettier.io/docs/en/configuration.html), but **won't** read settings from ESLint, which can lead to an inconsistent experience.
Expand Down