From e9470ea41a43429fe55cc4a09cf2cbae5276fcae Mon Sep 17 00:00:00 2001 From: Partha Das Date: Sat, 28 Feb 2026 01:26:12 +0000 Subject: [PATCH 1/2] chore: fix JavaScript lint errors (issue #10556) --- 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: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - 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 --- --- .../math/strided/special/ahavercos-by/test/test.ndarray.js | 6 ++++-- .../@stdlib/utils/async/for-each-right/examples/index.js | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/ahavercos-by/test/test.ndarray.js b/lib/node_modules/@stdlib/math/strided/special/ahavercos-by/test/test.ndarray.js index 5fe25d5d4bcf..56fe3b901a17 100644 --- a/lib/node_modules/@stdlib/math/strided/special/ahavercos-by/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/math/strided/special/ahavercos-by/test/test.ndarray.js @@ -73,7 +73,8 @@ tape( 'the function computes the inverse half-value versed cosine via a callback ahavercosBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = []; // sparse array + x.length = 5; y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; expected = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; @@ -81,7 +82,8 @@ tape( 'the function computes the inverse half-value versed cosine via a callback ahavercosBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = []; // sparse array + x.length = 5; x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; diff --git a/lib/node_modules/@stdlib/utils/async/for-each-right/examples/index.js b/lib/node_modules/@stdlib/utils/async/for-each-right/examples/index.js index f7c6af918f09..1f1328b59a22 100644 --- a/lib/node_modules/@stdlib/utils/async/for-each-right/examples/index.js +++ b/lib/node_modules/@stdlib/utils/async/for-each-right/examples/index.js @@ -20,6 +20,7 @@ var resolve = require( 'path' ).resolve; var readFile = require( '@stdlib/fs/read-file' ); +var format = require( '@stdlib/string/format' ); var forEachRightAsync = require( './../lib' ); var files = [ @@ -42,7 +43,7 @@ function read( file, next ) { function onFile( error ) { if ( error ) { - error = new Error( 'unable to read file: '+file ); + error = new Error( format( 'unable to read file: %s', file ) ); return next( error ); } console.log( 'Successfully read file: %s', file ); From b69ed9a8cdde4002095c9b9f0aa9b6bf70c74cca Mon Sep 17 00:00:00 2001 From: Athan Date: Sat, 28 Feb 2026 02:38:27 -0800 Subject: [PATCH 2/2] style: disable lint rule Signed-off-by: Athan --- .../strided/special/ahavercos-by/test/test.ndarray.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/ahavercos-by/test/test.ndarray.js b/lib/node_modules/@stdlib/math/strided/special/ahavercos-by/test/test.ndarray.js index 56fe3b901a17..c4d87d859240 100644 --- a/lib/node_modules/@stdlib/math/strided/special/ahavercos-by/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/math/strided/special/ahavercos-by/test/test.ndarray.js @@ -73,8 +73,8 @@ tape( 'the function computes the inverse half-value versed cosine via a callback ahavercosBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = []; // sparse array - x.length = 5; + // eslint-disable-next-line stdlib/no-new-array + x = new Array( 5 ); // sparse array y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; expected = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; @@ -82,8 +82,8 @@ tape( 'the function computes the inverse half-value versed cosine via a callback ahavercosBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = []; // sparse array - x.length = 5; + // eslint-disable-next-line stdlib/no-new-array + x = new Array( 5 ); // sparse array x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];