Skip to content

chore(*): replace the 'eslint-plugin-react-hooks' JS plugin with Oxlint's native 'react' rules in the react package oxlint configs - #12707

Open
sukvvon wants to merge 2 commits into
mainfrom
chore/oxlint-native-react-hooks-rules
Open

sukvvon wants to merge 2 commits into
mainfrom
chore/oxlint-native-react-hooks-rules

Conversation

@sukvvon

@sukvvon sukvvon commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

🎯 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.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I have followed the AI contribution policy and fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

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.

@sukvvon sukvvon self-assigned this Nov 26, 2026
@changeset-bot

changeset-bot Bot commented Nov 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 367bf11

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@nx-cloud

nx-cloud Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 367bf11

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 9m 13s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 32s View ↗

☁️ Nx Cloud last updated this comment at 2026-11-26 01:52:04 UTC

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

1 package(s) bumped directly, 25 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/query-devtools 5.108.4 → 5.108.5 Changeset
@tanstack/angular-query 5.108.4 → 5.108.5 Dependent
@tanstack/angular-query-devtools 5.108.4 → 5.108.5 Dependent
@tanstack/angular-query-persist-client 5.108.4 → 5.108.5 Dependent
@tanstack/eslint-plugin-query 5.108.4 → 5.108.5 Dependent
@tanstack/lit-query 0.2.44 → 0.2.45 Dependent
@tanstack/preact-query 5.108.4 → 5.108.5 Dependent
@tanstack/preact-query-devtools 5.108.4 → 5.108.5 Dependent
@tanstack/preact-query-persist-client 5.108.4 → 5.108.5 Dependent
@tanstack/query-async-storage-persister 5.108.4 → 5.108.5 Dependent
@tanstack/query-broadcast-client-experimental 5.108.4 → 5.108.5 Dependent
@tanstack/query-core 5.108.4 → 5.108.5 Dependent
@tanstack/query-persist-client-core 5.108.4 → 5.108.5 Dependent
@tanstack/query-sync-storage-persister 5.108.4 → 5.108.5 Dependent
@tanstack/react-query 5.108.4 → 5.108.5 Dependent
@tanstack/react-query-devtools 5.108.4 → 5.108.5 Dependent
@tanstack/react-query-next-experimental 5.108.4 → 5.108.5 Dependent
@tanstack/react-query-persist-client 5.108.4 → 5.108.5 Dependent
@tanstack/solid-query 5.108.4 → 5.108.5 Dependent
@tanstack/solid-query-devtools 5.108.4 → 5.108.5 Dependent
@tanstack/solid-query-persist-client 5.108.4 → 5.108.5 Dependent
@tanstack/svelte-query 6.4.7 → 6.4.8 Dependent
@tanstack/svelte-query-devtools 6.4.7 → 6.4.8 Dependent
@tanstack/svelte-query-persist-client 6.4.7 → 6.4.8 Dependent
@tanstack/vue-query 5.108.4 → 5.108.5 Dependent
@tanstack/vue-query-devtools 6.4.7 → 6.4.8 Dependent

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Four package Oxlint configurations now use Oxlint’s native React plugin and explicitly enable React rules. The package manifests and workspace catalog remove eslint-plugin-react-hooks. Two lint suppression directives use the native React rule namespace.

Changes: React lint configuration migration

Layer / File(s) Summary
Configure native React lint rules
packages/*/oxlint.config.ts, packages/*/package.json, packages/react-query/src/HydrationBoundary.tsx, packages/react-query/src/__tests__/utils.tsx, pnpm-workspace.yaml
Four Oxlint configurations replace the react-hooks-js alias with explicit native React rules and retain the @eslint-react rules. The package manifests and workspace catalog remove eslint-plugin-react-hooks. Two lint suppression directives switch to the react/ namespace.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: dogpawhat, tkdodo

Merge Risk: Minimal · up to 367bf · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: replacing the eslint-plugin-react-hooks JS plugin with Oxlint's native react rules in the react package Oxlint configs. The raw summary shows the oxlint configs for th…
Description check Passed The description follows the template. It has the Changes section with a clear motivation-free list of edits, the checklist, and the release impact section. The Changes section lists the four packages,…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: replacing the eslint-plugin-react-hooks JS plugin with Oxlint's native react rules in the react package Oxlint configs. The raw summary shows the oxlint configs for the four packages switching to the native react plugin, with the dependency removed. The title is long (130 characters) but specific and accurate.

Full details: Description check

Explanation

The description follows the template. It has the Changes section with a clear motivation-free list of edits, the checklist, and the release impact section. The Changes section lists the four packages, the rule mapping, the comment update, the directive renames, and the dependency removal, which matches the raw summary. The AI contribution policy box is unchecked, and the release impact box is checked as docs/CI/dev-only, which the template allows. The change is dev-only lint configuration, so no changeset is needed.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 18b1ade and 367bf11.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 11

  • packages/react-query-devtools/oxlint.config.ts
  • packages/react-query-devtools/package.json
  • packages/react-query-next-experimental/oxlint.config.ts
  • packages/react-query-next-experimental/package.json
  • packages/react-query-persist-client/oxlint.config.ts
  • packages/react-query-persist-client/package.json
  • packages/react-query/oxlint.config.ts
  • packages/react-query/package.json
  • packages/react-query/src/HydrationBoundary.tsx
  • packages/react-query/src/__tests__/utils.tsx
  • pnpm-workspace.yaml
Files with no reviewable changes: 5

  • packages/react-query-devtools/package.json
  • packages/react-query-next-experimental/package.json
  • packages/react-query-persist-client/package.json
  • packages/react-query/package.json
  • pnpm-workspace.yaml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@pkg-pr-new

pkg-pr-new Bot commented Nov 26, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query

npm i https://pkg.pr.new/@tanstack/angular-query@12707

@tanstack/angular-query-devtools

npm i https://pkg.pr.new/@tanstack/angular-query-devtools@12707

@tanstack/angular-query-persist-client

npm i https://pkg.pr.new/@tanstack/angular-query-persist-client@12707

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@12707

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@12707

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@12707

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@12707

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@12707

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@12707

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@12707

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@12707

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@12707

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@12707

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@12707

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@12707

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@12707

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@12707

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@12707

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@12707

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@12707

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@12707

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@12707

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@12707

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@12707

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@12707

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@12707

commit: 367bf11

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.96 KB (0%)
react minimal 8.71 KB (0%)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant