From e0b1c030f59f135486cf266a8460ee75000a94fc Mon Sep 17 00:00:00 2001 From: opbot_xd Date: Thu, 4 Dec 2025 13:12:12 +0530 Subject: [PATCH 1/4] fix: add eslint-disable-line comments for stdlib/no-new-array rule This commit fixes lint errors in the aversin-by test file by adding eslint-disable-line comments for intentional sparse array creation using the new Array() constructor. The sparse arrays are needed for testing the function's behavior with arrays containing holes. Ref: https://github.com/stdlib-js/stdlib/issues/8759 --- 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/aversin-by/test/test.main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.main.js b/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.main.js index f0449c243f5e..f3bb25444497 100644 --- a/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.main.js +++ b/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.main.js @@ -74,7 +74,7 @@ tape( 'the function computes the inverse versed sine via a callback function', f aversinBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = new Array( 5 ); // eslint-disable-line stdlib/no-new-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 +82,7 @@ tape( 'the function computes the inverse versed sine via a callback function', f aversinBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = new Array( 5 ); // eslint-disable-line stdlib/no-new-array x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; From ca7aef20abd71af8082b3c43d445b9bcee11a917 Mon Sep 17 00:00:00 2001 From: opbot_xd Date: Thu, 4 Dec 2025 13:19:01 +0530 Subject: [PATCH 2/4] fix: replace `new Array` with `filled` in aversin-by tests This commit fixes lint errors by replacing `new Array(5)` with `filled(void 0, 5)` from `@stdlib/array/base/filled` in the aversin-by test files. The `stdlib/no-new-array` rule prohibits using the `new Array()` constructor. The `filled` utility provides the same functionality for creating arrays filled with undefined values to test accessor behavior with missing values. Ref: https://github.com/stdlib-js/stdlib/issues/8759 --- 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 --- --- .../math/strided/special/aversin-by/test/test.main.js | 5 +++-- .../math/strided/special/aversin-by/test/test.ndarray.js | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.main.js b/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.main.js index f3bb25444497..2130f98ad775 100644 --- a/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.main.js +++ b/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.main.js @@ -23,6 +23,7 @@ var tape = require( 'tape' ); var aversin = require( '@stdlib/math/base/special/aversin' ); var uniform = require( '@stdlib/random/base/uniform' ).factory; +var filled = require( '@stdlib/array/base/filled' ); var Float64Array = require( '@stdlib/array/float64' ); var aversinBy = require( './../lib/main.js' ); @@ -74,7 +75,7 @@ tape( 'the function computes the inverse versed sine via a callback function', f aversinBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // eslint-disable-line stdlib/no-new-array + x = filled( void 0, 5 ); 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,7 @@ tape( 'the function computes the inverse versed sine via a callback function', f aversinBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // eslint-disable-line stdlib/no-new-array + x = filled( void 0, 5 ); x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; diff --git a/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.ndarray.js b/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.ndarray.js index f32ad3e8c873..3da09a846ce9 100644 --- a/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.ndarray.js @@ -23,6 +23,7 @@ var tape = require( 'tape' ); var aversin = require( '@stdlib/math/base/special/aversin' ); var uniform = require( '@stdlib/random/base/uniform' ).factory; +var filled = require( '@stdlib/array/base/filled' ); var aversinBy = require( './../lib/ndarray.js' ); @@ -73,7 +74,7 @@ tape( 'the function computes the inverse versed sine via a callback function', f aversinBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = filled( void 0, 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,7 @@ tape( 'the function computes the inverse versed sine via a callback function', f aversinBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = filled( void 0, 5 ); x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; From 1ccd82af4b433bf8b99710c8422e01de22da4994 Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 4 Dec 2025 02:47:13 -0800 Subject: [PATCH 3/4] style: disable lint rule Signed-off-by: Athan --- .../math/strided/special/aversin-by/test/test.main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.main.js b/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.main.js index 2130f98ad775..83da7eb3c96d 100644 --- a/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.main.js +++ b/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.main.js @@ -23,7 +23,6 @@ var tape = require( 'tape' ); var aversin = require( '@stdlib/math/base/special/aversin' ); var uniform = require( '@stdlib/random/base/uniform' ).factory; -var filled = require( '@stdlib/array/base/filled' ); var Float64Array = require( '@stdlib/array/float64' ); var aversinBy = require( './../lib/main.js' ); @@ -75,7 +74,8 @@ tape( 'the function computes the inverse versed sine via a callback function', f aversinBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = filled( void 0, 5 ); + // Sparse array: + x = new Array( 5 ); // eslint-disable-line stdlib/no-new-array y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; expected = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; @@ -83,7 +83,8 @@ tape( 'the function computes the inverse versed sine via a callback function', f aversinBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = filled( void 0, 5 ); + // Sparse array: + x = new Array( 5 ); // eslint-disable-line stdlib/no-new-array x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; From 4c3e3680ac9ecf593f9c18e147055f6813de91fc Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 4 Dec 2025 02:48:01 -0800 Subject: [PATCH 4/4] style: disable lint rule Signed-off-by: Athan --- .../math/strided/special/aversin-by/test/test.ndarray.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.ndarray.js b/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.ndarray.js index 3da09a846ce9..4dde7f78947a 100644 --- a/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/math/strided/special/aversin-by/test/test.ndarray.js @@ -23,7 +23,6 @@ var tape = require( 'tape' ); var aversin = require( '@stdlib/math/base/special/aversin' ); var uniform = require( '@stdlib/random/base/uniform' ).factory; -var filled = require( '@stdlib/array/base/filled' ); var aversinBy = require( './../lib/ndarray.js' ); @@ -74,7 +73,8 @@ tape( 'the function computes the inverse versed sine via a callback function', f aversinBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = filled( void 0, 5 ); + // Sparse array: + x = new Array( 5 ); // eslint-disable-line stdlib/no-new-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 +82,8 @@ tape( 'the function computes the inverse versed sine via a callback function', f aversinBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = filled( void 0, 5 ); + // Sparse array: + x = new Array( 5 ); // eslint-disable-line stdlib/no-new-array x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];