What's Changed
🐞 Fixes
react-x/set-state-in-effect: the ref-derived value exemption now also coverssetStatecalls reached indirectly through functions or hook callbacks invoked from the effect setup, not onlysetStatewritten directly in the setup body. (#1982)react-x/set-state-in-effect: more ref read shapes are recognized as ref-derived values —<ref-named>.currentanywhere in a member chain, locals derived from other ref-derived locals, and reads through aref/xxxRefparameter. (#1982)react-web-api/no-leaked-event-listener:removeEventListenerinside a function called from the effect cleanup now pairs with itsaddEventListener, fixing false positives for listeners removed on unmount; cleanup calls resolve to the actual functions, so same-named shadowed functions no longer pair by coincidence. (#1982)
🏗️ Internal
- Bumped
effectto4.0.0and migrated the repo scripts to the v4 APIs. (#1981)
Full Changelog: v5.23.4...v5.23.5
Attestation
https://github.com/Rel1cx/eslint-react/attestations/52275386