Skip to content

feat(oxlint): disallow accumulating spread - #8

Open
karsten-bot wants to merge 1 commit into
mainfrom
tim-344-no-accumulating-spread
Open

karsten-bot wants to merge 1 commit into
mainfrom
tim-344-no-accumulating-spread

Conversation

@karsten-bot

Copy link
Copy Markdown
Collaborator

Adds oxc/no-accumulating-spread to the shared Oxlint core preset at error severity.

The rule was not previously enabled because the preset enables selected performance rules rather than Oxlint's full perf category. It prevents quadratic copying caused by spreading an accumulator in reduce callbacks or loops.

Verification:

  • npx --yes oxlint@1.80.0 --config ./oxlint/core.jsonc <fixture> rejects an accumulating-spread fixture with oxc(no-accumulating-spread)
  • the same command accepts an equivalent Object.fromEntries fixture
  • git diff --check

References TIM-344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant