From 50e06c64fa393b34731daf1c0f834ed5beceec2b Mon Sep 17 00:00:00 2001 From: JavaTypedScript Date: Mon, 1 Dec 2025 11:36:52 +0000 Subject: [PATCH 1/4] chore: fix JavaScript lint errors (issue #8670) --- 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: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - 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 --- --- .../jsdoc-list-item-bullet-indent/lib/main.js | 40 +++++++++---------- .../lib/commands/last_fragment.js | 18 ++++----- .../@stdlib/utils/timeit/lib/main.js | 10 ++++- 3 files changed, 37 insertions(+), 31 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-list-item-bullet-indent/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-list-item-bullet-indent/lib/main.js index bd849f43b15c..7ae4e113e0f6 100644 --- a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-list-item-bullet-indent/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-list-item-bullet-indent/lib/main.js @@ -39,6 +39,26 @@ var rule; // FUNCTIONS // +/** +* Copies AST node location info. +* +* @private +* @param {Object} loc - AST node location +* @returns {Object} copied location info +*/ +function copyLocationInfo( loc ) { + return { + 'start': { + 'line': loc.start.line, + 'column': loc.start.column + }, + 'end': { + 'line': loc.end.line, + 'column': loc.end.column + } + }; +} + /** * Rule to prevent unnecessary indentation of Markdown list item bullets in JSDoc descriptions. * @@ -112,26 +132,6 @@ function main( context ) { } } - /** - * Copies AST node location info. - * - * @private - * @param {Object} loc - AST node location - * @returns {Object} copied location info - */ - function copyLocationInfo( loc ) { - return { - 'start': { - 'line': loc.start.line, - 'column': loc.start.column - }, - 'end': { - 'line': loc.end.line, - 'column': loc.end.column - } - }; - } - /** * Reports an error message. * diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/last_fragment.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/last_fragment.js index 73edc2eb709c..f75d069bdad2 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/last_fragment.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/last_fragment.js @@ -30,6 +30,15 @@ function command( pres ) { return onCommand; + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + pres.lastFragment().show(); + } + /** * Jumps to the last fragment of the current slide. * @@ -37,15 +46,6 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle - - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.lastFragment().show(); - } } } diff --git a/lib/node_modules/@stdlib/utils/timeit/lib/main.js b/lib/node_modules/@stdlib/utils/timeit/lib/main.js index d01fa47ac075..e705d19b6539 100644 --- a/lib/node_modules/@stdlib/utils/timeit/lib/main.js +++ b/lib/node_modules/@stdlib/utils/timeit/lib/main.js @@ -35,7 +35,8 @@ var transform = require( './transform.js' ); // VARIABLES // -var FILENAME = 'timeit.js'; +// cspell:ignore timeit +var FILENAME = 'timeit.js'; // filename var MIN_TIME = 0.1; // seconds var ITERATIONS = 10; // 10^1 var MAX_ITERATIONS = 10000000000; // 10^10 @@ -83,6 +84,7 @@ function timeit( code, options, clbk ) { var err; var idx; var cb; + var i; if ( !isString( code ) ) { throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', code ) ); @@ -100,7 +102,10 @@ function timeit( code, options, clbk ) { if ( !isFunction( cb ) ) { throw new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', cb ) ); } - results = new Array( opts.repeats ); + results = [ ]; + for ( i = 0; i < opts.repeats; i++ ) { + results[ i ] = 0; + } dir = cwd(); idx = 0; @@ -213,6 +218,7 @@ function timeit( code, options, clbk ) { if ( !error ) { out = transform( results, opts.iterations ); } + // cspell:ignore zalgo // Avoid releasing the zalgo: nextTick( onTick ); From 4711b9e270111f52255c6d1f3890072475bc4dac Mon Sep 17 00:00:00 2001 From: JavaTypedScript Date: Mon, 1 Dec 2025 12:18:53 +0000 Subject: [PATCH 2/4] chore: fix JavaScript lint errors (issue #8670) --- 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: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - 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 --- --- lib/node_modules/@stdlib/utils/timeit/lib/main.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/node_modules/@stdlib/utils/timeit/lib/main.js b/lib/node_modules/@stdlib/utils/timeit/lib/main.js index e705d19b6539..764e1ce845dd 100644 --- a/lib/node_modules/@stdlib/utils/timeit/lib/main.js +++ b/lib/node_modules/@stdlib/utils/timeit/lib/main.js @@ -35,7 +35,6 @@ var transform = require( './transform.js' ); // VARIABLES // -// cspell:ignore timeit var FILENAME = 'timeit.js'; // filename var MIN_TIME = 0.1; // seconds var ITERATIONS = 10; // 10^1 @@ -218,7 +217,6 @@ function timeit( code, options, clbk ) { if ( !error ) { out = transform( results, opts.iterations ); } - // cspell:ignore zalgo // Avoid releasing the zalgo: nextTick( onTick ); From 7b2551644ce1e351e8c7d528d2f12c87f7e55ce2 Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 1 Dec 2025 18:37:48 -0800 Subject: [PATCH 3/4] docs: remove comment Signed-off-by: Athan --- lib/node_modules/@stdlib/utils/timeit/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/utils/timeit/lib/main.js b/lib/node_modules/@stdlib/utils/timeit/lib/main.js index 764e1ce845dd..30aedff9435a 100644 --- a/lib/node_modules/@stdlib/utils/timeit/lib/main.js +++ b/lib/node_modules/@stdlib/utils/timeit/lib/main.js @@ -35,7 +35,7 @@ var transform = require( './transform.js' ); // VARIABLES // -var FILENAME = 'timeit.js'; // filename +var FILENAME = 'timeit.js'; var MIN_TIME = 0.1; // seconds var ITERATIONS = 10; // 10^1 var MAX_ITERATIONS = 10000000000; // 10^10 From 0f64a9c923e28dcc7ac8a4ac8a8004a5061f619a Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 1 Dec 2025 18:39:50 -0800 Subject: [PATCH 4/4] refactor: use base array utility Signed-off-by: Athan --- lib/node_modules/@stdlib/utils/timeit/lib/main.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/utils/timeit/lib/main.js b/lib/node_modules/@stdlib/utils/timeit/lib/main.js index 30aedff9435a..8fff2e200277 100644 --- a/lib/node_modules/@stdlib/utils/timeit/lib/main.js +++ b/lib/node_modules/@stdlib/utils/timeit/lib/main.js @@ -27,6 +27,7 @@ var copy = require( '@stdlib/utils/copy' ); var cwd = require( '@stdlib/process/cwd' ); var format = require( '@stdlib/string/format' ); var nextTick = require( '@stdlib/utils/next-tick' ); +var nulls = require( '@stdlib/array/base/nulls' ); var defaults = require( './defaults.json' ); var validate = require( './validate.js' ); var evaluate = require( './vm_evaluate.js' ); @@ -83,7 +84,6 @@ function timeit( code, options, clbk ) { var err; var idx; var cb; - var i; if ( !isString( code ) ) { throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', code ) ); @@ -101,10 +101,7 @@ function timeit( code, options, clbk ) { if ( !isFunction( cb ) ) { throw new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', cb ) ); } - results = [ ]; - for ( i = 0; i < opts.repeats; i++ ) { - results[ i ] = 0; - } + results = nulls( opts.repeats ); dir = cwd(); idx = 0;