aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/lib
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-07-30 10:54:54 +0200
committerLibravatar GitHub <noreply@github.com>2021-07-30 14:24:54 +0530
commitf4b4416ea52d564bc2dbe543a82084ed98843ccc (patch)
tree7ca6b23571c86458a6b799746c91a7191de02715 /src/stores/lib
parent5.6.1-nightly.8 [skip ci] (diff)
downloadferdium-app-f4b4416ea52d564bc2dbe543a82084ed98843ccc.tar.gz
ferdium-app-f4b4416ea52d564bc2dbe543a82084ed98843ccc.tar.zst
ferdium-app-f4b4416ea52d564bc2dbe543a82084ed98843ccc.zip
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 <avijayr@protonmail.com>
Diffstat (limited to 'src/stores/lib')
-rw-r--r--src/stores/lib/CachedRequest.js4
-rw-r--r--src/stores/lib/Reaction.js4
-rw-r--r--src/stores/lib/Request.js2
-rw-r--r--src/stores/lib/Store.js6
4 files changed, 8 insertions, 8 deletions
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 {
92 } 92 }
93 93
94 removeCacheForCallWith(...args) { 94 removeCacheForCallWith(...args) {
95 remove(this._apiCalls, c => isEqual(c.args, args)); 95 remove(this._apiCalls, (c) => isEqual(c.args, args));
96 } 96 }
97 97
98 _addApiCall(args) { 98 _addApiCall(args) {
@@ -102,6 +102,6 @@ export default class CachedRequest extends Request {
102 } 102 }
103 103
104 _findApiCall(args) { 104 _findApiCall(args) {
105 return this._apiCalls.find(c => isEqual(c.args, args)); 105 return this._apiCalls.find((c) => isEqual(c.args, args));
106 } 106 }
107} 107}
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 {
26 } 26 }
27} 27}
28 28
29export const createReactions = reactions => ( 29export const createReactions = (reactions) => (
30 reactions.map(r => new Reaction(r)) 30 reactions.map((r) => new Reaction(r))
31); 31);
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 {
107 } 107 }
108 108
109 _triggerHooks() { 109 _triggerHooks() {
110 Request._hooks.forEach(hook => hook(this)); 110 Request._hooks.forEach((hook) => hook(this));
111 } 111 }
112 112
113 reset = () => { 113 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 {
28 } 28 }
29 29
30 registerReactions(reactions) { 30 registerReactions(reactions) {
31 reactions.forEach(reaction => this._reactions.push(new Reaction(reaction))); 31 reactions.forEach((reaction) => this._reactions.push(new Reaction(reaction)));
32 } 32 }
33 33
34 setup() {} 34 setup() {}
35 35
36 initialize() { 36 initialize() {
37 this.setup(); 37 this.setup();
38 this._reactions.forEach(reaction => reaction.start()); 38 this._reactions.forEach((reaction) => reaction.start());
39 } 39 }
40 40
41 teardown() { 41 teardown() {
42 this._reactions.forEach(reaction => reaction.stop()); 42 this._reactions.forEach((reaction) => reaction.stop());
43 } 43 }
44 44
45 resetStatus() { 45 resetStatus() {