1 | import { Linter } from "../index";
|
2 |
|
3 | export interface Deprecated extends Linter.RulesRecord {
|
4 | /**
|
5 | * Rule to enforce consistent indentation.
|
6 | *
|
7 | * @since 4.0.0-alpha.0
|
8 | * @deprecated since 4.0.0, use [`indent`](https://eslint.org/docs/rules/indent) instead.
|
9 | * @see https://eslint.org/docs/rules/indent-legacy
|
10 | */
|
11 | "indent-legacy": Linter.RuleEntry<
|
12 | [
|
13 | number | "tab",
|
14 | Partial<{
|
15 | /**
|
16 | * @default 0
|
17 | */
|
18 | SwitchCase: number;
|
19 | /**
|
20 | * @default 1
|
21 | */
|
22 | VariableDeclarator:
|
23 | | Partial<{
|
24 | /**
|
25 | * @default 1
|
26 | */
|
27 | var: number | "first";
|
28 | /**
|
29 | * @default 1
|
30 | */
|
31 | let: number | "first";
|
32 | /**
|
33 | * @default 1
|
34 | */
|
35 | const: number | "first";
|
36 | }>
|
37 | | number
|
38 | | "first";
|
39 | /**
|
40 | * @default 1
|
41 | */
|
42 | outerIIFEBody: number;
|
43 | /**
|
44 | * @default 1
|
45 | */
|
46 | MemberExpression: number | "off";
|
47 | /**
|
48 | * @default { parameters: 1, body: 1 }
|
49 | */
|
50 | FunctionDeclaration: Partial<{
|
51 | /**
|
52 | * @default 1
|
53 | */
|
54 | parameters: number | "first" | "off";
|
55 | /**
|
56 | * @default 1
|
57 | */
|
58 | body: number;
|
59 | }>;
|
60 | /**
|
61 | * @default { parameters: 1, body: 1 }
|
62 | */
|
63 | FunctionExpression: Partial<{
|
64 | /**
|
65 | * @default 1
|
66 | */
|
67 | parameters: number | "first" | "off";
|
68 | /**
|
69 | * @default 1
|
70 | */
|
71 | body: number;
|
72 | }>;
|
73 | /**
|
74 | * @default { arguments: 1 }
|
75 | */
|
76 | CallExpression: Partial<{
|
77 | /**
|
78 | * @default 1
|
79 | */
|
80 | arguments: number | "first" | "off";
|
81 | }>;
|
82 | /**
|
83 | * @default 1
|
84 | */
|
85 | ArrayExpression: number | "first" | "off";
|
86 | /**
|
87 | * @default 1
|
88 | */
|
89 | ObjectExpression: number | "first" | "off";
|
90 | /**
|
91 | * @default 1
|
92 | */
|
93 | ImportDeclaration: number | "first" | "off";
|
94 | /**
|
95 | * @default false
|
96 | */
|
97 | flatTernaryExpressions: boolean;
|
98 | ignoredNodes: string[];
|
99 | /**
|
100 | * @default false
|
101 | */
|
102 | ignoreComments: boolean;
|
103 | }>,
|
104 | ]
|
105 | >;
|
106 |
|
107 | /**
|
108 | * Rule to require or disallow newlines around directives.
|
109 | *
|
110 | * @since 3.5.0
|
111 | * @deprecated since 4.0.0, use [`padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) instead.
|
112 | * @see https://eslint.org/docs/rules/lines-around-directive
|
113 | */
|
114 | "lines-around-directive": Linter.RuleEntry<["always" | "never"]>;
|
115 |
|
116 | /**
|
117 | * Rule to require or disallow an empty line after variable declarations.
|
118 | *
|
119 | * @since 0.18.0
|
120 | * @deprecated since 4.0.0, use [`padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) instead.
|
121 | * @see https://eslint.org/docs/rules/newline-after-var
|
122 | */
|
123 | "newline-after-var": Linter.RuleEntry<["always" | "never"]>;
|
124 |
|
125 | /**
|
126 | * Rule to require an empty line before `return` statements.
|
127 | *
|
128 | * @since 2.3.0
|
129 | * @deprecated since 4.0.0, use [`padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) instead.
|
130 | * @see https://eslint.org/docs/rules/newline-before-return
|
131 | */
|
132 | "newline-before-return": Linter.RuleEntry<[]>;
|
133 |
|
134 | /**
|
135 | * Rule to disallow shadowing of variables inside of `catch`.
|
136 | *
|
137 | * @since 0.0.9
|
138 | * @deprecated since 5.1.0, use [`no-shadow`](https://eslint.org/docs/rules/no-shadow) instead.
|
139 | * @see https://eslint.org/docs/rules/no-catch-shadow
|
140 | */
|
141 | "no-catch-shadow": Linter.RuleEntry<[]>;
|
142 |
|
143 | /**
|
144 | * Rule to disallow reassignment of native objects.
|
145 | *
|
146 | * @since 0.0.9
|
147 | * @deprecated since 3.3.0, use [`no-global-assign`](https://eslint.org/docs/rules/no-global-assign) instead.
|
148 | * @see https://eslint.org/docs/rules/no-native-reassign
|
149 | */
|
150 | "no-native-reassign": Linter.RuleEntry<
|
151 | [
|
152 | Partial<{
|
153 | exceptions: string[];
|
154 | }>,
|
155 | ]
|
156 | >;
|
157 |
|
158 | /**
|
159 | * Rule to disallow negating the left operand in `in` expressions.
|
160 | *
|
161 | * @since 0.1.2
|
162 | * @deprecated since 3.3.0, use [`no-unsafe-negation`](https://eslint.org/docs/rules/no-unsafe-negation) instead.
|
163 | * @see https://eslint.org/docs/rules/no-negated-in-lhs
|
164 | */
|
165 | "no-negated-in-lhs": Linter.RuleEntry<[]>;
|
166 |
|
167 | /**
|
168 | * Rule to disallow spacing between function identifiers and their applications.
|
169 | *
|
170 | * @since 0.1.2
|
171 | * @deprecated since 3.3.0, use [`func-call-spacing`](https://eslint.org/docs/rules/func-call-spacing) instead.
|
172 | * @see https://eslint.org/docs/rules/no-spaced-func
|
173 | */
|
174 | "no-spaced-func": Linter.RuleEntry<[]>;
|
175 |
|
176 | /**
|
177 | * Rule to suggest using `Reflect` methods where applicable.
|
178 | *
|
179 | * @since 1.0.0-rc-2
|
180 | * @deprecated since 3.9.0
|
181 | * @see https://eslint.org/docs/rules/prefer-reflect
|
182 | */
|
183 | "prefer-reflect": Linter.RuleEntry<
|
184 | [
|
185 | Partial<{
|
186 | exceptions: string[];
|
187 | }>,
|
188 | ]
|
189 | >;
|
190 |
|
191 | /**
|
192 | * Rule to require JSDoc comments.
|
193 | *
|
194 | * @since 1.4.0
|
195 | * @deprecated since 5.10.0
|
196 | * @see https://eslint.org/docs/rules/require-jsdoc
|
197 | */
|
198 | "require-jsdoc": Linter.RuleEntry<
|
199 | [
|
200 | Partial<{
|
201 | require: Partial<{
|
202 | /**
|
203 | * @default true
|
204 | */
|
205 | FunctionDeclaration: boolean;
|
206 | /**
|
207 | * @default false
|
208 | */
|
209 | MethodDefinition: boolean;
|
210 | /**
|
211 | * @default false
|
212 | */
|
213 | ClassDeclaration: boolean;
|
214 | /**
|
215 | * @default false
|
216 | */
|
217 | ArrowFunctionExpression: boolean;
|
218 | /**
|
219 | * @default false
|
220 | */
|
221 | FunctionExpression: boolean;
|
222 | }>;
|
223 | }>,
|
224 | ]
|
225 | >;
|
226 |
|
227 | /**
|
228 | * Rule to enforce valid JSDoc comments.
|
229 | *
|
230 | * @since 0.4.0
|
231 | * @deprecated since 5.10.0
|
232 | * @see https://eslint.org/docs/rules/valid-jsdoc
|
233 | */
|
234 | "valid-jsdoc": Linter.RuleEntry<
|
235 | [
|
236 | Partial<{
|
237 | prefer: Record<string, string>;
|
238 | preferType: Record<string, string>;
|
239 | /**
|
240 | * @default true
|
241 | */
|
242 | requireReturn: boolean;
|
243 | /**
|
244 | * @default true
|
245 | */
|
246 | requireReturnType: boolean;
|
247 | /**
|
248 | * @remarks
|
249 | * Also accept for regular expression pattern
|
250 | */
|
251 | matchDescription: string;
|
252 | /**
|
253 | * @default true
|
254 | */
|
255 | requireParamDescription: boolean;
|
256 | /**
|
257 | * @default true
|
258 | */
|
259 | requireReturnDescription: boolean;
|
260 | /**
|
261 | * @default true
|
262 | */
|
263 | requireParamType: boolean;
|
264 | }>,
|
265 | ]
|
266 | >;
|
267 | }
|