@kitschpatrol/eslint-config 5.3.1 → 5.4.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.
- package/bin/cli.js +1 -1
- package/dist/index.d.ts +380 -280
- package/dist/index.js +30 -14
- package/package.json +22 -22
package/dist/index.js
CHANGED
|
@@ -763,7 +763,7 @@ var jsonPrettierRules = {
|
|
|
763
763
|
|
|
764
764
|
// src/presets/json-package.ts
|
|
765
765
|
var jsonPackageRecommendedRules = {
|
|
766
|
-
// Begin expansion 'eslint-plugin-package-json
|
|
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
769
|
"json-package/require-name": "error",
|
|
@@ -1295,7 +1295,8 @@ var prettierRules = {
|
|
|
1295
1295
|
// src/presets/react.ts
|
|
1296
1296
|
var reactRecommendedTypeCheckedRules = {
|
|
1297
1297
|
// Begin expansion '@eslint-react/eslint-plugin' 'recommended-type-checked'
|
|
1298
|
-
"react/
|
|
1298
|
+
"react/jsx-no-duplicate-props": "off",
|
|
1299
|
+
"react/jsx-uses-vars": "off",
|
|
1299
1300
|
"react/no-access-state-in-setstate": "error",
|
|
1300
1301
|
"react/no-array-index-key": "warn",
|
|
1301
1302
|
"react/no-children-count": "warn",
|
|
@@ -1312,12 +1313,11 @@ var reactRecommendedTypeCheckedRules = {
|
|
|
1312
1313
|
"react/no-create-ref": "error",
|
|
1313
1314
|
"react/no-default-props": "error",
|
|
1314
1315
|
"react/no-direct-mutation-state": "error",
|
|
1315
|
-
"react/no-duplicate-jsx-props": "off",
|
|
1316
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",
|
|
1320
|
-
"react/no-nested-
|
|
1320
|
+
"react/no-nested-component-definitions": "error",
|
|
1321
1321
|
"react/no-prop-types": "error",
|
|
1322
1322
|
"react/no-redundant-should-component-update": "error",
|
|
1323
1323
|
"react/no-set-state-in-component-did-mount": "warn",
|
|
@@ -1332,28 +1332,30 @@ var reactRecommendedTypeCheckedRules = {
|
|
|
1332
1332
|
"react/no-unused-class-component-members": "warn",
|
|
1333
1333
|
"react/no-unused-state": "warn",
|
|
1334
1334
|
"react/no-use-context": "warn",
|
|
1335
|
-
"react/
|
|
1335
|
+
"react/no-useless-forward-ref": "warn",
|
|
1336
|
+
"react/no-useless-fragment": "warn",
|
|
1336
1337
|
"react-dom/no-dangerously-set-innerhtml": "warn",
|
|
1337
1338
|
"react-dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
1338
1339
|
"react-dom/no-find-dom-node": "error",
|
|
1340
|
+
"react-dom/no-flush-sync": "error",
|
|
1339
1341
|
"react-dom/no-missing-button-type": "warn",
|
|
1340
1342
|
"react-dom/no-missing-iframe-sandbox": "warn",
|
|
1341
1343
|
"react-dom/no-namespace": "error",
|
|
1344
|
+
"react-dom/no-render": "error",
|
|
1342
1345
|
"react-dom/no-render-return-value": "error",
|
|
1343
1346
|
"react-dom/no-script-url": "warn",
|
|
1347
|
+
"react-dom/no-unknown-property": "off",
|
|
1344
1348
|
"react-dom/no-unsafe-iframe-sandbox": "warn",
|
|
1345
1349
|
"react-dom/no-unsafe-target-blank": "warn",
|
|
1346
|
-
"react-dom/no-
|
|
1350
|
+
"react-dom/no-use-form-state": "error",
|
|
1351
|
+
"react-dom/no-void-elements-with-children": "error",
|
|
1347
1352
|
"react-web-api/no-leaked-event-listener": "warn",
|
|
1348
1353
|
"react-web-api/no-leaked-interval": "warn",
|
|
1349
1354
|
"react-web-api/no-leaked-resize-observer": "warn",
|
|
1350
1355
|
"react-web-api/no-leaked-timeout": "warn",
|
|
1351
1356
|
"react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
|
|
1352
|
-
"react-hooks-extra/no-
|
|
1357
|
+
"react-hooks-extra/no-unnecessary-use-prefix": "warn",
|
|
1353
1358
|
"react-hooks-extra/prefer-use-state-lazy-initialization": "warn",
|
|
1354
|
-
"react-naming-convention/context-name": "warn",
|
|
1355
|
-
"react-naming-convention/use-state": "warn",
|
|
1356
|
-
"react-dom/no-unknown-property": "off",
|
|
1357
1359
|
"react/no-leaked-conditional-rendering": "warn"
|
|
1358
1360
|
// End expansion
|
|
1359
1361
|
};
|
|
@@ -1464,6 +1466,8 @@ var svelteRecommendedRules = {
|
|
|
1464
1466
|
"svelte/no-store-async": "error",
|
|
1465
1467
|
"svelte/no-svelte-internal": "error",
|
|
1466
1468
|
"svelte/no-unknown-style-directive-property": "error",
|
|
1469
|
+
"svelte/no-unnecessary-state-wrap": "error",
|
|
1470
|
+
"svelte/no-unused-props": "error",
|
|
1467
1471
|
"svelte/no-unused-svelte-ignore": "error",
|
|
1468
1472
|
"svelte/no-useless-children-snippet": "error",
|
|
1469
1473
|
"svelte/no-useless-mustaches": "error",
|
|
@@ -1953,7 +1957,14 @@ var xoTypescriptRules = {
|
|
|
1953
1957
|
],
|
|
1954
1958
|
"ts/consistent-type-definitions": ["error", "type"],
|
|
1955
1959
|
"ts/consistent-type-exports": ["error", { fixMixedExportsWithInlineTypeSpecifier: true }],
|
|
1956
|
-
"ts/consistent-type-imports": [
|
|
1960
|
+
"ts/consistent-type-imports": [
|
|
1961
|
+
"error",
|
|
1962
|
+
{
|
|
1963
|
+
disallowTypeAnnotations: false,
|
|
1964
|
+
fixStyle: "separate-type-imports",
|
|
1965
|
+
prefer: "type-imports"
|
|
1966
|
+
}
|
|
1967
|
+
],
|
|
1957
1968
|
"func-call-spacing": "off",
|
|
1958
1969
|
// "@stylistic/func-call-spacing":["error","never"],
|
|
1959
1970
|
indent: "off",
|
|
@@ -2259,7 +2270,7 @@ async function combine(...configs) {
|
|
|
2259
2270
|
}
|
|
2260
2271
|
async function interopDefault(m) {
|
|
2261
2272
|
const resolved = await m;
|
|
2262
|
-
return resolved.default
|
|
2273
|
+
return resolved.default ?? resolved;
|
|
2263
2274
|
}
|
|
2264
2275
|
function isInEditorEnv() {
|
|
2265
2276
|
if (process2.env.CI) return false;
|
|
@@ -2403,6 +2414,7 @@ var sharedScriptConfig = {
|
|
|
2403
2414
|
}
|
|
2404
2415
|
],
|
|
2405
2416
|
"eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
|
|
2417
|
+
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
|
2406
2418
|
// Overlaps with `unicorn/no-named-default`, and gives false positives for imports from CJS modules
|
|
2407
2419
|
"import/default": "off",
|
|
2408
2420
|
// IMO using the default can help with code readability / disambiguation of a function's origin
|
|
@@ -2581,6 +2593,8 @@ var sharedScriptConfig = {
|
|
|
2581
2593
|
],
|
|
2582
2594
|
"ts/sort-type-constituents": "off",
|
|
2583
2595
|
// Conflicts with perfectionist/sort-intersection-types
|
|
2596
|
+
"unicorn/import-style": "off",
|
|
2597
|
+
// Conflicts with import/consistent-type-specifier-style prefer-top-level
|
|
2584
2598
|
"unicorn/prevent-abbreviations": [
|
|
2585
2599
|
"error",
|
|
2586
2600
|
{
|
|
@@ -3305,7 +3319,7 @@ async function json(options = {}) {
|
|
|
3305
3319
|
name: "kp/json/rules-tsconfig",
|
|
3306
3320
|
rules: {
|
|
3307
3321
|
"json/no-comments": "off",
|
|
3308
|
-
"
|
|
3322
|
+
"jsonc/sort-keys": [
|
|
3309
3323
|
"error",
|
|
3310
3324
|
{
|
|
3311
3325
|
order: ["extends", "compilerOptions", "references", "files", "include", "exclude"],
|
|
@@ -3333,6 +3347,7 @@ async function json(options = {}) {
|
|
|
3333
3347
|
"useDefineForClassFields",
|
|
3334
3348
|
"emitDecoratorMetadata",
|
|
3335
3349
|
"experimentalDecorators",
|
|
3350
|
+
"libReplacement",
|
|
3336
3351
|
/* Modules */
|
|
3337
3352
|
"baseUrl",
|
|
3338
3353
|
"rootDir",
|
|
@@ -3407,6 +3422,7 @@ async function json(options = {}) {
|
|
|
3407
3422
|
"isolatedModules",
|
|
3408
3423
|
"preserveSymlinks",
|
|
3409
3424
|
"verbatimModuleSyntax",
|
|
3425
|
+
"erasableSyntaxOnly",
|
|
3410
3426
|
/* Completeness */
|
|
3411
3427
|
"skipDefaultLibCheck",
|
|
3412
3428
|
"skipLibCheck"
|
|
@@ -3825,7 +3841,7 @@ import globals3 from "globals";
|
|
|
3825
3841
|
var _pluginTest;
|
|
3826
3842
|
async function test(options = {}) {
|
|
3827
3843
|
const { isInEditor = false, overrides = {} } = options;
|
|
3828
|
-
_pluginTest
|
|
3844
|
+
_pluginTest ??= {
|
|
3829
3845
|
...pluginTest,
|
|
3830
3846
|
// eslint-disable-next-line ts/no-unsafe-assignment
|
|
3831
3847
|
rules: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/eslint-config",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "ESLint configuration for @kitschpatrol/shared-config.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shared-config",
|
|
@@ -42,35 +42,35 @@
|
|
|
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.38.2",
|
|
46
|
+
"@html-eslint/eslint-plugin": "^0.37.0",
|
|
47
|
+
"@html-eslint/parser": "^0.37.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.
|
|
52
|
-
"astro-eslint-parser": "^1.2.
|
|
53
|
-
"eslint": "^9.
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
|
50
|
+
"@typescript-eslint/parser": "^8.28.0",
|
|
51
|
+
"@vitest/eslint-plugin": "^1.1.38",
|
|
52
|
+
"astro-eslint-parser": "^1.2.2",
|
|
53
|
+
"eslint": "^9.23.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.
|
|
57
|
-
"eslint-mdx": "^3.
|
|
56
|
+
"eslint-import-resolver-typescript": "^3.10.0",
|
|
57
|
+
"eslint-mdx": "^3.3.1",
|
|
58
58
|
"eslint-plugin-astro": "^1.3.1",
|
|
59
59
|
"eslint-plugin-depend": "^0.12.0",
|
|
60
60
|
"eslint-plugin-html": "^8.1.2",
|
|
61
|
-
"eslint-plugin-import-x": "^4.
|
|
62
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
63
|
-
"eslint-plugin-jsonc": "^2.
|
|
61
|
+
"eslint-plugin-import-x": "^4.9.3",
|
|
62
|
+
"eslint-plugin-jsdoc": "^50.6.9",
|
|
63
|
+
"eslint-plugin-jsonc": "^2.20.0",
|
|
64
64
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
65
|
-
"eslint-plugin-mdx": "^3.
|
|
66
|
-
"eslint-plugin-n": "^17.
|
|
65
|
+
"eslint-plugin-mdx": "^3.3.1",
|
|
66
|
+
"eslint-plugin-n": "^17.17.0",
|
|
67
67
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
68
|
-
"eslint-plugin-package-json": "^0.
|
|
68
|
+
"eslint-plugin-package-json": "^0.29.0",
|
|
69
69
|
"eslint-plugin-perfectionist": "^4.10.1",
|
|
70
70
|
"eslint-plugin-regexp": "^2.7.0",
|
|
71
|
-
"eslint-plugin-svelte": "^3.
|
|
71
|
+
"eslint-plugin-svelte": "^3.3.3",
|
|
72
72
|
"eslint-plugin-toml": "^0.12.0",
|
|
73
|
-
"eslint-plugin-unicorn": "^
|
|
73
|
+
"eslint-plugin-unicorn": "^58.0.0",
|
|
74
74
|
"eslint-plugin-yml": "^1.17.0",
|
|
75
75
|
"execa": "^9.5.2",
|
|
76
76
|
"find-workspaces": "^0.3.1",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"local-pkg": "^1.1.1",
|
|
81
81
|
"prettier": "^3.5.3",
|
|
82
82
|
"sort-package-json": "^3.0.0",
|
|
83
|
-
"svelte-eslint-parser": "^1.
|
|
83
|
+
"svelte-eslint-parser": "^1.1.1",
|
|
84
84
|
"toml-eslint-parser": "^0.10.0",
|
|
85
85
|
"yaml-eslint-parser": "^1.3.0"
|
|
86
86
|
},
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
"dot-prop": "^9.0.0",
|
|
91
91
|
"eslint-config-prettier": "^10.1.1",
|
|
92
92
|
"eslint-config-xo-typescript": "^7.0.0",
|
|
93
|
-
"eslint-typegen": "^2.
|
|
93
|
+
"eslint-typegen": "^2.1.0",
|
|
94
94
|
"globby": "^14.1.0",
|
|
95
|
-
"svelte": "^5.
|
|
95
|
+
"svelte": "^5.25.3",
|
|
96
96
|
"tsup": "^8.4.0"
|
|
97
97
|
},
|
|
98
98
|
"engines": {
|