@will-stone/eslint-config 20.0.0 → 20.1.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/dist/index.js +166 -45
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -527,7 +527,6 @@ function packageJson() {
|
|
|
527
527
|
"package-json/restrict-dependency-ranges": "error",
|
|
528
528
|
"package-json/sort-collections": "warn",
|
|
529
529
|
"package-json/unique-dependencies": "error",
|
|
530
|
-
"package-json/valid-local-dependency": "error",
|
|
531
530
|
"package-json/valid-name": "error",
|
|
532
531
|
"package-json/valid-package-definition": "error",
|
|
533
532
|
"package-json/valid-repository-directory": "error",
|
|
@@ -538,21 +537,49 @@ function packageJson() {
|
|
|
538
537
|
|
|
539
538
|
//#endregion
|
|
540
539
|
//#region src/configs/perfectionist.ts
|
|
540
|
+
const sortOrder = [{
|
|
541
|
+
customGroups: {
|
|
542
|
+
type: "^type$",
|
|
543
|
+
payload: "^payload$",
|
|
544
|
+
error: "^error$",
|
|
545
|
+
meta: "^meta$"
|
|
546
|
+
},
|
|
547
|
+
groups: [
|
|
548
|
+
"type",
|
|
549
|
+
"payload",
|
|
550
|
+
"error",
|
|
551
|
+
"meta"
|
|
552
|
+
],
|
|
553
|
+
useConfigurationIf: { allNamesMatchPattern: "^type|payload|meta|error$" }
|
|
554
|
+
}, {
|
|
555
|
+
partitionByNewLine: true,
|
|
556
|
+
type: "natural"
|
|
557
|
+
}];
|
|
541
558
|
function perfectionist() {
|
|
542
559
|
return [{
|
|
543
560
|
name: "will-stone/perfectionist",
|
|
544
561
|
plugins: { perfectionist: pluginPerfectionist },
|
|
545
562
|
rules: {
|
|
546
|
-
"perfectionist/sort-
|
|
563
|
+
"perfectionist/sort-array-includes": "off",
|
|
564
|
+
"perfectionist/sort-classes": "off",
|
|
565
|
+
"perfectionist/sort-decorators": "off",
|
|
566
|
+
"perfectionist/sort-enums": "off",
|
|
567
|
+
"perfectionist/sort-exports": "off",
|
|
568
|
+
"perfectionist/sort-heritage-clauses": "off",
|
|
569
|
+
"perfectionist/sort-imports": ["warn", { type: "natural" }],
|
|
570
|
+
"perfectionist/sort-interfaces": "off",
|
|
571
|
+
"perfectionist/sort-intersection-types": "off",
|
|
572
|
+
"perfectionist/sort-jsx-props": "off",
|
|
573
|
+
"perfectionist/sort-maps": "off",
|
|
574
|
+
"perfectionist/sort-modules": "off",
|
|
575
|
+
"perfectionist/sort-named-exports": "off",
|
|
547
576
|
"perfectionist/sort-named-imports": "warn",
|
|
548
|
-
"perfectionist/sort-object-types": ["warn",
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
"perfectionist/sort-
|
|
553
|
-
|
|
554
|
-
type: "natural"
|
|
555
|
-
}]
|
|
577
|
+
"perfectionist/sort-object-types": ["warn", ...sortOrder],
|
|
578
|
+
"perfectionist/sort-objects": ["warn", ...sortOrder],
|
|
579
|
+
"perfectionist/sort-sets": "off",
|
|
580
|
+
"perfectionist/sort-switch-case": "off",
|
|
581
|
+
"perfectionist/sort-union-types": "off",
|
|
582
|
+
"perfectionist/sort-variable-declarations": "off"
|
|
556
583
|
}
|
|
557
584
|
}];
|
|
558
585
|
}
|
|
@@ -829,19 +856,114 @@ function style() {
|
|
|
829
856
|
return [{
|
|
830
857
|
name: "will-stone/style",
|
|
831
858
|
plugins: { "@stylistic": stylistic },
|
|
832
|
-
rules: {
|
|
833
|
-
"
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
859
|
+
rules: {
|
|
860
|
+
"@stylistic/array-bracket-newline": "off",
|
|
861
|
+
"@stylistic/array-bracket-spacing": "off",
|
|
862
|
+
"@stylistic/array-element-newline": "off",
|
|
863
|
+
"@stylistic/arrow-parens": "off",
|
|
864
|
+
"@stylistic/arrow-spacing": "off",
|
|
865
|
+
"@stylistic/block-spacing": "off",
|
|
866
|
+
"@stylistic/brace-style": "off",
|
|
867
|
+
"@stylistic/comma-dangle": "off",
|
|
868
|
+
"@stylistic/comma-spacing": "off",
|
|
869
|
+
"@stylistic/comma-style": "off",
|
|
870
|
+
"@stylistic/computed-property-spacing": "off",
|
|
871
|
+
"@stylistic/curly-newline": "off",
|
|
872
|
+
"@stylistic/dot-location": "off",
|
|
873
|
+
"@stylistic/eol-last": "off",
|
|
874
|
+
"@stylistic/function-call-argument-newline": "off",
|
|
875
|
+
"@stylistic/function-call-spacing": "off",
|
|
876
|
+
"@stylistic/function-paren-newline": "off",
|
|
877
|
+
"@stylistic/generator-star-spacing": "off",
|
|
878
|
+
"@stylistic/implicit-arrow-linebreak": "off",
|
|
879
|
+
"@stylistic/indent": "off",
|
|
880
|
+
"@stylistic/indent-binary-ops": "off",
|
|
881
|
+
"@stylistic/jsx-child-element-spacing": "off",
|
|
882
|
+
"@stylistic/jsx-closing-bracket-location": "off",
|
|
883
|
+
"@stylistic/jsx-closing-tag-location": "off",
|
|
884
|
+
"@stylistic/jsx-curly-brace-presence": "off",
|
|
885
|
+
"@stylistic/jsx-curly-newline": "off",
|
|
886
|
+
"@stylistic/jsx-curly-spacing": "off",
|
|
887
|
+
"@stylistic/jsx-equals-spacing": "off",
|
|
888
|
+
"@stylistic/jsx-first-prop-new-line": "off",
|
|
889
|
+
"@stylistic/jsx-function-call-newline": "off",
|
|
890
|
+
"@stylistic/jsx-indent-props": "off",
|
|
891
|
+
"@stylistic/jsx-max-props-per-line": "off",
|
|
892
|
+
"@stylistic/jsx-newline": "off",
|
|
893
|
+
"@stylistic/jsx-one-expression-per-line": "off",
|
|
894
|
+
"@stylistic/jsx-pascal-case": "off",
|
|
895
|
+
"@stylistic/jsx-props-no-multi-spaces": "off",
|
|
896
|
+
"@stylistic/jsx-quotes": "off",
|
|
897
|
+
"@stylistic/jsx-self-closing-comp": "off",
|
|
898
|
+
"@stylistic/jsx-sort-props": "off",
|
|
899
|
+
"@stylistic/jsx-tag-spacing": "off",
|
|
900
|
+
"@stylistic/jsx-wrap-multilines": "off",
|
|
901
|
+
"@stylistic/key-spacing": "off",
|
|
902
|
+
"@stylistic/keyword-spacing": "off",
|
|
903
|
+
"@stylistic/line-comment-position": "off",
|
|
904
|
+
"@stylistic/linebreak-style": "off",
|
|
905
|
+
"@stylistic/lines-around-comment": "off",
|
|
906
|
+
"@stylistic/lines-between-class-members": "off",
|
|
907
|
+
"@stylistic/max-len": "off",
|
|
908
|
+
"@stylistic/max-statements-per-line": "off",
|
|
909
|
+
"@stylistic/member-delimiter-style": "off",
|
|
910
|
+
"@stylistic/multiline-comment-style": "off",
|
|
911
|
+
"@stylistic/multiline-ternary": "off",
|
|
912
|
+
"@stylistic/new-parens": "off",
|
|
913
|
+
"@stylistic/newline-per-chained-call": "off",
|
|
914
|
+
"@stylistic/no-confusing-arrow": "off",
|
|
915
|
+
"@stylistic/no-extra-parens": "off",
|
|
916
|
+
"@stylistic/no-extra-semi": "off",
|
|
917
|
+
"@stylistic/no-floating-decimal": "off",
|
|
918
|
+
"@stylistic/no-mixed-operators": "off",
|
|
919
|
+
"@stylistic/no-mixed-spaces-and-tabs": "off",
|
|
920
|
+
"@stylistic/no-multi-spaces": "off",
|
|
921
|
+
"@stylistic/no-multiple-empty-lines": "off",
|
|
922
|
+
"@stylistic/no-tabs": "off",
|
|
923
|
+
"@stylistic/no-trailing-spaces": "off",
|
|
924
|
+
"@stylistic/no-whitespace-before-property": "off",
|
|
925
|
+
"@stylistic/nonblock-statement-body-position": "off",
|
|
926
|
+
"@stylistic/object-curly-newline": "off",
|
|
927
|
+
"@stylistic/object-curly-spacing": "off",
|
|
928
|
+
"@stylistic/object-property-newline": "off",
|
|
929
|
+
"@stylistic/one-var-declaration-per-line": "off",
|
|
930
|
+
"@stylistic/operator-linebreak": "off",
|
|
931
|
+
"@stylistic/padded-blocks": "off",
|
|
932
|
+
"@stylistic/padding-line-between-statements": [
|
|
933
|
+
"warn",
|
|
934
|
+
{
|
|
935
|
+
blankLine: "always",
|
|
936
|
+
next: "*",
|
|
937
|
+
prev: "import"
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
blankLine: "any",
|
|
941
|
+
next: "import",
|
|
942
|
+
prev: "import"
|
|
943
|
+
}
|
|
944
|
+
],
|
|
945
|
+
"@stylistic/quote-props": "off",
|
|
946
|
+
"@stylistic/quotes": "off",
|
|
947
|
+
"@stylistic/rest-spread-spacing": "off",
|
|
948
|
+
"@stylistic/semi": "off",
|
|
949
|
+
"@stylistic/semi-spacing": "off",
|
|
950
|
+
"@stylistic/semi-style": "off",
|
|
951
|
+
"@stylistic/space-before-blocks": "off",
|
|
952
|
+
"@stylistic/space-before-function-paren": "off",
|
|
953
|
+
"@stylistic/space-in-parens": "off",
|
|
954
|
+
"@stylistic/space-infix-ops": "off",
|
|
955
|
+
"@stylistic/space-unary-ops": "off",
|
|
956
|
+
"@stylistic/spaced-comment": "off",
|
|
957
|
+
"@stylistic/switch-colon-spacing": "off",
|
|
958
|
+
"@stylistic/template-curly-spacing": "off",
|
|
959
|
+
"@stylistic/template-tag-spacing": "off",
|
|
960
|
+
"@stylistic/type-annotation-spacing": "off",
|
|
961
|
+
"@stylistic/type-generic-spacing": "off",
|
|
962
|
+
"@stylistic/type-named-tuple-spacing": "off",
|
|
963
|
+
"@stylistic/wrap-iife": "off",
|
|
964
|
+
"@stylistic/wrap-regex": "off",
|
|
965
|
+
"@stylistic/yield-star-spacing": "off"
|
|
966
|
+
}
|
|
845
967
|
}];
|
|
846
968
|
}
|
|
847
969
|
|
|
@@ -1058,7 +1180,6 @@ function typescript({ options: { typescript: rawOptions } }) {
|
|
|
1058
1180
|
"@typescript-eslint/prefer-for-of": "off",
|
|
1059
1181
|
"@typescript-eslint/prefer-function-type": "warn",
|
|
1060
1182
|
"@typescript-eslint/prefer-literal-enum-member": "error",
|
|
1061
|
-
"@typescript-eslint/typedef": "off",
|
|
1062
1183
|
"@typescript-eslint/unified-signatures": "error"
|
|
1063
1184
|
}
|
|
1064
1185
|
}];
|
|
@@ -1220,14 +1341,20 @@ async function vitest(_configContext) {
|
|
|
1220
1341
|
rules: {
|
|
1221
1342
|
"vitest/consistent-test-filename": "warn",
|
|
1222
1343
|
"vitest/consistent-test-it": "warn",
|
|
1344
|
+
"vitest/expect-expect": "error",
|
|
1345
|
+
"vitest/max-expects": "off",
|
|
1223
1346
|
"vitest/max-nested-describe": "warn",
|
|
1224
1347
|
"vitest/no-alias-methods": "warn",
|
|
1348
|
+
"vitest/no-commented-out-tests": "error",
|
|
1225
1349
|
"vitest/no-conditional-expect": "warn",
|
|
1226
1350
|
"vitest/no-conditional-in-test": "warn",
|
|
1227
1351
|
"vitest/no-conditional-tests": "warn",
|
|
1228
1352
|
"vitest/no-disabled-tests": "warn",
|
|
1229
1353
|
"vitest/no-duplicate-hooks": "warn",
|
|
1230
1354
|
"vitest/no-focused-tests": ["warn", { fixable: false }],
|
|
1355
|
+
"vitest/no-hooks": "off",
|
|
1356
|
+
"vitest/no-identical-title": "warn",
|
|
1357
|
+
"vitest/no-import-node-test": "warn",
|
|
1231
1358
|
"vitest/no-interpolation-in-snapshots": "warn",
|
|
1232
1359
|
"vitest/no-large-snapshots": "warn",
|
|
1233
1360
|
"vitest/no-mocks-import": "warn",
|
|
@@ -1236,11 +1363,20 @@ async function vitest(_configContext) {
|
|
|
1236
1363
|
"vitest/no-standalone-expect": "warn",
|
|
1237
1364
|
"vitest/no-test-prefixes": "warn",
|
|
1238
1365
|
"vitest/no-test-return-statement": "warn",
|
|
1366
|
+
"vitest/padding-around-after-all-blocks": "warn",
|
|
1367
|
+
"vitest/padding-around-after-each-blocks": "warn",
|
|
1368
|
+
"vitest/padding-around-all": "off",
|
|
1369
|
+
"vitest/padding-around-before-all-blocks": "warn",
|
|
1370
|
+
"vitest/padding-around-before-each-blocks": "warn",
|
|
1371
|
+
"vitest/padding-around-describe-blocks": "warn",
|
|
1372
|
+
"vitest/padding-around-expect-groups": "off",
|
|
1373
|
+
"vitest/padding-around-test-blocks": "warn",
|
|
1239
1374
|
"vitest/prefer-called-with": "warn",
|
|
1240
1375
|
"vitest/prefer-comparison-matcher": "warn",
|
|
1241
1376
|
"vitest/prefer-describe-function-title": "warn",
|
|
1242
1377
|
"vitest/prefer-each": "warn",
|
|
1243
1378
|
"vitest/prefer-equality-matcher": "warn",
|
|
1379
|
+
"vitest/prefer-expect-assertions": "off",
|
|
1244
1380
|
"vitest/prefer-expect-resolves": "warn",
|
|
1245
1381
|
"vitest/prefer-hooks-in-order": "warn",
|
|
1246
1382
|
"vitest/prefer-hooks-on-top": "warn",
|
|
@@ -1248,40 +1384,25 @@ async function vitest(_configContext) {
|
|
|
1248
1384
|
"vitest/prefer-mock-promise-shorthand": "warn",
|
|
1249
1385
|
"vitest/prefer-snapshot-hint": "warn",
|
|
1250
1386
|
"vitest/prefer-spy-on": "warn",
|
|
1387
|
+
"vitest/prefer-strict-boolean-matchers": "warn",
|
|
1251
1388
|
"vitest/prefer-strict-equal": "warn",
|
|
1252
1389
|
"vitest/prefer-to-be": "warn",
|
|
1390
|
+
"vitest/prefer-to-be-falsy": "off",
|
|
1253
1391
|
"vitest/prefer-to-be-object": "warn",
|
|
1392
|
+
"vitest/prefer-to-be-truthy": "off",
|
|
1254
1393
|
"vitest/prefer-to-contain": "warn",
|
|
1255
1394
|
"vitest/prefer-to-have-length": "warn",
|
|
1256
1395
|
"vitest/prefer-todo": "warn",
|
|
1396
|
+
"vitest/prefer-vi-mocked": "warn",
|
|
1257
1397
|
"vitest/require-hook": "warn",
|
|
1258
|
-
"vitest/require-to-throw-message": "warn",
|
|
1259
|
-
"vitest/expect-expect": "error",
|
|
1260
|
-
"vitest/max-expects": "off",
|
|
1261
|
-
"vitest/no-commented-out-tests": "error",
|
|
1262
|
-
"vitest/no-hooks": "off",
|
|
1263
|
-
"vitest/no-identical-title": "warn",
|
|
1264
|
-
"vitest/no-import-node-test": "warn",
|
|
1265
|
-
"vitest/prefer-expect-assertions": "off",
|
|
1266
|
-
"vitest/prefer-strict-boolean-matchers": "warn",
|
|
1267
|
-
"vitest/prefer-to-be-falsy": "off",
|
|
1268
|
-
"vitest/prefer-to-be-truthy": "off",
|
|
1269
1398
|
"vitest/require-local-test-context-for-concurrent-snapshots": "error",
|
|
1270
1399
|
"vitest/require-mock-type-parameters": "warn",
|
|
1400
|
+
"vitest/require-to-throw-message": "warn",
|
|
1271
1401
|
"vitest/require-top-level-describe": "off",
|
|
1272
1402
|
"vitest/valid-describe-callback": "error",
|
|
1273
1403
|
"vitest/valid-expect": "error",
|
|
1274
1404
|
"vitest/valid-expect-in-promise": "error",
|
|
1275
|
-
"vitest/valid-title": "warn",
|
|
1276
|
-
"vitest/prefer-vi-mocked": "warn",
|
|
1277
|
-
"vitest/padding-around-after-all-blocks": "warn",
|
|
1278
|
-
"vitest/padding-around-after-each-blocks": "warn",
|
|
1279
|
-
"vitest/padding-around-all": "warn",
|
|
1280
|
-
"vitest/padding-around-before-all-blocks": "warn",
|
|
1281
|
-
"vitest/padding-around-before-each-blocks": "warn",
|
|
1282
|
-
"vitest/padding-around-describe-blocks": "warn",
|
|
1283
|
-
"vitest/padding-around-expect-groups": "warn",
|
|
1284
|
-
"vitest/padding-around-test-blocks": "warn"
|
|
1405
|
+
"vitest/valid-title": ["warn", { ignoreTypeOfDescribeName: true }]
|
|
1285
1406
|
}
|
|
1286
1407
|
}];
|
|
1287
1408
|
}
|