Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
* @param {Object} response - HTTP response object
* @returns {void}
*/
function done( error, response ) {

Check failure on line 74 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Variable declarations inside of function are not ordered by length (in decreasing order)
var info;
if ( arguments.length === 1 ) {
debug( 'No available rate limit information.' );
Expand All @@ -83,7 +83,21 @@
info = ratelimit( response.headers );
debug( 'Rate limit: %d', info.limit );
debug( 'Rate limit remaining: %d', info.remaining );
debug( 'Rate limit reset: %s', (new Date( info.reset*1000 )).toISOString() );

var resetDate;

Check failure on line 87 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

All 'var' declarations must be at the top of the function scope
var time;

Check failure on line 88 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

All 'var' declarations must be at the top of the function scope

if ( typeof info.reset === 'number' ) {
resetDate = new Date( info.reset * 1000 );
time = resetDate.getTime();

debug(

Check failure on line 94 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected newline after '('
'Rate limit reset: %s',
( isNaN( time ) ? 'invalid timestamp' : resetDate.toISOString() )

Check failure on line 96 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

parentheses required around ternary conditions

Check failure on line 96 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

There should be no line break here
);

Check failure on line 97 in lib/node_modules/@stdlib/_tools/github/dispatch-workflow/lib/query.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected newline before ')'
} else {
debug( 'Rate limit reset: not provided' );
}

if ( error ) {
return clbk( error, info );
Expand Down
Loading