A collection of Rabits TypeScript configuration files designed to enforce the strictest possible type checking.
pnpm add -D -E @rabits/tsconfig typescripttsconfig.json:
{
"extends": ["@rabits/tsconfig/<preset>"],
"compilerOptions": {
// Your own configurations.
}
}| Preset | Usage |
|---|---|
| base | Base config shared across all presets |
| react | React app (vite / nextjs) |
| node | Node.js app (node / ts-node) |
| tsx | Node.js app (tsx) |
{
"extends": ["@rabits/tsconfig/react"],
"compilerOptions": {
"target": "ES2017",
"plugins": [{ "name": "next" }],
"paths": { "@/*": ["./*"] }
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}{
"extends": ["@rabits/tsconfig/tsx"],
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
},
"include": ["**/*.ts"],
"exclude": ["node_modules"]
}Development of @rabits/tsconfig was inspired by the following open-source projects.
Sincere thanks to their authors and contributors.