Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3746639

Browse files
feat!: @typescript-eslint/no-empty-object-type
remove redundant `@typescript-eslint/no-empty-interface` Co-authored-by: Rostislav Simonik <[email protected]>
1 parent 56bcfa4 commit 3746639

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

src/_intentionally-unused-rules.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@ export const intentionallyUnusedRules: string[] = [
2525

2626
// Covered by strict TypeScript
2727
'@typescript-eslint/no-invalid-this',
28+
29+
// Covered by `@typescript-eslint/no-empty-object-type`
30+
'@typescript-eslint/no-empty-interface',
2831
]

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ const rules = {
159159
allow: [],
160160
},
161161
],
162-
'@typescript-eslint/no-empty-interface': [
163-
'error',
164-
{ allowSingleExtends: true },
165-
],
166162
'@typescript-eslint/no-explicit-any': [
167163
'error',
168164
{ fixToUnknown: false, ignoreRestArgs: false },
@@ -172,6 +168,10 @@ const rules = {
172168
'error',
173169
{ allowWithDecorator: true },
174170
],
171+
'@typescript-eslint/no-empty-object-type': [
172+
'error',
173+
{ allowInterfaces: 'with-single-extends', allowObjectTypes: 'never' },
174+
],
175175
'@typescript-eslint/no-floating-promises': ['error'],
176176
'@typescript-eslint/no-for-in-array': ['error'],
177177
'@typescript-eslint/no-implied-eval': ['error'],

src/test/_expected-exported-value.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,6 @@ export const expectedExportedValue: TSESLint.FlatConfig.Config = {
319319
allow: [],
320320
},
321321
],
322-
'@typescript-eslint/no-empty-interface': [
323-
'error',
324-
{ allowSingleExtends: true },
325-
],
326322
'@typescript-eslint/no-explicit-any': [
327323
'error',
328324
{ fixToUnknown: false, ignoreRestArgs: false },
@@ -332,6 +328,10 @@ export const expectedExportedValue: TSESLint.FlatConfig.Config = {
332328
'error',
333329
{ allowWithDecorator: true },
334330
],
331+
'@typescript-eslint/no-empty-object-type': [
332+
'error',
333+
{ allowInterfaces: 'with-single-extends', allowObjectTypes: 'never' },
334+
],
335335
'@typescript-eslint/no-floating-promises': ['error'],
336336
'@typescript-eslint/no-for-in-array': ['error'],
337337
'@typescript-eslint/no-implied-eval': ['error'],

src/test/_rules_to_consider.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export const rulesToConsider = [
2-
'@typescript-eslint/no-empty-object-type',
32
'@typescript-eslint/no-inferrable-types',
43
'@typescript-eslint/no-magic-numbers',
54
'@typescript-eslint/no-meaningless-void-operator',

0 commit comments

Comments
 (0)