diff options
author | MCMXC <16797721+mcmxcdev@users.noreply.github.com> | 2023-07-30 10:55:59 -0600 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2023-07-30 23:57:51 +0000 |
commit | 080d8b05297f3f5afcf33354a40a5201697b1df5 (patch) | |
tree | 35180bd3cb9fcd137feca3fe169032cbbb469463 /src/features/workspaces | |
parent | refactor: various improvements (#1296) (diff) | |
download | ferdium-app-080d8b05297f3f5afcf33354a40a5201697b1df5.tar.gz ferdium-app-080d8b05297f3f5afcf33354a40a5201697b1df5.tar.zst ferdium-app-080d8b05297f3f5afcf33354a40a5201697b1df5.zip |
refactor: more lint improvements
- set parserOptions.ecmaVersion to latest and env to es2024 in eslint config
- install missing types libraries
- install eslint-plugin-sonar
- enable eslint-plugin-sonar recommended rules and declare jsx-runtime for react in eslint config
- clean up disabled lint rules which don't inflict problems anymore
- disable various lint issues and fix others
Diffstat (limited to 'src/features/workspaces')
-rw-r--r-- | src/features/workspaces/components/WorkspacesDashboard.tsx | 1 | ||||
-rw-r--r-- | src/features/workspaces/containers/EditWorkspaceScreen.tsx | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/features/workspaces/components/WorkspacesDashboard.tsx b/src/features/workspaces/components/WorkspacesDashboard.tsx index a823132c5..ba06730a0 100644 --- a/src/features/workspaces/components/WorkspacesDashboard.tsx +++ b/src/features/workspaces/components/WorkspacesDashboard.tsx | |||
@@ -152,6 +152,7 @@ class WorkspacesDashboard extends Component<IProps> { | |||
152 | {intl.formatMessage(messages.workspacesRequestFailed)} | 152 | {intl.formatMessage(messages.workspacesRequestFailed)} |
153 | </Infobox> | 153 | </Infobox> |
154 | ) : ( | 154 | ) : ( |
155 | // eslint-disable-next-line react/jsx-no-useless-fragment | ||
155 | <> | 156 | <> |
156 | {workspaces.length === 0 ? ( | 157 | {workspaces.length === 0 ? ( |
157 | <div className="align-middle settings__empty-state"> | 158 | <div className="align-middle settings__empty-state"> |
diff --git a/src/features/workspaces/containers/EditWorkspaceScreen.tsx b/src/features/workspaces/containers/EditWorkspaceScreen.tsx index 0b66db0d0..abc747c33 100644 --- a/src/features/workspaces/containers/EditWorkspaceScreen.tsx +++ b/src/features/workspaces/containers/EditWorkspaceScreen.tsx | |||
@@ -9,11 +9,10 @@ import { workspaceStore } from '../index'; | |||
9 | import { deleteWorkspaceRequest, updateWorkspaceRequest } from '../api'; | 9 | import { deleteWorkspaceRequest, updateWorkspaceRequest } from '../api'; |
10 | 10 | ||
11 | class EditWorkspaceScreen extends Component<StoresProps> { | 11 | class EditWorkspaceScreen extends Component<StoresProps> { |
12 | // @ts-expect-error Not all code paths return a value. | ||
13 | onDelete = () => { | 12 | onDelete = () => { |
14 | const { workspaceBeingEdited } = workspaceStore; | 13 | const { workspaceBeingEdited } = workspaceStore; |
15 | const { actions } = this.props; | 14 | const { actions } = this.props; |
16 | if (!workspaceBeingEdited) return null; | 15 | if (!workspaceBeingEdited) return; |
17 | actions.workspaces.delete({ workspace: workspaceBeingEdited }); | 16 | actions.workspaces.delete({ workspace: workspaceBeingEdited }); |
18 | }; | 17 | }; |
19 | 18 | ||