Skip to content

Commit a98984e

Browse files
authored
chore: fix lint errors
PR-URL: #10212 Closes: #10211 Reviewed-by: Philipp Burckhardt <[email protected]>
1 parent 9df57d4 commit a98984e

File tree

2 files changed

+23
-22
lines changed
  • lib/node_modules/@stdlib
    • _tools/eslint/rules/jsdoc-no-shortcut-reference-image/lib
    • datasets/cdc-nchs-us-infant-mortality-bw-1915-2013/scripts

2 files changed

+23
-22
lines changed

lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-no-shortcut-reference-image/lib/main.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,26 @@ var rule;
3939

4040
// FUNCTIONS //
4141

42+
/**
43+
* Copies AST node location info.
44+
*
45+
* @private
46+
* @param {Object} loc - AST node location
47+
* @returns {Object} copied location info
48+
*/
49+
function copyLocationInfo( loc ) {
50+
return {
51+
'start': {
52+
'line': loc.start.line,
53+
'column': loc.start.column
54+
},
55+
'end': {
56+
'line': loc.end.line,
57+
'column': loc.end.column
58+
}
59+
};
60+
}
61+
4262
/**
4363
* Rule to prevent shortcut Markdown reference images from being used in JSDoc descriptions.
4464
*
@@ -112,26 +132,6 @@ function main( context ) {
112132
}
113133
}
114134

115-
/**
116-
* Copies AST node location info.
117-
*
118-
* @private
119-
* @param {Object} loc - AST node location
120-
* @returns {Object} copied location info
121-
*/
122-
function copyLocationInfo( loc ) {
123-
return {
124-
'start': {
125-
'line': loc.start.line,
126-
'column': loc.start.column
127-
},
128-
'end': {
129-
'line': loc.end.line,
130-
'column': loc.end.column
131-
}
132-
};
133-
}
134-
135135
/**
136136
* Reports an error message.
137137
*

lib/node_modules/@stdlib/datasets/cdc-nchs-us-infant-mortality-bw-1915-2013/scripts/build.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ var resolve = require( 'path' ).resolve;
2424
var readFile = require( '@stdlib/fs/read-file' ).sync;
2525
var writeFile = require( '@stdlib/fs/write-file' ).sync;
2626
var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP;
27+
var format = require( '@stdlib/string/format' );
2728

2829

2930
// VARIABLES //
@@ -66,7 +67,7 @@ function main() {
6667
for ( i = 0; i < data.length; i++ ) {
6768
d = data[ i ].split( ',' );
6869
if ( d.length !== fields.length ) {
69-
throw new Error( 'unexpected error. Number of row values ('+d.length+') does not match the expected number of fields ('+fields.length+').' );
70+
throw new Error( format( 'unexpected error. Number of row values (%d) does not match the expected number of fields (%d).', d.length, fields.length ) );
7071
}
7172
for ( j = 1; j < d.length; j++ ) {
7273
d[ j ] = parseFloat( d[ j ] );
@@ -86,7 +87,7 @@ function main() {
8687
} else if ( d[ 0 ] === 'white' ) {
8788
json.white.push( d[ 2 ] );
8889
} else {
89-
throw new Error( 'unexpected error. Unrecognized race: `'+d[2]+'`.' );
90+
throw new Error( format( 'unexpected error. Unrecognized race: `%s`.', d[ 0 ] ) );
9091
}
9192
}
9293
if ( json.black.length !== json.white.length ) {

0 commit comments

Comments
 (0)