@kitschpatrol/eslint-config 5.3.1 → 5.4.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.
Files changed (4) hide show
  1. package/bin/cli.js +102 -528
  2. package/dist/index.d.ts +1124 -648
  3. package/dist/index.js +45 -20
  4. package/package.json +31 -31
package/dist/index.js CHANGED
@@ -302,8 +302,8 @@ var eslintTypescriptRecommendedOverridesRules = {
302
302
  "no-dupe-keys": "off",
303
303
  "no-func-assign": "off",
304
304
  "no-import-assign": "off",
305
- "no-new-symbol": "off",
306
305
  "no-new-native-nonconstructor": "off",
306
+ "no-new-symbol": "off",
307
307
  "no-obj-calls": "off",
308
308
  "no-redeclare": "off",
309
309
  "no-setter-return": "off",
@@ -312,6 +312,7 @@ var eslintTypescriptRecommendedOverridesRules = {
312
312
  "no-unreachable": "off",
313
313
  "no-unsafe-negation": "off",
314
314
  "no-var": "error",
315
+ "no-with": "off",
315
316
  "prefer-const": "error",
316
317
  "prefer-rest-params": "error",
317
318
  "prefer-spread": "error"
@@ -468,6 +469,7 @@ var eslintTypescriptDisableTypeCheckedRules = {
468
469
  "ts/no-unnecessary-template-expression": "off",
469
470
  "ts/no-unnecessary-type-arguments": "off",
470
471
  "ts/no-unnecessary-type-assertion": "off",
472
+ "ts/no-unnecessary-type-conversion": "off",
471
473
  "ts/no-unnecessary-type-parameters": "off",
472
474
  "ts/no-unsafe-argument": "off",
473
475
  "ts/no-unsafe-assignment": "off",
@@ -763,9 +765,10 @@ var jsonPrettierRules = {
763
765
 
764
766
  // src/presets/json-package.ts
765
767
  var jsonPackageRecommendedRules = {
766
- // Begin expansion 'eslint-plugin-package-json/configs/recommended' 'rules'
768
+ // Begin expansion 'eslint-plugin-package-json' 'configs.recommended.rules'
767
769
  "json-package/no-empty-fields": "error",
768
770
  "json-package/order-properties": "error",
771
+ "json-package/require-description": "error",
769
772
  "json-package/require-name": "error",
770
773
  "json-package/require-version": "error",
771
774
  "json-package/repository-shorthand": "error",
@@ -1295,7 +1298,10 @@ var prettierRules = {
1295
1298
  // src/presets/react.ts
1296
1299
  var reactRecommendedTypeCheckedRules = {
1297
1300
  // Begin expansion '@eslint-react/eslint-plugin' 'recommended-type-checked'
1298
- "react/ensure-forward-ref-using-ref": "warn",
1301
+ "react/jsx-key-before-spread": "warn",
1302
+ "react/jsx-no-duplicate-props": "off",
1303
+ "react/jsx-uses-react": "off",
1304
+ "react/jsx-uses-vars": "off",
1299
1305
  "react/no-access-state-in-setstate": "error",
1300
1306
  "react/no-array-index-key": "warn",
1301
1307
  "react/no-children-count": "warn",
@@ -1312,12 +1318,13 @@ var reactRecommendedTypeCheckedRules = {
1312
1318
  "react/no-create-ref": "error",
1313
1319
  "react/no-default-props": "error",
1314
1320
  "react/no-direct-mutation-state": "error",
1315
- "react/no-duplicate-jsx-props": "off",
1316
1321
  "react/no-duplicate-key": "warn",
1317
1322
  "react/no-forward-ref": "warn",
1318
1323
  "react/no-implicit-key": "warn",
1319
1324
  "react/no-missing-key": "error",
1320
- "react/no-nested-components": "error",
1325
+ "react/no-misused-capture-owner-stack": "error",
1326
+ "react/no-nested-component-definitions": "error",
1327
+ "react/no-nested-lazy-component-declarations": "warn",
1321
1328
  "react/no-prop-types": "error",
1322
1329
  "react/no-redundant-should-component-update": "error",
1323
1330
  "react/no-set-state-in-component-did-mount": "warn",
@@ -1332,27 +1339,30 @@ var reactRecommendedTypeCheckedRules = {
1332
1339
  "react/no-unused-class-component-members": "warn",
1333
1340
  "react/no-unused-state": "warn",
1334
1341
  "react/no-use-context": "warn",
1335
- "react/use-jsx-vars": "off",
1342
+ "react/no-useless-forward-ref": "warn",
1336
1343
  "react-dom/no-dangerously-set-innerhtml": "warn",
1337
1344
  "react-dom/no-dangerously-set-innerhtml-with-children": "error",
1338
1345
  "react-dom/no-find-dom-node": "error",
1346
+ "react-dom/no-flush-sync": "error",
1347
+ "react-dom/no-hydrate": "error",
1339
1348
  "react-dom/no-missing-button-type": "warn",
1340
1349
  "react-dom/no-missing-iframe-sandbox": "warn",
1341
1350
  "react-dom/no-namespace": "error",
1351
+ "react-dom/no-render": "error",
1342
1352
  "react-dom/no-render-return-value": "error",
1343
1353
  "react-dom/no-script-url": "warn",
1344
1354
  "react-dom/no-unsafe-iframe-sandbox": "warn",
1345
1355
  "react-dom/no-unsafe-target-blank": "warn",
1346
- "react-dom/no-void-elements-with-children": "warn",
1356
+ "react-dom/no-use-form-state": "error",
1357
+ "react-dom/no-void-elements-with-children": "error",
1347
1358
  "react-web-api/no-leaked-event-listener": "warn",
1348
1359
  "react-web-api/no-leaked-interval": "warn",
1349
1360
  "react-web-api/no-leaked-resize-observer": "warn",
1350
1361
  "react-web-api/no-leaked-timeout": "warn",
1351
1362
  "react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
1352
- "react-hooks-extra/no-useless-custom-hooks": "warn",
1363
+ "react-hooks-extra/no-unnecessary-use-prefix": "warn",
1353
1364
  "react-hooks-extra/prefer-use-state-lazy-initialization": "warn",
1354
1365
  "react-naming-convention/context-name": "warn",
1355
- "react-naming-convention/use-state": "warn",
1356
1366
  "react-dom/no-unknown-property": "off",
1357
1367
  "react/no-leaked-conditional-rendering": "warn"
1358
1368
  // End expansion
@@ -1464,6 +1474,8 @@ var svelteRecommendedRules = {
1464
1474
  "svelte/no-store-async": "error",
1465
1475
  "svelte/no-svelte-internal": "error",
1466
1476
  "svelte/no-unknown-style-directive-property": "error",
1477
+ "svelte/no-unnecessary-state-wrap": "error",
1478
+ "svelte/no-unused-props": "error",
1467
1479
  "svelte/no-unused-svelte-ignore": "error",
1468
1480
  "svelte/no-useless-children-snippet": "error",
1469
1481
  "svelte/no-useless-mustaches": "error",
@@ -1528,7 +1540,6 @@ var unicornRecommendedRules = {
1528
1540
  "unicorn/no-array-callback-reference": "error",
1529
1541
  "unicorn/no-array-for-each": "error",
1530
1542
  "unicorn/no-array-method-this-argument": "error",
1531
- "unicorn/no-array-push-push": "error",
1532
1543
  "unicorn/no-array-reduce": "error",
1533
1544
  "unicorn/no-await-expression-member": "error",
1534
1545
  "unicorn/no-await-in-promise-methods": "error",
@@ -1541,7 +1552,6 @@ var unicornRecommendedRules = {
1541
1552
  "unicorn/no-invalid-fetch-options": "error",
1542
1553
  "unicorn/no-invalid-remove-event-listener": "error",
1543
1554
  "unicorn/no-keyword-prefix": "off",
1544
- "unicorn/no-length-as-slice-end": "error",
1545
1555
  "unicorn/no-lonely-if": "error",
1546
1556
  "unicorn/no-magic-array-flat-depth": "error",
1547
1557
  "unicorn/no-named-default": "error",
@@ -1558,8 +1568,11 @@ var unicornRecommendedRules = {
1558
1568
  "unicorn/no-thenable": "error",
1559
1569
  "unicorn/no-this-assignment": "error",
1560
1570
  "unicorn/no-typeof-undefined": "error",
1571
+ "unicorn/no-unnecessary-array-flat-depth": "error",
1572
+ "unicorn/no-unnecessary-array-splice-count": "error",
1561
1573
  "unicorn/no-unnecessary-await": "error",
1562
1574
  "unicorn/no-unnecessary-polyfills": "error",
1575
+ "unicorn/no-unnecessary-slice-end": "error",
1563
1576
  "unicorn/no-unreadable-array-destructuring": "error",
1564
1577
  "unicorn/no-unreadable-iife": "error",
1565
1578
  "unicorn/no-unused-properties": "off",
@@ -1590,6 +1603,7 @@ var unicornRecommendedRules = {
1590
1603
  "unicorn/prefer-event-target": "error",
1591
1604
  "unicorn/prefer-export-from": "error",
1592
1605
  "unicorn/prefer-global-this": "error",
1606
+ "unicorn/prefer-import-meta-properties": "off",
1593
1607
  "unicorn/prefer-includes": "error",
1594
1608
  "unicorn/prefer-json-parse-buffer": "off",
1595
1609
  "unicorn/prefer-keyboard-event-key": "error",
@@ -1611,6 +1625,7 @@ var unicornRecommendedRules = {
1611
1625
  "unicorn/prefer-regexp-test": "error",
1612
1626
  "unicorn/prefer-set-has": "error",
1613
1627
  "unicorn/prefer-set-size": "error",
1628
+ "unicorn/prefer-single-call": "error",
1614
1629
  "unicorn/prefer-spread": "error",
1615
1630
  "unicorn/prefer-string-raw": "error",
1616
1631
  "unicorn/prefer-string-replace-all": "error",
@@ -1689,6 +1704,7 @@ var xoJavascriptRules = {
1689
1704
  "default-case": "error",
1690
1705
  "default-case-last": "error",
1691
1706
  "dot-notation": "error",
1707
+ // "@stylistic/curly-newline":["error","always"],
1692
1708
  // "@stylistic/dot-location":["error","property"],
1693
1709
  eqeqeq: "error",
1694
1710
  "grouped-accessor-pairs": ["error", "getBeforeSet"],
@@ -1796,7 +1812,7 @@ var xoJavascriptRules = {
1796
1812
  "error",
1797
1813
  "always",
1798
1814
  {
1799
- ignorePattern: String.raw`pragma|ignore|prettier-ignore|webpack\w+:|c8|type-coverage:`,
1815
+ ignorePattern: String.raw`pragma|ignore|prettier-ignore|biome-ignore|webpack\w+:|c8|v8|type-coverage:`,
1800
1816
  ignoreInlineComments: true,
1801
1817
  ignoreConsecutiveComments: true
1802
1818
  }
@@ -1901,7 +1917,7 @@ var xoJavascriptRules = {
1901
1917
  // End expansion
1902
1918
  };
1903
1919
  var xoTypescriptRules = {
1904
- // Begin expansion 'eslint-config-xo-typescript' '[1].rules'
1920
+ // Begin expansion 'eslint-config-xo-typescript' '[4].rules'
1905
1921
  "ts/adjacent-overload-signatures": "error",
1906
1922
  "ts/array-type": ["error", { default: "array-simple" }],
1907
1923
  "ts/await-thenable": "error",
@@ -2117,7 +2133,9 @@ var xoTypescriptRules = {
2117
2133
  "ts/no-unsafe-declaration-merging": "error",
2118
2134
  "ts/no-unsafe-enum-comparison": "error",
2119
2135
  "ts/no-unsafe-function-type": "error",
2136
+ "ts/no-unsafe-member-access": "error",
2120
2137
  "ts/no-unsafe-return": "error",
2138
+ "ts/no-unsafe-type-assertion": "error",
2121
2139
  "ts/no-useless-empty-export": "error",
2122
2140
  "no-unused-expressions": "off",
2123
2141
  "ts/no-unused-expressions": "error",
@@ -2153,6 +2171,7 @@ var xoTypescriptRules = {
2153
2171
  "ts/prefer-reduce-type-parameter": "error",
2154
2172
  "ts/prefer-string-starts-ends-with": "error",
2155
2173
  "ts/promise-function-async": "error",
2174
+ "ts/related-getter-setter-pairs": "error",
2156
2175
  quotes: "off",
2157
2176
  // "@stylistic/quotes":["error","single"],
2158
2177
  "ts/restrict-plus-operands": ["error", { allowAny: false }],
@@ -2189,18 +2208,18 @@ var xoTypescriptRules = {
2189
2208
  // End expansion
2190
2209
  };
2191
2210
  var xoTypescriptDtsRules = {
2192
- // Begin expansion 'eslint-config-xo-typescript' '[2].rules'
2211
+ // Begin expansion 'eslint-config-xo-typescript' '[5].rules'
2193
2212
  "ts/no-unused-vars": "off"
2194
2213
  // End expansion
2195
2214
  };
2196
2215
  var xoTypescriptTestRules = {
2197
- // Begin expansion 'eslint-config-xo-typescript' '[3].rules'
2216
+ // Begin expansion 'eslint-config-xo-typescript' '[6].rules'
2198
2217
  "ts/no-unsafe-call": "off",
2199
2218
  "ts/no-confusing-void-expression": "off"
2200
2219
  // End expansion
2201
2220
  };
2202
2221
  var xoTsxRules = {
2203
- // Begin expansion 'eslint-config-xo-typescript' '[4].rules'
2222
+ // Begin expansion 'eslint-config-xo-typescript' '[7].rules'
2204
2223
  "ts/naming-convention": [
2205
2224
  "error",
2206
2225
  {
@@ -2259,7 +2278,7 @@ async function combine(...configs) {
2259
2278
  }
2260
2279
  async function interopDefault(m) {
2261
2280
  const resolved = await m;
2262
- return resolved.default || resolved;
2281
+ return resolved.default ?? resolved;
2263
2282
  }
2264
2283
  function isInEditorEnv() {
2265
2284
  if (process2.env.CI) return false;
@@ -2403,6 +2422,7 @@ var sharedScriptConfig = {
2403
2422
  }
2404
2423
  ],
2405
2424
  "eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
2425
+ "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
2406
2426
  // Overlaps with `unicorn/no-named-default`, and gives false positives for imports from CJS modules
2407
2427
  "import/default": "off",
2408
2428
  // IMO using the default can help with code readability / disambiguation of a function's origin
@@ -2581,6 +2601,8 @@ var sharedScriptConfig = {
2581
2601
  ],
2582
2602
  "ts/sort-type-constituents": "off",
2583
2603
  // Conflicts with perfectionist/sort-intersection-types
2604
+ "unicorn/import-style": "off",
2605
+ // Conflicts with import/consistent-type-specifier-style prefer-top-level
2584
2606
  "unicorn/prevent-abbreviations": [
2585
2607
  "error",
2586
2608
  {
@@ -2852,7 +2874,8 @@ var htmlRecommendedRules = {
2852
2874
  "html/quotes": "error",
2853
2875
  "html/no-obsolete-tags": "error",
2854
2876
  "html/require-closing-tags": "error",
2855
- "html/no-duplicate-attrs": "error"
2877
+ "html/no-duplicate-attrs": "error",
2878
+ "html/use-baseline": "error"
2856
2879
  // End expansion
2857
2880
  };
2858
2881
 
@@ -3305,7 +3328,7 @@ async function json(options = {}) {
3305
3328
  name: "kp/json/rules-tsconfig",
3306
3329
  rules: {
3307
3330
  "json/no-comments": "off",
3308
- "json/sort-keys": [
3331
+ "jsonc/sort-keys": [
3309
3332
  "error",
3310
3333
  {
3311
3334
  order: ["extends", "compilerOptions", "references", "files", "include", "exclude"],
@@ -3333,6 +3356,7 @@ async function json(options = {}) {
3333
3356
  "useDefineForClassFields",
3334
3357
  "emitDecoratorMetadata",
3335
3358
  "experimentalDecorators",
3359
+ "libReplacement",
3336
3360
  /* Modules */
3337
3361
  "baseUrl",
3338
3362
  "rootDir",
@@ -3407,6 +3431,7 @@ async function json(options = {}) {
3407
3431
  "isolatedModules",
3408
3432
  "preserveSymlinks",
3409
3433
  "verbatimModuleSyntax",
3434
+ "erasableSyntaxOnly",
3410
3435
  /* Completeness */
3411
3436
  "skipDefaultLibCheck",
3412
3437
  "skipLibCheck"
@@ -3825,7 +3850,7 @@ import globals3 from "globals";
3825
3850
  var _pluginTest;
3826
3851
  async function test(options = {}) {
3827
3852
  const { isInEditor = false, overrides = {} } = options;
3828
- _pluginTest ||= {
3853
+ _pluginTest ??= {
3829
3854
  ...pluginTest,
3830
3855
  // eslint-disable-next-line ts/no-unsafe-assignment
3831
3856
  rules: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitschpatrol/eslint-config",
3
- "version": "5.3.1",
3
+ "version": "5.4.1",
4
4
  "description": "ESLint configuration for @kitschpatrol/shared-config.",
5
5
  "keywords": [
6
6
  "shared-config",
@@ -41,46 +41,46 @@
41
41
  "init/*"
42
42
  ],
43
43
  "dependencies": {
44
- "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
45
- "@eslint-react/eslint-plugin": "^1.31.0",
46
- "@html-eslint/eslint-plugin": "^0.35.2",
47
- "@html-eslint/parser": "^0.35.2",
44
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
45
+ "@eslint-react/eslint-plugin": "^1.49.0",
46
+ "@html-eslint/eslint-plugin": "^0.40.2",
47
+ "@html-eslint/parser": "^0.40.0",
48
48
  "@pinojs/json-colorizer": "^4.0.0",
49
- "@typescript-eslint/eslint-plugin": "^8.26.0",
50
- "@typescript-eslint/parser": "^8.26.0",
51
- "@vitest/eslint-plugin": "^1.1.36",
52
- "astro-eslint-parser": "^1.2.1",
53
- "eslint": "^9.22.0",
49
+ "@typescript-eslint/eslint-plugin": "^8.32.0",
50
+ "@typescript-eslint/parser": "^8.32.0",
51
+ "@vitest/eslint-plugin": "^1.1.44",
52
+ "astro-eslint-parser": "^1.2.2",
53
+ "eslint": "^9.26.0",
54
54
  "eslint-config-flat-gitignore": "^2.1.0",
55
55
  "eslint-flat-config-utils": "^2.0.1",
56
- "eslint-import-resolver-typescript": "^3.8.3",
57
- "eslint-mdx": "^3.2.0",
56
+ "eslint-import-resolver-typescript": "^4.3.4",
57
+ "eslint-mdx": "^3.4.1",
58
58
  "eslint-plugin-astro": "^1.3.1",
59
- "eslint-plugin-depend": "^0.12.0",
59
+ "eslint-plugin-depend": "^1.2.0",
60
60
  "eslint-plugin-html": "^8.1.2",
61
- "eslint-plugin-import-x": "^4.6.1",
62
- "eslint-plugin-jsdoc": "^50.6.3",
63
- "eslint-plugin-jsonc": "^2.19.1",
61
+ "eslint-plugin-import-x": "^4.11.1",
62
+ "eslint-plugin-jsdoc": "^50.6.14",
63
+ "eslint-plugin-jsonc": "^2.20.0",
64
64
  "eslint-plugin-jsx-a11y": "^6.10.2",
65
- "eslint-plugin-mdx": "^3.2.0",
66
- "eslint-plugin-n": "^17.16.2",
65
+ "eslint-plugin-mdx": "^3.4.1",
66
+ "eslint-plugin-n": "^17.18.0",
67
67
  "eslint-plugin-no-only-tests": "^3.3.0",
68
- "eslint-plugin-package-json": "^0.26.3",
69
- "eslint-plugin-perfectionist": "^4.10.1",
68
+ "eslint-plugin-package-json": "^0.31.0",
69
+ "eslint-plugin-perfectionist": "^4.12.3",
70
70
  "eslint-plugin-regexp": "^2.7.0",
71
- "eslint-plugin-svelte": "^3.0.3",
71
+ "eslint-plugin-svelte": "^3.5.1",
72
72
  "eslint-plugin-toml": "^0.12.0",
73
- "eslint-plugin-unicorn": "^57.0.0",
74
- "eslint-plugin-yml": "^1.17.0",
75
- "execa": "^9.5.2",
73
+ "eslint-plugin-unicorn": "^59.0.1",
74
+ "eslint-plugin-yml": "^1.18.0",
75
+ "execa": "^9.5.3",
76
76
  "find-workspaces": "^0.3.1",
77
77
  "fs-extra": "^11.3.0",
78
- "globals": "^16.0.0",
78
+ "globals": "^16.1.0",
79
79
  "jsonc-eslint-parser": "^2.4.0",
80
80
  "local-pkg": "^1.1.1",
81
81
  "prettier": "^3.5.3",
82
- "sort-package-json": "^3.0.0",
83
- "svelte-eslint-parser": "^1.0.1",
82
+ "sort-package-json": "^3.2.1",
83
+ "svelte-eslint-parser": "^1.1.3",
84
84
  "toml-eslint-parser": "^0.10.0",
85
85
  "yaml-eslint-parser": "^1.3.0"
86
86
  },
@@ -88,11 +88,11 @@
88
88
  "@types/eslint-config-prettier": "^6.11.3",
89
89
  "@types/eslint-plugin-jsx-a11y": "^6.10.0",
90
90
  "dot-prop": "^9.0.0",
91
- "eslint-config-prettier": "^10.1.1",
92
- "eslint-config-xo-typescript": "^7.0.0",
93
- "eslint-typegen": "^2.0.0",
91
+ "eslint-config-prettier": "^10.1.5",
92
+ "eslint-config-xo-typescript": "^8.0.1",
93
+ "eslint-typegen": "^2.1.0",
94
94
  "globby": "^14.1.0",
95
- "svelte": "^5.22.6",
95
+ "svelte": "^5.28.2",
96
96
  "tsup": "^8.4.0"
97
97
  },
98
98
  "engines": {