What's Changed
✨ New
-
Identifier resolution is now bounded by the enclosing component scope, so render-scoped values referenced from nested callbacks (ex:
items.map((item) => <Context.Provider value={foo}>)) are now detected, values declared outside the component (ex: module-level constants) are treated as stable, and nested components report each value only once, attributed to the innermost component. (#2060)Affected rules:
react-x/no-unstable-context-valuereact-x/no-unstable-default-props
-
Class declarations (ex:
class Foo {}in a component body) are now recognized as per-render constructions, so using one as a context value or default prop is now reported. (#2060)Affected rules:
react-x/no-unstable-context-valuereact-x/no-unstable-default-props
🏗️ Internal
@eslint-react/var:resolveandresolveObjectTypenow accept aboundaryoption that bounds scope-chain traversal to an enclosing component or hook;resolveObjectTypealso resolvesClassDeclarationnodes. (#2060)- Bumped
typescript-eslintto8.72.0,fumadocs-coreandfumadocs-uito16.17.7,fumadocs-mdxto15.4.8,lucide-reactto1.60.0, andtypedoc-plugin-markdownto4.14.1.
Full Changelog: v5.28.2...v5.28.3
Attestation
https://github.com/Rel1cx/eslint-react/attestations/57782625