chore: fix JavaScript lint errors (issue #10708)#10999
chore: fix JavaScript lint errors (issue #10708)#10999Sumithraju wants to merge 1 commit intostdlib-js:developfrom
Conversation
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Coverage Report
The above coverage report was generated for the changes in this PR. |
Replace new Array() constructor with Array.from() to comply with stdlib/no-new-array linting rule. The change maintains identical functionality while adhering to coding standards. Fixes stdlib-js#10708 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
6f6fd50 to
c63a8e2
Compare
|
Ref: #10710 |
|
Thank you for working on this pull request. However, we cannot accept your contribution as the issue this pull request seeks to resolve has already been addressed in a different pull request or commit. Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions. |
Summary
Replace
new Array()constructor withArray.from()to comply with thestdlib/no-new-arraylinting rule. The change maintains identical functionality while adhering to coding standards.Fixes #10708
Description
This pull request addresses a JavaScript linting error identified in issue #10708. The
stdlib/no-new-arrayrule discourages using thenew Array()constructor in favor of standard array creation methods.Changes Made
lib/node_modules/@stdlib/ndarray/fancy/test/test.instance.tostring.jsnew Array( 1e4 )→Array.from( { length: 1e4 } )Type of Change
Testing
No functional changes required testing. The array construction method was updated but behavior remains identical.
AI Assistance
AI Disclosure
"This PR was authored with AI assistance. AI identified the linting violation, implemented the fix using
Array.from(), and verified compliance with stdlib standards. The proposed change maintains identical functionality and follows all contribution guidelines."Checklist