This repository was archived by the owner on Mar 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +48
-1
lines changed
src/rules/typescript-eslint Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,13 @@ import type { BanTsCommentRule } from './ban-ts-comment';
2
2
import type { ExplicitFunctionReturnTypeRule } from './explicit-function-return-type' ;
3
3
import type { InterfaceNamePrefixRule } from './interface-name-prefix' ;
4
4
import type { MemberOrderingRule } from './member-ordering' ;
5
+ import type { NoExplicitAnyRule } from './no-explicit-any' ;
5
6
6
7
/**
7
8
* All @typescript-eslint rules.
8
9
*/
9
10
export type TypeScriptEslintRules = BanTsCommentRule &
10
11
ExplicitFunctionReturnTypeRule &
11
12
InterfaceNamePrefixRule &
12
- MemberOrderingRule ;
13
+ MemberOrderingRule &
14
+ NoExplicitAnyRule ;
Original file line number Diff line number Diff line change
1
+ import type { RuleConfig } from '../rule-config' ;
2
+
3
+ /**
4
+ * Option.
5
+ */
6
+ export type NoExplicitAnyOption = {
7
+ /**
8
+ * If `true`, auto-fixing will be made available in which the "any" type is converted to an "unknown" type.
9
+ *
10
+ * @default false
11
+ */
12
+ fixToUnknown : boolean ;
13
+ /**
14
+ * Specify if arrays from the rest operator are considered okay.
15
+ *
16
+ * @default false
17
+ */
18
+ ignoreRestArgs : boolean ;
19
+ } ;
20
+
21
+ /**
22
+ * Options.
23
+ */
24
+ export type NoExplicitAnyOptions = [ NoExplicitAnyOption ?] ;
25
+
26
+ /**
27
+ * Disallow usage of the `any` type.
28
+ *
29
+ * @see [no-explicit-any](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-explicit-any.md)
30
+ */
31
+ export type NoExplicitAnyRuleConfig = RuleConfig < NoExplicitAnyOptions > ;
32
+
33
+ /**
34
+ * Disallow usage of the `any` type.
35
+ *
36
+ * @see [no-explicit-any](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-explicit-any.md)
37
+ */
38
+ export interface NoExplicitAnyRule {
39
+ /**
40
+ * Disallow usage of the `any` type.
41
+ *
42
+ * @see [no-explicit-any](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-explicit-any.md)
43
+ */
44
+ '@typescript-eslint/no-explicit-any' : NoExplicitAnyRuleConfig ;
45
+ }
You can’t perform that action at this time.
0 commit comments