This repository was archived by the owner on Mar 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +49
-1
lines changed
src/rules/typescript-eslint Expand file tree Collapse file tree 3 files changed +49
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ module.exports = defineConfig({
95
95
'esnext' ,
96
96
'globals' ,
97
97
'greasemonkey' ,
98
+ 'inferrable' ,
98
99
'jsdoc' ,
99
100
'jsx' ,
100
101
'lang' ,
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import type { ExplicitFunctionReturnTypeRule } from './explicit-function-return-
3
3
import type { InterfaceNamePrefixRule } from './interface-name-prefix' ;
4
4
import type { MemberOrderingRule } from './member-ordering' ;
5
5
import type { NoExplicitAnyRule } from './no-explicit-any' ;
6
+ import type { NoInferrableTypesRule } from './no-inferrable-types' ;
6
7
7
8
/**
8
9
* All @typescript-eslint rules.
@@ -11,4 +12,5 @@ export type TypeScriptEslintRules = BanTsCommentRule &
11
12
ExplicitFunctionReturnTypeRule &
12
13
InterfaceNamePrefixRule &
13
14
MemberOrderingRule &
14
- NoExplicitAnyRule ;
15
+ NoExplicitAnyRule &
16
+ NoInferrableTypesRule ;
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 NoInferrableTypesOption = {
7
+ /**
8
+ * @default false
9
+ *
10
+ * @see [ignoreParameters](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-inferrable-types.md#ignoreparameters)
11
+ */
12
+ ignoreParameters ?: boolean ;
13
+ /**
14
+ * @default false
15
+ *
16
+ * @see [ignoreProperties](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-inferrable-types.md#ignoreproperties)
17
+ */
18
+ ignoreProperties ?: boolean ;
19
+ } ;
20
+
21
+ /**
22
+ * Options.
23
+ */
24
+ export type NoInferrableTypesOptions = [ NoInferrableTypesOption ?] ;
25
+
26
+ /**
27
+ * Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean.
28
+ *
29
+ * @see [no-inferrable-types](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-inferrable-types.md)
30
+ */
31
+ export type NoInferrableTypesRuleConfig = RuleConfig < NoInferrableTypesOptions > ;
32
+
33
+ /**
34
+ * Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean.
35
+ *
36
+ * @see [no-inferrable-types](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-inferrable-types.md)
37
+ */
38
+ export interface NoInferrableTypesRule {
39
+ /**
40
+ * Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean.
41
+ *
42
+ * @see [no-inferrable-types](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-inferrable-types.md)
43
+ */
44
+ '@typescript-eslint/no-inferrable-types' : NoInferrableTypesRuleConfig ;
45
+ }
You can’t perform that action at this time.
0 commit comments