Skip to content

Commit 977aa77

Browse files
kripodnot-an-aardvark
authored andcommittedJul 2, 2018
Docs: Add clarification about Flow/React support to readme (#96)
Resolves #95
1 parent 1c41c41 commit 977aa77

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed
 

‎README.md

+19-4
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ To integrate this plugin with `eslint-config-prettier`, you can use the `"recomm
6666
npm install --save-dev eslint-config-prettier
6767
```
6868

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

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

7979
This does three things:
8080

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

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

87+
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:
88+
89+
```json
90+
{
91+
"extends": [
92+
"plugin:prettier/recommended",
93+
"prettier/flowtype",
94+
"prettier/react",
95+
"prettier/standard"
96+
]
97+
}
98+
```
99+
100+
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).
101+
87102
## Options
88103

89104
> 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.

0 commit comments

Comments
 (0)
Please sign in to comment.