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 +43
-0
lines changed
src/rules/typescript-eslint Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import type { MemberDelimiterStyleRule } from './member-delimiter-style';
14
14
import type { MemberOrderingRule } from './member-ordering' ;
15
15
import type { NamingConventionRule } from './naming-convention' ;
16
16
import type { NoEmptyFunctionRule } from './no-empty-function' ;
17
+ import type { NoEmptyInterfaceRule } from './no-empty-interface' ;
17
18
import type { NoExplicitAnyRule } from './no-explicit-any' ;
18
19
import type { NoInferrableTypesRule } from './no-inferrable-types' ;
19
20
import type { NoParameterPropertiesRule } from './no-parameter-properties' ;
@@ -45,6 +46,7 @@ export type TypeScriptEslintRules = AdjacentOverloadSignaturesRule &
45
46
MemberOrderingRule &
46
47
NamingConventionRule &
47
48
NoEmptyFunctionRule &
49
+ NoEmptyInterfaceRule &
48
50
NoExplicitAnyRule &
49
51
NoInferrableTypesRule &
50
52
NoParameterPropertiesRule &
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 NoEmptyInterfaceOption = {
7
+ /**
8
+ * `true` will silence warnings about extending a single interface without adding additional members.
9
+ *
10
+ * @default false
11
+ *
12
+ * @see [allowSingleExtends](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-interface.md#options)
13
+ */
14
+ allowSingleExtends ?: boolean ;
15
+ } ;
16
+
17
+ /**
18
+ * Options.
19
+ */
20
+ export type NoEmptyInterfaceOptions = [ NoEmptyInterfaceOption ?] ;
21
+
22
+ /**
23
+ * Disallow the declaration of empty interfaces.
24
+ *
25
+ * @see [no-empty-interface](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-interface.md)
26
+ */
27
+ export type NoEmptyInterfaceRuleConfig = RuleConfig < NoEmptyInterfaceOptions > ;
28
+
29
+ /**
30
+ * Disallow the declaration of empty interfaces.
31
+ *
32
+ * @see [no-empty-interface](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-interface.md)
33
+ */
34
+ export interface NoEmptyInterfaceRule {
35
+ /**
36
+ * Disallow the declaration of empty interfaces.
37
+ *
38
+ * @see [no-empty-interface](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-interface.md)
39
+ */
40
+ '@typescript-eslint/no-empty-interface' : NoEmptyInterfaceRuleConfig ;
41
+ }
You can’t perform that action at this time.
0 commit comments