-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
index.d.ts
45 lines (42 loc) · 1.16 KB
/
index.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
import type { EslintRules } from './eslint';
import type { RuleConfig } from './rule-config';
/**
* This is a special exported interface for other packages to declare
* additional types that should bail out for eslint rules. For example
* `@typescript-eslint/eslint-plugin` can declare it like so in its `d.ts`:
*
* ```ts
* declare module 'eslint-define-config' {
* export interface CustomRuleOptions {
* /**
* * Require consistently using either `T[]` or `Array<T>` for arrays.
* *
* * \@see [array-type](https://typescript-eslint.io/rules/array-type)
* *\/
* '@typescript-eslint/array-type': [
* {
* default?: 'array' | 'generic' | 'array-simple';
* readonly?: 'array' | 'generic' | 'array-simple';
* },
* ];
*
* // ... more Rules
* }
* }
* ```
*/
export interface CustomRuleOptions {}
type CustomRules = {
[TRuleName in keyof CustomRuleOptions]: RuleConfig<
CustomRuleOptions[TRuleName]
>;
};
/**
* Rules.
*
* @see [Rules](https://eslint.org/docs/user-guide/configuring/rules)
*/
export interface Rules
extends CustomRules,
EslintRules,
Record<string, RuleConfig> {}