diff --git a/crates/oxc_linter/src/rules/typescript/no_empty_interface.rs b/crates/oxc_linter/src/rules/typescript/no_empty_interface.rs index 0165b3431..88a7be7b5 100644 --- a/crates/oxc_linter/src/rules/typescript/no_empty_interface.rs +++ b/crates/oxc_linter/src/rules/typescript/no_empty_interface.rs @@ -128,6 +128,7 @@ fn test() { let fail = vec![ ("interface Foo {}", None), + ("interface Foo extends {}", None), ( " interface Foo { diff --git a/crates/oxc_linter/src/snapshots/no_empty_interface.snap b/crates/oxc_linter/src/snapshots/no_empty_interface.snap index a4120f49c..24e6bd590 100644 --- a/crates/oxc_linter/src/snapshots/no_empty_interface.snap +++ b/crates/oxc_linter/src/snapshots/no_empty_interface.snap @@ -8,6 +8,11 @@ expression: no_empty_interface · ──────────────── ╰──── + × Expected `{` but found `EOF` + ╭─[no_empty_interface.tsx:1:25] + 1 │ interface Foo extends {} + ╰──── + ⚠ typescript-eslint(no-empty-interface): an interface declaring no members is equivalent to its supertype ╭─[no_empty_interface.tsx:6:4] 5 │