@devground/tsconfig
v2.1.0
Published
Shared TypeScript configuration presets (base, next, next-typecheck, node)
Maintainers
Readme
@devground/tsconfig
Shared TypeScript configuration presets.
Install
pnpm add -D @devground/tsconfig typescriptPresets
| Preset | Use case |
|--------|----------|
| base.json | Strict mode, ES2017, bundler resolution |
| next.json | Next.js builds (extends base, strict on, bundler resolution) — default |
| next-loose.json | Migration ramp only (extends next, strict off) — temporary |
| next-typecheck.json | CI type checking (extends next, no incremental) |
| astro.json | Astro builds (extends astro/tsconfigs/strict, incremental) |
| astro-typecheck.json | CI type checking (extends astro, no incremental) |
| node.json | Node.js server projects |
ADR-0011:
next.jsonenforcesstrict: trueby default. If you need a gradual adoption ramp for a legacy codebase, extendnext-loose.json(strict: false) and migrate tonext.jsonas soon as the code type-checks.
Usage
In your tsconfig.json:
{
"extends": "@devground/tsconfig/next.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}For Astro:
{
"extends": "@devground/tsconfig/astro.json",
"include": [".astro/types.d.ts", "src/**/*.ts", "src/**/*.tsx", "src/**/*.astro"],
"exclude": ["node_modules", "dist"]
}