eslint-plugin-prettier 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +19 -4
- package/eslint-plugin-prettier.js +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v2.6.2 (2018-07-06)
|
|
4
|
+
|
|
5
|
+
* Fix: Add representation for \r to showInvisibles ([#100](https://github.com/prettier/eslint-plugin-prettier/issues/100)) ([731bbb5](https://github.com/prettier/eslint-plugin-prettier/commit/731bbb576ce422a5c73a1fa9750aa3466c7da928))
|
|
6
|
+
* Docs: Add clarification about Flow/React support to readme ([#96](https://github.com/prettier/eslint-plugin-prettier/issues/96)) ([977aa77](https://github.com/prettier/eslint-plugin-prettier/commit/977aa77a119f22af3f8ca8d6f47e5bcfcc9e23fb))
|
|
7
|
+
|
|
3
8
|
## v2.6.1 (2018-06-23)
|
|
4
9
|
|
|
5
10
|
* Fix: respect editorconfig ([#92](https://github.com/prettier/eslint-plugin-prettier/issues/92)) ([0b04dd3](https://github.com/prettier/eslint-plugin-prettier/commit/0b04dd362d0d92534a7cf11eaebbab8eb59fc96d))
|
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ To integrate this plugin with `eslint-config-prettier`, you can use the `"recomm
|
|
|
66
66
|
npm install --save-dev eslint-config-prettier
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
2. Then
|
|
69
|
+
2. Then you need to add `plugin:prettier/recommended` as the last extension in your `.eslintrc.json`:
|
|
70
70
|
|
|
71
71
|
```json
|
|
72
72
|
{
|
|
@@ -78,12 +78,27 @@ To integrate this plugin with `eslint-config-prettier`, you can use the `"recomm
|
|
|
78
78
|
|
|
79
79
|
This does three things:
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
* Enables `eslint-plugin-prettier`.
|
|
82
|
+
* Sets the `prettier/prettier` rule to `"error"`.
|
|
83
|
+
* Extends the `eslint-config-prettier` configuration.
|
|
84
84
|
|
|
85
85
|
You can then set Prettier's own options inside a `.prettierrc` file.
|
|
86
86
|
|
|
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
|
+
|
|
87
102
|
## Options
|
|
88
103
|
|
|
89
104
|
> 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.
|