Immutable
release. Only release title and notes can be modified.
What's Changed
🐞 Fixes
react-jsx/no-children-prop:React.createElementcalls whose props argument is wrapped in a TypeScript type assertion (e.g.{ children: "x" } as Props) are now reported; computed property keys written as template literals (e.g.{ [children]: "x" }) are now recognized as thechildrenprop; fixed a false positive where a computed identifier key in acreateElementprops object (e.g.{ [propName]: "Children" }) was treated as the staticchildrenprop; the suggestion fix now escapes JSX-sensitive characters (<,>,{,},&) when moving a stringchildrenprop value into element content. (#1910)react-jsx/no-children-prop-with-children: samecreateElementedge-case fixes asno-children-prop. (#1910)react-jsx/no-useless-fragment:allowExpressions: falsenow only flags fragments with a single expression child, matching the option's documented behavior, instead of flagging any fragment inside a JSX element; fragments with spread attributes (e.g.<Fragment {...props}>) are no longer auto-fixed; the auto-fixer now removes leading indentation when collapsing whitespace-only fragments. (#1910)react-jsx/no-leaked-dollar:$character references ($,$) are no longer treated as leaked dollar signs; only a literal$in the source is reported. (#1910)react-jsx/no-leaked-semicolon: leaked semicolons followed by spaces or tabs before a newline, including CRLF line endings, are now detected. (#1910)react-x/immutability: addeduseHistoryto known navigation hooks, so navigation methods such as.push()are not treated as in-place mutations inside frozen callbacks.
🏗️ Internal
@eslint-react/ast: addedExtract.getStaticPropertyNamefor resolving static property names from object properties. (#1910)
Full Changelog: v5.16.0...v5.16.1
Attestation
https://github.com/Rel1cx/eslint-react/attestations/35539568