@egy186/eslint-config 0.98.1 → 0.99.1
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/base.js +1 -143
- package/index.js +7 -1
- package/package.json +10 -6
- package/react.js +18 -24
- package/stylistic.js +177 -0
- package/typescript.js +16 -50
package/base.js
CHANGED
|
@@ -115,7 +115,6 @@ module.exports = {
|
|
|
115
115
|
'no-bitwise': 'off',
|
|
116
116
|
'no-caller': 'error',
|
|
117
117
|
'no-case-declarations': 'error',
|
|
118
|
-
'no-confusing-arrow': ['error', { allowParens: false }],
|
|
119
118
|
'no-console': 'warn',
|
|
120
119
|
'no-continue': 'off',
|
|
121
120
|
'no-delete-var': 'error',
|
|
@@ -130,8 +129,6 @@ module.exports = {
|
|
|
130
129
|
'no-extra-bind': 'error',
|
|
131
130
|
'no-extra-boolean-cast': 'error',
|
|
132
131
|
'no-extra-label': 'off',
|
|
133
|
-
'no-extra-semi': 'error',
|
|
134
|
-
'no-floating-decimal': 'error',
|
|
135
132
|
'no-global-assign': 'error',
|
|
136
133
|
'no-implicit-coercion': 'error',
|
|
137
134
|
'no-implicit-globals': 'error',
|
|
@@ -145,7 +142,6 @@ module.exports = {
|
|
|
145
142
|
'no-lonely-if': 'error',
|
|
146
143
|
'no-loop-func': 'error',
|
|
147
144
|
'no-magic-numbers': 'off',
|
|
148
|
-
'no-mixed-operators': 'error',
|
|
149
145
|
'no-multi-assign': 'error',
|
|
150
146
|
'no-multi-str': 'error',
|
|
151
147
|
'no-negated-condition': 'error',
|
|
@@ -194,7 +190,6 @@ module.exports = {
|
|
|
194
190
|
'no-with': 'error',
|
|
195
191
|
'object-shorthand': ['error', 'always'],
|
|
196
192
|
'one-var': ['error', 'never'],
|
|
197
|
-
'one-var-declaration-per-line': 'off',
|
|
198
193
|
'operator-assignment': 'off',
|
|
199
194
|
'prefer-arrow-callback': 'error',
|
|
200
195
|
'prefer-const': 'error',
|
|
@@ -209,7 +204,6 @@ module.exports = {
|
|
|
209
204
|
'prefer-rest-params': 'error',
|
|
210
205
|
'prefer-spread': 'error',
|
|
211
206
|
'prefer-template': 'error',
|
|
212
|
-
'quote-props': ['error', 'as-needed'],
|
|
213
207
|
radix: 'error',
|
|
214
208
|
'require-await': 'error',
|
|
215
209
|
'require-unicode-regexp': 'error',
|
|
@@ -217,11 +211,6 @@ module.exports = {
|
|
|
217
211
|
'sort-imports': 'error',
|
|
218
212
|
'sort-keys': 'error',
|
|
219
213
|
'sort-vars': 'error',
|
|
220
|
-
'spaced-comment': [
|
|
221
|
-
'error',
|
|
222
|
-
'always',
|
|
223
|
-
{ block: { balanced: true } }
|
|
224
|
-
],
|
|
225
214
|
strict: ['error', 'safe'],
|
|
226
215
|
'symbol-description': 'error',
|
|
227
216
|
'vars-on-top': 'error',
|
|
@@ -229,139 +218,8 @@ module.exports = {
|
|
|
229
218
|
},
|
|
230
219
|
...{
|
|
231
220
|
// Layout & Formatting
|
|
232
|
-
'array-bracket-newline': 'error',
|
|
233
|
-
'array-bracket-spacing': ['error', 'never'],
|
|
234
|
-
'array-element-newline': [
|
|
235
|
-
'error',
|
|
236
|
-
{
|
|
237
|
-
minItems: 3,
|
|
238
|
-
multiline: true
|
|
239
|
-
}
|
|
240
|
-
],
|
|
241
|
-
'arrow-parens': ['error', 'as-needed'],
|
|
242
|
-
'arrow-spacing': [
|
|
243
|
-
'error',
|
|
244
|
-
{
|
|
245
|
-
after: true,
|
|
246
|
-
before: true
|
|
247
|
-
}
|
|
248
|
-
],
|
|
249
|
-
'block-spacing': ['error', 'always'],
|
|
250
|
-
'brace-style': [
|
|
251
|
-
'error',
|
|
252
|
-
'1tbs',
|
|
253
|
-
{ allowSingleLine: false }
|
|
254
|
-
],
|
|
255
|
-
'comma-dangle': ['error', 'never'],
|
|
256
|
-
'comma-spacing': [
|
|
257
|
-
'error',
|
|
258
|
-
{
|
|
259
|
-
after: true,
|
|
260
|
-
before: false
|
|
261
|
-
}
|
|
262
|
-
],
|
|
263
|
-
'comma-style': ['error', 'last'],
|
|
264
|
-
'computed-property-spacing': ['error', 'never'],
|
|
265
|
-
'dot-location': ['error', 'property'],
|
|
266
|
-
'eol-last': 'error',
|
|
267
|
-
'func-call-spacing': ['error', 'never'],
|
|
268
|
-
'function-call-argument-newline': ['error', 'consistent'],
|
|
269
|
-
'function-paren-newline': ['error', 'multiline'],
|
|
270
|
-
'generator-star-spacing': ['error', 'after'],
|
|
271
|
-
'implicit-arrow-linebreak': ['error', 'beside'],
|
|
272
|
-
indent: [
|
|
273
|
-
'error',
|
|
274
|
-
2,
|
|
275
|
-
{
|
|
276
|
-
MemberExpression: 1,
|
|
277
|
-
SwitchCase: 1
|
|
278
|
-
}
|
|
279
|
-
],
|
|
280
|
-
'jsx-quotes': ['error', 'prefer-double'],
|
|
281
|
-
'key-spacing': [
|
|
282
|
-
'error',
|
|
283
|
-
{
|
|
284
|
-
afterColon: true,
|
|
285
|
-
beforeColon: false
|
|
286
|
-
}
|
|
287
|
-
],
|
|
288
|
-
'keyword-spacing': [
|
|
289
|
-
'error',
|
|
290
|
-
{
|
|
291
|
-
after: true,
|
|
292
|
-
before: true
|
|
293
|
-
}
|
|
294
|
-
],
|
|
295
221
|
'line-comment-position': 'off',
|
|
296
|
-
'
|
|
297
|
-
'lines-around-comment': 'off',
|
|
298
|
-
'lines-between-class-members': 'error',
|
|
299
|
-
'max-len': 'off',
|
|
300
|
-
'max-statements-per-line': 'error',
|
|
301
|
-
'multiline-ternary': ['error', 'always-multiline'],
|
|
302
|
-
'new-parens': 'error',
|
|
303
|
-
'newline-per-chained-call': 'off',
|
|
304
|
-
'no-extra-parens': [
|
|
305
|
-
'error',
|
|
306
|
-
'all',
|
|
307
|
-
{
|
|
308
|
-
ignoreJSX: 'multi-line',
|
|
309
|
-
nestedBinaryExpressions: false
|
|
310
|
-
}
|
|
311
|
-
],
|
|
312
|
-
'no-mixed-spaces-and-tabs': 'error',
|
|
313
|
-
'no-multi-spaces': 'error',
|
|
314
|
-
'no-multiple-empty-lines': [
|
|
315
|
-
'error',
|
|
316
|
-
{
|
|
317
|
-
max: 2,
|
|
318
|
-
maxBOF: 0,
|
|
319
|
-
maxEOF: 1
|
|
320
|
-
}
|
|
321
|
-
],
|
|
322
|
-
'no-tabs': 'off',
|
|
323
|
-
'no-trailing-spaces': 'error',
|
|
324
|
-
'no-whitespace-before-property': 'error',
|
|
325
|
-
'nonblock-statement-body-position': 'error',
|
|
326
|
-
'object-curly-newline': ['error', { multiline: true }],
|
|
327
|
-
'object-curly-spacing': ['error', 'always'],
|
|
328
|
-
'object-property-newline': 'error',
|
|
329
|
-
'operator-linebreak': ['error', 'before'],
|
|
330
|
-
'padded-blocks': ['error', 'never'],
|
|
331
|
-
'padding-line-between-statements': 'error',
|
|
332
|
-
quotes: [
|
|
333
|
-
'error',
|
|
334
|
-
'single',
|
|
335
|
-
'avoid-escape'
|
|
336
|
-
],
|
|
337
|
-
'rest-spread-spacing': ['error', 'never'],
|
|
338
|
-
semi: ['error', 'always'],
|
|
339
|
-
'semi-spacing': [
|
|
340
|
-
'error',
|
|
341
|
-
{
|
|
342
|
-
after: true,
|
|
343
|
-
before: false
|
|
344
|
-
}
|
|
345
|
-
],
|
|
346
|
-
'semi-style': ['error', 'last'],
|
|
347
|
-
'space-before-blocks': 'error',
|
|
348
|
-
'space-before-function-paren': ['error', 'always'],
|
|
349
|
-
'space-in-parens': ['error', 'never'],
|
|
350
|
-
'space-infix-ops': 'error',
|
|
351
|
-
'space-unary-ops': 'error',
|
|
352
|
-
'switch-colon-spacing': 'error',
|
|
353
|
-
'template-curly-spacing': ['error', 'never'],
|
|
354
|
-
'template-tag-spacing': ['error', 'never'],
|
|
355
|
-
'unicode-bom': ['error', 'never'],
|
|
356
|
-
'wrap-iife': ['error', 'inside'],
|
|
357
|
-
'wrap-regex': 'off',
|
|
358
|
-
'yield-star-spacing': [
|
|
359
|
-
'error',
|
|
360
|
-
{
|
|
361
|
-
after: true,
|
|
362
|
-
before: false
|
|
363
|
-
}
|
|
364
|
-
]
|
|
222
|
+
'unicode-bom': ['error', 'never']
|
|
365
223
|
}
|
|
366
224
|
}
|
|
367
225
|
};
|
package/index.js
CHANGED
|
@@ -3,5 +3,11 @@
|
|
|
3
3
|
const _ = require('lodash');
|
|
4
4
|
const base = require('./base');
|
|
5
5
|
const jsdoc = require('./jsdoc');
|
|
6
|
+
const stylistic = require('./stylistic');
|
|
6
7
|
|
|
7
|
-
module.exports = _.
|
|
8
|
+
module.exports = _.mergeWith(base, jsdoc, stylistic, (objValue, srcValue) => {
|
|
9
|
+
if (Array.isArray(objValue)) {
|
|
10
|
+
return objValue.concat(srcValue);
|
|
11
|
+
}
|
|
12
|
+
return undefined;
|
|
13
|
+
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egy186/eslint-config",
|
|
3
3
|
"description": "Eslint shareable config",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.99.1",
|
|
5
5
|
"author": "egy186",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/egy186/eslint-config/issues"
|
|
@@ -10,13 +10,15 @@
|
|
|
10
10
|
"lodash": "^4.17.21"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@
|
|
14
|
-
"@
|
|
15
|
-
"eslint": "~
|
|
13
|
+
"@eslint-stylistic/metadata": "~1.0.1",
|
|
14
|
+
"@stylistic/eslint-plugin": "~1.0.1",
|
|
15
|
+
"@typescript-eslint/eslint-plugin": "~6.10.0",
|
|
16
|
+
"@typescript-eslint/parser": "~6.10.0",
|
|
17
|
+
"eslint": "~8.53.0",
|
|
16
18
|
"eslint-plugin-import": "~2.29.0",
|
|
17
19
|
"eslint-plugin-jest": "~27.6.0",
|
|
18
|
-
"eslint-plugin-jsdoc": "~46.
|
|
19
|
-
"eslint-plugin-n": "~16.
|
|
20
|
+
"eslint-plugin-jsdoc": "~46.9.0",
|
|
21
|
+
"eslint-plugin-n": "~16.3.1",
|
|
20
22
|
"eslint-plugin-react": "~7.33.2",
|
|
21
23
|
"eslint-plugin-react-hooks": "~4.6.0",
|
|
22
24
|
"husky": "^8.0.1",
|
|
@@ -35,6 +37,7 @@
|
|
|
35
37
|
"modules.js",
|
|
36
38
|
"node.js",
|
|
37
39
|
"react.js",
|
|
40
|
+
"stylistic.js",
|
|
38
41
|
"typescript.js"
|
|
39
42
|
],
|
|
40
43
|
"homepage": "https://github.com/egy186/eslint-config#readme",
|
|
@@ -45,6 +48,7 @@
|
|
|
45
48
|
"license": "MIT",
|
|
46
49
|
"main": "index.js",
|
|
47
50
|
"peerDependencies": {
|
|
51
|
+
"@stylistic/eslint-plugin": "^1.0.1",
|
|
48
52
|
"@typescript-eslint/eslint-plugin": "^6.9.0",
|
|
49
53
|
"@typescript-eslint/parser": "^6.9.0",
|
|
50
54
|
"eslint": "^8.50.0",
|
package/react.js
CHANGED
|
@@ -26,21 +26,15 @@ module.exports = {
|
|
|
26
26
|
'react/hook-use-state': 'error',
|
|
27
27
|
'react/iframe-missing-sandbox': 'error',
|
|
28
28
|
'react/jsx-boolean-value': 'error',
|
|
29
|
-
'react/jsx-child-element-spacing': '
|
|
30
|
-
'react/jsx-closing-bracket-location': '
|
|
31
|
-
'react/jsx-closing-tag-location': '
|
|
32
|
-
'react/jsx-curly-brace-presence':
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
props: 'never'
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
'react/jsx-curly-newline': ['error', 'never'],
|
|
40
|
-
'react/jsx-curly-spacing': 'error',
|
|
41
|
-
'react/jsx-equals-spacing': 'error',
|
|
29
|
+
'react/jsx-child-element-spacing': 'off', // Migrated to @stylistic/jsx-child-element-spacing
|
|
30
|
+
'react/jsx-closing-bracket-location': 'off', // Migrated to @stylistic/jsx-closing-bracket-location
|
|
31
|
+
'react/jsx-closing-tag-location': 'off', // Migrated to @stylistic/jsx-closing-tag-location
|
|
32
|
+
'react/jsx-curly-brace-presence': 'off', // Migrated to @stylistic/jsx-curly-brace-presence
|
|
33
|
+
'react/jsx-curly-newline': 'off', // Migrated to @stylistic/jsx-curly-newline
|
|
34
|
+
'react/jsx-curly-spacing': 'off', // Migrated to @stylistic/jsx-curly-spacing
|
|
35
|
+
'react/jsx-equals-spacing': 'off', // Migrated to @stylistic/jsx-equals-spacing
|
|
42
36
|
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }],
|
|
43
|
-
'react/jsx-first-prop-new-line': '
|
|
37
|
+
'react/jsx-first-prop-new-line': 'off', // Migrated to @stylistic/jsx-first-prop-new-line
|
|
44
38
|
'react/jsx-fragments': ['error', 'element'],
|
|
45
39
|
'react/jsx-handler-names': [
|
|
46
40
|
'error',
|
|
@@ -49,8 +43,8 @@ module.exports = {
|
|
|
49
43
|
checkLocalVariables: true
|
|
50
44
|
}
|
|
51
45
|
],
|
|
52
|
-
'react/jsx-indent':
|
|
53
|
-
'react/jsx-indent-props':
|
|
46
|
+
'react/jsx-indent': 'off', // Migrated to @stylistic/jsx-indent
|
|
47
|
+
'react/jsx-indent-props': 'off', // Migrated to @stylistic/jsx-indent-props
|
|
54
48
|
'react/jsx-key': [
|
|
55
49
|
'error',
|
|
56
50
|
{
|
|
@@ -60,8 +54,8 @@ module.exports = {
|
|
|
60
54
|
}
|
|
61
55
|
],
|
|
62
56
|
'react/jsx-max-depth': 'error',
|
|
63
|
-
'react/jsx-max-props-per-line': '
|
|
64
|
-
'react/jsx-newline': 'off',
|
|
57
|
+
'react/jsx-max-props-per-line': 'off', // Migrated to @stylistic/jsx-max-props-per-line
|
|
58
|
+
'react/jsx-newline': 'off', // Migrated to @stylistic/jsx-newline
|
|
65
59
|
'react/jsx-no-bind': 'error',
|
|
66
60
|
'react/jsx-no-comment-textnodes': 'error',
|
|
67
61
|
'react/jsx-no-constructed-context-values': 'error',
|
|
@@ -80,15 +74,15 @@ module.exports = {
|
|
|
80
74
|
'react/jsx-no-target-blank': 'error',
|
|
81
75
|
'react/jsx-no-undef': 'error',
|
|
82
76
|
'react/jsx-no-useless-fragment': 'error',
|
|
83
|
-
'react/jsx-one-expression-per-line': '
|
|
77
|
+
'react/jsx-one-expression-per-line': 'off', // Migrated to @stylistic/jsx-one-expression-per-line
|
|
84
78
|
'react/jsx-pascal-case': 'error',
|
|
85
|
-
'react/jsx-props-no-multi-spaces': '
|
|
79
|
+
'react/jsx-props-no-multi-spaces': 'off', // Migrated to @stylistic/jsx-props-no-multi-spaces
|
|
86
80
|
'react/jsx-props-no-spreading': 'off',
|
|
87
|
-
'react/jsx-sort-props': '
|
|
88
|
-
'react/jsx-tag-spacing':
|
|
81
|
+
'react/jsx-sort-props': 'off', // Migrated to @stylistic/jsx-sort-props
|
|
82
|
+
'react/jsx-tag-spacing': 'off', // Migrated to @stylistic/jsx-tag-spacing
|
|
89
83
|
'react/jsx-uses-react': 'error',
|
|
90
84
|
'react/jsx-uses-vars': 'error',
|
|
91
|
-
'react/jsx-wrap-multilines': '
|
|
85
|
+
'react/jsx-wrap-multilines': 'off', // Migrated to @stylistic/jsx-wrap-multilines
|
|
92
86
|
'react/no-access-state-in-setstate': 'error',
|
|
93
87
|
'react/no-adjacent-inline-elements': 'error',
|
|
94
88
|
'react/no-array-index-key': 'error',
|
|
@@ -129,7 +123,7 @@ module.exports = {
|
|
|
129
123
|
'react/require-default-props': 'error',
|
|
130
124
|
'react/require-optimization': 'error',
|
|
131
125
|
'react/require-render-return': 'error',
|
|
132
|
-
'react/self-closing-comp': '
|
|
126
|
+
'react/self-closing-comp': 'off', // Migrated to @stylistic/self-closing-comp
|
|
133
127
|
'react/sort-comp': [
|
|
134
128
|
'error',
|
|
135
129
|
{
|
package/stylistic.js
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint max-lines: "off" */
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
plugins: ['@stylistic'],
|
|
7
|
+
rules: {
|
|
8
|
+
'@stylistic/array-bracket-newline': 'error',
|
|
9
|
+
'@stylistic/array-bracket-spacing': ['error', 'never'],
|
|
10
|
+
'@stylistic/array-element-newline': [
|
|
11
|
+
'error',
|
|
12
|
+
{
|
|
13
|
+
minItems: 3,
|
|
14
|
+
multiline: true
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
'@stylistic/arrow-parens': ['error', 'as-needed'],
|
|
18
|
+
'@stylistic/arrow-spacing': [
|
|
19
|
+
'error',
|
|
20
|
+
{
|
|
21
|
+
after: true,
|
|
22
|
+
before: true
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
'@stylistic/block-spacing': ['error', 'always'],
|
|
26
|
+
'@stylistic/brace-style': [
|
|
27
|
+
'error',
|
|
28
|
+
'1tbs',
|
|
29
|
+
{ allowSingleLine: false }
|
|
30
|
+
],
|
|
31
|
+
'@stylistic/comma-dangle': ['error', 'never'],
|
|
32
|
+
'@stylistic/comma-spacing': [
|
|
33
|
+
'error',
|
|
34
|
+
{
|
|
35
|
+
after: true,
|
|
36
|
+
before: false
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
'@stylistic/comma-style': ['error', 'last'],
|
|
40
|
+
'@stylistic/computed-property-spacing': ['error', 'never'],
|
|
41
|
+
'@stylistic/dot-location': ['error', 'property'],
|
|
42
|
+
'@stylistic/eol-last': 'error',
|
|
43
|
+
'@stylistic/func-call-spacing': ['error', 'never'],
|
|
44
|
+
'@stylistic/function-call-argument-newline': ['error', 'consistent'],
|
|
45
|
+
'@stylistic/function-paren-newline': ['error', 'multiline'],
|
|
46
|
+
'@stylistic/generator-star-spacing': ['error', 'after'],
|
|
47
|
+
'@stylistic/implicit-arrow-linebreak': ['error', 'beside'],
|
|
48
|
+
'@stylistic/indent': [
|
|
49
|
+
'error',
|
|
50
|
+
2,
|
|
51
|
+
{
|
|
52
|
+
MemberExpression: 1,
|
|
53
|
+
SwitchCase: 1
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
'@stylistic/jsx-child-element-spacing': 'error',
|
|
57
|
+
'@stylistic/jsx-closing-bracket-location': 'error',
|
|
58
|
+
'@stylistic/jsx-closing-tag-location': 'error',
|
|
59
|
+
'@stylistic/jsx-curly-brace-presence': [
|
|
60
|
+
'error',
|
|
61
|
+
{
|
|
62
|
+
children: 'ignore',
|
|
63
|
+
props: 'never'
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
'@stylistic/jsx-curly-newline': ['error', 'never'],
|
|
67
|
+
'@stylistic/jsx-curly-spacing': 'error',
|
|
68
|
+
'@stylistic/jsx-equals-spacing': 'error',
|
|
69
|
+
'@stylistic/jsx-first-prop-new-line': 'error',
|
|
70
|
+
'@stylistic/jsx-indent': ['error', 2],
|
|
71
|
+
'@stylistic/jsx-indent-props': ['error', 2],
|
|
72
|
+
'@stylistic/jsx-max-props-per-line': 'error',
|
|
73
|
+
'@stylistic/jsx-newline': 'off',
|
|
74
|
+
'@stylistic/jsx-one-expression-per-line': 'error',
|
|
75
|
+
'@stylistic/jsx-props-no-multi-spaces': 'error',
|
|
76
|
+
'@stylistic/jsx-quotes': ['error', 'prefer-double'],
|
|
77
|
+
'@stylistic/jsx-self-closing-comp': 'error',
|
|
78
|
+
'@stylistic/jsx-sort-props': 'error',
|
|
79
|
+
'@stylistic/jsx-tag-spacing': ['error', { beforeClosing: 'never' }],
|
|
80
|
+
'@stylistic/jsx-wrap-multilines': 'error',
|
|
81
|
+
'@stylistic/key-spacing': [
|
|
82
|
+
'error',
|
|
83
|
+
{
|
|
84
|
+
afterColon: true,
|
|
85
|
+
beforeColon: false
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
'@stylistic/keyword-spacing': [
|
|
89
|
+
'error',
|
|
90
|
+
{
|
|
91
|
+
after: true,
|
|
92
|
+
before: true
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
'@stylistic/linebreak-style': 'error',
|
|
96
|
+
'@stylistic/lines-around-comment': 'off',
|
|
97
|
+
'@stylistic/lines-between-class-members': 'error',
|
|
98
|
+
'@stylistic/max-len': 'off',
|
|
99
|
+
'@stylistic/max-statements-per-line': 'error',
|
|
100
|
+
'@stylistic/member-delimiter-style': 'error',
|
|
101
|
+
'@stylistic/multiline-ternary': ['error', 'always-multiline'],
|
|
102
|
+
'@stylistic/new-parens': 'error',
|
|
103
|
+
'@stylistic/newline-per-chained-call': 'off',
|
|
104
|
+
'@stylistic/no-confusing-arrow': ['error', { allowParens: false }],
|
|
105
|
+
'@stylistic/no-extra-parens': [
|
|
106
|
+
'error',
|
|
107
|
+
'all',
|
|
108
|
+
{
|
|
109
|
+
ignoreJSX: 'multi-line',
|
|
110
|
+
nestedBinaryExpressions: false
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
'@stylistic/no-extra-semi': 'error',
|
|
114
|
+
'@stylistic/no-floating-decimal': 'error',
|
|
115
|
+
'@stylistic/no-mixed-operators': 'error',
|
|
116
|
+
'@stylistic/no-mixed-spaces-and-tabs': 'error',
|
|
117
|
+
'@stylistic/no-multi-spaces': 'error',
|
|
118
|
+
'@stylistic/no-multiple-empty-lines': [
|
|
119
|
+
'error',
|
|
120
|
+
{
|
|
121
|
+
max: 2,
|
|
122
|
+
maxBOF: 0,
|
|
123
|
+
maxEOF: 1
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
'@stylistic/no-tabs': 'off',
|
|
127
|
+
'@stylistic/no-trailing-spaces': 'error',
|
|
128
|
+
'@stylistic/no-whitespace-before-property': 'error',
|
|
129
|
+
'@stylistic/nonblock-statement-body-position': 'error',
|
|
130
|
+
'@stylistic/object-curly-newline': ['error', { multiline: true }],
|
|
131
|
+
'@stylistic/object-curly-spacing': ['error', 'always'],
|
|
132
|
+
'@stylistic/object-property-newline': 'error',
|
|
133
|
+
'@stylistic/one-var-declaration-per-line': 'off',
|
|
134
|
+
'@stylistic/operator-linebreak': ['error', 'before'],
|
|
135
|
+
'@stylistic/padded-blocks': ['error', 'never'],
|
|
136
|
+
'@stylistic/padding-line-between-statements': 'error',
|
|
137
|
+
'@stylistic/quote-props': ['error', 'as-needed'],
|
|
138
|
+
'@stylistic/quotes': [
|
|
139
|
+
'error',
|
|
140
|
+
'single',
|
|
141
|
+
'avoid-escape'
|
|
142
|
+
],
|
|
143
|
+
'@stylistic/rest-spread-spacing': ['error', 'never'],
|
|
144
|
+
'@stylistic/semi': ['error', 'always'],
|
|
145
|
+
'@stylistic/semi-spacing': [
|
|
146
|
+
'error',
|
|
147
|
+
{
|
|
148
|
+
after: true,
|
|
149
|
+
before: false
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
'@stylistic/semi-style': ['error', 'last'],
|
|
153
|
+
'@stylistic/space-before-blocks': 'error',
|
|
154
|
+
'@stylistic/space-before-function-paren': ['error', 'always'],
|
|
155
|
+
'@stylistic/space-in-parens': ['error', 'never'],
|
|
156
|
+
'@stylistic/space-infix-ops': 'error',
|
|
157
|
+
'@stylistic/space-unary-ops': 'error',
|
|
158
|
+
'@stylistic/spaced-comment': [
|
|
159
|
+
'error',
|
|
160
|
+
'always',
|
|
161
|
+
{ block: { balanced: true } }
|
|
162
|
+
],
|
|
163
|
+
'@stylistic/switch-colon-spacing': 'error',
|
|
164
|
+
'@stylistic/template-curly-spacing': ['error', 'never'],
|
|
165
|
+
'@stylistic/template-tag-spacing': ['error', 'never'],
|
|
166
|
+
'@stylistic/type-annotation-spacing': 'error',
|
|
167
|
+
'@stylistic/wrap-iife': ['error', 'inside'],
|
|
168
|
+
'@stylistic/wrap-regex': 'off',
|
|
169
|
+
'@stylistic/yield-star-spacing': [
|
|
170
|
+
'error',
|
|
171
|
+
{
|
|
172
|
+
after: true,
|
|
173
|
+
before: false
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
};
|
package/typescript.js
CHANGED
|
@@ -10,11 +10,11 @@ module.exports = {
|
|
|
10
10
|
'@typescript-eslint/ban-ts-comment': 'error',
|
|
11
11
|
'@typescript-eslint/ban-tslint-comment': 'error',
|
|
12
12
|
'@typescript-eslint/ban-types': 'error',
|
|
13
|
-
'@typescript-eslint/block-spacing':
|
|
13
|
+
'@typescript-eslint/block-spacing': 'off', // Migrated to @stylistic/block-spacing
|
|
14
14
|
'@typescript-eslint/brace-style': 'error',
|
|
15
15
|
'@typescript-eslint/class-literal-property-style': 'error',
|
|
16
16
|
'@typescript-eslint/class-methods-use-this': 'error',
|
|
17
|
-
'@typescript-eslint/comma-dangle':
|
|
17
|
+
'@typescript-eslint/comma-dangle': 'off', // Migrated to @stylistic/comma-dangle
|
|
18
18
|
'@typescript-eslint/comma-spacing': 'error',
|
|
19
19
|
'@typescript-eslint/consistent-generic-constructors': 'error',
|
|
20
20
|
'@typescript-eslint/consistent-indexed-object-style': ['error', 'index-signature'],
|
|
@@ -30,24 +30,12 @@ module.exports = {
|
|
|
30
30
|
'@typescript-eslint/func-call-spacing': 'error',
|
|
31
31
|
'@typescript-eslint/indent': ['error', 2],
|
|
32
32
|
'@typescript-eslint/init-declarations': 'error',
|
|
33
|
-
'@typescript-eslint/key-spacing':
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
beforeColon: false
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
'@typescript-eslint/keyword-spacing': [
|
|
41
|
-
'error',
|
|
42
|
-
{
|
|
43
|
-
after: true,
|
|
44
|
-
before: true
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
'@typescript-eslint/lines-around-comment': 'off',
|
|
48
|
-
'@typescript-eslint/lines-between-class-members': 'error',
|
|
33
|
+
'@typescript-eslint/key-spacing': 'off', // Migrated to @stylistic/key-spacing
|
|
34
|
+
'@typescript-eslint/keyword-spacing': 'off', // Migrated to @stylistic/keyword-spacing
|
|
35
|
+
'@typescript-eslint/lines-around-comment': 'off', // Migrated to @stylistic/lines-around-comment
|
|
36
|
+
'@typescript-eslint/lines-between-class-members': 'off', // Migrated to @stylistic/lines-between-class-members
|
|
49
37
|
'@typescript-eslint/max-params': 'error',
|
|
50
|
-
'@typescript-eslint/member-delimiter-style': '
|
|
38
|
+
'@typescript-eslint/member-delimiter-style': 'off', // Migrated to @stylistic/member-delimiter-style
|
|
51
39
|
'@typescript-eslint/member-ordering': 'error',
|
|
52
40
|
'@typescript-eslint/method-signature-style': 'error',
|
|
53
41
|
'@typescript-eslint/naming-convention': [
|
|
@@ -97,15 +85,8 @@ module.exports = {
|
|
|
97
85
|
'@typescript-eslint/no-empty-interface': 'error',
|
|
98
86
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
99
87
|
'@typescript-eslint/no-extra-non-null-assertion': 'error',
|
|
100
|
-
'@typescript-eslint/no-extra-parens':
|
|
101
|
-
|
|
102
|
-
'all',
|
|
103
|
-
{
|
|
104
|
-
ignoreJSX: 'multi-line',
|
|
105
|
-
nestedBinaryExpressions: false
|
|
106
|
-
}
|
|
107
|
-
],
|
|
108
|
-
'@typescript-eslint/no-extra-semi': 'error',
|
|
88
|
+
'@typescript-eslint/no-extra-parens': 'off', // Migrated to @stylistic/no-extra-parens
|
|
89
|
+
'@typescript-eslint/no-extra-semi': 'off', // Migrated to @stylistic/no-extra-semi
|
|
109
90
|
'@typescript-eslint/no-extraneous-class': 'error',
|
|
110
91
|
'@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
|
|
111
92
|
'@typescript-eslint/no-for-in-array': 'error',
|
|
@@ -152,8 +133,7 @@ module.exports = {
|
|
|
152
133
|
'@typescript-eslint/no-useless-empty-export': 'error',
|
|
153
134
|
'@typescript-eslint/no-var-requires': 'error',
|
|
154
135
|
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
|
|
155
|
-
'@typescript-eslint/
|
|
156
|
-
'@typescript-eslint/padding-line-between-statements': 'error',
|
|
136
|
+
'@typescript-eslint/padding-line-between-statements': 'off', // Migrated to @stylistic/padding-line-between-statements
|
|
157
137
|
'@typescript-eslint/parameter-properties': 'error',
|
|
158
138
|
'@typescript-eslint/prefer-as-const': 'error',
|
|
159
139
|
'@typescript-eslint/prefer-destructuring': 'error',
|
|
@@ -183,32 +163,24 @@ module.exports = {
|
|
|
183
163
|
'@typescript-eslint/restrict-plus-operands': 'error',
|
|
184
164
|
'@typescript-eslint/restrict-template-expressions': 'error',
|
|
185
165
|
'@typescript-eslint/return-await': ['error', 'always'],
|
|
186
|
-
'@typescript-eslint/semi': '
|
|
166
|
+
'@typescript-eslint/semi': 'off', // Migrated to @stylistic/semi
|
|
187
167
|
'@typescript-eslint/sort-type-constituents': 'error',
|
|
188
|
-
'@typescript-eslint/space-before-blocks': '
|
|
189
|
-
'@typescript-eslint/space-before-function-paren':
|
|
190
|
-
'@typescript-eslint/space-infix-ops': '
|
|
168
|
+
'@typescript-eslint/space-before-blocks': 'off', // Migrated to @stylistic/space-before-blocks
|
|
169
|
+
'@typescript-eslint/space-before-function-paren': 'off', // Migrated to @stylistic/space-before-function-paren
|
|
170
|
+
'@typescript-eslint/space-infix-ops': 'off', // Migrated to @stylistic/space-infix-ops
|
|
191
171
|
'@typescript-eslint/strict-boolean-expressions': 'error',
|
|
192
172
|
'@typescript-eslint/switch-exhaustiveness-check': 'error',
|
|
193
173
|
'@typescript-eslint/triple-slash-reference': 'error',
|
|
194
|
-
'@typescript-eslint/type-annotation-spacing': '
|
|
174
|
+
'@typescript-eslint/type-annotation-spacing': 'off', // Migrated to @stylistic/type-annotation-spacing
|
|
195
175
|
'@typescript-eslint/typedef': 'error',
|
|
196
176
|
'@typescript-eslint/unbound-method': 'error',
|
|
197
177
|
'@typescript-eslint/unified-signatures': 'error',
|
|
198
|
-
'block-spacing': 'off',
|
|
199
178
|
camelcase: 'off',
|
|
200
179
|
'class-methods-use-this': 'off',
|
|
201
|
-
'comma-dangle': 'off',
|
|
202
180
|
'dot-notation': 'off',
|
|
203
181
|
'init-declarations': 'off',
|
|
204
|
-
'key-spacing': 'off',
|
|
205
|
-
'keyword-spacing': 'off',
|
|
206
|
-
'lines-around-comment': 'off',
|
|
207
|
-
'lines-between-class-members': 'off',
|
|
208
182
|
'max-params': 'off',
|
|
209
183
|
'no-dupe-class-members': 'off',
|
|
210
|
-
'no-extra-parens': 'off',
|
|
211
|
-
'no-extra-semi': 'off',
|
|
212
184
|
'no-invalid-this': 'off',
|
|
213
185
|
'no-loop-func': 'off',
|
|
214
186
|
'no-loss-of-precision': 'off',
|
|
@@ -217,13 +189,7 @@ module.exports = {
|
|
|
217
189
|
'no-shadow': 'off',
|
|
218
190
|
'no-unused-expressions': 'off',
|
|
219
191
|
'no-use-before-define': 'off',
|
|
220
|
-
'object-curly-spacing': 'off',
|
|
221
|
-
'padding-line-between-statements': 'off',
|
|
222
192
|
'prefer-destructuring': 'off',
|
|
223
|
-
'require-await': 'off'
|
|
224
|
-
semi: 'off',
|
|
225
|
-
'space-before-blocks': 'off',
|
|
226
|
-
'space-before-function-paren': 'off',
|
|
227
|
-
'space-infix-ops': 'off'
|
|
193
|
+
'require-await': 'off'
|
|
228
194
|
}
|
|
229
195
|
};
|