mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
fix(ast): remove #[visit(ignore)] from ExportDefaultDeclarationKind's TSInterfaceDeclaration (#4497)
I can't find any reason to add `#[visit(ignore)]` there
This commit is contained in:
parent
f5f0ba8c33
commit
368112c9ac
5 changed files with 22 additions and 3 deletions
|
|
@ -2312,7 +2312,6 @@ pub enum ExportDefaultDeclarationKind<'a> {
|
|||
FunctionDeclaration(Box<'a, Function<'a>>) = 64,
|
||||
ClassDeclaration(Box<'a, Class<'a>>) = 65,
|
||||
|
||||
#[visit(ignore)]
|
||||
TSInterfaceDeclaration(Box<'a, TSInterfaceDeclaration<'a>>) = 66,
|
||||
|
||||
// `Expression` variants added here by `inherit_variants!` macro
|
||||
|
|
|
|||
|
|
@ -4154,10 +4154,12 @@ pub mod walk {
|
|||
visitor.visit_function(it, flags)
|
||||
}
|
||||
ExportDefaultDeclarationKind::ClassDeclaration(it) => visitor.visit_class(it),
|
||||
ExportDefaultDeclarationKind::TSInterfaceDeclaration(it) => {
|
||||
visitor.visit_ts_interface_declaration(it)
|
||||
}
|
||||
match_expression!(ExportDefaultDeclarationKind) => {
|
||||
visitor.visit_expression(it.to_expression())
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4396,10 +4396,12 @@ pub mod walk_mut {
|
|||
visitor.visit_function(it, flags)
|
||||
}
|
||||
ExportDefaultDeclarationKind::ClassDeclaration(it) => visitor.visit_class(it),
|
||||
ExportDefaultDeclarationKind::TSInterfaceDeclaration(it) => {
|
||||
visitor.visit_ts_interface_declaration(it)
|
||||
}
|
||||
match_expression!(ExportDefaultDeclarationKind) => {
|
||||
visitor.visit_expression(it.to_expression_mut())
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -120,6 +120,15 @@ source: crates/oxc_linter/src/tester.rs
|
|||
╰────
|
||||
help: Use an `type` instead of a `interface`
|
||||
|
||||
⚠ typescript-eslint(consistent-type-definitions): Use an `type` instead of a `interface`
|
||||
╭─[consistent_type_definitions.tsx:2:19]
|
||||
1 │
|
||||
2 │ export default interface Test {
|
||||
· ─────────
|
||||
3 │ bar(): string;
|
||||
╰────
|
||||
help: Use an `type` instead of a `interface`
|
||||
|
||||
⚠ typescript-eslint(consistent-type-definitions): Use an `interface` instead of a `type`
|
||||
╭─[consistent_type_definitions.tsx:2:19]
|
||||
1 │
|
||||
|
|
|
|||
|
|
@ -15,6 +15,13 @@ source: crates/oxc_linter/src/tester.rs
|
|||
╰────
|
||||
help: The function type form `() => string` is generally preferred when possible for being more succinct.
|
||||
|
||||
⚠ typescript-eslint(prefer-function-type): Enforce using function types instead of interfaces with call signatures.
|
||||
╭─[prefer_function_type.tsx:1:47]
|
||||
1 │ export default interface Foo { /** comment */ (): string; }
|
||||
· ───────────
|
||||
╰────
|
||||
help: The function type form `() => string` is generally preferred when possible for being more succinct.
|
||||
|
||||
⚠ typescript-eslint(prefer-function-type): Enforce using function types instead of interfaces with call signatures.
|
||||
╭─[prefer_function_type.tsx:4:11]
|
||||
3 │ // comment
|
||||
|
|
|
|||
Loading…
Reference in a new issue