@kitschpatrol/eslint-config 5.6.0 → 5.7.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 +2 -2
- package/dist/index.d.ts +218 -141
- package/dist/index.js +6 -0
- package/package.json +18 -17
- package/readme.md +14 -14
package/dist/index.js
CHANGED
|
@@ -1509,6 +1509,7 @@ var svelteRecommendedRules = {
|
|
|
1509
1509
|
"svelte/no-immutable-reactive-statements": "error",
|
|
1510
1510
|
"svelte/no-inner-declarations": "error",
|
|
1511
1511
|
"svelte/no-inspect": "warn",
|
|
1512
|
+
"svelte/no-navigation-without-resolve": "error",
|
|
1512
1513
|
"svelte/no-not-function-handler": "error",
|
|
1513
1514
|
"svelte/no-object-in-text-mustaches": "error",
|
|
1514
1515
|
"svelte/no-raw-special-elements": "error",
|
|
@@ -1589,6 +1590,7 @@ var unicornRecommendedRules = {
|
|
|
1589
1590
|
"unicorn/no-array-method-this-argument": "error",
|
|
1590
1591
|
"unicorn/no-array-reduce": "error",
|
|
1591
1592
|
"unicorn/no-array-reverse": "error",
|
|
1593
|
+
"unicorn/no-array-sort": "error",
|
|
1592
1594
|
"unicorn/no-await-expression-member": "error",
|
|
1593
1595
|
"unicorn/no-await-in-promise-methods": "error",
|
|
1594
1596
|
"unicorn/no-console-spaces": "error",
|
|
@@ -1641,8 +1643,10 @@ var unicornRecommendedRules = {
|
|
|
1641
1643
|
"unicorn/prefer-array-index-of": "error",
|
|
1642
1644
|
"unicorn/prefer-array-some": "error",
|
|
1643
1645
|
"unicorn/prefer-at": "error",
|
|
1646
|
+
"unicorn/prefer-bigint-literals": "error",
|
|
1644
1647
|
"unicorn/prefer-blob-reading-methods": "error",
|
|
1645
1648
|
"unicorn/prefer-class-fields": "error",
|
|
1649
|
+
"unicorn/prefer-classlist-toggle": "error",
|
|
1646
1650
|
"unicorn/prefer-code-point": "error",
|
|
1647
1651
|
"unicorn/prefer-date-now": "error",
|
|
1648
1652
|
"unicorn/prefer-default-parameters": "error",
|
|
@@ -1690,6 +1694,7 @@ var unicornRecommendedRules = {
|
|
|
1690
1694
|
"unicorn/prevent-abbreviations": "error",
|
|
1691
1695
|
"unicorn/relative-url-style": "error",
|
|
1692
1696
|
"unicorn/require-array-join-separator": "error",
|
|
1697
|
+
"unicorn/require-module-attributes": "error",
|
|
1693
1698
|
"unicorn/require-module-specifiers": "error",
|
|
1694
1699
|
"unicorn/require-number-to-fixed-digits-argument": "error",
|
|
1695
1700
|
"unicorn/require-post-message-target-origin": "off",
|
|
@@ -2720,6 +2725,7 @@ var sharedScriptConfig = {
|
|
|
2720
2725
|
"import-x/resolver-next": [
|
|
2721
2726
|
createTypeScriptImportResolver({
|
|
2722
2727
|
alwaysTryTypes: true,
|
|
2728
|
+
noWarnOnMultipleProjects: true,
|
|
2723
2729
|
project: [
|
|
2724
2730
|
// Useful for monorepos
|
|
2725
2731
|
"packages/*/tsconfig.json",
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/eslint-config",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
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
|
-
"
|
|
11
|
-
"
|
|
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,15 +43,15 @@
|
|
|
42
43
|
],
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
45
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
46
|
-
"@html-eslint/eslint-plugin": "^0.46.
|
|
47
|
-
"@html-eslint/parser": "^0.46.
|
|
46
|
+
"@eslint-react/eslint-plugin": "^1.53.0",
|
|
47
|
+
"@html-eslint/eslint-plugin": "^0.46.2",
|
|
48
|
+
"@html-eslint/parser": "^0.46.2",
|
|
48
49
|
"@pinojs/json-colorizer": "^4.0.0",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
50
|
-
"@typescript-eslint/parser": "^8.
|
|
51
|
-
"@vitest/eslint-plugin": "^1.3.
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^8.42.0",
|
|
51
|
+
"@typescript-eslint/parser": "^8.42.0",
|
|
52
|
+
"@vitest/eslint-plugin": "^1.3.9",
|
|
52
53
|
"astro-eslint-parser": "^1.2.2",
|
|
53
|
-
"eslint": "^9.
|
|
54
|
+
"eslint": "^9.35.0",
|
|
54
55
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
55
56
|
"eslint-flat-config-utils": "^2.1.1",
|
|
56
57
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
@@ -59,18 +60,18 @@
|
|
|
59
60
|
"eslint-plugin-depend": "^1.2.0",
|
|
60
61
|
"eslint-plugin-html": "^8.1.3",
|
|
61
62
|
"eslint-plugin-import-x": "^4.16.1",
|
|
62
|
-
"eslint-plugin-jsdoc": "^
|
|
63
|
+
"eslint-plugin-jsdoc": "^55.0.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
67
|
"eslint-plugin-n": "^17.21.3",
|
|
67
68
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
68
|
-
"eslint-plugin-package-json": "^0.56.
|
|
69
|
+
"eslint-plugin-package-json": "^0.56.2",
|
|
69
70
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
70
71
|
"eslint-plugin-regexp": "^2.10.0",
|
|
71
|
-
"eslint-plugin-svelte": "^3.
|
|
72
|
+
"eslint-plugin-svelte": "^3.12.2",
|
|
72
73
|
"eslint-plugin-toml": "^0.12.0",
|
|
73
|
-
"eslint-plugin-unicorn": "^
|
|
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",
|
|
@@ -92,7 +93,7 @@
|
|
|
92
93
|
"eslint-config-xo-typescript": "^9.0.0",
|
|
93
94
|
"eslint-typegen": "^2.3.0",
|
|
94
95
|
"globby": "^14.1.0",
|
|
95
|
-
"svelte": "^5.38.
|
|
96
|
+
"svelte": "^5.38.7",
|
|
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 &&
|
|
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 `
|
|
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 `
|
|
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-
|
|
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: `
|
|
86
|
+
#### Command: `ksc-eslint`
|
|
87
87
|
|
|
88
88
|
Kitschpatrol's ESLint shared configuration tools.
|
|
89
89
|
|
|
90
|
-
This section lists top-level commands for `
|
|
90
|
+
This section lists top-level commands for `ksc-eslint`.
|
|
91
91
|
|
|
92
92
|
Usage:
|
|
93
93
|
|
|
94
94
|
```txt
|
|
95
|
-
|
|
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: `
|
|
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
|
-
|
|
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: `
|
|
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
|
-
|
|
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: `
|
|
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
|
-
|
|
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: `
|
|
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
|
-
|
|
172
|
+
ksc-eslint print-config [file]
|
|
173
173
|
```
|
|
174
174
|
|
|
175
175
|
| Positional Argument | Description | Type |
|