-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
49 lines (41 loc) · 1.32 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* Since the ecosystem hasn't fully migrated to ESLint's new FlatConfig system yet,
* we "need" to type some of the plugins manually :(
*/
declare module '@eslint/js' {
// Why the hell doesn't eslint themselves export their types?
import type { Linter } from 'eslint'
export const configs: {
readonly recommended: { readonly rules: Readonly<Linter.RulesRecord> }
readonly all: { readonly rules: Readonly<Linter.RulesRecord> }
}
}
declare module 'eslint-plugin-react' {
import type { Linter, Rule } from 'eslint'
export const configs: {
recommended: { rules: Linter.RulesRecord }
all: { rules: Linter.RulesRecord }
'jsx-runtime': { rules: Linter.RulesRecord }
}
export const rules: Record<string, Rule.RuleModule>
}
declare module 'eslint-plugin-react-hooks' {
import type { Linter, Rule } from 'eslint'
export const configs: {
recommended: {
rules: {
'rules-of-hooks': Linter.RuleEntry
'exhaustive-deps': Linter.RuleEntry
}
}
}
export const rules: Record<string, Rule.RuleModule>
}
declare module '@next/eslint-plugin-next' {
import type { Linter, Rule } from 'eslint'
export const configs: {
recommended: { rules: Linter.RulesRecord }
'core-web-vitals': { rules: Linter.RulesRecord }
}
export const rules: Record<string, Rule.RuleModule>
}