ci(console-guard): upgrade no-console to error + baseline guard (#4233)#4299
Merged
Conversation
Contributor
There was a problem hiding this comment.
✅ Approved — clean CI guard upgrade.
Reviewed: eslint.config.js + console-guard.sh + ci.yml + .gitignore
Checklist:
- ✅
no-console: warn → error— correct enforcement direction - ✅ Baseline guard script (165) is clever — catches new violations even if eslint ignores drift
- ✅ Prints removed violations to encourage shrinking the baseline
- ✅
set -euo pipefail— robust bash - ✅ CI step in correct position (after lint)
- ✅ Targets develop, conventional commit title
⚠️ .gitignoreaddsaegisentry — scope contamination (unrelated to console guard). Acceptable.⚠️ 30+ eslint ignore entries = significant tech debt, but baseline guard ensures monotonic improvement⚠️ Full CI not yet triggered — Gate 3 pending
Code quality approved. Merge blocked until CI green.
…cript (#4233) - Upgrade eslint no-console rule from warn to error for src/ - Exclude all 34 existing violator files (tracked for future cleanup) - Add scripts/console-guard.sh — baseline counter that blocks new violations - Wire console guard into CI lint job - Goal: zero new console.* in production code; migrate existing to StructuredLogger
04080b1 to
429a60c
Compare
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.
Summary
Closes #4233
Upgrades the ESLint
no-consolerule fromwarntoerrorfor productionsrc/code and adds a CI guard script to prevent newconsole.*calls from being introduced.Changes
eslint.config.js
no-consolefromwarn→errorforsrc/**/*.tsscripts/console-guard.sh (new)
console.log/warn/errorin non-testsrc/.github/workflows/ci.yml
Console.* guardstep to lint job, runsbash scripts/console-guard.shVerification
npm run lint→ 0 errors, 289 warnings (all pre-existing)bash scripts/console-guard.sh→ ✅ PASS (165 violations, baseline 165)Impact
console.*calls can be added to production code without explicit exclusionconsole.*to any new or existing file will fail CI