What's Changed
🐞 Fixes
-
react-x/no-missing-key: elements with a spread attribute are no longer reported as missingkey. (#2086) -
react-jsx/no-useless-fragment: fragments with a spread attribute are no longer reported. (#2086) -
react-dom/no-dangerously-set-innerhtml-with-children: empty expression containers ({}and comments) no longer count as children. (#2086) -
react-dom/no-script-url: namespaced attributes such asxlink:hrefare now checked forjavascript:URLs. (#2086) -
react-dom/no-void-elements-with-children: comment-only/empty containers and newline-only formatting whitespace no longer count as children. (#2086) -
react-web-api/no-leaked-event-listener: cyclic alias chains no longer cause infinite recursion when resolving asignaloption. (#2085) -
childrensupplied through a statically resolvable computed key in acreateElementprops object is now detected. (#2086)Affected rules:
react-jsx/no-children-propreact-jsx/no-children-prop-with-children
🪄 Improvements
-
JSX and
createElementrules no longer resolve spread props, since a spread's contents are unknown; only direct attributes and properties are inspected. (#2086)Affected rules:
react-x/no-missing-keyreact-jsx/no-children-propreact-jsx/no-children-prop-with-childrenreact-jsx/no-useless-fragmentreact-dom/no-dangerously-set-innerhtmlreact-dom/no-dangerously-set-innerhtml-with-childrenreact-dom/no-missing-button-typereact-dom/no-missing-iframe-sandboxreact-dom/no-string-style-propreact-dom/no-unsafe-iframe-sandboxreact-dom/no-unsafe-target-blankreact-dom/no-void-elements-with-children
🏗️ Internal
-
@eslint-react/jsx/@eslint-react/ast: rewrote the jsx module around direct-attribute descriptors andparseCreateElementCall(dropping its@eslint-react/varandts-patterndependencies and spread-property resolution), addedExtract.getJSXName, and madegetChildrenreturn meaningful children. (#2086) -
@eslint-react/var: addedresolveOriginChain,isProvenanceEqual, andhasDefault, expandedresolveObjectTypeandcreateImportLookup(isModuleBindingreplaceshasNamespace), madeisValueEqualidentity-only, and removedresolveBindingTarget/BindingTarget. (#2085) -
Rules now use the shared callee, JSX-name, and resolution helpers and unwrap
AssignmentPatterndefaults inline;react-x/no-unknown-propertyalso caches its lookups per React version. No behavior change. (#2085, #2086)Affected rules:
react-x/globalsreact-x/immutabilityreact-x/no-array-index-keyreact-x/no-unknown-propertyreact-x/no-unused-propsreact-x/purityreact-x/set-state-in-effectreact-x/unstable-exhaustive-depsreact-jsx/no-namespacereact-dom/no-find-dom-nodereact-dom/no-flush-syncreact-dom/no-hydratereact-dom/no-renderreact-dom/no-render-return-valuereact-dom/no-use-form-state
Full Changelog: v5.30.0-beta.5...v5.30.0-beta.6
Attestation
https://github.com/Rel1cx/eslint-react/attestations/60167330