From 4c9d360ef812df8c155dfdb9bce0451276df97f5 Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Thu, 22 Jan 2026 12:43:17 +0530 Subject: [PATCH] fix: javascript lint errors and warnings --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../inmap/benchmark/benchmark.factory.js | 11 ++++---- .../utils/async/inmap/benchmark/benchmark.js | 25 ++++++++++--------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/lib/node_modules/@stdlib/utils/async/inmap/benchmark/benchmark.factory.js b/lib/node_modules/@stdlib/utils/async/inmap/benchmark/benchmark.factory.js index 025974535f73..37cfe2c941f2 100644 --- a/lib/node_modules/@stdlib/utils/async/inmap/benchmark/benchmark.factory.js +++ b/lib/node_modules/@stdlib/utils/async/inmap/benchmark/benchmark.factory.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,13 +22,14 @@ var bench = require( '@stdlib/bench' ); var EPS = require( '@stdlib/constants/float64/eps' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var factory = require( './../lib/factory.js' ); // MAIN // -bench( pkg+':factory', function benchmark( b ) { +bench( format( '%s:factory', pkg ), function benchmark( b ) { var inmapAsync; var arr; var len; @@ -40,10 +41,10 @@ bench( pkg+':factory', function benchmark( b ) { clbk( null, v*i ); } } - arr = new Array( 100 ); - len = arr.length; + arr = []; + len = 100; for ( i = 0; i < len; i++ ) { - arr[ i ] = EPS; + arr.push( EPS ); } inmapAsync = factory( onItem ); diff --git a/lib/node_modules/@stdlib/utils/async/inmap/benchmark/benchmark.js b/lib/node_modules/@stdlib/utils/async/inmap/benchmark/benchmark.js index 07c2fc318e4d..f27c2163ee34 100644 --- a/lib/node_modules/@stdlib/utils/async/inmap/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/utils/async/inmap/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ var bench = require( '@stdlib/bench' ); var EPS = require( '@stdlib/constants/float64/eps' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var inmapAsync = require( './../lib' ); @@ -39,10 +40,10 @@ bench( pkg, function benchmark( b ) { clbk( null, v*i ); } } - arr = new Array( 100 ); - len = arr.length; + arr = []; + len = 100; for ( i = 0; i < len; i++ ) { - arr[ i ] = EPS; + arr.push( EPS ); } i = 0; b.tic(); @@ -64,7 +65,7 @@ bench( pkg, function benchmark( b ) { } }); -bench( pkg+':series=true', function benchmark( b ) { +bench( format( '%s:series=true', pkg ), function benchmark( b ) { var opts; var arr; var len; @@ -79,10 +80,10 @@ bench( pkg+':series=true', function benchmark( b ) { opts = { 'series': true }; - arr = new Array( 100 ); - len = arr.length; + arr = []; + len = 100; for ( i = 0; i < len; i++ ) { - arr[ i ] = EPS; + arr.push( EPS ); } i = 0; b.tic(); @@ -104,7 +105,7 @@ bench( pkg+':series=true', function benchmark( b ) { } }); -bench( pkg+':limit=3', function benchmark( b ) { +bench( format( '%s:limit=3', pkg ), function benchmark( b ) { var opts; var arr; var len; @@ -119,10 +120,10 @@ bench( pkg+':limit=3', function benchmark( b ) { opts = { 'limit': 3 }; - arr = new Array( 100 ); - len = arr.length; + arr = []; + len = 100; for ( i = 0; i < len; i++ ) { - arr[ i ] = EPS; + arr.push( EPS ); } i = 0; b.tic();