diff options
author | 2021-07-30 10:54:54 +0200 | |
---|---|---|
committer | 2021-07-30 14:24:54 +0530 | |
commit | f4b4416ea52d564bc2dbe543a82084ed98843ccc (patch) | |
tree | 7ca6b23571c86458a6b799746c91a7191de02715 /src/features/workspaces | |
parent | 5.6.1-nightly.8 [skip ci] (diff) | |
download | ferdium-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/workspaces')
9 files changed, 12 insertions, 12 deletions
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 | ||
37 | const styles = theme => ({ | 37 | const 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 | ||
21 | const styles = theme => ({ | 21 | const 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 | ||
7 | import Workspace from '../models/Workspace'; | 7 | import Workspace from '../models/Workspace'; |
8 | 8 | ||
9 | const styles = theme => ({ | 9 | const 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'; | |||
8 | import Service from '../../../models/Service'; | 8 | import Service from '../../../models/Service'; |
9 | import ServiceIcon from '../../../components/ui/ServiceIcon'; | 9 | import ServiceIcon from '../../../components/ui/ServiceIcon'; |
10 | 10 | ||
11 | const styles = theme => ({ | 11 | const 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 | ||
18 | const styles = theme => ({ | 18 | const 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 | ||