variables.d.ts
4.29 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
import { Linter } from '../index';
export interface Variables extends Linter.RulesRecord {
/**
* Rule to require or disallow initialization in variable declarations.
*
* @since 1.0.0-rc-1
* @see https://eslint.org/docs/rules/init-declarations
*/
'init-declarations': Linter.RuleEntry<[
'always'
]> | Linter.RuleEntry<[
'never',
Partial<{
ignoreForLoopInit: boolean;
}>
]>;
/**
* Rule to disallow deleting variables.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-delete-var
*/
'no-delete-var': Linter.RuleEntry<[]>;
/**
* Rule to disallow labels that share a name with a variable.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-label-var
*/
'no-label-var': Linter.RuleEntry<[]>;
/**
* Rule to disallow specified global variables.
*
* @since 2.3.0
* @see https://eslint.org/docs/rules/no-restricted-globals
*/
'no-restricted-globals': Linter.RuleEntry<[
...Array<string | {
name: string;
message?: string;
}>
]>;
/**
* Rule to disallow variable declarations from shadowing variables declared in the outer scope.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-shadow
*/
'no-shadow': Linter.RuleEntry<[
Partial<{
/**
* @default false
*/
builtinGlobals: boolean;
/**
* @default 'functions'
*/
hoist: 'functions' | 'all' | 'never';
allow: string[];
}>
]>;
/**
* Rule to disallow identifiers from shadowing restricted names.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.1.4
* @see https://eslint.org/docs/rules/no-shadow-restricted-names
*/
'no-shadow-restricted-names': Linter.RuleEntry<[]>;
/**
* Rule to disallow the use of undeclared variables unless mentioned in `global` comments.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-undef
*/
'no-undef': Linter.RuleEntry<[
Partial<{
/**
* @default false
*/
typeof: boolean;
}>
]>;
/**
* Rule to disallow initializing variables to `undefined`.
*
* @since 0.0.6
* @see https://eslint.org/docs/rules/no-undef-init
*/
'no-undef-init': Linter.RuleEntry<[]>;
/**
* Rule to disallow the use of `undefined` as an identifier.
*
* @since 0.7.1
* @see https://eslint.org/docs/rules/no-undefined
*/
'no-undefined': Linter.RuleEntry<[]>;
/**
* Rule to disallow unused variables.
*
* @remarks
* Recommended by ESLint, the rule was enabled in `eslint:recommended`.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-unused-vars
*/
'no-unused-vars': Linter.RuleEntry<[
Partial<{
/**
* @default 'all'
*/
vars: 'all' | 'local';
varsIgnorePattern: string;
/**
* @default 'after-used'
*/
args: 'after-used' | 'all' | 'none';
/**
* @default false
*/
ignoreRestSiblings: boolean;
argsIgnorePattern: string;
/**
* @default 'none'
*/
caughtErrors: 'none' | 'all';
caughtErrorsIgnorePattern: string;
}>
]>;
/**
* Rule to disallow the use of variables before they are defined.
*
* @since 0.0.9
* @see https://eslint.org/docs/rules/no-use-before-define
*/
'no-use-before-define': Linter.RuleEntry<[
Partial<{
/**
* @default true
*/
functions: boolean;
/**
* @default true
*/
classes: boolean;
/**
* @default true
*/
variables: boolean;
}> | 'nofunc'
]>;
}