Shared TypeScript configurations for vllnt projects. Strict, modern, Node 22+.
npm install -D @vllnt/typescript| Preset | Use case | Module | Target |
|---|---|---|---|
base.json |
Foundation (extended by others) | - | - |
nodejs.json |
Node.js applications | NodeNext | ES2024 |
node-library.json |
Publishable npm packages | NodeNext | ES2024 |
react.json |
React apps (Vite, CRA, etc.) | ESNext | ES2022 |
nextjs.json |
Next.js applications | ESNext | ES2022 |
Extend a preset in your tsconfig.json:
{
"extends": "@vllnt/typescript/nodejs.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"]
}{
"extends": "@vllnt/typescript/node-library.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"]
}{
"extends": "@vllnt/typescript/react.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"]
}{
"extends": "@vllnt/typescript/nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}All presets extend base.json which enforces:
strict: trueisolatedModules: truenoUncheckedIndexedAccess: trueskipLibCheck: trueesModuleInterop: trueresolveJsonModule: true
- Node.js >= 22
- TypeScript >= 5.0
MIT