Skip to content
Source
Sign inSign up
TanStack/query

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

Mergedsukvvon(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/12707/headmerged by sukvvon(GitHub profile, opens in a new tab) View on GitHub

Showing 12 changed files with 19 additions and 20 deletions (loading 8).

x
0 of 12 viewed, 12 left
1 addition and 1 deletionpackages/react-query/src/__tests__/utils.tsxModified
View file
@@ -32,7 +32,7 @@
const [shouldShow, setShouldShow] = React.useState<boolean>(true)
​
React.useEffect(() => {
- // oxlint-disable-next-line react-hooks-js/set-state-in-effect -- shows the children again whenever they or 'duration' change, before the timeout hides them
+ // oxlint-disable-next-line react/set-state-in-effect -- shows the children again whenever they or 'duration' change, before the timeout hides them
setShouldShow(true)
const timeout = setActTimeout(() => setShouldShow(false), duration)
return () => {
1 addition and 1 deletionpackages/react-query/src/HydrationBoundary.tsxModified
View file
@@ -149,7 +149,7 @@
if (newQueries.length > 0) {
// It's actually fine to call this with queries/state that already exists
// in the cache, or is older. hydrate() is idempotent for queries.
- // oxlint-disable-next-line react-hooks-js/refs -- new queries are hydrated during render on purpose, and 'options' is read through a ref so that a new 'options' object does not rerun this memo
+ // oxlint-disable-next-line react/refs -- new queries are hydrated during render on purpose, and 'options' is read through a ref so that a new 'options' object does not rerun this memo
hydrate(client, { queries: newQueries }, optionsRef.current)
if (existingQueries.length > 0) {
17 additions and 18 deletionspackages/react-query/oxlint.config.tsModified
View file
@@ -1,32 +1,31 @@
import pluginReact from '@eslint-react/eslint-plugin'
-import reactHooks from 'eslint-plugin-react-hooks'
import { defineConfig } from 'oxlint'
import rootConfig from './root.oxlint.config.ts'