From 1ccc1ac11a3e50d50087fe29ea7336e6f174356f Mon Sep 17 00:00:00 2001 From: EthanHealy01 Date: Mon, 29 Sep 2025 20:30:51 +0100 Subject: [PATCH] linter --- .../components/tools/adjustContrast/AdjustContrastPreview.tsx | 2 +- frontend/src/components/tools/adjustContrast/utils.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/tools/adjustContrast/AdjustContrastPreview.tsx b/frontend/src/components/tools/adjustContrast/AdjustContrastPreview.tsx index eae0ff047..a50fb98ca 100644 --- a/frontend/src/components/tools/adjustContrast/AdjustContrastPreview.tsx +++ b/frontend/src/components/tools/adjustContrast/AdjustContrastPreview.tsx @@ -31,7 +31,7 @@ export default function AdjustContrastPreview({ file, parameters }: Props) { }, [file, requestThumbnail]); useEffect(() => { - let revoked: string | null = null; + const revoked: string | null = null; const render = async () => { if (!thumb || !canvasRef.current) return; const img = new Image(); diff --git a/frontend/src/components/tools/adjustContrast/utils.ts b/frontend/src/components/tools/adjustContrast/utils.ts index f18dd8ba1..16dfc199f 100644 --- a/frontend/src/components/tools/adjustContrast/utils.ts +++ b/frontend/src/components/tools/adjustContrast/utils.ts @@ -38,7 +38,8 @@ export function applyAdjustmentsToCanvas(src: HTMLCanvasElement, params: AdjustC // Saturation via HSL const rn = r / 255, gn = g / 255, bn = b / 255; const max = Math.max(rn, gn, bn); const min = Math.min(rn, gn, bn); - let h = 0, s = 0, l = (max + min) / 2; + let h = 0, s = 0; + const l = (max + min) / 2; if (max !== min) { const d = max - min; s = l > 0.5 ? d / (2 - max - min) : d / (max + min);