🎯 Changes#
- In the oxlint configs of
react-query, react-query-devtools, react-query-persist-client, and react-query-next-experimental, remove the eslint-plugin-react-hooks JS plugin (react-hooks-js) and enable the same rules through Oxlint's native react plugin (react/rules-of-hooks, react/exhaustive-deps, and the React Compiler rules).
- Update the
@eslint-react/* "off" comment to point to the native react plugin.
- Rename the two
oxlint-disable-next-line directives in react-query from react-hooks-js/* to react/*.
- Remove the now unused
eslint-plugin-react-hooks from the four packages' devDependencies and the pnpm catalog.
Differences from eslint-plugin-react-hooks 7.1.1#
config and gating have no native equivalent and are dropped; neither reported anything in these packages.
- Reassigning a destructured prop or parameter captured by a closure is reported by ESLint's
immutability but not by the native rule (https://github.com/oxc-project/oxc/issues/25910, closed as not planned).
- The native React Compiler rules skip files whose only components are wrapped in
memo() or forwardRef() (https://github.com/oxc-project/oxc/issues/29892).
exhaustive-deps reports at slightly different columns.
None of these change the results here: the four packages' src have no parameter reassignments and no memo()/forwardRef() usage, and the test:oxlint output is unchanged.
✅ Checklist#
🚀 Release Impact#
Summary by CodeRabbit#
- Chores
- Updated React code-quality checks across packages to use Oxlint’s native React rules, covering hooks, dependencies, refs, state updates, purity, and memoization.
- Removed the previous React Hooks lint dependency and updated related lint suppressions.
- These changes affect development checks only; application behavior is unchanged.