Skip to content

Commit c4ff190

Browse files
committed
chore: fix JavaScript lint errors (issue #10693)
1 parent c8c5967 commit c4ff190

File tree

3 files changed

+38
-32
lines changed

3 files changed

+38
-32
lines changed

lib/node_modules/@stdlib/_tools/github/create-issue/lib/query.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ function query( slug, title, options, clbk ) {
7373
* @returns {void}
7474
*/
7575
function done( error, response, data ) {
76+
var resetDate;
7677
var info;
7778
if ( arguments.length === 1 ) {
7879
debug( 'No available rate limit information.' );
@@ -84,7 +85,12 @@ function query( slug, title, options, clbk ) {
8485
info = ratelimit( response.headers );
8586
debug( 'Rate limit: %d', info.limit );
8687
debug( 'Rate limit remaining: %d', info.remaining );
87-
debug( 'Rate limit reset: %s', (new Date( info.reset*1000 )).toISOString() );
88+
resetDate = new Date( info.reset * 1000 );
89+
if ( isNaN( resetDate.getTime() ) ) {
90+
debug( 'Rate limit reset: [Invalid Date]' );
91+
} else {
92+
debug( 'Rate limit reset: %s', resetDate.toISOString() );
93+
}
8894

8995
if ( error ) {
9096
return clbk( error, null, info );

lib/node_modules/@stdlib/boolean/ctor/test/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ tape( 'the function returns `true` when provided any object which is not null',
114114
values = [
115115
new Bool( false ),
116116
new Bool( true ),
117-
new Number( 0 ), // eslint-disable-line no-new-wrappers
117+
new Number( 0 ),
118118
[],
119119
{},
120120
function noop() {}
@@ -157,7 +157,7 @@ tape( 'when used as a constructor, the function returns a Boolean object (truthy
157157
values = [
158158
new Bool( false ),
159159
new Bool( true ),
160-
new Number( 0 ), // eslint-disable-line no-new-wrappers
160+
new Number( 0 ),
161161
'5',
162162
5,
163163
-5,

lib/node_modules/@stdlib/nlp/lda/lib/matrix.js

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -79,38 +79,38 @@ function matrix() {
7979
setReadOnly( mat, 'get', get );
8080
setReadOnly( mat, 'set', set );
8181
return mat;
82+
}
8283

83-
/**
84-
* Returns a matrix element based on the provided row and column indices.
85-
*
86-
* @private
87-
* @param {integer} i - row index
88-
* @param {integer} j - column index
89-
* @returns {(number|undefined)} matrix element
90-
*/
91-
function get( i, j ) {
92-
/* eslint-disable no-invalid-this */
93-
var idx = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] );
94-
return this.data[ idx ];
95-
}
84+
/**
85+
* Returns a matrix element based on the provided row and column indices.
86+
*
87+
* @private
88+
* @param {integer} i - row index
89+
* @param {integer} j - column index
90+
* @returns {(number|undefined)} matrix element
91+
*/
92+
function get( i, j ) {
93+
/* eslint-disable no-invalid-this */
94+
var idx = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] );
95+
return this.data[ idx ];
96+
}
9697

97-
/**
98-
* Sets a matrix element based on the provided row and column indices.
99-
*
100-
* @private
101-
* @param {integer} i - row index
102-
* @param {integer} j - column index
103-
* @param {number} v - value to set
104-
* @returns {Matrix} Matrix instance
105-
*/
106-
function set( i, j, v ) {
107-
/* eslint-disable no-invalid-this */
108-
i = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] );
109-
if ( i >= 0 ) {
110-
this.data[ i ] = v;
111-
}
112-
return this;
98+
/**
99+
* Sets a matrix element based on the provided row and column indices.
100+
*
101+
* @private
102+
* @param {integer} i - row index
103+
* @param {integer} j - column index
104+
* @param {number} v - value to set
105+
* @returns {Matrix} Matrix instance
106+
*/
107+
function set( i, j, v ) {
108+
/* eslint-disable no-invalid-this */
109+
i = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] );
110+
if ( i >= 0 ) {
111+
this.data[ i ] = v;
113112
}
113+
return this;
114114
}
115115

116116

0 commit comments

Comments
 (0)