Skip to content

Fix no-new-array lint warnings in benchmark files#2

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/check-syntax
Draft

Fix no-new-array lint warnings in benchmark files#2
Copilot wants to merge 3 commits into
mainfrom
copilot/check-syntax

Conversation

Copilot AI commented Mar 9, 2026

Copy link
Copy Markdown

Two oxlint unicorn/no-new-array warnings in the benchmark files from ambiguous use of new Array(n) where intent is pre-allocation, not a single-element array.

Changes

  • benchmarks/memory-bench.mjs, benchmarks/bench-fastdiff.mjs: Replace new Array(lines.length) with Array.from({ length: lines.length }) to make the pre-allocation intent explicit.
// Before
const out = new Array(lines.length);

// After
const out = Array.from({ length: lines.length });

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@vercel

vercel Bot commented Mar 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fast Error Error Mar 9, 2026 10:35pm

Request Review

Co-authored-by: cuquo <31081+cuquo@users.noreply.github.com>
Co-authored-by: cuquo <31081+cuquo@users.noreply.github.com>
Copilot AI changed the title [WIP] Check code syntax for errors Fix no-new-array lint warnings in benchmark files Mar 9, 2026
Copilot finished work on behalf of cuquo March 9, 2026 22:36
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.

2 participants