You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+13
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,18 @@
36
36
37
37
So … what’s the catch? Why haven’t we done this earlier? Turns out it’s just a sad mistake. I (@lydell) was confused when testing, and thought that turning off unknown rules in a config was an error. Thanks to Georgii Dolzhykov (@thorn0) for pointing this out!
38
38
39
+
If you use [eslint-plugin-prettier], all you need is [plugin:prettier/recommended]:
40
+
41
+
<!-- prettier-ignore -->
42
+
```json
43
+
{
44
+
"extends": [
45
+
"some-other-config-you-use",
46
+
"plugin:prettier/recommended"
47
+
]
48
+
}
49
+
```
50
+
39
51
(The ["prettier/prettier" config][prettier-prettier-config] still exists separately. It’s the odd one out. The main `"prettier"` config does _not_ include the rules from it.)
40
52
41
53
- Changed: The CLI helper tool now only prints warnings for [arrow-body-style] and [prefer-arrow-callback], just like other “special rules.” This means that if you’ve decided to use those rules and [eslint-plugin-prettier] at the same time, you’ll get warnings but exit code zero (success).
Copy file name to clipboardexpand all lines: README.md
+5-4
Original file line number
Diff line number
Diff line change
@@ -62,13 +62,14 @@ That’s it! Extending `"prettier"` turns off a bunch of core ESLint rules, as w
62
62
-[@typescript-eslint/eslint-plugin]
63
63
-[eslint-plugin-babel]
64
64
-[eslint-plugin-flowtype]
65
-
-[eslint-plugin-prettier]
66
65
-[eslint-plugin-react]
67
66
-[eslint-plugin-standard]
68
67
-[eslint-plugin-unicorn]
69
68
-[eslint-plugin-vue]
70
69
71
-
> Note: You might find guides on the Internet saying you should also extend stuff like `"prettier/react"`. Since version 8.0.0 of eslint-config-prettier, all you need to extend is `"prettier"`! That includes all plugins.
70
+
> 👉 Using [eslint-plugin-prettier]? Check out [eslint-plugin-prettier’s recommended config][eslint-plugin-prettier-recommended].
71
+
72
+
> ℹ️ Note: You might find guides on the Internet saying you should also extend stuff like `"prettier/react"`. Since version 8.0.0 of eslint-config-prettier, all you need to extend is `"prettier"`! That includes all plugins.
72
73
73
74
### Excluding deprecated rules
74
75
@@ -134,11 +135,11 @@ See the [`arrow-body-style` and `prefer-arrow-callback` issue][eslint-plugin-pre
134
135
135
136
There are a couple of ways to turn these rules off:
136
137
138
+
- Put `"plugin:prettier/recommended"` in your `"extends"`. That’s [eslint-<strong>plugin</strong>-prettier’s recommended config][eslint-plugin-prettier-recommended].
137
139
- Put `"prettier/prettier"` in your `"extends"`. (Yes, there’s both a _rule_ called `"prettier/prettier"` and a _config_ called `"prettier/prettier"`.)
138
-
- Use [eslint-plugin-prettier’s recommended config][eslint-plugin-prettier-recommended], which also turns off these two rules.
139
140
- Remove them from your config or turn them off manually.
140
141
141
-
It doesn’t matter which approach you use – they’re all the same.
142
+
It doesn’t matter which approach you use. `"plugin:prettier/recommended"` is probably the easiest.
142
143
143
144
Note: The CLI tool only reports these as problematic if the `"prettier/prettier"`_rule_ is enabled for the same file.
0 commit comments