From 6f69ca91af35748eabf5cd1464efdb842a2b87e3 Mon Sep 17 00:00:00 2001 From: Settel Date: Sun, 18 Feb 2024 14:06:34 +0100 Subject: [PATCH] chore: fix linter warnings --- client/src/composables/engine/fetchUpdate.ts | 2 +- client/src/composables/engine/gameManagement.ts | 2 +- client/src/composables/engine/gameState.ts | 2 +- client/src/composables/engine/play.ts | 2 +- client/src/composables/engine/quotes.ts | 5 +++-- client/src/composables/engine/setupApp.ts | 3 +-- client/src/composables/engine/startStop.ts | 2 +- client/src/composables/useAlert.ts | 3 ++- client/src/composables/useEngine.ts | 6 ++++-- 9 files changed, 15 insertions(+), 12 deletions(-) diff --git a/client/src/composables/engine/fetchUpdate.ts b/client/src/composables/engine/fetchUpdate.ts index f72817b..9cd926b 100644 --- a/client/src/composables/engine/fetchUpdate.ts +++ b/client/src/composables/engine/fetchUpdate.ts @@ -3,9 +3,9 @@ import { useUserinfoStore } from "@/stores/UserinfoStore" import { useGameinfoStore } from "@/stores/GameinfoStore" import { useRoundStore } from "@/stores/RoundStore" import { usePlayersStore } from "@/stores/PlayersStore" -import { EngineContext } from '@/composables/useEngine' import useAlert from '@/composables/useAlert' import useI18n from '@/composables/useI18n' +import type { EngineContext } from '@/composables/useEngine' type EngineResponse = { version: string, diff --git a/client/src/composables/engine/gameManagement.ts b/client/src/composables/engine/gameManagement.ts index 8e6ff7c..f74ced9 100644 --- a/client/src/composables/engine/gameManagement.ts +++ b/client/src/composables/engine/gameManagement.ts @@ -1,5 +1,5 @@ -import { EngineContext } from '@/composables/useEngine' import { useUserinfoStore } from "@/stores/UserinfoStore" +import type { EngineContext } from '@/composables/useEngine' import type { GameInfo, GameInfos, PlayerEdit, Lang, CreateGameStatus } from '@/composables/engine.d' export async function fetchGameInfo(this: EngineContext): Promise { diff --git a/client/src/composables/engine/gameState.ts b/client/src/composables/engine/gameState.ts index fc88fa3..0724748 100644 --- a/client/src/composables/engine/gameState.ts +++ b/client/src/composables/engine/gameState.ts @@ -1,5 +1,5 @@ -import { EngineContext } from '@/composables/useEngine' import { useUserinfoStore } from "@/stores/UserinfoStore" +import type { EngineContext } from '@/composables/useEngine' export async function collectQuotes(this: EngineContext): Promise { const userInfoStore = useUserinfoStore() diff --git a/client/src/composables/engine/play.ts b/client/src/composables/engine/play.ts index 5a3c525..844d3d7 100644 --- a/client/src/composables/engine/play.ts +++ b/client/src/composables/engine/play.ts @@ -1,5 +1,5 @@ import { useUserinfoStore } from "@/stores/UserinfoStore" -import { EngineContext } from '@/composables/useEngine' +import type { EngineContext } from '@/composables/useEngine' export async function saveSelection(this: EngineContext, selection: string): Promise { const userInfoStore = useUserinfoStore() diff --git a/client/src/composables/engine/quotes.ts b/client/src/composables/engine/quotes.ts index 2e4b703..cc05fc9 100644 --- a/client/src/composables/engine/quotes.ts +++ b/client/src/composables/engine/quotes.ts @@ -1,7 +1,8 @@ -import { Ref, ref } from 'vue' +import { ref } from 'vue' import type { Quotes } from '@/composables/engine.d' import { useUserinfoStore } from "@/stores/UserinfoStore" -import { EngineContext } from '@/composables/useEngine' +import type { Ref } from 'vue' +import type { EngineContext } from '@/composables/useEngine' type QuotesResponse = { quotes: Quotes diff --git a/client/src/composables/engine/setupApp.ts b/client/src/composables/engine/setupApp.ts index bb7b730..42dd8c4 100644 --- a/client/src/composables/engine/setupApp.ts +++ b/client/src/composables/engine/setupApp.ts @@ -1,5 +1,4 @@ -import { useUserinfoStore } from "@/stores/UserinfoStore" -import { EngineContext } from '@/composables/useEngine' +import type { EngineContext } from '@/composables/useEngine' export async function setupApp(this: EngineContext, authcode: string): Promise { await this.callApi('/api/setupApp', { diff --git a/client/src/composables/engine/startStop.ts b/client/src/composables/engine/startStop.ts index 8a957c2..30c087a 100644 --- a/client/src/composables/engine/startStop.ts +++ b/client/src/composables/engine/startStop.ts @@ -1,6 +1,6 @@ import { useUserinfoStore } from "@/stores/UserinfoStore" -import { EngineContext } from '@/composables/useEngine' import useAlert from '@/composables/useAlert' +import type { EngineContext } from '@/composables/useEngine' export function start(this: EngineContext): void { if (this.isActive && !this.shouldStop) { diff --git a/client/src/composables/useAlert.ts b/client/src/composables/useAlert.ts index d0b9b7b..e853fe5 100644 --- a/client/src/composables/useAlert.ts +++ b/client/src/composables/useAlert.ts @@ -1,4 +1,5 @@ -import { Ref, ref } from 'vue' +import { ref } from 'vue' +import type { Ref } from 'vue' export type AlertMessages = Array diff --git a/client/src/composables/useEngine.ts b/client/src/composables/useEngine.ts index f034fe2..afe6710 100644 --- a/client/src/composables/useEngine.ts +++ b/client/src/composables/useEngine.ts @@ -1,5 +1,5 @@ -import { Ref, ref } from 'vue' -import { callApi, QueryParams } from '@/composables/engine/callApi' +import { ref } from 'vue' +import { callApi } from '@/composables/engine/callApi' import { start, stop } from '@/composables/engine/startStop' import { setupApp } from '@/composables/engine/setupApp' import { fetchUpdate } from '@/composables/engine/fetchUpdate' @@ -7,6 +7,8 @@ import { loadQuotes, getQuotesRef, deleteQuote, saveQuote } from '@/composables/ import { fetchGameInfo, fetchGameInfos, setGameLang, setGameName, savePlayer, removePlayer, createGame, cameo, logoutCameo } from '@/composables/engine/gameManagement' import { collectQuotes, startGame, continueGame, resetGame, finishGame, disableGame, removeGame } from '@/composables/engine/gameState' import { saveSelection } from '@/composables/engine/play' +import type { Ref } from 'vue' +import type { QueryParams } from '@/composables/engine/callApi' import type { Quotes, GameInfo, GameInfos, PlayerEdit, Lang, CreateGameStatus } from '@/composables/engine.d' export interface EngineContext {