@santi020k/eslint-config-basic 3.1.0 → 3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @santi020k/eslint-config-basic
2
2
 
3
+ ## 3.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#104](https://github.com/santi020k/eslint-config-basic/pull/104) [`522aed9`](https://github.com/santi020k/eslint-config-basic/commit/522aed93495faebff095f6e48dc731b7730e8f7a) Thanks [@santi020k](https://github.com/santi020k)! - Add `explain-preset` adoption reports and optional temporary compatibility
8
+ overrides grouped by formatting, correctness, security, framework, and domain
9
+ rules.
10
+
11
+ Make generated configs safer for real ESLint 10 monorepos by attaching referenced plugins locally, inheriting shared project detection and Tailwind options, composing untyped TypeScript overrides after framework parsers, and making doctor/install planning aware of workspace projects and modern feature selections.
12
+
13
+ Improve the CLI for pnpm workspaces by detecting the workspace root from nested
14
+ projects, preserving default and named catalogs during installation, and
15
+ requesting companion config packages with a version range compatible with the
16
+ installed Basic release. Command parsing is now strict, subcommand help is
17
+ side-effect free, minimum-release-age blocks are diagnosed, and safe v3 config
18
+ syntax is modernized during migration. Optional framework and feature-pack load
19
+ errors distinguish missing packages from evaluation failures while retaining the
20
+ original cause. Packed modular monorepo and peer-health release checks now verify
21
+ doctor, ESLint, TypeScript, frozen pnpm installs, and owned exceptions against
22
+ published-package boundaries.
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [[`a93a940`](https://github.com/santi020k/eslint-config-basic/commit/a93a9406d4e69d53f0e177c65b9aceeeec6ae1ba)]:
27
+ - @santi020k/eslint-config-typescript@3.1.1
28
+
3
29
  ## 3.1.0
4
30
 
5
31
  ### Minor Changes
@@ -0,0 +1,270 @@
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
+ ```