ts-config
/ts-config
Use when creating or migrating a tsconfig.json, choosing module/moduleResolution, or fixing TS 6.0 deprecations that are hard errors in TS 7.0. Not for language syntax (ts-language-patterns).
- Author
- fusengine ↗
- Repository
- agents ↗
- Licence
- MIT
- Last repository change
- 12.10.2026
Assessment and security
- Files in this package
- 7
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 12.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when creating or migrating a tsconfig.json, choosing module/moduleResolution, or fixing TS 6.0 deprecations that are hard errors in TS 7.0. Not for language syntax (ts-language-patterns).
Original author description
Use when creating or migrating a tsconfig.json, choosing module/moduleResolution, or fixing TS 6.0 deprecations that are hard errors in TS 7.0. Not for language syntax (ts-language-patterns).
How it works
- Agent Workflow (MANDATORY)
- Overview
- Critical Rules
- Decision: which track?
- Reference Guide
- Quick Reference
- Best Practices
SKILL.md preview
---
name: ts-config
description: "Use when creating or migrating a tsconfig.json, choosing module/moduleResolution, or fixing TS 6.0 deprecations that are hard errors in TS 7.0. Not for language syntax (ts-language-patterns)."
versions:
typescript: "7.0"
node: "24"
bun: "1.4"
user-invocable: false
references: references/bundler-track.md, references/node-track.md, references/deprecations-6.md, references/templates/tsconfig.bundler.md, references/templates/tsconfig.node.md
related-skills: ts-language-patterns, solid-generic
---
<objective>
This skill covers the two supported TypeScript 7.0 config tracks for 2026 — bundler (Bun,
Vite, esbuild, webpack: module Preserve + moduleResolution bundler) and Node (pure Node.js
native type stripping: module nodenext + moduleResolution nodenext) — and how to pick
between them by runtime.
It also covers the TS 6.0 deprecation cleanup that TS 7.0 (native Go compiler) enforces as
hard errors: dropping moduleResolution node/node10, setting verbatimModuleSyntax, strict +
noUncheckedIndexedAccess, explicit types, and explicit rootDir now that it is no longer
inferred.
Out of scope: TypeScript language syntax and idioms belong to ts-language-patterns;
framework configs that ship their own tsconfig base (Next.js/Astro/Vite plugin skills) and
non-TS build tooling are not covered.
</objective>
# TypeScript Config (TS 7.0)
## Agent Workflow (MANDATORY)
Before writing any tsconfig, spawn 3 agents in parallel, one `Agent` call each with a `name`:
1. **fuse-ai-pilot:explore-codebase** - Detect runtime (Bun/Node/bundler), existing tsconfig, `package.json` `type`
2. **fuse-ai-pilot:research-expert** - Confirm current flags on typescriptlang.org release notes + runtime docs
3. **mcp__context7__query-docs** - `/microsoft/typescript` for any flag whose behavior is unclear
After writing, run **fuse-ai-pilot:sniper** for validation.
---
## Overview
There are exactly **two supported config trajectories** in 2026. Pick by runtime, never mix.
| Track | Runtime | `module` | `moduleResolution` |
|-------|---------|----------|--------------------|
| **Bundler** | Bun, Vite, esbuild, webpack | `Preserve` | `bundler` |
| **Node** | Pure Node.js (native type stripping) | `nodenext` | `nodenext` |
---
## Critical Rules
1. **Never `moduleResolution: node` / `node10`** - deprecated in 6.0, hard error in 7.0. Use `bundler` or `nodenext`.
2. **Always `verbatimModuleSyntax: true`** - both tracks. Forces explicit `import type`, matches Node's type stripping.
3. **`strict` + `noUncheckedIndexedAccess`** - strict is the default since 6.0 (kept in 7.0); add `noUncheckedIndexedAccess` explicitly.
4. **Set `types` explicitly** - since 6.0 (kept in 7.0) `types` defaults to `[]`. Add `["node"]`, `["bun"]`, etc. or you lose globals.
5. **Set `rootDir` when sources are nested** - since 6.0 (kept in 7.0) `rootDir` defaults to the tsconfig dir, no longer inferred.
---
## Decision: which track?
```
Runs on Bun, or bundled by Vite/esbuild/webpack/Parcel?
→ Bundler track → references/bundler-track.md
Runs directly on `node file.ts` (type stripping), or emits .js for Node?
→ Node track → references/node-track.md
Migrating an existing 5.x config / seeing deprecation errors?
→ references/deprecations-6.md (do this first, then pick a track)
```
---
## Reference Guide
### Concepts
| Topic | Reference | When to Consult |
|-------|-----------|-----------------|
| **Bundler track** | [bundler-track.md](references/bundler-track.md) | Load when configuring a Bun or bundler (Vite/esbuild/webpack) project |
| **Node track** | [node-track.md](references/node-track.md) | Load when configuring a pure Node.js project with native type stripping |
| **6.0 deprecations / 7.0 errors** | [deprecations-6.md](references/deprecations-6.md) | Load when migrating from TS 5.x/6.0, fixing deprecation errors, or adopting the TS 7.0 `tsc` |
### Templates
| Template | When to Use |
|----------|-------------|
| [tsconfig.bundler.md](references/templates/tsconfig.bundler.md) | Complete Bun/bundler tsconfig |
| [tsconfig.node.md](references/templates/tsconfig.node.md) | Complete pure-Node tsconfig |
---
## Quick Reference
### Bundler / Bun
```jsonc
{
"compilerOptions": {
"module": "Preserve",
"moduleResolution": "bundler",
"verbatimModuleSyntax": true,
"allowImportingTsExtensions": true,
"noEmit": true,
"strict": true,
"noUncheckedIndexedAccess": true
}
}
```
### Pure Node.js (native type stripping)
```jsonc
{
"compilerOptions": {
"module": "nodenext",
"rewriteRelativeImportExtensions": true,
"erasableSyntaxOnly": true,
"verbatimModuleSyntax": true,
"noEmit": true, // only if you never emit .js
"strict": true
}
}
```
---
## Best Practices
### DO
- Add `"ignoreDeprecations": "6.0"` **temporarily** on TS 6.0 while migrating, then remove it — TS 7.0 does not honour it (deprecated options are hard errors)
- Keep tools that need the compiler API (e.g. typescript-eslint) on TS 6 via the `@typescript/typescript6` alias while `tsc` runs TS 7.0 — see [deprecations-6.md](references/deprecations-6.md)
- Use subpath imports `"#/*": "./src/*"` in `package.json` `imports` (supported under `nodenext` and `bundler`)
- Fold any `baseUrl` prefix into each `paths` entry (`baseUrl` is deprecated)
### DON'T
- Mix `module: Preserve` with `moduleResolution: nodenext` (or vice-versa)
- Set `esModuleInterop`, `allowSyntheticDefaultImports`, or `alwaysStrict` to `false` (no longer allowed)
- Use `enum`, `namespace` with runtime code, or parameter properties in files run by Node's type stripping
Files in this package (7)
- .gitkeep 1 KB
- SKILL.md 6 KB
- references/bundler-track.md 2 KB
- references/deprecations-6.md 5 KB
- references/node-track.md 3 KB
- references/templates/tsconfig.bundler.md 2 KB
- references/templates/tsconfig.node.md 2 KB
Versions
The database has no other skills named ts-config.
Database snapshot: 13.11.2026 · package version 1614e5033b79 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 3 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90tsconfig
Configure a tsconfig.json by runtime — pick module, moduleResolution, target, strict, and emit for a bundler, Node, library, or browser-ESM project, and fix the module/strict/emit errors a wrong config causes. Use when setting up or editing a tsconfig.json, choosing module or… - 100typescript-strict
TypeScript strict mode: tsconfig.json, strict flags, Bundler/NodeNext moduleResolution, verbatimModuleSyntax. Use when setting up TS or migrating to stricter type safety. - 100typescript
Sets up and repairs TypeScript projects: picks tsconfig.json settings for a Node.js service, an npm library or a bundled web app, runs type-checking in CI, and replaces `any` and unsafe casts with types the compiler can verify. Use when someone asks to "set up TypeScript", "fix… - 90tsconfig-mastery
Configure tsconfig.json deliberately: the flags that matter, module and target settings, and build vs typecheck configs. Use when setting up TypeScript compilation or debugging confusing module and output errors. - 90typescript-module-resolution-and-emit
Use this skill to statically review whether a TypeScript package resolves, imports, and emits correctly for every consumer mode it claims to support: the `module`/`moduleResolution` matrix, `exports`/`imports` condition ordering, `.mts`/`.cts` handling, and the dual-package… - 95typescript-advanced-compiler-config
TypeScript compiler configuration — tsconfig.json structure, strict-mode flags and what each one catches, module resolution strategies (node/bundler/nodenext), and diagnosing/fixing slow type-checking. Use when bootstrapping a tsconfig.json for a new project, deciding which…