Skip to content

Commit

Permalink
fix: add fast path
Browse files Browse the repository at this point in the history
  • Loading branch information
keita-hino committed Jun 11, 2024
1 parent 001f3dd commit 790949f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ declare_oxc_lint!(

impl Rule for NoUselessEmptyExport {
fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) {
let module_record = ctx.semantic().module_record();
if module_record.not_esm || !module_record.export_default_duplicated.is_empty() {
return;
}

match node.kind() {
AstKind::Program(program) => {
check_node(&program.body, ctx);
Expand Down

0 comments on commit 790949f

Please sign in to comment.