From f8e2f64316354b36099a01eef0735ec0970f5b99 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Wed, 26 Mar 2025 19:40:28 +0100 Subject: frontend: Migrate to eslint-plugin-svelte 3.0 This includes a migration to a flat eslint.config.js, which will now also automatically ignore items from .gitignore. eslint-plugin-svelte 3.0 comes with a couple of changes to recommended rules as well, these are also addressed in this commit. --- frontend/src/gql/Utils.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'frontend/src/gql/Utils.ts') diff --git a/frontend/src/gql/Utils.ts b/frontend/src/gql/Utils.ts index 177dff0..6fedd05 100644 --- a/frontend/src/gql/Utils.ts +++ b/frontend/src/gql/Utils.ts @@ -19,6 +19,7 @@ export function omitIdentifiers<T extends { __typename?: unknown; id: number }>( return omit(obj, '__typename', 'id'); } +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function isSuccess(object: any): object is gql.Success { if (object.__typename === undefined) { return false; @@ -27,6 +28,7 @@ export function isSuccess(object: any): object is gql.Success { return object.__typename.endsWith('Success') && (object as gql.Success).message !== undefined; } +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function isError(object: any): object is gql.Error { if (object.__typename === undefined) { return false; -- cgit v1.2.3-2-gb3c3