@houheaven/eslint-config-helper 1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 立树
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # @houheaven/eslint-config-helper
2
+
3
+ > Eslint 规则助手
4
+
5
+
6
+ ## 安装
7
+
8
+ ```sh
9
+ npm install --dev @houheaven/eslint-config-helper
10
+ ```
11
+
12
+ 请确保你已经安装了 `eslint`
13
+
14
+ ## 用法
15
+
16
+ 在 Eslint 配置文件中的 `"extends"` 数组里添加 `"@houheaven/eslint-config-helper"`
17
+
18
+ ```js
19
+ // .eslintrc.js
20
+
21
+ module.exports = {
22
+ extends: [
23
+ // ... 其他配置
24
+ "@houheaven/eslint-config-helper"
25
+ ]
26
+ }
27
+ ```
28
+
29
+ ## 修改 Eslint 规则
30
+
31
+ Eslint 官网:http://eslint.org/
32
+
33
+ 在 Eslint 配置文件中的 `"rules"` 里添加规则配置。
34
+
35
+ ```js
36
+ // .eslintrc.js
37
+
38
+ module.exports = {
39
+ rules: {
40
+ "quotes": ["warn", "double"],
41
+ "no-multiple-empty-lines": ["warn", {
42
+ "max": 2,
43
+ "maxBOF": 1,
44
+ "maxEOF": 1
45
+ }]
46
+ }
47
+ };
48
+ ```
49
+
50
+ ## 更多
51
+
52
+ 功能依赖:
53
+ - [`eslint`](https://www.npmjs.com/package/eslint)
@@ -0,0 +1,29 @@
1
+
2
+ module.exports = {
3
+ rules: {
4
+ // 强制使用一致的换行符风格
5
+ // Windows - "CRLF"
6
+ // Unix、Linux - "LF"
7
+ "linebreak-style": ["warn", "unix"],
8
+ // 强制在花括号中使用一致的空格
9
+ "object-curly-spacing": ["warn", "always", {
10
+ "arraysInObjects": false,
11
+ "objectsInObjects": true,
12
+ }],
13
+ // 要求对象字面量属性名称用引号括起来
14
+ "quote-props": ["warn", "consistent"],
15
+ // 要求或禁止使用拖尾逗号(对象、数组、函数参数的最后一项后面是否允许有逗号)
16
+ "comma-dangle": ["warn", {
17
+ arrays: "never",
18
+ objects: "always-multiline",
19
+ imports: "never",
20
+ exports: "never",
21
+ functions: "never",
22
+ }],
23
+ // 强制在对象字面量的键和值之间使用一致的空格
24
+ "key-spacing": ["warn", {
25
+ beforeColon: false,
26
+ afterColon: true,
27
+ }],
28
+ },
29
+ };
@@ -0,0 +1,22 @@
1
+
2
+ // 文件首尾空行
3
+
4
+ "use strict";
5
+
6
+ module.exports = {
7
+ rules: {
8
+ // 要求或禁止文件末尾存在空行
9
+ "eol-last": ["warn", "always"],
10
+ // 禁止出现多行空行
11
+ "no-multiple-empty-lines": ["warn", {
12
+ "max": 2,
13
+ "maxBOF": 1,
14
+ "maxEOF": 1,
15
+ }],
16
+ // 禁用行尾空白
17
+ "no-trailing-spaces": ["warn", {
18
+ "skipBlankLines": true,
19
+ "ignoreComments": false,
20
+ }],
21
+ },
22
+ };
@@ -0,0 +1,18 @@
1
+
2
+ module.exports = {
3
+ extends: [
4
+ "./rules/best-practices",
5
+ "./rules/possible-errors",
6
+ "./rules/node",
7
+ "./rules/stylistic-issues",
8
+ "./rules/variables",
9
+ "./rules/es6",
10
+ "./rules/imports",
11
+ "./rules/strict-mode"
12
+ ],
13
+ parserOptions: {
14
+ ecmaVersion: 2018,
15
+ sourceType: "module",
16
+ },
17
+ rules: {},
18
+ };
@@ -0,0 +1,34 @@
1
+ module.exports = {
2
+ extends: [
3
+ "./rules/best-practices",
4
+ "./rules/errors",
5
+ "./rules/node",
6
+ "./rules/style",
7
+ "./rules/variables"
8
+ ].map(require.resolve),
9
+ env: {
10
+ browser: true,
11
+ node: true,
12
+ amd: false,
13
+ mocha: false,
14
+ jasmine: false,
15
+ },
16
+ rules: {
17
+ "comma-dangle": ["error", "never"],
18
+ "prefer-numeric-literals": "off",
19
+ "no-restricted-properties": ["error", {
20
+ object: "arguments",
21
+ property: "callee",
22
+ message: "arguments.callee is deprecated",
23
+ }, {
24
+ property: "__defineGetter__",
25
+ message: "Please use Object.defineProperty instead.",
26
+ }, {
27
+ property: "__defineSetter__",
28
+ message: "Please use Object.defineProperty instead.",
29
+ }],
30
+ "no-var": "off",
31
+ "prefer-object-spread": "off",
32
+ "strict": ["error", "safe"],
33
+ },
34
+ };
@@ -0,0 +1,414 @@
1
+
2
+ "use strict";
3
+
4
+ const includeDeprecated = !process.env.ESLINT_CONFIG_PRETTIER_NO_DEPRECATED;
5
+
6
+ module.exports = {
7
+ rules: {
8
+ // 在某些情况下,可以使用以下规则,阅读 README 获取更多信息
9
+ // 它们用“0”而不是“off”标记,以便脚本可以区分它们
10
+
11
+ // 强制所有控制语句使用一致的括号风格
12
+ "curly": 0,
13
+ // 要求在注释周围有空行
14
+ "lines-around-comment": 0,
15
+ // 强制一行的最大长度
16
+ "max-len": ["warn", {
17
+ "code": 200,
18
+ "tabWidth": 4,
19
+ "comments": 200,
20
+ "ignoreComments": false,
21
+ "ignoreTrailingComments": true,
22
+ "ignoreUrls": true,
23
+ "ignoreStrings": true,
24
+ "ignoreTemplateLiterals": true,
25
+ "ignoreRegExpLiterals": true,
26
+ }],
27
+ // 禁止在可能与比较操作符相混淆的地方使用箭头函数
28
+ "no-confusing-arrow": ["error", {
29
+ "allowParens": true,
30
+ }],
31
+ // 禁止混合使用不同的操作符
32
+ "no-mixed-operators": [
33
+ "error",
34
+ {
35
+ "groups": [
36
+ ["+", "-", "*", "/", "%", "**"],
37
+ ["&", "|", "^", "~", "<<", ">>", ">>>"],
38
+ ["==", "!=", "===", "!==", ">", ">=", "<", "<="],
39
+ ["&&", "||"],
40
+ ["in", "instanceof"]
41
+ ],
42
+ "allowSamePrecedence": true,
43
+ }
44
+ ],
45
+ // 禁用 tab
46
+ "no-tabs": "error",
47
+ // 禁止出现令人困惑的多行表达式
48
+ "no-unexpected-multiline": "error",
49
+ // 强制使用一致的反勾号、双引号或单引号
50
+ "quotes": ["warn", "double", { "avoidEscape": true }],
51
+ "@typescript-eslint/quotes": 0,
52
+ "babel/quotes": 0,
53
+ "vue/html-self-closing": 0,
54
+ "vue/max-len": 0,
55
+
56
+ // 以下的规则在使用Prettier时不需要启用
57
+
58
+ // 在数组开括号后和闭括号前强制换行
59
+ "array-bracket-newline": ["warn", "consistent"],
60
+ // 强制数组方括号中使用一致的空格
61
+ "array-bracket-spacing": ["error", "never"],
62
+ // 强制数组元素间出现换行
63
+ "array-element-newline": ["warn", "consistent"],
64
+ // 要求箭头函数的参数使用圆括号
65
+ "arrow-parens": ["warn", "as-needed"],
66
+ // 要求箭头函数的箭头之前或之后有空格
67
+ "arrow-spacing": ["warn", {
68
+ "before": true,
69
+ "after": true,
70
+ }],
71
+ // 禁止或强制在代码块中开括号前和闭括号后有空格
72
+ "block-spacing": ["warn", "always"],
73
+ // 强制在代码块中使用一致的大括号风格
74
+ "brace-style": ["warn", "stroustrup", { "allowSingleLine": true }],
75
+ // 要求或禁止使用拖尾逗号(对象、数组、函数参数的最后一项后面是否允许有逗号)
76
+ "comma-dangle": ["warn", {
77
+ arrays: "never",
78
+ objects: "always-multiline",
79
+ imports: "never",
80
+ exports: "never",
81
+ functions: "never",
82
+ }],
83
+ // 强制在逗号前后使用一致的空格
84
+ "comma-spacing": ["warn", {
85
+ "before": false,
86
+ "after": true,
87
+ }],
88
+ // 强制使用一致的逗号风格
89
+ "comma-style": ["warn", "last", {
90
+ exceptions: {
91
+ ArrayExpression: false,
92
+ ArrayPattern: false,
93
+ ArrowFunctionExpression: false,
94
+ CallExpression: false,
95
+ FunctionDeclaration: false,
96
+ FunctionExpression: false,
97
+ ImportDeclaration: false,
98
+ ObjectExpression: false,
99
+ ObjectPattern: false,
100
+ VariableDeclaration: false,
101
+ NewExpression: false,
102
+ },
103
+ }],
104
+ // 强制在计算的属性的方括号中使用一致的空格
105
+ "computed-property-spacing": ["warn", "never"],
106
+ // 强制在点号之前和之后一致的换行
107
+ "dot-location": ["warn", "property"],
108
+ // 要求或禁止文件末尾存在空行
109
+ "eol-last": ["warn", "always"],
110
+ // 要求或禁止在函数标识符和其调用之间有空格
111
+ "func-call-spacing": ["warn", "never"],
112
+ // 函数调用参数换行符
113
+ "function-call-argument-newline": ["warn", "consistent"],
114
+ // 强制在函数括号内使用一致的换行
115
+ "function-paren-newline": ["warn", "consistent"],
116
+ // generator 函数中 * 号
117
+ // "generator-star": "error",
118
+ // 强制 generator 函数中 * 号周围使用一致的空格
119
+ "generator-star-spacing": ["warn", {
120
+ before: false,
121
+ after: true,
122
+ }],
123
+ // 强制隐式返回的箭头函数体的位置
124
+ "implicit-arrow-linebreak": ["warn", "beside"],
125
+ // 强制使用一致的缩进
126
+ "indent": ["error", 2, {
127
+ SwitchCase: 1,
128
+ VariableDeclarator: 1,
129
+ outerIIFEBody: 1,
130
+ // MemberExpression: null,
131
+ FunctionDeclaration: {
132
+ parameters: 1,
133
+ body: 1,
134
+ },
135
+ FunctionExpression: {
136
+ parameters: 1,
137
+ body: 1,
138
+ },
139
+ CallExpression: {
140
+ arguments: 1,
141
+ },
142
+ ArrayExpression: 1,
143
+ ObjectExpression: 1,
144
+ ImportDeclaration: 1,
145
+ flatTernaryExpressions: false,
146
+ // list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js
147
+ ignoredNodes: [
148
+ "JSXElement",
149
+ "JSXElement > *",
150
+ "JSXAttribute",
151
+ "JSXIdentifier",
152
+ "JSXNamespacedName",
153
+ "JSXMemberExpression",
154
+ "JSXSpreadAttribute",
155
+ "JSXExpressionContainer",
156
+ "JSXOpeningElement",
157
+ "JSXClosingElement",
158
+ "JSXFragment",
159
+ "JSXOpeningFragment",
160
+ "JSXClosingFragment",
161
+ "JSXText",
162
+ "JSXEmptyExpression",
163
+ "JSXSpreadChild"
164
+ ],
165
+ ignoreComments: false,
166
+ }],
167
+ // 强制在 JSX 属性中一致地使用双引号或单引号
168
+ "jsx-quotes": ["warn", "prefer-double"],
169
+ // 强制在对象字面量的键和值之间使用一致的空格
170
+ "key-spacing": ["warn", {
171
+ beforeColon: false,
172
+ afterColon: true,
173
+ }],
174
+ // 强制关键字周围空格的一致性
175
+ "keyword-spacing": ["warn", {
176
+ "before": true,
177
+ "after": true,
178
+ "overrides": {
179
+ "if": { "after": false },
180
+ "for": { "after": false },
181
+ "while": { "after": false },
182
+ "switch": { "after": false },
183
+ "case": { "after": true },
184
+ "catch": { "after": false },
185
+ "return": { "after": true },
186
+ "throw": { "after": true },
187
+ },
188
+ }],
189
+ // 强制使用一致的换行符风格
190
+ // Windows - "CRLF"
191
+ // Unix、Linux - "LF"
192
+ "linebreak-style": ["warn", "unix"],
193
+ // 要求或禁止在三元操作数中间换行
194
+ // TODO: enable?
195
+ "multiline-ternary": ["off", "never"],
196
+ // 要求方法链中每个调用都有一个换行符
197
+ "newline-per-chained-call": ["warn", { ignoreChainWithDepth: 4 }],
198
+ // 强制或禁止调用无参构造函数时有圆括号
199
+ "new-parens": ["error", "always"],
200
+ // 禁止冗余的括号
201
+ "no-extra-parens": ["off", "all", {
202
+ "conditionalAssign": true,
203
+ "nestedBinaryExpressions": false,
204
+ "returnAssign": false,
205
+ "ignoreJSX": "all", // delegate to eslint-plugin-react
206
+ "enforceForArrowConditionals": false,
207
+ }],
208
+ // 禁止不必要的分号
209
+ "no-extra-semi": "warn",
210
+ // 禁止数字字面量中使用前导和末尾小数点
211
+ "no-floating-decimal": "error",
212
+ // 禁止空格和 tab 的混合缩进
213
+ "no-mixed-spaces-and-tabs": "warn",
214
+ // 禁止使用多个空格
215
+ "no-multi-spaces": ["warn", { "ignoreEOLComments": true }],
216
+ // 禁止出现多行空行
217
+ "no-multiple-empty-lines": ["warn", {
218
+ "max": 2,
219
+ "maxBOF": 1,
220
+ "maxEOF": 1,
221
+ }],
222
+ // 禁用行尾空格
223
+ "no-trailing-spaces": ["warn", {
224
+ "skipBlankLines": true,
225
+ "ignoreComments": false,
226
+ }],
227
+ // 禁止属性前有空白
228
+ "no-whitespace-before-property": "error",
229
+ // 强制单个语句的位置
230
+ "nonblock-statement-body-position": "off",
231
+ "object-curly-newline": "off",
232
+ // 强制大括号内换行符的一致性
233
+ "object-curly-newline": ["error", {
234
+ "ObjectExpression": { minProperties: 4, multiline: true, consistent: true },
235
+ "ObjectPattern": { minProperties: 4, multiline: true, consistent: true },
236
+ "ImportDeclaration": { minProperties: 4, multiline: true, consistent: true },
237
+ "ExportDeclaration": { minProperties: 4, multiline: true, consistent: true },
238
+ }],
239
+ // 强制在花括号中使用一致的空格
240
+ "object-curly-spacing": ["warn", "always", {
241
+ "arraysInObjects": false,
242
+ "objectsInObjects": true,
243
+ }],
244
+ // 强制将对象的属性放在不同的行上
245
+ "object-property-newline": ["off", {
246
+ "allowAllPropertiesOnSameLine": true,
247
+ }],
248
+ // 要求或禁止在变量声明周围换行
249
+ "one-var-declaration-per-line": "off",
250
+ // 强制操作符使用一致的换行符
251
+ "operator-linebreak": ["off", "before", { overrides: { "=": "none" } }],
252
+ // 要求或禁止块内填充
253
+ "padded-blocks": "off",
254
+ // 要求对象字面量属性名称用引号括起来
255
+ "quote-props": ["warn", "consistent"],
256
+ // 强制剩余和扩展运算符及其表达式之间有空格
257
+ "rest-spread-spacing": ["error", "never"],
258
+ // 要求或禁止使用分号代替 ASI
259
+ "semi": ["error", "always"],
260
+ // 强制分号之前和之后使用一致的空格
261
+ "semi-spacing": ["error", { before: false, after: true }],
262
+ // 强制分号的位置
263
+ "semi-style": ["error", "last"],
264
+ // 要求或禁止语句块之前的空格(代码块大括号前面是否需要空格)
265
+ "space-before-blocks": ["warn", {
266
+ "functions": "always",
267
+ "keywords": "always",
268
+ "classes": "always",
269
+ }],
270
+ // 强制在 function 的左括号之前使用一致的空格
271
+ "space-before-function-paren": ["error", {
272
+ "anonymous": "always",
273
+ "named": "never",
274
+ "asyncArrow": "always",
275
+ }],
276
+ // 强制在圆括号内使用一致的空格
277
+ "space-in-parens": ["error", "never"],
278
+ // 要求中缀操作符周围有空格(+-*/?| etc.)
279
+ "space-infix-ops": "error",
280
+ // 强制在一元操作符前后使用一致的空格
281
+ "space-unary-ops": ["error", {
282
+ "words": true,
283
+ "nonwords": false,
284
+ }],
285
+ // 强制在 switch 的冒号左右有空格
286
+ "switch-colon-spacing": ["error", { after: true, before: false }],
287
+ // 要求或禁止模板字符串中的嵌入表达式周围空格的使用
288
+ "template-curly-spacing": "error",
289
+ // 要求或禁止在模板标记和它们的字面量之间有空格
290
+ "template-tag-spacing": ["error", "never"],
291
+ // 要求或禁止 Unicode 字节顺序标记 (BOM)
292
+ "unicode-bom": ["off", "never"],
293
+ // 要求 IIFE 使用括号括起来
294
+ "wrap-iife": ["error", "outside", { functionPrototypeMethods: true }],
295
+ // 要求正则表达式被括号括起来
296
+ "wrap-regex": "off",
297
+ // 强制在 yield* 表达式中 * 周围使用空格
298
+ "yield-star-spacing": ["error", "both"],
299
+
300
+ // 已废弃
301
+ "no-arrow-condition": "off",
302
+ "no-comma-dangle": "off",
303
+ "no-reserved-keys": "off",
304
+ "no-space-before-semi": "off",
305
+ "no-wrap-func": "off",
306
+ "space-after-function-name": "off",
307
+ "space-after-keywords": "off",
308
+ "space-before-function-parentheses": "off",
309
+ "space-before-keywords": "off",
310
+ "space-in-brackets": "off",
311
+ "space-return-throw-case": "off",
312
+ "space-unary-word-ops": "off",
313
+
314
+
315
+ "@babel/object-curly-spacing": "off",
316
+ "@babel/semi": "off",
317
+ "@typescript-eslint/brace-style": "off",
318
+ "@typescript-eslint/comma-dangle": "off",
319
+ "@typescript-eslint/comma-spacing": "off",
320
+ "@typescript-eslint/func-call-spacing": "off",
321
+ "@typescript-eslint/indent": "off",
322
+ "@typescript-eslint/keyword-spacing": "off",
323
+ "@typescript-eslint/member-delimiter-style": "off",
324
+ "@typescript-eslint/no-extra-parens": "off",
325
+ "@typescript-eslint/no-extra-semi": "off",
326
+ "@typescript-eslint/object-curly-spacing": "off",
327
+ "@typescript-eslint/semi": "off",
328
+ "@typescript-eslint/space-before-blocks": "off",
329
+ "@typescript-eslint/space-before-function-paren": "off",
330
+ "@typescript-eslint/space-infix-ops": "off",
331
+ "@typescript-eslint/type-annotation-spacing": "off",
332
+ "babel/object-curly-spacing": "off",
333
+ "babel/semi": "off",
334
+ "flowtype/boolean-style": "off",
335
+ "flowtype/delimiter-dangle": "off",
336
+ "flowtype/generic-spacing": "off",
337
+ "flowtype/object-type-curly-spacing": "off",
338
+ "flowtype/object-type-delimiter": "off",
339
+ "flowtype/quotes": "off",
340
+ "flowtype/semi": "off",
341
+ "flowtype/space-after-type-colon": "off",
342
+ "flowtype/space-before-generic-bracket": "off",
343
+ "flowtype/space-before-type-colon": "off",
344
+ "flowtype/union-intersection-spacing": "off",
345
+ "react/jsx-child-element-spacing": "off",
346
+ "react/jsx-closing-bracket-location": "off",
347
+ "react/jsx-closing-tag-location": "off",
348
+ "react/jsx-curly-newline": "off",
349
+ "react/jsx-curly-spacing": "off",
350
+ "react/jsx-equals-spacing": "off",
351
+ "react/jsx-first-prop-new-line": "off",
352
+ "react/jsx-indent": "off",
353
+ "react/jsx-indent-props": "off",
354
+ "react/jsx-max-props-per-line": "off",
355
+ "react/jsx-newline": "off",
356
+ "react/jsx-one-expression-per-line": "off",
357
+ "react/jsx-props-no-multi-spaces": "off",
358
+ "react/jsx-tag-spacing": "off",
359
+ "react/jsx-wrap-multilines": "off",
360
+ "standard/array-bracket-even-spacing": "off",
361
+ "standard/computed-property-even-spacing": "off",
362
+ "standard/object-curly-even-spacing": "off",
363
+ "unicorn/empty-brace-spaces": "off",
364
+ "unicorn/no-nested-ternary": "off",
365
+ "unicorn/number-literal-case": "off",
366
+ "vue/array-bracket-newline": "off",
367
+ "vue/array-bracket-spacing": "off",
368
+ "vue/arrow-spacing": "off",
369
+ "vue/block-spacing": "off",
370
+ "vue/block-tag-newline": "off",
371
+ "vue/brace-style": "off",
372
+ "vue/comma-dangle": "off",
373
+ "vue/comma-spacing": "off",
374
+ "vue/comma-style": "off",
375
+ "vue/dot-location": "off",
376
+ "vue/func-call-spacing": "off",
377
+ "vue/html-closing-bracket-newline": "off",
378
+ "vue/html-closing-bracket-spacing": "off",
379
+ "vue/html-end-tags": "off",
380
+ "vue/html-indent": "off",
381
+ "vue/html-quotes": "off",
382
+ "vue/key-spacing": "off",
383
+ "vue/keyword-spacing": "off",
384
+ "vue/max-attributes-per-line": "off",
385
+ "vue/multiline-html-element-content-newline": "off",
386
+ "vue/mustache-interpolation-spacing": "off",
387
+ "vue/no-extra-parens": "off",
388
+ "vue/no-multi-spaces": "off",
389
+ "vue/no-spaces-around-equal-signs-in-attribute": "off",
390
+ "vue/object-curly-newline": "off",
391
+ "vue/object-curly-spacing": "off",
392
+ "vue/object-property-newline": "off",
393
+ "vue/operator-linebreak": "off",
394
+ "vue/quote-props": "off",
395
+ "vue/script-indent": "off",
396
+ "vue/singleline-html-element-content-newline": "off",
397
+ "vue/space-in-parens": "off",
398
+ "vue/space-infix-ops": "off",
399
+ "vue/space-unary-ops": "off",
400
+ "vue/template-curly-spacing": "off",
401
+
402
+ ...(includeDeprecated && {
403
+ // Deprecated since version 4.0.0.
404
+ // https://github.com/eslint/eslint/pull/8286
405
+ "indent-legacy": "off",
406
+ // Deprecated since version 3.3.0.
407
+ // https://eslint.org/docs/rules/no-spaced-func
408
+ "no-spaced-func": "off",
409
+ // Deprecated since version 7.0.0.
410
+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#700---2017-05-06
411
+ "react/jsx-space-before-closing": "off",
412
+ }),
413
+ },
414
+ };