@kitschpatrol/eslint-config 5.6.0 → 5.7.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.
package/dist/index.js CHANGED
@@ -564,6 +564,9 @@ var jsdocCommentsRecommendedTypescriptFlavorRules = {
564
564
  "jsdoc/no-restricted-syntax": "off",
565
565
  "jsdoc/no-types": "off",
566
566
  "jsdoc/no-undefined-types": "off",
567
+ "jsdoc/prefer-import-tag": "off",
568
+ "jsdoc/reject-any-type": "warn",
569
+ "jsdoc/reject-function-type": "warn",
567
570
  "jsdoc/require-asterisk-prefix": "off",
568
571
  "jsdoc/require-description": "off",
569
572
  "jsdoc/require-description-complete-sentence": "off",
@@ -571,6 +574,8 @@ var jsdocCommentsRecommendedTypescriptFlavorRules = {
571
574
  "jsdoc/require-file-overview": "off",
572
575
  "jsdoc/require-hyphen-before-param-description": "off",
573
576
  "jsdoc/require-jsdoc": "warn",
577
+ "jsdoc/require-next-description": "off",
578
+ "jsdoc/require-next-type": "warn",
574
579
  "jsdoc/require-param": "warn",
575
580
  "jsdoc/require-param-description": "warn",
576
581
  "jsdoc/require-param-name": "warn",
@@ -583,13 +588,20 @@ var jsdocCommentsRecommendedTypescriptFlavorRules = {
583
588
  "jsdoc/require-returns-check": "warn",
584
589
  "jsdoc/require-returns-description": "warn",
585
590
  "jsdoc/require-returns-type": "warn",
591
+ "jsdoc/require-tags": "off",
586
592
  "jsdoc/require-template": "off",
593
+ "jsdoc/require-template-description": "off",
587
594
  "jsdoc/require-throws": "off",
595
+ "jsdoc/require-throws-description": "off",
596
+ "jsdoc/require-throws-type": "warn",
588
597
  "jsdoc/require-yields": "warn",
589
598
  "jsdoc/require-yields-check": "warn",
599
+ "jsdoc/require-yields-description": "off",
600
+ "jsdoc/require-yields-type": "warn",
590
601
  "jsdoc/sort-tags": "off",
591
602
  "jsdoc/tag-lines": "warn",
592
603
  "jsdoc/text-escaping": "off",
604
+ "jsdoc/type-formatting": "off",
593
605
  "jsdoc/valid-types": "warn"
594
606
  // End expansion
595
607
  };
@@ -625,6 +637,9 @@ var jsdocCommentsRecommendedTypescriptRules = {
625
637
  "jsdoc/no-restricted-syntax": "off",
626
638
  "jsdoc/no-types": "warn",
627
639
  "jsdoc/no-undefined-types": "off",
640
+ "jsdoc/prefer-import-tag": "off",
641
+ "jsdoc/reject-any-type": "warn",
642
+ "jsdoc/reject-function-type": "warn",
628
643
  "jsdoc/require-asterisk-prefix": "off",
629
644
  "jsdoc/require-description": "off",
630
645
  "jsdoc/require-description-complete-sentence": "off",
@@ -632,6 +647,8 @@ var jsdocCommentsRecommendedTypescriptRules = {
632
647
  "jsdoc/require-file-overview": "off",
633
648
  "jsdoc/require-hyphen-before-param-description": "off",
634
649
  "jsdoc/require-jsdoc": "warn",
650
+ "jsdoc/require-next-description": "off",
651
+ "jsdoc/require-next-type": "warn",
635
652
  "jsdoc/require-param": "warn",
636
653
  "jsdoc/require-param-description": "warn",
637
654
  "jsdoc/require-param-name": "warn",
@@ -644,13 +661,20 @@ var jsdocCommentsRecommendedTypescriptRules = {
644
661
  "jsdoc/require-returns-check": "warn",
645
662
  "jsdoc/require-returns-description": "warn",
646
663
  "jsdoc/require-returns-type": "off",
664
+ "jsdoc/require-tags": "off",
647
665
  "jsdoc/require-template": "off",
666
+ "jsdoc/require-template-description": "off",
648
667
  "jsdoc/require-throws": "off",
668
+ "jsdoc/require-throws-description": "off",
669
+ "jsdoc/require-throws-type": "warn",
649
670
  "jsdoc/require-yields": "warn",
650
671
  "jsdoc/require-yields-check": "warn",
672
+ "jsdoc/require-yields-description": "off",
673
+ "jsdoc/require-yields-type": "warn",
651
674
  "jsdoc/sort-tags": "off",
652
675
  "jsdoc/tag-lines": "warn",
653
676
  "jsdoc/text-escaping": "off",
677
+ "jsdoc/type-formatting": "off",
654
678
  "jsdoc/valid-types": "warn"
655
679
  // End expansion
656
680
  };
@@ -1343,7 +1367,7 @@ var prettierRules = {
1343
1367
  // src/presets/react.ts
1344
1368
  var reactRecommendedTypeCheckedRules = {
1345
1369
  // Begin expansion '@eslint-react/eslint-plugin' 'recommended-type-checked'
1346
- "react/jsx-key-before-spread": "warn",
1370
+ "react/jsx-no-comment-textnodes": "warn",
1347
1371
  "react/jsx-no-duplicate-props": "off",
1348
1372
  "react/jsx-uses-react": "off",
1349
1373
  "react/jsx-uses-vars": "off",
@@ -1355,7 +1379,6 @@ var reactRecommendedTypeCheckedRules = {
1355
1379
  "react/no-children-only": "warn",
1356
1380
  "react/no-children-to-array": "warn",
1357
1381
  "react/no-clone-element": "warn",
1358
- "react/no-comment-textnodes": "warn",
1359
1382
  "react/no-component-will-mount": "error",
1360
1383
  "react/no-component-will-receive-props": "error",
1361
1384
  "react/no-component-will-update": "error",
@@ -1363,19 +1386,19 @@ var reactRecommendedTypeCheckedRules = {
1363
1386
  "react/no-create-ref": "error",
1364
1387
  "react/no-default-props": "error",
1365
1388
  "react/no-direct-mutation-state": "error",
1366
- "react/no-duplicate-key": "warn",
1389
+ "react/no-duplicate-key": "error",
1367
1390
  "react/no-forward-ref": "warn",
1368
1391
  "react/no-implicit-key": "warn",
1369
1392
  "react/no-missing-key": "error",
1370
- "react/no-misused-capture-owner-stack": "error",
1371
1393
  "react/no-nested-component-definitions": "error",
1372
- "react/no-nested-lazy-component-declarations": "warn",
1394
+ "react/no-nested-lazy-component-declarations": "error",
1373
1395
  "react/no-prop-types": "error",
1374
1396
  "react/no-redundant-should-component-update": "error",
1375
1397
  "react/no-set-state-in-component-did-mount": "warn",
1376
1398
  "react/no-set-state-in-component-did-update": "warn",
1377
1399
  "react/no-set-state-in-component-will-update": "warn",
1378
1400
  "react/no-string-refs": "error",
1401
+ "react/no-unnecessary-use-prefix": "warn",
1379
1402
  "react/no-unsafe-component-will-mount": "warn",
1380
1403
  "react/no-unsafe-component-will-receive-props": "warn",
1381
1404
  "react/no-unsafe-component-will-update": "warn",
@@ -1385,6 +1408,7 @@ var reactRecommendedTypeCheckedRules = {
1385
1408
  "react/no-unused-state": "warn",
1386
1409
  "react/no-use-context": "warn",
1387
1410
  "react/no-useless-forward-ref": "warn",
1411
+ "react/prefer-use-state-lazy-initialization": "warn",
1388
1412
  "react-dom/no-dangerously-set-innerhtml": "warn",
1389
1413
  "react-dom/no-dangerously-set-innerhtml-with-children": "error",
1390
1414
  "react-dom/no-find-dom-node": "error",
@@ -1404,17 +1428,17 @@ var reactRecommendedTypeCheckedRules = {
1404
1428
  "react-web-api/no-leaked-interval": "warn",
1405
1429
  "react-web-api/no-leaked-resize-observer": "warn",
1406
1430
  "react-web-api/no-leaked-timeout": "warn",
1407
- "react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
1408
- "react-hooks-extra/no-unnecessary-use-prefix": "warn",
1409
- "react-hooks-extra/prefer-use-state-lazy-initialization": "warn",
1410
1431
  "react-naming-convention/context-name": "warn",
1432
+ "react-dom/no-string-style-prop": "off",
1411
1433
  "react-dom/no-unknown-property": "off",
1412
- "react/no-leaked-conditional-rendering": "warn"
1434
+ "react/no-leaked-conditional-rendering": "warn",
1435
+ "react/no-unused-props": "warn"
1413
1436
  // End expansion
1414
1437
  };
1415
1438
  var reactDisableTypeCheckedRules = {
1416
1439
  // Begin expansion '@eslint-react/eslint-plugin' 'disable-type-checked'
1417
1440
  "react/no-leaked-conditional-rendering": "off",
1441
+ "react/no-unused-props": "off",
1418
1442
  "react/prefer-read-only-props": "off"
1419
1443
  // End expansion
1420
1444
  };
@@ -1509,6 +1533,7 @@ var svelteRecommendedRules = {
1509
1533
  "svelte/no-immutable-reactive-statements": "error",
1510
1534
  "svelte/no-inner-declarations": "error",
1511
1535
  "svelte/no-inspect": "warn",
1536
+ "svelte/no-navigation-without-resolve": "error",
1512
1537
  "svelte/no-not-function-handler": "error",
1513
1538
  "svelte/no-object-in-text-mustaches": "error",
1514
1539
  "svelte/no-raw-special-elements": "error",
@@ -1589,6 +1614,7 @@ var unicornRecommendedRules = {
1589
1614
  "unicorn/no-array-method-this-argument": "error",
1590
1615
  "unicorn/no-array-reduce": "error",
1591
1616
  "unicorn/no-array-reverse": "error",
1617
+ "unicorn/no-array-sort": "error",
1592
1618
  "unicorn/no-await-expression-member": "error",
1593
1619
  "unicorn/no-await-in-promise-methods": "error",
1594
1620
  "unicorn/no-console-spaces": "error",
@@ -1641,8 +1667,10 @@ var unicornRecommendedRules = {
1641
1667
  "unicorn/prefer-array-index-of": "error",
1642
1668
  "unicorn/prefer-array-some": "error",
1643
1669
  "unicorn/prefer-at": "error",
1670
+ "unicorn/prefer-bigint-literals": "error",
1644
1671
  "unicorn/prefer-blob-reading-methods": "error",
1645
1672
  "unicorn/prefer-class-fields": "error",
1673
+ "unicorn/prefer-classlist-toggle": "error",
1646
1674
  "unicorn/prefer-code-point": "error",
1647
1675
  "unicorn/prefer-date-now": "error",
1648
1676
  "unicorn/prefer-default-parameters": "error",
@@ -1690,6 +1718,7 @@ var unicornRecommendedRules = {
1690
1718
  "unicorn/prevent-abbreviations": "error",
1691
1719
  "unicorn/relative-url-style": "error",
1692
1720
  "unicorn/require-array-join-separator": "error",
1721
+ "unicorn/require-module-attributes": "error",
1693
1722
  "unicorn/require-module-specifiers": "error",
1694
1723
  "unicorn/require-number-to-fixed-digits-argument": "error",
1695
1724
  "unicorn/require-post-message-target-origin": "off",
@@ -2720,6 +2749,7 @@ var sharedScriptConfig = {
2720
2749
  "import-x/resolver-next": [
2721
2750
  createTypeScriptImportResolver({
2722
2751
  alwaysTryTypes: true,
2752
+ noWarnOnMultipleProjects: true,
2723
2753
  project: [
2724
2754
  // Useful for monorepos
2725
2755
  "packages/*/tsconfig.json",
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@kitschpatrol/eslint-config",
3
- "version": "5.6.0",
3
+ "version": "5.7.1",
4
4
  "description": "ESLint configuration for @kitschpatrol/shared-config.",
5
5
  "keywords": [
6
6
  "shared-config",
7
7
  "eslint-config",
8
8
  "eslint",
9
9
  "cli",
10
- "kpi",
11
- "kpi-eslint"
10
+ "ksc",
11
+ "ksc-eslint"
12
12
  ],
13
13
  "homepage": "https://github.com/kitschpatrol/shared-config/tree/main/packages/eslint-config",
14
14
  "bugs": "https://github.com/kitschpatrol/shared-config/issues",
@@ -33,7 +33,8 @@
33
33
  "main": "dist/index.js",
34
34
  "types": "dist/index.d.ts",
35
35
  "bin": {
36
- "kpi-eslint": "bin/cli.js"
36
+ "kpi-eslint": "bin/cli.js",
37
+ "ksc-eslint": "bin/cli.js"
37
38
  },
38
39
  "files": [
39
40
  "bin/*",
@@ -42,57 +43,57 @@
42
43
  ],
43
44
  "dependencies": {
44
45
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
45
- "@eslint-react/eslint-plugin": "^1.52.9",
46
- "@html-eslint/eslint-plugin": "^0.46.1",
47
- "@html-eslint/parser": "^0.46.0",
46
+ "@eslint-react/eslint-plugin": "^2.0.1",
47
+ "@html-eslint/eslint-plugin": "^0.47.0",
48
+ "@html-eslint/parser": "^0.47.0",
48
49
  "@pinojs/json-colorizer": "^4.0.0",
49
- "@typescript-eslint/eslint-plugin": "^8.41.0",
50
- "@typescript-eslint/parser": "^8.41.0",
51
- "@vitest/eslint-plugin": "^1.3.5",
50
+ "@typescript-eslint/eslint-plugin": "^8.44.1",
51
+ "@typescript-eslint/parser": "^8.44.1",
52
+ "@vitest/eslint-plugin": "^1.3.13",
52
53
  "astro-eslint-parser": "^1.2.2",
53
- "eslint": "^9.34.0",
54
+ "eslint": "^9.36.0",
54
55
  "eslint-config-flat-gitignore": "^2.1.0",
55
- "eslint-flat-config-utils": "^2.1.1",
56
+ "eslint-flat-config-utils": "^2.1.4",
56
57
  "eslint-import-resolver-typescript": "^4.4.4",
57
58
  "eslint-mdx": "^3.6.2",
58
59
  "eslint-plugin-astro": "^1.3.1",
59
- "eslint-plugin-depend": "^1.2.0",
60
+ "eslint-plugin-depend": "^1.3.1",
60
61
  "eslint-plugin-html": "^8.1.3",
61
62
  "eslint-plugin-import-x": "^4.16.1",
62
- "eslint-plugin-jsdoc": "^54.1.1",
63
+ "eslint-plugin-jsdoc": "^60.5.0",
63
64
  "eslint-plugin-jsonc": "^2.20.1",
64
65
  "eslint-plugin-jsx-a11y": "^6.10.2",
65
66
  "eslint-plugin-mdx": "^3.6.2",
66
- "eslint-plugin-n": "^17.21.3",
67
+ "eslint-plugin-n": "^17.23.1",
67
68
  "eslint-plugin-no-only-tests": "^3.3.0",
68
- "eslint-plugin-package-json": "^0.56.1",
69
+ "eslint-plugin-package-json": "^0.56.3",
69
70
  "eslint-plugin-perfectionist": "^4.15.0",
70
71
  "eslint-plugin-regexp": "^2.10.0",
71
- "eslint-plugin-svelte": "^3.11.0",
72
+ "eslint-plugin-svelte": "^3.12.4",
72
73
  "eslint-plugin-toml": "^0.12.0",
73
- "eslint-plugin-unicorn": "^60.0.0",
74
+ "eslint-plugin-unicorn": "^61.0.2",
74
75
  "eslint-plugin-yml": "^1.18.0",
75
76
  "execa": "^9.6.0",
76
77
  "find-workspaces": "^0.3.1",
77
- "fs-extra": "^11.3.1",
78
- "globals": "^16.3.0",
79
- "jsonc-eslint-parser": "^2.4.0",
78
+ "fs-extra": "^11.3.2",
79
+ "globals": "^16.4.0",
80
+ "jsonc-eslint-parser": "^2.4.1",
80
81
  "local-pkg": "^1.1.2",
81
82
  "prettier": "^3.6.2",
82
83
  "sort-package-json": "^3.4.0",
83
- "svelte-eslint-parser": "^1.3.1",
84
+ "svelte-eslint-parser": "^1.3.3",
84
85
  "toml-eslint-parser": "^0.10.0",
85
86
  "yaml-eslint-parser": "^1.3.0"
86
87
  },
87
88
  "devDependencies": {
88
89
  "@types/eslint-config-prettier": "^6.11.3",
89
90
  "@types/eslint-plugin-jsx-a11y": "^6.10.0",
90
- "dot-prop": "^9.0.0",
91
+ "dot-prop": "^10.0.0",
91
92
  "eslint-config-prettier": "^10.1.8",
92
93
  "eslint-config-xo-typescript": "^9.0.0",
93
94
  "eslint-typegen": "^2.3.0",
94
- "globby": "^14.1.0",
95
- "svelte": "^5.38.6",
95
+ "globby": "^15.0.0",
96
+ "svelte": "^5.39.6",
96
97
  "tsup": "^8.5.0"
97
98
  },
98
99
  "engines": {
@@ -105,6 +106,6 @@
105
106
  "build": "tsup --format esm --clean --dts && ../../scripts/build.ts",
106
107
  "cli": "node ./bin/cli.js",
107
108
  "inspect": "npx @eslint/config-inspector --config ./init/eslint.config.ts",
108
- "update-rules": "tsx scripts/presetgen.ts && tsx scripts/typegen.ts && kpi-eslint fix && kpi-prettier fix"
109
+ "update-rules": "tsx scripts/presetgen.ts && tsx scripts/typegen.ts && ksc-eslint fix && ksc-prettier fix"
109
110
  }
110
111
  }
package/readme.md CHANGED
@@ -21,7 +21,7 @@
21
21
 
22
22
  ## Overview
23
23
 
24
- It's a shared [ESLint](https://eslint.org) config, plus a command-line tool `kpi-eslint` to perform ESLint-related project initialization, linting, and fixing.
24
+ It's a shared [ESLint](https://eslint.org) config, plus a command-line tool `ksc-eslint` to perform ESLint-related project initialization, linting, and fixing.
25
25
 
26
26
  <!-- recommendation -->
27
27
 
@@ -29,7 +29,7 @@ It's a shared [ESLint](https://eslint.org) config, plus a command-line tool `kpi
29
29
  >
30
30
  > **You can use this package on its own, but it's recommended to use [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config) instead for a single-dependency and single-package approach to linting and fixing your project.**
31
31
  >
32
- > This package is included as a dependency in [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config), which also automatically invokes the command line functionality in this package via its `kpi` command
32
+ > This package is included as a dependency in [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config), which also automatically invokes the command line functionality in this package via its `ksc` command
33
33
 
34
34
  <!-- /recommendation -->
35
35
 
@@ -59,7 +59,7 @@ To use just this ESLint config in isolation:
59
59
  4. Add the starter `eslint.config.ts` config files to your project root, and add any overrides you'd like:
60
60
 
61
61
  ```sh
62
- pnpm exec eslint-kpi init
62
+ pnpm exec eslint-ksc init
63
63
  ```
64
64
 
65
65
  ## Usage
@@ -83,16 +83,16 @@ Integrate with your `package.json` scripts as you see fit, for example:
83
83
 
84
84
  <!-- cli-help -->
85
85
 
86
- #### Command: `kpi-eslint`
86
+ #### Command: `ksc-eslint`
87
87
 
88
88
  Kitschpatrol's ESLint shared configuration tools.
89
89
 
90
- This section lists top-level commands for `kpi-eslint`.
90
+ This section lists top-level commands for `ksc-eslint`.
91
91
 
92
92
  Usage:
93
93
 
94
94
  ```txt
95
- kpi-eslint <command>
95
+ ksc-eslint <command>
96
96
  ```
97
97
 
98
98
  | Command | Argument | Description |
@@ -109,14 +109,14 @@ kpi-eslint <command>
109
109
 
110
110
  _See the sections below for more information on each subcommand._
111
111
 
112
- #### Subcommand: `kpi-eslint init`
112
+ #### Subcommand: `ksc-eslint init`
113
113
 
114
114
  Initialize by copying starter config files to your project root.
115
115
 
116
116
  Usage:
117
117
 
118
118
  ```txt
119
- kpi-eslint init
119
+ ksc-eslint init
120
120
  ```
121
121
 
122
122
  | Option | Description | Type |
@@ -124,14 +124,14 @@ kpi-eslint init
124
124
  | `--help`<br>`-h` | Show help | `boolean` |
125
125
  | `--version`<br>`-v` | Show version number | `boolean` |
126
126
 
127
- #### Subcommand: `kpi-eslint lint`
127
+ #### Subcommand: `ksc-eslint lint`
128
128
 
129
129
  Lint your project with ESLint. Matches files below the current working directory by default.
130
130
 
131
131
  Usage:
132
132
 
133
133
  ```txt
134
- kpi-eslint lint [files..]
134
+ ksc-eslint lint [files..]
135
135
  ```
136
136
 
137
137
  | Positional Argument | Description | Type | Default |
@@ -143,14 +143,14 @@ kpi-eslint lint [files..]
143
143
  | `--help`<br>`-h` | Show help | `boolean` |
144
144
  | `--version`<br>`-v` | Show version number | `boolean` |
145
145
 
146
- #### Subcommand: `kpi-eslint fix`
146
+ #### Subcommand: `ksc-eslint fix`
147
147
 
148
148
  Fix your project with ESLint. Matches files below the current working directory by default.
149
149
 
150
150
  Usage:
151
151
 
152
152
  ```txt
153
- kpi-eslint fix [files..]
153
+ ksc-eslint fix [files..]
154
154
  ```
155
155
 
156
156
  | Positional Argument | Description | Type | Default |
@@ -162,14 +162,14 @@ kpi-eslint fix [files..]
162
162
  | `--help`<br>`-h` | Show help | `boolean` |
163
163
  | `--version`<br>`-v` | Show version number | `boolean` |
164
164
 
165
- #### Subcommand: `kpi-eslint print-config`
165
+ #### Subcommand: `ksc-eslint print-config`
166
166
 
167
167
  Print the effective ESLint configuration. Package-scoped by default, file-scoped if a file argument is provided. Use `@eslint/config-inspector` for a more detailed view.
168
168
 
169
169
  Usage:
170
170
 
171
171
  ```txt
172
- kpi-eslint print-config [file]
172
+ ksc-eslint print-config [file]
173
173
  ```
174
174
 
175
175
  | Positional Argument | Description | Type |