Skip to content

chore: fix JavaScript lint errors (issue #15414) - #15471

Open
Abhist17 wants to merge 1 commit into
stdlib-js:developfrom
Abhist17:chore/fix-makie-view-complexity-lint-15414
Open

Abhist17 wants to merge 1 commit into
stdlib-js:developfrom
Abhist17:chore/fix-makie-view-complexity-lint-15414

Conversation

@Abhist17

Copy link
Copy Markdown
Contributor

Resolves #15414.

Description

What is the purpose of this pull request?

This pull request:

  • Fixes the JavaScript lint failure reported in Fix JavaScript lint errors #15414. stdlib/no-new-array flags lib/node_modules/@stdlib/_tools/makie/plugins/makie-view-complexity/lib/main.js:92, which builds the spawn() argument list with new Array( 1 ) and then assigns index 0.
  • Switches that construction to an array literal plus push, which is what the rule asks for and what every sibling plugin in _tools/makie/plugins already does — makie-list-pkgs-names, makie-lint-python, makie-lint-typescript-declarations and makie-benchmark-lang all read args = []; followed by a // Target: comment and args.push( '<target>' );. This plugin was the odd one out, so the fix removes an inconsistency rather than suppressing the rule.

Behaviour is unchanged: a one-element array holding 'view-complexity' is still what reaches spawn( 'make', args, opts ).

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was written by Claude Code. It read the failing rule and line out of the CI log in #15414, compared the offending plugin against the other makie plugins to find the established args = []; args.push( ... ) shape, and applied that shape.


@stdlib-js/reviewers

The makie-view-complexity plugin builds its spawn arguments with
new Array( 1 ) and then assigns index 0, which trips stdlib/no-new-array.
Every sibling plugin in _tools/makie/plugins already builds the same
argument list as an array literal plus push -- makie-list-pkgs-names,
makie-lint-python and makie-benchmark-lang all read

    args = [];

    // Target:
    args.push( '<target>' );

so switch this plugin to the same shape rather than suppressing the
rule. Behaviour is unchanged: a one-element array holding
'view-complexity' is still what reaches spawn().
@Abhist17
Abhist17 requested a review from a team September 23, 2026 19:34
@stdlib-bot stdlib-bot added Tools Issue or pull request related to project tooling. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Sep 23, 2026

This branch has not been deployed

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

Labels

Good First PR A pull request resolving a Good First Issue. Needs Review A pull request which needs code review. Tools Issue or pull request related to project tooling.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix JavaScript lint errors

2 participants