From 1f9305e6332dd6146cc1170811e876995168151c Mon Sep 17 00:00:00 2001 From: Matt Van Horn Date: Tue, 21 Apr 2026 02:47:00 -0700 Subject: [PATCH 1/2] chore: fix JavaScript lint errors (issue #11685) Replace 'new Array( 5 )' with array literals of 5 'void 0' values in the 'math/strided/special/sin-by' ndarray test. The accessor short-circuits on 'v === void 0', so empty slots and explicit undefined slots produce identical sinBy output -- the test semantics are preserved while satisfying the 'stdlib/no-new-array' rule. PR-URL: https://github.com/stdlib-js/stdlib/pull/ Resolves: https://github.com/stdlib-js/stdlib/issues/11685 --- .../@stdlib/math/strided/special/sin-by/test/test.ndarray.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/sin-by/test/test.ndarray.js b/lib/node_modules/@stdlib/math/strided/special/sin-by/test/test.ndarray.js index bc7e1c60e7d3..826173f356a2 100644 --- a/lib/node_modules/@stdlib/math/strided/special/sin-by/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/math/strided/special/sin-by/test/test.ndarray.js @@ -73,7 +73,7 @@ tape( 'the function computes the sine of each indexed strided array element via sinBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = [ void 0, void 0, void 0, void 0, void 0 ]; y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; expected = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; @@ -81,7 +81,7 @@ tape( 'the function computes the sine of each indexed strided array element via sinBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = [ void 0, void 0, void 0, void 0, void 0 ]; x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; From 5938437746d1dc69d686861e98d067023126addd Mon Sep 17 00:00:00 2001 From: Athan Date: Tue, 21 Apr 2026 03:33:46 -0700 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../math/strided/special/sin-by/test/test.ndarray.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/sin-by/test/test.ndarray.js b/lib/node_modules/@stdlib/math/strided/special/sin-by/test/test.ndarray.js index 826173f356a2..b714db290f1e 100644 --- a/lib/node_modules/@stdlib/math/strided/special/sin-by/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/math/strided/special/sin-by/test/test.ndarray.js @@ -73,7 +73,8 @@ tape( 'the function computes the sine of each indexed strided array element via sinBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = [ void 0, void 0, void 0, void 0, void 0 ]; + // 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 ]; @@ -81,7 +82,8 @@ tape( 'the function computes the sine of each indexed strided array element via sinBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = [ void 0, void 0, void 0, void 0, void 0 ]; + // 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 ];