From b3a7ced5c7712b14e1fdfd60a62a3b6829621b24 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Fri, 10 Oct 2025 11:30:13 +0200 Subject: [PATCH] Lint --- ui/src/components/ClickOutside.tsx | 8 +++++++- ui/src/components/ProtectedRoute.tsx | 4 ---- ui/src/components/TabloTutorial.tsx | 4 +++- ui/src/hooks/feedback.ts | 4 +++- ui/src/hooks/support.ts | 4 +++- ui/src/pages/PublicBookingPage.tsx | 4 ++-- ui/src/pages/devis.tsx | 4 ++-- ui/src/pages/kanban.tsx | 2 +- ui/src/pages/planning.tsx | 7 ++----- ui/src/ui-library/button.tsx | 1 - ui/src/ui-library/hooks/use-clipboard.ts | 2 +- ui/src/ui-library/link.tsx | 2 +- ui/src/ui-library/meter.tsx | 4 ++-- ui/src/ui-library/notification-badge.tsx | 4 ++-- ui/src/ui-library/progress-bar.tsx | 2 +- ui/src/ui-library/slider.tsx | 6 +++--- ui/src/utils/helpers.ts | 4 ++-- ui/worker-configuration.d.ts | 2 ++ 18 files changed, 37 insertions(+), 31 deletions(-) diff --git a/ui/src/components/ClickOutside.tsx b/ui/src/components/ClickOutside.tsx index 2e3ebc2..4201465 100644 --- a/ui/src/components/ClickOutside.tsx +++ b/ui/src/components/ClickOutside.tsx @@ -21,7 +21,13 @@ export const ClickOutside: React.FC = ({ className, disabled = false, }) => { - const ref = useClickOutside(disabled ? () => {} : onClickOutside); + const ref = useClickOutside( + disabled + ? () => { + // Do nothing + } + : onClickOutside + ); return (
diff --git a/ui/src/components/ProtectedRoute.tsx b/ui/src/components/ProtectedRoute.tsx index 4213f26..ebc6729 100644 --- a/ui/src/components/ProtectedRoute.tsx +++ b/ui/src/components/ProtectedRoute.tsx @@ -4,10 +4,6 @@ import { Navigate, Outlet } from "react-router-dom"; import { match } from "ts-pattern"; import { LoadingSpinner } from "./LoadingSpinner"; -interface ProtectedRouteProps { - fallback?: string; -} - interface ProtectedRouteProps { fallback?: string; shouldRedirectToCurrentPage?: boolean; diff --git a/ui/src/components/TabloTutorial.tsx b/ui/src/components/TabloTutorial.tsx index c7f9fea..718f88d 100644 --- a/ui/src/components/TabloTutorial.tsx +++ b/ui/src/components/TabloTutorial.tsx @@ -63,7 +63,9 @@ const tutorialSteps: TutorialStep[] = [ "Vous êtes maintenant prêt à utiliser XTablo ! Créez votre premier Tablo pour démarrer votre projet.", target: "create-tablo-button", position: "bottom", - action: () => {}, // Will be set by the parent component + action: () => { + // Do nothing + }, // Will be set by the parent component }, ]; diff --git a/ui/src/hooks/feedback.ts b/ui/src/hooks/feedback.ts index c6ecdfb..2602a01 100644 --- a/ui/src/hooks/feedback.ts +++ b/ui/src/hooks/feedback.ts @@ -15,7 +15,9 @@ export const useCreateFeedback = () => { }); if (error) throw error; }, - onSuccess: () => {}, + onSuccess: () => { + // Do nothing + }, }); return { createFeedback: mutate, isSuccess, isPending }; diff --git a/ui/src/hooks/support.ts b/ui/src/hooks/support.ts index 80d0b01..002387d 100644 --- a/ui/src/hooks/support.ts +++ b/ui/src/hooks/support.ts @@ -23,7 +23,9 @@ export const useCreateSupportTicket = () => { }); if (error) throw error; }, - onSuccess: () => {}, + onSuccess: () => { + // Do nothing + }, }); return { createSupportTicket: mutate, isSuccess, isPending }; diff --git a/ui/src/pages/PublicBookingPage.tsx b/ui/src/pages/PublicBookingPage.tsx index 97f96ad..03a934c 100644 --- a/ui/src/pages/PublicBookingPage.tsx +++ b/ui/src/pages/PublicBookingPage.tsx @@ -123,7 +123,7 @@ export function PublicBookingPage() { // Create first day of month and get its day of week in CET const firstDayStr = `${year}-${String(month + 1).padStart(2, "0")}-01`; - const firstDay = new Date(firstDayStr + "T12:00:00"); + const firstDay = new Date(`${firstDayStr}T12:00:00`); const firstDayOfWeekInCET = new Date( firstDay.toLocaleString("en-US", { timeZone: "Europe/Paris" }) ).getDay(); @@ -148,7 +148,7 @@ export function PublicBookingPage() { 2, "0" )}`; - days.push(new Date(dayStr + "T12:00:00")); + days.push(new Date(`${dayStr}T12:00:00`)); } return days; diff --git a/ui/src/pages/devis.tsx b/ui/src/pages/devis.tsx index 2be8e3b..5e13a8f 100644 --- a/ui/src/pages/devis.tsx +++ b/ui/src/pages/devis.tsx @@ -130,7 +130,7 @@ export const DevisPage = () => { headerName: "TVA", valueFormatter: (params) => { if (params.value == null) return ""; - return params.value.toFixed(2) + " €"; + return `${params.value.toFixed(2)} €`; }, flex: 1, }, @@ -138,7 +138,7 @@ export const DevisPage = () => { field: "total", headerName: "Montant", valueFormatter: (params) => { - return params.value.toFixed(2) + " €"; + return `${params.value.toFixed(2)} €`; }, }, { diff --git a/ui/src/pages/kanban.tsx b/ui/src/pages/kanban.tsx index fc312fa..1a1b0d4 100644 --- a/ui/src/pages/kanban.tsx +++ b/ui/src/pages/kanban.tsx @@ -184,7 +184,7 @@ const createMockKanbanBoard = (tabloId: string, tabloName: string): KanbanBoardT ]; return { - id: "kanban-" + tabloId, + id: `kanban-${tabloId}`, name: `${tabloName} Kanban Board`, description: "Project task management board", tablo_id: tabloId, diff --git a/ui/src/pages/planning.tsx b/ui/src/pages/planning.tsx index e330c7e..25b6501 100644 --- a/ui/src/pages/planning.tsx +++ b/ui/src/pages/planning.tsx @@ -683,13 +683,10 @@ export const PlanningPage = () => {
diff --git a/ui/src/ui-library/notification-badge.tsx b/ui/src/ui-library/notification-badge.tsx index 0e4443f..8aa4b8f 100644 --- a/ui/src/ui-library/notification-badge.tsx +++ b/ui/src/ui-library/notification-badge.tsx @@ -20,7 +20,7 @@ export function NotificationBadge({ ...props }: NotificationBadgeProps) { if (props.variant === "dot") { - const { variant, inline, ...rest } = props; + const { inline, ...rest } = props; return ( <> @@ -41,7 +41,7 @@ export function NotificationBadge({ ); } - const { value, variant, inline, ...rest } = props; + const { inline, ...rest } = props; return ( <> diff --git a/ui/src/ui-library/progress-bar.tsx b/ui/src/ui-library/progress-bar.tsx index 3cf1500..94e4a34 100644 --- a/ui/src/ui-library/progress-bar.tsx +++ b/ui/src/ui-library/progress-bar.tsx @@ -24,7 +24,7 @@ export function ProgressBar({ label, ...props }: ProgressBarProps) {
diff --git a/ui/src/ui-library/slider.tsx b/ui/src/ui-library/slider.tsx index 1feedbd..e62bb82 100644 --- a/ui/src/ui-library/slider.tsx +++ b/ui/src/ui-library/slider.tsx @@ -92,9 +92,9 @@ function getTrackHighlightStyle( ) { const hasTwoThumbs = state.values.length == 2; const highlightPercentage = hasTwoThumbs - ? (state.getThumbPercent(1) - state.getThumbPercent(0)) * 100 + "%" - : state.getThumbPercent(0) * 100 + "%"; - const highlightStartPosition = hasTwoThumbs ? state.getThumbPercent(0) * 100 + "%" : "0"; + ? `${(state.getThumbPercent(1) - state.getThumbPercent(0)) * 100}%` + : `${state.getThumbPercent(0) * 100}%`; + const highlightStartPosition = hasTwoThumbs ? `${state.getThumbPercent(0) * 100}%` : "0"; return orientation === "horizontal" ? { diff --git a/ui/src/utils/helpers.ts b/ui/src/utils/helpers.ts index 48e97ea..9dc0afe 100644 --- a/ui/src/utils/helpers.ts +++ b/ui/src/utils/helpers.ts @@ -81,7 +81,7 @@ export const generateICSFromEvents = ( const formatDate = (date: string, time: string) => { // Combine date (YYYY-MM-DD) and time (HH:MM:SS) into ISO format then convert to UTC const dateTime = new Date(`${date}T${time}`); - return dateTime.toISOString().replace(/[-:]/g, "").split(".")[0] + "Z"; + return `${dateTime.toISOString().replace(/[-:]/g, "").split(".")[0]}Z`; }; const escapeICSText = (text: string) => { @@ -131,7 +131,7 @@ export const generateICSFromEvents = ( "END:VEVENT", ].filter((line) => line !== ""); // Remove empty lines - icsContent += "\r\n" + eventLines.join("\r\n"); + icsContent += `\r\n${eventLines.join("\r\n")}`; }); icsContent += "\r\n" + "END:VCALENDAR"; diff --git a/ui/worker-configuration.d.ts b/ui/worker-configuration.d.ts index 24f762a..04a3d6a 100644 --- a/ui/worker-configuration.d.ts +++ b/ui/worker-configuration.d.ts @@ -1,4 +1,6 @@ /* eslint-disable */ +// biome-ignore-all lint: workerd types + // Generated by Wrangler by running `wrangler types` (hash: 4c3222f3b88c589a38d89502fb4b6d06) // Runtime types generated with workerd@1.20250709.0 2025-07-11 declare namespace Cloudflare {