What's Changed
🐞 Fixes
react-x/set-state-in-effect: a setter call whose callee may resolve to multiple setters (ex:(cond ? setA : setB)(1)) now reports every possible setter. (#2082)react-x/set-state-in-effect: the ref-derived exemption now applies to any argument position of a custom state hook's setter (ex:setValue(0, ref.current)). (#2082)react-x/set-state-in-effect: ref-derived early-return guards now also gate the statements that follow them inside atry, aswitchcase, or a bare block, as theelsebranch, and in loop bodies or update clauses; atrywhose paths all terminate now counts as terminating. (#2082, #2083)react-x/set-state-in-effect: ref provenance now follows values written in IIFEs, including nested and TypeScript-wrapped ones; deferred and async/generator writes remain excluded. (#2082)react-x/set-state-in-effect: setter calls reached through the same effect-side trigger are now reported once per setter name. (#2082)
📝 Documentation
react-x/set-state-in-effect: documented that files without ause…Effectname in their source are skipped, which limitsadditionalEffectHookspatterns that lack theEffectsuffix. (#2082)
🏗️ Internal
@eslint-react/ast: added theAnalyzenamespace (isTerminatingStatement,isUnconditionallyTerminating), now used byreact-x/set-state-in-effectandreact-x/refs. (#2083)
Full Changelog: v5.30.0-beta.3...v5.30.0-beta.4
Attestation
https://github.com/Rel1cx/eslint-react/attestations/59728237