Shared TypeScript configurations for Tradecrush projects.
- Strict type checking
- Modern module resolution
- ES2022 language features
- JSX support
- Path aliases
- Optimized configurations for different project types
- Sensible defaults for code quality
npm install --save-dev @tradecrush/typescript-config
- TypeScript 5.0.0 or higher
In your tsconfig.json
:
{
"extends": "@tradecrush/typescript-config/configs/nextjs-ts-config.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
In your tsconfig.json
:
{
"extends": "@tradecrush/typescript-config/configs/base-ts-config.json",
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules"]
}
You can extend the base configurations to add your own settings:
{
"extends": "@tradecrush/typescript-config/configs/base-ts-config.json",
"compilerOptions": {
"outDir": "dist",
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules"]
}
Contributions are welcome! Please feel free to submit a Pull Request.
MIT