@alxwlw/tsconfig 1.4.2 → 1.6.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 +9 -9
- package/base.json +1 -1
- package/bun.json +1 -1
- package/node.json +1 -1
- package/package.json +1 -1
- package/react.json +1 -1
- package/refs.json +2 -2
package/README.md
CHANGED
|
@@ -6,15 +6,15 @@ directly from `packages/tsconfig/`).
|
|
|
6
6
|
|
|
7
7
|
## Presets
|
|
8
8
|
|
|
9
|
-
| Preset | Extends | Use it for
|
|
10
|
-
| -------------- | ------- |
|
|
11
|
-
| `base.json` | — | Never extended directly by an app. Strict TS7 defaults every other preset builds on: `strict`, `noUncheckedIndexedAccess`, `verbatimModuleSyntax`, `declaration`.
|
|
12
|
-
| `node.json` | `base` | A Node-targeted package or script. Adds `lib: ["
|
|
13
|
-
| `library.json` | `base` | A package that ships compiled output for others to import. `emitDeclarationOnly` — types out, no `.js` (a bundler/`tsc -p` elsewhere produces the runtime file).
|
|
14
|
-
| `react.json` | `base` | Browser/React code. `lib: ["
|
|
15
|
-
| `refs.json` | `node` | A pnpm+moon **project-references** monorepo package: `composite`, `incremental`, emits only `.d.ts` into `.tsbuild/` — runtime JS comes from Bun/SWC/a bundler, not `tsc`.
|
|
16
|
-
| `nest.json` | `refs` | A NestJS package on `refs.json`'s project-references discipline: legacy decorators + `emitDecoratorMetadata`, and `verbatimModuleSyntax: false` (DI needs the type import to survive erasure — see the preset's own comment).
|
|
17
|
-
| `bun.json` | `base` | A Bun-native script or CLI (this repo's own `packages/stack` uses it): bundler resolution, `types: ["bun"]`, `noEmit`, `allowImportingTsExtensions`.
|
|
9
|
+
| Preset | Extends | Use it for |
|
|
10
|
+
| -------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
11
|
+
| `base.json` | — | Never extended directly by an app. Strict TS7 defaults every other preset builds on: `strict`, `noUncheckedIndexedAccess`, `verbatimModuleSyntax`, `declaration`. |
|
|
12
|
+
| `node.json` | `base` | A Node-targeted package or script. Adds `lib: ["ES2025"]` and `types: ["node"]`. |
|
|
13
|
+
| `library.json` | `base` | A package that ships compiled output for others to import. `emitDeclarationOnly` — types out, no `.js` (a bundler/`tsc -p` elsewhere produces the runtime file). |
|
|
14
|
+
| `react.json` | `base` | Browser/React code. `lib: ["ES2025", "DOM", "DOM.Iterable"]`, `jsx: "react-jsx"`, bundler resolution. |
|
|
15
|
+
| `refs.json` | `node` | A pnpm+moon **project-references** monorepo package: `composite`, `incremental`, emits only `.d.ts` into `.tsbuild/` — runtime JS comes from Bun/SWC/a bundler, not `tsc`. The moon-tasks canon `typecheck` (`--noEmit`) does not build the references. |
|
|
16
|
+
| `nest.json` | `refs` | A NestJS package on `refs.json`'s project-references discipline: legacy decorators + `emitDecoratorMetadata`, and `verbatimModuleSyntax: false` (DI needs the type import to survive erasure — see the preset's own comment). |
|
|
17
|
+
| `bun.json` | `base` | A Bun-native script or CLI (this repo's own `packages/stack` uses it): bundler resolution, `types: ["bun"]`, `noEmit`, `allowImportingTsExtensions`. |
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
package/base.json
CHANGED
package/bun.json
CHANGED
package/node.json
CHANGED
package/package.json
CHANGED
package/react.json
CHANGED
package/refs.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
// (TS 5.5+), so per-package tsconfigs usually need nothing beyond "extends".
|
|
7
7
|
"extends": "./node.json",
|
|
8
8
|
"compilerOptions": {
|
|
9
|
-
"target": "
|
|
10
|
-
"lib": ["
|
|
9
|
+
"target": "ES2025",
|
|
10
|
+
"lib": ["ES2025"],
|
|
11
11
|
|
|
12
12
|
"noFallthroughCasesInSwitch": true,
|
|
13
13
|
"noImplicitOverride": true,
|