-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
docs: remove unnecessary trailing comma #9594
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughDocumentation updates remove trailing commas after the queryClient option in multiple React reference pages. No code, API, behavior, or control flow changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (7)
docs/framework/react/reference/useIsMutating.md (1)
20-20
: Tighten phrasing: “Use this to use …”Consider a crisper sentence to avoid repetition.
- - Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used. + - Pass a custom QueryClient. Otherwise, the one from the nearest context will be used.docs/framework/react/reference/useQuery.md (2)
182-182
: Minor copy edit for claritySame nit as elsewhere: reduce “use … use” repetition.
- - Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used. + - Pass a custom QueryClient. Otherwise, the one from the nearest context will be used.
94-101
: Optional: fix small type/formatting nits in the options listNot part of this PR, but since we’re touching this section, a few minor TS formatting fixes would improve readability:
-- `staleTime: number | 'static' ((query: Query) => number | 'static')` +- `staleTime: number | 'static' | ((query: Query) => number | 'static')` -`placeholderData: TData | (previousValue: TData | undefined; previousQuery: Query | undefined,) => TData` +`placeholderData: TData | ((previousValue: TData | undefined, previousQuery: Query | undefined) => TData)` -`structuralSharing: boolean | (oldData: unknown | undefined, newData: unknown) => unknown)` +`structuralSharing: boolean | ((oldData: unknown | undefined, newData: unknown) => unknown)`Rationale:
- Add the missing union pipe for
staleTime
.- Use a comma between function parameters (not a semicolon) and remove the stray trailing comma.
- Balance parentheses in
structuralSharing
and wrap the function type for clarity.Also applies to: 157-163
docs/framework/react/reference/useMutationState.md (1)
76-76
: Copy tweak for consistencyMirror the same phrasing used in the other pages.
- - Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used. + - Pass a custom QueryClient. Otherwise, the one from the nearest context will be used.docs/framework/react/reference/useMutation.md (1)
107-107
: Minor copy editAlign wording with other pages.
- - Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used. + - Pass a custom QueryClient. Otherwise, the one from the nearest context will be used.docs/framework/react/reference/useQueryClient.md (2)
17-17
: Copy tighten for consistencySame micro-edit as elsewhere.
- - Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used. + - Pass a custom QueryClient. Otherwise, the one from the nearest context will be used.
9-12
: Example call reads like a signatureThe example shows
useQueryClient(queryClient?: QueryClient)
inside a call site, which looks like a TS signature rather than a real invocation. Consider showing a normal call and (optionally) a commented variant passing a client.-import { useQueryClient } from '@tanstack/react-query' - -const queryClient = useQueryClient(queryClient?: QueryClient) +import { useQueryClient } from '@tanstack/react-query' + +const queryClient = useQueryClient() +// Optionally pass a custom client: +// const queryClient = useQueryClient(myQueryClient)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (7)
docs/framework/react/reference/hydration.md
(2 hunks)docs/framework/react/reference/useIsFetching.md
(1 hunks)docs/framework/react/reference/useIsMutating.md
(1 hunks)docs/framework/react/reference/useMutation.md
(1 hunks)docs/framework/react/reference/useMutationState.md
(1 hunks)docs/framework/react/reference/useQuery.md
(1 hunks)docs/framework/react/reference/useQueryClient.md
(1 hunks)
🔇 Additional comments (10)
docs/framework/react/reference/useIsMutating.md (2)
19-19
: Trailing comma removal aligns with docs style.Good catch. This matches the formatting used elsewhere and avoids implying more properties follow.
19-20
: All clear—no remaining trailing commas
I’ve scanned the entiredocs/
directory for any occurrences of a bullet line like- `queryClient?: QueryClient`,
and found none. There are no other pages requiring this change.
docs/framework/react/reference/useQuery.md (1)
181-181
: Consistent punctuation: trailing comma removed.Looks good and consistent with neighboring docs.
docs/framework/react/reference/useMutationState.md (1)
75-75
: Trailing comma removal is correctMatches the intended bullet style and avoids suggesting additional fields.
docs/framework/react/reference/useMutation.md (1)
106-106
: Trailing comma removed — consistent with styleAll good here.
docs/framework/react/reference/useQueryClient.md (1)
16-16
: Trailing comma removal looks goodKeeps the bullets tidy and consistent.
docs/framework/react/reference/useIsFetching.md (2)
19-20
: Trailing comma removal is correct and improves consistency.The bullet now mirrors the house style used elsewhere in the docs; no API/behavior implications. Nice cleanup.
16-21
: No trailing commas afterQueryClient
found — all clearI ran the suggested ripgrep patterns across the
docs/
directory and confirmed there are no instances of`QueryClient`,
orqueryClient?: QueryClient,
. No further changes are needed.docs/framework/react/reference/hydration.md (2)
94-96
: Removed trailing comma afterqueryClient?: QueryClient
— looks good.Matches the updated style and avoids mixed punctuation in lists.
125-126
: Consistent comma removal inHydrationBoundary
options.Keeps the options list tidy and aligned with other pages.
Summary
This PR removes an unnecessary trailing comma
Before
After
Why
Applied Area
hydration.md
useIsFetching.md
useIsMutating.md
useMutation.md
useQuery.md
useQueryClient.md
Summary by CodeRabbit