Skip to content

Commit 77d9d99

Browse files
committed
perf(linter): no-dupe-class-members: only run when there are any classes
1 parent 18d736f commit 77d9d99

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/oxc_linter/src/rules/eslint/no_dupe_class_members.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ impl Rule for NoDupeClassMembers {
8080
}
8181
});
8282
}
83+
84+
fn should_run(&self, ctx: &crate::context::ContextHost) -> bool {
85+
ctx.semantic().classes().len() > 0
86+
}
8387
}
8488

8589
#[test]

0 commit comments

Comments
 (0)