feat: モダンツール 4 種テンプレートを追加 (closes #724) - #726
Conversation
config-contribution-discover の網羅的スキャン (issue #724) で発見した、 複数 repo に共通するモダンツール設定をテンプレート化。 - templates/testing/vitest.config.ts: jsdom + v8 coverage + 70% threshold - templates/eslint/eslint.config.mjs: TypeScript ESLint flat config の base - templates/biome.json: Biome v2 統合フォーマッタ + リンタ - templates/commitlint.config.js: Conventional Commits + 日本語向け緩和 repo-maintenance.md section 3.22 に「テンプレート (採用検出 + 欠落時のみ 追加)」として登録。各ツールは package.json の依存または既存設定ファイル の有無で配布判定。 setup-tests.md に Vitest 採用基準と導入手順を追加。 setup-husky.md に commitlint.config.js テンプレート参照を追加。 eslint.config.mjs の ignores に templates/ を追加。本リポジトリ自身の ESLint がテンプレート内の eslint.config.mjs を auto-discovery して typescript-eslint 未インストールエラーを起こすのを防ぐ。 Refs: #724
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
(aside) |
|
Claude finished @keito4's task in 14m 12s —— View job CI調査結果と修正報告
調査結果: CIは全チェック通過済み ✅全ステータスチェックの確認結果:
マージ可否: マージブロック状況: ブロック原因の特定PR オープン時に起動した ユーザーが「CIが落ちている」と見た状態は、この コードレビュー(プロアクティブ確認)CIログとソースを確認した上で、追加された4テンプレートと配布ロジックを検証しました。
結論コードに修正が必要な問題は見つかりませんでした。 CIは全チェック通過済みで、マージコンフリクトもありません。 PR がブロックされているのは |
|
Claude finished @keito4's task in 3m 49s —— View job CI確認 + コードレビュー
CI状況現在のCIは全て green です。
ローカル確認でも
コードレビュー✅ 良い点
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f225197a08
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| jq -e '.devDependencies.vitest // .dependencies.vitest' package.json >/dev/null 2>&1 || continue | ||
| ;; | ||
| eslint.config.mjs) | ||
| ls eslint.config.{mjs,js,cjs,ts} .eslintrc{.js,.json,.cjs,.yml,.yaml} >/dev/null 2>&1 && continue |
There was a problem hiding this comment.
Detect every ESLint config variant before copying template
The skip check for eslint.config.mjs is incomplete: ls eslint.config.{mjs,js,cjs,ts} .eslintrc{.js,.json,.cjs,.yml,.yaml} misses valid existing configs such as .eslintrc (no extension) and eslint.config.mts/cts. In repos using one of those files, /repo-maintenance will still add a new eslint.config.mjs, which can silently change which ruleset ESLint uses and break existing lint behavior despite this block being documented as “skip when equivalent config exists.”
Useful? React with 👍 / 👎.
| jq -e '.devDependencies["@biomejs/biome"] // .dependencies["@biomejs/biome"]' package.json >/dev/null 2>&1 || continue | ||
| ;; | ||
| commitlint.config.js) | ||
| ls commitlint.config.{js,ts,mjs,cjs} .commitlintrc{,.js,.json,.yml,.yaml} >/dev/null 2>&1 && continue |
There was a problem hiding this comment.
Skip commitlint template when alternate rc files already exist
The commitlint guard only checks commitlint.config.{js,ts,mjs,cjs} and .commitlintrc{,.js,.json,.yml,.yaml}, but commitlint also supports .commitlintrc.cjs, .commitlintrc.mjs, .commitlintrc.ts, .commitlintrc.cts, and .commitlintrc.mts. Repos already configured with these filenames will be treated as “missing config,” and this step will inject a second config file, risking unexpected rule resolution changes in commit hooks.
Useful? React with 👍 / 👎.
|
🎉 This PR is included in version 1.112.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Why
config-contribution-discoverの網羅的スキャン (Issue #724) で発見した、複数 repo に共通するモダンツール設定を keito4/config に取り込む。新規 repo セットアップ時の手書きコスト削減と、ツール選択の標準化が目的。Vitest / Biome / ESLint flat config は今後の標準なので早期テンプレート化が有用。
What
新規テンプレート 4 ファイル + 配布ロジック + ドキュメント更新。
新規ファイル
templates/testing/vitest.config.tstemplates/eslint/eslint.config.mjstemplates/biome.jsontemplates/commitlint.config.jsrepo-maintenance.md section 3.22 への配布登録
MODERN_TOOLS連想配列で path-mapping (templates/X → ./Y) を実装package.json devDependencies.vitestが存在devDependencies.eslintあり、かつ既存.eslintrc*/eslint.config.*不在devDependencies.@biomejs/biomeが存在commitlint.config.*/.commitlintrc*不在 (setup-husky とセット運用)ドキュメント更新
setup-tests.md: Step 4.1.b として Vitest 採用基準 + 導入手順を追加setup-husky.md:commitlint.config.jsテンプレート参照を追加keito4/config 自身の eslint.config.mjs 修正
ignoresにtemplates/を追加。本 repo の ESLint v10 がtemplates/eslint/eslint.config.mjsを auto-discovery して typescript-eslint 未インストールエラーを起こすのを防ぐHow
/repo-maintenance --mode full実行時、新規 4 ブロックが順次評価される:Risk
Test plan
prettier --checkパス/repo-maintenance --mode fullを実行し、既存 vitest.config.ts が上書きされないことを確認Discovered but NOT included (rationale)
release.yml(8 repos)terraform-*.yml(3 repos)verify-ui.md/setup-project.md(4 repos)詳細は issue #724 を参照。
Follow-up (別 PR で対応)
.github/policies/テンプレート → PR feat: .github/policies/ テンプレート群を追加 (closes #723) #725 (Issue feat: Add .github/policies/ templates (complexity / license / severity definitions) #723)Closes #724
🤖 Generated with Claude Code