Conversation
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().
This branch has not been deployed
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.
Resolves #15414.
Description
This pull request:
stdlib/no-new-arrayflagslib/node_modules/@stdlib/_tools/makie/plugins/makie-view-complexity/lib/main.js:92, which builds thespawn()argument list withnew Array( 1 )and then assigns index0.push, which is what the rule asks for and what every sibling plugin in_tools/makie/pluginsalready does —makie-list-pkgs-names,makie-lint-python,makie-lint-typescript-declarationsandmakie-benchmark-langall readargs = [];followed by a// Target:comment andargs.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 reachesspawn( 'make', args, opts ).Related Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
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
makieplugins to find the establishedargs = []; args.push( ... )shape, and applied that shape.@stdlib-js/reviewers