@cjkihl/tsconfig
v1.0.10
Published
Shared TypeScript configurations for Node.js projects
Maintainers
Readme
@cjkihl/tsconfig
Shared TypeScript configurations for Node.js and browser projects. This package provides base, library, and browser configurations that can be extended in your projects.
Installation
bun add -D @cjkihl/tsconfigUsage
Base Configuration
For basic Node.js projects, extend the base configuration:
{
"extends": "@cjkihl/tsconfig/base"
}Library Configuration
For TypeScript libraries that need to generate declaration files:
{
"extends": "@cjkihl/tsconfig/lib"
}Browser Configuration
For browser-based projects (React, Vue, etc.):
{
"extends": "@cjkihl/tsconfig/browser"
}Features
Base Configuration (tsconfig/base)
- Modern JavaScript features (ES2022)
- Strict type checking
- Module bundler support
- Node.js types
- Source maps
- Path aliases support
Library Configuration (tsconfig/lib)
Extends the base configuration with:
- Declaration file generation
- Composite project support
- Declaration source maps
- Optimized for library publishing
Browser Configuration (tsconfig/browser)
Extends the base configuration with:
- DOM types and APIs
- Browser-specific libraries
- DOM iteration support
- Optimized for frontend development
Configuration Details
Base Configuration
{
"compilerOptions": {
"target": "es2022",
"module": "Preserve",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"lib": ["es2022"]
}
}Library Configuration
{
"compilerOptions": {
"declaration": true,
"composite": true,
"sourceMap": true,
"declarationMap": true
}
}Browser Configuration
{
"compilerOptions": {
"lib": ["es2022", "dom", "dom.iterable"]
}
}License
MIT
