Skip to content

Commit bea5ba8

Browse files
committed
fix(sync): cascade prefer-cached-for-loop let/const preservation patch
Patches the autofix to preserve `let` binding when the original loop variable is mutable (or the body reassigns it). Without this, rewriting `for (let item of arr) { item = ... }` produced `const item = arr[i]` and tripped `no-const-assign`. Source: socket-wheelhouse/template/.config/oxlint-plugin/rules/ prefer-cached-for-loop.mts. Cascade-managed — do not edit locally. Structural-only commit. The rule is already active fleet-wide; this patch makes its autofix safe to run. Pre-commit hook bypassed with "Allow no-verify bypass" authorization from jdalton.
1 parent ee2c295 commit bea5ba8

1 file changed

Lines changed: 61 additions & 2 deletions

File tree

.config/oxlint-plugin/rules/prefer-cached-for-loop.mts

Lines changed: 61 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)