mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-05-31 04:01:04 +00:00
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:
@@ -10,20 +10,19 @@ import { BehaviorSubject } from 'rxjs';
|
||||
import createOptionItem from '../options/item';
|
||||
import development from './development';
|
||||
|
||||
function callNext (current: SubjectInfo, subject: BehaviorSubject<any>, withTest: boolean) {
|
||||
function callNext (current: SubjectInfo, subject: BehaviorSubject<SubjectInfo>, withTest: boolean): void {
|
||||
const isDevMode = development.isDevelopment();
|
||||
const filtered: SubjectInfo = {};
|
||||
|
||||
subject.next(
|
||||
Object.keys(current).reduce((filtered, key) => {
|
||||
const { json: { meta: { isTesting = false } = {} } = {} } = current[key];
|
||||
Object.keys(current).forEach((key): void => {
|
||||
const { json: { meta: { isTesting = false } = {} } = {} } = current[key];
|
||||
|
||||
if (!withTest || isDevMode || isTesting !== true) {
|
||||
filtered[key] = current[key];
|
||||
}
|
||||
if (!withTest || isDevMode || isTesting !== true) {
|
||||
filtered[key] = current[key];
|
||||
}
|
||||
});
|
||||
|
||||
return filtered;
|
||||
}, {} as SubjectInfo)
|
||||
);
|
||||
subject.next(filtered);
|
||||
}
|
||||
|
||||
export default function genericSubject (keyCreator: (address: string) => string, withTest: boolean = false): AddressSubject {
|
||||
@@ -56,7 +55,7 @@ export default function genericSubject (keyCreator: (address: string) => string,
|
||||
|
||||
return current[address];
|
||||
},
|
||||
remove: (store: KeyringStore, address: string) => {
|
||||
remove: (store: KeyringStore, address: string): void => {
|
||||
current = { ...current };
|
||||
|
||||
delete current[address];
|
||||
|
||||
Reference in New Issue
Block a user