Skip to content

Commit

Permalink
Fix linter issues (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogebrd authored Jun 9, 2020
1 parent 67e7b55 commit 318f835
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
17 changes: 10 additions & 7 deletions src/dropbox-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import { UPLOAD, DOWNLOAD, RPC } from './constants';
import { downloadRequest } from './download-request';
import { uploadRequest } from './upload-request';
import { rpcRequest } from './rpc-request';

let crypto;
try {
crypto = require('crypto');
}catch(Exception){
crypto = require('crypto'); // eslint-disable-line global-require
} catch (Exception) {
crypto = window.crypto;
}

Expand Down Expand Up @@ -269,8 +270,9 @@ export class DropboxBase {
* legacy - creates one long-lived token with no expiration
* online - create one short-lived token with an expiration
* offline - create one short-lived token with an expiration with a refresh token
* @arg {} [scope] - scopes to request for the grant
* @arg {String} [includeGrantedScopes] - whether or not to include previously granted scopes. From the following:
* @arg {Array<String>>} [scope] - scopes to request for the grant
* @arg {String} [includeGrantedScopes] - whether or not to include previously granted scopes.
* From the following:
* user - include user scopes in the grant
* team - include team scopes in the grant
* Note: if this user has never linked the app, include_granted_scopes must be None
Expand Down Expand Up @@ -394,7 +396,8 @@ export class DropboxBase {
}

/**
* Checks if a token is needed, can be refreshed and if the token is expired. If so, attempts to refresh access token
* Checks if a token is needed, can be refreshed and if the token is expired.
* If so, attempts to refresh access token
* @returns {Promise<*>}
*/
checkAndRefreshAccessToken() {
Expand All @@ -410,7 +413,8 @@ export class DropboxBase {

/**
* Refreshes the access token using the refresh token, if available
* @arg {List} scope - a subset of scopes from the original refresh to acquire with an access token
* @arg {List} scope - a subset of scopes from the original
* refresh to acquire with an access token
* @returns {Promise<*>}
*/
refreshAccessToken(scope = null) {
Expand Down Expand Up @@ -584,5 +588,4 @@ export class DropboxBase {
}
return this.uploadRequest;
}

}
1 change: 0 additions & 1 deletion src/dropbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { DropboxBase } from './dropbox-base';
* expiration (if available)
*/
export class Dropbox extends DropboxBase {

constructor(options) {
super(options);
Object.assign(this, routes);
Expand Down
1 change: 0 additions & 1 deletion src/team/dropbox-team.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { routes } from '../routes-team';
* authentication URL.
*/
export class DropboxTeam extends DropboxBase {

constructor(options) {
super(options);
Object.assign(this, routes);
Expand Down

0 comments on commit 318f835

Please sign in to comment.