From 7713fe9a0ad4573afdce0af39944c5f9552e4ca9 Mon Sep 17 00:00:00 2001 From: Alessandro Bortolin Date: Sat, 13 Jul 2024 17:37:49 +0200 Subject: [PATCH] Minor fixes --- frontend/app/contestant/[id]/page.tsx | 2 +- frontend/biome.json | 2 +- frontend/components/search.tsx | 2 +- frontend/components/table.tsx | 2 +- frontend/package.json | 2 +- frontend/webpack/image-loader.mjs | 20 ++++++++++---------- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/frontend/app/contestant/[id]/page.tsx b/frontend/app/contestant/[id]/page.tsx index 596b9724ba..ad02b35a0c 100644 --- a/frontend/app/contestant/[id]/page.tsx +++ b/frontend/app/contestant/[id]/page.tsx @@ -22,7 +22,7 @@ export async function generateMetadata({ params: { id } }: Props): Promise - + diff --git a/frontend/components/table.tsx b/frontend/components/table.tsx index a1f44ae0bf..45e2ae6fe3 100644 --- a/frontend/components/table.tsx +++ b/frontend/components/table.tsx @@ -7,7 +7,7 @@ export function Table({ className, children }: { className?: string; children: R
{children} diff --git a/frontend/package.json b/frontend/package.json index bd1e333c58..9a5c08047f 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -4,7 +4,7 @@ "scripts": { "dev": "next dev", "build": "next build", - "lint": "yarn biome check --write" + "lint": "biome check --write" }, "dependencies": { "@olinfo/react-components": "^0.4", diff --git a/frontend/webpack/image-loader.mjs b/frontend/webpack/image-loader.mjs index 2e576adc84..4e9bce4fd1 100644 --- a/frontend/webpack/image-loader.mjs +++ b/frontend/webpack/image-loader.mjs @@ -1,8 +1,8 @@ -import { join, extname } from "node:path"; +import { extname, join } from "node:path"; +import sizeOf from "image-size"; import { interpolateName } from "loader-utils"; import sharp from "sharp"; -import sizeOf from "image-size"; /** * @this {import("webpack").loader.LoaderContext} @@ -29,11 +29,13 @@ export default async function imageLoader(source) { if (!isDev && (width || height)) { const [_1x, _2x, _3x] = await Promise.all( - [1, 2, 3].map((factor) => optimizeImage(this, { - width: width && factor * width, - height: height && factor * height, - fit, - })) + [1, 2, 3].map((factor) => + optimizeImage(this, { + width: width && factor * width, + height: height && factor * height, + fit, + }), + ), ); image = _1x; image.srcSet = `${_1x.src} 1x, ${_2x.src} 2x, ${_3x.src} 3x`; @@ -64,9 +66,7 @@ function emitFile(ctx, name, data) { const { compilerType, isDev } = ctx.getOptions(); const fileName = interpolateName(ctx, name, { content: data }); - const outputPath = compilerType === "client" - ? fileName - : join("..", isDev ? "" : "..", fileName); + const outputPath = compilerType === "client" ? fileName : join("..", isDev ? "" : "..", fileName); ctx.emitFile(outputPath, data); return join("/_next", fileName);