Skip to content

Commit 8a0e24c

Browse files
committed
rename type
1 parent e10bdf3 commit 8a0e24c

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

packages/eslint-plugin-query/src/configs.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { rules } from './rules'
22
import type { ESLintUtils } from '@typescript-eslint/utils'
3-
import type { RuleDocs } from './types'
3+
import type { ExtraRuleDocs } from './types'
44

55
function generateRecommendedConfig(
66
allRules: Record<
77
string,
88
ESLintUtils.RuleModule<
99
string,
1010
ReadonlyArray<unknown>,
11-
RuleDocs,
11+
ExtraRuleDocs,
1212
ESLintUtils.RuleListener
1313
>
1414
>,
@@ -22,7 +22,7 @@ function generateRecommendedConfig(
2222
...(recommended ? { [`@tanstack/query/${name}`]: recommended } : {}),
2323
}
2424
},
25-
{} as Record<string, RuleDocs['recommended']>,
25+
{} as Record<string, ExtraRuleDocs['recommended']>,
2626
)
2727
}
2828

packages/eslint-plugin-query/src/rules.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import * as exhaustiveDeps from './rules/exhaustive-deps/exhaustive-deps.rule'
22
import * as stableQueryClient from './rules/stable-query-client/stable-query-client.rule'
33
import * as noRestDestructuring from './rules/no-rest-destructuring/no-rest-destructuring.rule'
44
import type { ESLintUtils } from '@typescript-eslint/utils'
5-
import type { RuleDocs } from './types'
5+
import type { ExtraRuleDocs } from './types'
66

77
export const rules: Record<
88
string,
99
ESLintUtils.RuleModule<
1010
string,
1111
ReadonlyArray<unknown>,
12-
RuleDocs,
12+
ExtraRuleDocs,
1313
ESLintUtils.RuleListener
1414
>
1515
> = {

packages/eslint-plugin-query/src/rules/exhaustive-deps/exhaustive-deps.rule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import { uniqueBy } from '../../utils/unique-by'
55
import { detectTanstackQueryImports } from '../../utils/detect-react-query-imports'
66
import { ExhaustiveDepsUtils } from './exhaustive-deps.utils'
77
import type { TSESLint } from '@typescript-eslint/utils'
8-
import type { RuleDocs } from '../../types'
8+
import type { ExtraRuleDocs } from '../../types'
99

1010
const QUERY_KEY = 'queryKey'
1111
const QUERY_FN = 'queryFn'
1212

1313
export const name = 'exhaustive-deps'
1414

15-
const createRule = ESLintUtils.RuleCreator<RuleDocs>(getDocsUrl)
15+
const createRule = ESLintUtils.RuleCreator<ExtraRuleDocs>(getDocsUrl)
1616

1717
export const rule = createRule({
1818
name,

packages/eslint-plugin-query/src/rules/no-rest-destructuring/no-rest-destructuring.rule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { getDocsUrl } from '../../utils/get-docs-url'
33
import { ASTUtils } from '../../utils/ast-utils'
44
import { detectTanstackQueryImports } from '../../utils/detect-react-query-imports'
55
import { NoRestDestructuringUtils } from './no-rest-destructuring.utils'
6-
import type { RuleDocs } from '../../types'
6+
import type { ExtraRuleDocs } from '../../types'
77

88
export const name = 'no-rest-destructuring'
99

1010
const queryHooks = ['useQuery', 'useQueries', 'useInfiniteQuery']
1111

12-
const createRule = ESLintUtils.RuleCreator<RuleDocs>(getDocsUrl)
12+
const createRule = ESLintUtils.RuleCreator<ExtraRuleDocs>(getDocsUrl)
1313

1414
export const rule = createRule({
1515
name,

packages/eslint-plugin-query/src/rules/stable-query-client/stable-query-client.rule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { ASTUtils } from '../../utils/ast-utils'
33
import { getDocsUrl } from '../../utils/get-docs-url'
44
import { detectTanstackQueryImports } from '../../utils/detect-react-query-imports'
55
import type { TSESLint } from '@typescript-eslint/utils'
6-
import type { RuleDocs } from '../../types'
6+
import type { ExtraRuleDocs } from '../../types'
77

88
export const name = 'stable-query-client'
99

10-
const createRule = ESLintUtils.RuleCreator<RuleDocs>(getDocsUrl)
10+
const createRule = ESLintUtils.RuleCreator<ExtraRuleDocs>(getDocsUrl)
1111

1212
export const rule = createRule({
1313
name,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export type RuleDocs = {
1+
export type ExtraRuleDocs = {
22
recommended: 'strict' | 'error' | 'warn'
33
}

0 commit comments

Comments
 (0)