@stackra/typescript-config
v1.0.3
Published
Shared TypeScript configuration presets for the stackra-frontend monorepo. Exports base + react-library + vite + vite-node + native presets.
Readme
@stackra/typescript-config
Shared TypeScript configuration presets. Every tsconfig.json in the monorepo
extends one of these files so upgrading TS rules happens in exactly one place.
Presets
| File | Extends | For |
| -------------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------- |
| base.json | — | Every TS project. Strictness dial, decorators on, source maps, no unused. |
| react-library.json | base.json | Library packages that ship React components (packages/ui, etc.) |
| vite.json | react-library.json | Vite React apps (apps/dashboard, apps/landing-page) — noEmit, DOM types, JSX react-jsx |
| vite-node.json | base.json | Vite/Vitest/Playwright config files themselves (node context) |
| native.json | @stackra/typescript-config | React Native apps (apps/academorix-parent, templates/react-native) — workspace strictness + decorators |
Usage
// apps/dashboard/tsconfig.json
{
"extends": "@stackra/typescript-config/vite",
"compilerOptions": {
"outDir": "dist",
"baseUrl": ".",
"paths": { "@/*": ["./src/*"] },
},
}// apps/academorix-parent/tsconfig.json
{
"extends": "@stackra/typescript-config/native",
"compilerOptions": {
"baseUrl": ".",
"paths": { "@/*": ["./src/*"] },
},
}Each app / package MAY add project-local overrides in compilerOptions, but
should not disable a rule set by the preset without a written justification
(leave a comment referencing the ADR).
