Skip to content

Commit 3a62b2c

Browse files
committedJul 23, 2024
fix: update no-empty-object-type rule config
1 parent e56bbbe commit 3a62b2c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/configs/typescript.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ export async function typescript(
137137
'ts/method-signature-style': ['error', 'property'], // https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful
138138
'ts/no-dupe-class-members': 'error',
139139
'ts/no-dynamic-delete': 'off',
140-
'ts/no-empty-object-type': ['error', { allowInterfaces: 'always' }],
140+
'ts/no-empty-object-type': [
141+
'error',
142+
{ allowInterfaces: 'with-single-extends', // interface Derived extends Base {}
143+
allowObjectTypes: 'never', allowWithName: 'Props$' },
144+
],
141145
'ts/no-explicit-any': 'off',
142146
'ts/no-extraneous-class': 'off',
143147
'ts/no-import-type-side-effects': 'error',

0 commit comments

Comments
 (0)