From c859dcc84c456775f70eb272e385b8b74b0c575a Mon Sep 17 00:00:00 2001 From: Baixiaochun Date: Wed, 18 Mar 2026 08:56:34 +0800 Subject: [PATCH] chore: fix JavaScript lint errors (issue #11014) Replace `new Array()` constructor with array literal to comply with stdlib/no-new-array ESLint rule. - is-biguint64array/examples/index.js: replace new Array(10) with array literal - acoversin-by/test/test.main.js: replace new Array(5) with [] + length assignment for sparse arrays --- .../@stdlib/assert/is-biguint64array/examples/index.js | 2 +- .../math/strided/special/acoversin-by/test/test.main.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/assert/is-biguint64array/examples/index.js b/lib/node_modules/@stdlib/assert/is-biguint64array/examples/index.js index b3232562f791..4b1a656249ee 100644 --- a/lib/node_modules/@stdlib/assert/is-biguint64array/examples/index.js +++ b/lib/node_modules/@stdlib/assert/is-biguint64array/examples/index.js @@ -74,7 +74,7 @@ bool = isBigUint64Array( new Float32Array( 10 ) ); console.error( bool ); // => false -bool = isBigUint64Array( new Array( 10 ) ); +bool = isBigUint64Array( [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ); console.error( bool ); // => false diff --git a/lib/node_modules/@stdlib/math/strided/special/acoversin-by/test/test.main.js b/lib/node_modules/@stdlib/math/strided/special/acoversin-by/test/test.main.js index 34e5907d4656..74e95894cece 100644 --- a/lib/node_modules/@stdlib/math/strided/special/acoversin-by/test/test.main.js +++ b/lib/node_modules/@stdlib/math/strided/special/acoversin-by/test/test.main.js @@ -74,7 +74,8 @@ tape( 'the function computes the inverse coversed sine via a callback function', acoversinBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = []; + x.length = 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,7 +83,8 @@ tape( 'the function computes the inverse coversed sine via a callback function', acoversinBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = []; + x.length = 5; // sparse array x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];