Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ use crate::{
};

fn no_empty_interface_diagnostic(span: Span) -> OxcDiagnostic {
OxcDiagnostic::warn("an empty interface is equivalent to `{}`").with_label(span)
OxcDiagnostic::warn("an empty interface is equivalent to `{}`")
.with_help(
"Add members to this interface, or use a type alias if it is intentionally empty.",
)
.with_label(span)
}

fn no_empty_interface_extend_diagnostic(span: Span) -> OxcDiagnostic {
OxcDiagnostic::warn("an interface declaring no members is equivalent to its supertype")
.with_help("Remove this interface and use the extended type directly or add members to this interface.")
.with_label(span)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ source: crates/oxc_linter/src/tester.rs
1 │ interface Foo {}
· ────────────────
╰────
help: Add members to this interface, or use a type alias if it is intentionally empty.

× Expected `{` but found `EOF`
╭─[no_empty_interface.tsx:1:25]
Expand All @@ -20,6 +21,7 @@ source: crates/oxc_linter/src/tester.rs
· ────────────────────────────
7 │
╰────
help: Remove this interface and use the extended type directly or add members to this interface.

⚠ typescript-eslint(no-empty-interface): an interface declaring no members is equivalent to its supertype
╭─[no_empty_interface.tsx:6:13]
Expand All @@ -28,6 +30,7 @@ source: crates/oxc_linter/src/tester.rs
· ────────────────────────────
7 │
╰────
help: Remove this interface and use the extended type directly or add members to this interface.

⚠ typescript-eslint(no-empty-interface): an interface declaring no members is equivalent to its supertype
╭─[no_empty_interface.tsx:6:13]
Expand All @@ -36,6 +39,7 @@ source: crates/oxc_linter/src/tester.rs
· ────────────────────────────
7 │
╰────
help: Remove this interface and use the extended type directly or add members to this interface.

⚠ typescript-eslint(no-empty-interface): an interface declaring no members is equivalent to its supertype
╭─[no_empty_interface.tsx:6:13]
Expand All @@ -44,6 +48,7 @@ source: crates/oxc_linter/src/tester.rs
· ────────────────────────────
7 │
╰────
help: Remove this interface and use the extended type directly or add members to this interface.

⚠ typescript-eslint(no-empty-interface): an interface declaring no members is equivalent to its supertype
╭─[no_empty_interface.tsx:6:13]
Expand All @@ -52,18 +57,21 @@ source: crates/oxc_linter/src/tester.rs
· ────────────────────────────
7 │
╰────
help: Remove this interface and use the extended type directly or add members to this interface.

⚠ typescript-eslint(no-empty-interface): an interface declaring no members is equivalent to its supertype
╭─[no_empty_interface.tsx:1:1]
1 │ interface Foo extends Array<number> {}
· ──────────────────────────────────────
╰────
help: Remove this interface and use the extended type directly or add members to this interface.

⚠ typescript-eslint(no-empty-interface): an interface declaring no members is equivalent to its supertype
╭─[no_empty_interface.tsx:1:1]
1 │ interface Foo extends Array<number | {}> {}
· ───────────────────────────────────────────
╰────
help: Remove this interface and use the extended type directly or add members to this interface.

⚠ typescript-eslint(no-empty-interface): an interface declaring no members is equivalent to its supertype
╭─[no_empty_interface.tsx:5:13]
Expand All @@ -72,6 +80,7 @@ source: crates/oxc_linter/src/tester.rs
· ───────────────────────────────────
6 │
╰────
help: Remove this interface and use the extended type directly or add members to this interface.

⚠ typescript-eslint(no-empty-interface): an interface declaring no members is equivalent to its supertype
╭─[no_empty_interface.tsx:3:13]
Expand All @@ -80,6 +89,7 @@ source: crates/oxc_linter/src/tester.rs
· ──────────────────────────
4 │
╰────
help: Remove this interface and use the extended type directly or add members to this interface.

⚠ typescript-eslint(no-empty-interface): an interface declaring no members is equivalent to its supertype
╭─[no_empty_interface.tsx:2:13]
Expand All @@ -88,6 +98,7 @@ source: crates/oxc_linter/src/tester.rs
· ──────────────────────────────────
3 │
╰────
help: Remove this interface and use the extended type directly or add members to this interface.

⚠ typescript-eslint(no-empty-interface): an interface declaring no members is equivalent to its supertype
╭─[no_empty_interface.tsx:4:22]
Expand All @@ -96,3 +107,4 @@ source: crates/oxc_linter/src/tester.rs
· ────────────────────────────
5 │ }
╰────
help: Remove this interface and use the extended type directly or add members to this interface.
Loading