This package contains shared TypeScript configurations used across the monorepo.
The most basic configuration that includes @total-typescript/ts-reset for improved TypeScript types. This serves as the foundation for all other configurations.
The base TypeScript configuration that all other configs extend from. It includes common settings for all TypeScript projects:
- ES2022 target
- Strict type checking
- Declaration file generation
- Common compiler options
- Module interoperability settings
- Type safety features
Configuration specifically for Node.js projects. Extends base.json and adds:
- Node-specific module resolution (NodeNext)
- Build output settings (dist directory)
- Source directory configuration
- Node.js specific compiler options
Configuration specifically for Next.js projects. Extends base.json and adds:
- Next.js specific plugin
- ESNext module system
- Bundler module resolution
- JSX support
- No emit (Next.js handles compilation)
Configuration for React library packages. Extends base.json and adds:
- React JSX support
Reference these configs in your tsconfig.json:
{
"extends": "@chaingraph/tsconfig/base.json"
}For specific project types, use their respective configs:
{
"extends": "@chaingraph/tsconfig/node.json" // For Node.js projects
}{
"extends": "@chaingraph/tsconfig/nextjs.json" // For Next.js projects
}{
"extends": "@chaingraph/tsconfig/react-library.json" // For React libraries
}