eslint-config-prettier 6.15.0 → 8.0.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.
package/bin/cli.js CHANGED
@@ -2,40 +2,40 @@
2
2
 
3
3
  "use strict";
4
4
 
5
- const fs = require("fs");
6
- const path = require("path");
7
- const getStdin = require("get-stdin");
8
5
  const validators = require("./validators");
6
+ const config = require("..");
7
+ const prettier = require("../prettier");
8
+
9
+ // Require locally installed eslint, for `npx eslint-config-prettier` support
10
+ // with no local eslint-config-prettier installation.
11
+ const { ESLint } = require(require.resolve("eslint", {
12
+ paths: [process.cwd(), ...require.resolve.paths("eslint")],
13
+ }));
9
14
 
10
15
  const SPECIAL_RULES_URL =
11
16
  "https://github.com/prettier/eslint-config-prettier#special-rules";
12
17
 
18
+ const PRETTIER_RULES_URL =
19
+ "https://github.com/prettier/eslint-config-prettier#arrow-body-style-and-prefer-arrow-callback";
20
+
13
21
  if (module === require.main) {
14
- if (process.argv.length > 2 || process.stdin.isTTY) {
15
- console.error(
16
- [
17
- "This tool checks whether an ESLint configuration contains rules that are",
18
- "unnecessary or conflict with Prettier. It’s supposed to be run like this:",
19
- "",
20
- " npx eslint --print-config path/to/main.js | npx eslint-config-prettier-check",
21
- " npx eslint --print-config test/index.js | npx eslint-config-prettier-check",
22
- "",
23
- "Exit codes:",
24
- "",
25
- "0: No automatically detectable problems found.",
26
- "1: Unexpected error.",
27
- "2: Conflicting rules found.",
28
- "",
29
- "For more information, see:",
30
- "https://github.com/prettier/eslint-config-prettier#cli-helper-tool",
31
- ].join("\n")
32
- );
22
+ const args = process.argv.slice(2);
23
+
24
+ if (args.length === 0) {
25
+ console.error(help());
33
26
  process.exit(1);
34
27
  }
35
28
 
36
- getStdin()
37
- .then((string) => {
38
- const result = processString(string);
29
+ const eslint = new ESLint();
30
+
31
+ Promise.all(args.map((file) => eslint.calculateConfigForFile(file)))
32
+ .then((configs) => {
33
+ const rules = [].concat(
34
+ ...configs.map(({ rules }, index) =>
35
+ Object.entries(rules).map((entry) => [...entry, args[index]])
36
+ )
37
+ );
38
+ const result = processRules(rules);
39
39
  if (result.stderr) {
40
40
  console.error(result.stderr);
41
41
  }
@@ -45,107 +45,77 @@ if (module === require.main) {
45
45
  process.exit(result.code);
46
46
  })
47
47
  .catch((error) => {
48
- console.error("Unexpected error", error);
48
+ console.error(error.message);
49
49
  process.exit(1);
50
50
  });
51
51
  }
52
52
 
53
- function processString(string) {
54
- let config;
55
- try {
56
- config = JSON.parse(string);
57
- } catch (error) {
58
- return {
59
- stderr: `Failed to parse JSON:\n${error.message}`,
60
- code: 1,
61
- };
62
- }
53
+ function help() {
54
+ return `
55
+ Usage: npx eslint-config-prettier FILE...
63
56
 
64
- if (
65
- !(
66
- Object.prototype.toString.call(config) === "[object Object]" &&
67
- Object.prototype.toString.call(config.rules) === "[object Object]"
68
- )
69
- ) {
70
- return {
71
- stderr: `Expected a \`{"rules: {...}"}\` JSON object, but got:\n${string}`,
72
- code: 1,
73
- };
74
- }
57
+ Resolves an ESLint configuration for every given FILE and checks if they
58
+ contain rules that are unnecessary or conflict with Prettier. Example:
75
59
 
76
- // This used to look at "files" in package.json, but that is not reliable due
77
- // to an npm bug. See:
78
- // https://github.com/prettier/eslint-config-prettier/issues/57
79
- const allRules = Object.assign(
80
- Object.create(null),
81
- ...fs
82
- .readdirSync(path.join(__dirname, ".."))
83
- .filter((name) => !name.startsWith(".") && name.endsWith(".js"))
84
- .map((ruleFileName) => require(`../${ruleFileName}`).rules)
85
- );
60
+ npx eslint-config-prettier index.js test/index.js other/file/to/check.js
86
61
 
87
- const regularRules = filterRules(
88
- allRules,
89
- (ruleName, value) => value === "off"
90
- );
62
+ Exit codes:
63
+
64
+ 0: No automatically detectable problems found.
65
+ 1: General error.
66
+ 2: Conflicting rules found.
67
+
68
+ For more information, see:
69
+ https://github.com/prettier/eslint-config-prettier#cli-helper-tool
70
+ `.trim();
71
+ }
72
+
73
+ function processRules(configRules) {
74
+ const regularRules = filterRules(config.rules, (_, value) => value === "off");
91
75
  const optionsRules = filterRules(
92
- allRules,
76
+ config.rules,
93
77
  (ruleName, value) => value === 0 && ruleName in validators
94
78
  );
95
79
  const specialRules = filterRules(
96
- allRules,
80
+ config.rules,
97
81
  (ruleName, value) => value === 0 && !(ruleName in validators)
98
82
  );
99
83
 
100
- const flaggedRules = Object.keys(config.rules)
101
- .map((ruleName) => {
102
- const value = config.rules[ruleName];
84
+ const enabledRules = configRules
85
+ .map(([ruleName, value, source]) => {
103
86
  const arrayValue = Array.isArray(value) ? value : [value];
104
- const level = arrayValue[0];
105
- const options = arrayValue.slice(1);
87
+ const [level, ...options] = arrayValue;
106
88
  const isOff = level === "off" || level === 0;
107
- return !isOff && ruleName in allRules ? { ruleName, options } : null;
89
+ return isOff ? null : { ruleName, options, source };
108
90
  })
109
91
  .filter(Boolean);
110
92
 
93
+ const flaggedRules = enabledRules.filter(
94
+ ({ ruleName }) => ruleName in config.rules
95
+ );
96
+
111
97
  const regularFlaggedRuleNames = filterRuleNames(
112
98
  flaggedRules,
113
- (ruleName) => ruleName in regularRules
99
+ ({ ruleName }) => ruleName in regularRules
114
100
  );
115
101
  const optionsFlaggedRuleNames = filterRuleNames(
116
102
  flaggedRules,
117
- (ruleName, options) =>
118
- ruleName in optionsRules && !validators[ruleName](options)
103
+ ({ ruleName, ...rule }) =>
104
+ ruleName in optionsRules && !validators[ruleName](rule)
119
105
  );
120
106
  const specialFlaggedRuleNames = filterRuleNames(
121
107
  flaggedRules,
122
- (ruleName) => ruleName in specialRules
108
+ ({ ruleName }) => ruleName in specialRules
109
+ );
110
+ const prettierFlaggedRuleNames = filterRuleNames(
111
+ enabledRules,
112
+ ({ ruleName, source }) =>
113
+ ruleName in prettier.rules &&
114
+ enabledRules.some(
115
+ (rule) =>
116
+ rule.ruleName === "prettier/prettier" && rule.source === source
117
+ )
123
118
  );
124
-
125
- if (
126
- regularFlaggedRuleNames.length === 0 &&
127
- optionsFlaggedRuleNames.length === 0
128
- ) {
129
- const baseMessage =
130
- "No rules that are unnecessary or conflict with Prettier were found.";
131
-
132
- const message =
133
- specialFlaggedRuleNames.length === 0
134
- ? baseMessage
135
- : [
136
- baseMessage,
137
- "",
138
- "However, the following rules are enabled but cannot be automatically checked. See:",
139
- SPECIAL_RULES_URL,
140
- "",
141
- printRuleNames(specialFlaggedRuleNames),
142
- ].join("\n");
143
-
144
- return {
145
- stdout: message,
146
- code: 0,
147
- };
148
- }
149
119
 
150
120
  const regularMessage = [
151
121
  "The following rules are unnecessary or might conflict with Prettier:",
@@ -154,7 +124,7 @@ function processString(string) {
154
124
  ].join("\n");
155
125
 
156
126
  const optionsMessage = [
157
- "The following rules are enabled with options that might conflict with Prettier. See:",
127
+ "The following rules are enabled with config that might conflict with Prettier. See:",
158
128
  SPECIAL_RULES_URL,
159
129
  "",
160
130
  printRuleNames(optionsFlaggedRuleNames),
@@ -167,10 +137,41 @@ function processString(string) {
167
137
  printRuleNames(specialFlaggedRuleNames),
168
138
  ].join("\n");
169
139
 
140
+ const prettierMessage = [
141
+ "The following rules can cause issues when using eslint-plugin-prettier at the same time.",
142
+ "Only enable them if you know what you are doing! See:",
143
+ PRETTIER_RULES_URL,
144
+ "",
145
+ printRuleNames(prettierFlaggedRuleNames),
146
+ ].join("\n");
147
+
148
+ if (
149
+ regularFlaggedRuleNames.length === 0 &&
150
+ optionsFlaggedRuleNames.length === 0
151
+ ) {
152
+ const message =
153
+ specialFlaggedRuleNames.length === 0 &&
154
+ prettierFlaggedRuleNames.length === 0
155
+ ? "No rules that are unnecessary or conflict with Prettier were found."
156
+ : [
157
+ specialFlaggedRuleNames.length === 0 ? null : specialMessage,
158
+ prettierFlaggedRuleNames.length === 0 ? null : prettierMessage,
159
+ "Other than that, no rules that are unnecessary or conflict with Prettier were found.",
160
+ ]
161
+ .filter(Boolean)
162
+ .join("\n\n");
163
+
164
+ return {
165
+ stdout: message,
166
+ code: 0,
167
+ };
168
+ }
169
+
170
170
  const message = [
171
171
  regularFlaggedRuleNames.length === 0 ? null : regularMessage,
172
172
  optionsFlaggedRuleNames.length === 0 ? null : optionsMessage,
173
173
  specialFlaggedRuleNames.length === 0 ? null : specialMessage,
174
+ prettierFlaggedRuleNames.length === 0 ? null : prettierMessage,
174
175
  ]
175
176
  .filter(Boolean)
176
177
  .join("\n\n");
@@ -182,18 +183,18 @@ function processString(string) {
182
183
  }
183
184
 
184
185
  function filterRules(rules, fn) {
185
- return Object.keys(rules)
186
- .filter((ruleName) => fn(ruleName, rules[ruleName]))
187
- .reduce((obj, ruleName) => {
186
+ return Object.entries(rules)
187
+ .filter(([ruleName, value]) => fn(ruleName, value))
188
+ .reduce((obj, [ruleName]) => {
188
189
  obj[ruleName] = true;
189
190
  return obj;
190
191
  }, Object.create(null));
191
192
  }
192
193
 
193
194
  function filterRuleNames(rules, fn) {
194
- return rules
195
- .filter((rule) => fn(rule.ruleName, rule.options))
196
- .map((rule) => rule.ruleName);
195
+ return [
196
+ ...new Set(rules.filter((rule) => fn(rule)).map((rule) => rule.ruleName)),
197
+ ];
197
198
  }
198
199
 
199
200
  function printRuleNames(ruleNames) {
@@ -204,4 +205,4 @@ function printRuleNames(ruleNames) {
204
205
  .join("\n");
205
206
  }
206
207
 
207
- exports.processString = processString;
208
+ exports.processRules = processRules;
package/bin/validators.js CHANGED
@@ -4,7 +4,7 @@
4
4
  // `false` if the options DO conflict with Prettier, and `true` if they don’t.
5
5
 
6
6
  module.exports = {
7
- curly(options) {
7
+ "curly"({ options }) {
8
8
  if (options.length === 0) {
9
9
  return true;
10
10
  }
@@ -13,7 +13,7 @@ module.exports = {
13
13
  return firstOption !== "multi-line" && firstOption !== "multi-or-nest";
14
14
  },
15
15
 
16
- "lines-around-comment"(options) {
16
+ "lines-around-comment"({ options }) {
17
17
  if (options.length === 0) {
18
18
  return false;
19
19
  }
@@ -30,7 +30,7 @@ module.exports = {
30
30
  );
31
31
  },
32
32
 
33
- "no-confusing-arrow"(options) {
33
+ "no-confusing-arrow"({ options }) {
34
34
  if (options.length === 0) {
35
35
  return false;
36
36
  }
@@ -39,7 +39,16 @@ module.exports = {
39
39
  return firstOption ? firstOption.allowParens === false : false;
40
40
  },
41
41
 
42
- "vue/html-self-closing"(options) {
42
+ "no-tabs"({ options }) {
43
+ if (options.length === 0) {
44
+ return false;
45
+ }
46
+
47
+ const firstOption = options[0];
48
+ return Boolean(firstOption && firstOption.allowIndentationTabs);
49
+ },
50
+
51
+ "vue/html-self-closing"({ options }) {
43
52
  if (options.length === 0) {
44
53
  return false;
45
54
  }
package/index.js CHANGED
@@ -3,101 +3,186 @@
3
3
  const includeDeprecated = !process.env.ESLINT_CONFIG_PRETTIER_NO_DEPRECATED;
4
4
 
5
5
  module.exports = {
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 && {
6
+ rules: {
7
+ // The following rules can be used in some cases. See the README for more
8
+ // information. (These are marked with `0` instead of `"off"` so that a
9
+ // script can distinguish them.)
10
+ "curly": 0,
11
+ "lines-around-comment": 0,
12
+ "max-len": 0,
13
+ "no-confusing-arrow": 0,
14
+ "no-mixed-operators": 0,
15
+ "no-tabs": 0,
16
+ "no-unexpected-multiline": 0,
17
+ "quotes": 0,
18
+ "@typescript-eslint/quotes": 0,
19
+ "babel/quotes": 0,
20
+ "vue/html-self-closing": 0,
21
+ "vue/max-len": 0,
22
+
23
+ // The rest are rules that you never need to enable when using Prettier.
24
+ "array-bracket-newline": "off",
25
+ "array-bracket-spacing": "off",
26
+ "array-element-newline": "off",
27
+ "arrow-parens": "off",
28
+ "arrow-spacing": "off",
29
+ "block-spacing": "off",
30
+ "brace-style": "off",
31
+ "comma-dangle": "off",
32
+ "comma-spacing": "off",
33
+ "comma-style": "off",
34
+ "computed-property-spacing": "off",
35
+ "dot-location": "off",
36
+ "eol-last": "off",
37
+ "func-call-spacing": "off",
38
+ "function-call-argument-newline": "off",
39
+ "function-paren-newline": "off",
40
+ "generator-star": "off",
41
+ "generator-star-spacing": "off",
42
+ "implicit-arrow-linebreak": "off",
43
+ "indent": "off",
44
+ "jsx-quotes": "off",
45
+ "key-spacing": "off",
46
+ "keyword-spacing": "off",
47
+ "linebreak-style": "off",
48
+ "multiline-ternary": "off",
49
+ "newline-per-chained-call": "off",
50
+ "new-parens": "off",
51
+ "no-arrow-condition": "off",
52
+ "no-comma-dangle": "off",
53
+ "no-extra-parens": "off",
54
+ "no-extra-semi": "off",
55
+ "no-floating-decimal": "off",
56
+ "no-mixed-spaces-and-tabs": "off",
57
+ "no-multi-spaces": "off",
58
+ "no-multiple-empty-lines": "off",
59
+ "no-reserved-keys": "off",
60
+ "no-space-before-semi": "off",
61
+ "no-trailing-spaces": "off",
62
+ "no-whitespace-before-property": "off",
63
+ "no-wrap-func": "off",
64
+ "nonblock-statement-body-position": "off",
65
+ "object-curly-newline": "off",
66
+ "object-curly-spacing": "off",
67
+ "object-property-newline": "off",
68
+ "one-var-declaration-per-line": "off",
69
+ "operator-linebreak": "off",
70
+ "padded-blocks": "off",
71
+ "quote-props": "off",
72
+ "rest-spread-spacing": "off",
73
+ "semi": "off",
74
+ "semi-spacing": "off",
75
+ "semi-style": "off",
76
+ "space-after-function-name": "off",
77
+ "space-after-keywords": "off",
78
+ "space-before-blocks": "off",
79
+ "space-before-function-paren": "off",
80
+ "space-before-function-parentheses": "off",
81
+ "space-before-keywords": "off",
82
+ "space-in-brackets": "off",
83
+ "space-in-parens": "off",
84
+ "space-infix-ops": "off",
85
+ "space-return-throw-case": "off",
86
+ "space-unary-ops": "off",
87
+ "space-unary-word-ops": "off",
88
+ "switch-colon-spacing": "off",
89
+ "template-curly-spacing": "off",
90
+ "template-tag-spacing": "off",
91
+ "unicode-bom": "off",
92
+ "wrap-iife": "off",
93
+ "wrap-regex": "off",
94
+ "yield-star-spacing": "off",
95
+ "@typescript-eslint/brace-style": "off",
96
+ "@typescript-eslint/comma-dangle": "off",
97
+ "@typescript-eslint/comma-spacing": "off",
98
+ "@typescript-eslint/func-call-spacing": "off",
99
+ "@typescript-eslint/indent": "off",
100
+ "@typescript-eslint/keyword-spacing": "off",
101
+ "@typescript-eslint/member-delimiter-style": "off",
102
+ "@typescript-eslint/no-extra-parens": "off",
103
+ "@typescript-eslint/no-extra-semi": "off",
104
+ "@typescript-eslint/object-curly-spacing": "off",
105
+ "@typescript-eslint/semi": "off",
106
+ "@typescript-eslint/space-before-function-paren": "off",
107
+ "@typescript-eslint/space-infix-ops": "off",
108
+ "@typescript-eslint/type-annotation-spacing": "off",
109
+ "babel/object-curly-spacing": "off",
110
+ "babel/semi": "off",
111
+ "flowtype/boolean-style": "off",
112
+ "flowtype/delimiter-dangle": "off",
113
+ "flowtype/generic-spacing": "off",
114
+ "flowtype/object-type-delimiter": "off",
115
+ "flowtype/semi": "off",
116
+ "flowtype/space-after-type-colon": "off",
117
+ "flowtype/space-before-generic-bracket": "off",
118
+ "flowtype/space-before-type-colon": "off",
119
+ "flowtype/union-intersection-spacing": "off",
120
+ "react/jsx-child-element-spacing": "off",
121
+ "react/jsx-closing-bracket-location": "off",
122
+ "react/jsx-closing-tag-location": "off",
123
+ "react/jsx-curly-newline": "off",
124
+ "react/jsx-curly-spacing": "off",
125
+ "react/jsx-equals-spacing": "off",
126
+ "react/jsx-first-prop-new-line": "off",
127
+ "react/jsx-indent": "off",
128
+ "react/jsx-indent-props": "off",
129
+ "react/jsx-max-props-per-line": "off",
130
+ "react/jsx-newline": "off",
131
+ "react/jsx-one-expression-per-line": "off",
132
+ "react/jsx-props-no-multi-spaces": "off",
133
+ "react/jsx-tag-spacing": "off",
134
+ "react/jsx-wrap-multilines": "off",
135
+ "standard/array-bracket-even-spacing": "off",
136
+ "standard/computed-property-even-spacing": "off",
137
+ "standard/object-curly-even-spacing": "off",
138
+ "unicorn/empty-brace-spaces": "off",
139
+ "unicorn/no-nested-ternary": "off",
140
+ "unicorn/number-literal-case": "off",
141
+ "vue/array-bracket-newline": "off",
142
+ "vue/array-bracket-spacing": "off",
143
+ "vue/arrow-spacing": "off",
144
+ "vue/block-spacing": "off",
145
+ "vue/block-tag-newline": "off",
146
+ "vue/brace-style": "off",
147
+ "vue/comma-dangle": "off",
148
+ "vue/comma-spacing": "off",
149
+ "vue/comma-style": "off",
150
+ "vue/dot-location": "off",
151
+ "vue/func-call-spacing": "off",
152
+ "vue/html-closing-bracket-newline": "off",
153
+ "vue/html-closing-bracket-spacing": "off",
154
+ "vue/html-end-tags": "off",
155
+ "vue/html-indent": "off",
156
+ "vue/html-quotes": "off",
157
+ "vue/key-spacing": "off",
158
+ "vue/keyword-spacing": "off",
159
+ "vue/max-attributes-per-line": "off",
160
+ "vue/multiline-html-element-content-newline": "off",
161
+ "vue/mustache-interpolation-spacing": "off",
162
+ "vue/no-extra-parens": "off",
163
+ "vue/no-multi-spaces": "off",
164
+ "vue/no-spaces-around-equal-signs-in-attribute": "off",
165
+ "vue/object-curly-newline": "off",
166
+ "vue/object-curly-spacing": "off",
167
+ "vue/object-property-newline": "off",
168
+ "vue/operator-linebreak": "off",
169
+ "vue/script-indent": "off",
170
+ "vue/singleline-html-element-content-newline": "off",
171
+ "vue/space-in-parens": "off",
172
+ "vue/space-infix-ops": "off",
173
+ "vue/space-unary-ops": "off",
174
+ "vue/template-curly-spacing": "off",
175
+
176
+ ...(includeDeprecated && {
95
177
  // Deprecated since version 4.0.0.
96
178
  // https://github.com/eslint/eslint/pull/8286
97
179
  "indent-legacy": "off",
98
180
  // Deprecated since version 3.3.0.
99
181
  // https://eslint.org/docs/rules/no-spaced-func
100
182
  "no-spaced-func": "off",
101
- }
102
- ),
183
+ // Deprecated since version 7.0.0.
184
+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#700---2017-05-06
185
+ "react/jsx-space-before-closing": "off",
186
+ }),
187
+ },
103
188
  };