- docs/DESIGN.md: the written source of truth for the UI. Decided chapters (principles, device adaptation, action placement, text stays selectable, interaction rules, copy, anti-patterns, decision log); controls and surfaces are marked Pending until the owner picks from the lab. - /design-lab (dev only): renders each open decision's variants with the app's real CSS, themes and font scale. Batch A = six control decisions. - devOnlyGuard: a production build fails if anything under src/design-lab reaches the bundle (seen red with an unguarded import). - Size contract: tablet portrait + landscape and up, replacing the 1024x768 floor with its never-built "too small" message.
45 lines
2.0 KiB
JSON
45 lines
2.0 KiB
JSON
{
|
|
// The build-tool configs run in Node, not the browser: they need node types and must NOT be
|
|
// checked against the app's DOM lib. Split out because tsconfig.json's `include` is ["src"],
|
|
// so until now nothing type-checked these files at all (R2 / C-4.5). `npm run typecheck`
|
|
// runs this project alongside src and e2e.
|
|
"compilerOptions": {
|
|
// composite: required to be the target of tsconfig.json's `references` (which is what makes
|
|
// editors check these files under THIS config instead of an inferred one). A composite project
|
|
// may not disable emit (TS6310), so it emits declarations only, into node_modules — nothing
|
|
// lands in the repo and nothing reaches the bundle. Hence `tsc -p` without --noEmit below.
|
|
"composite": true,
|
|
"declaration": true,
|
|
"emitDeclarationOnly": true,
|
|
"outDir": "./node_modules/.tmp/tsconfig-node",
|
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig-node/.tsbuildinfo",
|
|
"target": "ES2022",
|
|
"module": "ESNext",
|
|
"moduleResolution": "bundler",
|
|
"lib": ["ES2022"],
|
|
"types": ["node"],
|
|
"strict": true,
|
|
"skipLibCheck": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"resolveJsonModule": true,
|
|
// The build-tool configs include two hand-written .js files (tailwind/postcss). checkJs runs
|
|
// the type checker over them via their `@type` JSDoc, so a bad tailwind/postcss option is
|
|
// caught by the gate instead of silently mis-building CSS. Was the last hole in C-4.5.
|
|
"allowJs": true,
|
|
"checkJs": true
|
|
},
|
|
// reactPlugin.ts is the ONE React transform both configs import (E27 S1) — it is build tooling,
|
|
// not app source, so it belongs here and not under tsconfig.json's ["src"]. A file imported by a
|
|
// listed one but absent from `include` is TS6307, not a silent pass.
|
|
"include": [
|
|
"vite.config.ts",
|
|
"vitest.config.ts",
|
|
"reactPlugin.ts",
|
|
"devOnlyGuard.ts",
|
|
"tailwind.config.js",
|
|
"postcss.config.js"
|
|
]
|
|
}
|