Skip to content
Source
Sign inSign up
TanStack/query

chore: update eslint-plugin-react-hooks #9737

MergedTkDodomerged 4 commits intomain fromrefs/pull/9737/headmerged by TkDodo View on GitHub

TkDodocommented

what a chore

Summary by CodeRabbit

  • Bug Fixes

    • Improved hydration reliability by syncing options after render, reducing edge-case issues during initial hydration.
    • Corrected mutation state initialization to avoid false negatives on first render, ensuring accurate state tracking.
  • Chores

    • Updated React Hooks ESLint plugin to the latest stable version.
    • Aligned projects with the latest recommended React Hooks lint rules for compatibility and consistency.
    • Cleaned up lint directives and test annotations without affecting runtime behavior.
    1. ⚠️ No Changeset found

      Latest commit: 35b8f896273dcd095586782731148b62376119e7

      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

    2. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: react-query-devtools

    3. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: react-query

    4. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: react-query-persist-client

    5. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: react-query-next-experimental

    6. nx-cloud[bot](GitHub profile, opens in a new tab)commented

      View your CI Pipeline Execution ↗ for commit 35b8f896273dcd095586782731148b62376119e7

      CommandStatusDurationResult
      nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded4m 30sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 23sView ↗

      ☁️ Nx Cloud last updated this comment at 2025-10-08 11:28:50 UTC

    7. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Walkthrough

      ESLint configs across examples and packages were updated to migrate React Hooks plugin usage to recommended-latest, adjust rules, and remove legacy/react-compiler settings. Several lint directives in source and tests were added/updated. Two functional tweaks landed: optionsRef sync moved to useEffect in HydrationBoundary, and a null-based init guard in useMutationState.

      Changes

      Cohort / File(s)Summary
      Examples: React ESLint cleanup
      examples/react/algolia/eslint.config.js, examples/react/basic/eslint.config.js, examples/react/basic-graphql-request/eslint.config.js, examples/react/shadow-dom/eslint.config.js
      Removed eslint-plugin-react-hooks import and config; dropped reactHooks.configs.recommended and inline react-hooks/* rules from exports.
      Packages: ESLint react-hooks migration
      packages/react-query/eslint.config.js, packages/react-query-devtools/eslint.config.js, packages/react-query-next-experimental/eslint.config.js, packages/react-query-persist-client/eslint.config.js
      Switched to default import for react-hooks plugin; replaced configs.recommended with configs['recommended-latest'] (with ts-expect-error); removed react-hooks/react-compiler; added react-hooks/unsupported-syntax and react-hooks/incompatible-library; retained exhaustive-deps and rules-of-hooks; minor additional rule tweaks in react-query tests block.
      Functional: Hydration timing
      packages/react-query/src/HydrationBoundary.tsx
      Moved optionsRef.current assignment from render to useEffect; added targeted ESLint disable comments.
      Functional: Mutation state init guard
      packages/react-query/src/useMutationState.ts
      Changed initialization check from !result.current to result.current === null.
      Lint directives in source/tests
      packages/react-query-next-experimental/src/HydrationStreamProvider.tsx, packages/react-query-persist-client/src/__tests__/PersistQueryClientProvider.test.tsx, packages/react-query/src/__tests__/useQuery.test.tsx, packages/react-query/src/__tests__/useSuspenseInfiniteQuery.test.tsx, packages/react-query/src/__tests__/useSuspenseQueries.test.tsx, packages/react-query/src/__tests__/useSuspenseQuery.test.tsx, packages/react-query/src/__tests__/useSuspenseQueries.test-d.tsx
      Updated/added ESLint disable comments (immutability/purity), removed one disable in a test, adjusted a test name string, and modified a ref-init pattern in one test (null sentinel). No runtime logic changes except the ref-init in the test.
      Dependency bump
      package.json
      Upgraded eslint-plugin-react-hooks from ^6.0.0-rc.2 to ^6.1.1.

      Sequence Diagram(s)

      sequenceDiagram
        autonumber
        actor U as App Component
        participant HB as HydrationBoundary
        participant QC as QueryClient
      
        U->>HB: Render with props.options
        note over HB: optionsRef.current not set during render
        HB-->>U: Render output
        rect rgb(236,248,255)
        note right of HB: After commit (useEffect)
        HB->>HB: optionsRef.current = props.options
        HB->>QC: hydrate(newQueries, optionsRef.current)
        QC-->>HB: Hydration complete
        end
      sequenceDiagram
        autonumber
        actor C as Component
        participant HMS as useMutationState
        participant MC as MutationCache
      
        C->>HMS: Call hook
        alt Initial render
          HMS->>HMS: if (result.current === null) init from MC
        end
        HMS->>MC: subscribe(listener)
        MC-->>HMS: notify on mutation changes
        HMS-->>C: Return current result

      Estimated code review effort

      🎯 3 (Moderate) | ⏱️ ~25 minutes

      • TanStack/query#9611 — Also touches useMutationState behavior/tests; relevant to the initialization change.
      • TanStack/query#9671 — Updates eslint-plugin-react-hooks version; aligns with this plugin migration.

      Suggested labels

      package: eslint-plugin-query

      Suggested reviewers

      • arnoud-dv

      Poem

      I twitch my whiskers, configs align, From hooks of old to latest design. Options now wait till effects take hold, Mutations check for null—so bold. With lint soothed quiet, I hop with glee, Carrots, commits, and CI green for me! 🥕✨

      Pre-merge checks and finishing touches

      ❌ Failed checks (2 warnings)
      Check nameStatusExplanationResolution
      Description Check⚠️ WarningThe PR description consists only of the phrase “what a chore” and does not follow the repository’s required template sections for describing changes, confirming testing steps, or indicating release impact. Without the “🎯 Changes,” “✅ Checklist,” and “🚀 Release Impact” headings and content, reviewers lack critical information about the modifications, testing, and release considerations. As a result, it fails to meet the description guidelines.Please update the PR description to include the required “🎯 Changes,” “✅ Checklist,” and “🚀 Release Impact” sections from the template, detailing what was changed and why, confirming that tests were run, and specifying any release implications.
      Docstring Coverage⚠️ WarningDocstring coverage is 10.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
      ✅ Passed checks (1 passed)
      Check nameStatusExplanation
      Title Check✅ PassedThe title clearly summarizes the main change of updating the eslint-plugin-react-hooks dependency and related configurations across the repository. It is concise, follows conventional commit style, and provides enough context for reviewers to understand the primary purpose of the pull request. Therefore it meets the repository’s title guidelines.
      ✨ Finishing touches
      • 📝 Generate docstrings
        🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Post copyable unit tests in a comment
      • Commit unit tests in branch `feature/eslint-plugin-react-hooks`

      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    8. More templates

      @tanstack/angular-query-experimental

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

      @tanstack/eslint-plugin-query

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

      @tanstack/query-async-storage-persister

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

      @tanstack/query-broadcast-client-experimental

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

      @tanstack/query-core

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

      @tanstack/query-devtools

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

      @tanstack/query-persist-client-core

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

      @tanstack/query-sync-storage-persister

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

      @tanstack/react-query

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

      @tanstack/react-query-devtools

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

      @tanstack/react-query-next-experimental

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

      @tanstack/react-query-persist-client

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

      @tanstack/solid-query

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

      @tanstack/solid-query-devtools

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

      @tanstack/solid-query-persist-client

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

      @tanstack/svelte-query

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

      @tanstack/svelte-query-devtools

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

      @tanstack/svelte-query-persist-client

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

      @tanstack/vue-query

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

      @tanstack/vue-query-devtools

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

      commit: 35b8f89

    9. Sizes for commit 35b8f896273dcd095586782731148b62376119e7:

      BranchBundle Size
      Main
      This PR
    10. codecov[bot](GitHub profile, opens in a new tab)commented

      Codecov Report

      :white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 45.51%. Comparing base (9f82d8e) to head (35b8f89). :warning: Report is 1 commits behind head on main.

      Additional details and impacted files

      Impacted file tree graph

      @@           Coverage Diff           @@
      ##             main    #9737   +/-   ##
      =======================================
        Coverage   45.51%   45.51%           
      =======================================
        Files         196      196           
        Lines        8323     8324    +1     
        Branches     1894     1898    +4     
      =======================================
      + Hits         3788     3789    +1     
        Misses       4093     4093           
        Partials      442      442           
      ComponentsCoverage Δ
      @tanstack/angular-query-experimental93.85% <ø> (ø)
      @tanstack/eslint-plugin-query83.03% <ø> (ø)
      @tanstack/query-async-storage-persister43.85% <ø> (ø)
      @tanstack/query-broadcast-client-experimental24.39% <ø> (ø)
      @tanstack/query-codemods0.00% <ø> (ø)
      @tanstack/query-core97.48% <ø> (ø)
      @tanstack/query-devtools3.48% <ø> (ø)
      @tanstack/query-persist-client-core79.60% <ø> (ø)
      @tanstack/query-sync-storage-persister84.61% <ø> (ø)
      @tanstack/query-test-utils77.77% <ø> (ø)
      @tanstack/react-query96.01% <100.00%> (+0.01%):arrow_up:
      @tanstack/react-query-devtools10.00% <ø> (ø)
      @tanstack/react-query-next-experimental∅ <ø> (∅)
      @tanstack/react-query-persist-client100.00% <ø> (ø)
      @tanstack/solid-query78.06% <ø> (ø)
      @tanstack/solid-query-devtools∅ <ø> (∅)
      @tanstack/solid-query-persist-client100.00% <ø> (ø)
      @tanstack/svelte-query∅ <ø> (∅)
      @tanstack/svelte-query-devtools∅ <ø> (∅)
      @tanstack/svelte-query-persist-client∅ <ø> (∅)
      @tanstack/vue-query71.10% <ø> (ø)
      @tanstack/vue-query-devtools∅ <ø> (∅)
      :rocket: New features to boost your workflow:
      • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
      • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
  • Actionable comments posted: 3

    Caution

    Some comments are outside the diff and can’t be posted inline due to platform limitations.

    ⚠️ Outside diff range comments (1)
    packages/react-query/src/__tests__/useQuery.test.tsx (1)

    6687-6688: Remove or correct invalid ESLint disable comment The rule react-hooks/immutability isn’t defined in your ESLint config; update to a valid rule or remove the comment.

    🧹 Nitpick comments (1)
    packages/react-query/src/HydrationBoundary.tsx (1)

    34-36: Add dependency array for efficiency.

    The useEffect runs after every render without a dependency array. Consider adding [options] to only update the ref when options actually change:

    -React.useEffect(() => {
    -  optionsRef.current = options
    -})
    +React.useEffect(() => {
    +  optionsRef.current = options
    +}, [options])

    This avoids unnecessary effect executions and makes the intent clearer.

    📜 Review details

    Configuration used: CodeRabbit UI

    Review profile: CHILL

    Plan: Pro

    📥 Commits

    Reviewing files that changed from the base of the PR and between 9f82d8e56f00889db76729db03393bf972bef5c0 and 35b8f896273dcd095586782731148b62376119e7.

    ⛔ Files ignored due to path filters (1)
    • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
    📒 Files selected for processing (18)
    • examples/react/algolia/eslint.config.js (0 hunks)
    • examples/react/basic-graphql-request/eslint.config.js (0 hunks)
    • examples/react/basic/eslint.config.js (0 hunks)
    • examples/react/shadow-dom/eslint.config.js (0 hunks)
    • package.json (1 hunks)
    • packages/react-query-devtools/eslint.config.js (1 hunks)
    • packages/react-query-next-experimental/eslint.config.js (1 hunks)
    • packages/react-query-next-experimental/src/HydrationStreamProvider.tsx (2 hunks)
    • packages/react-query-persist-client/eslint.config.js (1 hunks)
    • packages/react-query-persist-client/src/__tests__/PersistQueryClientProvider.test.tsx (0 hunks)
    • packages/react-query/eslint.config.js (1 hunks)
    • packages/react-query/src/HydrationBoundary.tsx (2 hunks)
    • packages/react-query/src/__tests__/useQuery.test.tsx (2 hunks)
    • packages/react-query/src/__tests__/useSuspenseInfiniteQuery.test.tsx (1 hunks)
    • packages/react-query/src/__tests__/useSuspenseQueries.test-d.tsx (1 hunks)
    • packages/react-query/src/__tests__/useSuspenseQueries.test.tsx (2 hunks)
    • packages/react-query/src/__tests__/useSuspenseQuery.test.tsx (1 hunks)
    • packages/react-query/src/useMutationState.ts (1 hunks)
    💤 Files with no reviewable changes (5)
    • examples/react/algolia/eslint.config.js
    • examples/react/shadow-dom/eslint.config.js
    • packages/react-query-persist-client/src/tests/PersistQueryClientProvider.test.tsx
    • examples/react/basic-graphql-request/eslint.config.js
    • examples/react/basic/eslint.config.js
    ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
    • GitHub Check: Preview
    • GitHub Check: Test
    🔇 Additional comments (17)
    packages/react-query/src/__tests__/useSuspenseQueries.test.tsx (2)

    261-262: LGTM! Appropriate test-specific suppression.

    The react-hooks/purity suppression is correct here. The test intentionally uses Math.random() to generate a unique identifier per component instance, verifying that the same component persists across multiple promise resolutions.


    669-670: LGTM! Clever pattern for runtime validation testing.

    The suppression is appropriate. The Math.random() >= 0 condition is always true at runtime, but TypeScript cannot statically determine this, allowing the test to verify runtime error handling for skipToken without triggering compile-time type errors.

    packages/react-query/src/__tests__/useSuspenseInfiniteQuery.test.tsx (1)

    28-29: LGTM! Consistent with skipToken validation pattern.

    The react-hooks/purity suppression is appropriate. This follows the same pattern as other skipToken tests: using Math.random() >= 0 to create a condition that's always true at runtime but allows testing runtime validation without TypeScript interference.

    packages/react-query/src/__tests__/useSuspenseQuery.test.tsx (1)

    878-879: LGTM! Consistent skipToken validation testing.

    The react-hooks/purity suppression is appropriate and consistent with the pattern used in other test files for validating runtime skipToken error handling.

    packages/react-query/src/useMutationState.ts (1)

    49-49: LGTM! More explicit initialization guard.

    The change from !result.current to result.current === null makes the initialization check more precise and intentional. Since the ref is initialized with null, this explicit equality check avoids potential false positives from other falsy values and clearly communicates that null is the uninitialized sentinel.

    packages/react-query/src/HydrationBoundary.tsx (1)

    94-95: LGTM! Eslint-disable is justified.

    The react-hooks/refs disable is appropriate here. The ref pattern intentionally avoids adding options to the useMemo dependencies to prevent re-computation on options changes (as explained in the comments above).

    Note: If client or state changes at the same moment options changes, the useMemo will execute during render with the previous render's options value (before the useEffect on lines 34-36 updates optionsRef.current). Since hydrate is idempotent (line 93 comment), this timing is likely safe, but keep in mind that the options used here may lag by one render in that edge case.

    package.json (1)

    57-57: LGTM!

    The upgrade from RC (^6.0.0-rc.2) to stable (^6.1.1) is appropriate and aligns with the corresponding ESLint config migrations across the repository.

    packages/react-query-next-experimental/src/HydrationStreamProvider.tsx (2)

    133-133: LGTM!

    The lint directive correctly updated from react-hooks/react-compiler to react-hooks/immutability, reflecting the rule changes in eslint-plugin-react-hooks ^6.1.1. The suppression is appropriate for the intentional stream flush via stream.length = 0.


    172-172: LGTM!

    The lint directive correctly updated from react-hooks/react-compiler to react-hooks/immutability. The suppression is appropriate for the intentional mutation of win[id] to set up the client-side hydration handler.

    packages/react-query-devtools/eslint.config.js (3)

    4-4: LGTM!

    Import style correctly updated to default import, matching the new export structure of eslint-plugin-react-hooks ^6.1.1.


    18-19: LGTM!

    The new rules unsupported-syntax and incompatible-library are appropriate additions from eslint-plugin-react-hooks ^6.1.1, replacing the previous react-compiler rule.


    9-10: Confirm necessity of @ts-expect-error The directive suppresses a type error when spreading reactHooks.configs['recommended-latest']. Verify locally against eslint-plugin-react-hooks@6.1.1 typings and remove the workaround once the upstream type issue is resolved.

    packages/react-query-next-experimental/eslint.config.js (1)

    4-4: LGTM!

    ESLint config changes are consistent with the eslint-plugin-react-hooks ^6.1.1 upgrade: default import, recommended-latest config, and new rules (unsupported-syntax, incompatible-library). The same ts-expect-error type workaround applies here as in other package configs.

    Also applies to: 9-10, 18-19

    packages/react-query/eslint.config.js (2)

    4-4: LGTM!

    ESLint config changes are consistent with the eslint-plugin-react-hooks ^6.1.1 upgrade: default import, recommended-latest config, and new rules (unsupported-syntax, incompatible-library).

    Also applies to: 9-10, 18-19


    25-25: LGTM!

    Disabling @eslint-react/dom/no-missing-button-type in test files is reasonable, as test code often uses simplified button elements without explicit types.

    packages/react-query-persist-client/eslint.config.js (2)

    4-4: Default ES import is correct for eslint-plugin-react-hooks The plugin’s main entry (index.js) exports via CommonJS, so import reactHooks from 'eslint-plugin-react-hooks' works as expected.


    18-19: Plugin v6.1.1 includes both rules The rules react-hooks/unsupported-syntax and react-hooks/incompatible-library are valid in eslint-plugin-react-hooks@^6.1.1.

    @@ -1,9 +1,10 @@
    11 // @ts-check
    22
    33 import pluginReact from '@eslint-react/eslint-plugin'
    4-import * as reactHooks from 'eslint-plugin-react-hooks'
    4+import reactHooks from 'eslint-plugin-react-hooks'
    55 import rootConfig from './root.eslint.config.js'
    66
    77 export default [
    88 ...rootConfig,
    9- reactHooks.configs.recommended,
    9+ // @ts-expect-error wtf
    10+ ...reactHooks.configs['recommended-latest'],
    coderabbitai[bot](GitHub profile, opens in a new tab)commented

    ⚠️ Potential issue | 🟡 Minor

    Replace unprofessional comment with a clear explanation.

    The comment "wtf" is unprofessional and doesn't explain why the type error is being suppressed. Replace it with a clear explanation of the type issue.

    -  // @ts-expect-error wtf
    +  // @ts-expect-error - recommended-latest config has incomplete type definitions
       ...reactHooks.configs['recommended-latest'],
    📝 Committable suggestion

    ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    Suggested change
    9- // @ts-expect-error wtf
    10- ...reactHooks.configs['recommended-latest'],
    9+ // @ts-expect-error - recommended-latest config has incomplete type definitions
    10+ ...reactHooks.configs['recommended-latest'],
    🤖 Prompt for AI Agents
    In packages/react-query-persist-client/eslint.config.js around lines 9 to 10,
    replace the unprofessional "// @ts-expect-error wtf" comment with a concise,
    professional explanation of the suppression: state which type incompatibility or
    declaration mismatch is happening (e.g., that
    reactHooks.configs['recommended-latest'] has an incompatible or missing type
    declaration for this project's ESLint config), why the suppression is necessary
    (to accept the runtime shape despite TypeScript complaining), and include a TODO
    linking to an issue or task to resolve the typing mismatch later; keep it short
    and informative.
    @@ -6162,6 +6162,7 @@
    61626162 },
    61636163 })
    61646164
    6165+ const mounted = React.useRef<boolean>(null)
    61656166 // this simulates a synchronous update between the time the query is created
    61666167 // and the time it is subscribed to that could be missed otherwise
    6167- if (!mounted.current) {
    6168+ if (mounted.current === null) {
    coderabbitai[bot](GitHub profile, opens in a new tab)commented

    ⚠️ Potential issue | 🔴 Critical

    Fix type annotation for null initialization.

    The ref is typed as React.useRef<boolean> but initialized with null. This is a type mismatch that violates TypeScript's type safety.

    Apply this diff to correct the type:

    -      const mounted = React.useRef<boolean>(null)
    +      const mounted = React.useRef<boolean | null>(null)

    The usage pattern (initialize with null, then set to true) requires the union type boolean | null to properly represent all possible values the ref can hold.

    📝 Committable suggestion

    ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    Suggested change
    6165- const mounted = React.useRef<boolean>(null)
    6166- // this simulates a synchronous update between the time the query is created
    6167- // and the time it is subscribed to that could be missed otherwise
    6168- if (mounted.current === null) {
    6165+ const mounted = React.useRef<boolean | null>(null)
    6166+ // this simulates a synchronous update between the time the query is created
    6167+ // and the time it is subscribed to that could be missed otherwise
    6168+ if (mounted.current === null) {
    🤖 Prompt for AI Agents
    In packages/react-query/src/__tests__/useQuery.test.tsx around lines 6165 to
    6168, the ref is declared as React.useRef<boolean> but initialized with null
    causing a TypeScript type mismatch; update the ref's generic type to include
    null (boolean | null) so it can be initialized with null and later set to true,
    e.g., change the declaration to useRef<boolean | null>(null).
  • @@ -1,9 +1,9 @@
    11 // @ts-check
    22
    33 import pluginReact from '@eslint-react/eslint-plugin'
    4-import * as reactHooks from 'eslint-plugin-react-hooks'
    4+import reactHooks from 'eslint-plugin-react-hooks'
    55 import rootConfig from './root.eslint.config.js'
    66
    77 export default [
    88 ...rootConfig,
    9- reactHooks.configs.recommended,
    9+ // @ts-expect-error wtf

    drive-by comment as I saw your posts on Bluesky...

    if you hadn't already come across it, thought it'd be helpful to point to https://github.com/facebook/react/issues/34745, which explains (some of?) the type issues with integrating the plugin's config (and the expect error overrides you needed).

    Issue was closed but the fix hasn't been published yet. You may have a better time with integration once it is 😄

    TkDodocommented

    ts-expect-error should go away if the types become correct

  • TkDodo merged thisf4a0cd5

  • TkDodo closed this

  • Sign in to join this conversation.