What's Changed
🐞 Fixes
react-x/globals:for...in/for...ofloop targets without a declaration (e.g.for (globalValue of items)) are now collected as writes instead of being missed.react-x/immutability: destructuring assignment targets (e.g.({ a: props.x } = value)) andfor...in/for...ofloop targets without a declaration are now collected as mutations instead of being missed.react-x/purity: builtin alias resolution now preserves the property path, so aliases of impure builtins (const random = Math.random; random(),const { now } = Date; now(),window.Math.random()) are now detected instead of being missed; unknown-global roots are not followed, preventing speculative reports.react-x/refs: destructuring assignments, for-in/of loop targets, anddeleteoperations onref.currentare now classified as writes instead of being misreported as reads.react-x/refs: refs passed to constructor calls (new Widget(ref)) and tagged templates are now checked for render-time exposure, same as refs passed to plain functions.react-x/refs: themergeRefsexemption for passing refs now survives simple variable aliases (const combine = mergeRefs), resolved position-aware so reassigned aliases lose it again.react-x/use-memo: reassignments of outer variables through destructuring patterns andfor...in/for...ofloop targets insideuseMemocallbacks are now reported instead of being missed; property mutation targets remain exempt, matching the React Compiler'sStoreContextsemantics.
🏗️ Internal
@eslint-react/var: splitresolveinto a value-basedresolveand a new origin-basedresolveOrigin, and updated the consumers inreact-web-apiandreact-xrules accordingly. (#1964)- Bumped
fumadocsto16.15.12,fumadocs-mdxto15.4.3,tsl-dxto0.13.6,eslint-plugin-de-morganto2.2.0, andeslint-plugin-regexpto3.3.1.
Full Changelog: v5.20.5...v5.20.6
Attestation
https://github.com/Rel1cx/eslint-react/attestations/49570738