Merged
Conversation
- convex/tsconfig.jsonにnoUnusedLocalsとnoUnusedParametersを追加 - package.jsonに型チェック用スクリプト(typecheck、typecheck:watch)を追加 - GitHub Actionsでの型チェック自動化ワークフローを作成 - 未使用変数contentを削除してコードを整理 開発中のTypeScriptエラーの早期発見と品質向上を実現 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- CI/CD環境で認証エラーを回避するため、`npx convex codegen --typecheck disable`を追加 - 型チェック実行前にConvex型を生成することで、TypeScript型エラーを防止 - 認証が不要な型生成コマンドを使用し、GitHub Actions実行時の信頼性を向上 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Node.jsバージョンを18から20に更新(Vite v7.1.5の要件対応) - package.jsonで"type": "module"に変更してESモジュール対応 - GitHub Actions上でのビルドエラー(Node.jsバージョン不足とESモジュール構文エラー)を解決 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 概要
TypeScriptの型チェックを開発段階で早期発見できるよう、型チェック機能を強化し、CI/CDパイプラインでの自動化を実装しました。
🎯 目的・背景
発見された問題
npm run build実行時にconvex/rssQiitaApi.tsで未使用変数エラーが発生tsconfig.jsonに型チェック設定が不足根本原因
tsconfig.jsonはconvexディレクトリを除外npm run devでは型チェックを実行していないconvex/tsconfig.jsonにnoUnusedLocals設定が欠如🔧 変更内容
1. Convex TypeScript設定の強化
2. 開発用型チェックスクリプトの追加
3. CI/CD自動化ワークフローの構築
4. 未使用変数の削除
convex/rssQiitaApi.tsから未使用のcontent変数を削除🚀 効果・メリット
開発効率の向上
npm run typecheck:watchでファイル変更時に自動型チェック品質保証の強化
💡 ジュニアエンジニア向け学習ポイント
TypeScript設定オプションの理解
noUnusedLocals: 使用されていないローカル変数を検出noUnusedParameters: 使用されていない関数パラメータを検出--noEmit: 型チェックのみ実行(JavaScript出力なし)CI/CDベストプラクティス
🧪 使用方法
開発時の型チェック
CI/CDでの自動実行
🔍 レビューポイント
設定ファイルの確認
convex/tsconfig.jsonの新しいオプション設定package.jsonの新しいスクリプト追加ワークフローの検証
.github/workflows/typecheck.ymlのステップ構成品質向上の効果
🤖 Generated with Claude Code