eslint-config-prettier 6.3.0 → 6.7.0

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.
@@ -10,6 +10,7 @@ module.exports = {
10
10
  "@typescript-eslint/member-delimiter-style": "off",
11
11
  "@typescript-eslint/no-extra-parens": "off",
12
12
  "@typescript-eslint/semi": "off",
13
+ "@typescript-eslint/space-before-function-paren": "off",
13
14
  "@typescript-eslint/type-annotation-spacing": "off"
14
15
  }
15
16
  };
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ### Version 6.7.0 (2019-11-19)
2
+
3
+ - Added: [@typescript-eslint/space-before-function-paren]. Thanks to Masafumi
4
+ Koba (@ybiquitous)!
5
+
6
+ ### Version 6.6.0 (2019-11-17)
7
+
8
+ - Added: New [eslint-plugin-vue] rules: [vue/dot-location] and
9
+ [vue/keyword-spacing]. Thanks to @xcatliu!
10
+
11
+ ### Version 6.5.0 (2019-10-26)
12
+
13
+ - Added: Support for [excluding deprecated rules]. Thanks to Alex Ilyaev
14
+ (@alexilyaev)!
15
+
16
+ ### Version 6.4.0 (2019-10-05)
17
+
18
+ - Added: [unicorn/no-nested-ternary]. Thanks to Yang Mingshan
19
+ (@yangmingshan)!
20
+
1
21
  ### Version 6.3.0 (2019-09-10)
2
22
 
3
23
  - Added: [@typescript-eslint/brace-style]. Thanks to Masafumi Koba
@@ -308,6 +328,7 @@
308
328
  [@typescript-eslint/quotes-special]: https://github.com/prettier/eslint-config-prettier/blob/857257179fe69715362dfa9300762d6e534c0603/README.md#quotes
309
329
  [@typescript-eslint/quotes]: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md
310
330
  [@typescript-eslint/semi]: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md
331
+ [@typescript-eslint/space-before-function-paren]: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md
311
332
  [array-bracket-newline]: https://eslint.org/docs/rules/array-bracket-newline
312
333
  [array-element-newline]: https://eslint.org/docs/rules/array-element-newline
313
334
  [arrow-body-style]: https://eslint.org/docs/rules/arrow-body-style
@@ -324,6 +345,7 @@
324
345
  [eslint-plugin-typescript]: https://github.com/bradzacher/eslint-plugin-typescript
325
346
  [eslint-plugin-unicorn]: https://github.com/sindresorhus/eslint-plugin-unicorn
326
347
  [eslint-plugin-vue]: https://github.com/vuejs/eslint-plugin-vue
348
+ [excluding deprecated rules]: https://github.com/prettier/eslint-config-prettier/tree/9f6b59486ad742dc12ad3be157ddff5f8454ef7a#excluding-deprecated-rules
327
349
  [flowtype/boolean-style]: https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-boolean-style
328
350
  [function-call-argument-newline]: https://eslint.org/docs/rules/function-call-argument-newline
329
351
  [function-paren-newline]: https://eslint.org/docs/rules/function-paren-newline
@@ -355,9 +377,12 @@
355
377
  [semi-style]: https://eslint.org/docs/rules/semi-style
356
378
  [switch-colon-spacing]: https://eslint.org/docs/rules/switch-colon-spacing
357
379
  [template-tag-spacing]: https://eslint.org/docs/rules/template-tag-spacing
380
+ [unicorn/no-nested-ternary]: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-nested-ternary.md
358
381
  [vue/arrow-spacing]: https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/arrow-spacing.md
359
382
  [vue/block-spacing]: https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/block-spacing.md
360
383
  [vue/brace-style]: https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/brace-style.md
361
384
  [vue/comma-dangle]: https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/comma-dangle.md
385
+ [vue/dot-location]: https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/dot-location.md
362
386
  [vue/html-self-closing-special]: https://github.com/prettier/eslint-config-prettier/blob/d5e7af986221df5faedc12893d8dc3150a808693/README.md#vuehtml-self-closing
363
387
  [vue/html-self-closing]: https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/html-self-closing.md
388
+ [vue/keyword-spacing]: https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/keyword-spacing.md
package/README.md CHANGED
@@ -15,6 +15,7 @@ it together with some other config.
15
15
 
16
16
 
17
17
  - [Installation](#installation)
18
+ - [Excluding deprecated rules](#excluding-deprecated-rules)
18
19
  - [CLI helper tool](#cli-helper-tool)
19
20
  - [Example configuration](#example-configuration)
20
21
  - [Special rules](#special-rules)
@@ -108,6 +109,18 @@ enables [eslint-plugin-react] rules, so `"prettier/react"` is needed:
108
109
  If you’re unsure which plugins are used, you can usually find them in your
109
110
  `package.json`.
110
111
 
112
+ ### Excluding deprecated rules
113
+
114
+ Some of the rules that eslint-config-prettier turns off may be deprecated.
115
+ **This is perfectly fine,** but if you really need to omit the
116
+ deprecated rules, you can do so by setting the
117
+ `ESLINT_CONFIG_PRETTIER_NO_DEPRECATED` environment variable to a non-empty
118
+ value. For example:
119
+
120
+ ```
121
+ env ESLINT_CONFIG_PRETTIER_NO_DEPRECATED=true npx eslint-find-rules --deprecated index.js
122
+ ```
123
+
111
124
  ## CLI helper tool
112
125
 
113
126
  eslint-config-prettier also ships with a little CLI tool to help you check if
@@ -780,18 +793,18 @@ You can also supply a custom message if you want:
780
793
 
781
794
  eslint-config-prettier has been tested with:
782
795
 
783
- - ESLint 6.3.0
796
+ - ESLint 6.6.0
784
797
  - eslint-config-prettier 5.1.0 and older were tested with ESLint 5.x
785
798
  - eslint-config-prettier 2.10.0 and older were tested with ESLint 4.x
786
799
  - eslint-config-prettier 2.1.1 and older were tested with ESLint 3.x
787
- - prettier 1.18.2
788
- - @typescript-eslint/eslint-plugin 2.2.0
800
+ - prettier 1.19.1
801
+ - @typescript-eslint/eslint-plugin 2.8.0
789
802
  - eslint-plugin-babel 5.3.0
790
- - eslint-plugin-flowtype 4.3.0
791
- - eslint-plugin-react 7.14.3
803
+ - eslint-plugin-flowtype 4.4.1
804
+ - eslint-plugin-react 7.16.0
792
805
  - eslint-plugin-standard 4.0.1
793
- - eslint-plugin-unicorn 10.0.0
794
- - eslint-plugin-vue 5.2.3
806
+ - eslint-plugin-unicorn 13.0.0
807
+ - eslint-plugin-vue 6.0.1
795
808
 
796
809
  Have new rules been added since those versions? Have we missed any rules? Is
797
810
  there a plugin you would like to see exclusions for? Open an issue or a pull
package/bin/validators.js CHANGED
@@ -46,7 +46,7 @@ module.exports = {
46
46
 
47
47
  const firstOption = options[0];
48
48
  return Boolean(
49
- firstOption && (firstOption.html && firstOption.html.void === "any")
49
+ firstOption && firstOption.html && firstOption.html.void === "any"
50
50
  // Enable when Prettier supports SVG: https://github.com/prettier/prettier/issues/5322
51
51
  // && firstOption.svg === "any"
52
52
  );
package/index.js CHANGED
@@ -1,93 +1,103 @@
1
1
  "use strict";
2
2
 
3
+ const includeDeprecated = !process.env.ESLINT_CONFIG_PRETTIER_NO_DEPRECATED;
4
+
3
5
  module.exports = {
4
- rules: {
5
- // The following rules can be used in some cases. See the README for more
6
- // information. (These are marked with `0` instead of `"off"` so that a
7
- // script can distinguish them.)
8
- "arrow-body-style": 0,
9
- curly: 0,
10
- "lines-around-comment": 0,
11
- "max-len": 0,
12
- "no-confusing-arrow": 0,
13
- "no-mixed-operators": 0,
14
- "no-tabs": 0,
15
- "no-unexpected-multiline": 0,
16
- "prefer-arrow-callback": 0,
17
- quotes: 0,
18
- // The rest are rules that you never need to enable when using Prettier.
19
- "array-bracket-newline": "off",
20
- "array-bracket-spacing": "off",
21
- "array-element-newline": "off",
22
- "arrow-parens": "off",
23
- "arrow-spacing": "off",
24
- "block-spacing": "off",
25
- "brace-style": "off",
26
- "comma-dangle": "off",
27
- "comma-spacing": "off",
28
- "comma-style": "off",
29
- "computed-property-spacing": "off",
30
- "dot-location": "off",
31
- "eol-last": "off",
32
- "func-call-spacing": "off",
33
- "function-call-argument-newline": "off",
34
- "function-paren-newline": "off",
35
- "generator-star": "off",
36
- "generator-star-spacing": "off",
37
- "implicit-arrow-linebreak": "off",
38
- indent: "off",
39
- "indent-legacy": "off",
40
- "jsx-quotes": "off",
41
- "key-spacing": "off",
42
- "keyword-spacing": "off",
43
- "linebreak-style": "off",
44
- "multiline-ternary": "off",
45
- "newline-per-chained-call": "off",
46
- "new-parens": "off",
47
- "no-arrow-condition": "off",
48
- "no-comma-dangle": "off",
49
- "no-extra-parens": "off",
50
- "no-extra-semi": "off",
51
- "no-floating-decimal": "off",
52
- "no-mixed-spaces-and-tabs": "off",
53
- "no-multi-spaces": "off",
54
- "no-multiple-empty-lines": "off",
55
- "no-reserved-keys": "off",
56
- "no-space-before-semi": "off",
57
- "no-spaced-func": "off",
58
- "no-trailing-spaces": "off",
59
- "no-whitespace-before-property": "off",
60
- "no-wrap-func": "off",
61
- "nonblock-statement-body-position": "off",
62
- "object-curly-newline": "off",
63
- "object-curly-spacing": "off",
64
- "object-property-newline": "off",
65
- "one-var-declaration-per-line": "off",
66
- "operator-linebreak": "off",
67
- "padded-blocks": "off",
68
- "quote-props": "off",
69
- "rest-spread-spacing": "off",
70
- semi: "off",
71
- "semi-spacing": "off",
72
- "semi-style": "off",
73
- "space-after-function-name": "off",
74
- "space-after-keywords": "off",
75
- "space-before-blocks": "off",
76
- "space-before-function-paren": "off",
77
- "space-before-function-parentheses": "off",
78
- "space-before-keywords": "off",
79
- "space-in-brackets": "off",
80
- "space-in-parens": "off",
81
- "space-infix-ops": "off",
82
- "space-return-throw-case": "off",
83
- "space-unary-ops": "off",
84
- "space-unary-word-ops": "off",
85
- "switch-colon-spacing": "off",
86
- "template-curly-spacing": "off",
87
- "template-tag-spacing": "off",
88
- "unicode-bom": "off",
89
- "wrap-iife": "off",
90
- "wrap-regex": "off",
91
- "yield-star-spacing": "off"
92
- }
6
+ rules: Object.assign(
7
+ {
8
+ // The following rules can be used in some cases. See the README for more
9
+ // information. (These are marked with `0` instead of `"off"` so that a
10
+ // script can distinguish them.)
11
+ "arrow-body-style": 0,
12
+ curly: 0,
13
+ "lines-around-comment": 0,
14
+ "max-len": 0,
15
+ "no-confusing-arrow": 0,
16
+ "no-mixed-operators": 0,
17
+ "no-tabs": 0,
18
+ "no-unexpected-multiline": 0,
19
+ "prefer-arrow-callback": 0,
20
+ quotes: 0,
21
+ // The rest are rules that you never need to enable when using Prettier.
22
+ "array-bracket-newline": "off",
23
+ "array-bracket-spacing": "off",
24
+ "array-element-newline": "off",
25
+ "arrow-parens": "off",
26
+ "arrow-spacing": "off",
27
+ "block-spacing": "off",
28
+ "brace-style": "off",
29
+ "comma-dangle": "off",
30
+ "comma-spacing": "off",
31
+ "comma-style": "off",
32
+ "computed-property-spacing": "off",
33
+ "dot-location": "off",
34
+ "eol-last": "off",
35
+ "func-call-spacing": "off",
36
+ "function-call-argument-newline": "off",
37
+ "function-paren-newline": "off",
38
+ "generator-star": "off",
39
+ "generator-star-spacing": "off",
40
+ "implicit-arrow-linebreak": "off",
41
+ indent: "off",
42
+ "jsx-quotes": "off",
43
+ "key-spacing": "off",
44
+ "keyword-spacing": "off",
45
+ "linebreak-style": "off",
46
+ "multiline-ternary": "off",
47
+ "newline-per-chained-call": "off",
48
+ "new-parens": "off",
49
+ "no-arrow-condition": "off",
50
+ "no-comma-dangle": "off",
51
+ "no-extra-parens": "off",
52
+ "no-extra-semi": "off",
53
+ "no-floating-decimal": "off",
54
+ "no-mixed-spaces-and-tabs": "off",
55
+ "no-multi-spaces": "off",
56
+ "no-multiple-empty-lines": "off",
57
+ "no-reserved-keys": "off",
58
+ "no-space-before-semi": "off",
59
+ "no-trailing-spaces": "off",
60
+ "no-whitespace-before-property": "off",
61
+ "no-wrap-func": "off",
62
+ "nonblock-statement-body-position": "off",
63
+ "object-curly-newline": "off",
64
+ "object-curly-spacing": "off",
65
+ "object-property-newline": "off",
66
+ "one-var-declaration-per-line": "off",
67
+ "operator-linebreak": "off",
68
+ "padded-blocks": "off",
69
+ "quote-props": "off",
70
+ "rest-spread-spacing": "off",
71
+ semi: "off",
72
+ "semi-spacing": "off",
73
+ "semi-style": "off",
74
+ "space-after-function-name": "off",
75
+ "space-after-keywords": "off",
76
+ "space-before-blocks": "off",
77
+ "space-before-function-paren": "off",
78
+ "space-before-function-parentheses": "off",
79
+ "space-before-keywords": "off",
80
+ "space-in-brackets": "off",
81
+ "space-in-parens": "off",
82
+ "space-infix-ops": "off",
83
+ "space-return-throw-case": "off",
84
+ "space-unary-ops": "off",
85
+ "space-unary-word-ops": "off",
86
+ "switch-colon-spacing": "off",
87
+ "template-curly-spacing": "off",
88
+ "template-tag-spacing": "off",
89
+ "unicode-bom": "off",
90
+ "wrap-iife": "off",
91
+ "wrap-regex": "off",
92
+ "yield-star-spacing": "off"
93
+ },
94
+ includeDeprecated && {
95
+ // Deprecated since version 4.0.0.
96
+ // https://github.com/eslint/eslint/pull/8286
97
+ "indent-legacy": "off",
98
+ // Deprecated since version 3.3.0.
99
+ // https://eslint.org/docs/rules/no-spaced-func
100
+ "no-spaced-func": "off"
101
+ }
102
+ )
93
103
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-prettier",
3
- "version": "6.3.0",
3
+ "version": "6.7.0",
4
4
  "license": "MIT",
5
5
  "author": "Simon Lydell",
6
6
  "description": "Turns off all rules that are unnecessary or might conflict with Prettier.",
@@ -29,6 +29,7 @@
29
29
  "test:lint": "eslint .",
30
30
  "test:lint-verify-fail": "eslint \"test-lint/*.{js,ts,vue}\" --config .eslintrc.base.js --format json",
31
31
  "test:lint-rules": "eslint index.js --config test-config/.eslintrc.js --format json",
32
+ "test:deprecated": "eslint-find-rules --deprecated index.js",
32
33
  "test:jest": "jest",
33
34
  "test:cli-sanity": "eslint --print-config index.js | node ./bin/cli.js",
34
35
  "test:cli-sanity-warning": "eslint --print-config ./bin/cli.js | node ./bin/cli.js",
@@ -38,25 +39,26 @@
38
39
  "get-stdin": "^6.0.0"
39
40
  },
40
41
  "devDependencies": {
41
- "@typescript-eslint/eslint-plugin": "2.2.0",
42
- "@typescript-eslint/parser": "2.2.0",
42
+ "@typescript-eslint/eslint-plugin": "2.8.0",
43
+ "@typescript-eslint/parser": "2.8.0",
43
44
  "babel-eslint": "10.0.3",
44
45
  "cross-spawn": "6.0.5",
45
46
  "doctoc": "1.4.0",
46
- "eslint": "6.3.0",
47
+ "eslint": "6.6.0",
47
48
  "eslint-config-google": "0.14.0",
49
+ "eslint-find-rules": "3.4.0",
48
50
  "eslint-plugin-babel": "5.3.0",
49
- "eslint-plugin-flowtype": "4.3.0",
50
- "eslint-plugin-prettier": "3.1.0",
51
- "eslint-plugin-react": "7.14.3",
51
+ "eslint-plugin-flowtype": "4.4.1",
52
+ "eslint-plugin-prettier": "3.1.1",
53
+ "eslint-plugin-react": "7.16.0",
52
54
  "eslint-plugin-standard": "4.0.1",
53
- "eslint-plugin-unicorn": "10.0.0",
54
- "eslint-plugin-vue": "5.2.3",
55
+ "eslint-plugin-unicorn": "13.0.0",
56
+ "eslint-plugin-vue": "6.0.1",
55
57
  "jest": "24.9.0",
56
- "prettier": "1.18.2",
58
+ "prettier": "1.19.1",
57
59
  "replace": "1.1.1",
58
60
  "rimraf": "3.0.0",
59
- "typescript": "3.6.2"
61
+ "typescript": "3.7.2"
60
62
  },
61
63
  "peerDependencies": {
62
64
  "eslint": ">=3.14.1"
package/react.js CHANGED
@@ -1,21 +1,29 @@
1
1
  "use strict";
2
2
 
3
+ const includeDeprecated = !process.env.ESLINT_CONFIG_PRETTIER_NO_DEPRECATED;
4
+
3
5
  module.exports = {
4
- rules: {
5
- "react/jsx-child-element-spacing": "off",
6
- "react/jsx-closing-bracket-location": "off",
7
- "react/jsx-closing-tag-location": "off",
8
- "react/jsx-curly-newline": "off",
9
- "react/jsx-curly-spacing": "off",
10
- "react/jsx-equals-spacing": "off",
11
- "react/jsx-first-prop-new-line": "off",
12
- "react/jsx-indent": "off",
13
- "react/jsx-indent-props": "off",
14
- "react/jsx-max-props-per-line": "off",
15
- "react/jsx-one-expression-per-line": "off",
16
- "react/jsx-props-no-multi-spaces": "off",
17
- "react/jsx-space-before-closing": "off",
18
- "react/jsx-tag-spacing": "off",
19
- "react/jsx-wrap-multilines": "off"
20
- }
6
+ rules: Object.assign(
7
+ {
8
+ "react/jsx-child-element-spacing": "off",
9
+ "react/jsx-closing-bracket-location": "off",
10
+ "react/jsx-closing-tag-location": "off",
11
+ "react/jsx-curly-newline": "off",
12
+ "react/jsx-curly-spacing": "off",
13
+ "react/jsx-equals-spacing": "off",
14
+ "react/jsx-first-prop-new-line": "off",
15
+ "react/jsx-indent": "off",
16
+ "react/jsx-indent-props": "off",
17
+ "react/jsx-max-props-per-line": "off",
18
+ "react/jsx-one-expression-per-line": "off",
19
+ "react/jsx-props-no-multi-spaces": "off",
20
+ "react/jsx-tag-spacing": "off",
21
+ "react/jsx-wrap-multilines": "off"
22
+ },
23
+ includeDeprecated && {
24
+ // Deprecated since version 7.0.0.
25
+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#700---2017-05-06
26
+ "react/jsx-space-before-closing": "off"
27
+ }
28
+ )
21
29
  };
package/unicorn.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  module.exports = {
4
4
  rules: {
5
+ "unicorn/no-nested-ternary": "off",
5
6
  "unicorn/number-literal-case": "off"
6
7
  }
7
8
  };
package/vue.js CHANGED
@@ -9,12 +9,14 @@ module.exports = {
9
9
  "vue/block-spacing": "off",
10
10
  "vue/brace-style": "off",
11
11
  "vue/comma-dangle": "off",
12
+ "vue/dot-location": "off",
12
13
  "vue/html-closing-bracket-newline": "off",
13
14
  "vue/html-closing-bracket-spacing": "off",
14
15
  "vue/html-end-tags": "off",
15
16
  "vue/html-indent": "off",
16
17
  "vue/html-quotes": "off",
17
18
  "vue/key-spacing": "off",
19
+ "vue/keyword-spacing": "off",
18
20
  "vue/max-attributes-per-line": "off",
19
21
  "vue/multiline-html-element-content-newline": "off",
20
22
  "vue/mustache-interpolation-spacing": "off",