From 85d9595b8508fa918e290f869c6a1436e8ae61f9 Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Wed, 11 Feb 2026 10:58:49 +0530 Subject: [PATCH] chore: fix jslint errors --- 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/main.js | 40 +++++++++---------- .../scripts/build.js | 5 ++- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-no-shortcut-reference-image/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-no-shortcut-reference-image/lib/main.js index 7e2fcf6a3ca2..255d2f91179b 100644 --- a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-no-shortcut-reference-image/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-no-shortcut-reference-image/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 shortcut Markdown reference images from being used 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/datasets/cdc-nchs-us-infant-mortality-bw-1915-2013/scripts/build.js b/lib/node_modules/@stdlib/datasets/cdc-nchs-us-infant-mortality-bw-1915-2013/scripts/build.js index afd93538747e..ffc0e70e5f7e 100644 --- a/lib/node_modules/@stdlib/datasets/cdc-nchs-us-infant-mortality-bw-1915-2013/scripts/build.js +++ b/lib/node_modules/@stdlib/datasets/cdc-nchs-us-infant-mortality-bw-1915-2013/scripts/build.js @@ -24,6 +24,7 @@ var resolve = require( 'path' ).resolve; var readFile = require( '@stdlib/fs/read-file' ).sync; var writeFile = require( '@stdlib/fs/write-file' ).sync; var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP; +var format = require( '@stdlib/string/format' ); // VARIABLES // @@ -66,7 +67,7 @@ function main() { for ( i = 0; i < data.length; i++ ) { d = data[ i ].split( ',' ); if ( d.length !== fields.length ) { - throw new Error( 'unexpected error. Number of row values ('+d.length+') does not match the expected number of fields ('+fields.length+').' ); + throw new Error( format( 'unexpected error. Number of row values (%d) does not match the expected number of fields (%d).', d.length, fields.length ) ); } for ( j = 1; j < d.length; j++ ) { d[ j ] = parseFloat( d[ j ] ); @@ -86,7 +87,7 @@ function main() { } else if ( d[ 0 ] === 'white' ) { json.white.push( d[ 2 ] ); } else { - throw new Error( 'unexpected error. Unrecognized race: `'+d[2]+'`.' ); + throw new Error( format( 'unexpected error. Unrecognized race: `%s`.', d[ 0 ] ) ); } } if ( json.black.length !== json.white.length ) {