From 09e72586408127f50bc2f4bb5b48b28c911b7374 Mon Sep 17 00:00:00 2001 From: nnyouung Date: Sun, 18 Jan 2026 11:10:42 +0900 Subject: [PATCH] chore: fix JavaScript lint errors Resolve ESLint rule violations in example and test files. Fixes: #9812 --- 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: passed - 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/besselj1-by/test/test.main.js | 6 ++++-- .../common/examples/addon-napi-polymorphic/index.js | 10 +++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/besselj1-by/test/test.main.js b/lib/node_modules/@stdlib/math/strided/special/besselj1-by/test/test.main.js index 8607bbb9c32f..33fc3f324a41 100644 --- a/lib/node_modules/@stdlib/math/strided/special/besselj1-by/test/test.main.js +++ b/lib/node_modules/@stdlib/math/strided/special/besselj1-by/test/test.main.js @@ -74,7 +74,8 @@ tape( 'the function computes the Bessel function of the first kind of order one besselj1By( 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 Bessel function of the first kind of order one besselj1By( 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 ]; diff --git a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js index ff6a86a85ddb..ab25eebc9955 100644 --- a/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js +++ b/lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js @@ -18,13 +18,17 @@ 'use strict'; -var join = require( 'path' ).join; -var tryRequire = require( '@stdlib/utils/try-require' ); var Float64Array = require( '@stdlib/array/float64' ); var Float32Array = require( '@stdlib/array/float32' ); +var add; + // Try loading the add-on: -var add = tryRequire( join( __dirname, 'addon.node' ) ); +try { + add = require( './addon.node' ); +} catch ( err ) { + add = err; +} /** * Main execution sequence.