From f4b4416ea52d564bc2dbe543a82084ed98843ccc Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Fri, 30 Jul 2021 10:54:54 +0200 Subject: chore: migrate from tslint to @typescript-eslint (#1706) - update .eslintrc to work for .js and .ts - update devDependencies - lint properly both root /src and nested /packages - update webhint recommended setting for tsconfig.json to shrink output - Manage all eslint rules from the repo root - escape single quotes in scripts to please windows build Co-authored-by: Vijay A --- src/stores/lib/CachedRequest.js | 4 ++-- src/stores/lib/Reaction.js | 4 ++-- src/stores/lib/Request.js | 2 +- src/stores/lib/Store.js | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/stores/lib') diff --git a/src/stores/lib/CachedRequest.js b/src/stores/lib/CachedRequest.js index 31c7ce241..94f615144 100644 --- a/src/stores/lib/CachedRequest.js +++ b/src/stores/lib/CachedRequest.js @@ -92,7 +92,7 @@ export default class CachedRequest extends Request { } removeCacheForCallWith(...args) { - remove(this._apiCalls, c => isEqual(c.args, args)); + remove(this._apiCalls, (c) => isEqual(c.args, args)); } _addApiCall(args) { @@ -102,6 +102,6 @@ export default class CachedRequest extends Request { } _findApiCall(args) { - return this._apiCalls.find(c => isEqual(c.args, args)); + return this._apiCalls.find((c) => isEqual(c.args, args)); } } diff --git a/src/stores/lib/Reaction.js b/src/stores/lib/Reaction.js index f8009b7f6..7e1bc685e 100644 --- a/src/stores/lib/Reaction.js +++ b/src/stores/lib/Reaction.js @@ -26,6 +26,6 @@ export default class Reaction { } } -export const createReactions = reactions => ( - reactions.map(r => new Reaction(r)) +export const createReactions = (reactions) => ( + reactions.map((r) => new Reaction(r)) ); diff --git a/src/stores/lib/Request.js b/src/stores/lib/Request.js index cfc857c2e..32ffe4367 100644 --- a/src/stores/lib/Request.js +++ b/src/stores/lib/Request.js @@ -107,7 +107,7 @@ export default class Request { } _triggerHooks() { - Request._hooks.forEach(hook => hook(this)); + Request._hooks.forEach((hook) => hook(this)); } reset = () => { diff --git a/src/stores/lib/Store.js b/src/stores/lib/Store.js index 8d2fb4066..b03a7e725 100644 --- a/src/stores/lib/Store.js +++ b/src/stores/lib/Store.js @@ -28,18 +28,18 @@ export default class Store { } registerReactions(reactions) { - reactions.forEach(reaction => this._reactions.push(new Reaction(reaction))); + reactions.forEach((reaction) => this._reactions.push(new Reaction(reaction))); } setup() {} initialize() { this.setup(); - this._reactions.forEach(reaction => reaction.start()); + this._reactions.forEach((reaction) => reaction.start()); } teardown() { - this._reactions.forEach(reaction => reaction.stop()); + this._reactions.forEach((reaction) => reaction.stop()); } resetStatus() { -- cgit v1.2.3-54-g00ecf