lint: reenable tslint no-string-throw, fix issues

This commit is contained in:
Jason Dreyzehner 2018-02-16 14:59:09 -05:00
parent e55dfe42d4
commit 83f91bc3a7
3 changed files with 4 additions and 5 deletions

View File

@ -32,7 +32,7 @@ export class Profile {
x.checkedUA = obj.checkedUA || {};
if (x.credentials[0] && typeof x.credentials[0] != 'object')
throw ("credentials should be an object");
throw new Error("credentials should be an object");
return x;
};
@ -74,7 +74,7 @@ export class Profile {
public addWallet(credentials: any): boolean {
if (!credentials.walletId)
throw 'credentials must have .walletId';
throw new Error('credentials must have .walletId');
if (this.hasWallet(credentials.walletId))
return false;
@ -86,7 +86,7 @@ export class Profile {
public updateWallet(credentials: any): boolean {
if (!credentials.walletId)
throw 'credentials must have .walletId';
throw new Error('credentials must have .walletId');
if (!this.hasWallet(credentials.walletId))
return false;

View File

@ -937,7 +937,7 @@ export class ProfileProvider {
public getWallets(opts?: any) {
if (opts && !_.isObject(opts)) throw "bad argument";
if (opts && !_.isObject(opts)) throw new Error("bad argument");
opts = opts || {};

View File

@ -40,7 +40,6 @@
"curly": false,
"object-literal-shorthand": false,
"member-access": false,
"no-string-throw": false,
"arrow-return-shorthand": false,
"array-type": false
}