Skip to content

Conversation

@s123104
Copy link
Contributor

@s123104 s123104 commented Jan 13, 2026

Summary

  • 修復 quake-school 應用的 TypeScript 編譯錯誤
  • 移除 tsconfig.json 中過度限制的 types 配置

問題分析

根因

  • tsconfig.json 配置了 "types": ["node", "vitest/globals"]
  • types 被明確指定時,TypeScript 只會包含列出的類型
  • 這導致 @types/react@types/react-dom 無法被識別

解決方案

  • 移除 types 配置,讓 TypeScript 自動包含 node_modules/@types 下的所有類型
  • 這與 ratewise、nihonname、haotool 等應用保持一致

Changes

  • apps/quake-school/tsconfig.json: 移除 types 配置
  • docs/dev/002_development_reward_penalty_log.md: 更新獎懲記錄 (+2)

Test plan

  • pnpm --filter @app/quake-school typecheck 通過
  • pnpm -r typecheck 4 個應用全部通過
  • CI 通過

Reference

[context7:/websites/typescriptlang:2026-01-14 types compilerOptions]

- 移除 tsconfig.json 中過度限制的 `types` 配置
- 讓 TypeScript 自動包含 node_modules/@types 下的所有類型
- 根因:`types: ["node", "vitest/globals"]` 阻止了 @types/react 的識別

驗證:pnpm -r typecheck 4 個應用全部通過

[context7:/websites/typescriptlang:2026-01-14]
@s123104 s123104 force-pushed the fix/quake-school-types branch from d3ca42a to 03425cd Compare January 13, 2026 18:31
@github-actions
Copy link
Contributor

📊 PR 檢查結果

✅ 品質檢查

  • Lint: ✅ 通過
  • Format: ✅ 通過
  • TypeScript: ✅ 通過
  • Tests: ✅ 通過
  • Build: ✅ 成功

📦 建置資訊

  • Bundle Size: 4.00 KB
  • Test Coverage: 86.71%

🤖 Automated by GitHub Actions

@github-actions
Copy link
Contributor

🔦 Lighthouse CI 報告

類別 分數 狀態
🚀 Performance 57 ⚠️
♿ Accessibility 100
✨ Best Practices 96
🔍 SEO 100

📊 查看完整報告


門檻:所有類別 ≥ 85 分(軟性警告,不阻擋 PR)

@github-actions
Copy link
Contributor

🔦 Lighthouse CI 報告

類別 分數 狀態
🚀 Performance 94
♿ Accessibility 100
✨ Best Practices 96
🔍 SEO 100

📊 查看完整報告


門檻:所有類別 ≥ 85 分(軟性警告,不阻擋 PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants