Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions packages/react-query-devtools/oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -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'

export default defineConfig({
extends: [rootConfig],
settings: rootConfig.settings,
jsPlugins: [
// 'react-hooks' is reserved for Oxlint's native plugin, which lacks the React Compiler rules
{ name: 'react-hooks-js', specifier: 'eslint-plugin-react-hooks' },
'@eslint-react/eslint-plugin',
],
plugins: ['react'],
jsPlugins: ['@eslint-react/eslint-plugin'],
rules: {
...Object.fromEntries(
Object.entries(reactHooks.configs.flat.recommended.rules).map(
([name, value]) => [
name.replace(/^react-hooks\//, 'react-hooks-js/'),
value,
],
),
),
'react/error-boundaries': 'error',
'react/exhaustive-deps': 'error',
'react/globals': 'error',
'react/immutability': 'error',
'react/incompatible-library': 'error',
'react/preserve-manual-memoization': 'error',
'react/purity': 'error',
'react/refs': 'error',
'react/rules-of-hooks': 'error',
'react/set-state-in-effect': 'error',
'react/set-state-in-render': 'error',
'react/static-components': 'error',
'react/unsupported-syntax': 'error',
'react/use-memo': 'error',
...pluginReact.configs.recommended.rules,
'react-hooks-js/exhaustive-deps': 'error',
'react-hooks-js/unsupported-syntax': 'error',
'react-hooks-js/incompatible-library': 'error',
'@eslint-react/no-context-provider': 'off', // We need to be React 18 compatible
'@eslint-react/no-use-context': 'off', // We need to be React 18 compatible
// Covered by 'eslint-plugin-react-hooks'
// Covered by Oxlint's native 'react' plugin
'@eslint-react/error-boundaries': 'off',
'@eslint-react/exhaustive-deps': 'off',
'@eslint-react/globals': 'off',
Expand Down
1 change: 0 additions & 1 deletion packages/react-query-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"@testing-library/react": "catalog:",
"@types/react": "catalog:",
"@vitejs/plugin-react": "catalog:",
"eslint-plugin-react-hooks": "catalog:",
"react": "catalog:",
"typescript": "catalog:"
},
Expand Down
35 changes: 17 additions & 18 deletions packages/react-query-next-experimental/oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
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'

export default defineConfig({
extends: [rootConfig],
settings: rootConfig.settings,
jsPlugins: [
// 'react-hooks' is reserved for Oxlint's native plugin, which lacks the React Compiler rules
{ name: 'react-hooks-js', specifier: 'eslint-plugin-react-hooks' },
'@eslint-react/eslint-plugin',
],
plugins: ['react'],
jsPlugins: ['@eslint-react/eslint-plugin'],
rules: {
...Object.fromEntries(
Object.entries(reactHooks.configs.flat.recommended.rules).map(
([name, value]) => [
name.replace(/^react-hooks\//, 'react-hooks-js/'),
value,
],
),
),
'react/error-boundaries': 'error',
'react/exhaustive-deps': 'error',
'react/globals': 'error',
'react/immutability': 'error',
'react/incompatible-library': 'error',
'react/preserve-manual-memoization': 'error',
'react/purity': 'error',
'react/refs': 'error',
'react/rules-of-hooks': 'error',
'react/set-state-in-effect': 'error',
'react/set-state-in-render': 'error',
'react/static-components': 'error',
'react/unsupported-syntax': 'error',
'react/use-memo': 'error',
...pluginReact.configs.recommended.rules,
'react-hooks-js/exhaustive-deps': 'error',
'react-hooks-js/unsupported-syntax': 'error',
'react-hooks-js/incompatible-library': 'error',
'@eslint-react/no-context-provider': 'off', // We need to be React 18 compatible
'@eslint-react/no-use-context': 'off', // We need to be React 18 compatible
'@eslint-react/dom-no-dangerously-set-innerhtml': 'off',
// Covered by 'eslint-plugin-react-hooks'
// Covered by Oxlint's native 'react' plugin
'@eslint-react/error-boundaries': 'off',
'@eslint-react/exhaustive-deps': 'off',
'@eslint-react/globals': 'off',
Expand Down
1 change: 0 additions & 1 deletion packages/react-query-next-experimental/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"@tanstack/react-query": "workspace:*",
"@types/react": "catalog:",
"@vitejs/plugin-react": "catalog:",
"eslint-plugin-react-hooks": "catalog:",
"next": "^16.4.4",
"react": "catalog:",
"typescript": "catalog:"
Expand Down
35 changes: 17 additions & 18 deletions packages/react-query-persist-client/oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -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'

export default defineConfig({
extends: [rootConfig],
settings: rootConfig.settings,
jsPlugins: [
// 'react-hooks' is reserved for Oxlint's native plugin, which lacks the React Compiler rules
{ name: 'react-hooks-js', specifier: 'eslint-plugin-react-hooks' },
'@eslint-react/eslint-plugin',
],
plugins: ['react'],
jsPlugins: ['@eslint-react/eslint-plugin'],
rules: {
...Object.fromEntries(
Object.entries(reactHooks.configs.flat.recommended.rules).map(
([name, value]) => [
name.replace(/^react-hooks\//, 'react-hooks-js/'),
value,
],
),
),
'react/error-boundaries': 'error',
'react/exhaustive-deps': 'error',
'react/globals': 'error',
'react/immutability': 'error',
'react/incompatible-library': 'error',
'react/preserve-manual-memoization': 'error',
'react/purity': 'error',
'react/refs': 'error',
'react/rules-of-hooks': 'error',
'react/set-state-in-effect': 'error',
'react/set-state-in-render': 'error',
'react/static-components': 'error',
'react/unsupported-syntax': 'error',
'react/use-memo': 'error',
...pluginReact.configs.recommended.rules,
'react-hooks-js/exhaustive-deps': 'error',
'react-hooks-js/unsupported-syntax': 'error',
'react-hooks-js/incompatible-library': 'error',
'@eslint-react/no-context-provider': 'off', // We need to be React 18 compatible
'@eslint-react/no-use-context': 'off', // We need to be React 18 compatible
// Covered by 'eslint-plugin-react-hooks'
// Covered by Oxlint's native 'react' plugin
'@eslint-react/error-boundaries': 'off',
'@eslint-react/exhaustive-deps': 'off',
'@eslint-react/globals': 'off',
Expand Down
1 change: 0 additions & 1 deletion packages/react-query-persist-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"@testing-library/react": "catalog:",
"@types/react": "catalog:",
"@vitejs/plugin-react": "catalog:",
"eslint-plugin-react-hooks": "catalog:",
"react": "catalog:",
"typescript": "catalog:"
},
Expand Down
35 changes: 17 additions & 18 deletions packages/react-query/oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -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'

export default defineConfig({
extends: [rootConfig],
settings: rootConfig.settings,
jsPlugins: [
// 'react-hooks' is reserved for Oxlint's native plugin, which lacks the React Compiler rules
{ name: 'react-hooks-js', specifier: 'eslint-plugin-react-hooks' },
'@eslint-react/eslint-plugin',
],
plugins: ['react'],
jsPlugins: ['@eslint-react/eslint-plugin'],
rules: {
...Object.fromEntries(
Object.entries(reactHooks.configs.flat.recommended.rules).map(
([name, value]) => [
name.replace(/^react-hooks\//, 'react-hooks-js/'),
value,
],
),
),
'react/error-boundaries': 'error',
'react/exhaustive-deps': 'error',
'react/globals': 'error',
'react/immutability': 'error',
'react/incompatible-library': 'error',
'react/preserve-manual-memoization': 'error',
'react/purity': 'error',
'react/refs': 'error',
'react/rules-of-hooks': 'error',
'react/set-state-in-effect': 'error',
'react/set-state-in-render': 'error',
'react/static-components': 'error',
'react/unsupported-syntax': 'error',
'react/use-memo': 'error',
...pluginReact.configs.recommended.rules,
'react-hooks-js/exhaustive-deps': 'error',
'react-hooks-js/unsupported-syntax': 'error',
'react-hooks-js/incompatible-library': 'error',
'@eslint-react/no-context-provider': 'off', // We need to be React 18 compatible
'@eslint-react/no-use-context': 'off', // We need to be React 18 compatible
// Covered by 'eslint-plugin-react-hooks'
// Covered by Oxlint's native 'react' plugin
'@eslint-react/error-boundaries': 'off',
'@eslint-react/exhaustive-deps': 'off',
'@eslint-react/globals': 'off',
Expand Down
1 change: 0 additions & 1 deletion packages/react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@vitejs/plugin-react": "catalog:",
"eslint-plugin-react-hooks": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
"react-error-boundary": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query/src/HydrationBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const HydrationBoundary = ({
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) {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query/src/__tests__/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function Blink({
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 () => {
Expand Down
54 changes: 0 additions & 54 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ catalog:
'@types/react': ^19.3.0
'@types/react-dom': ^19.3.0
'@vitejs/plugin-react': ^6.2.1
eslint-plugin-react-hooks: ^7.1.1
react: ^19.3.1
react-dom: ^19.3.1

Expand Down
Loading