Skip to content

Commit 483f3de

Browse files
ci: apply automated fixes
1 parent e1c7916 commit 483f3de

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

docs/framework/react/guides/important-defaults.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Out of the box, TanStack Query is configured with **aggressive but sane** defaul
1010
> To change this behavior, you can configure your queries both globally and per-query using the `staleTime` option. Specifying a longer `staleTime` means queries will not refetch their data as often
1111
1212
- A Query that has a `staleTime` set is considered **fresh** until that `staleTime` has elapsed.
13-
1413
- set `staleTime` to e.g. `2 * 60 * 1000` to make sure data is read from the cache, without triggering any kinds of refetches, for 2 minutes, or until the Query is [invalidated manually](../query-invalidation.md).
1514
- set `staleTime` to `Infinity` to never trigger a refetch until the Query is [invalidated manually](../query-invalidation.md).
1615
- set `staleTime` to `'static'` to **never** trigger a refetch, even if the Query is [invalidated manually](../query-invalidation.md).

docs/framework/react/quick-start.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ function Todos() {
5353

5454
return (
5555
<div>
56-
<ul>{query.data?.map((todo) => <li key={todo.id}>{todo.title}</li>)}</ul>
56+
<ul>
57+
{query.data?.map((todo) => (
58+
<li key={todo.id}>{todo.title}</li>
59+
))}
60+
</ul>
5761

5862
<button
5963
onClick={() => {

docs/framework/react/reference/usePrefetchInfiniteQuery.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,17 @@ usePrefetchInfiniteQuery(options)
1212
You can pass everything to `usePrefetchInfiniteQuery` that you can pass to [`queryClient.prefetchInfiniteQuery`](../../../../reference/QueryClient.md#queryclientprefetchinfinitequery). Remember that some of them are required as below:
1313

1414
- `queryKey: QueryKey`
15-
1615
- **Required**
1716
- The query key to prefetch during render
1817

1918
- `queryFn: (context: QueryFunctionContext) => Promise<TData>`
20-
2119
- **Required, but only if no default query function has been defined** See [Default Query Function](../../guides/default-query-function.md) for more information.
2220

2321
- `initialPageParam: TPageParam`
24-
2522
- **Required**
2623
- The default page param to use when fetching the first page.
2724

2825
- `getNextPageParam: (lastPage, allPages, lastPageParam, allPageParams) => TPageParam | undefined | null`
29-
3026
- **Required**
3127
- When new data is received for this query, this function receives both the last page of the infinite list of data and the full array of all pages, as well as pageParam information.
3228
- It should return a **single variable** that will be passed as the last optional parameter to your query function.

docs/framework/react/reference/usePrefetchQuery.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ usePrefetchQuery(options)
1212
You can pass everything to `usePrefetchQuery` that you can pass to [`queryClient.prefetchQuery`](../../../../reference/QueryClient.md#queryclientprefetchquery). Remember that some of them are required as below:
1313

1414
- `queryKey: QueryKey`
15-
1615
- **Required**
1716
- The query key to prefetch during render
1817

docs/framework/solid/reference/useQuery.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ function App() {
187187
## `useQuery` Parameters
188188

189189
- ### Query Options - `Accessor<QueryOptions>`
190-
191190
- ##### `queryKey: unknown[]`
192191
- **Required**
193192
- The query key to use for this query.

packages/query-core/src/__tests__/query.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,11 +760,11 @@ describe('query', () => {
760760
})
761761
await vi.advanceTimersByTimeAsync(10)
762762

763-
expect(updates).toEqual([
763+
;(expect(updates).toEqual([
764764
'updated', // type: 'fetch'
765765
'updated', // type: 'success'
766766
]),
767-
unsubscribe()
767+
unsubscribe())
768768
})
769769

770770
test('fetch should throw an error if the queryFn is not defined', async () => {

packages/react-query/src/__tests__/ssr.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,11 @@ describe('Server Side Rendering', () => {
144144
initialPageParam: 0,
145145
})
146146
return (
147-
<ul>{query.data?.pages.map((page) => <li key={page}>{page}</li>)}</ul>
147+
<ul>
148+
{query.data?.pages.map((page) => (
149+
<li key={page}>{page}</li>
150+
))}
151+
</ul>
148152
)
149153
}
150154

0 commit comments

Comments
 (0)