Skip to content

Commit 2beb500

Browse files
committed
refactor(linter): Remove unnecessary Default impl (#16250)
Also add a note that this rule can be disabled when using TypeScript, as is noted for the rule in the ESLint docs.
1 parent cc686ac commit 2beb500

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,16 @@ fn no_obj_calls_diagnostic(obj_name: &str, span: Span) -> OxcDiagnostic {
1818
.with_label(span)
1919
}
2020

21-
#[derive(Debug, Clone, PartialEq, Eq)]
21+
#[derive(Debug, Default, Clone, PartialEq, Eq)]
2222
pub struct NoObjCalls;
2323

24-
impl Default for NoObjCalls {
25-
fn default() -> Self {
26-
Self
27-
}
28-
}
29-
3024
declare_oxc_lint!(
3125
/// ### What it does
3226
///
33-
/// Disallow calling some global objects as functions
27+
/// Disallow calling some global objects as functions.
28+
///
29+
/// It is safe to disable this rule when using TypeScript, because
30+
/// TypeScript's compiler enforces this check.
3431
///
3532
/// ### Why is this bad?
3633
///

0 commit comments

Comments
 (0)