Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/oxc_linter/src/rules/oxc/no_accumulating_spread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ fn check_loop_usage<'a>(
let AstKind::VariableDeclaration(declaration) = declaration_node.kind() else {
return;
};

// if the accumulator's declaration is not a `let`, then we know it's never
// reassigned, hence cannot be a violation of the rule
if !matches!(declaration.kind, VariableDeclarationKind::Let) {
return;
}
Expand Down