@kitschpatrol/eslint-config 5.0.5 → 5.0.7
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 +24 -14
- package/dist/index.d.ts +2051 -440
- package/dist/index.js +53 -21
- package/package.json +28 -28
package/dist/index.js
CHANGED
|
@@ -1313,7 +1313,7 @@ var reactRecommendedTypeCheckedRules = {
|
|
|
1313
1313
|
"react/no-default-props": "error",
|
|
1314
1314
|
"react/no-direct-mutation-state": "error",
|
|
1315
1315
|
"react/no-duplicate-jsx-props": "off",
|
|
1316
|
-
"react/no-duplicate-key": "
|
|
1316
|
+
"react/no-duplicate-key": "warn",
|
|
1317
1317
|
"react/no-forward-ref": "warn",
|
|
1318
1318
|
"react/no-implicit-key": "warn",
|
|
1319
1319
|
"react/no-missing-key": "error",
|
|
@@ -1437,21 +1437,40 @@ var regexpRecommendedRules = {
|
|
|
1437
1437
|
|
|
1438
1438
|
// src/presets/svelte.ts
|
|
1439
1439
|
var svelteRecommendedRules = {
|
|
1440
|
-
//
|
|
1440
|
+
// Brittle since there's no negative index access in dot-prop
|
|
1441
|
+
// Begin expansion 'eslint-plugin-svelte' 'flat/recommended[3]'
|
|
1441
1442
|
"svelte/comment-directive": "error",
|
|
1443
|
+
"svelte/infinite-reactive-loop": "error",
|
|
1442
1444
|
"svelte/no-at-debug-tags": "warn",
|
|
1443
1445
|
"svelte/no-at-html-tags": "error",
|
|
1446
|
+
"svelte/no-dom-manipulating": "error",
|
|
1444
1447
|
"svelte/no-dupe-else-if-blocks": "error",
|
|
1448
|
+
"svelte/no-dupe-on-directives": "error",
|
|
1445
1449
|
"svelte/no-dupe-style-properties": "error",
|
|
1446
|
-
"svelte/no-
|
|
1450
|
+
"svelte/no-dupe-use-directives": "error",
|
|
1451
|
+
"svelte/no-export-load-in-svelte-module-in-kit-pages": "error",
|
|
1452
|
+
"svelte/no-immutable-reactive-statements": "error",
|
|
1447
1453
|
"svelte/no-inner-declarations": "error",
|
|
1454
|
+
"svelte/no-inspect": "warn",
|
|
1448
1455
|
"svelte/no-not-function-handler": "error",
|
|
1449
1456
|
"svelte/no-object-in-text-mustaches": "error",
|
|
1457
|
+
"svelte/no-raw-special-elements": "error",
|
|
1458
|
+
"svelte/no-reactive-functions": "error",
|
|
1459
|
+
"svelte/no-reactive-literals": "error",
|
|
1460
|
+
"svelte/no-reactive-reassign": "error",
|
|
1450
1461
|
"svelte/no-shorthand-style-property-overrides": "error",
|
|
1462
|
+
"svelte/no-store-async": "error",
|
|
1463
|
+
"svelte/no-svelte-internal": "error",
|
|
1451
1464
|
"svelte/no-unknown-style-directive-property": "error",
|
|
1452
1465
|
"svelte/no-unused-svelte-ignore": "error",
|
|
1466
|
+
"svelte/no-useless-children-snippet": "error",
|
|
1467
|
+
"svelte/no-useless-mustaches": "error",
|
|
1468
|
+
"svelte/require-each-key": "error",
|
|
1469
|
+
"svelte/require-event-dispatcher-types": "error",
|
|
1470
|
+
"svelte/require-store-reactive-access": "error",
|
|
1453
1471
|
"svelte/system": "error",
|
|
1454
|
-
"svelte/valid-
|
|
1472
|
+
"svelte/valid-each-key": "error",
|
|
1473
|
+
"svelte/valid-prop-names-in-kit-pages": "error"
|
|
1455
1474
|
// End expansion
|
|
1456
1475
|
};
|
|
1457
1476
|
|
|
@@ -1486,6 +1505,8 @@ var unicornRecommendedRules = {
|
|
|
1486
1505
|
"no-nested-ternary": "off",
|
|
1487
1506
|
"unicorn/better-regex": "off",
|
|
1488
1507
|
"unicorn/catch-error-name": "error",
|
|
1508
|
+
"unicorn/consistent-assert": "error",
|
|
1509
|
+
"unicorn/consistent-date-clone": "error",
|
|
1489
1510
|
"unicorn/consistent-destructuring": "off",
|
|
1490
1511
|
"unicorn/consistent-empty-array-spread": "error",
|
|
1491
1512
|
"unicorn/consistent-existence-index-check": "error",
|
|
@@ -1500,6 +1521,7 @@ var unicornRecommendedRules = {
|
|
|
1500
1521
|
"unicorn/import-style": "error",
|
|
1501
1522
|
"unicorn/new-for-builtins": "error",
|
|
1502
1523
|
"unicorn/no-abusive-eslint-disable": "error",
|
|
1524
|
+
"unicorn/no-accessor-recursion": "error",
|
|
1503
1525
|
"unicorn/no-anonymous-default-export": "error",
|
|
1504
1526
|
"unicorn/no-array-callback-reference": "error",
|
|
1505
1527
|
"unicorn/no-array-for-each": "error",
|
|
@@ -1513,13 +1535,14 @@ var unicornRecommendedRules = {
|
|
|
1513
1535
|
"unicorn/no-empty-file": "error",
|
|
1514
1536
|
"unicorn/no-for-loop": "error",
|
|
1515
1537
|
"unicorn/no-hex-escape": "error",
|
|
1516
|
-
"unicorn/no-instanceof-
|
|
1538
|
+
"unicorn/no-instanceof-builtins": "error",
|
|
1517
1539
|
"unicorn/no-invalid-fetch-options": "error",
|
|
1518
1540
|
"unicorn/no-invalid-remove-event-listener": "error",
|
|
1519
1541
|
"unicorn/no-keyword-prefix": "off",
|
|
1520
1542
|
"unicorn/no-length-as-slice-end": "error",
|
|
1521
1543
|
"unicorn/no-lonely-if": "error",
|
|
1522
1544
|
"unicorn/no-magic-array-flat-depth": "error",
|
|
1545
|
+
"unicorn/no-named-default": "error",
|
|
1523
1546
|
"unicorn/no-negated-condition": "error",
|
|
1524
1547
|
"unicorn/no-negation-in-equality-check": "error",
|
|
1525
1548
|
"unicorn/no-nested-ternary": "error",
|
|
@@ -2226,7 +2249,7 @@ var yamlRecommendedRules = {
|
|
|
2226
2249
|
// End expansion
|
|
2227
2250
|
};
|
|
2228
2251
|
|
|
2229
|
-
// src/
|
|
2252
|
+
// src/utilities.ts
|
|
2230
2253
|
import process2 from "node:process";
|
|
2231
2254
|
async function combine(...configs) {
|
|
2232
2255
|
const resolved = await Promise.all(configs);
|
|
@@ -2296,16 +2319,16 @@ function generatePerfectionistSortConfig(strings, options) {
|
|
|
2296
2319
|
}
|
|
2297
2320
|
|
|
2298
2321
|
// src/configs/shared-js-ts.ts
|
|
2299
|
-
import
|
|
2300
|
-
import
|
|
2322
|
+
import pluginEslintComments from "@eslint-community/eslint-plugin-eslint-comments";
|
|
2323
|
+
import pluginTs from "@typescript-eslint/eslint-plugin";
|
|
2301
2324
|
import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
|
|
2302
2325
|
import * as pluginDepend from "eslint-plugin-depend";
|
|
2303
|
-
import
|
|
2304
|
-
import
|
|
2305
|
-
import
|
|
2306
|
-
import
|
|
2326
|
+
import pluginImport from "eslint-plugin-import-x";
|
|
2327
|
+
import pluginJsdocComments from "eslint-plugin-jsdoc";
|
|
2328
|
+
import pluginNode from "eslint-plugin-n";
|
|
2329
|
+
import pluginPerfectionist from "eslint-plugin-perfectionist";
|
|
2307
2330
|
import * as pluginRegexp from "eslint-plugin-regexp";
|
|
2308
|
-
import
|
|
2331
|
+
import pluginUnicorn from "eslint-plugin-unicorn";
|
|
2309
2332
|
var kpSharedDisableTypeCheckedRules = {
|
|
2310
2333
|
"jsdoc/check-tag-names": ["error", { typed: false }],
|
|
2311
2334
|
"jsdoc/no-types": "off"
|
|
@@ -2351,6 +2374,11 @@ var sharedScriptConfig = {
|
|
|
2351
2374
|
}
|
|
2352
2375
|
],
|
|
2353
2376
|
"eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
|
|
2377
|
+
// Overlaps with `unicorn/no-named-default`, and gives false positives for imports from CJS modules
|
|
2378
|
+
"import/default": "off",
|
|
2379
|
+
// Cope with Astro virtual modules
|
|
2380
|
+
// https://github.com/hannoeru/vite-plugin-pages/issues/41#issuecomment-1371880072
|
|
2381
|
+
"import/no-unresolved": ["error", { ignore: ["^astro:"] }],
|
|
2354
2382
|
"import/order": "off",
|
|
2355
2383
|
// Conflicts with perfectionist/sort-imports (but never enabled)
|
|
2356
2384
|
"jsdoc/require-description": ["error", { descriptionStyle: "body" }],
|
|
@@ -2447,6 +2475,8 @@ var sharedScriptConfig = {
|
|
|
2447
2475
|
modifiers: ["const", "exported"],
|
|
2448
2476
|
// Allow UPPER_CASE const exports
|
|
2449
2477
|
selector: "variable"
|
|
2478
|
+
// Not objects...
|
|
2479
|
+
// types: ['boolean', 'string', 'number', 'array'],
|
|
2450
2480
|
}
|
|
2451
2481
|
// {
|
|
2452
2482
|
// filter: {
|
|
@@ -2496,6 +2526,8 @@ var sharedScriptConfig = {
|
|
|
2496
2526
|
props: false,
|
|
2497
2527
|
ref: false,
|
|
2498
2528
|
refs: false,
|
|
2529
|
+
sep: false,
|
|
2530
|
+
// Present in node:path library
|
|
2499
2531
|
src: false,
|
|
2500
2532
|
temp: false
|
|
2501
2533
|
}
|
|
@@ -2719,9 +2751,9 @@ async function disables() {
|
|
|
2719
2751
|
}
|
|
2720
2752
|
|
|
2721
2753
|
// src/configs/html.ts
|
|
2722
|
-
import
|
|
2723
|
-
import
|
|
2724
|
-
import
|
|
2754
|
+
import pluginHtml from "@html-eslint/eslint-plugin";
|
|
2755
|
+
import htmlParser from "@html-eslint/parser";
|
|
2756
|
+
import pluginHtmlScript from "eslint-plugin-html";
|
|
2725
2757
|
|
|
2726
2758
|
// src/presets/html.ts
|
|
2727
2759
|
var htmlRecommendedRules = {
|
|
@@ -3090,9 +3122,9 @@ async function js(options = {}) {
|
|
|
3090
3122
|
}
|
|
3091
3123
|
|
|
3092
3124
|
// src/configs/json.ts
|
|
3093
|
-
import
|
|
3125
|
+
import pluginJson from "eslint-plugin-jsonc";
|
|
3094
3126
|
import pluginJsonPackage from "eslint-plugin-package-json";
|
|
3095
|
-
import
|
|
3127
|
+
import parserJson from "jsonc-eslint-parser";
|
|
3096
3128
|
import { sortOrder as sortPackageJsonSortOrder } from "sort-package-json";
|
|
3097
3129
|
async function json(options = {}) {
|
|
3098
3130
|
const { overrides = {} } = options;
|
|
@@ -3319,7 +3351,7 @@ function customizeSortOrder(keys, newKeys) {
|
|
|
3319
3351
|
}
|
|
3320
3352
|
|
|
3321
3353
|
// src/configs/shared-jsx-tsx.ts
|
|
3322
|
-
import
|
|
3354
|
+
import pluginJsxA11y from "eslint-plugin-jsx-a11y";
|
|
3323
3355
|
var sharedJsxTsxConfig = {
|
|
3324
3356
|
// TODO inherit from ...sharedScriptConfig?
|
|
3325
3357
|
plugins: {
|
|
@@ -3698,8 +3730,8 @@ async function svelte(options = {}) {
|
|
|
3698
3730
|
}
|
|
3699
3731
|
|
|
3700
3732
|
// src/configs/test.ts
|
|
3701
|
-
import
|
|
3702
|
-
import
|
|
3733
|
+
import pluginTest from "@vitest/eslint-plugin";
|
|
3734
|
+
import pluginNoOnlyTests from "eslint-plugin-no-only-tests";
|
|
3703
3735
|
import globals3 from "globals";
|
|
3704
3736
|
var _pluginTest;
|
|
3705
3737
|
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.7",
|
|
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.29.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.36",
|
|
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",
|
|
@@ -63,40 +63,40 @@
|
|
|
63
63
|
"eslint-plugin-jsonc": "^2.19.1",
|
|
64
64
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
65
65
|
"eslint-plugin-mdx": "^3.1.5",
|
|
66
|
-
"eslint-plugin-n": "^17.
|
|
66
|
+
"eslint-plugin-n": "^17.16.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.1",
|
|
69
|
+
"eslint-plugin-perfectionist": "^4.9.0",
|
|
70
70
|
"eslint-plugin-regexp": "^2.7.0",
|
|
71
|
-
"eslint-plugin-svelte": "^
|
|
71
|
+
"eslint-plugin-svelte": "^3.0.2",
|
|
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
|
-
"local-pkg": "^1.
|
|
81
|
-
"prettier": "^3.5.
|
|
82
|
-
"sort-package-json": "^2.
|
|
83
|
-
"svelte-eslint-parser": "^0.
|
|
80
|
+
"local-pkg": "^1.1.0",
|
|
81
|
+
"prettier": "^3.5.2",
|
|
82
|
+
"sort-package-json": "^2.15.1",
|
|
83
|
+
"svelte-eslint-parser": "^1.0.0",
|
|
84
84
|
"toml-eslint-parser": "^0.10.0",
|
|
85
|
-
"yaml-eslint-parser": "^1.
|
|
85
|
+
"yaml-eslint-parser": "^1.3.0"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
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.0.
|
|
91
|
+
"eslint-config-prettier": "^10.0.2",
|
|
92
92
|
"eslint-config-xo-typescript": "^7.0.0",
|
|
93
|
-
"eslint-typegen": "^
|
|
94
|
-
"
|
|
95
|
-
"
|
|
93
|
+
"eslint-typegen": "^2.0.0",
|
|
94
|
+
"globby": "^14.1.0",
|
|
95
|
+
"svelte": "^5.20.5",
|
|
96
|
+
"tsup": "^8.4.0"
|
|
96
97
|
},
|
|
97
98
|
"engines": {
|
|
98
|
-
"node": ">=
|
|
99
|
-
"pnpm": ">=10.0.0"
|
|
99
|
+
"node": ">=20.9.0"
|
|
100
100
|
},
|
|
101
101
|
"publishConfig": {
|
|
102
102
|
"access": "public"
|