From 257b0f2863facb1f0cd728dba3c7e6ce337ffb77 Mon Sep 17 00:00:00 2001 From: Mishig Date: Thu, 28 Sep 2023 17:40:26 +0200 Subject: [PATCH] Run linter (#975) * npm run format:all * add eslint `alphabetize` * Revert "add eslint `alphabetize`" This reverts commit 68c6c5ae044c6804c118013aebca19a7dc808fb4. --- js/src/lib/components/InferenceWidget/shared/helpers.ts | 6 +++--- js/src/lib/components/InferenceWidget/shared/types.ts | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/js/src/lib/components/InferenceWidget/shared/helpers.ts b/js/src/lib/components/InferenceWidget/shared/helpers.ts index 9e04438e7..62e8824e5 100644 --- a/js/src/lib/components/InferenceWidget/shared/helpers.ts +++ b/js/src/lib/components/InferenceWidget/shared/helpers.ts @@ -185,11 +185,11 @@ export async function getModelLoadInfo( const output = await response.json(); if (response.ok && typeof output === "object" && output.loaded !== undefined) { // eslint-disable-next-line @typescript-eslint/naming-convention - const {state, compute_type} = output; - return {compute_type, state}; + const { state, compute_type } = output; + return { compute_type, state }; } else { console.warn(response.status, output.error); - return {state: "error" }; + return { state: "error" }; } } diff --git a/js/src/lib/components/InferenceWidget/shared/types.ts b/js/src/lib/components/InferenceWidget/shared/types.ts index 01aa6026f..c8ff2fe3f 100644 --- a/js/src/lib/components/InferenceWidget/shared/types.ts +++ b/js/src/lib/components/InferenceWidget/shared/types.ts @@ -11,7 +11,6 @@ export interface WidgetProps { isLoggedIn?: boolean; } - export type LoadState = "Loadable" | "Loaded" | "TooBig" | "error"; export type ComputeType = "cpu" | "gpu";