TRT-2822: Fix all no-unused-vars linter warnings in sippy frontend and enable error-level enforcement - #3816
Conversation
Resolve all 136 no-unused-vars ESLint warnings across the sippy-ng frontend and promote the rule from warn to error so new violations are caught in CI. Fixes include prefixing unused callback parameters with _ (theme, props, index, event, etc.), removing dead code (unused useTheme/ useLocation/useNavigate calls, unreferenced constants and state), and adding caughtErrorsIgnorePattern to the rule config for catch clause variables. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@openshift-trt-agent[bot]: This pull request references TRT-2822 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Hi @openshift-trt-agent[bot]. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@coderabbitai review |
|
/ok-to-test |
✅ Action performedReview finished.
|
|
Warning Review limit reached
Next review available in: 7 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughThe PR changes ESLint unused-variable handling from warnings to errors with underscore-prefixed exceptions, then updates unused bindings across frontend components, stores, helpers, routing, release views, charts, and tests. ChangesUnused-variable cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 19 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (19 passed)
✨ 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 |
react-router v6 has newly published moderate-severity CVEs (GHSA-wrjc-x8rr-h8h6, GHSA-337j-9hxr-rhxg, GHSA-jjmj-jmhj-qwj2) with no patched v6 release available. The fix requires upgrading to react-router v7, which is a breaking major version change. Use --audit-level=high so moderate-severity advisories with no available fix do not block CI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The Fixed by raising the /retest |
...don't do that. we are fixing this in #3820 |
The --audit-level=high workaround is unnecessary since PR openshift#3820 upgrades react-router-dom to resolve the moderate-severity CVEs directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/retest |
1 similar comment
|
/retest |
|
/test agentic-staging |
Sippy Staging EnvironmentURL: https://lenses-attacks-suspended-ghz.trycloudflare.com This environment is built from this PR and will remain available for approximately 60 minutes (until ~18:16 UTC). |
|
/lgtm |
|
/test e2e |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: openshift-trt-agent[bot], smg247 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
a0cf63d
into
openshift:main
Summary
Resolves all 136
no-unused-varsESLint warnings across the sippy-ng frontend and promotes the rule fromwarntoerrorto enforce it going forward in CI.This is follow-up work from PR #3812 (ESLint 9 / Prettier 3 / Vitest 4 migration), which set
no-unused-varstowarn. This PR cleans up all existing violations and locks the rule down.Changes across 64 files:
_(e.g.theme,props,index,event,interval) to match the existingargsIgnorePattern: '^_'config_(e.g. unuseduseStatereturn values, unused store hook values)useTheme(),useLocation(),useNavigate()calls, unreferenced constants, and dead copy-link functionality inComponentReadiness.jsx)caughtErrorsIgnorePattern: '^_'to the ESLint rule config for catch clause variablesno-unused-varsseverity fromwarntoerrorJira: TRT-2822
Test plan
errorseverity_-prefixing of unused params or removal of genuinely dead codeGenerated with Claude Code
Summary by CodeRabbit