Skip to content

Commit 752b155

Browse files
committed
return value directly instead of assigning to variable that is immediately returned
1 parent ab4c902 commit 752b155

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,10 @@ fn is_argument_of_well_known_mutation_function(node_id: NodeId, ctx: &LintContex
165165
|| (ident.name == "Reflect" && REFLECT_MUTATION_METHODS.contains(&property_name)))
166166
&& !ctx.scoping().has_binding(ident.reference_id())
167167
{
168-
let is_first_arg = expr
168+
return expr
169169
.arguments
170170
.first()
171171
.is_some_and(|argument| argument.span() == current_node.kind().span());
172-
return is_first_arg;
173172
}
174173
}
175174

0 commit comments

Comments
 (0)