From b9c5bcc5193efd5d2f92005afce9c5de4021b0b7 Mon Sep 17 00:00:00 2001 From: ShreelaxmiHegde Date: Mon, 29 Dec 2025 06:59:11 +0000 Subject: [PATCH 1/2] chore: fix 'new Array()' js lint error (issue #9419) --- .../@stdlib/math/strided/special/abs-by/test/test.main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/abs-by/test/test.main.js b/lib/node_modules/@stdlib/math/strided/special/abs-by/test/test.main.js index 9808f30b8ba5..039f1e5d4312 100644 --- a/lib/node_modules/@stdlib/math/strided/special/abs-by/test/test.main.js +++ b/lib/node_modules/@stdlib/math/strided/special/abs-by/test/test.main.js @@ -62,7 +62,7 @@ tape( 'the function computes the absolute value of each indexed strided array el absBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = [ , , , , , ]; // sparse array of size 5 y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; expected = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; @@ -70,7 +70,7 @@ tape( 'the function computes the absolute value of each indexed strided array el absBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = [ , , , , , ]; // sparse array of size 5 x[ 2 ] = -3.0; y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; From 05ebbe7db22eba3ea9df02584fc1b43c91f5d2bb Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 29 Dec 2025 23:19:22 -0800 Subject: [PATCH 2/2] style: disable lint rule Signed-off-by: Athan --- .../@stdlib/math/strided/special/abs-by/test/test.main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/abs-by/test/test.main.js b/lib/node_modules/@stdlib/math/strided/special/abs-by/test/test.main.js index 039f1e5d4312..6fa709075d3b 100644 --- a/lib/node_modules/@stdlib/math/strided/special/abs-by/test/test.main.js +++ b/lib/node_modules/@stdlib/math/strided/special/abs-by/test/test.main.js @@ -62,7 +62,8 @@ tape( 'the function computes the absolute value of each indexed strided array el absBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = [ , , , , , ]; // sparse array of size 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 ]; @@ -70,7 +71,8 @@ tape( 'the function computes the absolute value of each indexed strided array el absBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = [ , , , , , ]; // sparse array of size 5 + // eslint-disable-next-line stdlib/no-new-array + x = new Array( 5 ); // sparse array x[ 2 ] = -3.0; y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];