Swap to eslint (#154)

* 311 problems (173 errors, 138 warnings)

* Make a start...

* swap to react config

* Literally a handful left

* Clean.

* any removal

* Use Record

* Adjust versions

* Update with latest eslint-standard ruleset

* Update defaults.ts
This commit is contained in:
Jaco Greeff
2019-07-12 22:01:19 +02:00
committed by GitHub
parent 7b6a18cbfb
commit fd67ecdf3a
46 changed files with 412 additions and 395 deletions
+8 -8
View File
@@ -2,27 +2,27 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { KeyringStore } from '../types';
import { KeyringStore, KeyringJson } from '../types';
import store from 'store';
export default class BrowserStore implements KeyringStore {
all (cb: (key: string, value: any) => void): void {
store.each((value: any, key: string) =>
cb(key, value)
);
public all (cb: (key: string, value: KeyringJson) => void): void {
store.each((value: KeyringJson, key: string): void => {
cb(key, value);
});
}
get (key: string, cb: (value: any) => void): void {
public get (key: string, cb: (value: KeyringJson) => void): void {
cb(store.get(key));
}
remove (key: string, cb?: () => void): void {
public remove (key: string, cb?: () => void): void {
store.remove(key);
cb && cb();
}
set (key: string, value: any, cb?: () => void): void {
public set (key: string, value: KeyringJson, cb?: () => void): void {
store.set(key, value);
cb && cb();
}