@kitschpatrol/eslint-config 5.0.4 → 5.0.6
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/bin/cli.js +17 -12
- package/dist/index.d.ts +1981 -437
- package/dist/index.js +33 -19
- package/package.json +20 -20
package/dist/index.js
CHANGED
|
@@ -766,6 +766,7 @@ var jsonPackageRecommendedRules = {
|
|
|
766
766
|
// Begin expansion 'eslint-plugin-package-json/configs/recommended' 'rules'
|
|
767
767
|
"json-package/no-empty-fields": "error",
|
|
768
768
|
"json-package/order-properties": "error",
|
|
769
|
+
"json-package/require-name": "error",
|
|
769
770
|
"json-package/require-version": "error",
|
|
770
771
|
"json-package/repository-shorthand": "error",
|
|
771
772
|
"json-package/sort-collections": "error",
|
|
@@ -1312,7 +1313,7 @@ var reactRecommendedTypeCheckedRules = {
|
|
|
1312
1313
|
"react/no-default-props": "error",
|
|
1313
1314
|
"react/no-direct-mutation-state": "error",
|
|
1314
1315
|
"react/no-duplicate-jsx-props": "off",
|
|
1315
|
-
"react/no-duplicate-key": "
|
|
1316
|
+
"react/no-duplicate-key": "warn",
|
|
1316
1317
|
"react/no-forward-ref": "warn",
|
|
1317
1318
|
"react/no-implicit-key": "warn",
|
|
1318
1319
|
"react/no-missing-key": "error",
|
|
@@ -1485,6 +1486,8 @@ var unicornRecommendedRules = {
|
|
|
1485
1486
|
"no-nested-ternary": "off",
|
|
1486
1487
|
"unicorn/better-regex": "off",
|
|
1487
1488
|
"unicorn/catch-error-name": "error",
|
|
1489
|
+
"unicorn/consistent-assert": "error",
|
|
1490
|
+
"unicorn/consistent-date-clone": "error",
|
|
1488
1491
|
"unicorn/consistent-destructuring": "off",
|
|
1489
1492
|
"unicorn/consistent-empty-array-spread": "error",
|
|
1490
1493
|
"unicorn/consistent-existence-index-check": "error",
|
|
@@ -1499,6 +1502,7 @@ var unicornRecommendedRules = {
|
|
|
1499
1502
|
"unicorn/import-style": "error",
|
|
1500
1503
|
"unicorn/new-for-builtins": "error",
|
|
1501
1504
|
"unicorn/no-abusive-eslint-disable": "error",
|
|
1505
|
+
"unicorn/no-accessor-recursion": "error",
|
|
1502
1506
|
"unicorn/no-anonymous-default-export": "error",
|
|
1503
1507
|
"unicorn/no-array-callback-reference": "error",
|
|
1504
1508
|
"unicorn/no-array-for-each": "error",
|
|
@@ -1512,13 +1516,14 @@ var unicornRecommendedRules = {
|
|
|
1512
1516
|
"unicorn/no-empty-file": "error",
|
|
1513
1517
|
"unicorn/no-for-loop": "error",
|
|
1514
1518
|
"unicorn/no-hex-escape": "error",
|
|
1515
|
-
"unicorn/no-instanceof-
|
|
1519
|
+
"unicorn/no-instanceof-builtins": "error",
|
|
1516
1520
|
"unicorn/no-invalid-fetch-options": "error",
|
|
1517
1521
|
"unicorn/no-invalid-remove-event-listener": "error",
|
|
1518
1522
|
"unicorn/no-keyword-prefix": "off",
|
|
1519
1523
|
"unicorn/no-length-as-slice-end": "error",
|
|
1520
1524
|
"unicorn/no-lonely-if": "error",
|
|
1521
1525
|
"unicorn/no-magic-array-flat-depth": "error",
|
|
1526
|
+
"unicorn/no-named-default": "error",
|
|
1522
1527
|
"unicorn/no-negated-condition": "error",
|
|
1523
1528
|
"unicorn/no-negation-in-equality-check": "error",
|
|
1524
1529
|
"unicorn/no-nested-ternary": "error",
|
|
@@ -2225,7 +2230,7 @@ var yamlRecommendedRules = {
|
|
|
2225
2230
|
// End expansion
|
|
2226
2231
|
};
|
|
2227
2232
|
|
|
2228
|
-
// src/
|
|
2233
|
+
// src/utilities.ts
|
|
2229
2234
|
import process2 from "node:process";
|
|
2230
2235
|
async function combine(...configs) {
|
|
2231
2236
|
const resolved = await Promise.all(configs);
|
|
@@ -2295,16 +2300,16 @@ function generatePerfectionistSortConfig(strings, options) {
|
|
|
2295
2300
|
}
|
|
2296
2301
|
|
|
2297
2302
|
// src/configs/shared-js-ts.ts
|
|
2298
|
-
import
|
|
2299
|
-
import
|
|
2303
|
+
import pluginEslintComments from "@eslint-community/eslint-plugin-eslint-comments";
|
|
2304
|
+
import pluginTs from "@typescript-eslint/eslint-plugin";
|
|
2300
2305
|
import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
|
|
2301
2306
|
import * as pluginDepend from "eslint-plugin-depend";
|
|
2302
|
-
import
|
|
2303
|
-
import
|
|
2304
|
-
import
|
|
2305
|
-
import
|
|
2307
|
+
import pluginImport from "eslint-plugin-import-x";
|
|
2308
|
+
import pluginJsdocComments from "eslint-plugin-jsdoc";
|
|
2309
|
+
import pluginNode from "eslint-plugin-n";
|
|
2310
|
+
import pluginPerfectionist from "eslint-plugin-perfectionist";
|
|
2306
2311
|
import * as pluginRegexp from "eslint-plugin-regexp";
|
|
2307
|
-
import
|
|
2312
|
+
import pluginUnicorn from "eslint-plugin-unicorn";
|
|
2308
2313
|
var kpSharedDisableTypeCheckedRules = {
|
|
2309
2314
|
"jsdoc/check-tag-names": ["error", { typed: false }],
|
|
2310
2315
|
"jsdoc/no-types": "off"
|
|
@@ -2350,6 +2355,11 @@ var sharedScriptConfig = {
|
|
|
2350
2355
|
}
|
|
2351
2356
|
],
|
|
2352
2357
|
"eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
|
|
2358
|
+
// Overlaps with `unicorn/no-named-default`, and gives false positives for imports from CJS modules
|
|
2359
|
+
"import/default": "off",
|
|
2360
|
+
// Cope with Astro virtual modules
|
|
2361
|
+
// https://github.com/hannoeru/vite-plugin-pages/issues/41#issuecomment-1371880072
|
|
2362
|
+
"import/no-unresolved": ["error", { ignore: ["^astro:"] }],
|
|
2353
2363
|
"import/order": "off",
|
|
2354
2364
|
// Conflicts with perfectionist/sort-imports (but never enabled)
|
|
2355
2365
|
"jsdoc/require-description": ["error", { descriptionStyle: "body" }],
|
|
@@ -2495,6 +2505,8 @@ var sharedScriptConfig = {
|
|
|
2495
2505
|
props: false,
|
|
2496
2506
|
ref: false,
|
|
2497
2507
|
refs: false,
|
|
2508
|
+
sep: false,
|
|
2509
|
+
// Present in node:path library
|
|
2498
2510
|
src: false,
|
|
2499
2511
|
temp: false
|
|
2500
2512
|
}
|
|
@@ -2718,9 +2730,9 @@ async function disables() {
|
|
|
2718
2730
|
}
|
|
2719
2731
|
|
|
2720
2732
|
// src/configs/html.ts
|
|
2721
|
-
import
|
|
2722
|
-
import
|
|
2723
|
-
import
|
|
2733
|
+
import pluginHtml from "@html-eslint/eslint-plugin";
|
|
2734
|
+
import htmlParser from "@html-eslint/parser";
|
|
2735
|
+
import pluginHtmlScript from "eslint-plugin-html";
|
|
2724
2736
|
|
|
2725
2737
|
// src/presets/html.ts
|
|
2726
2738
|
var htmlRecommendedRules = {
|
|
@@ -3089,9 +3101,9 @@ async function js(options = {}) {
|
|
|
3089
3101
|
}
|
|
3090
3102
|
|
|
3091
3103
|
// src/configs/json.ts
|
|
3092
|
-
import
|
|
3104
|
+
import pluginJson from "eslint-plugin-jsonc";
|
|
3093
3105
|
import pluginJsonPackage from "eslint-plugin-package-json";
|
|
3094
|
-
import
|
|
3106
|
+
import parserJson from "jsonc-eslint-parser";
|
|
3095
3107
|
import { sortOrder as sortPackageJsonSortOrder } from "sort-package-json";
|
|
3096
3108
|
async function json(options = {}) {
|
|
3097
3109
|
const { overrides = {} } = options;
|
|
@@ -3175,7 +3187,9 @@ async function json(options = {}) {
|
|
|
3175
3187
|
"stylelint"
|
|
3176
3188
|
])
|
|
3177
3189
|
}
|
|
3178
|
-
]
|
|
3190
|
+
],
|
|
3191
|
+
"json-package/require-author": "error",
|
|
3192
|
+
"json-package/require-keywords": "error"
|
|
3179
3193
|
}
|
|
3180
3194
|
},
|
|
3181
3195
|
// Sort tsconfig
|
|
@@ -3316,7 +3330,7 @@ function customizeSortOrder(keys, newKeys) {
|
|
|
3316
3330
|
}
|
|
3317
3331
|
|
|
3318
3332
|
// src/configs/shared-jsx-tsx.ts
|
|
3319
|
-
import
|
|
3333
|
+
import pluginJsxA11y from "eslint-plugin-jsx-a11y";
|
|
3320
3334
|
var sharedJsxTsxConfig = {
|
|
3321
3335
|
// TODO inherit from ...sharedScriptConfig?
|
|
3322
3336
|
plugins: {
|
|
@@ -3695,8 +3709,8 @@ async function svelte(options = {}) {
|
|
|
3695
3709
|
}
|
|
3696
3710
|
|
|
3697
3711
|
// src/configs/test.ts
|
|
3698
|
-
import
|
|
3699
|
-
import
|
|
3712
|
+
import pluginTest from "@vitest/eslint-plugin";
|
|
3713
|
+
import pluginNoOnlyTests from "eslint-plugin-no-only-tests";
|
|
3700
3714
|
import globals3 from "globals";
|
|
3701
3715
|
var _pluginTest;
|
|
3702
3716
|
async function test(options = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/eslint-config",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.6",
|
|
4
4
|
"description": "ESLint configuration for @kitschpatrol/shared-config.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shared-config",
|
|
@@ -42,18 +42,18 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
45
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
46
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
47
|
-
"@html-eslint/parser": "^0.
|
|
45
|
+
"@eslint-react/eslint-plugin": "^1.27.0",
|
|
46
|
+
"@html-eslint/eslint-plugin": "^0.35.0",
|
|
47
|
+
"@html-eslint/parser": "^0.35.0",
|
|
48
48
|
"@pinojs/json-colorizer": "^4.0.0",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
50
|
-
"@typescript-eslint/parser": "^8.
|
|
51
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^8.25.0",
|
|
50
|
+
"@typescript-eslint/parser": "^8.25.0",
|
|
51
|
+
"@vitest/eslint-plugin": "^1.1.33",
|
|
52
52
|
"astro-eslint-parser": "^1.2.1",
|
|
53
|
-
"eslint": "^9.
|
|
54
|
-
"eslint-config-flat-gitignore": "^2.
|
|
53
|
+
"eslint": "^9.21.0",
|
|
54
|
+
"eslint-config-flat-gitignore": "^2.1.0",
|
|
55
55
|
"eslint-flat-config-utils": "^2.0.1",
|
|
56
|
-
"eslint-import-resolver-typescript": "^3.
|
|
56
|
+
"eslint-import-resolver-typescript": "^3.8.3",
|
|
57
57
|
"eslint-mdx": "^3.1.5",
|
|
58
58
|
"eslint-plugin-astro": "^1.3.1",
|
|
59
59
|
"eslint-plugin-depend": "^0.12.0",
|
|
@@ -65,20 +65,20 @@
|
|
|
65
65
|
"eslint-plugin-mdx": "^3.1.5",
|
|
66
66
|
"eslint-plugin-n": "^17.15.1",
|
|
67
67
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
68
|
-
"eslint-plugin-package-json": "^0.
|
|
69
|
-
"eslint-plugin-perfectionist": "^4.
|
|
68
|
+
"eslint-plugin-package-json": "^0.26.0",
|
|
69
|
+
"eslint-plugin-perfectionist": "^4.9.0",
|
|
70
70
|
"eslint-plugin-regexp": "^2.7.0",
|
|
71
71
|
"eslint-plugin-svelte": "^2.46.1",
|
|
72
72
|
"eslint-plugin-toml": "^0.12.0",
|
|
73
|
-
"eslint-plugin-unicorn": "^
|
|
74
|
-
"eslint-plugin-yml": "^1.
|
|
73
|
+
"eslint-plugin-unicorn": "^57.0.0",
|
|
74
|
+
"eslint-plugin-yml": "^1.17.0",
|
|
75
75
|
"execa": "^9.5.2",
|
|
76
76
|
"find-workspaces": "^0.3.1",
|
|
77
77
|
"fs-extra": "^11.3.0",
|
|
78
|
-
"globals": "^
|
|
78
|
+
"globals": "^16.0.0",
|
|
79
79
|
"jsonc-eslint-parser": "^2.4.0",
|
|
80
80
|
"local-pkg": "^1.0.0",
|
|
81
|
-
"prettier": "^3.
|
|
81
|
+
"prettier": "^3.5.2",
|
|
82
82
|
"sort-package-json": "^2.14.0",
|
|
83
83
|
"svelte-eslint-parser": "^0.43.0",
|
|
84
84
|
"toml-eslint-parser": "^0.10.0",
|
|
@@ -90,12 +90,12 @@
|
|
|
90
90
|
"dot-prop": "^9.0.0",
|
|
91
91
|
"eslint-config-prettier": "^10.0.1",
|
|
92
92
|
"eslint-config-xo-typescript": "^7.0.0",
|
|
93
|
-
"eslint-typegen": "^
|
|
94
|
-
"svelte": "^5.
|
|
95
|
-
"tsup": "^8.
|
|
93
|
+
"eslint-typegen": "^2.0.0",
|
|
94
|
+
"svelte": "^5.20.4",
|
|
95
|
+
"tsup": "^8.4.0"
|
|
96
96
|
},
|
|
97
97
|
"engines": {
|
|
98
|
-
"node": ">=22.
|
|
98
|
+
"node": ">=22.13.1",
|
|
99
99
|
"pnpm": ">=10.0.0"
|
|
100
100
|
},
|
|
101
101
|
"publishConfig": {
|