Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a98984e

Browse filesBrowse files
authored
chore: fix lint errors
PR-URL: #10212 Closes: #10211 Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent 9df57d4 commit a98984e
Copy full SHA for a98984e

2 files changed

+23-22Lines changed: 23 additions & 22 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/node_modules/@stdlib
    • _tools/eslint/rules/jsdoc-no-shortcut-reference-image/lib
    • datasets/cdc-nchs-us-infant-mortality-bw-1915-2013/scripts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-no-shortcut-reference-image/lib/main.js
+20-20Lines 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
*
Collapse file

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

Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/datasets/cdc-nchs-us-infant-mortality-bw-1915-2013/scripts/build.js
+3-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.