Skip to content

Commit d2abc6a

Browse files
committed
fix(_tools/lint/namespace-aliases): replace new Array() with []
The `lint_random_files` scheduled job (`Lint JavaScript files`) failed at 2026-05-17 00:32 UTC when `resolve.js` was selected for linting. Root cause: `out = new Array( len )` at line 53 violates the `stdlib/no-new-array` ESLint rule. All indices 0..len-1 are set explicitly in the synchronous for-loop before any async callback runs, so replacing the constructor call with an empty array literal `[]` is functionally equivalent. This commit makes that substitution. Ref: https://github.com/stdlib-js/stdlib/actions/runs/25976689223
1 parent 253d30f commit d2abc6a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • lib/node_modules/@stdlib/_tools/lint/namespace-aliases/lib

lib/node_modules/@stdlib/_tools/lint/namespace-aliases/lib/resolve.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function getPkgs( pkgs, dir, clbk ) {
5050
len = pkgs.length;
5151
debug( 'Resolving %d packages...', len );
5252

53-
out = new Array( len );
53+
out = [];
5454
count = 0;
5555
for ( i = 0; i < len; i++ ) {
5656
debug( 'Resolving package: %s (%d of %d).', pkgs[ i ], i+1, len );

0 commit comments

Comments
 (0)