@ras-sh/typescript-config
v0.0.3
Published
Shared typescript configuration for ras.sh projects.
Downloads
158
Maintainers
Readme
@ras-sh/typescript-config
⚙️ Shared TypeScript configuration for ras.sh projects.
Installation
pnpm add -D @ras-sh/typescript-configUsage
Choose the configuration that matches your project type and extend it in your tsconfig.json:
TanStack Start
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"]
}Next.js
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"]
}React Library
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"]
}Base
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"]
}Available Configurations
nextjs.json- for Next.js projectstanstack-start.json- for TanStack Start projectsreact-library.json- for React librariesbase.json- the base configuration
License
MIT License - see the LICENSE file for details.
