Skip to content

v5.20.2 (2026-09-20)

Choose a tag to compare

@github-actions github-actions released this 20 Sep 15:03
· 23 commits to main since this release
Immutable release. Only release title and notes can be modified.
dffc8b2

What's Changed

๐Ÿž Fixes

  • Fixed false negatives in the JSX element resolver used by the react-dom rules: polymorphic components written as member expressions (e.g. <motion.div as="button">) were mistaken for host elements, so the polymorphic prop was ignored and these rules skipped them entirely; they are now resolved through the polymorphic prop and checked like the underlying DOM element. String values of the polymorphic prop are also normalized to lowercase, so as="BUTTON" is treated as button. Affected rules:
    • react-dom/no-missing-button-type
    • react-dom/no-missing-iframe-sandbox
    • react-dom/no-unsafe-iframe-sandbox
    • react-dom/no-unsafe-target-blank
    • react-dom/no-void-elements-with-children

๐Ÿ—๏ธ Internal

  • The normalized polymorphicPropName setting type is corrected from string | null to string โ€” it could never be null at runtime โ€” and the unreachable null branch in the JSX element resolver used by the react-dom rules is removed.

Full Changelog: v5.20.1...v5.20.2

Attestation

https://github.com/Rel1cx/eslint-react/attestations/48764635