@williamthorsen/tsconfig 0.9.0 → 0.10.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.
@@ -1,6 +1,6 @@
1
1
  /** @noformat -- @generated. Do not edit. Compiled by rdy. */
2
2
  /* eslint-disable */
3
- export const __readyupVersion = "0.35.1";
3
+ export const __readyupVersion = "0.38.0";
4
4
 
5
5
 
6
6
  // .readyup/kits/default.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: the base already supplies it with the same value"
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 sets applies"
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: below it, code that typechecks fails at runtime"
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
  }
@@ -11,52 +11,52 @@
11
11
  "esbuildVersion": "0.28.2",
12
12
  "inputs": [
13
13
  {
14
- "hash": "f4ec4ffd",
14
+ "hash": "d1952ca5",
15
15
  "kind": "module",
16
16
  "path": "kits/default.ts"
17
17
  },
18
18
  {
19
- "hash": "7e083072",
19
+ "hash": "cee0fa23",
20
20
  "kind": "module",
21
21
  "path": "../src/readiness/base-chain.ts"
22
22
  },
23
23
  {
24
- "hash": "86555b6e",
24
+ "hash": "4f053be6",
25
25
  "kind": "module",
26
26
  "path": "../src/readiness/classifyChain.ts"
27
27
  },
28
28
  {
29
- "hash": "723d4694",
29
+ "hash": "4861e1ce",
30
30
  "kind": "module",
31
31
  "path": "../src/readiness/es-year.ts"
32
32
  },
33
33
  {
34
- "hash": "bfbb0002",
34
+ "hash": "7e81b592",
35
35
  "kind": "module",
36
36
  "path": "../src/readiness/findEscapingPaths.ts"
37
37
  },
38
38
  {
39
- "hash": "acd6ba2b",
39
+ "hash": "b84db6a6",
40
40
  "kind": "module",
41
41
  "path": "../src/readiness/findRedundantOptions.ts"
42
42
  },
43
43
  {
44
- "hash": "30178e5c",
44
+ "hash": "d53de60d",
45
45
  "kind": "module",
46
46
  "path": "../src/readiness/listSearchDirs.ts"
47
47
  },
48
48
  {
49
- "hash": "31b0fbf5",
49
+ "hash": "ecb17b24",
50
50
  "kind": "module",
51
51
  "path": "../src/readiness/node-floor.ts"
52
52
  }
53
53
  ],
54
54
  "name": "default",
55
55
  "path": "kits/default.js",
56
- "readyupVersion": "0.35.1",
56
+ "readyupVersion": "0.38.0",
57
57
  "source": "kits/default.ts",
58
- "sourceHash": "f4ec4ffd",
59
- "targetHash": "9949c309"
58
+ "sourceHash": "d1952ca5",
59
+ "targetHash": "db184a57"
60
60
  }
61
61
  ]
62
62
  }
package/README.md CHANGED
@@ -1,17 +1,13 @@
1
1
  # @williamthorsen/tsconfig
2
2
 
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.
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 that it leaves out, so a consuming repo declares only what is genuinely its own.
4
4
 
5
5
  <!-- section:release-notes -->
6
- ## Release notes — v0.9.0 (2026-09-08)
6
+ ## Release notes — v0.10.0 (2026-09-29)
7
7
 
8
8
  ### 🎉 Features
9
9
 
10
- - 🚨 **Breaking:** Stop exempting vitest from n/no-extraneous-import (#219)
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.
10
+ - 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)
15
11
  <!-- /section:release-notes -->
16
12
 
17
13
  ## Installation
@@ -34,7 +30,7 @@ pnpm add -D @williamthorsen/tsconfig
34
30
 
35
31
  ## Adopting the base
36
32
 
37
- Extend the base from every tsconfig in the repo, not from the root alone. A workspace config reaches it either directly or through a config that does:
33
+ 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
34
 
39
35
  ```jsonc
40
36
  // packages/api/tsconfig.json
@@ -44,9 +40,9 @@ Extend the base from every tsconfig in the repo, not from the root alone. A work
44
40
  }
45
41
  ```
46
42
 
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 on resolves nothing.
43
+ 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
44
 
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.
45
+ 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
46
 
51
47
  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
48
 
@@ -64,7 +60,7 @@ Everything `@tsconfig/strictest` sets, plus the Node and build options it omits:
64
60
  | `removeComments` | `true` |
65
61
  | `target` | `"ES2025"` |
66
62
 
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 and no numbered lib yet carries.
63
+ `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
64
 
69
65
  ## What the consumer owns
70
66
 
@@ -78,11 +74,11 @@ The base declares none of these:
78
74
 
79
75
  ## Emitting
80
76
 
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.
77
+ 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
78
 
83
79
  ## Checking the configuration
84
80
 
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: 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.
81
+ 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
82
 
87
83
  Run it once:
88
84
 
@@ -100,15 +96,15 @@ export default defineRdyConfig({
100
96
  });
101
97
  ```
102
98
 
103
- The `readyup >=0.33.0` optional peer names the version the kit is developed and tested against. 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.
99
+ 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
100
 
105
101
  The kit walks each workspace tsconfig's `extends` chain and reports five things:
106
102
 
107
103
  - **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 wins against that base.
104
+ - **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
105
  - **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
106
  - **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 surface on its own, which is why it alone is an error.
107
+ - **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
108
 
113
109
  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
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@williamthorsen/tsconfig",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Shared TypeScript base config for Node-only projects",
5
5
  "keywords": [
6
6
  "tsconfig",
@@ -31,7 +31,7 @@
31
31
  "devDependencies": {
32
32
  "@tsconfig/strictest": "2.0.8",
33
33
  "esbuild": "0.28.2",
34
- "readyup": "0.35.1",
34
+ "readyup": "0.38.0",
35
35
  "vitest": "4.1.11"
36
36
  },
37
37
  "peerDependencies": {
@@ -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 carry no such comments: their rationale belongs to upstream.
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
- // The option TypeScript requires alongside the one above once a build clears `noEmit` and emits with
32
- // `tsc`, which rewrites the specifier's extension in output and declarations.
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` carries the explicit-resource-management declarations; no numbered lib has them.
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
  }