Skip to content

Commit 09e7258

Browse files
committed
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 ---
1 parent c11b35c commit 09e7258

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

  • lib/node_modules/@stdlib
    • math/strided/special/besselj1-by/test
    • strided/common/examples/addon-napi-polymorphic

lib/node_modules/@stdlib/math/strided/special/besselj1-by/test/test.main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,17 @@ tape( 'the function computes the Bessel function of the first kind of order one
7474
besselj1By( x.length, x, 1, y, 1, accessor );
7575
t.deepEqual( y, expected, 'deep equal' );
7676

77-
x = new Array( 5 ); // sparse array
77+
x = [];
78+
x.length = 5; // sparse array
7879
y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];
7980

8081
expected = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];
8182

8283
besselj1By( x.length, x, 1, y, 1, accessor );
8384
t.deepEqual( y, expected, 'deep equal' );
8485

85-
x = new Array( 5 ); // sparse array
86+
x = [];
87+
x.length = 5; // sparse array
8688
x[ 2 ] = rand();
8789
y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];
8890

lib/node_modules/@stdlib/strided/common/examples/addon-napi-polymorphic/index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@
1818

1919
'use strict';
2020

21-
var join = require( 'path' ).join;
22-
var tryRequire = require( '@stdlib/utils/try-require' );
2321
var Float64Array = require( '@stdlib/array/float64' );
2422
var Float32Array = require( '@stdlib/array/float32' );
2523

24+
var add;
25+
2626
// Try loading the add-on:
27-
var add = tryRequire( join( __dirname, 'addon.node' ) );
27+
try {
28+
add = require( './addon.node' );
29+
} catch ( err ) {
30+
add = err;
31+
}
2832

2933
/**
3034
* Main execution sequence.

0 commit comments

Comments
 (0)