@zakodium/tsconfig
v1.0.2
Published
Shared TypeScript configurations for projects that Zakodium maintains.
Downloads
4,329
Readme
@zakodium/tsconfig
Shared TypeScript configurations for projects that Zakodium maintains.
Installation and usage
Install the package:
npm install -D @zakodium/tsconfigThen extend in your own config:
{
"extends": "@zakodium/tsconfig",
"compilerOptions": {
"outDir": "lib"
},
"include": ["src"]
}Available configs
Base config
"extends": "@zakodium/tsconfig"
The base config, suitable for most projects:
- Opinionated defaults for strict type checking
- Ready to compile a library with source maps
- Targets ES2022 for modern and widely supported JS
- Ready for native Node.js TypeScript support
JSX (React) config
"extends": "@zakodium/tsconfig/jsx"
Extends the base config and allows JSX.
References
- https://www.typescriptlang.org/tsconfig/
- https://2ality.com/2025/01/tsconfig-json.html
FAQ
Why compile to lib instead of dist?
The lib is historically used by many Node.js libraries to put their published code.
It's also to avoid clashing with our libraries where dist is used to put browser bundles.
Why "skipLibCheck": true?
See https://2ality.com/2025/01/tsconfig-json.html#skipLibCheck.
It also avoids type errors because of broken libraries or when they depend on different tsconfig options.
