Skip to content

fix: Update typescript-eslint #5467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 26, 2023
Merged
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"@types/react-dom": "^18.0.5",
"@types/semver": "^7.3.13",
"@types/testing-library__jest-dom": "^5.14.5",
"@typescript-eslint/eslint-plugin": "^5.51.0",
"@typescript-eslint/parser": "^5.51.0",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@vitest/coverage-istanbul": "^0.27.1",
"axios": "^1.4.0",
"babel-preset-solid": "^1.6.10",
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-plugin-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"outDir": "build/lib"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.51.0",
"@typescript-eslint/parser": "^5.51.0",
"@typescript-eslint/utils": "^5.51.0",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@typescript-eslint/utils": "^5.54.0",
"eslint": "^8.34.0",
"tsup": "^6.7.0"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/query-core/src/queryClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import type {
ResetOptions,
SetDataOptions,
DefaultError,
CancelOptions,
DefaultedQueryObserverOptions,
} from './types'
import type { QueryState } from './query'
import { QueryCache } from './queryCache'
Expand All @@ -33,7 +35,6 @@ import { focusManager } from './focusManager'
import { onlineManager } from './onlineManager'
import { notifyManager } from './notifyManager'
import { infiniteQueryBehavior } from './infiniteQueryBehavior'
import type { CancelOptions, DefaultedQueryObserverOptions } from './types'

// TYPES

