@williamthorsen/tsconfig 0.9.0 → 0.11.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/.meta/changelog.json +330 -0
- package/.readyup/kits/default.js +12 -12
- package/.readyup/manifest.json +33 -11
- package/CHANGELOG.md +162 -0
- package/README.md +16 -18
- package/package.json +4 -2
- package/tsconfig.base.json +6 -5
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.11.0",
|
|
4
|
+
"date": "2026-10-16",
|
|
5
|
+
"sections": [
|
|
6
|
+
{
|
|
7
|
+
"title": "🎉 Features",
|
|
8
|
+
"audience": "all",
|
|
9
|
+
"items": [
|
|
10
|
+
{
|
|
11
|
+
"description": "Ships `CHANGELOG.md` and the machine-readable `.meta/changelog.json` in the tarball of each published package, so that consumers receive the release history with the package. (#267)",
|
|
12
|
+
"hash": "c762a7d1dc34ddefc1cb2e4db74ca46eb70b2b0f",
|
|
13
|
+
"entry": 1
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"title": "♻️ Refactoring",
|
|
19
|
+
"audience": "dev",
|
|
20
|
+
"items": [
|
|
21
|
+
{
|
|
22
|
+
"description": "Rewrites the code reported by unicorn 76's new and widened rules in both readyup kits, `classifyChain`, and the `memoized-functions-returned-by-hook` and `no-undefined-with-number` rules, without changing what any of them returns. (#262)",
|
|
23
|
+
"hash": "d9234640a4ffd1f305d86c51b66ac1b1d9bc8e18",
|
|
24
|
+
"entry": 3
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "📚 Documentation",
|
|
30
|
+
"audience": "dev",
|
|
31
|
+
"items": [
|
|
32
|
+
{
|
|
33
|
+
"description": "Updates the readyup kit instructions in the `@williamthorsen/eslint-config-typescript` and `@williamthorsen/tsconfig` READMEs to the readyup 0.40 form, which lists the kit under `sources` as an `npm:` entry and runs it with `rdy run --sources`. (#265)",
|
|
34
|
+
"hash": "a20621bcb43644b12ef7b07a10a07c3333cdbccf",
|
|
35
|
+
"entry": 5
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"version": "0.10.0",
|
|
43
|
+
"date": "2026-09-29",
|
|
44
|
+
"sections": [
|
|
45
|
+
{
|
|
46
|
+
"title": "🎉 Features",
|
|
47
|
+
"audience": "all",
|
|
48
|
+
"items": [
|
|
49
|
+
{
|
|
50
|
+
"description": "Rewords the messages that the package's ReadyUp kit reports: The redundant-option check is now named \"No tsconfig re-declares an option that the base already supplies\", and the fix hints for the redundant-option, ES-year, Node-floor, and escaping-path checks are reworded. (#250)",
|
|
51
|
+
"hash": "ee5aa70fbb48acc8fa85a108163e16d0eaf1b701",
|
|
52
|
+
"entry": 1
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"title": "📚 Documentation",
|
|
58
|
+
"audience": "dev",
|
|
59
|
+
"items": [
|
|
60
|
+
{
|
|
61
|
+
"description": "Revises the comments under `packages/tsconfig/` to follow the comment-discipline rules, adding the missing comment on `target` in `tsconfig.base.json` and removing test comments that restate the description of the function under test. (#236)",
|
|
62
|
+
"hash": "0b6d6e9ba21954de6bca3c153cdf50c0531bd8ac",
|
|
63
|
+
"entry": 1
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"description": "Revises the `@williamthorsen/tsconfig` README, code comments, and test titles to follow the plain-speech and writing conventions. (#250)",
|
|
67
|
+
"hash": "ee5aa70fbb48acc8fa85a108163e16d0eaf1b701",
|
|
68
|
+
"entry": 2
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"version": "0.9.0",
|
|
76
|
+
"date": "2026-09-08",
|
|
77
|
+
"sections": [
|
|
78
|
+
{
|
|
79
|
+
"title": "🎉 Features",
|
|
80
|
+
"audience": "all",
|
|
81
|
+
"items": [
|
|
82
|
+
{
|
|
83
|
+
"description": "Stop exempting vitest from n/no-extraneous-import (#219)",
|
|
84
|
+
"body": "- Removes the `allowModules: ['vitest']` option from `n/no-extraneous-import`, so the rule now reports `vitest` in any workspace whose own `package.json` does not declare it.\n\nMigration: Declare `vitest` in the `devDependencies` of every workspace that imports it; in a pnpm workspace, a catalog entry (`\"vitest\": \"catalog:\"`) declares it without repeating the version. To keep the old behavior instead, set `'n/no-extraneous-import': ['error', { allowModules: ['vitest'] }]` in the consuming config's own `rules` block.",
|
|
85
|
+
"breaking": true,
|
|
86
|
+
"migration": "Declare `vitest` in the `devDependencies` of every workspace that imports it; in a pnpm workspace, a catalog entry (`\"vitest\": \"catalog:\"`) declares it without repeating the version. To keep the old behavior instead, set `'n/no-extraneous-import': ['error', { allowModules: ['vitest'] }]` in the consuming config's own `rules` block.",
|
|
87
|
+
"hash": "6c19f6d06b76f0d3ab8e92d6f1c1fd07bfd09427"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"title": "📚 Documentation",
|
|
93
|
+
"audience": "dev",
|
|
94
|
+
"items": [
|
|
95
|
+
{
|
|
96
|
+
"description": "Remove second person from package documentation (#216)",
|
|
97
|
+
"body": "- Removes the second-person pronouns from READMEs, migration guides, and the config template.",
|
|
98
|
+
"hash": "e54a3dfaae97f5519c3bd682c1a3fa32186ae5a8"
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"version": "0.8.0",
|
|
106
|
+
"date": "2026-09-06",
|
|
107
|
+
"sections": [
|
|
108
|
+
{
|
|
109
|
+
"title": "🎉 Features",
|
|
110
|
+
"audience": "all",
|
|
111
|
+
"items": [
|
|
112
|
+
{
|
|
113
|
+
"description": "Require a relative specifier to name its TypeScript source (#209)",
|
|
114
|
+
"body": "- Adds an `import-x/resolver` default to `@williamthorsen/eslint-config-typescript`. The default sets `extensionAlias` and is scoped to TypeScript files, so `import-x/no-cycle` reports a cycle among specifiers ending in `.js` and a JavaScript source still resolves `./b.js` to `b.js`.\n- Raises the `typescript` peer range to `>=5.7`, the first version in which a project emitting with `tsc` can write the required spelling.\n- Sets `rewriteRelativeImportExtensions` in `@williamthorsen/tsconfig`'s base, so that a build that clears `noEmit` compiles a TypeScript-extension import.\n\nMigration: Upgrade `typescript` to 5.7 or later, rewrite each relative specifier naming a TypeScript file to end in that file's own extension (`./b.ts`, not `./b.js`), and in the tsconfig owning those sources set `allowImportingTsExtensions` alongside `noEmit` or `emitDeclarationOnly`, or set `rewriteRelativeImportExtensions`. Do the rewrite by hand or with a codemod, and do not apply the editor suggestion that `import-x/extensions` offers: it appends the resolved extension rather than replacing the written one, turning `./b.js` into `./b.js.ts`. `docs/migrating-to-v15.md` walks through each step.",
|
|
115
|
+
"breaking": true,
|
|
116
|
+
"migration": "Upgrade `typescript` to 5.7 or later, rewrite each relative specifier naming a TypeScript file to end in that file's own extension (`./b.ts`, not `./b.js`), and in the tsconfig owning those sources set `allowImportingTsExtensions` alongside `noEmit` or `emitDeclarationOnly`, or set `rewriteRelativeImportExtensions`. Do the rewrite by hand or with a codemod, and do not apply the editor suggestion that `import-x/extensions` offers: it appends the resolved extension rather than replacing the written one, turning `./b.js` into `./b.js.ts`. `docs/migrating-to-v15.md` walks through each step.",
|
|
117
|
+
"hash": "bcfb56d00650e047d435674df52f90c780842158"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"version": "0.7.0",
|
|
125
|
+
"date": "2026-08-30",
|
|
126
|
+
"sections": [
|
|
127
|
+
{
|
|
128
|
+
"title": "🎉 Features",
|
|
129
|
+
"audience": "all",
|
|
130
|
+
"items": [
|
|
131
|
+
{
|
|
132
|
+
"description": "Report an include, exclude, or files path outside a tsconfig's directory (#197)",
|
|
133
|
+
"body": "Adds a `hygiene` checklist to the `@williamthorsen/tsconfig` readiness kit, reporting at `warn` a workspace tsconfig whose effective `include`, `exclude`, or `files` names a path outside the directory holding it, whether that config declared the field itself or inherited it from a base.",
|
|
134
|
+
"hash": "502e7c79012d7817925cc5bacbe7bd11bb55702a"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"version": "0.6.1",
|
|
142
|
+
"date": "2026-08-27",
|
|
143
|
+
"sections": [
|
|
144
|
+
{
|
|
145
|
+
"title": "🐛 Bug fixes",
|
|
146
|
+
"audience": "all",
|
|
147
|
+
"items": [
|
|
148
|
+
{
|
|
149
|
+
"description": "Restore the repo root to both readiness kits' search directories (#187)",
|
|
150
|
+
"body": "Fixes an issue where the readiness kits in `@williamthorsen/tsconfig` and `@williamthorsen/eslint-config-typescript` skipped the repo root in a monorepo running readyup below 0.33.0. Each kit now supplies the root itself, so the sweep is whole under any readyup version.",
|
|
151
|
+
"hash": "c24387a327ff68172fa1b26ec9b5c4c3f5a76013"
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"version": "0.6.0",
|
|
159
|
+
"date": "2026-08-26",
|
|
160
|
+
"sections": [
|
|
161
|
+
{
|
|
162
|
+
"title": "🎉 Features",
|
|
163
|
+
"audience": "all",
|
|
164
|
+
"items": [
|
|
165
|
+
{
|
|
166
|
+
"description": "Declare readyup as an optional peer of both kit-shipping packages (#179)",
|
|
167
|
+
"body": "Declares `readyup` as an optional peer dependency of `@williamthorsen/tsconfig` and `@williamthorsen/eslint-config-typescript`, with a `>=0.33.0` floor. Both packages ship readiness kits that run against the consumer's own readyup, and below 0.33.0 that readyup omits the repo root from a monorepo's workspace list, so the kits check every member package and leave the root unchecked.\n\nBoth kits now take readyup's workspace list directly, dropping the root literal each carried to compensate for the older behavior.\n\nMigration: A consumer running `rdy` against either kit upgrades `readyup` to 0.33.0 or later.",
|
|
168
|
+
"breaking": true,
|
|
169
|
+
"migration": "A consumer running `rdy` against either kit upgrades `readyup` to 0.33.0 or later.",
|
|
170
|
+
"hash": "e6e178f74c13f5aec33636c75b2b1f640b42c7b6"
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"title": "♻️ Refactoring",
|
|
176
|
+
"audience": "dev",
|
|
177
|
+
"items": [
|
|
178
|
+
{
|
|
179
|
+
"description": "Align function names with naming conventions (#181)",
|
|
180
|
+
"body": "Renames functions in the `tsconfig`, `eslint-config-typescript`, and `strict-lint` workspaces to align with naming conventions.",
|
|
181
|
+
"hash": "48a7ee85c2498887d750cab38ab2fdb44c1b7e06"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"version": "0.5.0",
|
|
189
|
+
"date": "2026-08-11",
|
|
190
|
+
"sections": [
|
|
191
|
+
{
|
|
192
|
+
"title": "🎉 Features",
|
|
193
|
+
"audience": "all",
|
|
194
|
+
"items": [
|
|
195
|
+
{
|
|
196
|
+
"description": "Require author, engines, and publish metadata in package.json (#162)",
|
|
197
|
+
"body": "Adds six `package-json` rules to `@williamthorsen/eslint-config-typescript` and removes three overrides that suppressed rules the plugin's `recommended` preset supplies. Every `package.json` must now declare `author` and `engines` and carry no empty field; one that publishes must also declare `bugs`, `homepage`, `keywords`, `repository`, and `sideEffects`, and may not take a dependency on a local path. `specify-peers-locally` is the only rule the config still disables.",
|
|
198
|
+
"breaking": true,
|
|
199
|
+
"hash": "4511d4162cd04ae78a2f9f985cc1f7c2c3e650b8"
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"title": "🐛 Bug fixes",
|
|
205
|
+
"audience": "all",
|
|
206
|
+
"items": [
|
|
207
|
+
{
|
|
208
|
+
"description": "Accept a source-path import in the kit's extends check (#155)",
|
|
209
|
+
"body": "Fixes an issue where the readiness check bundled with `@williamthorsen/eslint-config-typescript` reported that this repo's root ESLint config did not extend the package. The kit now accepts that an import via the workspace path is equivalent.",
|
|
210
|
+
"hash": "afed82c529f0dcd428c73de6419f540eb26afe0d"
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"title": "🤖 Agentic support",
|
|
216
|
+
"audience": "dev",
|
|
217
|
+
"items": [
|
|
218
|
+
{
|
|
219
|
+
"description": "Update AGENTS.md (#161)",
|
|
220
|
+
"body": "Updates project guidance in AGENTS.md. In particular, most information about the `nmr` task runner has been removed in deference to the guidance bundled with `nmr` itself. `nmr check` is now promoted as the usual check in place of the much slower, and usually unnecessary, `nmr ci`.",
|
|
221
|
+
"hash": "fb93700ab1158102c9aac1ce1b432e8aa1a67745"
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"version": "0.4.0",
|
|
229
|
+
"date": "2026-08-09",
|
|
230
|
+
"sections": [
|
|
231
|
+
{
|
|
232
|
+
"title": "🎉 Features",
|
|
233
|
+
"audience": "all",
|
|
234
|
+
"items": [
|
|
235
|
+
{
|
|
236
|
+
"description": "Add a bundled readyup kit that checks tsconfig adoption and alignment (#152)",
|
|
237
|
+
"body": "Adds a readiness check to `@williamthorsen/tsconfig` that reports, package by package, whether a repo has adopted the base config and stayed aligned with it. A package that extends a framework's own base is reported as having opted out. The Node floor is the only finding that fails the check; the rest is advisory. The check is run with `pnpm exec rdy run --from npm:@williamthorsen/tsconfig`.",
|
|
238
|
+
"hash": "f0ef4a0c2f8e6d4296a9148515208fb10ffc9e5e"
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"version": "0.3.0",
|
|
246
|
+
"date": "2026-08-07",
|
|
247
|
+
"sections": [
|
|
248
|
+
{
|
|
249
|
+
"title": "🎉 Features",
|
|
250
|
+
"audience": "all",
|
|
251
|
+
"items": [
|
|
252
|
+
{
|
|
253
|
+
"description": "Support explicit resource management for consumers (#148)",
|
|
254
|
+
"body": "Adds `ESNext.Disposable` to the libraries recognized by TypeScript in the exported base config. This enables the use of `using` and `await using` declarations.",
|
|
255
|
+
"hash": "df0113e43e8ee9994c7d20e5e56fc577f9ca67b3"
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"version": "0.2.1",
|
|
263
|
+
"date": "2026-08-04",
|
|
264
|
+
"sections": [
|
|
265
|
+
{
|
|
266
|
+
"title": "⚙️ Tooling",
|
|
267
|
+
"audience": "dev",
|
|
268
|
+
"items": [
|
|
269
|
+
{
|
|
270
|
+
"description": "Migrate the test suite to nmr's isolation tiers (#137)",
|
|
271
|
+
"body": "Changes Vitest configuration so that test suites are selected by a tier (\"unit\", \"tool\", \"localhost\", and \"remote\") corresponding to the services they use. `nmr test:unit` and `nmr test:tool` each run one of these; `nmr test:all` runs every suite. A test verifies that all test file names include the tier infix. `nmr test:integration` no longer exists, and no tests carry the `.int.` infix.",
|
|
272
|
+
"hash": "c2ce64bf7eecc1ced1c7c128288b0c0bf91d3544"
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"version": "0.2.0",
|
|
280
|
+
"date": "2026-08-02",
|
|
281
|
+
"sections": [
|
|
282
|
+
{
|
|
283
|
+
"title": "🎉 Features",
|
|
284
|
+
"audience": "all",
|
|
285
|
+
"items": [
|
|
286
|
+
{
|
|
287
|
+
"description": "Add defineConfig for authoring strict-lint configs (#133)",
|
|
288
|
+
"body": "Adds a `defineConfig` helper function for authoring the `strict-lint` config file.",
|
|
289
|
+
"hash": "c7b26ff68ce6daaff9d2ea5bdfc1040d757e78d6"
|
|
290
|
+
}
|
|
291
|
+
]
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"version": "0.1.1",
|
|
297
|
+
"date": "2026-08-01",
|
|
298
|
+
"sections": [
|
|
299
|
+
{
|
|
300
|
+
"title": "🐛 Bug fixes",
|
|
301
|
+
"audience": "all",
|
|
302
|
+
"items": [
|
|
303
|
+
{
|
|
304
|
+
"description": "Inline @tsconfig/strictest instead of extending it (#129)",
|
|
305
|
+
"body": "Fixes an issue where, under pnpm, tools that resolve tsconfig files without following symlinks failed to find `@tsconfig/strictest`, breaking lint runs and builds in projects that declare only `@williamthorsen/tsconfig`. Consuming projects no longer need to add `@tsconfig/strictest` to their own `package.json` as a workaround.",
|
|
306
|
+
"hash": "46091a4663fae35b65e2b71fbca598c539583bf6"
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"version": "0.1.0",
|
|
314
|
+
"date": "2026-07-23",
|
|
315
|
+
"sections": [
|
|
316
|
+
{
|
|
317
|
+
"title": "🎉 Features",
|
|
318
|
+
"audience": "all",
|
|
319
|
+
"items": [
|
|
320
|
+
{
|
|
321
|
+
"description": "Publish a shared TypeScript config on a Node 24 floor (#108)",
|
|
322
|
+
"body": "Introduces `@williamthorsen/tsconfig`, a published baseline that Node-only TypeScript projects can extend. It pairs the strictest available TypeScript settings with additional Node and build options. A consumer is left to declare its own ambient types, path aliases, JSX, and file globs.\n\n`@williamthorsen/eslint-config-typescript` now requires Node 24 or later.",
|
|
323
|
+
"breaking": true,
|
|
324
|
+
"hash": "a8386334bd04b7e41bb617c20795900163d56089"
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
]
|
package/.readyup/kits/default.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @noformat -- @generated. Do not edit. Compiled by rdy. */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export const __readyupVersion = "0.
|
|
3
|
+
export const __readyupVersion = "0.41.0";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
// .readyup/kits/default.ts
|
|
@@ -44,7 +44,7 @@ function classifyChain(chain) {
|
|
|
44
44
|
}
|
|
45
45
|
const baseIndex = findBaseIndex(chain.entries);
|
|
46
46
|
if (baseIndex !== void 0) return { baseIndex, kind: "adopted" };
|
|
47
|
-
return hasExternalBase(chain.entries) ?
|
|
47
|
+
return { kind: hasExternalBase(chain.entries) ? "external-base" : "unadopted" };
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
// src/readiness/es-year.ts
|
|
@@ -193,10 +193,10 @@ var default_default = defineRdyKit({
|
|
|
193
193
|
fix: `Extend ${BASE_SPECIFIER} from each tsconfig named above, and declare ${PACKAGE_NAME} as a devDependency of each package that names it but cannot resolve it. Adoption: ${ADOPTION_URL}`
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
|
-
name: "No tsconfig re-declares an option the base already supplies",
|
|
196
|
+
name: "No tsconfig re-declares an option that the base already supplies",
|
|
197
197
|
severity: "recommend",
|
|
198
198
|
check: noRedundantOptions,
|
|
199
|
-
fix: "Delete each option named above:
|
|
199
|
+
fix: "Delete each option named above: The base already supplies it with the same value"
|
|
200
200
|
}
|
|
201
201
|
]
|
|
202
202
|
},
|
|
@@ -207,14 +207,14 @@ var default_default = defineRdyKit({
|
|
|
207
207
|
name: `No tsconfig declares an ES year other than the one ${PACKAGE_NAME} sets`,
|
|
208
208
|
skip: skipUnlessBaseEsYearKnown,
|
|
209
209
|
check: everyEsYearMatchesTheBase,
|
|
210
|
-
fix: "Delete the target or lib declaration named above, so the ES year the base
|
|
210
|
+
fix: "Delete the target or lib declaration named above, so that the ES year set by the base applies"
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
name: "The declared Node floor supports the base's ES year",
|
|
214
214
|
severity: "error",
|
|
215
215
|
skip: skipUnlessNodeFloorComparable,
|
|
216
216
|
check: nodeFloorSupportsBaseEsYear,
|
|
217
|
-
fix: "Raise engines.node to a major implementing the base's ES year:
|
|
217
|
+
fix: "Raise engines.node to a major implementing the base's ES year: Below it, code that typechecks fails at runtime"
|
|
218
218
|
}
|
|
219
219
|
]
|
|
220
220
|
},
|
|
@@ -225,7 +225,7 @@ var default_default = defineRdyKit({
|
|
|
225
225
|
name: "No tsconfig's include, exclude, or files names a path outside its own directory",
|
|
226
226
|
skip: skipUnlessSomeTsconfigWasFound,
|
|
227
227
|
check: noEscapingPaths,
|
|
228
|
-
fix: "Declare the field named above in the config that owns the directory, listing every path it needs, since a local declaration replaces the inherited one rather than merging and discards the default exclude of node_modules, bower_components, jspm_packages, and outDir; or prefix each path in the config being extended with ${configDir}, which resolves to the consuming config's directory"
|
|
228
|
+
fix: "Declare the field named above in the config that owns the directory, listing every path that it needs, since a local declaration replaces the inherited one rather than merging and discards the default exclude of node_modules, bower_components, jspm_packages, and outDir; or prefix each path in the config being extended with ${configDir}, which resolves to the consuming config's directory"
|
|
229
229
|
}
|
|
230
230
|
]
|
|
231
231
|
}
|
|
@@ -320,7 +320,7 @@ function listTsconfigSearchDirs() {
|
|
|
320
320
|
}
|
|
321
321
|
function nodeFloorSupportsBaseEsYear() {
|
|
322
322
|
const verdict = judgeNodeFloor();
|
|
323
|
-
return verdict.kind === "skip"
|
|
323
|
+
return verdict.kind === "skip" || { ok: verdict.kind === "pass", detail: verdict.detail };
|
|
324
324
|
}
|
|
325
325
|
function noEscapingPaths() {
|
|
326
326
|
const judged = findTsconfigs().flatMap((path) => {
|
|
@@ -368,19 +368,19 @@ function resolveDirPath(dir, basename) {
|
|
|
368
368
|
return dir === "." ? basename : `${dir}/${basename}`;
|
|
369
369
|
}
|
|
370
370
|
function skipUnlessBaseEsYearKnown() {
|
|
371
|
-
return readBaseEsYear() === void 0
|
|
371
|
+
return readBaseEsYear() === void 0 && NO_BASE_ES_YEAR;
|
|
372
372
|
}
|
|
373
373
|
function skipUnlessNodeFloorComparable() {
|
|
374
374
|
const verdict = judgeNodeFloor();
|
|
375
|
-
return verdict.kind === "skip"
|
|
375
|
+
return verdict.kind === "skip" && verdict.reason;
|
|
376
376
|
}
|
|
377
377
|
function skipUnlessSomeTsconfigIsAccountable() {
|
|
378
378
|
const classified = classifyAdoptions();
|
|
379
379
|
if (classified.length === 0) return "no workspace tsconfig was found";
|
|
380
|
-
return classified.
|
|
380
|
+
return classified.every((adoption) => adoption.kind === "external-base") && "every workspace tsconfig extends a base belonging to another package";
|
|
381
381
|
}
|
|
382
382
|
function skipUnlessSomeTsconfigWasFound() {
|
|
383
|
-
return findTsconfigs().length === 0
|
|
383
|
+
return findTsconfigs().length === 0 && "no workspace tsconfig was found";
|
|
384
384
|
}
|
|
385
385
|
export {
|
|
386
386
|
default_default as default
|
package/.readyup/manifest.json
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
"version": 1,
|
|
3
3
|
"kits": [
|
|
4
4
|
{
|
|
5
|
+
"checklistChecks": [
|
|
6
|
+
{
|
|
7
|
+
"checklist": "adoption",
|
|
8
|
+
"checks": [
|
|
9
|
+
"Every workspace tsconfig extends @williamthorsen/tsconfig",
|
|
10
|
+
"No tsconfig re-declares an option that the base already supplies"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"checklist": "alignment",
|
|
15
|
+
"checks": [
|
|
16
|
+
"No tsconfig declares an ES year other than the one @williamthorsen/tsconfig sets",
|
|
17
|
+
"The declared Node floor supports the base's ES year"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"checklist": "hygiene",
|
|
22
|
+
"checks": [
|
|
23
|
+
"No tsconfig's include, exclude, or files names a path outside its own directory"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
],
|
|
5
27
|
"checklists": [
|
|
6
28
|
"adoption",
|
|
7
29
|
"alignment",
|
|
@@ -11,52 +33,52 @@
|
|
|
11
33
|
"esbuildVersion": "0.28.2",
|
|
12
34
|
"inputs": [
|
|
13
35
|
{
|
|
14
|
-
"hash": "
|
|
36
|
+
"hash": "e8776bde",
|
|
15
37
|
"kind": "module",
|
|
16
38
|
"path": "kits/default.ts"
|
|
17
39
|
},
|
|
18
40
|
{
|
|
19
|
-
"hash": "
|
|
41
|
+
"hash": "cee0fa23",
|
|
20
42
|
"kind": "module",
|
|
21
43
|
"path": "../src/readiness/base-chain.ts"
|
|
22
44
|
},
|
|
23
45
|
{
|
|
24
|
-
"hash": "
|
|
46
|
+
"hash": "f8442965",
|
|
25
47
|
"kind": "module",
|
|
26
48
|
"path": "../src/readiness/classifyChain.ts"
|
|
27
49
|
},
|
|
28
50
|
{
|
|
29
|
-
"hash": "
|
|
51
|
+
"hash": "4861e1ce",
|
|
30
52
|
"kind": "module",
|
|
31
53
|
"path": "../src/readiness/es-year.ts"
|
|
32
54
|
},
|
|
33
55
|
{
|
|
34
|
-
"hash": "
|
|
56
|
+
"hash": "7e81b592",
|
|
35
57
|
"kind": "module",
|
|
36
58
|
"path": "../src/readiness/findEscapingPaths.ts"
|
|
37
59
|
},
|
|
38
60
|
{
|
|
39
|
-
"hash": "
|
|
61
|
+
"hash": "b84db6a6",
|
|
40
62
|
"kind": "module",
|
|
41
63
|
"path": "../src/readiness/findRedundantOptions.ts"
|
|
42
64
|
},
|
|
43
65
|
{
|
|
44
|
-
"hash": "
|
|
66
|
+
"hash": "d53de60d",
|
|
45
67
|
"kind": "module",
|
|
46
68
|
"path": "../src/readiness/listSearchDirs.ts"
|
|
47
69
|
},
|
|
48
70
|
{
|
|
49
|
-
"hash": "
|
|
71
|
+
"hash": "ecb17b24",
|
|
50
72
|
"kind": "module",
|
|
51
73
|
"path": "../src/readiness/node-floor.ts"
|
|
52
74
|
}
|
|
53
75
|
],
|
|
54
76
|
"name": "default",
|
|
55
77
|
"path": "kits/default.js",
|
|
56
|
-
"readyupVersion": "0.
|
|
78
|
+
"readyupVersion": "0.41.0",
|
|
57
79
|
"source": "kits/default.ts",
|
|
58
|
-
"sourceHash": "
|
|
59
|
-
"targetHash": "
|
|
80
|
+
"sourceHash": "e8776bde",
|
|
81
|
+
"targetHash": "2748686b"
|
|
60
82
|
}
|
|
61
83
|
]
|
|
62
84
|
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## 0.11.0 — 2026-10-16
|
|
6
|
+
|
|
7
|
+
### 🎉 Features
|
|
8
|
+
|
|
9
|
+
- Ships `CHANGELOG.md` and the machine-readable `.meta/changelog.json` in the tarball of each published package, so that consumers receive the release history with the package. (#267)
|
|
10
|
+
|
|
11
|
+
### ♻️ Refactoring
|
|
12
|
+
|
|
13
|
+
- Rewrites the code reported by unicorn 76's new and widened rules in both readyup kits, `classifyChain`, and the `memoized-functions-returned-by-hook` and `no-undefined-with-number` rules, without changing what any of them returns. (#262)
|
|
14
|
+
|
|
15
|
+
### 📚 Documentation
|
|
16
|
+
|
|
17
|
+
- Updates the readyup kit instructions in the `@williamthorsen/eslint-config-typescript` and `@williamthorsen/tsconfig` READMEs to the readyup 0.40 form, which lists the kit under `sources` as an `npm:` entry and runs it with `rdy run --sources`. (#265)
|
|
18
|
+
|
|
19
|
+
## 0.10.0 — 2026-09-29
|
|
20
|
+
|
|
21
|
+
### 🎉 Features
|
|
22
|
+
|
|
23
|
+
- Rewords the messages that the package's ReadyUp kit reports: The redundant-option check is now named "No tsconfig re-declares an option that the base already supplies", and the fix hints for the redundant-option, ES-year, Node-floor, and escaping-path checks are reworded. (#250)
|
|
24
|
+
|
|
25
|
+
### 📚 Documentation
|
|
26
|
+
|
|
27
|
+
- Revises the comments under `packages/tsconfig/` to follow the comment-discipline rules, adding the missing comment on `target` in `tsconfig.base.json` and removing test comments that restate the description of the function under test. (#236)
|
|
28
|
+
- Revises the `@williamthorsen/tsconfig` README, code comments, and test titles to follow the plain-speech and writing conventions. (#250)
|
|
29
|
+
|
|
30
|
+
## 0.9.0 — 2026-09-08
|
|
31
|
+
|
|
32
|
+
### 🎉 Features
|
|
33
|
+
|
|
34
|
+
- 🚨 **Breaking:** Stop exempting vitest from n/no-extraneous-import (#219)
|
|
35
|
+
|
|
36
|
+
- Removes the `allowModules: ['vitest']` option from `n/no-extraneous-import`, so the rule now reports `vitest` in any workspace whose own `package.json` does not declare it.
|
|
37
|
+
|
|
38
|
+
Migration: Declare `vitest` in the `devDependencies` of every workspace that imports it; in a pnpm workspace, a catalog entry (`"vitest": "catalog:"`) declares it without repeating the version. To keep the old behavior instead, set `'n/no-extraneous-import': ['error', { allowModules: ['vitest'] }]` in the consuming config's own `rules` block.
|
|
39
|
+
|
|
40
|
+
### 📚 Documentation
|
|
41
|
+
|
|
42
|
+
- Remove second person from package documentation (#216)
|
|
43
|
+
|
|
44
|
+
- Removes the second-person pronouns from READMEs, migration guides, and the config template.
|
|
45
|
+
|
|
46
|
+
## 0.8.0 — 2026-09-06
|
|
47
|
+
|
|
48
|
+
### 🎉 Features
|
|
49
|
+
|
|
50
|
+
- 🚨 **Breaking:** Require a relative specifier to name its TypeScript source (#209)
|
|
51
|
+
|
|
52
|
+
- Adds an `import-x/resolver` default to `@williamthorsen/eslint-config-typescript`. The default sets `extensionAlias` and is scoped to TypeScript files, so `import-x/no-cycle` reports a cycle among specifiers ending in `.js` and a JavaScript source still resolves `./b.js` to `b.js`.
|
|
53
|
+
- Raises the `typescript` peer range to `>=5.7`, the first version in which a project emitting with `tsc` can write the required spelling.
|
|
54
|
+
- Sets `rewriteRelativeImportExtensions` in `@williamthorsen/tsconfig`'s base, so that a build that clears `noEmit` compiles a TypeScript-extension import.
|
|
55
|
+
|
|
56
|
+
Migration: Upgrade `typescript` to 5.7 or later, rewrite each relative specifier naming a TypeScript file to end in that file's own extension (`./b.ts`, not `./b.js`), and in the tsconfig owning those sources set `allowImportingTsExtensions` alongside `noEmit` or `emitDeclarationOnly`, or set `rewriteRelativeImportExtensions`. Do the rewrite by hand or with a codemod, and do not apply the editor suggestion that `import-x/extensions` offers: it appends the resolved extension rather than replacing the written one, turning `./b.js` into `./b.js.ts`. `docs/migrating-to-v15.md` walks through each step.
|
|
57
|
+
|
|
58
|
+
## 0.7.0 — 2026-08-30
|
|
59
|
+
|
|
60
|
+
### 🎉 Features
|
|
61
|
+
|
|
62
|
+
- Report an include, exclude, or files path outside a tsconfig's directory (#197)
|
|
63
|
+
|
|
64
|
+
Adds a `hygiene` checklist to the `@williamthorsen/tsconfig` readiness kit, reporting at `warn` a workspace tsconfig whose effective `include`, `exclude`, or `files` names a path outside the directory holding it, whether that config declared the field itself or inherited it from a base.
|
|
65
|
+
|
|
66
|
+
## 0.6.1 — 2026-08-27
|
|
67
|
+
|
|
68
|
+
### 🐛 Bug fixes
|
|
69
|
+
|
|
70
|
+
- Restore the repo root to both readiness kits' search directories (#187)
|
|
71
|
+
|
|
72
|
+
Fixes an issue where the readiness kits in `@williamthorsen/tsconfig` and `@williamthorsen/eslint-config-typescript` skipped the repo root in a monorepo running readyup below 0.33.0. Each kit now supplies the root itself, so the sweep is whole under any readyup version.
|
|
73
|
+
|
|
74
|
+
## 0.6.0 — 2026-08-26
|
|
75
|
+
|
|
76
|
+
### 🎉 Features
|
|
77
|
+
|
|
78
|
+
- 🚨 **Breaking:** Declare readyup as an optional peer of both kit-shipping packages (#179)
|
|
79
|
+
|
|
80
|
+
Declares `readyup` as an optional peer dependency of `@williamthorsen/tsconfig` and `@williamthorsen/eslint-config-typescript`, with a `>=0.33.0` floor. Both packages ship readiness kits that run against the consumer's own readyup, and below 0.33.0 that readyup omits the repo root from a monorepo's workspace list, so the kits check every member package and leave the root unchecked.
|
|
81
|
+
|
|
82
|
+
Both kits now take readyup's workspace list directly, dropping the root literal each carried to compensate for the older behavior.
|
|
83
|
+
|
|
84
|
+
Migration: A consumer running `rdy` against either kit upgrades `readyup` to 0.33.0 or later.
|
|
85
|
+
|
|
86
|
+
### ♻️ Refactoring
|
|
87
|
+
|
|
88
|
+
- Align function names with naming conventions (#181)
|
|
89
|
+
|
|
90
|
+
Renames functions in the `tsconfig`, `eslint-config-typescript`, and `strict-lint` workspaces to align with naming conventions.
|
|
91
|
+
|
|
92
|
+
## 0.5.0 — 2026-08-11
|
|
93
|
+
|
|
94
|
+
### 🎉 Features
|
|
95
|
+
|
|
96
|
+
- 🚨 **Breaking:** Require author, engines, and publish metadata in package.json (#162)
|
|
97
|
+
|
|
98
|
+
Adds six `package-json` rules to `@williamthorsen/eslint-config-typescript` and removes three overrides that suppressed rules the plugin's `recommended` preset supplies. Every `package.json` must now declare `author` and `engines` and carry no empty field; one that publishes must also declare `bugs`, `homepage`, `keywords`, `repository`, and `sideEffects`, and may not take a dependency on a local path. `specify-peers-locally` is the only rule the config still disables.
|
|
99
|
+
|
|
100
|
+
### 🐛 Bug fixes
|
|
101
|
+
|
|
102
|
+
- Accept a source-path import in the kit's extends check (#155)
|
|
103
|
+
|
|
104
|
+
Fixes an issue where the readiness check bundled with `@williamthorsen/eslint-config-typescript` reported that this repo's root ESLint config did not extend the package. The kit now accepts that an import via the workspace path is equivalent.
|
|
105
|
+
|
|
106
|
+
### 🤖 Agentic support
|
|
107
|
+
|
|
108
|
+
- Update AGENTS.md (#161)
|
|
109
|
+
|
|
110
|
+
Updates project guidance in AGENTS.md. In particular, most information about the `nmr` task runner has been removed in deference to the guidance bundled with `nmr` itself. `nmr check` is now promoted as the usual check in place of the much slower, and usually unnecessary, `nmr ci`.
|
|
111
|
+
|
|
112
|
+
## 0.4.0 — 2026-08-09
|
|
113
|
+
|
|
114
|
+
### 🎉 Features
|
|
115
|
+
|
|
116
|
+
- Add a bundled readyup kit that checks tsconfig adoption and alignment (#152)
|
|
117
|
+
|
|
118
|
+
Adds a readiness check to `@williamthorsen/tsconfig` that reports, package by package, whether a repo has adopted the base config and stayed aligned with it. A package that extends a framework's own base is reported as having opted out. The Node floor is the only finding that fails the check; the rest is advisory. The check is run with `pnpm exec rdy run --from npm:@williamthorsen/tsconfig`.
|
|
119
|
+
|
|
120
|
+
## 0.3.0 — 2026-08-07
|
|
121
|
+
|
|
122
|
+
### 🎉 Features
|
|
123
|
+
|
|
124
|
+
- Support explicit resource management for consumers (#148)
|
|
125
|
+
|
|
126
|
+
Adds `ESNext.Disposable` to the libraries recognized by TypeScript in the exported base config. This enables the use of `using` and `await using` declarations.
|
|
127
|
+
|
|
128
|
+
## 0.2.1 — 2026-08-04
|
|
129
|
+
|
|
130
|
+
### ⚙️ Tooling
|
|
131
|
+
|
|
132
|
+
- Migrate the test suite to nmr's isolation tiers (#137)
|
|
133
|
+
|
|
134
|
+
Changes Vitest configuration so that test suites are selected by a tier ("unit", "tool", "localhost", and "remote") corresponding to the services they use. `nmr test:unit` and `nmr test:tool` each run one of these; `nmr test:all` runs every suite. A test verifies that all test file names include the tier infix. `nmr test:integration` no longer exists, and no tests carry the `.int.` infix.
|
|
135
|
+
|
|
136
|
+
## 0.2.0 — 2026-08-02
|
|
137
|
+
|
|
138
|
+
### 🎉 Features
|
|
139
|
+
|
|
140
|
+
- Add defineConfig for authoring strict-lint configs (#133)
|
|
141
|
+
|
|
142
|
+
Adds a `defineConfig` helper function for authoring the `strict-lint` config file.
|
|
143
|
+
|
|
144
|
+
## 0.1.1 — 2026-08-01
|
|
145
|
+
|
|
146
|
+
### 🐛 Bug fixes
|
|
147
|
+
|
|
148
|
+
- Inline @tsconfig/strictest instead of extending it (#129)
|
|
149
|
+
|
|
150
|
+
Fixes an issue where, under pnpm, tools that resolve tsconfig files without following symlinks failed to find `@tsconfig/strictest`, breaking lint runs and builds in projects that declare only `@williamthorsen/tsconfig`. Consuming projects no longer need to add `@tsconfig/strictest` to their own `package.json` as a workaround.
|
|
151
|
+
|
|
152
|
+
## 0.1.0 — 2026-07-23
|
|
153
|
+
|
|
154
|
+
### 🎉 Features
|
|
155
|
+
|
|
156
|
+
- 🚨 **Breaking:** Publish a shared TypeScript config on a Node 24 floor (#108)
|
|
157
|
+
|
|
158
|
+
Introduces `@williamthorsen/tsconfig`, a published baseline that Node-only TypeScript projects can extend. It pairs the strictest available TypeScript settings with additional Node and build options. A consumer is left to declare its own ambient types, path aliases, JSX, and file globs.
|
|
159
|
+
|
|
160
|
+
`@williamthorsen/eslint-config-typescript` now requires Node 24 or later.
|
|
161
|
+
|
|
162
|
+
<!-- Generated by release-kit. Do not edit this file. Use .meta/changelog-overrides.json to override entries. -->
|
package/README.md
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
+
<!-- readme-type: config -->
|
|
2
|
+
|
|
1
3
|
# @williamthorsen/tsconfig
|
|
2
4
|
|
|
3
|
-
Shared TypeScript base config for Node-only projects. Inlines the settings of [`@tsconfig/strictest`](https://www.npmjs.com/package/@tsconfig/strictest) and adds the Node and build options it leaves out, so a consuming repo declares only what is genuinely its own.
|
|
5
|
+
Shared TypeScript base config for Node-only projects. Inlines the settings of [`@tsconfig/strictest`](https://www.npmjs.com/package/@tsconfig/strictest) and adds the Node and build options that it leaves out, so a consuming repo declares only what is genuinely its own.
|
|
4
6
|
|
|
5
7
|
<!-- section:release-notes -->
|
|
6
|
-
## Release notes — v0.
|
|
8
|
+
## Release notes — v0.11.0 (2026-10-16)
|
|
7
9
|
|
|
8
10
|
### 🎉 Features
|
|
9
11
|
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
- Removes the `allowModules: ['vitest']` option from `n/no-extraneous-import`, so the rule now reports `vitest` in any workspace whose own `package.json` does not declare it.
|
|
13
|
-
|
|
14
|
-
Migration: Declare `vitest` in the `devDependencies` of every workspace that imports it; in a pnpm workspace, a catalog entry (`"vitest": "catalog:"`) declares it without repeating the version. To keep the old behavior instead, set `'n/no-extraneous-import': ['error', { allowModules: ['vitest'] }]` in the consuming config's own `rules` block.
|
|
12
|
+
- Ships `CHANGELOG.md` and the machine-readable `.meta/changelog.json` in the tarball of each published package, so that consumers receive the release history with the package. (#267)
|
|
15
13
|
<!-- /section:release-notes -->
|
|
16
14
|
|
|
17
15
|
## Installation
|
|
@@ -34,7 +32,7 @@ pnpm add -D @williamthorsen/tsconfig
|
|
|
34
32
|
|
|
35
33
|
## Adopting the base
|
|
36
34
|
|
|
37
|
-
Extend the base from every tsconfig in the repo, not from the root alone. A workspace config
|
|
35
|
+
Extend the base from every tsconfig in the repo, not from the root alone. A workspace config extends it either directly or through a config that does:
|
|
38
36
|
|
|
39
37
|
```jsonc
|
|
40
38
|
// packages/api/tsconfig.json
|
|
@@ -44,9 +42,9 @@ Extend the base from every tsconfig in the repo, not from the root alone. A work
|
|
|
44
42
|
}
|
|
45
43
|
```
|
|
46
44
|
|
|
47
|
-
Every package whose tsconfig names the base by package specifier must also declare it as a devDependency: TypeScript resolves `extends` from the directory of the config that declares it, so a workspace naming a package it does not depend
|
|
45
|
+
Every package whose tsconfig names the base by package specifier must also declare it as a devDependency: TypeScript resolves `extends` from the directory of the config that declares it, so a workspace naming a package on which it does not depend resolves nothing.
|
|
48
46
|
|
|
49
|
-
Once the base is in the chain, delete the options it already supplies with the same value. The inherited value applies either way, and the copy left behind stops tracking the base the next time it changes. An option set to a _different_ value is an override and stays.
|
|
47
|
+
Once the base is in the chain, delete the options that it already supplies with the same value. The inherited value applies either way, and the copy left behind stops tracking the base the next time it changes. An option set to a _different_ value is an override and stays.
|
|
50
48
|
|
|
51
49
|
A package that extends a framework base such as `astro/tsconfigs/base` or `@tsconfig/svelte` has opted out of this one, which is a supported choice.
|
|
52
50
|
|
|
@@ -64,7 +62,7 @@ Everything `@tsconfig/strictest` sets, plus the Node and build options it omits:
|
|
|
64
62
|
| `removeComments` | `true` |
|
|
65
63
|
| `target` | `"ES2025"` |
|
|
66
64
|
|
|
67
|
-
`target` and `lib` are pinned to a Node 24 floor. `ESNext.Disposable` supplies the explicit-resource-management declarations (`using`, `Disposable`, `DisposableStack`), which Node 24 implements
|
|
65
|
+
`target` and `lib` are pinned to a Node 24 floor. `ESNext.Disposable` supplies the explicit-resource-management declarations (`using`, `Disposable`, `DisposableStack`), which Node 24 implements but the numbered libs do not yet include.
|
|
68
66
|
|
|
69
67
|
## What the consumer owns
|
|
70
68
|
|
|
@@ -78,11 +76,11 @@ The base declares none of these:
|
|
|
78
76
|
|
|
79
77
|
## Emitting
|
|
80
78
|
|
|
81
|
-
The base sets `noEmit: true`, on the assumption that a separate build step owns emit. A consumer that builds with this config directly must override `noEmit` and, if it keeps `allowImportingTsExtensions`, pair that with `rewriteRelativeImportExtensions` so `./foo.ts` specifiers survive the rewrite.
|
|
79
|
+
The base sets `noEmit: true`, on the assumption that a separate build step owns emit. A consumer that builds with this config directly must override `noEmit` and, if it keeps `allowImportingTsExtensions`, pair that with `rewriteRelativeImportExtensions` so that `./foo.ts` specifiers survive the rewrite.
|
|
82
80
|
|
|
83
81
|
## Checking the configuration
|
|
84
82
|
|
|
85
|
-
This package ships a [ReadyUp](https://www.npmjs.com/package/readyup) kit that checks whether the workspace tsconfigs are wired for the installed version. It is a migration aid rather than a CI gate:
|
|
83
|
+
This package ships a [ReadyUp](https://www.npmjs.com/package/readyup) kit that checks whether the workspace tsconfigs are wired for the installed version. It is a migration aid rather than a CI gate: Only a Node floor too old to run the base's ES year is reported as an error, and everything else caps at a warning.
|
|
86
84
|
|
|
87
85
|
Run it once:
|
|
88
86
|
|
|
@@ -90,25 +88,25 @@ Run it once:
|
|
|
90
88
|
pnpm exec rdy run --from npm:@williamthorsen/tsconfig
|
|
91
89
|
```
|
|
92
90
|
|
|
93
|
-
Or list it in `.config/readyup.config.ts` to include it in every `rdy run --
|
|
91
|
+
Or list it in `.config/readyup.config.ts` to include it in every `rdy run --sources`:
|
|
94
92
|
|
|
95
93
|
```ts
|
|
96
94
|
import { defineRdyConfig } from 'readyup';
|
|
97
95
|
|
|
98
96
|
export default defineRdyConfig({
|
|
99
|
-
|
|
97
|
+
sources: ['npm:@williamthorsen/tsconfig'],
|
|
100
98
|
});
|
|
101
99
|
```
|
|
102
100
|
|
|
103
|
-
The `readyup >=0.33.0` optional peer names the version the kit is developed and tested
|
|
101
|
+
The `readyup >=0.33.0` optional peer names the version against which the kit is developed and tested. Below 0.33.0, readyup does not report the repo root among a monorepo's workspaces, so the kit supplies the root itself and sweeps every member package alongside it.
|
|
104
102
|
|
|
105
103
|
The kit walks each workspace tsconfig's `extends` chain and reports five things:
|
|
106
104
|
|
|
107
105
|
- **Adoption**: a tsconfig reaching neither this base nor a framework base. A tsconfig naming this base through a specifier that does not resolve is reported separately, as declared but not installed.
|
|
108
|
-
- **Re-declaration**: an option restated with the base's own value. A key that a framework base in the same chain also declares is exempt, since restating it is how a config
|
|
106
|
+
- **Re-declaration**: an option restated with the base's own value. A key that a framework base in the same chain also declares is exempt, since restating it is how a config overrides that base.
|
|
109
107
|
- **Escaping paths**: an `include`, `exclude`, or `files` path resolving outside the directory that holds the tsconfig. A config that is extended hands these fields down resolved against its own directory, so a package inheriting them is governed by paths pointing outside itself; the remedy is a complete local declaration, or `${configDir}` in the config being extended.
|
|
110
108
|
- **ES year**: a `target` or `lib` declaring a year other than the base's, read from the base that the tsconfig extends rather than from a constant compiled into the kit.
|
|
111
|
-
- **Node floor**: an `engines.node` below the major that implements that ES year. This is the one failure `tsc` cannot
|
|
109
|
+
- **Node floor**: an `engines.node` below the major that implements that ES year. This is the one failure that `tsc` cannot report on its own, which is why it alone is an error.
|
|
112
110
|
|
|
113
111
|
The kit runs at the version resolved from the project's `node_modules`, so it reports whether the configuration matches that version. It never reports whether that version is current.
|
|
114
112
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@williamthorsen/tsconfig",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Shared TypeScript base config for Node-only projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tsconfig",
|
|
@@ -24,14 +24,16 @@
|
|
|
24
24
|
"./tsconfig.base.json": "./tsconfig.base.json"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
|
+
".meta/changelog.json",
|
|
27
28
|
".readyup/kits/*.js",
|
|
28
29
|
".readyup/manifest.json",
|
|
30
|
+
"CHANGELOG.md",
|
|
29
31
|
"tsconfig.base.json"
|
|
30
32
|
],
|
|
31
33
|
"devDependencies": {
|
|
32
34
|
"@tsconfig/strictest": "2.0.8",
|
|
33
35
|
"esbuild": "0.28.2",
|
|
34
|
-
"readyup": "0.
|
|
36
|
+
"readyup": "0.41.0",
|
|
35
37
|
"vitest": "4.1.11"
|
|
36
38
|
},
|
|
37
39
|
"peerDependencies": {
|
package/tsconfig.base.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// Base TSConfig for Node-only TypeScript: `@tsconfig/strictest` plus the Node/build options it omits.
|
|
1
|
+
// Base TSConfig for Node-only TypeScript: `@tsconfig/strictest` plus the Node/build options that it omits.
|
|
2
2
|
// Consumers set `types`, `paths`, `jsx`, and `include`. Node 24 floor.
|
|
3
3
|
//
|
|
4
4
|
// Every Node/build setting deviates from a TypeScript default; a comment says why it can't be dropped.
|
|
5
|
-
// The inlined strictest settings
|
|
5
|
+
// The inlined strictest settings have no such comments: Their rationale belongs to upstream.
|
|
6
6
|
{
|
|
7
7
|
"$schema": "https://json.schemastore.org/tsconfig",
|
|
8
8
|
"compilerOptions": {
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
|
|
29
29
|
// Permit `./foo.ts` specifiers; the build step rewrites them on emit.
|
|
30
30
|
"allowImportingTsExtensions": true,
|
|
31
|
-
//
|
|
32
|
-
//
|
|
31
|
+
// Required alongside `allowImportingTsExtensions` once a build clears `noEmit` and emits with `tsc`,
|
|
32
|
+
// which then rewrites the specifier's extension in output and declarations.
|
|
33
33
|
"rewriteRelativeImportExtensions": true,
|
|
34
34
|
// Without this, `lib` follows `target` into the `.full` variant, admitting DOM globals.
|
|
35
|
-
// `ESNext.Disposable`
|
|
35
|
+
// `ESNext.Disposable` contains the explicit-resource-management declarations; no numbered lib has them.
|
|
36
36
|
"lib": ["ES2025", "ESNext.Disposable"],
|
|
37
37
|
// Default is `ES2022` with `Bundler` resolution: wrong for published Node packages.
|
|
38
38
|
"module": "NodeNext",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"noEmit": true,
|
|
43
43
|
// Inert until a build step clears `noEmit`; keeps published output comment-free.
|
|
44
44
|
"removeComments": true,
|
|
45
|
+
// Default is the latest ES year that the installed TypeScript knows; pin the year that the Node floor implements.
|
|
45
46
|
"target": "ES2025",
|
|
46
47
|
},
|
|
47
48
|
}
|