Skip to content

Commit

Permalink
Merge pull request #1690 from mightyiam/new-rule-no-empty-object-type
Browse files Browse the repository at this point in the history
feat!: @typescript-eslint/no-empty-object-type
  • Loading branch information
mightyiam authored Jul 27, 2024
2 parents 56bcfa4 + 3746639 commit a519540
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
3 changes: 3 additions & 0 deletions src/_intentionally-unused-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ export const intentionallyUnusedRules: string[] = [

// Covered by strict TypeScript
'@typescript-eslint/no-invalid-this',

// Covered by `@typescript-eslint/no-empty-object-type`
'@typescript-eslint/no-empty-interface',
]
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,6 @@ const rules = {
allow: [],
},
],
'@typescript-eslint/no-empty-interface': [
'error',
{ allowSingleExtends: true },
],
'@typescript-eslint/no-explicit-any': [
'error',
{ fixToUnknown: false, ignoreRestArgs: false },
Expand All @@ -172,6 +168,10 @@ const rules = {
'error',
{ allowWithDecorator: true },
],
'@typescript-eslint/no-empty-object-type': [
'error',
{ allowInterfaces: 'with-single-extends', allowObjectTypes: 'never' },
],
'@typescript-eslint/no-floating-promises': ['error'],
'@typescript-eslint/no-for-in-array': ['error'],
'@typescript-eslint/no-implied-eval': ['error'],
Expand Down
8 changes: 4 additions & 4 deletions src/test/_expected-exported-value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,6 @@ export const expectedExportedValue: TSESLint.FlatConfig.Config = {
allow: [],
},
],
'@typescript-eslint/no-empty-interface': [
'error',
{ allowSingleExtends: true },
],
'@typescript-eslint/no-explicit-any': [
'error',
{ fixToUnknown: false, ignoreRestArgs: false },
Expand All @@ -332,6 +328,10 @@ export const expectedExportedValue: TSESLint.FlatConfig.Config = {
'error',
{ allowWithDecorator: true },
],
'@typescript-eslint/no-empty-object-type': [
'error',
{ allowInterfaces: 'with-single-extends', allowObjectTypes: 'never' },
],
'@typescript-eslint/no-floating-promises': ['error'],
'@typescript-eslint/no-for-in-array': ['error'],
'@typescript-eslint/no-implied-eval': ['error'],
Expand Down
1 change: 0 additions & 1 deletion src/test/_rules_to_consider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export const rulesToConsider = [
'@typescript-eslint/no-empty-object-type',
'@typescript-eslint/no-inferrable-types',
'@typescript-eslint/no-magic-numbers',
'@typescript-eslint/no-meaningless-void-operator',
Expand Down

0 comments on commit a519540

Please sign in to comment.