Skip to content

Commit 1cd8b9c

Browse files
committed
refactor(linter): fixes in react/forward-ref-uses-ref are suggestions (#11376)
> Fixes: These are changes that will not change your program's behavior. It is generally safe to run them in a pre-lint hook. > Suggestions: Changes that may change your program's behavior or make a change you may not want (e.g. removing console.logs). These should be reviewed before being committed to your codebase. https://oxc.rs/docs/guide/usage/linter/automatic-fixes.html
1 parent 03e8aa9 commit 1cd8b9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/oxc_linter/src/rules/react/forward_ref_uses_ref.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ declare_oxc_lint!(
6060
ForwardRefUsesRef,
6161
react,
6262
correctness,
63-
fix
63+
suggestion
6464
);
6565

6666
fn check_forward_ref_inner(exp: &Expression, call_expr: &CallExpression, ctx: &LintContext) {
@@ -72,7 +72,7 @@ fn check_forward_ref_inner(exp: &Expression, call_expr: &CallExpression, ctx: &L
7272
if params.parameters_count() != 1 || params.rest.is_some() {
7373
return;
7474
}
75-
ctx.diagnostic_with_fix(forward_ref_uses_ref_diagnostic(span), |fixer| {
75+
ctx.diagnostic_with_suggestion(forward_ref_uses_ref_diagnostic(span), |fixer| {
7676
fixer.replace_with(call_expr, exp)
7777
});
7878
}

0 commit comments

Comments
 (0)