Skip to content

Commit 9394280

Browse files
authored
chore: fix JavaScript lint errors
PR-URL: #11320 Closes: #11319 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 08f3a13 commit 9394280

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

lib/node_modules/@stdlib/datasets/us-states-names-capitals/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ var t = table();
103103
<!-- eslint no-undef: "error" -->
104104

105105
```javascript
106+
var format = require( '@stdlib/string/format' );
106107
var capitalize = require( '@stdlib/string/capitalize' );
107108
var table = require( '@stdlib/datasets/us-states-names-capitals' );
108109

@@ -123,7 +124,7 @@ function getCapital( state ) {
123124

124125
// Ensure a valid state name was provided...
125126
if ( capital === void 0 ) {
126-
throw new Error( 'unrecognized state name. Value: `' + state + '`.' );
127+
throw new Error( format( 'unrecognized state name. Value: `%s`.', state ) );
127128
}
128129
return capital;
129130
}

lib/node_modules/@stdlib/datasets/us-states-names-capitals/examples/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
'use strict';
2020

21+
var format = require( '@stdlib/string/format' );
2122
var capitalize = require( '@stdlib/string/capitalize' );
2223
var table = require( './../lib' );
2324

@@ -38,7 +39,7 @@ function getCapital( state ) {
3839

3940
// Ensure a valid state name was provided...
4041
if ( capital === void 0 ) {
41-
throw new Error( 'unrecognized state name. Value: `' + state + '`.' );
42+
throw new Error( format( 'unrecognized state name. Value: `%s`.', state ) );
4243
}
4344
return capital;
4445
}

0 commit comments

Comments
 (0)