What's Changed
🐞 Fixes
- Fixed missed reports where a timer, fetch controller, or observer created in one effect was treated as cleaned up because an unrelated cleanup in another effect referenced a different variable with the same name; identifier matching now resolves both sides to their variables by scope instead of comparing names only. (#1969) Affected rules:
react-web-api/no-leaked-timeoutreact-web-api/no-leaked-intervalreact-web-api/no-leaked-fetchreact-web-api/no-leaked-resize-observerreact-web-api/no-leaked-intersection-observer
🏗️ Internal
- Simplified the
react-web-apileaked-resource rules by replacing manual function-context stack tracking withTraverse.findParentancestor lookup, and added boundary tests covering deeply nested callbacks, cross-effect pairing, and wrapped or referenced setup callbacks. (#1969) Affected rules:react-web-api/no-leaked-timeoutreact-web-api/no-leaked-intervalreact-web-api/no-leaked-fetchreact-web-api/no-leaked-event-listenerreact-web-api/no-leaked-resize-observerreact-web-api/no-leaked-intersection-observer
@eslint-react/var:isAssignmentTargetEqualno longer short-circuits same-name identifiers through structural equality; identifier pairs are compared with scope-aware value equality. (#1969)react-x/no-unused-class-component-members: removed the manual class and method context stacks; the enclosing class and method are now resolved at the hit point withTraverse.findParentancestor lookup, and the per-class member definition/usage maps are initialized lazily. (#1970)
Full Changelog: v5.21.0...v5.21.1
Attestation
https://github.com/Rel1cx/eslint-react/attestations/50709926