diff --git a/frontend/src/hooks.server.ts b/frontend/src/hooks.server.ts index 060542562..126489f70 100644 --- a/frontend/src/hooks.server.ts +++ b/frontend/src/hooks.server.ts @@ -28,7 +28,7 @@ async function initI18n(event: RequestEvent): Promise { await loadI18n(); } -// eslint-disable-next-line func-style +// eslint-disable-next-line func-style, @typescript-eslint/unbound-method export const handle: Handle = ({event, resolve}) => { console.log(`HTTP request: ${event.request.method} ${event.request.url}`); event.locals.getUser = () => getUser(event.cookies); diff --git a/frontend/src/lib/error/UnexpectedErrorAlert.svelte b/frontend/src/lib/error/UnexpectedErrorAlert.svelte index cdee30d3e..62e3674ad 100644 --- a/frontend/src/lib/error/UnexpectedErrorAlert.svelte +++ b/frontend/src/lib/error/UnexpectedErrorAlert.svelte @@ -16,6 +16,7 @@ error.subscribe((e) => { dialog = dialog ?? (browser ? document.querySelector('.error-alert') : undefined) ?? undefined; if (!dialog) return; + // eslint-disable-next-line @typescript-eslint/no-unused-expressions e ? open() : close(); }) ); diff --git a/frontend/src/lib/forms/Form.svelte b/frontend/src/lib/forms/Form.svelte index c7cedbb40..cb135ec73 100644 --- a/frontend/src/lib/forms/Form.svelte +++ b/frontend/src/lib/forms/Form.svelte @@ -6,6 +6,7 @@ export let enhance: AnySuperForm['enhance'] | undefined = undefined; function enhanceIfRequested(...args: Parameters): void { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions enhance && enhance(...args); } diff --git a/frontend/src/lib/forms/FormField.svelte b/frontend/src/lib/forms/FormField.svelte index 928aae4fb..c2210914a 100644 --- a/frontend/src/lib/forms/FormField.svelte +++ b/frontend/src/lib/forms/FormField.svelte @@ -22,6 +22,7 @@ onMount(autofocusIfRequested); function autofocusIfRequested(): void { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions autofocus && elem.querySelector('input, select, textarea')?.focus(); } diff --git a/frontend/src/lib/i18n/index.ts b/frontend/src/lib/i18n/index.ts index 1963006b7..5979ed375 100644 --- a/frontend/src/lib/i18n/index.ts +++ b/frontend/src/lib/i18n/index.ts @@ -146,6 +146,7 @@ export function tScoped(scope: Scope): Readable<(key: D export function tTypeScoped(scope: I18nShapeKey): Readable<(key: DeepPathsToString, values?: InterpolationValues) => string> { return derived(t, tFunc => (key: DeepPathsToString, values?: InterpolationValues) => + // eslint-disable-next-line @typescript-eslint/no-base-to-string tFunc(`${String(scope)}.${String(key)}` as I18nKey, values)); } diff --git a/frontend/src/lib/layout/DevContent.svelte b/frontend/src/lib/layout/DevContent.svelte index e2de904f1..0c02949f8 100644 --- a/frontend/src/lib/layout/DevContent.svelte +++ b/frontend/src/lib/layout/DevContent.svelte @@ -9,6 +9,7 @@ if (browser) { globalThis.enableDevMode = (enable = true) => { isDev.set(enable); + // eslint-disable-next-line @typescript-eslint/no-unused-expressions enable ? localStorage.setItem('devMode', 'true') : localStorage.removeItem('devMode'); }; isDev.set(localStorage.getItem('devMode') === 'true'); diff --git a/frontend/src/lib/user.ts b/frontend/src/lib/user.ts index eb7ae5e8c..1616086ed 100644 --- a/frontend/src/lib/user.ts +++ b/frontend/src/lib/user.ts @@ -229,6 +229,7 @@ function stringToUuid(str: string): string { } export function logout(cookies?: Cookies): void { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions cookies && deleteCookie(AUTH_COOKIE_NAME, cookies); if (browser && window.location.pathname !== '/login') { redirect(307, '/login'); diff --git a/frontend/src/routes/(authenticated)/project/[project_code]/+page.ts b/frontend/src/routes/(authenticated)/project/[project_code]/+page.ts index 01f535418..ff48501d2 100644 --- a/frontend/src/routes/(authenticated)/project/[project_code]/+page.ts +++ b/frontend/src/routes/(authenticated)/project/[project_code]/+page.ts @@ -609,6 +609,7 @@ export async function _refreshProjectRepoInfo(projectCode: string): Promise