A collection of shareable TypeScript configurations optimized for various environments (React, Node.js, Next.js, Remix).
- ✨ Strict Type Checking: Enhanced type safety with strict mode and additional checks
- 🚀 Modern JavaScript Support: Latest ECMAScript features enabled
- 🎯 Environment-Specific Optimization: Tailored settings for each framework/environment
- 📦 Enhanced Module Resolution: Improved handling of imports/exports
- 🛡️ Type Safety: Additional type checking options for more secure code
# npm
npm install --save-dev @wonse/tsconfig
# yarn
yarn add -D @wonse/tsconfig
# pnpm
pnpm add -D @wonse/tsconfig
The base configuration provides fundamental rules applicable to any TypeScript project.
{
"extends": "@wonse/tsconfig/tsconfig-base.json"
}
Key Features:
- Strict mode enabled
- Unused code/variable checks
- Source map generation
- Consistent casing enforcement
- Decorator support
Optimized configuration for React projects with modern features.
{
"extends": "@wonse/tsconfig/tsconfig-react.json"
}
React-Specific Features:
- Full JSX support
- React 18+ compatibility
- DOM type definitions
- Optimized module resolution
Specialized configuration for Node.js backend projects.
{
"extends": "@wonse/tsconfig/tsconfig-node.json"
}
Node.js-Specific Features:
- Node.js type definitions
- CommonJS/ESM module support
- Node.js-specific module resolution
Optimized configuration for Next.js projects.
{
"extends": "@wonse/tsconfig/tsconfig-next.json"
}
Next.js-Specific Features:
- Next.js type support
- Server/Client component optimization
- Build performance settings
Optimized configuration for Remix projects, supporting both client and server-side TypeScript.
{
"extends": "@wonse/tsconfig/tsconfig-remix.json"
}
Remix-Specific Features:
- Full-stack TypeScript support
- Optimized module bundling
- Path aliases for app directory
- Server and client code type safety
- Remix environment type definitions
{
"strict": true, // Enable all strict type-checking options
"noUnusedLocals": true, // Report errors on unused local variables
"noUnusedParameters": true, // Report errors on unused parameters
"noImplicitReturns": true, // Report error when not all code paths return a value
"noFallthroughCasesInSwitch": true, // Report errors for fallthrough cases in switch
"esModuleInterop": true, // Enable interoperability between CommonJS and ES Modules
"skipLibCheck": true // Skip type checking of declaration files
}
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT © Wonse Shin