docs: Biome の noConsole ルールを推奨設定に追加 - #526
Conversation
biome.json の推奨設定に suspicious.noConsole を追記。 console.log/debug をエラー、console.error/warn は許可する設定例を記載。 ロギング設計指針の原則を「Biome で CI がブロック」に更新。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughDocumentation update to the Next.js web app setup guide that introduces a Biome linter rule blocking console.log and console.debug in CI, while allowing console.error and console.warn. Includes explanatory notes on the unified logging and error handling approach using Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
🔍 AI Code Review (Local Hook)Models: Codex (default) / Gemini (default) 🤖 Codex Review指摘事項はありません。 判定: patch is correct ✨ Gemini Reviewレビュー結果指摘すべきアクション可能な問題は見当たりませんでした。 この変更は、Biomeのリンター設定に 判定: patch is correct 🤖 Generated by post_pr_ai_review.py hook |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/setup/web-app-nextjs.md (1)
372-372: 説明文をconsole.debugまで含めると一貫性が上がります。Line 101 では
console.logとconsole.debugの両方を禁止としているため、Line 372 も同じ表現に揃えるのが望ましいです。As per coding guidelines "Fail on code formatting violations during code review", this keeps the doc update clean while preserving formatting compliance.✏️ 文言の揃え方(例)
-- `console.log` の本番利用は禁止 → Biome の `noConsole` ルールで CI がブロック +- `console.log` / `console.debug` の本番利用は禁止 → Biome の `noConsole` ルールで CI がブロック🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/setup/web-app-nextjs.md` at line 372, Update the sentence that currently reads "`console.log` の本番利用は禁止 → Biome の `noConsole` ルールで CI がブロック`" so it matches the wording on Line 101 by including `console.debug`; replace the single `console.log` reference with a consistent "`console.log` と `console.debug` の本番利用は禁止 → Biome の `noConsole` ルールで CI がブロック`" phrasing to ensure consistency across the document (look for the existing sentence containing `console.log` on Line 372 and the related rule mention on Line 101).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/setup/web-app-nextjs.md`:
- Line 372: Update the sentence that currently reads "`console.log` の本番利用は禁止 →
Biome の `noConsole` ルールで CI がブロック`" so it matches the wording on Line 101 by
including `console.debug`; replace the single `console.log` reference with a
consistent "`console.log` と `console.debug` の本番利用は禁止 → Biome の `noConsole` ルールで
CI がブロック`" phrasing to ensure consistency across the document (look for the
existing sentence containing `console.log` on Line 372 and the related rule
mention on Line 101).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d0f57932-d588-4a8e-b80d-e1c22bf326d5
📒 Files selected for processing (1)
docs/setup/web-app-nextjs.md
コードレビュー概要ドキュメントの小規模な更新で、Biome の 良い点
指摘事項軽微: ドキュメントの説明が不足している可能性この注記は追加されていますが、「ではどうすれば良いか」の代替手段がこの直下に明示されていません。次行の「ログ出力は 確認:
|
🔍 AI Code Review (Local Hook)Models: Codex (default) / Gemini (default) 🤖 Codex Review指摘事項はありません。変更はドキュメント更新のみで、正確性・パフォーマンス・セキュリティ・保守性・開発者体験に対する新たな問題は見当たりません。 判定: patch is correct ✨ Gemini Review修正の指摘事項
判定: patch is correct 理由: 信頼度: 0.95 🤖 Generated by post_pr_ai_review.py hook |
|
🎉 This PR is included in version 1.83.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
概要
Next.js プロジェクトの推奨
biome.jsonにsuspicious.noConsoleルールを追加します。変更内容
biome.json推奨設定にsuspicious.noConsoleを追記console.log/console.debug→error(CI でブロック)console.error/console.warn→ 許可背景
@vercel/logger、エラー通知は Sentry に統一する方針(前 PR docs: Next.js + Supabase 推奨構成に @vercel/logger と Sentry を追加 #525 で追加)console.logの混入を lint レベルで機械的に防ぐテスト
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes