@will-stone/eslint-config 20.0.0 → 20.1.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.
Files changed (2) hide show
  1. package/dist/index.js +58 -30
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -538,21 +538,49 @@ function packageJson() {
538
538
 
539
539
  //#endregion
540
540
  //#region src/configs/perfectionist.ts
541
+ const sortOrder = [{
542
+ customGroups: {
543
+ type: "^type$",
544
+ payload: "^payload$",
545
+ error: "^error$",
546
+ meta: "^meta$"
547
+ },
548
+ groups: [
549
+ "type",
550
+ "payload",
551
+ "error",
552
+ "meta"
553
+ ],
554
+ useConfigurationIf: { allNamesMatchPattern: "^type|payload|meta|error$" }
555
+ }, {
556
+ partitionByNewLine: true,
557
+ type: "natural"
558
+ }];
541
559
  function perfectionist() {
542
560
  return [{
543
561
  name: "will-stone/perfectionist",
544
562
  plugins: { perfectionist: pluginPerfectionist },
545
563
  rules: {
546
- "perfectionist/sort-imports": "warn",
564
+ "perfectionist/sort-array-includes": "off",
565
+ "perfectionist/sort-classes": "off",
566
+ "perfectionist/sort-decorators": "off",
567
+ "perfectionist/sort-enums": "off",
568
+ "perfectionist/sort-exports": "off",
569
+ "perfectionist/sort-heritage-clauses": "off",
570
+ "perfectionist/sort-imports": ["warn", { type: "natural" }],
571
+ "perfectionist/sort-interfaces": "off",
572
+ "perfectionist/sort-intersection-types": "off",
573
+ "perfectionist/sort-jsx-props": "off",
574
+ "perfectionist/sort-maps": "off",
575
+ "perfectionist/sort-modules": "off",
576
+ "perfectionist/sort-named-exports": "off",
547
577
  "perfectionist/sort-named-imports": "warn",
548
- "perfectionist/sort-object-types": ["warn", {
549
- partitionByNewLine: true,
550
- type: "natural"
551
- }],
552
- "perfectionist/sort-objects": ["warn", {
553
- partitionByNewLine: true,
554
- type: "natural"
555
- }]
578
+ "perfectionist/sort-object-types": ["warn", ...sortOrder],
579
+ "perfectionist/sort-objects": ["warn", ...sortOrder],
580
+ "perfectionist/sort-sets": "off",
581
+ "perfectionist/sort-switch-case": "off",
582
+ "perfectionist/sort-union-types": "off",
583
+ "perfectionist/sort-variable-declarations": "off"
556
584
  }
557
585
  }];
558
586
  }
@@ -1220,14 +1248,20 @@ async function vitest(_configContext) {
1220
1248
  rules: {
1221
1249
  "vitest/consistent-test-filename": "warn",
1222
1250
  "vitest/consistent-test-it": "warn",
1251
+ "vitest/expect-expect": "error",
1252
+ "vitest/max-expects": "off",
1223
1253
  "vitest/max-nested-describe": "warn",
1224
1254
  "vitest/no-alias-methods": "warn",
1255
+ "vitest/no-commented-out-tests": "error",
1225
1256
  "vitest/no-conditional-expect": "warn",
1226
1257
  "vitest/no-conditional-in-test": "warn",
1227
1258
  "vitest/no-conditional-tests": "warn",
1228
1259
  "vitest/no-disabled-tests": "warn",
1229
1260
  "vitest/no-duplicate-hooks": "warn",
1230
1261
  "vitest/no-focused-tests": ["warn", { fixable: false }],
1262
+ "vitest/no-hooks": "off",
1263
+ "vitest/no-identical-title": "warn",
1264
+ "vitest/no-import-node-test": "warn",
1231
1265
  "vitest/no-interpolation-in-snapshots": "warn",
1232
1266
  "vitest/no-large-snapshots": "warn",
1233
1267
  "vitest/no-mocks-import": "warn",
@@ -1236,11 +1270,20 @@ async function vitest(_configContext) {
1236
1270
  "vitest/no-standalone-expect": "warn",
1237
1271
  "vitest/no-test-prefixes": "warn",
1238
1272
  "vitest/no-test-return-statement": "warn",
1273
+ "vitest/padding-around-after-all-blocks": "warn",
1274
+ "vitest/padding-around-after-each-blocks": "warn",
1275
+ "vitest/padding-around-all": "off",
1276
+ "vitest/padding-around-before-all-blocks": "warn",
1277
+ "vitest/padding-around-before-each-blocks": "warn",
1278
+ "vitest/padding-around-describe-blocks": "warn",
1279
+ "vitest/padding-around-expect-groups": "off",
1280
+ "vitest/padding-around-test-blocks": "warn",
1239
1281
  "vitest/prefer-called-with": "warn",
1240
1282
  "vitest/prefer-comparison-matcher": "warn",
1241
1283
  "vitest/prefer-describe-function-title": "warn",
1242
1284
  "vitest/prefer-each": "warn",
1243
1285
  "vitest/prefer-equality-matcher": "warn",
1286
+ "vitest/prefer-expect-assertions": "off",
1244
1287
  "vitest/prefer-expect-resolves": "warn",
1245
1288
  "vitest/prefer-hooks-in-order": "warn",
1246
1289
  "vitest/prefer-hooks-on-top": "warn",
@@ -1248,40 +1291,25 @@ async function vitest(_configContext) {
1248
1291
  "vitest/prefer-mock-promise-shorthand": "warn",
1249
1292
  "vitest/prefer-snapshot-hint": "warn",
1250
1293
  "vitest/prefer-spy-on": "warn",
1294
+ "vitest/prefer-strict-boolean-matchers": "warn",
1251
1295
  "vitest/prefer-strict-equal": "warn",
1252
1296
  "vitest/prefer-to-be": "warn",
1297
+ "vitest/prefer-to-be-falsy": "off",
1253
1298
  "vitest/prefer-to-be-object": "warn",
1299
+ "vitest/prefer-to-be-truthy": "off",
1254
1300
  "vitest/prefer-to-contain": "warn",
1255
1301
  "vitest/prefer-to-have-length": "warn",
1256
1302
  "vitest/prefer-todo": "warn",
1303
+ "vitest/prefer-vi-mocked": "warn",
1257
1304
  "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
1305
  "vitest/require-local-test-context-for-concurrent-snapshots": "error",
1270
1306
  "vitest/require-mock-type-parameters": "warn",
1307
+ "vitest/require-to-throw-message": "warn",
1271
1308
  "vitest/require-top-level-describe": "off",
1272
1309
  "vitest/valid-describe-callback": "error",
1273
1310
  "vitest/valid-expect": "error",
1274
1311
  "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"
1312
+ "vitest/valid-title": ["warn", { ignoreTypeOfDescribeName: true }]
1285
1313
  }
1286
1314
  }];
1287
1315
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@will-stone/eslint-config",
3
- "version": "20.0.0",
3
+ "version": "20.1.0",
4
4
  "description": "Will Stone's ESLint config",
5
5
  "keywords": [
6
6
  "eslint-config"