File tree Expand file tree Collapse file tree 6 files changed +12
-12
lines changed
packages/eslint-plugin-query/src Expand file tree Collapse file tree 6 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 1
1
import { rules } from './rules'
2
2
import type { ESLintUtils } from '@typescript-eslint/utils'
3
- import type { RuleDocs } from './types'
3
+ import type { ExtraRuleDocs } from './types'
4
4
5
5
function generateRecommendedConfig (
6
6
allRules : Record <
7
7
string ,
8
8
ESLintUtils . RuleModule <
9
9
string ,
10
10
ReadonlyArray < unknown > ,
11
- RuleDocs ,
11
+ ExtraRuleDocs ,
12
12
ESLintUtils . RuleListener
13
13
>
14
14
> ,
@@ -22,7 +22,7 @@ function generateRecommendedConfig(
22
22
...( recommended ? { [ `@tanstack/query/${ name } ` ] : recommended } : { } ) ,
23
23
}
24
24
} ,
25
- { } as Record < string , RuleDocs [ 'recommended' ] > ,
25
+ { } as Record < string , ExtraRuleDocs [ 'recommended' ] > ,
26
26
)
27
27
}
28
28
Original file line number Diff line number Diff line change @@ -2,14 +2,14 @@ import * as exhaustiveDeps from './rules/exhaustive-deps/exhaustive-deps.rule'
2
2
import * as stableQueryClient from './rules/stable-query-client/stable-query-client.rule'
3
3
import * as noRestDestructuring from './rules/no-rest-destructuring/no-rest-destructuring.rule'
4
4
import type { ESLintUtils } from '@typescript-eslint/utils'
5
- import type { RuleDocs } from './types'
5
+ import type { ExtraRuleDocs } from './types'
6
6
7
7
export const rules : Record <
8
8
string ,
9
9
ESLintUtils . RuleModule <
10
10
string ,
11
11
ReadonlyArray < unknown > ,
12
- RuleDocs ,
12
+ ExtraRuleDocs ,
13
13
ESLintUtils . RuleListener
14
14
>
15
15
> = {
Original file line number Diff line number Diff line change @@ -5,14 +5,14 @@ import { uniqueBy } from '../../utils/unique-by'
5
5
import { detectTanstackQueryImports } from '../../utils/detect-react-query-imports'
6
6
import { ExhaustiveDepsUtils } from './exhaustive-deps.utils'
7
7
import type { TSESLint } from '@typescript-eslint/utils'
8
- import type { RuleDocs } from '../../types'
8
+ import type { ExtraRuleDocs } from '../../types'
9
9
10
10
const QUERY_KEY = 'queryKey'
11
11
const QUERY_FN = 'queryFn'
12
12
13
13
export const name = 'exhaustive-deps'
14
14
15
- const createRule = ESLintUtils . RuleCreator < RuleDocs > ( getDocsUrl )
15
+ const createRule = ESLintUtils . RuleCreator < ExtraRuleDocs > ( getDocsUrl )
16
16
17
17
export const rule = createRule ( {
18
18
name,
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ import { getDocsUrl } from '../../utils/get-docs-url'
3
3
import { ASTUtils } from '../../utils/ast-utils'
4
4
import { detectTanstackQueryImports } from '../../utils/detect-react-query-imports'
5
5
import { NoRestDestructuringUtils } from './no-rest-destructuring.utils'
6
- import type { RuleDocs } from '../../types'
6
+ import type { ExtraRuleDocs } from '../../types'
7
7
8
8
export const name = 'no-rest-destructuring'
9
9
10
10
const queryHooks = [ 'useQuery' , 'useQueries' , 'useInfiniteQuery' ]
11
11
12
- const createRule = ESLintUtils . RuleCreator < RuleDocs > ( getDocsUrl )
12
+ const createRule = ESLintUtils . RuleCreator < ExtraRuleDocs > ( getDocsUrl )
13
13
14
14
export const rule = createRule ( {
15
15
name,
Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ import { ASTUtils } from '../../utils/ast-utils'
3
3
import { getDocsUrl } from '../../utils/get-docs-url'
4
4
import { detectTanstackQueryImports } from '../../utils/detect-react-query-imports'
5
5
import type { TSESLint } from '@typescript-eslint/utils'
6
- import type { RuleDocs } from '../../types'
6
+ import type { ExtraRuleDocs } from '../../types'
7
7
8
8
export const name = 'stable-query-client'
9
9
10
- const createRule = ESLintUtils . RuleCreator < RuleDocs > ( getDocsUrl )
10
+ const createRule = ESLintUtils . RuleCreator < ExtraRuleDocs > ( getDocsUrl )
11
11
12
12
export const rule = createRule ( {
13
13
name,
Original file line number Diff line number Diff line change 1
- export type RuleDocs = {
1
+ export type ExtraRuleDocs = {
2
2
recommended : 'strict' | 'error' | 'warn'
3
3
}
You can’t perform that action at this time.
0 commit comments