Add --max-warnings ratchet to root lint script#69
Add --max-warnings ratchet to root lint script#69toon-backlog-bot[bot] wants to merge 2 commits into
Conversation
CI's `pnpm lint` had no --max-warnings gate, so all 902 existing ESLint warnings passed silently and a newly introduced warning wouldn't fail CI either. Set the ceiling to the current count (902) so new warnings are visible; a follow-up can lower it as warnings are fixed. Closes #68
ALLiDoizCode
left a comment
There was a problem hiding this comment.
Blocking: the ratchet has no effect in actual CI.
.github/workflows/ci.yml line 25-26:
- run: pnpm lint
continue-on-error: trueThe lint step already has continue-on-error: true (pre-existing, not touched by this diff). That means even after this PR, when eslint . --max-warnings 902 exits non-zero for a new warning, the workflow step is marked as having "succeeded with warnings" and the job/build continues and reports green. Issue #68's stated goal — "a new warning in a PR should be visible and mean something" — is not met: nothing in the GitHub UI fails, no check turns red, and nothing blocks merge. The PR body's claim that "a newly introduced warning wouldn't fail CI either" (implying this PR fixes that) is therefore inaccurate — CI still won't fail, because the step-level continue-on-error swallows the new non-zero exit code exactly as it swallowed the old one.
To actually close #68, this PR (or a follow-up bundled with it) needs to also remove continue-on-error: true from the pnpm lint step in ci.yml (or otherwise surface the failure, e.g. a separate required check). As-is, pnpm lint failing locally/manually is real, but the CI signal the issue is about remains just as decorative as before.
Everything else checked out: package.json's lint script change is correct and matches the stated warning count, the changeset is appropriately empty (root package is private, no version bump needed), and the PR title accurately describes the diff.
The --max-warnings ratchet added in this PR had no effect in CI because the lint step's continue-on-error: true swallowed any non-zero exit code, so the job stayed green regardless. Removing it lets a new warning above the 902 ceiling actually fail CI, closing the gap the review pointed out.
|
Addressed the blocking review comment: removed Verification:
Ready for re-review. |
ALLiDoizCode
left a comment
There was a problem hiding this comment.
Reviewed the diff (package.json, .github/workflows/ci.yml, changeset) plus repo standards in CLAUDE.md.
Checked:
eslint . --max-warnings 902correctly ratchets: fails when warnings exceed 902, passes at exactly 902 (matches --max-warnings semantics and the PR's own 901/902 sanity check).- The prior blocking review (continue-on-error swallowing the ratchet's exit code) has been correctly addressed —
continue-on-error: trueis removed from thepnpm lintstep in ci.yml, so an over-902 warning count will now actually fail the CI job, not just the local command. - No other lint script overrides in the monorepo that would conflict with the new flag.
- Empty changeset is the correct choice (config-only change, private root package, no version bump) — this is a documented changesets pattern.
- No security or correctness concerns; scope stays within CLAUDE.md's "libraries only" boundaries.
Metadata fix applied: the PR body's Summary only described the package.json change and never mentioned the ci.yml continue-on-error removal, even though that removal is now part of the diff and was the critical fix for the earlier blocking review. Updated the body (gh pr edit) to describe both changes and reflect the continue-on-error fix in the Verification section. Title was already confirmed accurate by the prior reviewer and still fairly describes the change, so left as-is.
No blocking CODE issues remain.
Summary
CI's
pnpm lint(eslint .) had no--max-warningsgate, so all 902 existingESLint warnings passed silently and a newly introduced warning wouldn't fail
CI either — the warning signal was effectively decorative. This adds
--max-warnings 902to the rootlintscript (the same script CI'sci.ymlcalls directly), so any new warning above the current count nowfails lint. Lowering the ceiling as existing warnings get fixed is left for a
follow-up, as noted in the issue.
The
pnpm lintstep in.github/workflows/ci.ymlalso hadcontinue-on-error: true, which would have swallowed the ratchet's non-zeroexit code and kept the CI job green regardless (caught in review). This PR
removes that flag too, so a new warning above 902 now actually fails the CI
job instead of being silently absorbed.
Closes #68
Verification
pnpm lint— confirmed exactly 902 warnings onmainbefore the change,matching the issue.
pnpm linton this branch — passes (✖ 902 problems (0 errors, 902 warnings), exit 0).--max-warnings 901and confirmedpnpm lintfails (exit 1, "ESLintfound too many warnings"), then restored to 902.
continue-on-error: trueremoval means a failingpnpm lintstep now fails the CI job instead of being marked as a passed-with-warnings
step.
pnpm -r build— passes.pnpm test— 53 pre-existing failures inworkflow-orchestrator.test.tsand related files, confirmed present on
mainprior to this change(unrelated to this PR's scope) and unaffected by it.
Notes
devboxCLI available in this environment; verified the pinnedtoolchain manually instead (Node 22, pnpm 8.15.9 via corepack — matches
devbox.json's pins), then ran the same commandsdevbox run lint/devbox run build/devbox run testwould invoke.