Skip to content

Commit

Permalink
add switch-exhaustiveness-check exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Frizi committed Jan 6, 2025
1 parent a110035 commit a9900e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/gui/src/dashboard/hooks/backendHooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions app/gui/src/dashboard/layouts/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit a9900e8

Please sign in to comment.