diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ef9dc8adae..98da1a783a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -96,7 +96,11 @@ jobs: if: ${{ !cancelled() }} - name: Run svelte checks - run: npm run check + run: npm run check:svelte + if: ${{ !cancelled() }} + + - name: Run tsc + run: npm run check:typescript if: ${{ !cancelled() }} - name: Run unit tests & coverage diff --git a/web/package.json b/web/package.json index 90673a3a3e..09df801a19 100644 --- a/web/package.json +++ b/web/package.json @@ -6,9 +6,10 @@ "build": "vite build", "package": "svelte-kit package", "preview": "vite preview", - "check": "svelte-check --no-tsconfig --fail-on-warnings --ignore \"src/api/open-api\"", - "check:watch": "npm run check -- --watch", - "check:code": "npm run format && npm run lint && npm run check", + "check:svelte": "svelte-check --no-tsconfig --fail-on-warnings --ignore \"src/api/open-api\"", + "check:typescript": "tsc --noEmit", + "check:watch": "npm run check:svelte -- --watch", + "check:code": "npm run format && npm run lint && npm run check:svelte && npm run check:typescript", "check:all": "npm run check:code && npm run test:cov", "lint": "eslint . --max-warnings 0", "lint:fix": "npm run lint -- --fix", diff --git a/web/src/api/utils.ts b/web/src/api/utils.ts index c7fa62bfad..39c319901f 100644 --- a/web/src/api/utils.ts +++ b/web/src/api/utils.ts @@ -1,6 +1,6 @@ -import { AxiosError, AxiosPromise } from 'axios'; +import type { AxiosError, AxiosPromise } from 'axios'; import { api } from './api'; -import { UserResponseDto } from './open-api'; +import type { UserResponseDto } from './open-api'; export type ApiError = AxiosError<{ message: string }>; diff --git a/web/src/hooks.server.ts b/web/src/hooks.server.ts index 959ed5e3eb..8998257e75 100644 --- a/web/src/hooks.server.ts +++ b/web/src/hooks.server.ts @@ -1,6 +1,6 @@ -import type { Handle, HandleServerError } from '@sveltejs/kit'; -import { AxiosError, AxiosResponse } from 'axios'; import { env } from '$env/dynamic/public'; +import type { Handle, HandleServerError } from '@sveltejs/kit'; +import type { AxiosError, AxiosResponse } from 'axios'; import { ImmichApi } from './api/api'; export const handle = (async ({ event, resolve }) => { diff --git a/web/src/lib/components/admin-page/jobs/jobs-panel.svelte b/web/src/lib/components/admin-page/jobs/jobs-panel.svelte index 06a3d05a5a..5930cfa41b 100644 --- a/web/src/lib/components/admin-page/jobs/jobs-panel.svelte +++ b/web/src/lib/components/admin-page/jobs/jobs-panel.svelte @@ -3,10 +3,11 @@ notificationController, NotificationType } from '$lib/components/shared-components/notification/notification'; + import { AppRoute } from '$lib/constants'; import { handleError } from '$lib/utils/handle-error'; import { AllJobStatusResponseDto, api, JobCommand, JobCommandDto, JobName } from '@api'; import type { ComponentType } from 'svelte'; - import Icon from 'svelte-material-icons/DotsVertical.svelte'; + import type Icon from 'svelte-material-icons/DotsVertical.svelte'; import FaceRecognition from 'svelte-material-icons/FaceRecognition.svelte'; import FileJpgBox from 'svelte-material-icons/FileJpgBox.svelte'; import FileXmlBox from 'svelte-material-icons/FileXmlBox.svelte'; @@ -19,7 +20,6 @@ import ConfirmDialogue from '../../shared-components/confirm-dialogue.svelte'; import JobTile from './job-tile.svelte'; import StorageMigrationDescription from './storage-migration-description.svelte'; - import { AppRoute } from '$lib/constants'; export let jobs: AllJobStatusResponseDto; diff --git a/web/src/lib/components/admin-page/server-stats/server-stats-panel.svelte b/web/src/lib/components/admin-page/server-stats/server-stats-panel.svelte index c1b73f9a4b..c1d26f1151 100644 --- a/web/src/lib/components/admin-page/server-stats/server-stats-panel.svelte +++ b/web/src/lib/components/admin-page/server-stats/server-stats-panel.svelte @@ -1,11 +1,11 @@ - -