From 6017d9c54f95c2bdb16cfbbef7cfe3d8d541365d Mon Sep 17 00:00:00 2001 From: Lint Action Date: Sun, 20 Apr 2025 18:54:34 +0000 Subject: [PATCH] style: fix linting issues met Prettier --- backend/src/logging/initalize.ts | 2 +- frontend/src/config.ts | 5 ++++- frontend/src/controllers/base-controller.ts | 6 ++++-- frontend/tests/setup-backend.ts | 6 +++--- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/backend/src/logging/initalize.ts b/backend/src/logging/initalize.ts index f261d308..f89518c4 100644 --- a/backend/src/logging/initalize.ts +++ b/backend/src/logging/initalize.ts @@ -26,7 +26,7 @@ function initializeLogger(): Logger { const consoleTransport = new transports.Console({ level: getEnvVar(envVars.LogLevel), - format: format.combine(format.cli(), format.simple()) + format: format.combine(format.cli(), format.simple()), }); if (getEnvVar(envVars.RunMode) === 'dev') { diff --git a/frontend/src/config.ts b/frontend/src/config.ts index 60a63db4..76e7545c 100644 --- a/frontend/src/config.ts +++ b/frontend/src/config.ts @@ -4,7 +4,10 @@ export const apiConfig = { return import.meta.env.VITE_API_BASE_URL; } - if (window.location.hostname === "localhost" && !(window.location.port === "80" || window.location.port === "")) { + if ( + window.location.hostname === "localhost" && + !(window.location.port === "80" || window.location.port === "") + ) { return "http://localhost:3000/api"; } diff --git a/frontend/src/controllers/base-controller.ts b/frontend/src/controllers/base-controller.ts index 32561753..64f2363d 100644 --- a/frontend/src/controllers/base-controller.ts +++ b/frontend/src/controllers/base-controller.ts @@ -1,7 +1,7 @@ import apiClient from "@/services/api-client/api-client.ts"; import type { AxiosResponse, ResponseType } from "axios"; import { HttpErrorResponseException } from "@/exception/http-error-response-exception.ts"; -import { apiConfig } from '@/config.ts'; +import { apiConfig } from "@/config.ts"; export abstract class BaseController { protected basePath: string; @@ -25,7 +25,9 @@ export abstract class BaseController { if (error instanceof HttpErrorResponseException) { throw error; } - throw new Error(`An unexpected error occurred while fetching data from ${apiConfig.baseUrl}${this.absolutePathFor(path)}: ${error}`); + throw new Error( + `An unexpected error occurred while fetching data from ${apiConfig.baseUrl}${this.absolutePathFor(path)}: ${error}`, + ); } } diff --git a/frontend/tests/setup-backend.ts b/frontend/tests/setup-backend.ts index 4eedfda1..71cc1480 100644 --- a/frontend/tests/setup-backend.ts +++ b/frontend/tests/setup-backend.ts @@ -1,5 +1,5 @@ import { spawn } from "child_process"; -import { ChildProcess, spawnSync } from 'node:child_process'; +import { ChildProcess, spawnSync } from "node:child_process"; let backendProcess: ChildProcess; @@ -27,8 +27,8 @@ export async function setup(): Promise { stdio: "inherit", env: { ...process.env, - NODE_ENV: 'test', - } + NODE_ENV: "test", + }, }); // Wait until you can curl the backend