Expand Down
21 changes: 11 additions & 10 deletions packages/query-core/src/queryObserver.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
import type { DefaultedQueryObserverOptions, DefaultError } from './types'
import {
isServer,
isValidTimeout,
noop,
replaceData,
shallowEqualObjects,
timeUntilStale,
} from './utils'
import { notifyManager } from './notifyManager'
import type {
DefaultedQueryObserverOptions,
DefaultError,
PlaceholderDataFunction,
QueryKey,
QueryObserverBaseResult,
Expand All @@ -17,6 +9,15 @@ import type {
QueryOptions,
RefetchOptions,
} from './types'
import {
isServer,
isValidTimeout,
noop,
replaceData,
shallowEqualObjects,
timeUntilStale,
} from './utils'
import { notifyManager } from './notifyManager'
import type { Query, QueryState, FetchOptions } from './query'
import type { QueryClient } from './queryClient'
import { focusManager } from './focusManager'
Expand Down
3 changes: 1 addition & 2 deletions packages/query-core/src/tests/queryCache.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { sleep, queryKey, createQueryClient } from './utils'
import { QueryClient } from '..'
import { QueryCache, QueryObserver } from '..'
import { QueryClient, QueryCache, QueryObserver } from '..'
import { waitFor } from '@testing-library/react'
import { vi } from 'vitest'

Expand Down
8 changes: 6 additions & 2 deletions packages/query-core/src/tests/queryClient.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ import type {
QueryFunction,
QueryObserverOptions,
} from '..'
import { MutationObserver, QueryObserver } from '..'
import { focusManager, onlineManager } from '..'
import {
MutationObserver,
QueryObserver,
focusManager,
onlineManager,
} from '..'
import { noop } from '../utils'
import { vi } from 'vitest'

Expand Down
3 changes: 1 addition & 2 deletions packages/query-core/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* istanbul ignore file */

import type { MutationState } from './mutation'
import type { QueryBehavior, Query } from './query'
import type { FetchDirection, QueryBehavior, Query } from './query'
import type { RetryValue, RetryDelayValue } from './retryer'
import type { QueryFilters, QueryTypeFilter } from './utils'
import type { QueryCache } from './queryCache'
import type { MutationCache } from './mutationCache'
import type { FetchDirection } from './query'

export interface Register {
// defaultError: Error
Expand Down
2 changes: 1 addition & 1 deletion packages/query-devtools/src/Devtools.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { Accessor, Component, JSX, Setter } from 'solid-js'
import { For } from 'solid-js'
import {
createEffect,
createMemo,
createSignal,
on,
onCleanup,
onMount,
For,
Show,
} from 'solid-js'
import { rankItem } from '@tanstack/match-sorter-utils'
Expand Down
2 changes: 1 addition & 1 deletion packages/query-persist-client-core/src/persist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import type {
DehydratedState,
DehydrateOptions,
HydrateOptions,
NotifyEventType,
} from '@tanstack/query-core'
import { dehydrate, hydrate } from '@tanstack/query-core'
import type { NotifyEventType } from '@tanstack/query-core'

export type Promisable<T> = T | PromiseLike<T>

Expand Down
10 changes: 6 additions & 4 deletions packages/react-query/src/suspense.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import type { DefaultedQueryObserverOptions } from '@tanstack/query-core'
import type { QueryObserver } from '@tanstack/query-core'
import type {
DefaultedQueryObserverOptions,
QueryObserverResult,
QueryKey,
QueryObserver,
} from '@tanstack/query-core'
import type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'
import type { QueryObserverResult } from '@tanstack/query-core'
import type { QueryKey } from '@tanstack/query-core'

export const ensureStaleTime = (
defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { render, screen, waitFor } from '@solidjs/testing-library'
import { queryKey } from './utils'
import { createQueryClient, sleep, queryKey } from './utils'

import { QueryCache } from '@tanstack/query-core'
import { createQuery, QueryClientProvider, useQueryClient } from '..'
import { createQueryClient, sleep } from './utils'
import { vi } from 'vitest'

describe('QueryClientProvider', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library'

import { createQueryClient, sleep } from './utils'
import {
createQueryClient,
sleep,
Blink,
queryKey,
setActTimeout,
} from './utils'

import {
createEffect,
Expand All @@ -23,7 +29,6 @@ import {
QueryClientProvider,
keepPreviousData,
} from '..'
import { Blink, queryKey, setActTimeout } from './utils'
import { vi } from 'vitest'
import type { Mock } from 'vitest'

Expand Down
3 changes: 1 addition & 2 deletions packages/solid-query/src/__tests__/useIsMutating.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library'
import { createMutation, QueryClientProvider, useIsMutating } from '..'
import { createQueryClient, sleep } from './utils'
import { createQueryClient, sleep, setActTimeout } from './utils'

import { createEffect, createRenderEffect, createSignal, Show } from 'solid-js'
import * as MutationCacheModule from '../../../query-core/src/mutationCache'
import { setActTimeout } from './utils'
import { vi } from 'vitest'

describe('useIsMutating', () => {
Expand Down
3 changes: 1 addition & 2 deletions packages/solid-query/src/createBaseQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import type {
QueryObserverResult,
} from '@tanstack/query-core'
import type { QueryClient } from './QueryClient'
import { hydrate } from '@tanstack/query-core'
import { notifyManager } from '@tanstack/query-core'
import { hydrate, notifyManager } from '@tanstack/query-core'
import type { Accessor } from 'solid-js'
import { isServer } from 'solid-js/web'
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-query/src/useMutationState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import type {
MutationFilters as MF,
Mutation,
DefaultError,
MutationState,
} from '@tanstack/query-core'
import type { MutationState } from '@tanstack/query-core'
import { useQueryClient } from './useQueryClient'
import { cloneDeepUnref } from './utils'
import type { QueryClient } from './queryClient'
Expand Down
4 changes: 2 additions & 2 deletions packages/vue-query/src/useQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import type {
QueriesPlaceholderDataFunction,
QueryKey,
QueriesObserverOptions,
QueryFunction,
QueryObserverResult,
} from '@tanstack/query-core'
import type { Ref } from 'vue-demi'
import { computed, onScopeDispose, readonly, ref, watch } from 'vue-demi'

import type { QueryFunction, QueryObserverResult } from '@tanstack/query-core'

import { useQueryClient } from './useQueryClient'
import { cloneDeepUnref } from './utils'
import type { UseQueryOptions } from './useQuery'
Expand Down
Loading