Fix TypeScript CI failure for fumadocs workspace app#34
Conversation
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adjusts TypeScript configuration and CI steps so the fumadocs workspace (apps/docs) is type-checked with its own tsconfig.json, avoiding root tsconfig.json path-mapping conflicts.
Changes:
- Excludes
./appsfrom the roottsconfig.jsoncompilation scope. - Splits CI TypeScript checks into separate steps for Mobile (root) and Docs (
apps/docs).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tsconfig.json | Excludes workspace apps from the root TS compilation to prevent path-mapping conflicts. |
| .github/workflows/ci.yml | Adds a dedicated docs type-check step to validate apps/docs with its own TS config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Type Check (Mobile) | ||
| run: npx tsc --noEmit | ||
| - name: Type Check (Docs) | ||
| run: cd apps/docs && npx tsc --noEmit |
There was a problem hiding this comment.
The docs type-check step runs npx tsc --noEmit, which may not match the docs app’s intended type-check pipeline (types:check runs fumadocs-mdx && next typegen && tsc --noEmit). Consider invoking the workspace script (or pnpm ... exec tsc) so CI uses the docs package’s local TypeScript version and required pre-typegen steps, avoiding false negatives/positives.
| run: cd apps/docs && npx tsc --noEmit | |
| run: pnpm --filter ./apps/docs types:check |
CI was failing because the root TypeScript check was attempting to validate
apps/docsfiles using the roottsconfig.json, which has incompatible path mappings (~/*vs@/*).Changes
./appsdirectory from root TypeScript compilationnpx tsc --noEmit(root)cd apps/docs && npx tsc --noEmitEach workspace app (fumadocs, future apps) now uses its own TypeScript configuration independently.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.