Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
chore: more eslint fixes
Kyle Mendell8bc6621fe114
diff --git a/src/app.d.ts b/src/app.d.tsindex a64ca3726..7b12d3230 100644--- a/src/app.d.ts+++ b/src/app.d.ts@@ -1,6 +1,5 @@import type { VolumeInspectInfo as OriginalVolumeInspectInfo } from 'dockerode';import type { User } from '$lib/types/user.type';-import type { UserSession } from '$lib/types/session.type';declare global {namespace App {diff --git a/src/hooks.server.ts b/src/hooks.server.tsindex 9c284b43c..fc7b9cff4 100644--- a/src/hooks.server.ts+++ b/src/hooks.server.ts@@ -54,7 +54,7 @@ const authHandler: Handle = async ({ event, resolve }) => {if (!event.locals.user) {try {event.locals.user = await getUserByUsername(session.username);- } catch (error) {+ } catch {// Invalid user in sessionawait event.locals.session.destroy();throw redirect(302, `/auth/login?error=invalid-session`);diff --git a/src/lib/components/dialogs/user-form-dialog.svelte b/src/lib/components/dialogs/user-form-dialog.svelteindex e635af850..1184f5925 100644--- a/src/lib/components/dialogs/user-form-dialog.svelte+++ b/src/lib/components/dialogs/user-form-dialog.svelte@@ -13,7 +13,7 @@userToEdit = $bindable<User | null>(null),roles = [],isLoading = $bindable(false),- onSubmit = $bindable((_data: { user: Partial<User> & { password?: string }; isEditMode: boolean; userId?: string }) => {})+ onSubmit = $bindable(() => {})}: {open?: boolean;userToEdit?: User | null;diff --git a/src/lib/components/form/form-input.svelte b/src/lib/components/form/form-input.svelteindex 95a575e0e..44477ea09 100644--- a/src/lib/components/form/form-input.svelte+++ b/src/lib/components/form/form-input.svelte@@ -14,7 +14,6 @@warningText,placeholder,disabled = false,- required = false,type = 'text',children,...restProps@@ -26,7 +25,6 @@warningText?: string;placeholder?: string;disabled?: boolean;- required?: boolean;type?: 'text' | 'password' | 'email' | 'number' | 'checkbox' | 'date';children?: Snippet;} = $props();@@ -45,7 +43,7 @@{#if children}{@render children()}{:else if input}- <Input {id} {placeholder} {type} bind:value={input.value} {disabled} required />+ <Input {id} {placeholder} {type} bind:value={input.value} {disabled} />{/if}{#if input?.error}<p class="mt-1 text-sm text-red-500">{input.error}</p>diff --git a/src/lib/components/universal-table.svelte b/src/lib/components/universal-table.svelteindex 24a15343d..e2cfe6b9a 100644--- a/src/lib/components/universal-table.svelte+++ b/src/lib/components/universal-table.svelte@@ -1,5 +1,5 @@<script lang="ts" generics="TData extends object">- import { getCoreRowModel, getPaginationRowModel, getSortedRowModel, type SortingState, getFilteredRowModel, type ColumnFiltersState, type RowData } from '@tanstack/table-core';+ import { getCoreRowModel, getPaginationRowModel, getSortedRowModel, type SortingState, getFilteredRowModel, type ColumnFiltersState } from '@tanstack/table-core';import { createSvelteTable, FlexRender } from '$lib/components/ui/data-table/index.js';import * as Table from '$lib/components/ui/table/index.js';import * as Pagination from '$lib/components/ui/pagination/index.js';@@ -39,7 +39,7 @@let sorting = $state<SortingState>(defaultSort ? [defaultSort] : []);let columnFilters = $state<ColumnFiltersState>([]);let globalFilter = $state<string>('');- let selectedRowIds = $state<Record<string, boolean>>({});+ let selectedRowIds = $derived<Record<string, boolean>>({});$effect(() => {const newTanstackSelectionState: Record<string, boolean> = {};diff --git a/src/lib/services/docker/stack-migration-service.ts b/src/lib/services/docker/stack-migration-service.tsindex 1153f4a1a..e4428227d 100644--- a/src/lib/services/docker/stack-migration-service.ts+++ b/src/lib/services/docker/stack-migration-service.ts@@ -26,7 +26,9 @@ export async function migrateStacksToNameFolders() {try {await fs.access(newMetaPath);continue; // Already migrated- } catch {}+ } catch {+ // intentionally empty, means .stack.json does not exist+ }// Check if stack is running before migrationlet wasRunning = false;@@ -118,7 +120,9 @@ export async function migrateStackToNameFolder(stackId: string): Promise<void> {try {await fs.access(newMetaPath);throw new Error(`Stack "${stackId}" is already migrated`);- } catch {}+ } catch {+ // intentionally empty, means .stack.json does not exist+ }// Check if stack is running before migrationlet wasRunning = false;diff --git a/src/lib/utils/fs.utils.ts b/src/lib/utils/fs.utils.tsindex af3cbcf09..b6270299a 100644--- a/src/lib/utils/fs.utils.ts+++ b/src/lib/utils/fs.utils.ts@@ -1,8 +1,5 @@import { promises as fs } from 'node:fs';-/**- * Helper function to check if a file exists- */export async function fileExists(filePath: string): Promise<boolean> {try {const stats = await fs.stat(filePath);