Skip to content

chore: fix JavaScript lint errors (issue #11082)#11086

Closed
fahimlisl wants to merge 1 commit intostdlib-js:developfrom
fahimlisl:fix/lint-no-new-array
Closed

chore: fix JavaScript lint errors (issue #11082)#11086
fahimlisl wants to merge 1 commit intostdlib-js:developfrom
fahimlisl:fix/lint-no-new-array

Conversation

@fahimlisl
Copy link

@fahimlisl fahimlisl commented Mar 22, 2026

Related Issues

resolves #11082

Description

Fixed a JavaScript linting failure detected in the automated lint
workflow. The stdlib/no-new-array rule disallows use of the new Array() constructor. Replaced the offending usage in deep_copy.js
with an array literal [], which is the idiomatic stdlib convention.

File changed:
lib/node_modules/@stdlib/utils/copy/lib/deep_copy.js

Change:
```javascript
// Before
ref = ( isArray( x ) ) ? new Array( x.length ) : {};

// After
ref = ( isArray( x ) ) ? [] : {};
```

Checklist

  • The fix addresses the lint error reported in the automated workflow
  • No unrelated files were modified
  • Commit message follows the project conventions
  • Read, understood, and followed the contributing guidelines

@stdlib-bot
Copy link
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:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

@stdlib-bot stdlib-bot added First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Needs Review A pull request which needs code review. labels Mar 22, 2026
@stdlib-bot
Copy link
Contributor

👋 Hi there! 👋

And thank you for opening your first pull request! We will review it shortly. 🏃 💨

Getting Started

Next Steps

  1. A project maintainer will approve GitHub Actions workflows for your PR.
  2. All CI checks must pass before your submission can be fully reviewed.
  3. You'll need to address any failures in linting or unit tests.

Running Tests Locally

You can use make to run any of the CI commands locally from the root directory of the stdlib repository:

# Run tests for all packages in the math namespace:
make test TESTS_FILTER=".*/@stdlib/math/.*"

# Run benchmarks for a specific package:
make benchmark BENCHMARKS_FILTER=".*/@stdlib/math/base/special/sin/.*"

If you haven't heard back from us within two weeks, please ping us by tagging the "reviewers" team in a comment on this PR.

If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members.

We appreciate your contribution!

Documentation Links

@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Mar 22, 2026
@fahimlisl
Copy link
Author

I have read the contributing guidelines and I agree to follow them.

@github-actions github-actions bot mentioned this pull request Mar 22, 2026
@stdlib-bot stdlib-bot added the Potential Duplicate There might be another pull request resolving the same issue. label Mar 23, 2026
@kgryte
Copy link
Member

kgryte commented Mar 23, 2026

Ref: #11083

@kgryte kgryte added autoclose: Already Resolved Pull request which should be auto-closed due proposed changes duplicating already included changes. and removed Needs Review A pull request which needs code review. labels Mar 23, 2026
@stdlib-bot
Copy link
Contributor

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.

@stdlib-bot stdlib-bot closed this Mar 23, 2026
@fahimlisl fahimlisl deleted the fix/lint-no-new-array branch March 23, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autoclose: Already Resolved Pull request which should be auto-closed due proposed changes duplicating already included changes. First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Good First PR A pull request resolving a Good First Issue. Potential Duplicate There might be another pull request resolving the same issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix JavaScript lint errors

3 participants