ci: suppress ESLint errors in CI logs - #45583
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
88d2e2b to
bc8e259
Compare
2a9b490 to
7ac455f
Compare
@Gudahtt Done in So now we got:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 283354b. Configure here.
Builds ready [283354b]
⚡ Performance Benchmarks (Total: 🟢 13 pass · 🟡 8 warn · 🔴 3 fail)
Bundle size diffs
|
Keep branch React Compiler suppressions baseline and restore jest/no-disabled-tests entry for metamask-controller.test.js.
283354b to
e3ff406
Compare
Builds ready [e3ff406]
⚡ Performance Benchmarks (Total: 🟢 14 pass · 🟡 8 warn · 🔴 2 fail)
Bundle size diffs
|
| 'react-hooks/static-components': 'warn', | ||
| 'react-hooks/use-memo': 'warn', | ||
| // v7 React Compiler rules — error severity with eslint-suppressions.json | ||
| // baseline (MetaMask-planning#6402). Do not downgrade to 'warn'; use |
There was a problem hiding this comment.
Nit: The comments above these two sections seem really unhelpful.
We don't need to narrate here that we've suppressed errors, that's recorded in the error suppressions file already. And we don't need to comment specifically here about not using warn; we'd have no reason to do that in the future, and it applies everywhere, not just here.
|
Builds ready [3563fdd]
⚡ Performance Benchmarks (Total: 🟢 13 pass · 🟡 9 warn · 🔴 2 fail)
Bundle size diffs
|




Description
After metamask-extension#44495 upgraded
eslint-plugin-react-hooksto v7, full-repo lint reports ~300+ warnings (mostlyreact-hooks/set-state-in-effect, warn severity) alongside any errors. In CI that makes real failures hard to spot.This PR promotes React Compiler
react-hooks/*rules fromwarntoerrorand baselines existing violations ineslint-suppressions.json, which means:warntier for these rulesBefore:

For example: https://github.com/MetaMask/metamask-extension/actions/runs/31829329195/job/94861104610?pr=45422
Why
Example from local testing:
yarn lint:eslint✖ 339 problems (6 errors, 333 warnings)CI=true yarn lint:eslint✖ 6 problems (6 errors, 0 warnings)Where the warnings are actually being fixed
Warning cleanup is tracked under MetaMask-planning#6402 (Subtask 1: clear
set-state-in-effectviolations). Work is split across draft PRs by area:networks-form,add-rpc-url-modal, etc.)useEffect+setStatesync with render-time derivation /useMemo/ keyed resets. Subtask 6 of #6402 will later promote remaining warnings from warn → error repo-wide.Changelog
CHANGELOG entry: null
Related issues
Fixes: N/A
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Lint and CI configuration only; no runtime or product behavior changes. Risk is limited to developers needing to update suppressions when touching baselined files.
Overview
Promotes eslint-plugin-react-hooks v7 React Compiler rules from
warntoerrorfor both JS and TS React configs in.eslintrc.js, and addsreact-hooks/incompatible-libraryat error severity. Comments now state that existing hits must stay ineslint-suppressions.jsoninstead of downgrading rules back to warn (MetaMask-planning#6402).eslint-suppressions.jsonis expanded with a repo-wide baseline: per-file violation counts for compiler rules (set-state-in-effect,refs,preserve-manual-memoization, etc.) across the UI so CI can pass while new violations still fail lint.package.jsononly has a trivial whitespace fix in thelint:eslintscript path.Reviewed by Cursor Bugbot for commit 283354b. Bugbot is set up for automated code reviews on this repo. Configure here.