chore: fix JavaScript lint errors (issue #10708)#10999
Open
Sumithraju wants to merge 1 commit intostdlib-js:developfrom
Open
chore: fix JavaScript lint errors (issue #10708)#10999Sumithraju wants to merge 1 commit intostdlib-js:developfrom
Sumithraju wants to merge 1 commit intostdlib-js:developfrom
Conversation
Contributor
|
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! |
Contributor
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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