Skip to content

Commit 1c951ff

Browse files
docs(project-guide): require yarn tsc --noEmit before frontend commits
Vite's HMR dev server is permissive — it doesn't fail on unused vars/imports, but Cloud Build's tsc strict mode does (TS6133). Add an explicit pre-commit step + common traps (unused prop on XxxProps after removing its use, leftover import after dropping a feature). Saves a Cloud Build round-trip. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 665fafa commit 1c951ff

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

agentic/docs/project-guide.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,21 @@ uv run ruff check <files> && uv run ruff format <files>
9494
```bash
9595
cd app
9696
yarn install
97-
yarn dev # Development server
98-
yarn build # Production build
97+
yarn dev # Development server
98+
yarn tsc --noEmit # Type-check only (catches TS6133 unused vars etc.)
99+
yarn build # Production build (runs tsc + vite build)
99100
```
100101

102+
**IMPORTANT: Run `yarn tsc --noEmit` (or `yarn build`) before committing frontend changes.**
103+
Vite's HMR dev server is permissive — it does NOT fail on unused variables, unused imports,
104+
or other TS strict errors. Cloud Build runs `tsc && vite build` and will fail on any TS6133
105+
("declared but never read") errors. Catching these locally before `git push` saves a Cloud
106+
Build round-trip. Common traps:
107+
108+
- Removing a prop's usage from a component body but forgetting to remove it from `XxxProps`
109+
- Removing a feature (e.g. color accents) but leaving the import (`import { colors }`)
110+
- Changing a hook's shape and leaving a now-unused destructured name
111+
101112
## Architecture
102113

103114
### Plot-Centric Design

0 commit comments

Comments
 (0)