Skip to content

ci(lint): bulk-suppressions baseline so new violations actually fail CI#212

Merged
Jose-Gael-Cruz-Lopez merged 1 commit into
mainfrom
ci/lint-baseline
Jun 12, 2026
Merged

ci(lint): bulk-suppressions baseline so new violations actually fail CI#212
Jose-Gael-Cruz-Lopez merged 1 commit into
mainfrom
ci/lint-baseline

Conversation

@Jose-Gael-Cruz-Lopez

Copy link
Copy Markdown
Member

What

Replaces the blanket warn-downgrade lint config with an ESLint bulk-suppressions baseline.

Why

The prior config demoted 8 rules to warn to make the gate green on the pre-CI codebase — but that meant a new any, a new react-hooks/set-state-in-effect, etc. also only warned, so the gate didn't actually block them. A baseline suppresses the existing violations while keeping every rule at error, so new violations fail CI.

How

  • eslint.config.mjs: removed the warn-downgrade block; all rules keep their configured (error) severity. Promoted react-hooks/exhaustive-deps to error (warn-by-default) per the ask — it's the one most likely to fire on intentional patterns, so if it starts forcing eslint-disable on legitimate cases, downgrade that single rule back to warn.
  • eslint-suppressions.json (new): baselines the 164 pre-existing violations (eslint --suppress-all). eslint . reads it automatically; CI's npx eslint . is unchanged and now gates correctly.
  • package.json: lint fixed (next linteslint .), added lint:baseline to regenerate the suppressions file. Regenerate only when you intentionally change the violation count (e.g. a refactor), so a shifted count isn't a spurious CI failure.

Verified

  • npm run lint (eslint .) → 0 errors (existing suppressed).
  • Ratchet test: a probe file with const x: any = 1eslint exits 1 with no-explicit-any error (new violations fail). Removed the probe.
  • The design/a11y waves can burn the baseline down with eslint --fix + lint:baseline.

…wngrades

The previous config demoted 8 rules to "warn" so the gate was green, but that
also let NEW violations of those rules (no-explicit-any, the react-hooks v6
set, ...) through as warnings — defeating the gate. Restore every rule to its
configured (error) severity and baseline the pre-existing violations in
eslint-suppressions.json, so legacy debt is suppressed while any NEW violation
fails CI. Promote react-hooks/exhaustive-deps to error (it's warn-by-default in
eslint-config-next) so a new missing dependency gates too. Fix the broken
`lint` script (Next 16 dropped `next lint`) to `eslint .`, and add
`lint:baseline` to regenerate the suppressions file when the count legitimately
changes.
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Jose-Gael-Cruz-Lopez, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 21 minutes and 25 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cb92bf8d-72c1-4a86-9bd0-8ba71e44e524

📥 Commits

Reviewing files that changed from the base of the PR and between c2692ae and a8fa5db.

📒 Files selected for processing (3)
  • frontend/eslint-suppressions.json
  • frontend/eslint.config.mjs
  • frontend/package.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/lint-baseline

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Jose-Gael-Cruz-Lopez Jose-Gael-Cruz-Lopez merged commit a052624 into main Jun 12, 2026
5 checks passed
@Jose-Gael-Cruz-Lopez Jose-Gael-Cruz-Lopez deleted the ci/lint-baseline branch June 12, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant