aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
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/features
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/features')
-rw-r--r--src/features/announcements/components/AnnouncementScreen.js2
-rw-r--r--src/features/communityRecipes/store.js2
-rw-r--r--src/features/publishDebugInfo/Component.js6
-rw-r--r--src/features/quickSwitch/Component.js4
-rw-r--r--src/features/shareFranz/Component.js2
-rw-r--r--src/features/todos/containers/TodosScreen.js4
-rw-r--r--src/features/utils/ActionBinding.js4
-rw-r--r--src/features/utils/FeatureStore.js8
-rw-r--r--src/features/webControls/components/WebControls.js4
-rw-r--r--src/features/webControls/containers/WebControlsScreen.js2
-rw-r--r--src/features/workspaces/api.js2
-rw-r--r--src/features/workspaces/components/WorkspaceDrawer.js2
-rw-r--r--src/features/workspaces/components/WorkspaceDrawerItem.js2
-rw-r--r--src/features/workspaces/components/WorkspaceItem.js2
-rw-r--r--src/features/workspaces/components/WorkspaceServiceListItem.js2
-rw-r--r--src/features/workspaces/components/WorkspaceSwitchingIndicator.js2
-rw-r--r--src/features/workspaces/components/WorkspacesDashboard.js4
-rw-r--r--src/features/workspaces/containers/WorkspacesScreen.js4
-rw-r--r--src/features/workspaces/models/Workspace.js4
19 files changed, 31 insertions, 31 deletions
diff --git a/src/features/announcements/components/AnnouncementScreen.js b/src/features/announcements/components/AnnouncementScreen.js
index 21964b108..315843db3 100644
--- a/src/features/announcements/components/AnnouncementScreen.js
+++ b/src/features/announcements/components/AnnouncementScreen.js
@@ -25,7 +25,7 @@ const messages = defineMessages({
25 25
26const smallScreen = '1000px'; 26const smallScreen = '1000px';
27 27
28const styles = theme => ({ 28const styles = (theme) => ({
29 container: { 29 container: {
30 background: theme.colorBackground, 30 background: theme.colorBackground,
31 position: 'relative', 31 position: 'relative',
diff --git a/src/features/communityRecipes/store.js b/src/features/communityRecipes/store.js
index acc1e52f6..b115a53e1 100644
--- a/src/features/communityRecipes/store.js
+++ b/src/features/communityRecipes/store.js
@@ -19,7 +19,7 @@ export class CommunityRecipesStore extends FeatureStore {
19 if (!this.stores) return []; 19 if (!this.stores) return [];
20 20
21 return this.stores.recipePreviews.dev.map((r) => { 21 return this.stores.recipePreviews.dev.map((r) => {
22 r.isDevRecipe = !!r.author.find(a => a.email === this.stores.user.data.email); 22 r.isDevRecipe = !!r.author.find((a) => a.email === this.stores.user.data.email);
23 23
24 return r; 24 return r;
25 }); 25 });
diff --git a/src/features/publishDebugInfo/Component.js b/src/features/publishDebugInfo/Component.js
index f97a7c750..5387bd358 100644
--- a/src/features/publishDebugInfo/Component.js
+++ b/src/features/publishDebugInfo/Component.js
@@ -46,7 +46,7 @@ const messages = defineMessages({
46 }, 46 },
47}); 47});
48 48
49const styles = theme => ({ 49const styles = (theme) => ({
50 container: { 50 container: {
51 minWidth: '70vw', 51 minWidth: '70vw',
52 }, 52 },
@@ -186,10 +186,10 @@ export default @injectSheet(styles) @inject('stores', 'actions') @observer class
186 <> 186 <>
187 <p className={classes.info}>{intl.formatMessage(messages.info)}</p> 187 <p className={classes.info}>{intl.formatMessage(messages.info)}</p>
188 188
189 <a href={`${DEBUG_API}/privacy.html`} target="_blank" className={classes.link}> 189 <a href={`${DEBUG_API}/privacy.html`} target="_blank" className={classes.link} rel="noreferrer">
190 {intl.formatMessage(messages.privacy)} 190 {intl.formatMessage(messages.privacy)}
191 </a> 191 </a>
192 <a href={`${DEBUG_API}/terms.html`} target="_blank" className={classes.link}> 192 <a href={`${DEBUG_API}/terms.html`} target="_blank" className={classes.link} rel="noreferrer">
193 {intl.formatMessage(messages.terms)} 193 {intl.formatMessage(messages.terms)}
194 </a> 194 </a>
195 195
diff --git a/src/features/quickSwitch/Component.js b/src/features/quickSwitch/Component.js
index 04822db71..812f2c04b 100644
--- a/src/features/quickSwitch/Component.js
+++ b/src/features/quickSwitch/Component.js
@@ -28,7 +28,7 @@ const messages = defineMessages({
28 }, 28 },
29}); 29});
30 30
31const styles = theme => ({ 31const styles = (theme) => ({
32 modal: { 32 modal: {
33 width: '80%', 33 width: '80%',
34 maxWidth: 600, 34 maxWidth: 600,
@@ -139,7 +139,7 @@ export default @injectSheet(styles) @inject('stores', 'actions') @observer class
139 if (this.state.search && compact(invoke(this.state.search, 'match', /^[a-z0-9]/i)).length > 0) { 139 if (this.state.search && compact(invoke(this.state.search, 'match', /^[a-z0-9]/i)).length > 0) {
140 // Apply simple search algorythm to list of all services 140 // Apply simple search algorythm to list of all services
141 services = this.props.stores.services.allDisplayed; 141 services = this.props.stores.services.allDisplayed;
142 services = services.filter(service => service.name.toLowerCase().search(this.state.search.toLowerCase()) !== -1); 142 services = services.filter((service) => service.name.toLowerCase().search(this.state.search.toLowerCase()) !== -1);
143 } else { 143 } else {
144 // Add the currently active service first 144 // Add the currently active service first
145 const currentService = this.props.stores.services.active; 145 const currentService = this.props.stores.services.active;
diff --git a/src/features/shareFranz/Component.js b/src/features/shareFranz/Component.js
index b66375453..cc2e81b70 100644
--- a/src/features/shareFranz/Component.js
+++ b/src/features/shareFranz/Component.js
@@ -44,7 +44,7 @@ const messages = defineMessages({
44 }, 44 },
45}); 45});
46 46
47const styles = theme => ({ 47const styles = (theme) => ({
48 modal: { 48 modal: {
49 width: '80%', 49 width: '80%',
50 maxWidth: 600, 50 maxWidth: 600,
diff --git a/src/features/todos/containers/TodosScreen.js b/src/features/todos/containers/TodosScreen.js
index 6425746e6..d05e24e56 100644
--- a/src/features/todos/containers/TodosScreen.js
+++ b/src/features/todos/containers/TodosScreen.js
@@ -24,10 +24,10 @@ class TodosScreen extends Component {
24 isVisible={todosStore.isTodosPanelVisible} 24 isVisible={todosStore.isTodosPanelVisible}
25 togglePanel={todoActions.toggleTodosPanel} 25 togglePanel={todoActions.toggleTodosPanel}
26 handleClientMessage={todoActions.handleClientMessage} 26 handleClientMessage={todoActions.handleClientMessage}
27 setTodosWebview={webview => todoActions.setTodosWebview({ webview })} 27 setTodosWebview={(webview) => todoActions.setTodosWebview({ webview })}
28 width={todosStore.width} 28 width={todosStore.width}
29 minWidth={TODOS_MIN_WIDTH} 29 minWidth={TODOS_MIN_WIDTH}
30 resize={width => todoActions.resize({ width })} 30 resize={(width) => todoActions.resize({ width })}
31 userAgent={todosStore.userAgent} 31 userAgent={todosStore.userAgent}
32 todoUrl={todosStore.todoUrl} 32 todoUrl={todosStore.todoUrl}
33 isTodoUrlValid={todosStore.isTodoUrlValid} 33 isTodoUrlValid={todosStore.isTodoUrlValid}
diff --git a/src/features/utils/ActionBinding.js b/src/features/utils/ActionBinding.js
index 497aa071b..787166d44 100644
--- a/src/features/utils/ActionBinding.js
+++ b/src/features/utils/ActionBinding.js
@@ -24,6 +24,6 @@ export default class ActionBinding {
24 } 24 }
25} 25}
26 26
27export const createActionBindings = actions => ( 27export const createActionBindings = (actions) => (
28 actions.map(a => new ActionBinding(a)) 28 actions.map((a) => new ActionBinding(a))
29); 29);
diff --git a/src/features/utils/FeatureStore.js b/src/features/utils/FeatureStore.js
index 0bc10e176..4d4e217a9 100644
--- a/src/features/utils/FeatureStore.js
+++ b/src/features/utils/FeatureStore.js
@@ -16,11 +16,11 @@ export class FeatureStore {
16 } 16 }
17 17
18 _startActions(actions = this._actions) { 18 _startActions(actions = this._actions) {
19 actions.forEach(a => a.start()); 19 actions.forEach((a) => a.start());
20 } 20 }
21 21
22 _stopActions(actions = this._actions) { 22 _stopActions(actions = this._actions) {
23 actions.forEach(a => a.stop()); 23 actions.forEach((a) => a.stop());
24 } 24 }
25 25
26 // REACTIONS 26 // REACTIONS
@@ -31,10 +31,10 @@ export class FeatureStore {
31 } 31 }
32 32
33 _startReactions(reactions = this._reactions) { 33 _startReactions(reactions = this._reactions) {
34 reactions.forEach(r => r.start()); 34 reactions.forEach((r) => r.start());
35 } 35 }
36 36
37 _stopReactions(reactions = this._reactions) { 37 _stopReactions(reactions = this._reactions) {
38 reactions.forEach(r => r.stop()); 38 reactions.forEach((r) => r.stop());
39 } 39 }
40} 40}
diff --git a/src/features/webControls/components/WebControls.js b/src/features/webControls/components/WebControls.js
index b9403bd0d..1cdd14e55 100644
--- a/src/features/webControls/components/WebControls.js
+++ b/src/features/webControls/components/WebControls.js
@@ -32,7 +32,7 @@ const messages = defineMessages({
32 }, 32 },
33}); 33});
34 34
35const styles = theme => ({ 35const styles = (theme) => ({
36 root: { 36 root: {
37 background: theme.colorBackground, 37 background: theme.colorBackground,
38 position: 'relative', 38 position: 'relative',
@@ -197,7 +197,7 @@ class WebControls extends Component {
197 <input 197 <input
198 value={editUrl ? inputUrl : url} 198 value={editUrl ? inputUrl : url}
199 className={classes.input} 199 className={classes.input}
200 onChange={event => this.setState({ 200 onChange={(event) => this.setState({
201 inputUrl: event.target.value, 201 inputUrl: event.target.value,
202 })} 202 })}
203 onFocus={(event) => { 203 onFocus={(event) => {
diff --git a/src/features/webControls/containers/WebControlsScreen.js b/src/features/webControls/containers/WebControlsScreen.js
index d638b831c..e1e1b9991 100644
--- a/src/features/webControls/containers/WebControlsScreen.js
+++ b/src/features/webControls/containers/WebControlsScreen.js
@@ -114,7 +114,7 @@ class WebControlsScreen extends Component {
114 goBack={() => this.goBack()} 114 goBack={() => this.goBack()}
115 canGoForward={this.canGoForward} 115 canGoForward={this.canGoForward}
116 goForward={() => this.goForward()} 116 goForward={() => this.goForward()}
117 navigate={url => this.navigate(url)} 117 navigate={(url) => this.navigate(url)}
118 url={this.url} 118 url={this.url}
119 /> 119 />
120 ); 120 );
diff --git a/src/features/workspaces/api.js b/src/features/workspaces/api.js
index 30fbd84be..322695ed2 100644
--- a/src/features/workspaces/api.js
+++ b/src/features/workspaces/api.js
@@ -14,7 +14,7 @@ export const workspaceApi = {
14 debug('getUserWorkspaces RESULT', result); 14 debug('getUserWorkspaces RESULT', result);
15 if (!result.ok) throw result; 15 if (!result.ok) throw result;
16 const workspaces = await result.json(); 16 const workspaces = await result.json();
17 return workspaces.map(data => new Workspace(data)); 17 return workspaces.map((data) => new Workspace(data));
18 }, 18 },
19 19
20 createWorkspace: async (name) => { 20 createWorkspace: async (name) => {
diff --git a/src/features/workspaces/components/WorkspaceDrawer.js b/src/features/workspaces/components/WorkspaceDrawer.js
index 3ddc9cf16..1138f23d7 100644
--- a/src/features/workspaces/components/WorkspaceDrawer.js
+++ b/src/features/workspaces/components/WorkspaceDrawer.js
@@ -34,7 +34,7 @@ const messages = defineMessages({
34 }, 34 },
35}); 35});
36 36
37const styles = theme => ({ 37const styles = (theme) => ({
38 drawer: { 38 drawer: {
39 background: theme.workspaces.drawer.background, 39 background: theme.workspaces.drawer.background,
40 width: `${theme.workspaces.drawer.width}px`, 40 width: `${theme.workspaces.drawer.width}px`,
diff --git a/src/features/workspaces/components/WorkspaceDrawerItem.js b/src/features/workspaces/components/WorkspaceDrawerItem.js
index 2e58b70d6..a3fdf4f47 100644
--- a/src/features/workspaces/components/WorkspaceDrawerItem.js
+++ b/src/features/workspaces/components/WorkspaceDrawerItem.js
@@ -18,7 +18,7 @@ const messages = defineMessages({
18 }, 18 },
19}); 19});
20 20
21const styles = theme => ({ 21const styles = (theme) => ({
22 item: { 22 item: {
23 height: '67px', 23 height: '67px',
24 padding: `15px ${theme.workspaces.drawer.padding}px`, 24 padding: `15px ${theme.workspaces.drawer.padding}px`,
diff --git a/src/features/workspaces/components/WorkspaceItem.js b/src/features/workspaces/components/WorkspaceItem.js
index cc4b1a3ba..85fc02d51 100644
--- a/src/features/workspaces/components/WorkspaceItem.js
+++ b/src/features/workspaces/components/WorkspaceItem.js
@@ -6,7 +6,7 @@ import injectSheet from 'react-jss';
6 6
7import Workspace from '../models/Workspace'; 7import Workspace from '../models/Workspace';
8 8
9const styles = theme => ({ 9const styles = (theme) => ({
10 row: { 10 row: {
11 height: theme.workspaces.settings.listItems.height, 11 height: theme.workspaces.settings.listItems.height,
12 borderBottom: `1px solid ${theme.workspaces.settings.listItems.borderColor}`, 12 borderBottom: `1px solid ${theme.workspaces.settings.listItems.borderColor}`,
diff --git a/src/features/workspaces/components/WorkspaceServiceListItem.js b/src/features/workspaces/components/WorkspaceServiceListItem.js
index e05b21440..f6e2a2786 100644
--- a/src/features/workspaces/components/WorkspaceServiceListItem.js
+++ b/src/features/workspaces/components/WorkspaceServiceListItem.js
@@ -8,7 +8,7 @@ import { Toggle } from '@meetfranz/forms';
8import Service from '../../../models/Service'; 8import Service from '../../../models/Service';
9import ServiceIcon from '../../../components/ui/ServiceIcon'; 9import ServiceIcon from '../../../components/ui/ServiceIcon';
10 10
11const styles = theme => ({ 11const styles = (theme) => ({
12 listItem: { 12 listItem: {
13 height: theme.workspaces.settings.listItems.height, 13 height: theme.workspaces.settings.listItems.height,
14 borderBottom: `1px solid ${theme.workspaces.settings.listItems.borderColor}`, 14 borderBottom: `1px solid ${theme.workspaces.settings.listItems.borderColor}`,
diff --git a/src/features/workspaces/components/WorkspaceSwitchingIndicator.js b/src/features/workspaces/components/WorkspaceSwitchingIndicator.js
index a70d1d66f..b46959e91 100644
--- a/src/features/workspaces/components/WorkspaceSwitchingIndicator.js
+++ b/src/features/workspaces/components/WorkspaceSwitchingIndicator.js
@@ -15,7 +15,7 @@ const messages = defineMessages({
15 }, 15 },
16}); 16});
17 17
18const styles = theme => ({ 18const styles = (theme) => ({
19 wrapper: { 19 wrapper: {
20 display: 'flex', 20 display: 'flex',
21 alignItems: 'flex-start', 21 alignItems: 'flex-start',
diff --git a/src/features/workspaces/components/WorkspacesDashboard.js b/src/features/workspaces/components/WorkspacesDashboard.js
index 0c2588c42..8319d3bc6 100644
--- a/src/features/workspaces/components/WorkspacesDashboard.js
+++ b/src/features/workspaces/components/WorkspacesDashboard.js
@@ -175,11 +175,11 @@ class WorkspacesDashboard extends Component {
175 <table className={classes.table}> 175 <table className={classes.table}>
176 {/* ===== Workspaces list ===== */} 176 {/* ===== Workspaces list ===== */}
177 <tbody> 177 <tbody>
178 {workspaces.map(workspace => ( 178 {workspaces.map((workspace) => (
179 <WorkspaceItem 179 <WorkspaceItem
180 key={workspace.id} 180 key={workspace.id}
181 workspace={workspace} 181 workspace={workspace}
182 onItemClick={w => onWorkspaceClick(w)} 182 onItemClick={(w) => onWorkspaceClick(w)}
183 /> 183 />
184 ))} 184 ))}
185 </tbody> 185 </tbody>
diff --git a/src/features/workspaces/containers/WorkspacesScreen.js b/src/features/workspaces/containers/WorkspacesScreen.js
index c241cd622..4828658f9 100644
--- a/src/features/workspaces/containers/WorkspacesScreen.js
+++ b/src/features/workspaces/containers/WorkspacesScreen.js
@@ -30,8 +30,8 @@ class WorkspacesScreen extends Component {
30 createWorkspaceRequest={createWorkspaceRequest} 30 createWorkspaceRequest={createWorkspaceRequest}
31 deleteWorkspaceRequest={deleteWorkspaceRequest} 31 deleteWorkspaceRequest={deleteWorkspaceRequest}
32 updateWorkspaceRequest={updateWorkspaceRequest} 32 updateWorkspaceRequest={updateWorkspaceRequest}
33 onCreateWorkspaceSubmit={data => actions.workspaces.create(data)} 33 onCreateWorkspaceSubmit={(data) => actions.workspaces.create(data)}
34 onWorkspaceClick={w => actions.workspaces.edit({ workspace: w })} 34 onWorkspaceClick={(w) => actions.workspaces.edit({ workspace: w })}
35 /> 35 />
36 </ErrorBoundary> 36 </ErrorBoundary>
37 ); 37 );
diff --git a/src/features/workspaces/models/Workspace.js b/src/features/workspaces/models/Workspace.js
index 77c4e05f4..11ee377cd 100644
--- a/src/features/workspaces/models/Workspace.js
+++ b/src/features/workspaces/models/Workspace.js
@@ -22,13 +22,13 @@ export default class Workspace {
22 this.name = data.name; 22 this.name = data.name;
23 this.order = data.order; 23 this.order = data.order;
24 24
25 let services = data.services; 25 let { services } = data;
26 if (data.saving && data.keepLoaded) { 26 if (data.saving && data.keepLoaded) {
27 // Keep workspaces loaded 27 // Keep workspaces loaded
28 services.push(KEEP_WS_LOADED_USID); 28 services.push(KEEP_WS_LOADED_USID);
29 } else if (data.saving && data.services.includes(KEEP_WS_LOADED_USID)) { 29 } else if (data.saving && data.services.includes(KEEP_WS_LOADED_USID)) {
30 // Don't keep loaded 30 // Don't keep loaded
31 services = services.filter(e => e !== KEEP_WS_LOADED_USID); 31 services = services.filter((e) => e !== KEEP_WS_LOADED_USID);
32 } 32 }
33 this.services.replace(services); 33 this.services.replace(services);
34 34