⚙️ Shared TypeScript configuration for ras.sh projects.
pnpm add -D @ras-sh/typescript-config
Choose the configuration that matches your project type and extend it in your tsconfig.json
:
For TanStack Start applications with file-based routing and server functions:
{
"extends": "@ras-sh/typescript-config/tanstack-start.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["./src/*"]
}
},
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules", "dist"]
}
For Next.js applications (App Router or Pages Router):
{
"extends": "@ras-sh/typescript-config/nextjs.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules", ".next"]
}
For React component libraries built with bundlers (tsup, Vite, Rollup):
{
"extends": "@ras-sh/typescript-config/react-library.json",
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules", "dist"]
}
For Node.js packages and libraries:
{
"extends": "@ras-sh/typescript-config/base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "dist"]
}
nextjs.json
- for Next.js projectstanstack-start.json
- for TanStack Start projectsreact-library.json
- for React librariesbase.json
- the base configuration
MIT License - see the LICENSE file for details.