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 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 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`:
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
- 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.
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.
@@ -100,6 +100,9 @@ function showInvisibles(str) {
100
100
  case '\t':
101
101
  ret += '↹'; // Left Arrow To Bar Over Right Arrow To Bar, \u21b9
102
102
  break;
103
+ case '\r':
104
+ ret += '␍'; // Carriage Return Symbol, \u240D
105
+ break;
103
106
  default:
104
107
  ret += str[i];
105
108
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-prettier",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "Runs prettier as an eslint rule",
5
5
  "keywords": [
6
6
  "eslint",