@will-stone/eslint-config 9.1.0 → 10.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/README.md +1 -1
- package/dist/index.cjs +66 -64
- package/dist/index.js +66 -64
- package/package.json +27 -24
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -111,22 +111,22 @@ function base() {
|
|
|
111
111
|
// TODO should this move to prettier config?
|
|
112
112
|
"arrow-body-style": "off",
|
|
113
113
|
"block-scoped-var": "error",
|
|
114
|
-
|
|
114
|
+
camelcase: "error",
|
|
115
115
|
"capitalized-comments": "off",
|
|
116
116
|
"class-methods-use-this": "off",
|
|
117
|
-
|
|
117
|
+
complexity: "off",
|
|
118
118
|
// When on, this rule gets annoying when combined with Unicorn's
|
|
119
119
|
// no-useless-* rules.
|
|
120
120
|
"consistent-return": "off",
|
|
121
121
|
// Not sure if required
|
|
122
122
|
"consistent-this": "error",
|
|
123
123
|
"constructor-super": "error",
|
|
124
|
-
|
|
124
|
+
curly: "off",
|
|
125
125
|
"default-case": "error",
|
|
126
126
|
"default-case-last": "error",
|
|
127
127
|
"default-param-last": "error",
|
|
128
128
|
"dot-notation": "warn",
|
|
129
|
-
|
|
129
|
+
eqeqeq: "warn",
|
|
130
130
|
"for-direction": "error",
|
|
131
131
|
"func-name-matching": "error",
|
|
132
132
|
"func-names": ["error", "as-needed"],
|
|
@@ -142,7 +142,6 @@ function base() {
|
|
|
142
142
|
// trouble than it's worth.
|
|
143
143
|
"id-match": "off",
|
|
144
144
|
"init-declarations": "off",
|
|
145
|
-
"line-comment-position": "error",
|
|
146
145
|
"logical-assignment-operators": ["warn", "always"],
|
|
147
146
|
"max-classes-per-file": "off",
|
|
148
147
|
"max-depth": "off",
|
|
@@ -151,7 +150,6 @@ function base() {
|
|
|
151
150
|
"max-nested-callbacks": "error",
|
|
152
151
|
"max-params": "off",
|
|
153
152
|
"max-statements": "off",
|
|
154
|
-
"multiline-comment-style": "off",
|
|
155
153
|
"new-cap": "error",
|
|
156
154
|
"no-alert": "error",
|
|
157
155
|
"no-array-constructor": "error",
|
|
@@ -221,7 +219,6 @@ function base() {
|
|
|
221
219
|
"no-new": "error",
|
|
222
220
|
"no-new-func": "error",
|
|
223
221
|
"no-new-native-nonconstructor": "error",
|
|
224
|
-
"no-new-symbol": "error",
|
|
225
222
|
"no-new-wrappers": "error",
|
|
226
223
|
"no-nonoctal-decimal-escape": "error",
|
|
227
224
|
"no-obj-calls": "error",
|
|
@@ -279,6 +276,7 @@ function base() {
|
|
|
279
276
|
],
|
|
280
277
|
"no-use-before-define": "error",
|
|
281
278
|
// TODO Do I need this? https://eslint.org/docs/rules/no-useless-backreference
|
|
279
|
+
"no-useless-assignment": "error",
|
|
282
280
|
"no-useless-backreference": "off",
|
|
283
281
|
"no-useless-call": "error",
|
|
284
282
|
"no-useless-catch": "error",
|
|
@@ -311,7 +309,7 @@ function base() {
|
|
|
311
309
|
"prefer-rest-params": "error",
|
|
312
310
|
"prefer-spread": "error",
|
|
313
311
|
"prefer-template": "warn",
|
|
314
|
-
|
|
312
|
+
radix: "error",
|
|
315
313
|
"require-atomic-updates": "error",
|
|
316
314
|
"require-await": "error",
|
|
317
315
|
"require-unicode-regexp": "error",
|
|
@@ -332,13 +330,13 @@ function base() {
|
|
|
332
330
|
"sort-vars": "off",
|
|
333
331
|
// Generally gets in the way as it's difficult to know when this may be
|
|
334
332
|
// required.
|
|
335
|
-
|
|
333
|
+
strict: "off",
|
|
336
334
|
"symbol-description": "error",
|
|
337
335
|
"unicode-bom": ["error", "never"],
|
|
338
336
|
"use-isnan": "error",
|
|
339
337
|
"valid-typeof": ["error", { requireStringLiterals: true }],
|
|
340
338
|
"vars-on-top": "error",
|
|
341
|
-
|
|
339
|
+
yoda: "warn"
|
|
342
340
|
}
|
|
343
341
|
}
|
|
344
342
|
];
|
|
@@ -383,64 +381,67 @@ function ignores() {
|
|
|
383
381
|
}
|
|
384
382
|
|
|
385
383
|
// src/configs/imports.ts
|
|
386
|
-
var
|
|
384
|
+
var _eslintpluginimportx = require('eslint-plugin-import-x'); var pluginImport = _interopRequireWildcard(_eslintpluginimportx);
|
|
387
385
|
var _eslintpluginsimpleimportsort = require('eslint-plugin-simple-import-sort'); var _eslintpluginsimpleimportsort2 = _interopRequireDefault(_eslintpluginsimpleimportsort);
|
|
388
386
|
function imports() {
|
|
389
387
|
return [
|
|
390
388
|
{
|
|
391
389
|
name: "will-stone/imports",
|
|
392
390
|
plugins: {
|
|
393
|
-
"import": pluginImport,
|
|
391
|
+
"import-x": pluginImport,
|
|
394
392
|
"simple-import-sort": _eslintpluginsimpleimportsort2.default
|
|
395
393
|
},
|
|
396
394
|
rules: {
|
|
397
|
-
"import/consistent-type-specifier-style": [
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
"import/
|
|
402
|
-
"import/
|
|
403
|
-
"import/
|
|
395
|
+
"import-x/consistent-type-specifier-style": [
|
|
396
|
+
"warn",
|
|
397
|
+
"prefer-top-level"
|
|
398
|
+
],
|
|
399
|
+
"import-x/export": "error",
|
|
400
|
+
"import-x/exports-last": "off",
|
|
401
|
+
"import-x/group-exports": "off",
|
|
402
|
+
"import-x/newline-after-import": "warn",
|
|
403
|
+
"import-x/no-empty-named-blocks": "warn",
|
|
404
|
+
"import-x/prefer-default-export": "off",
|
|
404
405
|
"simple-import-sort/exports": "warn",
|
|
405
406
|
"simple-import-sort/imports": "warn",
|
|
406
407
|
// The rest of the rules, off until required
|
|
407
|
-
"import/default": "off",
|
|
408
|
-
"import/dynamic-import-chunkname": "off",
|
|
409
|
-
"import/extensions": "off",
|
|
410
|
-
"import/first": "off",
|
|
411
|
-
"import/max-dependencies": "off",
|
|
412
|
-
"import/named": "off",
|
|
413
|
-
"import/namespace": "off",
|
|
414
|
-
"import/no-absolute-path": "off",
|
|
415
|
-
"import/no-amd": "off",
|
|
416
|
-
"import/no-anonymous-default-export": "off",
|
|
417
|
-
"import/no-commonjs": "off",
|
|
418
|
-
"import/no-cycle": "off",
|
|
419
|
-
"import/no-default-export": "off",
|
|
420
|
-
"import/no-deprecated": "off",
|
|
421
|
-
"import/no-duplicates": "off",
|
|
422
|
-
"import/no-dynamic-require": "off",
|
|
423
|
-
"import/no-extraneous-dependencies": "off",
|
|
424
|
-
"import/no-import-module-exports": "off",
|
|
425
|
-
"import/no-internal-modules": "off",
|
|
426
|
-
"import/no-mutable-exports": "off",
|
|
427
|
-
"import/no-named-as-default": "off",
|
|
428
|
-
"import/no-named-as-default-member": "off",
|
|
429
|
-
"import/no-named-default": "off",
|
|
430
|
-
"import/no-named-export": "off",
|
|
431
|
-
"import/no-namespace": "off",
|
|
432
|
-
"import/no-nodejs-modules": "off",
|
|
433
|
-
"import/no-relative-packages": "off",
|
|
434
|
-
"import/no-relative-parent-imports": "off",
|
|
435
|
-
"import/no-restricted-paths": "off",
|
|
436
|
-
"import/no-self-import": "off",
|
|
437
|
-
"import/no-unassigned-import": "off",
|
|
438
|
-
"import/no-unresolved": "off",
|
|
439
|
-
"import/no-unused-modules": "off",
|
|
440
|
-
"import/no-useless-path-segments": "off",
|
|
441
|
-
"import/no-webpack-loader-syntax": "off",
|
|
442
|
-
"import/order": "off",
|
|
443
|
-
"import/unambiguous": "off"
|
|
408
|
+
"import-x/default": "off",
|
|
409
|
+
"import-x/dynamic-import-chunkname": "off",
|
|
410
|
+
"import-x/extensions": "off",
|
|
411
|
+
"import-x/first": "off",
|
|
412
|
+
"import-x/max-dependencies": "off",
|
|
413
|
+
"import-x/named": "off",
|
|
414
|
+
"import-x/namespace": "off",
|
|
415
|
+
"import-x/no-absolute-path": "off",
|
|
416
|
+
"import-x/no-amd": "off",
|
|
417
|
+
"import-x/no-anonymous-default-export": "off",
|
|
418
|
+
"import-x/no-commonjs": "off",
|
|
419
|
+
"import-x/no-cycle": "off",
|
|
420
|
+
"import-x/no-default-export": "off",
|
|
421
|
+
"import-x/no-deprecated": "off",
|
|
422
|
+
"import-x/no-duplicates": "off",
|
|
423
|
+
"import-x/no-dynamic-require": "off",
|
|
424
|
+
"import-x/no-extraneous-dependencies": "off",
|
|
425
|
+
"import-x/no-import-module-exports": "off",
|
|
426
|
+
"import-x/no-internal-modules": "off",
|
|
427
|
+
"import-x/no-mutable-exports": "off",
|
|
428
|
+
"import-x/no-named-as-default": "off",
|
|
429
|
+
"import-x/no-named-as-default-member": "off",
|
|
430
|
+
"import-x/no-named-default": "off",
|
|
431
|
+
"import-x/no-named-export": "off",
|
|
432
|
+
"import-x/no-namespace": "off",
|
|
433
|
+
"import-x/no-nodejs-modules": "off",
|
|
434
|
+
"import-x/no-relative-packages": "off",
|
|
435
|
+
"import-x/no-relative-parent-imports": "off",
|
|
436
|
+
"import-x/no-restricted-paths": "off",
|
|
437
|
+
"import-x/no-self-import": "off",
|
|
438
|
+
"import-x/no-unassigned-import": "off",
|
|
439
|
+
"import-x/no-unresolved": "off",
|
|
440
|
+
"import-x/no-unused-modules": "off",
|
|
441
|
+
"import-x/no-useless-path-segments": "off",
|
|
442
|
+
"import-x/no-webpack-loader-syntax": "off",
|
|
443
|
+
"import-x/order": "off",
|
|
444
|
+
"import-x/unambiguous": "off"
|
|
444
445
|
}
|
|
445
446
|
}
|
|
446
447
|
];
|
|
@@ -612,7 +613,7 @@ function react() {
|
|
|
612
613
|
name: "will-stone/react",
|
|
613
614
|
plugins: {
|
|
614
615
|
"jsx-a11y": _eslintpluginjsxa11y2.default,
|
|
615
|
-
|
|
616
|
+
react: _eslintpluginreact2.default,
|
|
616
617
|
"react-hooks": _eslintpluginreacthooks2.default
|
|
617
618
|
},
|
|
618
619
|
rules: {
|
|
@@ -824,6 +825,7 @@ function react() {
|
|
|
824
825
|
"react/jsx-no-undef": "error",
|
|
825
826
|
"react/jsx-no-useless-fragment": "warn",
|
|
826
827
|
"react/jsx-pascal-case": "error",
|
|
828
|
+
"react/jsx-props-no-spread-multi": "error",
|
|
827
829
|
"react/jsx-props-no-spreading": "off",
|
|
828
830
|
// TODO there's other options in this one that could be useful.
|
|
829
831
|
"react/jsx-sort-props": ["warn", { reservedFirst: true }],
|
|
@@ -956,8 +958,6 @@ function typescript(options) {
|
|
|
956
958
|
"no-func-assign": "off",
|
|
957
959
|
// ts(2539) & ts(2540)
|
|
958
960
|
"no-import-assign": "off",
|
|
959
|
-
// ts(2588)
|
|
960
|
-
"no-new-symbol": "off",
|
|
961
961
|
// ts(2349)
|
|
962
962
|
"no-obj-calls": "off",
|
|
963
963
|
// ts(2408)
|
|
@@ -986,11 +986,10 @@ function typescript(options) {
|
|
|
986
986
|
*/
|
|
987
987
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
988
988
|
"@typescript-eslint/ban-ts-comment": "error",
|
|
989
|
-
"@typescript-eslint/ban-types": "error",
|
|
990
989
|
"@typescript-eslint/explicit-module-boundary-types": "warn",
|
|
991
990
|
"@typescript-eslint/no-array-constructor": "error",
|
|
992
991
|
"@typescript-eslint/no-empty-function": "error",
|
|
993
|
-
"@typescript-eslint/no-empty-
|
|
992
|
+
"@typescript-eslint/no-empty-object-type": "error",
|
|
994
993
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
995
994
|
"@typescript-eslint/no-inferrable-types": "error",
|
|
996
995
|
"@typescript-eslint/no-misused-new": "error",
|
|
@@ -998,7 +997,8 @@ function typescript(options) {
|
|
|
998
997
|
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
|
999
998
|
"@typescript-eslint/no-non-null-assertion": "warn",
|
|
1000
999
|
"@typescript-eslint/no-this-alias": "error",
|
|
1001
|
-
"@typescript-eslint/no-
|
|
1000
|
+
"@typescript-eslint/no-unsafe-function-type": "warn",
|
|
1001
|
+
"@typescript-eslint/no-wrapper-object-types": "error",
|
|
1002
1002
|
"@typescript-eslint/prefer-as-const": "error",
|
|
1003
1003
|
"@typescript-eslint/prefer-namespace-keyword": "error",
|
|
1004
1004
|
"@typescript-eslint/triple-slash-reference": "error",
|
|
@@ -1030,6 +1030,7 @@ function typescript(options) {
|
|
|
1030
1030
|
"@typescript-eslint/no-unnecessary-template-expression": "error",
|
|
1031
1031
|
"@typescript-eslint/no-unnecessary-type-arguments": "off",
|
|
1032
1032
|
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
|
1033
|
+
"@typescript-eslint/no-unnecessary-type-parameters": "error",
|
|
1033
1034
|
"@typescript-eslint/no-unsafe-argument": "off",
|
|
1034
1035
|
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
1035
1036
|
"@typescript-eslint/no-unsafe-call": "off",
|
|
@@ -1070,7 +1071,6 @@ function typescript(options) {
|
|
|
1070
1071
|
"no-duplicate-imports": "off",
|
|
1071
1072
|
"no-invalid-this": "off",
|
|
1072
1073
|
"no-loop-func": "off",
|
|
1073
|
-
"no-loss-of-precision": "off",
|
|
1074
1074
|
"no-redeclare": "off",
|
|
1075
1075
|
"no-restricted-imports": "off",
|
|
1076
1076
|
"no-shadow": "off",
|
|
@@ -1113,13 +1113,14 @@ function typescript(options) {
|
|
|
1113
1113
|
"@typescript-eslint/no-invalid-this": "error",
|
|
1114
1114
|
"@typescript-eslint/no-invalid-void-type": "error",
|
|
1115
1115
|
"@typescript-eslint/no-loop-func": "error",
|
|
1116
|
-
"@typescript-eslint/no-loss-of-precision": ["error"],
|
|
1117
1116
|
"@typescript-eslint/no-magic-numbers": "off",
|
|
1118
1117
|
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
|
1119
1118
|
"@typescript-eslint/no-redeclare": "error",
|
|
1120
1119
|
"@typescript-eslint/no-require-imports": "error",
|
|
1121
1120
|
"@typescript-eslint/no-restricted-imports": "off",
|
|
1121
|
+
"@typescript-eslint/no-restricted-types": "off",
|
|
1122
1122
|
"@typescript-eslint/no-shadow": ["error"],
|
|
1123
|
+
"@typescript-eslint/no-unnecessary-parameter-property-assignment": "error",
|
|
1123
1124
|
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
|
|
1124
1125
|
"@typescript-eslint/no-unsafe-declaration-merging": "error",
|
|
1125
1126
|
"@typescript-eslint/no-unused-expressions": ["error"],
|
|
@@ -1208,6 +1209,7 @@ function unicorn() {
|
|
|
1208
1209
|
disallowedPrefixes: ["new"]
|
|
1209
1210
|
}
|
|
1210
1211
|
],
|
|
1212
|
+
"unicorn/no-length-as-slice-end": "warn",
|
|
1211
1213
|
"unicorn/no-lonely-if": "warn",
|
|
1212
1214
|
"unicorn/no-magic-array-flat-depth": "error",
|
|
1213
1215
|
"unicorn/no-negated-condition": "warn",
|
package/dist/index.js
CHANGED
|
@@ -111,22 +111,22 @@ function base() {
|
|
|
111
111
|
// TODO should this move to prettier config?
|
|
112
112
|
"arrow-body-style": "off",
|
|
113
113
|
"block-scoped-var": "error",
|
|
114
|
-
|
|
114
|
+
camelcase: "error",
|
|
115
115
|
"capitalized-comments": "off",
|
|
116
116
|
"class-methods-use-this": "off",
|
|
117
|
-
|
|
117
|
+
complexity: "off",
|
|
118
118
|
// When on, this rule gets annoying when combined with Unicorn's
|
|
119
119
|
// no-useless-* rules.
|
|
120
120
|
"consistent-return": "off",
|
|
121
121
|
// Not sure if required
|
|
122
122
|
"consistent-this": "error",
|
|
123
123
|
"constructor-super": "error",
|
|
124
|
-
|
|
124
|
+
curly: "off",
|
|
125
125
|
"default-case": "error",
|
|
126
126
|
"default-case-last": "error",
|
|
127
127
|
"default-param-last": "error",
|
|
128
128
|
"dot-notation": "warn",
|
|
129
|
-
|
|
129
|
+
eqeqeq: "warn",
|
|
130
130
|
"for-direction": "error",
|
|
131
131
|
"func-name-matching": "error",
|
|
132
132
|
"func-names": ["error", "as-needed"],
|
|
@@ -142,7 +142,6 @@ function base() {
|
|
|
142
142
|
// trouble than it's worth.
|
|
143
143
|
"id-match": "off",
|
|
144
144
|
"init-declarations": "off",
|
|
145
|
-
"line-comment-position": "error",
|
|
146
145
|
"logical-assignment-operators": ["warn", "always"],
|
|
147
146
|
"max-classes-per-file": "off",
|
|
148
147
|
"max-depth": "off",
|
|
@@ -151,7 +150,6 @@ function base() {
|
|
|
151
150
|
"max-nested-callbacks": "error",
|
|
152
151
|
"max-params": "off",
|
|
153
152
|
"max-statements": "off",
|
|
154
|
-
"multiline-comment-style": "off",
|
|
155
153
|
"new-cap": "error",
|
|
156
154
|
"no-alert": "error",
|
|
157
155
|
"no-array-constructor": "error",
|
|
@@ -221,7 +219,6 @@ function base() {
|
|
|
221
219
|
"no-new": "error",
|
|
222
220
|
"no-new-func": "error",
|
|
223
221
|
"no-new-native-nonconstructor": "error",
|
|
224
|
-
"no-new-symbol": "error",
|
|
225
222
|
"no-new-wrappers": "error",
|
|
226
223
|
"no-nonoctal-decimal-escape": "error",
|
|
227
224
|
"no-obj-calls": "error",
|
|
@@ -279,6 +276,7 @@ function base() {
|
|
|
279
276
|
],
|
|
280
277
|
"no-use-before-define": "error",
|
|
281
278
|
// TODO Do I need this? https://eslint.org/docs/rules/no-useless-backreference
|
|
279
|
+
"no-useless-assignment": "error",
|
|
282
280
|
"no-useless-backreference": "off",
|
|
283
281
|
"no-useless-call": "error",
|
|
284
282
|
"no-useless-catch": "error",
|
|
@@ -311,7 +309,7 @@ function base() {
|
|
|
311
309
|
"prefer-rest-params": "error",
|
|
312
310
|
"prefer-spread": "error",
|
|
313
311
|
"prefer-template": "warn",
|
|
314
|
-
|
|
312
|
+
radix: "error",
|
|
315
313
|
"require-atomic-updates": "error",
|
|
316
314
|
"require-await": "error",
|
|
317
315
|
"require-unicode-regexp": "error",
|
|
@@ -332,13 +330,13 @@ function base() {
|
|
|
332
330
|
"sort-vars": "off",
|
|
333
331
|
// Generally gets in the way as it's difficult to know when this may be
|
|
334
332
|
// required.
|
|
335
|
-
|
|
333
|
+
strict: "off",
|
|
336
334
|
"symbol-description": "error",
|
|
337
335
|
"unicode-bom": ["error", "never"],
|
|
338
336
|
"use-isnan": "error",
|
|
339
337
|
"valid-typeof": ["error", { requireStringLiterals: true }],
|
|
340
338
|
"vars-on-top": "error",
|
|
341
|
-
|
|
339
|
+
yoda: "warn"
|
|
342
340
|
}
|
|
343
341
|
}
|
|
344
342
|
];
|
|
@@ -383,64 +381,67 @@ function ignores() {
|
|
|
383
381
|
}
|
|
384
382
|
|
|
385
383
|
// src/configs/imports.ts
|
|
386
|
-
import * as pluginImport from "eslint-plugin-
|
|
384
|
+
import * as pluginImport from "eslint-plugin-import-x";
|
|
387
385
|
import pluginSimpleImport from "eslint-plugin-simple-import-sort";
|
|
388
386
|
function imports() {
|
|
389
387
|
return [
|
|
390
388
|
{
|
|
391
389
|
name: "will-stone/imports",
|
|
392
390
|
plugins: {
|
|
393
|
-
"import": pluginImport,
|
|
391
|
+
"import-x": pluginImport,
|
|
394
392
|
"simple-import-sort": pluginSimpleImport
|
|
395
393
|
},
|
|
396
394
|
rules: {
|
|
397
|
-
"import/consistent-type-specifier-style": [
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
"import/
|
|
402
|
-
"import/
|
|
403
|
-
"import/
|
|
395
|
+
"import-x/consistent-type-specifier-style": [
|
|
396
|
+
"warn",
|
|
397
|
+
"prefer-top-level"
|
|
398
|
+
],
|
|
399
|
+
"import-x/export": "error",
|
|
400
|
+
"import-x/exports-last": "off",
|
|
401
|
+
"import-x/group-exports": "off",
|
|
402
|
+
"import-x/newline-after-import": "warn",
|
|
403
|
+
"import-x/no-empty-named-blocks": "warn",
|
|
404
|
+
"import-x/prefer-default-export": "off",
|
|
404
405
|
"simple-import-sort/exports": "warn",
|
|
405
406
|
"simple-import-sort/imports": "warn",
|
|
406
407
|
// The rest of the rules, off until required
|
|
407
|
-
"import/default": "off",
|
|
408
|
-
"import/dynamic-import-chunkname": "off",
|
|
409
|
-
"import/extensions": "off",
|
|
410
|
-
"import/first": "off",
|
|
411
|
-
"import/max-dependencies": "off",
|
|
412
|
-
"import/named": "off",
|
|
413
|
-
"import/namespace": "off",
|
|
414
|
-
"import/no-absolute-path": "off",
|
|
415
|
-
"import/no-amd": "off",
|
|
416
|
-
"import/no-anonymous-default-export": "off",
|
|
417
|
-
"import/no-commonjs": "off",
|
|
418
|
-
"import/no-cycle": "off",
|
|
419
|
-
"import/no-default-export": "off",
|
|
420
|
-
"import/no-deprecated": "off",
|
|
421
|
-
"import/no-duplicates": "off",
|
|
422
|
-
"import/no-dynamic-require": "off",
|
|
423
|
-
"import/no-extraneous-dependencies": "off",
|
|
424
|
-
"import/no-import-module-exports": "off",
|
|
425
|
-
"import/no-internal-modules": "off",
|
|
426
|
-
"import/no-mutable-exports": "off",
|
|
427
|
-
"import/no-named-as-default": "off",
|
|
428
|
-
"import/no-named-as-default-member": "off",
|
|
429
|
-
"import/no-named-default": "off",
|
|
430
|
-
"import/no-named-export": "off",
|
|
431
|
-
"import/no-namespace": "off",
|
|
432
|
-
"import/no-nodejs-modules": "off",
|
|
433
|
-
"import/no-relative-packages": "off",
|
|
434
|
-
"import/no-relative-parent-imports": "off",
|
|
435
|
-
"import/no-restricted-paths": "off",
|
|
436
|
-
"import/no-self-import": "off",
|
|
437
|
-
"import/no-unassigned-import": "off",
|
|
438
|
-
"import/no-unresolved": "off",
|
|
439
|
-
"import/no-unused-modules": "off",
|
|
440
|
-
"import/no-useless-path-segments": "off",
|
|
441
|
-
"import/no-webpack-loader-syntax": "off",
|
|
442
|
-
"import/order": "off",
|
|
443
|
-
"import/unambiguous": "off"
|
|
408
|
+
"import-x/default": "off",
|
|
409
|
+
"import-x/dynamic-import-chunkname": "off",
|
|
410
|
+
"import-x/extensions": "off",
|
|
411
|
+
"import-x/first": "off",
|
|
412
|
+
"import-x/max-dependencies": "off",
|
|
413
|
+
"import-x/named": "off",
|
|
414
|
+
"import-x/namespace": "off",
|
|
415
|
+
"import-x/no-absolute-path": "off",
|
|
416
|
+
"import-x/no-amd": "off",
|
|
417
|
+
"import-x/no-anonymous-default-export": "off",
|
|
418
|
+
"import-x/no-commonjs": "off",
|
|
419
|
+
"import-x/no-cycle": "off",
|
|
420
|
+
"import-x/no-default-export": "off",
|
|
421
|
+
"import-x/no-deprecated": "off",
|
|
422
|
+
"import-x/no-duplicates": "off",
|
|
423
|
+
"import-x/no-dynamic-require": "off",
|
|
424
|
+
"import-x/no-extraneous-dependencies": "off",
|
|
425
|
+
"import-x/no-import-module-exports": "off",
|
|
426
|
+
"import-x/no-internal-modules": "off",
|
|
427
|
+
"import-x/no-mutable-exports": "off",
|
|
428
|
+
"import-x/no-named-as-default": "off",
|
|
429
|
+
"import-x/no-named-as-default-member": "off",
|
|
430
|
+
"import-x/no-named-default": "off",
|
|
431
|
+
"import-x/no-named-export": "off",
|
|
432
|
+
"import-x/no-namespace": "off",
|
|
433
|
+
"import-x/no-nodejs-modules": "off",
|
|
434
|
+
"import-x/no-relative-packages": "off",
|
|
435
|
+
"import-x/no-relative-parent-imports": "off",
|
|
436
|
+
"import-x/no-restricted-paths": "off",
|
|
437
|
+
"import-x/no-self-import": "off",
|
|
438
|
+
"import-x/no-unassigned-import": "off",
|
|
439
|
+
"import-x/no-unresolved": "off",
|
|
440
|
+
"import-x/no-unused-modules": "off",
|
|
441
|
+
"import-x/no-useless-path-segments": "off",
|
|
442
|
+
"import-x/no-webpack-loader-syntax": "off",
|
|
443
|
+
"import-x/order": "off",
|
|
444
|
+
"import-x/unambiguous": "off"
|
|
444
445
|
}
|
|
445
446
|
}
|
|
446
447
|
];
|
|
@@ -612,7 +613,7 @@ function react() {
|
|
|
612
613
|
name: "will-stone/react",
|
|
613
614
|
plugins: {
|
|
614
615
|
"jsx-a11y": pluginJsxA11y,
|
|
615
|
-
|
|
616
|
+
react: pluginReact,
|
|
616
617
|
"react-hooks": pluginReactHooks
|
|
617
618
|
},
|
|
618
619
|
rules: {
|
|
@@ -824,6 +825,7 @@ function react() {
|
|
|
824
825
|
"react/jsx-no-undef": "error",
|
|
825
826
|
"react/jsx-no-useless-fragment": "warn",
|
|
826
827
|
"react/jsx-pascal-case": "error",
|
|
828
|
+
"react/jsx-props-no-spread-multi": "error",
|
|
827
829
|
"react/jsx-props-no-spreading": "off",
|
|
828
830
|
// TODO there's other options in this one that could be useful.
|
|
829
831
|
"react/jsx-sort-props": ["warn", { reservedFirst: true }],
|
|
@@ -956,8 +958,6 @@ function typescript(options) {
|
|
|
956
958
|
"no-func-assign": "off",
|
|
957
959
|
// ts(2539) & ts(2540)
|
|
958
960
|
"no-import-assign": "off",
|
|
959
|
-
// ts(2588)
|
|
960
|
-
"no-new-symbol": "off",
|
|
961
961
|
// ts(2349)
|
|
962
962
|
"no-obj-calls": "off",
|
|
963
963
|
// ts(2408)
|
|
@@ -986,11 +986,10 @@ function typescript(options) {
|
|
|
986
986
|
*/
|
|
987
987
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
988
988
|
"@typescript-eslint/ban-ts-comment": "error",
|
|
989
|
-
"@typescript-eslint/ban-types": "error",
|
|
990
989
|
"@typescript-eslint/explicit-module-boundary-types": "warn",
|
|
991
990
|
"@typescript-eslint/no-array-constructor": "error",
|
|
992
991
|
"@typescript-eslint/no-empty-function": "error",
|
|
993
|
-
"@typescript-eslint/no-empty-
|
|
992
|
+
"@typescript-eslint/no-empty-object-type": "error",
|
|
994
993
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
995
994
|
"@typescript-eslint/no-inferrable-types": "error",
|
|
996
995
|
"@typescript-eslint/no-misused-new": "error",
|
|
@@ -998,7 +997,8 @@ function typescript(options) {
|
|
|
998
997
|
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
|
999
998
|
"@typescript-eslint/no-non-null-assertion": "warn",
|
|
1000
999
|
"@typescript-eslint/no-this-alias": "error",
|
|
1001
|
-
"@typescript-eslint/no-
|
|
1000
|
+
"@typescript-eslint/no-unsafe-function-type": "warn",
|
|
1001
|
+
"@typescript-eslint/no-wrapper-object-types": "error",
|
|
1002
1002
|
"@typescript-eslint/prefer-as-const": "error",
|
|
1003
1003
|
"@typescript-eslint/prefer-namespace-keyword": "error",
|
|
1004
1004
|
"@typescript-eslint/triple-slash-reference": "error",
|
|
@@ -1030,6 +1030,7 @@ function typescript(options) {
|
|
|
1030
1030
|
"@typescript-eslint/no-unnecessary-template-expression": "error",
|
|
1031
1031
|
"@typescript-eslint/no-unnecessary-type-arguments": "off",
|
|
1032
1032
|
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
|
1033
|
+
"@typescript-eslint/no-unnecessary-type-parameters": "error",
|
|
1033
1034
|
"@typescript-eslint/no-unsafe-argument": "off",
|
|
1034
1035
|
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
1035
1036
|
"@typescript-eslint/no-unsafe-call": "off",
|
|
@@ -1070,7 +1071,6 @@ function typescript(options) {
|
|
|
1070
1071
|
"no-duplicate-imports": "off",
|
|
1071
1072
|
"no-invalid-this": "off",
|
|
1072
1073
|
"no-loop-func": "off",
|
|
1073
|
-
"no-loss-of-precision": "off",
|
|
1074
1074
|
"no-redeclare": "off",
|
|
1075
1075
|
"no-restricted-imports": "off",
|
|
1076
1076
|
"no-shadow": "off",
|
|
@@ -1113,13 +1113,14 @@ function typescript(options) {
|
|
|
1113
1113
|
"@typescript-eslint/no-invalid-this": "error",
|
|
1114
1114
|
"@typescript-eslint/no-invalid-void-type": "error",
|
|
1115
1115
|
"@typescript-eslint/no-loop-func": "error",
|
|
1116
|
-
"@typescript-eslint/no-loss-of-precision": ["error"],
|
|
1117
1116
|
"@typescript-eslint/no-magic-numbers": "off",
|
|
1118
1117
|
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
|
1119
1118
|
"@typescript-eslint/no-redeclare": "error",
|
|
1120
1119
|
"@typescript-eslint/no-require-imports": "error",
|
|
1121
1120
|
"@typescript-eslint/no-restricted-imports": "off",
|
|
1121
|
+
"@typescript-eslint/no-restricted-types": "off",
|
|
1122
1122
|
"@typescript-eslint/no-shadow": ["error"],
|
|
1123
|
+
"@typescript-eslint/no-unnecessary-parameter-property-assignment": "error",
|
|
1123
1124
|
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
|
|
1124
1125
|
"@typescript-eslint/no-unsafe-declaration-merging": "error",
|
|
1125
1126
|
"@typescript-eslint/no-unused-expressions": ["error"],
|
|
@@ -1208,6 +1209,7 @@ function unicorn() {
|
|
|
1208
1209
|
disallowedPrefixes: ["new"]
|
|
1209
1210
|
}
|
|
1210
1211
|
],
|
|
1212
|
+
"unicorn/no-length-as-slice-end": "warn",
|
|
1211
1213
|
"unicorn/no-lonely-if": "warn",
|
|
1212
1214
|
"unicorn/no-magic-array-flat-depth": "error",
|
|
1213
1215
|
"unicorn/no-negated-condition": "warn",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@will-stone/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "Will Stone's ESLint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config"
|
|
@@ -44,43 +44,46 @@
|
|
|
44
44
|
},
|
|
45
45
|
"prettier": "@will-stone/prettier-config",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
48
|
-
"@typescript-eslint/parser": "^
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
48
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
49
49
|
"astro-eslint-parser": "^1.0.2",
|
|
50
50
|
"confusing-browser-globals": "^1.0.11",
|
|
51
|
-
"eslint-config-flat-gitignore": "^0.1.
|
|
52
|
-
"eslint-plugin-astro": "^1.2.
|
|
53
|
-
"eslint-plugin-
|
|
51
|
+
"eslint-config-flat-gitignore": "^0.1.8",
|
|
52
|
+
"eslint-plugin-astro": "^1.2.3",
|
|
53
|
+
"eslint-plugin-import-x": "^3.1.0",
|
|
54
54
|
"eslint-plugin-jest": "^28.6.0",
|
|
55
55
|
"eslint-plugin-jsx-a11y": "^6.9.0",
|
|
56
|
-
"eslint-plugin-n": "^17.
|
|
57
|
-
"eslint-plugin-react": "^7.
|
|
56
|
+
"eslint-plugin-n": "^17.10.1",
|
|
57
|
+
"eslint-plugin-react": "^7.35.0",
|
|
58
58
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
59
|
-
"eslint-plugin-simple-import-sort": "^12.1.
|
|
59
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
60
60
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
61
|
-
"eslint-plugin-unicorn": "^
|
|
62
|
-
"glob": "^
|
|
63
|
-
"globals": "^15.
|
|
64
|
-
"globby": "^14.0.1",
|
|
65
|
-
"load-json-file": "^7.0.1"
|
|
61
|
+
"eslint-plugin-unicorn": "^55.0.0",
|
|
62
|
+
"glob": "^11.0.0",
|
|
63
|
+
"globals": "^15.8.0"
|
|
66
64
|
},
|
|
67
65
|
"devDependencies": {
|
|
68
66
|
"@commits-with-character/conventional-changelog-preset": "^0.2.2",
|
|
69
|
-
"@eslint/config-inspector": "^0.5.
|
|
67
|
+
"@eslint/config-inspector": "^0.5.2",
|
|
70
68
|
"@release-it/conventional-changelog": "^8.0.1",
|
|
71
69
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
72
|
-
"@types/eslint": "^
|
|
73
|
-
"@types/node": "^
|
|
70
|
+
"@types/eslint": "^9.6.0",
|
|
71
|
+
"@types/node": "^22.0.1",
|
|
74
72
|
"@will-stone/prettier-config": "^8.0.1",
|
|
75
|
-
"husky": "^9.
|
|
73
|
+
"husky": "^9.1.4",
|
|
76
74
|
"lint-staged": "^15.2.7",
|
|
77
|
-
"prettier": "^3.3.
|
|
78
|
-
"release-it": "^17.
|
|
79
|
-
"tsup": "^8.
|
|
80
|
-
"type-fest": "^4.
|
|
81
|
-
"typescript": "^5.5.
|
|
75
|
+
"prettier": "^3.3.3",
|
|
76
|
+
"release-it": "^17.6.0",
|
|
77
|
+
"tsup": "^8.2.3",
|
|
78
|
+
"type-fest": "^4.23.0",
|
|
79
|
+
"typescript": "^5.5.4"
|
|
82
80
|
},
|
|
83
81
|
"peerDependencies": {
|
|
84
|
-
"eslint": ">=8.
|
|
82
|
+
"eslint": ">=9.8.0"
|
|
83
|
+
},
|
|
84
|
+
"overrides": {
|
|
85
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
86
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
87
|
+
"eslint": ">=9.8.0"
|
|
85
88
|
}
|
|
86
89
|
}
|