@santi020k/eslint-config-basic 3.2.0 → 3.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/CHANGELOG.md +37 -0
- package/dist/agent-skill-generator.d.ts +7 -18
- package/dist/agent-skill-generator.js +54 -18
- package/dist/agent-skill-generator.js.map +1 -0
- package/dist/cli-advanced.d.ts +7 -0
- package/dist/cli-advanced.js +74 -15
- package/dist/cli-advanced.js.map +1 -0
- package/dist/cli-migration.js +22 -20
- package/dist/cli-migration.js.map +1 -0
- package/dist/cli-package-manager.d.ts +10 -0
- package/dist/cli-package-manager.js +135 -0
- package/dist/cli-package-manager.js.map +1 -0
- package/dist/cli-preset.d.ts +74 -2
- package/dist/cli-preset.js +253 -6
- package/dist/cli-preset.js.map +1 -0
- package/dist/cli-workflows.js +1 -0
- package/dist/cli-workflows.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +461 -176
- package/dist/cli.js.map +1 -0
- package/dist/define-config-metadata.js +2 -4
- package/dist/define-config-metadata.js.map +1 -0
- package/dist/frameworks.d.ts +1 -0
- package/dist/frameworks.js +2 -1
- package/dist/frameworks.js.map +1 -0
- package/dist/index.d.ts +13 -2
- package/dist/index.js +83 -22
- package/dist/index.js.map +1 -0
- package/dist/integrations.js +1 -0
- package/dist/integrations.js.map +1 -0
- package/dist/optional-package-errors.js +1 -0
- package/dist/optional-package-errors.js.map +1 -0
- package/dist/recommended.d.ts +6 -3
- package/dist/recommended.js +3 -1
- package/dist/recommended.js.map +1 -0
- package/dist/resolvers.js +1 -0
- package/dist/resolvers.js.map +1 -0
- package/dist/tailwind.d.ts +3 -1
- package/dist/tailwind.js +115 -13
- package/dist/tailwind.js.map +1 -0
- package/package.json +25 -25
- package/IMPROVEMENTS.md +0 -270
package/IMPROVEMENTS.md
DELETED
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
# Consumer-driven improvements
|
|
2
|
-
|
|
3
|
-
These opportunities came from migrating a real ESLint 10, pnpm, TypeScript,
|
|
4
|
-
Astro, Tailwind, and Vitest monorepo to the modular v3 packages. They are
|
|
5
|
-
ordered by how directly they affect whether a consumer can install and lint
|
|
6
|
-
successfully.
|
|
7
|
-
|
|
8
|
-
## Implemented for the next release
|
|
9
|
-
|
|
10
|
-
- Every generated rule block now receives the plugin objects it references,
|
|
11
|
-
with a contract test covering the complete optional-feature registry.
|
|
12
|
-
- Doctor and install planning now inspect every pnpm workspace project and
|
|
13
|
-
explicit `features` selection.
|
|
14
|
-
- Normal doctor output reports modular v3 packages and no longer recommends
|
|
15
|
-
deprecated Lite packages unless `--lite-install` is requested.
|
|
16
|
-
- Scoped projects inherit root detection and Tailwind defaults, while
|
|
17
|
-
`projectDefaults` and project options remain the more specific layers.
|
|
18
|
-
- TypeScript `untypedFiles` overrides are composed after framework parser
|
|
19
|
-
configs, including Astro projects.
|
|
20
|
-
- `init --explicit` now generates the v3 `features` map.
|
|
21
|
-
- Preset adoption reports compare effective rules by category and can write a
|
|
22
|
-
temporary compatibility override.
|
|
23
|
-
- CLI subcommands now have strict, side-effect-free help and flag validation.
|
|
24
|
-
- Minimum-release-age failures receive a dedicated compatible-range diagnostic.
|
|
25
|
-
- Release checks enforce peer health with owned, conditional exceptions.
|
|
26
|
-
- Safe migration rewrites prefer `features` and `root`, while dynamic cases
|
|
27
|
-
receive explicit manual-action guidance.
|
|
28
|
-
- The release check now installs a packed pnpm monorepo consumer with Astro,
|
|
29
|
-
Tailwind, TypeScript, Vitest, format, tool, and extension packs; it runs
|
|
30
|
-
doctor, ESLint 10, config typechecking, and a frozen-lockfile reinstall.
|
|
31
|
-
|
|
32
|
-
## Completed — Make every emitted config independently valid in ESLint 10
|
|
33
|
-
|
|
34
|
-
The Tailwind settings config can reference
|
|
35
|
-
`better-tailwindcss/no-unknown-classes` while the
|
|
36
|
-
`better-tailwindcss` plugin is registered on another config object. ESLint 10
|
|
37
|
-
then reports that it cannot find the plugin, especially when a consumer adds a
|
|
38
|
-
later file-scoped override for the rule.
|
|
39
|
-
|
|
40
|
-
Improve the composer so every emitted config object that references a plugin
|
|
41
|
-
rule also carries that plugin registration. This should be guaranteed for all
|
|
42
|
-
framework and feature-pack configs, not only Tailwind.
|
|
43
|
-
|
|
44
|
-
Acceptance criteria:
|
|
45
|
-
|
|
46
|
-
- `defineConfig()` output can be passed directly to ESLint 10 without a
|
|
47
|
-
consumer-side plugin-copying workaround.
|
|
48
|
-
- A later `{ files, rules }` override can disable a feature-pack rule without
|
|
49
|
-
manually importing or locating the plugin.
|
|
50
|
-
- A contract test checks every emitted `plugin/rule` entry against the plugins
|
|
51
|
-
available to that config object.
|
|
52
|
-
|
|
53
|
-
## Completed — Make the install planner project-aware
|
|
54
|
-
|
|
55
|
-
A monorepo can disable root-level library detection and still enable a
|
|
56
|
-
library-backed feature inside a scoped project. For example, an Astro docs
|
|
57
|
-
project can detect Tailwind and require
|
|
58
|
-
`@santi020k/eslint-config-libraries`, even when the root has
|
|
59
|
-
`detection: { libraries: false }`.
|
|
60
|
-
|
|
61
|
-
The doctor and install commands should resolve the same project scopes,
|
|
62
|
-
detection controls, and feature graph as `defineConfig()`. They should report
|
|
63
|
-
all required category packages before ESLint is started.
|
|
64
|
-
|
|
65
|
-
Acceptance criteria:
|
|
66
|
-
|
|
67
|
-
- `basic-eslint doctor` reports a missing category package required by any
|
|
68
|
-
configured project.
|
|
69
|
-
- `basic-eslint install --dry-run` returns the exact modular packages required
|
|
70
|
-
by root and project-scoped features.
|
|
71
|
-
- Detection disabled at one scope does not suppress requirements discovered in
|
|
72
|
-
another scope.
|
|
73
|
-
|
|
74
|
-
## Completed — Replace deprecated Lite advice in normal doctor output
|
|
75
|
-
|
|
76
|
-
The JSON doctor result currently includes a `liteInstallCommand` that recommends
|
|
77
|
-
`@santi020k/eslint-config-lite` and
|
|
78
|
-
`@santi020k/eslint-config-integrations`, even when the consumer uses the v3
|
|
79
|
-
basic package and did not request `--lite-install`.
|
|
80
|
-
|
|
81
|
-
Normal doctor output should recommend the lean v3 package set. Deprecated Lite
|
|
82
|
-
advice should only be produced when `--lite-install` is explicitly requested
|
|
83
|
-
and should be labeled as a compatibility workflow.
|
|
84
|
-
|
|
85
|
-
Acceptance criteria:
|
|
86
|
-
|
|
87
|
-
- Default JSON output exposes a modular `installCommand` or structured
|
|
88
|
-
`requiredPackages` result.
|
|
89
|
-
- `liteInstallCommand` is omitted unless `--lite-install` is present.
|
|
90
|
-
- The suggested command uses the detected framework and category packages.
|
|
91
|
-
|
|
92
|
-
## Completed — Clarify root versus project option inheritance
|
|
93
|
-
|
|
94
|
-
Settings such as `tailwind.noUnknownClasses` may need to be repeated inside a
|
|
95
|
-
project scope to affect that project's generated config. Consumers need a clear
|
|
96
|
-
way to express shared defaults without learning this through lint failures.
|
|
97
|
-
|
|
98
|
-
Prefer one of these approaches:
|
|
99
|
-
|
|
100
|
-
1. inherit safe root options into projects consistently; or
|
|
101
|
-
2. require `projectDefaults`, document it prominently, and have doctor suggest
|
|
102
|
-
moving misplaced root options there.
|
|
103
|
-
|
|
104
|
-
Acceptance criteria:
|
|
105
|
-
|
|
106
|
-
- The monorepo guide shows how root options, `projectDefaults`, and project
|
|
107
|
-
overrides compose.
|
|
108
|
-
- Doctor warns when a root option has no effect on scoped projects.
|
|
109
|
-
- Tests cover Tailwind, TypeScript, detection controls, and runtime defaults.
|
|
110
|
-
|
|
111
|
-
## Completed — Add a realistic modular-consumer release fixture
|
|
112
|
-
|
|
113
|
-
Add a packed-package fixture matching a production monorepo:
|
|
114
|
-
|
|
115
|
-
- pnpm workspace with multiple package projects;
|
|
116
|
-
- Astro and Tailwind in one app only;
|
|
117
|
-
- TypeScript project service;
|
|
118
|
-
- Vitest, JSONC, Markdown, YAML, pnpm, CSpell, boundaries, and Unicorn;
|
|
119
|
-
- explicit `features` configuration;
|
|
120
|
-
- ESLint 10 with `--max-warnings=0`.
|
|
121
|
-
|
|
122
|
-
The fixture should install from packed tarballs, run doctor, lint, typecheck,
|
|
123
|
-
and verify that the lockfile is frozen-installable. This catches package
|
|
124
|
-
boundary and resolver errors that workspace symlinks can hide.
|
|
125
|
-
|
|
126
|
-
## Completed — Preserve pnpm workspace catalogs during installation
|
|
127
|
-
|
|
128
|
-
`basic-eslint install` currently writes a direct semver range into the nearest
|
|
129
|
-
`package.json`. In catalog-managed workspaces this immediately violates
|
|
130
|
-
`pnpm/json-enforce-catalog` and forces the consumer to move every dependency by
|
|
131
|
-
hand.
|
|
132
|
-
|
|
133
|
-
The installer should discover `pnpm-workspace.yaml`, update the appropriate
|
|
134
|
-
catalog entry, and write `catalog:` in the package manifest. It should also
|
|
135
|
-
detect the workspace package manager from the root instead of falling back to
|
|
136
|
-
npm when invoked from a nested package.
|
|
137
|
-
|
|
138
|
-
Acceptance criteria:
|
|
139
|
-
|
|
140
|
-
- Existing `catalog:`, `catalog:default`, and named-catalog conventions are
|
|
141
|
-
preserved.
|
|
142
|
-
- `--dry-run` shows both manifest and workspace-catalog changes.
|
|
143
|
-
- Running from a nested workspace package still uses the root package manager.
|
|
144
|
-
- A second installation is idempotent.
|
|
145
|
-
|
|
146
|
-
The installer now resolves the pnpm workspace root even when invoked from a
|
|
147
|
-
nested package and asks pnpm to save new dependencies into the existing
|
|
148
|
-
default or named catalog. Dry runs print the exact catalog-aware command.
|
|
149
|
-
Idempotency is delegated to pnpm's catalog-aware `add` operation.
|
|
150
|
-
|
|
151
|
-
## Completed — Keep `untypedFiles` last enough to be effective
|
|
152
|
-
|
|
153
|
-
In Astro consumers, the generated `eslint-config-typescript/untyped-files`
|
|
154
|
-
entry can appear before a later framework entry re-enables typed parser
|
|
155
|
-
options. Consumers then receive a parser error saying that `project` and
|
|
156
|
-
`projectService` are enabled together, and must find and append the generated
|
|
157
|
-
entry manually.
|
|
158
|
-
|
|
159
|
-
Compose untyped-file overrides after framework and project configs, or merge
|
|
160
|
-
parser options with a deterministic precedence model.
|
|
161
|
-
|
|
162
|
-
Acceptance criteria:
|
|
163
|
-
|
|
164
|
-
- `typescript.untypedFiles: ['**/*.astro']` works with the Astro framework.
|
|
165
|
-
- The same behavior works inside a scoped monorepo project.
|
|
166
|
-
- Consumers never need to inspect config names and reorder generated entries.
|
|
167
|
-
|
|
168
|
-
## Completed — Preserve nested import failures
|
|
169
|
-
|
|
170
|
-
When an optional framework package exists but fails while importing one of its
|
|
171
|
-
own dependencies, the current error can say only that the optional framework
|
|
172
|
-
could not be loaded. During migration, a React integration failure caused by a
|
|
173
|
-
Zod compatibility mismatch looked like a missing React package.
|
|
174
|
-
|
|
175
|
-
Error handling should distinguish:
|
|
176
|
-
|
|
177
|
-
- package not installed;
|
|
178
|
-
- installed package failed to evaluate;
|
|
179
|
-
- incompatible peer or transitive dependency.
|
|
180
|
-
|
|
181
|
-
Always retain the original error as `cause`, show the failing package path, and
|
|
182
|
-
include the one-command remediation only when the package is genuinely absent.
|
|
183
|
-
|
|
184
|
-
## Completed — Make preset expansion visible and adoption-friendly
|
|
185
|
-
|
|
186
|
-
`Preset.App`, `Preset.Worker`, and `Preset.Library` can activate substantially
|
|
187
|
-
more rules than an existing default config. That is useful for new projects,
|
|
188
|
-
but a migration can unexpectedly introduce hundreds of formatting or
|
|
189
|
-
domain-specific findings.
|
|
190
|
-
|
|
191
|
-
Add `basic-eslint explain-preset <preset>` and a migration mode that compares
|
|
192
|
-
the current effective config with the selected preset. Group the output into
|
|
193
|
-
formatting, correctness, security, framework, and domain rules, and generate a
|
|
194
|
-
temporary compatibility override when requested.
|
|
195
|
-
|
|
196
|
-
## Completed — Make CLI help side-effect free
|
|
197
|
-
|
|
198
|
-
`basic-eslint install --help` should print subcommand help and exit without
|
|
199
|
-
installing packages. Add command-level parsing tests for `--help`, `--dry-run`,
|
|
200
|
-
and invalid flags so documentation discovery can never mutate a workspace.
|
|
201
|
-
|
|
202
|
-
Help flags are intercepted before command dispatch, dedicated subcommand help
|
|
203
|
-
lists only supported flags, and strict parsing rejects unknown or incomplete
|
|
204
|
-
options before any handler can mutate the workspace.
|
|
205
|
-
|
|
206
|
-
## Completed — Respect release compatibility under minimum-age policies
|
|
207
|
-
|
|
208
|
-
With pnpm's `minimumReleaseAge`, requesting an unversioned companion package can
|
|
209
|
-
resolve an older major while Basic itself is already pinned to 3.1. The install
|
|
210
|
-
planner should derive companion ranges from the installed Basic major/minor
|
|
211
|
-
instead of asking the package manager for an unconstrained latest version.
|
|
212
|
-
|
|
213
|
-
For Basic 3.1, generated install requests should use a compatible 3.1 range and
|
|
214
|
-
produce a clear message when workspace supply-chain policy temporarily blocks
|
|
215
|
-
that release.
|
|
216
|
-
|
|
217
|
-
Install and doctor commands derive a compatible caret range from the installed
|
|
218
|
-
Basic dependency, including catalog-backed versions, and use that range for
|
|
219
|
-
modular companion packages. Install also recognizes pnpm minimum-release-age
|
|
220
|
-
failures and explains the wait-or-exclude policy without suggesting an
|
|
221
|
-
incompatible release.
|
|
222
|
-
|
|
223
|
-
## Completed — Treat peer health as a release signal
|
|
224
|
-
|
|
225
|
-
The modular consumer installed and linted successfully but `pnpm peers check`
|
|
226
|
-
still reported stale ESLint and TypeScript peer ranges from transitive plugins.
|
|
227
|
-
These warnings make genuine missing-peer failures harder to notice.
|
|
228
|
-
|
|
229
|
-
Add a release report that:
|
|
230
|
-
|
|
231
|
-
- runs the package manager's peer checker in packed consumer fixtures;
|
|
232
|
-
- identifies which direct package introduces each warning;
|
|
233
|
-
- fails for newly introduced actionable warnings;
|
|
234
|
-
- records explicitly accepted upstream range gaps with an owner and removal
|
|
235
|
-
condition.
|
|
236
|
-
|
|
237
|
-
## Completed — Generate modern configuration during migration
|
|
238
|
-
|
|
239
|
-
Migration output should prefer the v3 `features` map and `root` option over
|
|
240
|
-
legacy category arrays and root-directory aliases. When custom classes are
|
|
241
|
-
detected, it should offer the supported project-scoped Tailwind option instead
|
|
242
|
-
of generating a raw rule override.
|
|
243
|
-
|
|
244
|
-
`init --explicit` emits `features`. The v3 migration rewrites literal category
|
|
245
|
-
arrays, the deprecated `integrations` alias, and unambiguous root aliases.
|
|
246
|
-
Expressions, spreads, comments inside dynamic selections, conflicting root
|
|
247
|
-
aliases, and raw Tailwind rule overrides are preserved and reported as manual
|
|
248
|
-
actions so migration never changes behavior it cannot prove safe.
|
|
249
|
-
|
|
250
|
-
An ideal generated result is concise and self-explanatory:
|
|
251
|
-
|
|
252
|
-
```js
|
|
253
|
-
export default await defineConfig({
|
|
254
|
-
features: {
|
|
255
|
-
boundaries: true,
|
|
256
|
-
jsonc: true,
|
|
257
|
-
markdown: true,
|
|
258
|
-
pnpm: true,
|
|
259
|
-
unicorn: true,
|
|
260
|
-
vitest: true,
|
|
261
|
-
yaml: true
|
|
262
|
-
},
|
|
263
|
-
projects: {
|
|
264
|
-
'apps/docs': {
|
|
265
|
-
tailwind: { noUnknownClasses: false }
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
root: import.meta.dirname
|
|
269
|
-
})
|
|
270
|
-
```
|