Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vitvakatu committed Jan 9, 2025
1 parent 094eafe commit 696e261
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/gui/src/dashboard/hooks/backendHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ function createUserGroupsWithUsers(
users: readonly backendModule.User[],
): readonly UserGroupInfoWithUsers[] {
return userGroups.map((userGroup) => {
const usersInGroup: readonly User[] = users.filter((user) =>
user.userGroups?.includes(userGroup.id),
const usersInGroup: readonly User[] = users.filter(
(user) => user.userGroups?.includes(userGroup.id) ?? false,
)
return { ...userGroup, users: usersInGroup }
})
Expand Down Expand Up @@ -476,6 +476,7 @@ 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
1 change: 1 addition & 0 deletions app/gui/src/dashboard/hooks/backendUploadFilesHooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,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 assetIsProject(asset): {
const { extension } = extractProjectExtension(file.name)
Expand Down
5 changes: 5 additions & 0 deletions app/gui/src/dashboard/services/RemoteBackend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,11 @@ export default class RemoteBackend extends Backend {
)
break
}
case backend.AssetType.secret:
case backend.AssetType.directory:
case backend.AssetType.specialLoading:
case backend.AssetType.specialEmpty:
case backend.AssetType.specialError:
default: {
invariant(`'${asset.type}' assets cannot be downloaded.`)
break
Expand Down

0 comments on commit 696e261

Please sign in to comment.