fix: add unified-signatures rule (#5120)
This commit is contained in:
@@ -136,6 +136,7 @@ const config = {
|
|||||||
'@typescript-eslint/no-empty-function': 'off',
|
'@typescript-eslint/no-empty-function': 'off',
|
||||||
'@typescript-eslint/await-thenable': 'error',
|
'@typescript-eslint/await-thenable': 'error',
|
||||||
'@typescript-eslint/require-array-sort-compare': 'error',
|
'@typescript-eslint/require-array-sort-compare': 'error',
|
||||||
|
'@typescript-eslint/unified-signatures': 'error',
|
||||||
'@typescript-eslint/no-unused-vars': [
|
'@typescript-eslint/no-unused-vars': [
|
||||||
'error',
|
'error',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,18 +44,9 @@ export const fetcher = gqlFetcherFactory(
|
|||||||
* })
|
* })
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
export function useQuery<Query extends GraphQLQuery>(
|
|
||||||
options: QueryOptions<Query>
|
|
||||||
): SWRResponse<
|
|
||||||
QueryResponse<Query>,
|
|
||||||
GraphQLError | GraphQLError[],
|
|
||||||
{
|
|
||||||
suspense: true;
|
|
||||||
}
|
|
||||||
>;
|
|
||||||
export function useQuery<Query extends GraphQLQuery>(
|
export function useQuery<Query extends GraphQLQuery>(
|
||||||
options: QueryOptions<Query>,
|
options: QueryOptions<Query>,
|
||||||
config: Omit<
|
config?: Omit<
|
||||||
SWRConfiguration<
|
SWRConfiguration<
|
||||||
QueryResponse<Query>,
|
QueryResponse<Query>,
|
||||||
GraphQLError | GraphQLError[],
|
GraphQLError | GraphQLError[],
|
||||||
@@ -160,17 +151,9 @@ export function useQueryInfinite<Query extends GraphQLQuery>(
|
|||||||
*
|
*
|
||||||
* trigger({ name: 'John Doe' })
|
* trigger({ name: 'John Doe' })
|
||||||
*/
|
*/
|
||||||
export function useMutation<Mutation extends GraphQLQuery, K extends Key = Key>(
|
|
||||||
options: Omit<MutationOptions<Mutation>, 'variables'>
|
|
||||||
): SWRMutationResponse<
|
|
||||||
QueryResponse<Mutation>,
|
|
||||||
GraphQLError | GraphQLError[],
|
|
||||||
K,
|
|
||||||
QueryVariables<Mutation>
|
|
||||||
>;
|
|
||||||
export function useMutation<Mutation extends GraphQLQuery, K extends Key = Key>(
|
export function useMutation<Mutation extends GraphQLQuery, K extends Key = Key>(
|
||||||
options: Omit<MutationOptions<Mutation>, 'variables'>,
|
options: Omit<MutationOptions<Mutation>, 'variables'>,
|
||||||
config: Omit<
|
config?: Omit<
|
||||||
SWRMutationConfiguration<
|
SWRMutationConfiguration<
|
||||||
QueryResponse<Mutation>,
|
QueryResponse<Mutation>,
|
||||||
GraphQLError | GraphQLError[],
|
GraphQLError | GraphQLError[],
|
||||||
|
|||||||
Reference in New Issue
Block a user