@williamthorsen/tsconfig 0.7.0 → 0.8.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/README.md CHANGED
@@ -3,13 +3,17 @@
3
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.
4
4
 
5
5
  <!-- section:release-notes -->
6
- ## Release notes — v0.7.0 (2026-08-30)
6
+ ## Release notes — v0.8.0 (2026-09-06)
7
7
 
8
8
  ### 🎉 Features
9
9
 
10
- - Report an include, exclude, or files path outside a tsconfig's directory (#197)
10
+ - 🚨 **Breaking:** Require a relative specifier to name its TypeScript source (#209)
11
11
 
12
- 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.
12
+ - 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`.
13
+ - Raises the `typescript` peer range to `>=5.7`, the first version in which a project emitting with `tsc` can write the required spelling.
14
+ - Sets `rewriteRelativeImportExtensions` in `@williamthorsen/tsconfig`'s base, so that a build that clears `noEmit` compiles a TypeScript-extension import.
15
+
16
+ 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.
13
17
  <!-- /section:release-notes -->
14
18
 
15
19
  ## Installation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@williamthorsen/tsconfig",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Shared TypeScript base config for Node-only projects",
5
5
  "keywords": [
6
6
  "tsconfig",
@@ -28,6 +28,9 @@
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.
33
+ "rewriteRelativeImportExtensions": true,
31
34
  // Without this, `lib` follows `target` into the `.full` variant, admitting DOM globals.
32
35
  // `ESNext.Disposable` carries the explicit-resource-management declarations; no numbered lib has them.
33
36
  "lib": ["ES2025", "ESNext.Disposable"],