Skip to content

Commit

Permalink
fix(linter/no-empty-interface): add missing test (#2979)
Browse files Browse the repository at this point in the history
As requested add new test
#2973 (comment)

---------

Co-authored-by: j.buendia <j.buendia>
  • Loading branch information
JoSeBu1 authored Apr 14, 2024
1 parent b6b63ac commit 627dd42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ fn test() {

let fail = vec![
("interface Foo {}", None),
("interface Foo extends {}", None),
(
"
interface Foo {
Expand Down
5 changes: 5 additions & 0 deletions crates/oxc_linter/src/snapshots/no_empty_interface.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ expression: no_empty_interface
· ────────────────
╰────
× Expected `{` but found `EOF`
╭─[no_empty_interface.tsx:1:25]
1interface Foo extends {}
╰────

typescript-eslint(no-empty-interface): an interface declaring no members is equivalent to its supertype
╭─[no_empty_interface.tsx:6:4]
5 │
Expand Down

0 comments on commit 627dd42

Please sign in to comment.