@kitschpatrol/eslint-config 8.1.0 → 8.2.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.
@@ -0,0 +1,73 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "tasks": [
4
+ {
5
+ "label": "ksc-eslint lint",
6
+ "detail": "Lint your project with ESLint.",
7
+ "type": "shell",
8
+ "command": "pnpm exec ksc-eslint lint --format machine",
9
+ "options": {
10
+ "cwd": "${workspaceFolder}"
11
+ },
12
+ "presentation": {
13
+ "clear": true,
14
+ "echo": true,
15
+ "focus": false,
16
+ "panel": "dedicated",
17
+ "reveal": "silent",
18
+ "revealProblems": "onProblem",
19
+ "showReuseMessage": false
20
+ },
21
+ "problemMatcher": [
22
+ {
23
+ "owner": "ksc",
24
+ "source": "ksc",
25
+ "fileLocation": ["relative", "${workspaceFolder}"],
26
+ "pattern": {
27
+ "regexp": "^(.+?):(\\d+):(\\d+): (error|warning|info): (.+) \\[([^\\]]+)\\]$",
28
+ "file": 1,
29
+ "line": 2,
30
+ "column": 3,
31
+ "severity": 4,
32
+ "message": 5,
33
+ "code": 6
34
+ }
35
+ }
36
+ ]
37
+ },
38
+ {
39
+ "label": "ksc-eslint fix",
40
+ "detail": "Fix your project with ESLint.",
41
+ "type": "shell",
42
+ "command": "pnpm exec ksc-eslint fix --format machine",
43
+ "options": {
44
+ "cwd": "${workspaceFolder}"
45
+ },
46
+ "presentation": {
47
+ "clear": true,
48
+ "echo": true,
49
+ "focus": false,
50
+ "panel": "dedicated",
51
+ "reveal": "silent",
52
+ "revealProblems": "onProblem",
53
+ "showReuseMessage": false
54
+ },
55
+ "problemMatcher": [
56
+ {
57
+ "owner": "ksc",
58
+ "source": "ksc",
59
+ "fileLocation": ["relative", "${workspaceFolder}"],
60
+ "pattern": {
61
+ "regexp": "^(.+?):(\\d+):(\\d+): (error|warning|info): (.+) \\[([^\\]]+)\\]$",
62
+ "file": 1,
63
+ "line": 2,
64
+ "column": 3,
65
+ "severity": 4,
66
+ "message": 5,
67
+ "code": 6
68
+ }
69
+ }
70
+ ]
71
+ }
72
+ ]
73
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitschpatrol/eslint-config",
3
- "version": "8.1.0",
3
+ "version": "8.2.0",
4
4
  "description": "ESLint configuration for @kitschpatrol/shared-config.",
5
5
  "keywords": [
6
6
  "shared-config",
@@ -45,14 +45,14 @@
45
45
  "@e18e/eslint-plugin": "^0.5.1",
46
46
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
47
47
  "@eslint-react/eslint-plugin": "^5.13.2",
48
- "@html-eslint/eslint-plugin": "^0.63.0",
49
- "@html-eslint/parser": "^0.63.0",
48
+ "@html-eslint/eslint-plugin": "^0.64.0",
49
+ "@html-eslint/parser": "^0.64.0",
50
50
  "@pinojs/json-colorizer": "^4.0.0",
51
51
  "@stylistic/eslint-plugin": "^5.10.0",
52
52
  "@typescript-eslint/eslint-plugin": "^8.63.0",
53
53
  "@typescript-eslint/parser": "^8.63.0",
54
54
  "@vitest/eslint-plugin": "^1.6.22",
55
- "astro-eslint-parser": "^2.1.0",
55
+ "astro-eslint-parser": "^3.0.0",
56
56
  "cosmiconfig": "^9.0.2",
57
57
  "cosmiconfig-typescript-loader": "^6.3.0",
58
58
  "decircular": "^1.0.0",
@@ -62,7 +62,7 @@
62
62
  "eslint-flat-config-utils": "^3.2.0",
63
63
  "eslint-import-resolver-typescript": "^4.4.5",
64
64
  "eslint-mdx": "^3.8.1",
65
- "eslint-plugin-astro": "^2.1.1",
65
+ "eslint-plugin-astro": "^3.0.0",
66
66
  "eslint-plugin-de-morgan": "^2.1.2",
67
67
  "eslint-plugin-depend": "^1.5.0",
68
68
  "eslint-plugin-html": "^8.1.4",
@@ -79,7 +79,7 @@
79
79
  "eslint-plugin-regexp": "^3.1.1",
80
80
  "eslint-plugin-svelte": "^3.20.0",
81
81
  "eslint-plugin-toml": "^1.4.0",
82
- "eslint-plugin-unicorn": "^71.1.0",
82
+ "eslint-plugin-unicorn": "^72.0.0",
83
83
  "eslint-plugin-yml": "^3.6.0",
84
84
  "execa": "^9.6.1",
85
85
  "find-workspaces": "^0.3.1",
@@ -103,9 +103,9 @@
103
103
  "@types/eslint-plugin-jsx-a11y": "^6.10.1",
104
104
  "dot-prop": "^10.1.0",
105
105
  "eslint-config-prettier": "^10.1.8",
106
- "eslint-config-xo": "^0.57.0",
106
+ "eslint-config-xo": "^0.58.0",
107
107
  "eslint-typegen": "^2.3.1",
108
- "globby": "^16.2.0",
108
+ "globby": "^16.2.1",
109
109
  "svelte": "^5.56.4"
110
110
  },
