From 3cf37dd553c0e149f5cb946f282eabffd89472e3 Mon Sep 17 00:00:00 2001 From: DankJugal Date: Thu, 25 Dec 2025 09:52:18 +0530 Subject: [PATCH 1/2] chore: fix JavaScript lint errors (issue #9356) --- 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: 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 --- --- .../@stdlib/math/strided/special/cos-by/test/test.main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/cos-by/test/test.main.js b/lib/node_modules/@stdlib/math/strided/special/cos-by/test/test.main.js index 1694e4ad6ddf..4f5b2bdae093 100644 --- a/lib/node_modules/@stdlib/math/strided/special/cos-by/test/test.main.js +++ b/lib/node_modules/@stdlib/math/strided/special/cos-by/test/test.main.js @@ -74,7 +74,8 @@ tape( 'the function computes the cosine via a callback function', function test( cosBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = []; + x.push( void 0, void 0, void 0, void 0, void 0 ); // 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,7 +83,8 @@ tape( 'the function computes the cosine via a callback function', function test( cosBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = []; + x.push( void 0, void 0, void 0, void 0, void 0 ); // sparse array x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; From 858546ba65ab581865d9bbf310df61d5fa0e9c45 Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 25 Dec 2025 01:31:50 -0800 Subject: [PATCH 2/2] style: disable lint rule Signed-off-by: Athan --- .../@stdlib/math/strided/special/cos-by/test/test.main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/cos-by/test/test.main.js b/lib/node_modules/@stdlib/math/strided/special/cos-by/test/test.main.js index 4f5b2bdae093..71123a8642f2 100644 --- a/lib/node_modules/@stdlib/math/strided/special/cos-by/test/test.main.js +++ b/lib/node_modules/@stdlib/math/strided/special/cos-by/test/test.main.js @@ -74,8 +74,8 @@ tape( 'the function computes the cosine via a callback function', function test( cosBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = []; - x.push( void 0, void 0, void 0, void 0, void 0 ); // sparse array + // 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 ]; @@ -83,8 +83,8 @@ tape( 'the function computes the cosine via a callback function', function test( cosBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = []; - x.push( void 0, void 0, void 0, void 0, void 0 ); // sparse array + // 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 ];