What's Changed
🐞 Fixes
react-x/no-create-ref: Fixed a false positive wherecreateRefcalls in non-React classes were reported. The rule now only reportscreateRefcalls inside function components or Hooks (#1812).react-x/no-unused-state: Removed the "only used in effects" detection so the rule only reports state variables that are defined but never used, reducing false positives (#1808, #1749).jsx: Aligned children filtering andhasChildrenbehavior with React source, updatingno-children-propandno-useless-fragmentrules accordingly (#1805).- Zod compatibility: Relaxed
zodpeer dependency to support both v3 and v4 (#1810).
📝 Documentation
react-dom,react-web-api,react-x: Enriched rule MDX examples with TypeScript snippets from react.dev (#1809).react-dom: Added more rule examples tono-dangerously-set-innerhtml,no-find-dom-node,no-hydrate,no-render, andno-render-return-valuedocumentation (#1804).react-dom: Added legitimateflushSyncuse cases tono-flush-syncrule documentation (#1803).- Bumped the documented ESLint minimum version to
10.3.0. - Clarified that the
offpreset disables all rules. - Fixed inaccurate minimum ESLint version and
offpreset description in README.
🏗️ Internal
react-x/no-misused-capture-owner-stack: Refactored theprocess.env.NODE_ENVdetection helpers to use the sharedcore.isAPIutility (#1812).react-x/no-unused-state: Removed incorrect invalid test cases.jsx: Added targeted test cases for empty string children behavior inno-children-prop-with-childrenandno-useless-fragmentrules (#1806).- Website: Removed SF Pro fonts from the body font stack and normalized CSS baseline.
- Tests: Normalized quote usage in test files and removed
wwwprefix fromeslint-react.xyzlinks (#1807). - Removed
eslint-plugin-functionand bumped website dependencies (#1811). - Flattened
scripts/libinto thescriptsroot. - Updated
.textlintrc.json. - Updated dprint plugins and tidied scripts.
- Removed
enriching-rule-examples-from-react-dev.mdfrom main branch. - Updated Sentrux baseline metrics.
- Updated per-rule CHANGELOGs for
no-useless-fragment,no-children-prop, andno-children-prop-with-children(#1805). - Bumped dependencies:
@takumi-rs/image-responseto^1.6.0dompurifyto3.4.6fumadocs-mdxand updated pnpm lockfiletsdownto0.22.1- dprint plugins (
g-plane/markup_fmtandmarkdown)
Full Changelog: v5.8.6...v5.8.7
Attestation
https://github.com/Rel1cx/eslint-react/attestations/29182698