Typescript-eslint 2 (#193)

This commit is contained in:
Jaco Greeff
2019-08-31 09:25:48 +02:00
committed by GitHub
parent 52cc245c37
commit 876410cc8e
20 changed files with 137 additions and 75 deletions
@@ -25,7 +25,7 @@ function callNext (current: SubjectInfo, subject: BehaviorSubject<SubjectInfo>,
subject.next(filtered);
}
export default function genericSubject (keyCreator: (address: string) => string, withTest: boolean = false): AddressSubject {
export default function genericSubject (keyCreator: (address: string) => string, withTest = false): AddressSubject {
let current: SubjectInfo = {};
const subject = new BehaviorSubject({});
const next = (): void => callNext(current, subject, withTest);
+1 -1
View File
@@ -9,7 +9,7 @@ import { isUndefined } from '@polkadot/util';
import KeyPair from './KeyPair';
export default function createItem (address: string, _name?: string, isUppercase: boolean = true): KeyringSectionOption {
export default function createItem (address: string, _name?: string, isUppercase = true): KeyringSectionOption {
const name = isUndefined(_name)
? (
(address.length > 15)
+1 -1
View File
@@ -47,7 +47,7 @@ export default class ExtensionStore implements KeyringStore {
public set (key: string, value: KeyringJson, cb?: () => void): void {
// shortcut, don't save testing accounts in extension storage
if (key.indexOf('account:') === 0 && value.meta && value.meta.isTesting) {
if (key.startsWith('account:') && value.meta && value.meta.isTesting) {
cb && cb();
return;