From a9900e844d664bc720d3390627c594e1f517b86b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Grabarz?= Date: Mon, 6 Jan 2025 23:07:12 +0100 Subject: [PATCH] add switch-exhaustiveness-check exceptions --- app/gui/src/dashboard/hooks/backendHooks.tsx | 5 +++++ app/gui/src/dashboard/layouts/Editor.tsx | 1 + 2 files changed, 6 insertions(+) diff --git a/app/gui/src/dashboard/hooks/backendHooks.tsx b/app/gui/src/dashboard/hooks/backendHooks.tsx index 60896c17dab1..4447c942e4b6 100644 --- a/app/gui/src/dashboard/hooks/backendHooks.tsx +++ b/app/gui/src/dashboard/hooks/backendHooks.tsx @@ -396,6 +396,8 @@ export function useAssetPassiveListener( parentsPath: '', virtualParentsPath: '', } + + // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check switch (true) { case assetId === USERS_DIRECTORY_ID: { return { @@ -484,6 +486,8 @@ export function useAsset(options: UseAssetOptions) { parentsPath: '', virtualParentsPath: '', } + + // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check switch (true) { case assetId === USERS_DIRECTORY_ID: { return { @@ -919,6 +923,7 @@ export function useUploadFiles(backend: Backend, category: Category) { if (file != null) { const fileId = method === 'new' ? null : asset.id + // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check switch (true) { case backendModule.assetIsProject(asset): { const { extension } = backendModule.extractProjectExtension(file.name) diff --git a/app/gui/src/dashboard/layouts/Editor.tsx b/app/gui/src/dashboard/layouts/Editor.tsx index 073a28951a89..81cf8068c572 100644 --- a/app/gui/src/dashboard/layouts/Editor.tsx +++ b/app/gui/src/dashboard/layouts/Editor.tsx @@ -147,6 +147,7 @@ function Editor(props: EditorProps) { data-testid="editor" > {(() => { + // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check switch (true) { case projectQuery.isError: return (