111
111
  "engines": {
package/readme.md CHANGED
@@ -136,10 +136,11 @@ ksc-eslint lint [files..]
136
136
  | ------------------- | ------------------------------ | ------- | ------- |
137
137
  | `files` | Files or glob pattern to lint. | `array` | `"."` |
138
138
 
139
- | Option | Description | Type |
140
- | ------------------- | ------------------- | --------- |
141
- | `--help`<br>`-h` | Show help | `boolean` |
142
- | `--version`<br>`-v` | Show version number | `boolean` |
139
+ | Option | Description | Type | Default |
140
+ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ---------- |
141
+ | `--format` | Output format: "native" streams each tool's own output, "machine" prints one parseable line per issue for editor problem matchers, "json" prints an aggregate report. | `"json"` `"machine"` `"native"` | `"native"` |
142
+ | `--help`<br>`-h` | Show help | `boolean` | |
143
+ | `--version`<br>`-v` | Show version number | `boolean` | |
143
144
 
144
145
  #### Subcommand: `ksc-eslint fix`
145
146
 
@@ -155,10 +156,11 @@ ksc-eslint fix [files..]
155
156
  | ------------------- | ----------------------------- | ------- | ------- |
156
157
  | `files` | Files or glob pattern to fix. | `array` | `"."` |
157
158
 
158
- | Option | Description | Type |
159
- | ------------------- | ------------------- | --------- |
160
- | `--help`<br>`-h` | Show help | `boolean` |
161
- | `--version`<br>`-v` | Show version number | `boolean` |
159
+ | Option | Description | Type | Default |
160
+ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ---------- |
161
+ | `--format` | Output format: "native" streams each tool's own output, "machine" prints one parseable line per issue for editor problem matchers, "json" prints an aggregate report. | `"json"` `"machine"` `"native"` | `"native"` |
162
+ | `--help`<br>`-h` | Show help | `boolean` | |
163
+ | `--version`<br>`-v` | Show version number | `boolean` | |
162
164
 
163
165
  #### Subcommand: `ksc-eslint print-config`
164
166
 
@@ -181,6 +183,26 @@ ksc-eslint print-config [file]
181
183
 
182
184
  <!-- /cli-help -->
183
185
 
186
+ ### VS Code tasks
187
+
188
+ `ksc-eslint init` adds a `.vscode/tasks.json` with two tasks:
189
+
190
+ - **`ksc-eslint lint`** runs `ksc-eslint lint --format machine` across the whole project
191
+ - **`ksc-eslint fix`** runs `ksc-eslint fix --format machine`, applying auto-fixes and reporting whatever couldn't be fixed
192
+
193
+ If you're using the complete [@kitschpatrol/shared-config](https://github.com/kitschpatrol/shared-config) package, you'd more likely want to run:
194
+
195
+ - **`ksc lint`** runs `ksc lint --format machine`, which runs all `ksc lint` tools across the whole project
196
+ - **`ksc fix`** runs `ksc fix --format machine`, which applies all `ksc fix` auto-fixes and reports anything unfixable
197
+
198
+ Run them via the _Tasks: Run Task_ command (or the _Terminal → Run Task…_ menu item).
199
+
200
+ Each task's problem matcher parses the machine-format output and populates VS Code's [Problems panel](https://code.visualstudio.com/docs/debugtest/debugging#_errors-and-warnings) with every reported issue, pointing to the offending file, line, and column.
201
+
202
+ The tasks share a problem matcher owner with the other `@kitschpatrol/shared-config` tasks, so the panel reflects the most recent run rather than stacking duplicates.
203
+
204
+ If your project already has a `.vscode/tasks.json`, `init` merges by task label: your own tasks are left alone, and same-label tasks are replaced with the latest definitions.
205
+
184
206
  ### API
185
207
 
186
208
  The package also exports `fix`, `fixFile` functions for linting and fixing code programmatically, pre-configured with the shared ESLint configuration.