Skip to content

Commit

Permalink
fix: add fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
DonIsaac committed Jun 10, 2024
1 parent 38aec0f commit 6f17bcc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/oxc_linter/src/rules/eslint/no_useless_constructor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ fn lint_empty_constructor<'a>(
if !body.statements.is_empty() {
return;
}
ctx.diagnostic_with_fix(no_empty_constructor(constructor.span), || {
Fix::delete(constructor.span)
ctx.diagnostic_with_fix(no_empty_constructor(constructor.span), |fixer| {
fixer.delete_range(constructor.span)
});
}

Expand All @@ -143,8 +143,8 @@ fn lint_redundant_super_call<'a>(
if is_only_simple_params(params)
&& (is_spread_arguments(super_args) || is_passing_through(params, super_args))
{
ctx.diagnostic_with_fix(no_redundant_super_call(constructor.span), || {
Fix::delete(constructor.span)
ctx.diagnostic_with_fix(no_redundant_super_call(constructor.span), |fixer| {
fixer.delete_range(constructor.span)
});
}
}
Expand Down

0 comments on commit 6f17bcc

Please sign in to comment.