@allthings/eslint-config 3.3.0 → 3.4.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/index.js +9 -24
- package/node.js +6 -24
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -64,19 +64,6 @@ export default [
|
|
|
64
64
|
'typescript-sort-keys/string-enum': 'error',
|
|
65
65
|
// react-hooks override (recommended-latest has exhaustive-deps as 'warn')
|
|
66
66
|
'react-hooks/exhaustive-deps': 'error',
|
|
67
|
-
'@stylistic/member-delimiter-style': [
|
|
68
|
-
'error',
|
|
69
|
-
{
|
|
70
|
-
multiline: {
|
|
71
|
-
delimiter: 'none',
|
|
72
|
-
requireLast: true,
|
|
73
|
-
},
|
|
74
|
-
singleline: {
|
|
75
|
-
delimiter: 'semi',
|
|
76
|
-
requireLast: false,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
67
|
'@stylistic/padding-line-between-statements': [
|
|
81
68
|
'error',
|
|
82
69
|
{
|
|
@@ -85,14 +72,6 @@ export default [
|
|
|
85
72
|
next: 'return',
|
|
86
73
|
},
|
|
87
74
|
],
|
|
88
|
-
'@stylistic/quotes': [
|
|
89
|
-
'error',
|
|
90
|
-
'single',
|
|
91
|
-
{
|
|
92
|
-
avoidEscape: true,
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
'@stylistic/semi': ['error', 'never'],
|
|
96
75
|
'@stylistic/spaced-comment': [
|
|
97
76
|
'error',
|
|
98
77
|
'always',
|
|
@@ -100,7 +79,6 @@ export default [
|
|
|
100
79
|
markers: ['/'],
|
|
101
80
|
},
|
|
102
81
|
],
|
|
103
|
-
'@stylistic/type-annotation-spacing': 'error',
|
|
104
82
|
'@typescript-eslint/adjacent-overload-signatures': 'error',
|
|
105
83
|
'@typescript-eslint/array-type': [
|
|
106
84
|
'error',
|
|
@@ -256,7 +234,6 @@ export default [
|
|
|
256
234
|
'prefer-const': 'error',
|
|
257
235
|
'prefer-object-spread': 'error',
|
|
258
236
|
'prefer-template': 'error',
|
|
259
|
-
quotes: ['error', 'single', { avoidEscape: true }],
|
|
260
237
|
radix: 'error',
|
|
261
238
|
'react/jsx-curly-brace-presence': [
|
|
262
239
|
'error',
|
|
@@ -294,21 +271,26 @@ export default [
|
|
|
294
271
|
'unicorn/import-style': 'warn',
|
|
295
272
|
'unicorn/no-anonymous-default-export': 'off',
|
|
296
273
|
'unicorn/no-array-reduce': 'off',
|
|
274
|
+
// .reverse() mutates in place — semantic + perf cost to force .toReversed()
|
|
275
|
+
'unicorn/no-array-reverse': 'off',
|
|
276
|
+
// .sort() mutates in place — same story as no-array-reverse
|
|
277
|
+
'unicorn/no-array-sort': 'off',
|
|
297
278
|
'unicorn/no-await-expression-member': 'warn',
|
|
298
279
|
'unicorn/no-console-spaces': 'off',
|
|
299
280
|
'unicorn/no-document-cookie': 'warn',
|
|
300
281
|
'unicorn/no-empty-file': 'off',
|
|
301
282
|
'unicorn/no-hex-escape': 'warn',
|
|
302
283
|
'unicorn/no-invalid-remove-event-listener': 'warn',
|
|
284
|
+
'unicorn/no-named-default': 'warn',
|
|
303
285
|
'unicorn/no-nested-ternary': 'off',
|
|
304
286
|
// because we have a lot of logic depends on null
|
|
305
287
|
'unicorn/no-null': 'warn',
|
|
306
288
|
'unicorn/no-object-as-default-parameter': 'warn',
|
|
307
289
|
'unicorn/no-single-promise-in-promise-methods': 'warn',
|
|
308
290
|
'unicorn/no-unreadable-array-destructuring': 'off',
|
|
309
|
-
'unicorn/no-unsafe-regex': 'off',
|
|
310
291
|
'unicorn/no-unused-properties': 'warn',
|
|
311
292
|
'unicorn/no-zero-fractions': 'off',
|
|
293
|
+
'unicorn/prefer-class-fields': 'warn',
|
|
312
294
|
'unicorn/prefer-export-from': 'off',
|
|
313
295
|
'unicorn/prefer-global-this': 'warn',
|
|
314
296
|
'unicorn/prefer-includes': 'off',
|
|
@@ -321,6 +303,8 @@ export default [
|
|
|
321
303
|
'unicorn/prefer-regexp-test': 'off',
|
|
322
304
|
'unicorn/prefer-set-has': 'off',
|
|
323
305
|
'unicorn/prefer-set-size': 'off',
|
|
306
|
+
// opinionated condition ordering — too noisy
|
|
307
|
+
'unicorn/prefer-simple-condition-first': 'off',
|
|
324
308
|
'unicorn/prefer-string-raw': 'off',
|
|
325
309
|
'unicorn/prefer-string-replace-all': 'off',
|
|
326
310
|
'unicorn/prefer-structured-clone': 'warn',
|
|
@@ -342,6 +326,7 @@ export default [
|
|
|
342
326
|
},
|
|
343
327
|
],
|
|
344
328
|
'unicorn/relative-url-style': 'off',
|
|
329
|
+
'unicorn/require-module-attributes': 'warn',
|
|
345
330
|
'unicorn/switch-case-braces': 'off',
|
|
346
331
|
'unicorn/template-indent': 'off',
|
|
347
332
|
'use-isnan': 'error',
|
package/node.js
CHANGED
|
@@ -50,19 +50,6 @@ export default [
|
|
|
50
50
|
// typescript-sort-keys (no native flat config)
|
|
51
51
|
'typescript-sort-keys/interface': 'error',
|
|
52
52
|
'typescript-sort-keys/string-enum': 'error',
|
|
53
|
-
'@stylistic/member-delimiter-style': [
|
|
54
|
-
'error',
|
|
55
|
-
{
|
|
56
|
-
multiline: {
|
|
57
|
-
delimiter: 'none',
|
|
58
|
-
requireLast: true,
|
|
59
|
-
},
|
|
60
|
-
singleline: {
|
|
61
|
-
delimiter: 'semi',
|
|
62
|
-
requireLast: false,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
53
|
'@stylistic/padding-line-between-statements': [
|
|
67
54
|
'error',
|
|
68
55
|
{
|
|
@@ -71,14 +58,6 @@ export default [
|
|
|
71
58
|
next: 'return',
|
|
72
59
|
},
|
|
73
60
|
],
|
|
74
|
-
'@stylistic/quotes': [
|
|
75
|
-
'error',
|
|
76
|
-
'single',
|
|
77
|
-
{
|
|
78
|
-
avoidEscape: true,
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
'@stylistic/semi': ['error', 'never'],
|
|
82
61
|
'@stylistic/spaced-comment': [
|
|
83
62
|
'error',
|
|
84
63
|
'always',
|
|
@@ -86,7 +65,6 @@ export default [
|
|
|
86
65
|
markers: ['/'],
|
|
87
66
|
},
|
|
88
67
|
],
|
|
89
|
-
'@stylistic/type-annotation-spacing': 'error',
|
|
90
68
|
'@typescript-eslint/adjacent-overload-signatures': 'error',
|
|
91
69
|
'@typescript-eslint/array-type': [
|
|
92
70
|
'error',
|
|
@@ -239,7 +217,6 @@ export default [
|
|
|
239
217
|
'prefer-const': 'error',
|
|
240
218
|
'prefer-object-spread': 'error',
|
|
241
219
|
'prefer-template': 'error',
|
|
242
|
-
quotes: ['error', 'single', { avoidEscape: true }],
|
|
243
220
|
radix: 'error',
|
|
244
221
|
'simple-import-sort/exports': 'error',
|
|
245
222
|
'simple-import-sort/imports': 'error',
|
|
@@ -259,21 +236,24 @@ export default [
|
|
|
259
236
|
'unicorn/import-style': 'warn',
|
|
260
237
|
'unicorn/no-anonymous-default-export': 'off',
|
|
261
238
|
'unicorn/no-array-reduce': 'off',
|
|
239
|
+
'unicorn/no-array-reverse': 'off',
|
|
240
|
+
'unicorn/no-array-sort': 'off',
|
|
262
241
|
'unicorn/no-await-expression-member': 'warn',
|
|
263
242
|
'unicorn/no-console-spaces': 'off',
|
|
264
243
|
'unicorn/no-document-cookie': 'warn',
|
|
265
244
|
'unicorn/no-empty-file': 'off',
|
|
266
245
|
'unicorn/no-hex-escape': 'warn',
|
|
267
246
|
'unicorn/no-invalid-remove-event-listener': 'warn',
|
|
247
|
+
'unicorn/no-named-default': 'warn',
|
|
268
248
|
'unicorn/no-nested-ternary': 'off',
|
|
269
249
|
// because we have a lot of logic depends on null
|
|
270
250
|
'unicorn/no-null': 'warn',
|
|
271
251
|
'unicorn/no-object-as-default-parameter': 'warn',
|
|
272
252
|
'unicorn/no-single-promise-in-promise-methods': 'warn',
|
|
273
253
|
'unicorn/no-unreadable-array-destructuring': 'off',
|
|
274
|
-
'unicorn/no-unsafe-regex': 'off',
|
|
275
254
|
'unicorn/no-unused-properties': 'warn',
|
|
276
255
|
'unicorn/no-zero-fractions': 'off',
|
|
256
|
+
'unicorn/prefer-class-fields': 'warn',
|
|
277
257
|
'unicorn/prefer-export-from': 'off',
|
|
278
258
|
'unicorn/prefer-global-this': 'warn',
|
|
279
259
|
'unicorn/prefer-includes': 'off',
|
|
@@ -286,6 +266,7 @@ export default [
|
|
|
286
266
|
'unicorn/prefer-regexp-test': 'off',
|
|
287
267
|
'unicorn/prefer-set-has': 'off',
|
|
288
268
|
'unicorn/prefer-set-size': 'off',
|
|
269
|
+
'unicorn/prefer-simple-condition-first': 'off',
|
|
289
270
|
'unicorn/prefer-string-raw': 'off',
|
|
290
271
|
'unicorn/prefer-string-replace-all': 'off',
|
|
291
272
|
'unicorn/prefer-structured-clone': 'warn',
|
|
@@ -307,6 +288,7 @@ export default [
|
|
|
307
288
|
},
|
|
308
289
|
],
|
|
309
290
|
'unicorn/relative-url-style': 'off',
|
|
291
|
+
'unicorn/require-module-attributes': 'warn',
|
|
310
292
|
'unicorn/switch-case-braces': 'off',
|
|
311
293
|
'unicorn/template-indent': 'off',
|
|
312
294
|
'use-isnan': 'error',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allthings/eslint-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ESlint shareable config for Allthings style",
|
|
6
6
|
"main": "index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"deps": "yarn upgrade-interactive"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@stylistic/eslint-plugin": "^
|
|
32
|
+
"@stylistic/eslint-plugin": "^5.0.0",
|
|
33
33
|
"@typescript-eslint/eslint-plugin": "^8.48.0",
|
|
34
34
|
"@typescript-eslint/parser": "^8.48.0",
|
|
35
35
|
"@vitest/eslint-plugin": "^1.6.17",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"eslint-import-resolver-node": "^0.4.0",
|
|
38
38
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
39
39
|
"eslint-plugin-import": "^2.32.0",
|
|
40
|
-
"eslint-plugin-jest": "^
|
|
40
|
+
"eslint-plugin-jest": "^29.0.0",
|
|
41
41
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
42
42
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
43
43
|
"eslint-plugin-prettier": "^5.5.4",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
46
46
|
"eslint-plugin-simple-import-sort": "^13.0.0",
|
|
47
47
|
"eslint-plugin-typescript-sort-keys": "^3.3.0",
|
|
48
|
-
"eslint-plugin-unicorn": "^
|
|
48
|
+
"eslint-plugin-unicorn": "^64.0.0",
|
|
49
49
|
"globals": "^17.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|