From 5e21200d44f5243d25621a007a8ba1f597c4aba7 Mon Sep 17 00:00:00 2001 From: WA11AX Date: Wed, 13 Aug 2025 07:50:35 +0300 Subject: [PATCH 1/4] style: format repository with Prettier --- .eslintrc.json | 7 +- client/src/components/tournament-card.tsx | 1 - client/src/components/ui/accordion.tsx | 2 +- client/src/components/ui/alert-dialog.tsx | 4 +- client/src/components/ui/alert.tsx | 4 +- client/src/components/ui/avatar.tsx | 2 +- client/src/components/ui/badge.tsx | 2 +- client/src/components/ui/breadcrumb.tsx | 8 +-- client/src/components/ui/button.tsx | 4 +- client/src/components/ui/calendar.tsx | 4 +- client/src/components/ui/card.tsx | 12 ++-- client/src/components/ui/carousel.tsx | 21 +++--- client/src/components/ui/chart.tsx | 24 ++++--- client/src/components/ui/checkbox.tsx | 2 +- client/src/components/ui/command.tsx | 8 +-- client/src/components/ui/context-menu.tsx | 12 ++-- client/src/components/ui/dialog.tsx | 4 +- client/src/components/ui/drawer.tsx | 2 +- client/src/components/ui/dropdown-menu.tsx | 12 ++-- client/src/components/ui/form.tsx | 2 +- client/src/components/ui/hover-card.tsx | 2 +- client/src/components/ui/input-otp.tsx | 4 +- client/src/components/ui/input.tsx | 4 +- client/src/components/ui/label.tsx | 2 +- client/src/components/ui/menubar.tsx | 16 ++--- client/src/components/ui/navigation-menu.tsx | 8 +-- client/src/components/ui/pagination.tsx | 6 +- client/src/components/ui/popover.tsx | 2 +- client/src/components/ui/radio-group.tsx | 2 +- client/src/components/ui/resizable.tsx | 2 +- client/src/components/ui/scroll-area.tsx | 2 +- client/src/components/ui/select.tsx | 8 +-- client/src/components/ui/separator.tsx | 2 +- client/src/components/ui/sheet.tsx | 4 +- client/src/components/ui/sidebar.tsx | 74 ++++++++++---------- client/src/components/ui/switch.tsx | 4 +- client/src/components/ui/table.tsx | 8 +-- client/src/components/ui/tabs.tsx | 6 +- client/src/components/ui/textarea.tsx | 4 +- client/src/components/ui/toast.tsx | 8 +-- client/src/components/ui/toggle-group.tsx | 2 +- client/src/components/ui/toggle.tsx | 2 +- client/src/components/ui/tooltip.tsx | 2 +- client/src/hooks/use-toast.ts | 2 +- client/src/lib/queryClient.ts | 2 +- client/src/lib/websocket.ts | 10 +-- client/src/pages/admin.tsx | 2 +- client/src/pages/tournament-detail.tsx | 1 - client/src/pages/tournaments.tsx | 1 - server/auth.ts | 3 +- server/db.ts | 1 - server/errorHandler.ts | 7 +- server/index.ts | 2 +- server/logger.ts | 13 ++-- server/middleware.ts | 5 +- server/rateLimiter.simple.ts | 1 - server/rateLimiter.ts | 9 +-- server/routes.ts | 9 ++- server/storage.ts | 2 +- server/validation.ts | 13 ++-- server/vite.ts | 2 +- 61 files changed, 193 insertions(+), 203 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index a64ed3f..f2b7fac 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -34,7 +34,10 @@ // Import/Export rules // General code quality rules - "no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }], + "no-unused-vars": [ + "error", + { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" } + ], "prefer-const": "error", "no-var": "error", "no-console": "warn", @@ -95,4 +98,4 @@ } } ] -} \ No newline at end of file +} diff --git a/client/src/components/tournament-card.tsx b/client/src/components/tournament-card.tsx index 9be3d2d..c1e4769 100644 --- a/client/src/components/tournament-card.tsx +++ b/client/src/components/tournament-card.tsx @@ -201,4 +201,3 @@ export default function TournamentCard({ ); } - diff --git a/client/src/components/ui/accordion.tsx b/client/src/components/ui/accordion.tsx index ea6e3c2..743c06c 100644 --- a/client/src/components/ui/accordion.tsx +++ b/client/src/components/ui/accordion.tsx @@ -23,7 +23,7 @@ const AccordionTrigger = React.forwardRef< ref={ref} className={cn( "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", - className, + className )} {...props} > diff --git a/client/src/components/ui/alert-dialog.tsx b/client/src/components/ui/alert-dialog.tsx index 4295eea..26dbc7e 100644 --- a/client/src/components/ui/alert-dialog.tsx +++ b/client/src/components/ui/alert-dialog.tsx @@ -17,7 +17,7 @@ const AlertDialogOverlay = React.forwardRef< diff --git a/client/src/components/ui/alert.tsx b/client/src/components/ui/alert.tsx index 09e9d8d..b7fc38a 100644 --- a/client/src/components/ui/alert.tsx +++ b/client/src/components/ui/alert.tsx @@ -16,7 +16,7 @@ const alertVariants = cva( defaultVariants: { variant: "default", }, - }, + } ); const Alert = React.forwardRef< @@ -34,7 +34,7 @@ const AlertTitle = React.forwardRef - ), + ) ); AlertTitle.displayName = "AlertTitle"; diff --git a/client/src/components/ui/avatar.tsx b/client/src/components/ui/avatar.tsx index 13248f4..1284c5f 100644 --- a/client/src/components/ui/avatar.tsx +++ b/client/src/components/ui/avatar.tsx @@ -35,7 +35,7 @@ const AvatarFallback = React.forwardRef< ref={ref} className={cn( "flex h-full w-full items-center justify-center rounded-full bg-muted", - className, + className )} {...props} /> diff --git a/client/src/components/ui/badge.tsx b/client/src/components/ui/badge.tsx index 80c2ca5..29e8c26 100644 --- a/client/src/components/ui/badge.tsx +++ b/client/src/components/ui/badge.tsx @@ -19,7 +19,7 @@ const badgeVariants = cva( defaultVariants: { variant: "default", }, - }, + } ); export interface BadgeProps diff --git a/client/src/components/ui/breadcrumb.tsx b/client/src/components/ui/breadcrumb.tsx index d8fb62b..d6d910c 100644 --- a/client/src/components/ui/breadcrumb.tsx +++ b/client/src/components/ui/breadcrumb.tsx @@ -18,18 +18,18 @@ const BreadcrumbList = React.forwardRef - ), + ) ); BreadcrumbList.displayName = "BreadcrumbList"; const BreadcrumbItem = React.forwardRef>( ({ className, ...props }, ref) => (
  • - ), + ) ); BreadcrumbItem.displayName = "BreadcrumbItem"; @@ -61,7 +61,7 @@ const BreadcrumbPage = React.forwardRef - ), + ) ); BreadcrumbPage.displayName = "BreadcrumbPage"; diff --git a/client/src/components/ui/button.tsx b/client/src/components/ui/button.tsx index 2258336..11735fc 100644 --- a/client/src/components/ui/button.tsx +++ b/client/src/components/ui/button.tsx @@ -27,7 +27,7 @@ const buttonVariants = cva( variant: "default", size: "default", }, - }, + } ); export interface ButtonProps @@ -42,7 +42,7 @@ const Button = React.forwardRef( return ( ); - }, + } ); Button.displayName = "Button"; diff --git a/client/src/components/ui/calendar.tsx b/client/src/components/ui/calendar.tsx index 084fb38..e274bc7 100644 --- a/client/src/components/ui/calendar.tsx +++ b/client/src/components/ui/calendar.tsx @@ -20,7 +20,7 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C nav: "space-x-1 flex items-center", nav_button: cn( buttonVariants({ variant: "outline" }), - "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100", + "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100" ), nav_button_previous: "absolute left-1", nav_button_next: "absolute right-1", @@ -31,7 +31,7 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20", day: cn( buttonVariants({ variant: "ghost" }), - "h-9 w-9 p-0 font-normal aria-selected:opacity-100", + "h-9 w-9 p-0 font-normal aria-selected:opacity-100" ), day_range_end: "day-range-end", day_selected: diff --git a/client/src/components/ui/card.tsx b/client/src/components/ui/card.tsx index a32ef21..66285d7 100644 --- a/client/src/components/ui/card.tsx +++ b/client/src/components/ui/card.tsx @@ -9,14 +9,14 @@ const Card = React.forwardRef - ), + ) ); Card.displayName = "Card"; const CardHeader = React.forwardRef>( ({ className, ...props }, ref) => (
    - ), + ) ); CardHeader.displayName = "CardHeader"; @@ -27,28 +27,28 @@ const CardTitle = React.forwardRef - ), + ) ); CardTitle.displayName = "CardTitle"; const CardDescription = React.forwardRef>( ({ className, ...props }, ref) => (
    - ), + ) ); CardDescription.displayName = "CardDescription"; const CardContent = React.forwardRef>( ({ className, ...props }, ref) => (
    - ), + ) ); CardContent.displayName = "CardContent"; const CardFooter = React.forwardRef>( ({ className, ...props }, ref) => (
    - ), + ) ); CardFooter.displayName = "CardFooter"; diff --git a/client/src/components/ui/carousel.tsx b/client/src/components/ui/carousel.tsx index b488976..d865e6c 100644 --- a/client/src/components/ui/carousel.tsx +++ b/client/src/components/ui/carousel.tsx @@ -47,7 +47,7 @@ const Carousel = React.forwardRef< ...opts, axis: orientation === "horizontal" ? "x" : "y", }, - plugins, + plugins ); const [canScrollPrev, setCanScrollPrev] = React.useState(false); const [canScrollNext, setCanScrollNext] = React.useState(false); @@ -79,7 +79,7 @@ const Carousel = React.forwardRef< scrollNext(); } }, - [scrollPrev, scrollNext], + [scrollPrev, scrollNext] ); React.useEffect(() => { @@ -143,13 +143,13 @@ const CarouselContent = React.forwardRef
    ); - }, + } ); CarouselContent.displayName = "CarouselContent"; @@ -165,12 +165,12 @@ const CarouselItem = React.forwardRef ); - }, + } ); CarouselItem.displayName = "CarouselItem"; @@ -188,7 +188,7 @@ const CarouselPrevious = React.forwardRefPrevious slide ); - }, + } ); CarouselPrevious.displayName = "CarouselPrevious"; @@ -216,7 +216,7 @@ const CarouselNext = React.forwardRefNext slide ); - }, + } ); CarouselNext.displayName = "CarouselNext"; @@ -238,4 +238,3 @@ export { CarouselPrevious, CarouselNext, }; - diff --git a/client/src/components/ui/chart.tsx b/client/src/components/ui/chart.tsx index c28ac2e..fb43956 100644 --- a/client/src/components/ui/chart.tsx +++ b/client/src/components/ui/chart.tsx @@ -49,7 +49,7 @@ const ChartContainer = React.forwardRef< ref={ref} className={cn( "flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none", - className, + className )} {...props} > @@ -62,7 +62,9 @@ const ChartContainer = React.forwardRef< ChartContainer.displayName = "Chart"; const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => { - const colorConfig = Object.entries(config).filter(([, itemConfig]) => itemConfig.theme || itemConfig.color); + const colorConfig = Object.entries(config).filter( + ([, itemConfig]) => itemConfig.theme || itemConfig.color + ); if (!colorConfig.length) { return null; @@ -82,7 +84,7 @@ ${colorConfig }) .join("\n")} } -`, +` ) .join("\n"), }} @@ -119,7 +121,7 @@ const ChartTooltipContent = React.forwardRef< nameKey, labelKey, }, - ref, + ref ) => { const { config } = useChart(); @@ -160,7 +162,7 @@ const ChartTooltipContent = React.forwardRef< ref={ref} className={cn( "grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", - className, + className )} > {!nestLabel ? tooltipLabel : null} @@ -175,7 +177,7 @@ const ChartTooltipContent = React.forwardRef< key={item.dataKey} className={cn( "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", - indicator === "dot" && "items-center", + indicator === "dot" && "items-center" )} > {formatter && item?.value !== undefined && item.name ? ( @@ -195,7 +197,7 @@ const ChartTooltipContent = React.forwardRef< "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed", "my-0.5": nestLabel && indicator === "dashed", - }, + } )} style={ { @@ -209,7 +211,7 @@ const ChartTooltipContent = React.forwardRef<
    @@ -232,7 +234,7 @@ const ChartTooltipContent = React.forwardRef<
    ); - }, + } ); ChartTooltipContent.displayName = "ChartTooltip"; @@ -258,7 +260,7 @@ const ChartLegendContent = React.forwardRef< className={cn( "flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", - className, + className )} > {payload.map((item) => { @@ -269,7 +271,7 @@ const ChartLegendContent = React.forwardRef<
    svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground", + "flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground" )} > {itemConfig?.icon && !hideIcon ? ( diff --git a/client/src/components/ui/checkbox.tsx b/client/src/components/ui/checkbox.tsx index 9a55d09..79962ad 100644 --- a/client/src/components/ui/checkbox.tsx +++ b/client/src/components/ui/checkbox.tsx @@ -12,7 +12,7 @@ const Checkbox = React.forwardRef< ref={ref} className={cn( "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", - className, + className )} {...props} > diff --git a/client/src/components/ui/command.tsx b/client/src/components/ui/command.tsx index c03619b..6947a5d 100644 --- a/client/src/components/ui/command.tsx +++ b/client/src/components/ui/command.tsx @@ -14,7 +14,7 @@ const Command = React.forwardRef< ref={ref} className={cn( "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", - className, + className )} {...props} /> @@ -43,7 +43,7 @@ const CommandInput = React.forwardRef< ref={ref} className={cn( "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", - className, + className )} {...props} /> @@ -82,7 +82,7 @@ const CommandGroup = React.forwardRef< ref={ref} className={cn( "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", - className, + className )} {...props} /> @@ -110,7 +110,7 @@ const CommandItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", - className, + className )} {...props} /> diff --git a/client/src/components/ui/context-menu.tsx b/client/src/components/ui/context-menu.tsx index c249173..774327e 100644 --- a/client/src/components/ui/context-menu.tsx +++ b/client/src/components/ui/context-menu.tsx @@ -27,7 +27,7 @@ const ContextMenuSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", - className, + className )} {...props} > @@ -45,7 +45,7 @@ const ContextMenuSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]", - className, + className )} {...props} /> @@ -61,7 +61,7 @@ const ContextMenuContent = React.forwardRef< ref={ref} className={cn( "z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]", - className, + className )} {...props} /> @@ -80,7 +80,7 @@ const ContextMenuItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", - className, + className )} {...props} /> @@ -95,7 +95,7 @@ const ContextMenuCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className, + className )} checked={checked} {...props} @@ -118,7 +118,7 @@ const ContextMenuRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className, + className )} {...props} > diff --git a/client/src/components/ui/dialog.tsx b/client/src/components/ui/dialog.tsx index 84b661a..89a5fc1 100644 --- a/client/src/components/ui/dialog.tsx +++ b/client/src/components/ui/dialog.tsx @@ -20,7 +20,7 @@ const DialogOverlay = React.forwardRef< ref={ref} className={cn( "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", - className, + className )} {...props} /> @@ -37,7 +37,7 @@ const DialogContent = React.forwardRef< ref={ref} className={cn( "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", - className, + className )} {...props} > diff --git a/client/src/components/ui/drawer.tsx b/client/src/components/ui/drawer.tsx index 33533cc..9fb2252 100644 --- a/client/src/components/ui/drawer.tsx +++ b/client/src/components/ui/drawer.tsx @@ -39,7 +39,7 @@ const DrawerContent = React.forwardRef< ref={ref} className={cn( "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background", - className, + className )} {...props} > diff --git a/client/src/components/ui/dropdown-menu.tsx b/client/src/components/ui/dropdown-menu.tsx index 921be4d..d712f58 100644 --- a/client/src/components/ui/dropdown-menu.tsx +++ b/client/src/components/ui/dropdown-menu.tsx @@ -27,7 +27,7 @@ const DropdownMenuSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", - className, + className )} {...props} > @@ -45,7 +45,7 @@ const DropdownMenuSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]", - className, + className )} {...props} /> @@ -62,7 +62,7 @@ const DropdownMenuContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]", - className, + className )} {...props} /> @@ -81,7 +81,7 @@ const DropdownMenuItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", - className, + className )} {...props} /> @@ -96,7 +96,7 @@ const DropdownMenuCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className, + className )} checked={checked} {...props} @@ -119,7 +119,7 @@ const DropdownMenuRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className, + className )} {...props} > diff --git a/client/src/components/ui/form.tsx b/client/src/components/ui/form.tsx index b88a542..f99a8ef 100644 --- a/client/src/components/ui/form.tsx +++ b/client/src/components/ui/form.tsx @@ -75,7 +75,7 @@ const FormItem = React.forwardRef ); - }, + } ); FormItem.displayName = "FormItem"; diff --git a/client/src/components/ui/hover-card.tsx b/client/src/components/ui/hover-card.tsx index 98cc73d..ea192a9 100644 --- a/client/src/components/ui/hover-card.tsx +++ b/client/src/components/ui/hover-card.tsx @@ -17,7 +17,7 @@ const HoverCardContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]", - className, + className )} {...props} /> diff --git a/client/src/components/ui/input-otp.tsx b/client/src/components/ui/input-otp.tsx index bed7601..329b911 100644 --- a/client/src/components/ui/input-otp.tsx +++ b/client/src/components/ui/input-otp.tsx @@ -12,7 +12,7 @@ const InputOTP = React.forwardRef< ref={ref} containerClassName={cn( "flex items-center gap-2 has-[:disabled]:opacity-50", - containerClassName, + containerClassName )} className={cn("disabled:cursor-not-allowed", className)} {...props} @@ -41,7 +41,7 @@ const InputOTPSlot = React.forwardRef< className={cn( "relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md", isActive && "z-10 ring-2 ring-ring ring-offset-background", - className, + className )} {...props} > diff --git a/client/src/components/ui/input.tsx b/client/src/components/ui/input.tsx index 09700f6..bc891a3 100644 --- a/client/src/components/ui/input.tsx +++ b/client/src/components/ui/input.tsx @@ -9,13 +9,13 @@ const Input = React.forwardRef>( type={type} className={cn( "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", - className, + className )} ref={ref} {...props} /> ); - }, + } ); Input.displayName = "Input"; diff --git a/client/src/components/ui/label.tsx b/client/src/components/ui/label.tsx index 5ccd419..a708f61 100644 --- a/client/src/components/ui/label.tsx +++ b/client/src/components/ui/label.tsx @@ -5,7 +5,7 @@ import * as React from "react"; import { cn } from "@/lib/utils"; const labelVariants = cva( - "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", + "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" ); const Label = React.forwardRef< diff --git a/client/src/components/ui/menubar.tsx b/client/src/components/ui/menubar.tsx index 32a4a9a..a3e5033 100644 --- a/client/src/components/ui/menubar.tsx +++ b/client/src/components/ui/menubar.tsx @@ -32,7 +32,7 @@ const Menubar = React.forwardRef< ref={ref} className={cn( "flex h-10 items-center space-x-1 rounded-md border bg-background p-1", - className, + className )} {...props} /> @@ -47,7 +47,7 @@ const MenubarTrigger = React.forwardRef< ref={ref} className={cn( "flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", - className, + className )} {...props} /> @@ -65,7 +65,7 @@ const MenubarSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", - className, + className )} {...props} > @@ -83,7 +83,7 @@ const MenubarSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]", - className, + className )} {...props} /> @@ -102,7 +102,7 @@ const MenubarContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]", - className, + className )} {...props} /> @@ -121,7 +121,7 @@ const MenubarItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", - className, + className )} {...props} /> @@ -136,7 +136,7 @@ const MenubarCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className, + className )} checked={checked} {...props} @@ -159,7 +159,7 @@ const MenubarRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className, + className )} {...props} > diff --git a/client/src/components/ui/navigation-menu.tsx b/client/src/components/ui/navigation-menu.tsx index 64d0b5c..5a6cd47 100644 --- a/client/src/components/ui/navigation-menu.tsx +++ b/client/src/components/ui/navigation-menu.tsx @@ -35,7 +35,7 @@ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName; const NavigationMenuItem = NavigationMenuPrimitive.Item; const navigationMenuTriggerStyle = cva( - "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent", + "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent" ); const NavigationMenuTrigger = React.forwardRef< @@ -64,7 +64,7 @@ const NavigationMenuContent = React.forwardRef< ref={ref} className={cn( "left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ", - className, + className )} {...props} /> @@ -81,7 +81,7 @@ const NavigationMenuViewport = React.forwardRef< diff --git a/client/src/components/ui/pagination.tsx b/client/src/components/ui/pagination.tsx index e68c177..2471ef7 100644 --- a/client/src/components/ui/pagination.tsx +++ b/client/src/components/ui/pagination.tsx @@ -18,12 +18,12 @@ Pagination.displayName = "Pagination"; const PaginationContent = React.forwardRef>( ({ className, ...props }, ref) => (
      - ), + ) ); PaginationContent.displayName = "PaginationContent"; const PaginationItem = React.forwardRef>( - ({ className, ...props }, ref) =>
    • , + ({ className, ...props }, ref) =>
    • ); PaginationItem.displayName = "PaginationItem"; @@ -40,7 +40,7 @@ const PaginationLink = ({ className, isActive, size = "icon", ...props }: Pagina variant: isActive ? "outline" : "ghost", size, }), - className, + className )} {...props} /> diff --git a/client/src/components/ui/popover.tsx b/client/src/components/ui/popover.tsx index f496bbb..4a8d51b 100644 --- a/client/src/components/ui/popover.tsx +++ b/client/src/components/ui/popover.tsx @@ -18,7 +18,7 @@ const PopoverContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]", - className, + className )} {...props} /> diff --git a/client/src/components/ui/radio-group.tsx b/client/src/components/ui/radio-group.tsx index d60fc94..c33e9e3 100644 --- a/client/src/components/ui/radio-group.tsx +++ b/client/src/components/ui/radio-group.tsx @@ -21,7 +21,7 @@ const RadioGroupItem = React.forwardRef< ref={ref} className={cn( "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", - className, + className )} {...props} > diff --git a/client/src/components/ui/resizable.tsx b/client/src/components/ui/resizable.tsx index 23f278b..09aa7c3 100644 --- a/client/src/components/ui/resizable.tsx +++ b/client/src/components/ui/resizable.tsx @@ -26,7 +26,7 @@ const ResizableHandle = ({ div]:rotate-90", - className, + className )} {...props} > diff --git a/client/src/components/ui/scroll-area.tsx b/client/src/components/ui/scroll-area.tsx index 4bc8062..4b023aa 100644 --- a/client/src/components/ui/scroll-area.tsx +++ b/client/src/components/ui/scroll-area.tsx @@ -32,7 +32,7 @@ const ScrollBar = React.forwardRef< "flex touch-none select-none transition-colors", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]", - className, + className )} {...props} > diff --git a/client/src/components/ui/select.tsx b/client/src/components/ui/select.tsx index 4c3ba40..17d9acc 100644 --- a/client/src/components/ui/select.tsx +++ b/client/src/components/ui/select.tsx @@ -18,7 +18,7 @@ const SelectTrigger = React.forwardRef< ref={ref} className={cn( "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", - className, + className )} {...props} > @@ -69,7 +69,7 @@ const SelectContent = React.forwardRef< "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", - className, + className )} position={position} {...props} @@ -79,7 +79,7 @@ const SelectContent = React.forwardRef< className={cn( "p-1", position === "popper" && - "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]", + "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]" )} > {children} @@ -110,7 +110,7 @@ const SelectItem = React.forwardRef< ref={ref} className={cn( "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className, + className )} {...props} > diff --git a/client/src/components/ui/separator.tsx b/client/src/components/ui/separator.tsx index 053e61e..3b5a57d 100644 --- a/client/src/components/ui/separator.tsx +++ b/client/src/components/ui/separator.tsx @@ -14,7 +14,7 @@ const Separator = React.forwardRef< className={cn( "shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", - className, + className )} {...props} /> diff --git a/client/src/components/ui/sheet.tsx b/client/src/components/ui/sheet.tsx index efaad80..6aa71a7 100644 --- a/client/src/components/ui/sheet.tsx +++ b/client/src/components/ui/sheet.tsx @@ -20,7 +20,7 @@ const SheetOverlay = React.forwardRef< { const isMobile = useIsMobile(); const [openMobile, setOpenMobile] = React.useState(false); @@ -86,7 +86,7 @@ const SidebarProvider = React.forwardRef< // This sets the cookie to keep the sidebar state. document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`; }, - [setOpenProp, open], + [setOpenProp, open] ); // Helper to toggle the sidebar. @@ -121,7 +121,7 @@ const SidebarProvider = React.forwardRef< setOpenMobile, toggleSidebar, }), - [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar], + [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar] ); return ( @@ -137,7 +137,7 @@ const SidebarProvider = React.forwardRef< } className={cn( "group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar", - className, + className )} ref={ref} {...props} @@ -147,7 +147,7 @@ const SidebarProvider = React.forwardRef< ); - }, + } ); SidebarProvider.displayName = "SidebarProvider"; @@ -168,7 +168,7 @@ const Sidebar = React.forwardRef< children, ...props }, - ref, + ref ) => { const { isMobile, state, openMobile, setOpenMobile } = useSidebar(); @@ -177,7 +177,7 @@ const Sidebar = React.forwardRef<
      @@ -254,7 +254,7 @@ const Sidebar = React.forwardRef<
      ); - }, + } ); Sidebar.displayName = "Sidebar"; @@ -303,12 +303,12 @@ const SidebarRail = React.forwardRef ); - }, + } ); SidebarRail.displayName = "SidebarRail"; @@ -320,12 +320,12 @@ const SidebarInset = React.forwardRef ); - }, + } ); SidebarInset.displayName = "SidebarInset"; @@ -339,7 +339,7 @@ const SidebarInput = React.forwardRef< data-sidebar="input" className={cn( "h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring", - className, + className )} {...props} /> @@ -357,7 +357,7 @@ const SidebarHeader = React.forwardRef ); - }, + } ); SidebarHeader.displayName = "SidebarHeader"; @@ -371,7 +371,7 @@ const SidebarFooter = React.forwardRef ); - }, + } ); SidebarFooter.displayName = "SidebarFooter"; @@ -398,12 +398,12 @@ const SidebarContent = React.forwardRef ); - }, + } ); SidebarContent.displayName = "SidebarContent"; @@ -417,7 +417,7 @@ const SidebarGroup = React.forwardRef ); - }, + } ); SidebarGroup.displayName = "SidebarGroup"; @@ -434,7 +434,7 @@ const SidebarGroupLabel = React.forwardRef< className={cn( "flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", - className, + className )} {...props} /> @@ -457,7 +457,7 @@ const SidebarGroupAction = React.forwardRef< // Increases the hit area of the button on mobile. "after:absolute after:-inset-2 after:md:hidden", "group-data-[collapsible=icon]:hidden", - className, + className )} {...props} /> @@ -473,7 +473,7 @@ const SidebarGroupContent = React.forwardRef - ), + ) ); SidebarGroupContent.displayName = "SidebarGroupContent"; @@ -485,7 +485,7 @@ const SidebarMenu = React.forwardRef - ), + ) ); SidebarMenu.displayName = "SidebarMenu"; @@ -497,7 +497,7 @@ const SidebarMenuItem = React.forwardRef - ), + ) ); SidebarMenuItem.displayName = "SidebarMenuItem"; @@ -520,7 +520,7 @@ const sidebarMenuButtonVariants = cva( variant: "default", size: "default", }, - }, + } ); const SidebarMenuButton = React.forwardRef< @@ -541,7 +541,7 @@ const SidebarMenuButton = React.forwardRef< className, ...props }, - ref, + ref ) => { const Comp = asChild ? Slot : "button"; const { isMobile, state } = useSidebar(); @@ -561,9 +561,7 @@ const SidebarMenuButton = React.forwardRef< return button; } - const tooltipConfig = typeof tooltip === "string" - ? { children: tooltip } - : tooltip; + const tooltipConfig = typeof tooltip === "string" ? { children: tooltip } : tooltip; const tooltipProps = { delayDuration: 0, @@ -581,7 +579,7 @@ const SidebarMenuButton = React.forwardRef< /> ); - }, + } ); SidebarMenuButton.displayName = "SidebarMenuButton"; @@ -608,7 +606,7 @@ const SidebarMenuAction = React.forwardRef< "group-data-[collapsible=icon]:hidden", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0", - className, + className )} {...props} /> @@ -628,11 +626,11 @@ const SidebarMenuBadge = React.forwardRef - ), + ) ); SidebarMenuBadge.displayName = "SidebarMenuBadge"; @@ -677,16 +675,16 @@ const SidebarMenuSub = React.forwardRef - ), + ) ); SidebarMenuSub.displayName = "SidebarMenuSub"; const SidebarMenuSubItem = React.forwardRef>( - ({ ...props }, ref) =>
    • , + ({ ...props }, ref) =>
    • ); SidebarMenuSubItem.displayName = "SidebarMenuSubItem"; @@ -712,7 +710,7 @@ const SidebarMenuSubButton = React.forwardRef< size === "sm" && "text-xs", size === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", - className, + className )} {...props} /> diff --git a/client/src/components/ui/switch.tsx b/client/src/components/ui/switch.tsx index 2d56246..fc32559 100644 --- a/client/src/components/ui/switch.tsx +++ b/client/src/components/ui/switch.tsx @@ -10,14 +10,14 @@ const Switch = React.forwardRef< diff --git a/client/src/components/ui/table.tsx b/client/src/components/ui/table.tsx index 7a7026f..249d474 100644 --- a/client/src/components/ui/table.tsx +++ b/client/src/components/ui/table.tsx @@ -7,7 +7,7 @@ const Table = React.forwardRef - ), + ) ); Table.displayName = "Table"; @@ -45,11 +45,11 @@ const TableRow = React.forwardRef - ), + ) ); TableRow.displayName = "TableRow"; @@ -61,7 +61,7 @@ const TableHead = React.forwardRef< ref={ref} className={cn( "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", - className, + className )} {...props} /> diff --git a/client/src/components/ui/tabs.tsx b/client/src/components/ui/tabs.tsx index 79776c5..d614e8f 100644 --- a/client/src/components/ui/tabs.tsx +++ b/client/src/components/ui/tabs.tsx @@ -13,7 +13,7 @@ const TabsList = React.forwardRef< ref={ref} className={cn( "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", - className, + className )} {...props} /> @@ -28,7 +28,7 @@ const TabsTrigger = React.forwardRef< ref={ref} className={cn( "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", - className, + className )} {...props} /> @@ -43,7 +43,7 @@ const TabsContent = React.forwardRef< ref={ref} className={cn( "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", - className, + className )} {...props} /> diff --git a/client/src/components/ui/textarea.tsx b/client/src/components/ui/textarea.tsx index 69391b2..78cacf1 100644 --- a/client/src/components/ui/textarea.tsx +++ b/client/src/components/ui/textarea.tsx @@ -8,13 +8,13 @@ const Textarea = React.forwardRef ); - }, + } ); Textarea.displayName = "Textarea"; diff --git a/client/src/components/ui/toast.tsx b/client/src/components/ui/toast.tsx index 8079d5e..e54b968 100644 --- a/client/src/components/ui/toast.tsx +++ b/client/src/components/ui/toast.tsx @@ -15,7 +15,7 @@ const ToastViewport = React.forwardRef< ref={ref} className={cn( "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", - className, + className )} {...props} /> @@ -35,7 +35,7 @@ const toastVariants = cva( defaultVariants: { variant: "default", }, - }, + } ); const Toast = React.forwardRef< @@ -60,7 +60,7 @@ const ToastAction = React.forwardRef< ref={ref} className={cn( "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", - className, + className )} {...props} /> @@ -75,7 +75,7 @@ const ToastClose = React.forwardRef< ref={ref} className={cn( "absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", - className, + className )} toast-close="" {...props} diff --git a/client/src/components/ui/toggle-group.tsx b/client/src/components/ui/toggle-group.tsx index e469c78..86562fd 100644 --- a/client/src/components/ui/toggle-group.tsx +++ b/client/src/components/ui/toggle-group.tsx @@ -41,7 +41,7 @@ const ToggleGroupItem = React.forwardRef< variant: context.variant || variant, size: context.size || size, }), - className, + className )} {...props} > diff --git a/client/src/components/ui/toggle.tsx b/client/src/components/ui/toggle.tsx index 39a1ef2..de2335e 100644 --- a/client/src/components/ui/toggle.tsx +++ b/client/src/components/ui/toggle.tsx @@ -22,7 +22,7 @@ const toggleVariants = cva( variant: "default", size: "default", }, - }, + } ); const Toggle = React.forwardRef< diff --git a/client/src/components/ui/tooltip.tsx b/client/src/components/ui/tooltip.tsx index 04f20e9..4bae421 100644 --- a/client/src/components/ui/tooltip.tsx +++ b/client/src/components/ui/tooltip.tsx @@ -18,7 +18,7 @@ const TooltipContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]", - className, + className )} {...props} /> diff --git a/client/src/hooks/use-toast.ts b/client/src/hooks/use-toast.ts index 0780bb1..595bab3 100644 --- a/client/src/hooks/use-toast.ts +++ b/client/src/hooks/use-toast.ts @@ -103,7 +103,7 @@ export const reducer = (state: State, action: Action): State => { ...t, open: false, } - : t, + : t ), }; } diff --git a/client/src/lib/queryClient.ts b/client/src/lib/queryClient.ts index 1513662..dcb965a 100644 --- a/client/src/lib/queryClient.ts +++ b/client/src/lib/queryClient.ts @@ -25,7 +25,7 @@ async function throwIfResNotOk(res: Response) { export async function apiRequest( method: string, url: string, - data?: unknown | undefined, + data?: unknown | undefined ): Promise { const res = await fetch(url, { method, diff --git a/client/src/lib/websocket.ts b/client/src/lib/websocket.ts index 29e27ca..e86bd05 100644 --- a/client/src/lib/websocket.ts +++ b/client/src/lib/websocket.ts @@ -59,14 +59,14 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { const message = JSON.parse(event.data); onMessage?.(message); // Call the primary onMessage handler websocketCallbacks.current.forEach((callback) => - callback({ type: "message", data: message }), + callback({ type: "message", data: message }) ); // Call registered callbacks } catch (_error) { websocketCallbacks.current.forEach((callback) => callback({ type: "error", error: "Failed to parse message", - }), + }) ); } }; @@ -86,7 +86,7 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { callback({ type: "error", error: "Connection failed after maximum attempts", - }), + }) ); } }; @@ -97,7 +97,7 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { callback({ type: "error", error: "WebSocket connection error", - }), + }) ); // The onclose event will handle reconnection logic, so we don't need to call connect() here again. }; @@ -108,7 +108,7 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { callback({ type: "error", error: "Failed to initiate WebSocket connection", - }), + }) ); // Attempt to reconnect even if initial connection fails if (reconnectAttempts < maxReconnectAttempts) { diff --git a/client/src/pages/admin.tsx b/client/src/pages/admin.tsx index cae3c01..2fe6cb0 100644 --- a/client/src/pages/admin.tsx +++ b/client/src/pages/admin.tsx @@ -181,7 +181,7 @@ export default function AdminPage() { const activeTournaments = tournaments.filter((t: Tournament) => t.status === "active").length; const totalParticipants = tournaments.reduce( (acc: number, t: Tournament) => acc + t.participants.length, - 0, + 0 ); return ( diff --git a/client/src/pages/tournament-detail.tsx b/client/src/pages/tournament-detail.tsx index 308aee5..df7142d 100644 --- a/client/src/pages/tournament-detail.tsx +++ b/client/src/pages/tournament-detail.tsx @@ -362,4 +362,3 @@ export default function TournamentDetailPage() { ); } - diff --git a/client/src/pages/tournaments.tsx b/client/src/pages/tournaments.tsx index 902f3ec..879bb76 100644 --- a/client/src/pages/tournaments.tsx +++ b/client/src/pages/tournaments.tsx @@ -240,4 +240,3 @@ export default function TournamentsPage() { ); } - diff --git a/server/auth.ts b/server/auth.ts index 9985b5d..ec168d0 100644 --- a/server/auth.ts +++ b/server/auth.ts @@ -36,7 +36,7 @@ interface TelegramInitData { */ export function validateTelegramInitData( initData: string, - botToken: string, + botToken: string ): TelegramInitData | null { try { // Parse URL-encoded data @@ -177,4 +177,3 @@ export function telegramAuthMiddleware(req: Request, res: any, next: any) { next(); } - diff --git a/server/db.ts b/server/db.ts index 863e4bf..4422af1 100644 --- a/server/db.ts +++ b/server/db.ts @@ -38,4 +38,3 @@ export async function checkDatabaseConnection(): Promise { return false; } } - diff --git a/server/errorHandler.ts b/server/errorHandler.ts index d698f51..a57c411 100644 --- a/server/errorHandler.ts +++ b/server/errorHandler.ts @@ -129,7 +129,7 @@ function getStatusCode(error: AppError): number { * Extract user context from request for logging */ function extractUserContext(req: Request): Record { - const { telegramUser } = (req as any); + const { telegramUser } = req as any; return { userId: telegramUser?.id, username: telegramUser?.username, @@ -149,7 +149,7 @@ export function errorHandler( req: Request, res: Response, // eslint-disable-next-line @typescript-eslint/no-unused-vars - _next: NextFunction, + _next: NextFunction ): void { const statusCode = getStatusCode(error); const userContext = extractUserContext(req); @@ -232,7 +232,7 @@ export function handleUncaughtException(error: Error): void { * Async error wrapper for route handlers */ export function asyncHandler( - fn: (req: Request, res: Response, next: NextFunction) => Promise, + fn: (req: Request, res: Response, next: NextFunction) => Promise ) { return (req: Request, res: Response, next: NextFunction) => { Promise.resolve(fn(req, res, next)).catch(next); @@ -307,4 +307,3 @@ export default { createSecurityError, createDatabaseError, }; - diff --git a/server/index.ts b/server/index.ts index dad1d80..27c60c2 100644 --- a/server/index.ts +++ b/server/index.ts @@ -80,6 +80,6 @@ app.use((req, res, next) => { log(`📱 Frontend: http://localhost:${port}`); log(`🔗 API: http://localhost:${port}/api`); } - }, + } ); })(); diff --git a/server/logger.ts b/server/logger.ts index 0320f8b..55c356c 100644 --- a/server/logger.ts +++ b/server/logger.ts @@ -6,19 +6,20 @@ const logger = winston.createLogger({ format: winston.format.combine( winston.format.timestamp(), winston.format.errors({ stack: true }), - winston.format.json(), + winston.format.json() ), transports: [ new winston.transports.Console({ - format: winston.format.combine( - winston.format.colorize(), - winston.format.simple(), - ), + format: winston.format.combine(winston.format.colorize(), winston.format.simple()), }), ], }); -export function logRequest(req: Request, message: string, level: "info" | "warn" | "error" = "info") { +export function logRequest( + req: Request, + message: string, + level: "info" | "warn" | "error" = "info" +) { const userContext = { ip: req.ip, userAgent: req.get("User-Agent"), diff --git a/server/middleware.ts b/server/middleware.ts index 6e2b146..6aff925 100644 --- a/server/middleware.ts +++ b/server/middleware.ts @@ -153,7 +153,7 @@ export const securityHeaders = (req: Request, res: Response, _next: NextFunction // Content Security Policy (basic example) res.setHeader( "Content-Security-Policy", - "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:;", + "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:;" ); _next(); @@ -173,7 +173,7 @@ export const requestLogger = (req: Request, res: Response, _next: NextFunction) // Log format: [timestamp] method url status duration ip userAgent console.log( - `[${new Date().toISOString()}] ${method} ${url} ${status} ${duration}ms ${ip} "${userAgent}"`, + `[${new Date().toISOString()}] ${method} ${url} ${status} ${duration}ms ${ip} "${userAgent}"` ); }); @@ -239,4 +239,3 @@ export const notFound = (req: Request, res: Response) => { code: "NOT_FOUND", }); }; - diff --git a/server/rateLimiter.simple.ts b/server/rateLimiter.simple.ts index 01f4190..66a4ecb 100644 --- a/server/rateLimiter.simple.ts +++ b/server/rateLimiter.simple.ts @@ -25,4 +25,3 @@ export function createSimpleRateLimit() { // Placeholder for simple rate limiting implementation return generalLimiter; } - diff --git a/server/rateLimiter.ts b/server/rateLimiter.ts index a9fad32..c8c19db 100644 --- a/server/rateLimiter.ts +++ b/server/rateLimiter.ts @@ -9,7 +9,7 @@ function shouldSkipRateLimit(): boolean { // Safe key generator for IPv6 compatibility function safeKeyGenerator(req: Request, prefix = ""): string { - const { telegramUser } = (req as any); + const { telegramUser } = req as any; if (telegramUser?.id) { return `${prefix}${telegramUser.id.toString()}`; } @@ -34,7 +34,7 @@ export const generalLimiter = rateLimit({ legacyHeaders: false, // Disable the `X-RateLimit-*` headers keyGenerator: (req: Request) => { // Use Telegram user ID if available, otherwise fall back to IP - const { telegramUser } = (req as any); + const { telegramUser } = req as any; if (telegramUser?.id) { return telegramUser.id.toString(); } @@ -136,9 +136,7 @@ export function createCustomLimiter(options: { }, standardHeaders: true, legacyHeaders: false, - keyGenerator: - options.keyGenerator || - ((req: Request) => safeKeyGenerator(req)), + keyGenerator: options.keyGenerator || ((req: Request) => safeKeyGenerator(req)), skip: () => { return shouldSkipRateLimit(); }, @@ -174,4 +172,3 @@ export default { search: searchLimiter, createCustom: createCustomLimiter, }; - diff --git a/server/routes.ts b/server/routes.ts index fb4250b..afcdc68 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -127,7 +127,7 @@ export async function registerRoutes(app: Express): Promise { } res.status(500).json({ message: "Failed to create tournament" }); } - }, + } ); app.put("/api/tournaments/:id", rateLimiters.adminLimiter, async (req, res) => { @@ -231,7 +231,7 @@ export async function registerRoutes(app: Express): Promise { } catch (error) { res.status(500).json({ message: "Failed to register for tournament" }); } - }, + } ); app.delete( @@ -268,7 +268,7 @@ export async function registerRoutes(app: Express): Promise { } catch (error) { res.status(500).json({ message: "Failed to unregister from tournament" }); } - }, + } ); app.get("/api/tournaments/:id/participants", async (req, res) => { @@ -279,7 +279,7 @@ export async function registerRoutes(app: Express): Promise { } const participants = await Promise.all( - tournament.participants.map((userId) => storage.getUser(userId)), + tournament.participants.map((userId) => storage.getUser(userId)) ); res.json(participants.filter(Boolean)); @@ -299,4 +299,3 @@ declare global { } } } - diff --git a/server/storage.ts b/server/storage.ts index 7fa6614..659972f 100644 --- a/server/storage.ts +++ b/server/storage.ts @@ -147,7 +147,7 @@ export class DatabaseStorage implements IStorage { async updateTournament( id: string, - updates: Partial, + updates: Partial ): Promise { const [tournament] = await db .update(tournaments) diff --git a/server/validation.ts b/server/validation.ts index f656baf..90a0e65 100644 --- a/server/validation.ts +++ b/server/validation.ts @@ -88,7 +88,7 @@ function secureString( pattern?: RegExp; allowEmpty?: boolean; sanitize?: boolean; - } = {}, + } = {} ) { return z .string() @@ -117,7 +117,7 @@ function secureString( } return true; }, - { message: "Value cannot be empty" }, + { message: "Value cannot be empty" } ) .refine( (val) => { @@ -126,7 +126,7 @@ function secureString( } return true; }, - { message: `Minimum length is ${options.minLength}` }, + { message: `Minimum length is ${options.minLength}` } ) .refine( (val) => { @@ -135,7 +135,7 @@ function secureString( } return true; }, - { message: `Maximum length is ${options.maxLength}` }, + { message: `Maximum length is ${options.maxLength}` } ) .refine( (val) => { @@ -144,7 +144,7 @@ function secureString( } return true; }, - { message: "Invalid format" }, + { message: "Invalid format" } ); } @@ -257,7 +257,7 @@ export const createTournamentSchema = z { message: "End date must be after start date", path: ["endDate"], - }, + } ); /** @@ -429,4 +429,3 @@ export default { secureString, sanitizeString, }; - diff --git a/server/vite.ts b/server/vite.ts index 442853f..351b4f5 100644 --- a/server/vite.ts +++ b/server/vite.ts @@ -66,7 +66,7 @@ export function serveStatic(app: Express) { if (!fs.existsSync(distPath)) { throw new Error( - `Could not find the build directory: ${distPath}, make sure to build the client first`, + `Could not find the build directory: ${distPath}, make sure to build the client first` ); } From 65b0501dfe8fea1e6615e208c594f0dd072d8174 Mon Sep 17 00:00:00 2001 From: WA11AX Date: Wed, 13 Aug 2025 08:08:46 +0300 Subject: [PATCH 2/4] chore: fix trailing commas --- client/src/components/ui/accordion.tsx | 2 +- client/src/components/ui/alert-dialog.tsx | 4 +- client/src/components/ui/alert.tsx | 4 +- client/src/components/ui/avatar.tsx | 2 +- client/src/components/ui/badge.tsx | 2 +- client/src/components/ui/breadcrumb.tsx | 8 +-- client/src/components/ui/button.tsx | 4 +- client/src/components/ui/calendar.tsx | 4 +- client/src/components/ui/card.tsx | 12 ++-- client/src/components/ui/carousel.tsx | 20 +++--- client/src/components/ui/chart.tsx | 22 +++--- client/src/components/ui/checkbox.tsx | 2 +- client/src/components/ui/command.tsx | 8 +-- client/src/components/ui/context-menu.tsx | 12 ++-- client/src/components/ui/dialog.tsx | 4 +- client/src/components/ui/drawer.tsx | 2 +- client/src/components/ui/dropdown-menu.tsx | 12 ++-- client/src/components/ui/form.tsx | 2 +- client/src/components/ui/hover-card.tsx | 2 +- client/src/components/ui/input-otp.tsx | 4 +- client/src/components/ui/input.tsx | 4 +- client/src/components/ui/label.tsx | 2 +- client/src/components/ui/menubar.tsx | 16 ++--- client/src/components/ui/navigation-menu.tsx | 8 +-- client/src/components/ui/pagination.tsx | 6 +- client/src/components/ui/popover.tsx | 2 +- client/src/components/ui/radio-group.tsx | 2 +- client/src/components/ui/resizable.tsx | 2 +- client/src/components/ui/scroll-area.tsx | 2 +- client/src/components/ui/select.tsx | 8 +-- client/src/components/ui/separator.tsx | 2 +- client/src/components/ui/sheet.tsx | 4 +- client/src/components/ui/sidebar.tsx | 70 ++++++++++---------- client/src/components/ui/switch.tsx | 4 +- client/src/components/ui/table.tsx | 8 +-- client/src/components/ui/tabs.tsx | 6 +- client/src/components/ui/textarea.tsx | 4 +- client/src/components/ui/toast.tsx | 8 +-- client/src/components/ui/toggle-group.tsx | 2 +- client/src/components/ui/toggle.tsx | 2 +- client/src/components/ui/tooltip.tsx | 2 +- client/src/hooks/use-toast.ts | 2 +- client/src/lib/queryClient.ts | 2 +- client/src/lib/websocket.ts | 10 +-- client/src/pages/admin.tsx | 2 +- server/auth.ts | 2 +- server/errorHandler.ts | 4 +- server/index.ts | 2 +- server/logger.ts | 4 +- server/middleware.ts | 4 +- server/routes.ts | 8 +-- server/storage.ts | 2 +- server/validation.ts | 12 ++-- server/vite.ts | 2 +- 54 files changed, 176 insertions(+), 176 deletions(-) diff --git a/client/src/components/ui/accordion.tsx b/client/src/components/ui/accordion.tsx index 743c06c..ea6e3c2 100644 --- a/client/src/components/ui/accordion.tsx +++ b/client/src/components/ui/accordion.tsx @@ -23,7 +23,7 @@ const AccordionTrigger = React.forwardRef< ref={ref} className={cn( "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", - className + className, )} {...props} > diff --git a/client/src/components/ui/alert-dialog.tsx b/client/src/components/ui/alert-dialog.tsx index 26dbc7e..4295eea 100644 --- a/client/src/components/ui/alert-dialog.tsx +++ b/client/src/components/ui/alert-dialog.tsx @@ -17,7 +17,7 @@ const AlertDialogOverlay = React.forwardRef< diff --git a/client/src/components/ui/alert.tsx b/client/src/components/ui/alert.tsx index b7fc38a..09e9d8d 100644 --- a/client/src/components/ui/alert.tsx +++ b/client/src/components/ui/alert.tsx @@ -16,7 +16,7 @@ const alertVariants = cva( defaultVariants: { variant: "default", }, - } + }, ); const Alert = React.forwardRef< @@ -34,7 +34,7 @@ const AlertTitle = React.forwardRef - ) + ), ); AlertTitle.displayName = "AlertTitle"; diff --git a/client/src/components/ui/avatar.tsx b/client/src/components/ui/avatar.tsx index 1284c5f..13248f4 100644 --- a/client/src/components/ui/avatar.tsx +++ b/client/src/components/ui/avatar.tsx @@ -35,7 +35,7 @@ const AvatarFallback = React.forwardRef< ref={ref} className={cn( "flex h-full w-full items-center justify-center rounded-full bg-muted", - className + className, )} {...props} /> diff --git a/client/src/components/ui/badge.tsx b/client/src/components/ui/badge.tsx index 29e8c26..80c2ca5 100644 --- a/client/src/components/ui/badge.tsx +++ b/client/src/components/ui/badge.tsx @@ -19,7 +19,7 @@ const badgeVariants = cva( defaultVariants: { variant: "default", }, - } + }, ); export interface BadgeProps diff --git a/client/src/components/ui/breadcrumb.tsx b/client/src/components/ui/breadcrumb.tsx index d6d910c..d8fb62b 100644 --- a/client/src/components/ui/breadcrumb.tsx +++ b/client/src/components/ui/breadcrumb.tsx @@ -18,18 +18,18 @@ const BreadcrumbList = React.forwardRef - ) + ), ); BreadcrumbList.displayName = "BreadcrumbList"; const BreadcrumbItem = React.forwardRef>( ({ className, ...props }, ref) => (
    • - ) + ), ); BreadcrumbItem.displayName = "BreadcrumbItem"; @@ -61,7 +61,7 @@ const BreadcrumbPage = React.forwardRef - ) + ), ); BreadcrumbPage.displayName = "BreadcrumbPage"; diff --git a/client/src/components/ui/button.tsx b/client/src/components/ui/button.tsx index 11735fc..2258336 100644 --- a/client/src/components/ui/button.tsx +++ b/client/src/components/ui/button.tsx @@ -27,7 +27,7 @@ const buttonVariants = cva( variant: "default", size: "default", }, - } + }, ); export interface ButtonProps @@ -42,7 +42,7 @@ const Button = React.forwardRef( return ( ); - } + }, ); Button.displayName = "Button"; diff --git a/client/src/components/ui/calendar.tsx b/client/src/components/ui/calendar.tsx index e274bc7..084fb38 100644 --- a/client/src/components/ui/calendar.tsx +++ b/client/src/components/ui/calendar.tsx @@ -20,7 +20,7 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C nav: "space-x-1 flex items-center", nav_button: cn( buttonVariants({ variant: "outline" }), - "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100" + "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100", ), nav_button_previous: "absolute left-1", nav_button_next: "absolute right-1", @@ -31,7 +31,7 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20", day: cn( buttonVariants({ variant: "ghost" }), - "h-9 w-9 p-0 font-normal aria-selected:opacity-100" + "h-9 w-9 p-0 font-normal aria-selected:opacity-100", ), day_range_end: "day-range-end", day_selected: diff --git a/client/src/components/ui/card.tsx b/client/src/components/ui/card.tsx index 66285d7..a32ef21 100644 --- a/client/src/components/ui/card.tsx +++ b/client/src/components/ui/card.tsx @@ -9,14 +9,14 @@ const Card = React.forwardRef - ) + ), ); Card.displayName = "Card"; const CardHeader = React.forwardRef>( ({ className, ...props }, ref) => (
      - ) + ), ); CardHeader.displayName = "CardHeader"; @@ -27,28 +27,28 @@ const CardTitle = React.forwardRef - ) + ), ); CardTitle.displayName = "CardTitle"; const CardDescription = React.forwardRef>( ({ className, ...props }, ref) => (
      - ) + ), ); CardDescription.displayName = "CardDescription"; const CardContent = React.forwardRef>( ({ className, ...props }, ref) => (
      - ) + ), ); CardContent.displayName = "CardContent"; const CardFooter = React.forwardRef>( ({ className, ...props }, ref) => (
      - ) + ), ); CardFooter.displayName = "CardFooter"; diff --git a/client/src/components/ui/carousel.tsx b/client/src/components/ui/carousel.tsx index d865e6c..ed678ce 100644 --- a/client/src/components/ui/carousel.tsx +++ b/client/src/components/ui/carousel.tsx @@ -47,7 +47,7 @@ const Carousel = React.forwardRef< ...opts, axis: orientation === "horizontal" ? "x" : "y", }, - plugins + plugins, ); const [canScrollPrev, setCanScrollPrev] = React.useState(false); const [canScrollNext, setCanScrollNext] = React.useState(false); @@ -79,7 +79,7 @@ const Carousel = React.forwardRef< scrollNext(); } }, - [scrollPrev, scrollNext] + [scrollPrev, scrollNext], ); React.useEffect(() => { @@ -143,13 +143,13 @@ const CarouselContent = React.forwardRef
      ); - } + }, ); CarouselContent.displayName = "CarouselContent"; @@ -165,12 +165,12 @@ const CarouselItem = React.forwardRef ); - } + }, ); CarouselItem.displayName = "CarouselItem"; @@ -188,7 +188,7 @@ const CarouselPrevious = React.forwardRefPrevious slide ); - } + }, ); CarouselPrevious.displayName = "CarouselPrevious"; @@ -216,7 +216,7 @@ const CarouselNext = React.forwardRefNext slide ); - } + }, ); CarouselNext.displayName = "CarouselNext"; diff --git a/client/src/components/ui/chart.tsx b/client/src/components/ui/chart.tsx index fb43956..b9678d3 100644 --- a/client/src/components/ui/chart.tsx +++ b/client/src/components/ui/chart.tsx @@ -49,7 +49,7 @@ const ChartContainer = React.forwardRef< ref={ref} className={cn( "flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none", - className + className, )} {...props} > @@ -63,7 +63,7 @@ ChartContainer.displayName = "Chart"; const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => { const colorConfig = Object.entries(config).filter( - ([, itemConfig]) => itemConfig.theme || itemConfig.color + ([, itemConfig]) => itemConfig.theme || itemConfig.color, ); if (!colorConfig.length) { @@ -84,7 +84,7 @@ ${colorConfig }) .join("\n")} } -` +`, ) .join("\n"), }} @@ -121,7 +121,7 @@ const ChartTooltipContent = React.forwardRef< nameKey, labelKey, }, - ref + ref, ) => { const { config } = useChart(); @@ -162,7 +162,7 @@ const ChartTooltipContent = React.forwardRef< ref={ref} className={cn( "grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", - className + className, )} > {!nestLabel ? tooltipLabel : null} @@ -177,7 +177,7 @@ const ChartTooltipContent = React.forwardRef< key={item.dataKey} className={cn( "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", - indicator === "dot" && "items-center" + indicator === "dot" && "items-center", )} > {formatter && item?.value !== undefined && item.name ? ( @@ -197,7 +197,7 @@ const ChartTooltipContent = React.forwardRef< "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed", "my-0.5": nestLabel && indicator === "dashed", - } + }, )} style={ { @@ -211,7 +211,7 @@ const ChartTooltipContent = React.forwardRef<
      @@ -234,7 +234,7 @@ const ChartTooltipContent = React.forwardRef<
      ); - } + }, ); ChartTooltipContent.displayName = "ChartTooltip"; @@ -260,7 +260,7 @@ const ChartLegendContent = React.forwardRef< className={cn( "flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", - className + className, )} > {payload.map((item) => { @@ -271,7 +271,7 @@ const ChartLegendContent = React.forwardRef<
      svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground" + "flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground", )} > {itemConfig?.icon && !hideIcon ? ( diff --git a/client/src/components/ui/checkbox.tsx b/client/src/components/ui/checkbox.tsx index 79962ad..9a55d09 100644 --- a/client/src/components/ui/checkbox.tsx +++ b/client/src/components/ui/checkbox.tsx @@ -12,7 +12,7 @@ const Checkbox = React.forwardRef< ref={ref} className={cn( "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", - className + className, )} {...props} > diff --git a/client/src/components/ui/command.tsx b/client/src/components/ui/command.tsx index 6947a5d..c03619b 100644 --- a/client/src/components/ui/command.tsx +++ b/client/src/components/ui/command.tsx @@ -14,7 +14,7 @@ const Command = React.forwardRef< ref={ref} className={cn( "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", - className + className, )} {...props} /> @@ -43,7 +43,7 @@ const CommandInput = React.forwardRef< ref={ref} className={cn( "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", - className + className, )} {...props} /> @@ -82,7 +82,7 @@ const CommandGroup = React.forwardRef< ref={ref} className={cn( "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", - className + className, )} {...props} /> @@ -110,7 +110,7 @@ const CommandItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", - className + className, )} {...props} /> diff --git a/client/src/components/ui/context-menu.tsx b/client/src/components/ui/context-menu.tsx index 774327e..c249173 100644 --- a/client/src/components/ui/context-menu.tsx +++ b/client/src/components/ui/context-menu.tsx @@ -27,7 +27,7 @@ const ContextMenuSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", - className + className, )} {...props} > @@ -45,7 +45,7 @@ const ContextMenuSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]", - className + className, )} {...props} /> @@ -61,7 +61,7 @@ const ContextMenuContent = React.forwardRef< ref={ref} className={cn( "z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]", - className + className, )} {...props} /> @@ -80,7 +80,7 @@ const ContextMenuItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", - className + className, )} {...props} /> @@ -95,7 +95,7 @@ const ContextMenuCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} checked={checked} {...props} @@ -118,7 +118,7 @@ const ContextMenuRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/dialog.tsx b/client/src/components/ui/dialog.tsx index 89a5fc1..84b661a 100644 --- a/client/src/components/ui/dialog.tsx +++ b/client/src/components/ui/dialog.tsx @@ -20,7 +20,7 @@ const DialogOverlay = React.forwardRef< ref={ref} className={cn( "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", - className + className, )} {...props} /> @@ -37,7 +37,7 @@ const DialogContent = React.forwardRef< ref={ref} className={cn( "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", - className + className, )} {...props} > diff --git a/client/src/components/ui/drawer.tsx b/client/src/components/ui/drawer.tsx index 9fb2252..33533cc 100644 --- a/client/src/components/ui/drawer.tsx +++ b/client/src/components/ui/drawer.tsx @@ -39,7 +39,7 @@ const DrawerContent = React.forwardRef< ref={ref} className={cn( "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background", - className + className, )} {...props} > diff --git a/client/src/components/ui/dropdown-menu.tsx b/client/src/components/ui/dropdown-menu.tsx index d712f58..921be4d 100644 --- a/client/src/components/ui/dropdown-menu.tsx +++ b/client/src/components/ui/dropdown-menu.tsx @@ -27,7 +27,7 @@ const DropdownMenuSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", - className + className, )} {...props} > @@ -45,7 +45,7 @@ const DropdownMenuSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]", - className + className, )} {...props} /> @@ -62,7 +62,7 @@ const DropdownMenuContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]", - className + className, )} {...props} /> @@ -81,7 +81,7 @@ const DropdownMenuItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", - className + className, )} {...props} /> @@ -96,7 +96,7 @@ const DropdownMenuCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} checked={checked} {...props} @@ -119,7 +119,7 @@ const DropdownMenuRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/form.tsx b/client/src/components/ui/form.tsx index f99a8ef..b88a542 100644 --- a/client/src/components/ui/form.tsx +++ b/client/src/components/ui/form.tsx @@ -75,7 +75,7 @@ const FormItem = React.forwardRef ); - } + }, ); FormItem.displayName = "FormItem"; diff --git a/client/src/components/ui/hover-card.tsx b/client/src/components/ui/hover-card.tsx index ea192a9..98cc73d 100644 --- a/client/src/components/ui/hover-card.tsx +++ b/client/src/components/ui/hover-card.tsx @@ -17,7 +17,7 @@ const HoverCardContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]", - className + className, )} {...props} /> diff --git a/client/src/components/ui/input-otp.tsx b/client/src/components/ui/input-otp.tsx index 329b911..bed7601 100644 --- a/client/src/components/ui/input-otp.tsx +++ b/client/src/components/ui/input-otp.tsx @@ -12,7 +12,7 @@ const InputOTP = React.forwardRef< ref={ref} containerClassName={cn( "flex items-center gap-2 has-[:disabled]:opacity-50", - containerClassName + containerClassName, )} className={cn("disabled:cursor-not-allowed", className)} {...props} @@ -41,7 +41,7 @@ const InputOTPSlot = React.forwardRef< className={cn( "relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md", isActive && "z-10 ring-2 ring-ring ring-offset-background", - className + className, )} {...props} > diff --git a/client/src/components/ui/input.tsx b/client/src/components/ui/input.tsx index bc891a3..09700f6 100644 --- a/client/src/components/ui/input.tsx +++ b/client/src/components/ui/input.tsx @@ -9,13 +9,13 @@ const Input = React.forwardRef>( type={type} className={cn( "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", - className + className, )} ref={ref} {...props} /> ); - } + }, ); Input.displayName = "Input"; diff --git a/client/src/components/ui/label.tsx b/client/src/components/ui/label.tsx index a708f61..5ccd419 100644 --- a/client/src/components/ui/label.tsx +++ b/client/src/components/ui/label.tsx @@ -5,7 +5,7 @@ import * as React from "react"; import { cn } from "@/lib/utils"; const labelVariants = cva( - "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" + "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", ); const Label = React.forwardRef< diff --git a/client/src/components/ui/menubar.tsx b/client/src/components/ui/menubar.tsx index a3e5033..32a4a9a 100644 --- a/client/src/components/ui/menubar.tsx +++ b/client/src/components/ui/menubar.tsx @@ -32,7 +32,7 @@ const Menubar = React.forwardRef< ref={ref} className={cn( "flex h-10 items-center space-x-1 rounded-md border bg-background p-1", - className + className, )} {...props} /> @@ -47,7 +47,7 @@ const MenubarTrigger = React.forwardRef< ref={ref} className={cn( "flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", - className + className, )} {...props} /> @@ -65,7 +65,7 @@ const MenubarSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", - className + className, )} {...props} > @@ -83,7 +83,7 @@ const MenubarSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]", - className + className, )} {...props} /> @@ -102,7 +102,7 @@ const MenubarContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]", - className + className, )} {...props} /> @@ -121,7 +121,7 @@ const MenubarItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", - className + className, )} {...props} /> @@ -136,7 +136,7 @@ const MenubarCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} checked={checked} {...props} @@ -159,7 +159,7 @@ const MenubarRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/navigation-menu.tsx b/client/src/components/ui/navigation-menu.tsx index 5a6cd47..64d0b5c 100644 --- a/client/src/components/ui/navigation-menu.tsx +++ b/client/src/components/ui/navigation-menu.tsx @@ -35,7 +35,7 @@ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName; const NavigationMenuItem = NavigationMenuPrimitive.Item; const navigationMenuTriggerStyle = cva( - "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent" + "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent", ); const NavigationMenuTrigger = React.forwardRef< @@ -64,7 +64,7 @@ const NavigationMenuContent = React.forwardRef< ref={ref} className={cn( "left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ", - className + className, )} {...props} /> @@ -81,7 +81,7 @@ const NavigationMenuViewport = React.forwardRef< diff --git a/client/src/components/ui/pagination.tsx b/client/src/components/ui/pagination.tsx index 2471ef7..e68c177 100644 --- a/client/src/components/ui/pagination.tsx +++ b/client/src/components/ui/pagination.tsx @@ -18,12 +18,12 @@ Pagination.displayName = "Pagination"; const PaginationContent = React.forwardRef>( ({ className, ...props }, ref) => (
        - ) + ), ); PaginationContent.displayName = "PaginationContent"; const PaginationItem = React.forwardRef>( - ({ className, ...props }, ref) =>
      • + ({ className, ...props }, ref) =>
      • , ); PaginationItem.displayName = "PaginationItem"; @@ -40,7 +40,7 @@ const PaginationLink = ({ className, isActive, size = "icon", ...props }: Pagina variant: isActive ? "outline" : "ghost", size, }), - className + className, )} {...props} /> diff --git a/client/src/components/ui/popover.tsx b/client/src/components/ui/popover.tsx index 4a8d51b..f496bbb 100644 --- a/client/src/components/ui/popover.tsx +++ b/client/src/components/ui/popover.tsx @@ -18,7 +18,7 @@ const PopoverContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]", - className + className, )} {...props} /> diff --git a/client/src/components/ui/radio-group.tsx b/client/src/components/ui/radio-group.tsx index c33e9e3..d60fc94 100644 --- a/client/src/components/ui/radio-group.tsx +++ b/client/src/components/ui/radio-group.tsx @@ -21,7 +21,7 @@ const RadioGroupItem = React.forwardRef< ref={ref} className={cn( "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/resizable.tsx b/client/src/components/ui/resizable.tsx index 09aa7c3..23f278b 100644 --- a/client/src/components/ui/resizable.tsx +++ b/client/src/components/ui/resizable.tsx @@ -26,7 +26,7 @@ const ResizableHandle = ({ div]:rotate-90", - className + className, )} {...props} > diff --git a/client/src/components/ui/scroll-area.tsx b/client/src/components/ui/scroll-area.tsx index 4b023aa..4bc8062 100644 --- a/client/src/components/ui/scroll-area.tsx +++ b/client/src/components/ui/scroll-area.tsx @@ -32,7 +32,7 @@ const ScrollBar = React.forwardRef< "flex touch-none select-none transition-colors", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]", - className + className, )} {...props} > diff --git a/client/src/components/ui/select.tsx b/client/src/components/ui/select.tsx index 17d9acc..4c3ba40 100644 --- a/client/src/components/ui/select.tsx +++ b/client/src/components/ui/select.tsx @@ -18,7 +18,7 @@ const SelectTrigger = React.forwardRef< ref={ref} className={cn( "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", - className + className, )} {...props} > @@ -69,7 +69,7 @@ const SelectContent = React.forwardRef< "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", - className + className, )} position={position} {...props} @@ -79,7 +79,7 @@ const SelectContent = React.forwardRef< className={cn( "p-1", position === "popper" && - "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]" + "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]", )} > {children} @@ -110,7 +110,7 @@ const SelectItem = React.forwardRef< ref={ref} className={cn( "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/separator.tsx b/client/src/components/ui/separator.tsx index 3b5a57d..053e61e 100644 --- a/client/src/components/ui/separator.tsx +++ b/client/src/components/ui/separator.tsx @@ -14,7 +14,7 @@ const Separator = React.forwardRef< className={cn( "shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", - className + className, )} {...props} /> diff --git a/client/src/components/ui/sheet.tsx b/client/src/components/ui/sheet.tsx index 6aa71a7..efaad80 100644 --- a/client/src/components/ui/sheet.tsx +++ b/client/src/components/ui/sheet.tsx @@ -20,7 +20,7 @@ const SheetOverlay = React.forwardRef< { const isMobile = useIsMobile(); const [openMobile, setOpenMobile] = React.useState(false); @@ -86,7 +86,7 @@ const SidebarProvider = React.forwardRef< // This sets the cookie to keep the sidebar state. document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`; }, - [setOpenProp, open] + [setOpenProp, open], ); // Helper to toggle the sidebar. @@ -121,7 +121,7 @@ const SidebarProvider = React.forwardRef< setOpenMobile, toggleSidebar, }), - [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar] + [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar], ); return ( @@ -137,7 +137,7 @@ const SidebarProvider = React.forwardRef< } className={cn( "group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar", - className + className, )} ref={ref} {...props} @@ -147,7 +147,7 @@ const SidebarProvider = React.forwardRef< ); - } + }, ); SidebarProvider.displayName = "SidebarProvider"; @@ -168,7 +168,7 @@ const Sidebar = React.forwardRef< children, ...props }, - ref + ref, ) => { const { isMobile, state, openMobile, setOpenMobile } = useSidebar(); @@ -177,7 +177,7 @@ const Sidebar = React.forwardRef<
        @@ -254,7 +254,7 @@ const Sidebar = React.forwardRef<
        ); - } + }, ); Sidebar.displayName = "Sidebar"; @@ -303,12 +303,12 @@ const SidebarRail = React.forwardRef ); - } + }, ); SidebarRail.displayName = "SidebarRail"; @@ -320,12 +320,12 @@ const SidebarInset = React.forwardRef ); - } + }, ); SidebarInset.displayName = "SidebarInset"; @@ -339,7 +339,7 @@ const SidebarInput = React.forwardRef< data-sidebar="input" className={cn( "h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring", - className + className, )} {...props} /> @@ -357,7 +357,7 @@ const SidebarHeader = React.forwardRef ); - } + }, ); SidebarHeader.displayName = "SidebarHeader"; @@ -371,7 +371,7 @@ const SidebarFooter = React.forwardRef ); - } + }, ); SidebarFooter.displayName = "SidebarFooter"; @@ -398,12 +398,12 @@ const SidebarContent = React.forwardRef ); - } + }, ); SidebarContent.displayName = "SidebarContent"; @@ -417,7 +417,7 @@ const SidebarGroup = React.forwardRef ); - } + }, ); SidebarGroup.displayName = "SidebarGroup"; @@ -434,7 +434,7 @@ const SidebarGroupLabel = React.forwardRef< className={cn( "flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", - className + className, )} {...props} /> @@ -457,7 +457,7 @@ const SidebarGroupAction = React.forwardRef< // Increases the hit area of the button on mobile. "after:absolute after:-inset-2 after:md:hidden", "group-data-[collapsible=icon]:hidden", - className + className, )} {...props} /> @@ -473,7 +473,7 @@ const SidebarGroupContent = React.forwardRef - ) + ), ); SidebarGroupContent.displayName = "SidebarGroupContent"; @@ -485,7 +485,7 @@ const SidebarMenu = React.forwardRef - ) + ), ); SidebarMenu.displayName = "SidebarMenu"; @@ -497,7 +497,7 @@ const SidebarMenuItem = React.forwardRef - ) + ), ); SidebarMenuItem.displayName = "SidebarMenuItem"; @@ -520,7 +520,7 @@ const sidebarMenuButtonVariants = cva( variant: "default", size: "default", }, - } + }, ); const SidebarMenuButton = React.forwardRef< @@ -541,7 +541,7 @@ const SidebarMenuButton = React.forwardRef< className, ...props }, - ref + ref, ) => { const Comp = asChild ? Slot : "button"; const { isMobile, state } = useSidebar(); @@ -579,7 +579,7 @@ const SidebarMenuButton = React.forwardRef< /> ); - } + }, ); SidebarMenuButton.displayName = "SidebarMenuButton"; @@ -606,7 +606,7 @@ const SidebarMenuAction = React.forwardRef< "group-data-[collapsible=icon]:hidden", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0", - className + className, )} {...props} /> @@ -626,11 +626,11 @@ const SidebarMenuBadge = React.forwardRef - ) + ), ); SidebarMenuBadge.displayName = "SidebarMenuBadge"; @@ -675,16 +675,16 @@ const SidebarMenuSub = React.forwardRef - ) + ), ); SidebarMenuSub.displayName = "SidebarMenuSub"; const SidebarMenuSubItem = React.forwardRef>( - ({ ...props }, ref) =>
      • + ({ ...props }, ref) =>
      • , ); SidebarMenuSubItem.displayName = "SidebarMenuSubItem"; @@ -710,7 +710,7 @@ const SidebarMenuSubButton = React.forwardRef< size === "sm" && "text-xs", size === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", - className + className, )} {...props} /> diff --git a/client/src/components/ui/switch.tsx b/client/src/components/ui/switch.tsx index fc32559..2d56246 100644 --- a/client/src/components/ui/switch.tsx +++ b/client/src/components/ui/switch.tsx @@ -10,14 +10,14 @@ const Switch = React.forwardRef< diff --git a/client/src/components/ui/table.tsx b/client/src/components/ui/table.tsx index 249d474..7a7026f 100644 --- a/client/src/components/ui/table.tsx +++ b/client/src/components/ui/table.tsx @@ -7,7 +7,7 @@ const Table = React.forwardRef
    • - ) + ), ); Table.displayName = "Table"; @@ -45,11 +45,11 @@ const TableRow = React.forwardRef - ) + ), ); TableRow.displayName = "TableRow"; @@ -61,7 +61,7 @@ const TableHead = React.forwardRef< ref={ref} className={cn( "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", - className + className, )} {...props} /> diff --git a/client/src/components/ui/tabs.tsx b/client/src/components/ui/tabs.tsx index d614e8f..79776c5 100644 --- a/client/src/components/ui/tabs.tsx +++ b/client/src/components/ui/tabs.tsx @@ -13,7 +13,7 @@ const TabsList = React.forwardRef< ref={ref} className={cn( "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", - className + className, )} {...props} /> @@ -28,7 +28,7 @@ const TabsTrigger = React.forwardRef< ref={ref} className={cn( "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", - className + className, )} {...props} /> @@ -43,7 +43,7 @@ const TabsContent = React.forwardRef< ref={ref} className={cn( "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", - className + className, )} {...props} /> diff --git a/client/src/components/ui/textarea.tsx b/client/src/components/ui/textarea.tsx index 78cacf1..69391b2 100644 --- a/client/src/components/ui/textarea.tsx +++ b/client/src/components/ui/textarea.tsx @@ -8,13 +8,13 @@ const Textarea = React.forwardRef ); - } + }, ); Textarea.displayName = "Textarea"; diff --git a/client/src/components/ui/toast.tsx b/client/src/components/ui/toast.tsx index e54b968..8079d5e 100644 --- a/client/src/components/ui/toast.tsx +++ b/client/src/components/ui/toast.tsx @@ -15,7 +15,7 @@ const ToastViewport = React.forwardRef< ref={ref} className={cn( "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", - className + className, )} {...props} /> @@ -35,7 +35,7 @@ const toastVariants = cva( defaultVariants: { variant: "default", }, - } + }, ); const Toast = React.forwardRef< @@ -60,7 +60,7 @@ const ToastAction = React.forwardRef< ref={ref} className={cn( "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", - className + className, )} {...props} /> @@ -75,7 +75,7 @@ const ToastClose = React.forwardRef< ref={ref} className={cn( "absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", - className + className, )} toast-close="" {...props} diff --git a/client/src/components/ui/toggle-group.tsx b/client/src/components/ui/toggle-group.tsx index 86562fd..e469c78 100644 --- a/client/src/components/ui/toggle-group.tsx +++ b/client/src/components/ui/toggle-group.tsx @@ -41,7 +41,7 @@ const ToggleGroupItem = React.forwardRef< variant: context.variant || variant, size: context.size || size, }), - className + className, )} {...props} > diff --git a/client/src/components/ui/toggle.tsx b/client/src/components/ui/toggle.tsx index de2335e..39a1ef2 100644 --- a/client/src/components/ui/toggle.tsx +++ b/client/src/components/ui/toggle.tsx @@ -22,7 +22,7 @@ const toggleVariants = cva( variant: "default", size: "default", }, - } + }, ); const Toggle = React.forwardRef< diff --git a/client/src/components/ui/tooltip.tsx b/client/src/components/ui/tooltip.tsx index 4bae421..04f20e9 100644 --- a/client/src/components/ui/tooltip.tsx +++ b/client/src/components/ui/tooltip.tsx @@ -18,7 +18,7 @@ const TooltipContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]", - className + className, )} {...props} /> diff --git a/client/src/hooks/use-toast.ts b/client/src/hooks/use-toast.ts index 595bab3..0780bb1 100644 --- a/client/src/hooks/use-toast.ts +++ b/client/src/hooks/use-toast.ts @@ -103,7 +103,7 @@ export const reducer = (state: State, action: Action): State => { ...t, open: false, } - : t + : t, ), }; } diff --git a/client/src/lib/queryClient.ts b/client/src/lib/queryClient.ts index dcb965a..1513662 100644 --- a/client/src/lib/queryClient.ts +++ b/client/src/lib/queryClient.ts @@ -25,7 +25,7 @@ async function throwIfResNotOk(res: Response) { export async function apiRequest( method: string, url: string, - data?: unknown | undefined + data?: unknown | undefined, ): Promise { const res = await fetch(url, { method, diff --git a/client/src/lib/websocket.ts b/client/src/lib/websocket.ts index e86bd05..29e27ca 100644 --- a/client/src/lib/websocket.ts +++ b/client/src/lib/websocket.ts @@ -59,14 +59,14 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { const message = JSON.parse(event.data); onMessage?.(message); // Call the primary onMessage handler websocketCallbacks.current.forEach((callback) => - callback({ type: "message", data: message }) + callback({ type: "message", data: message }), ); // Call registered callbacks } catch (_error) { websocketCallbacks.current.forEach((callback) => callback({ type: "error", error: "Failed to parse message", - }) + }), ); } }; @@ -86,7 +86,7 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { callback({ type: "error", error: "Connection failed after maximum attempts", - }) + }), ); } }; @@ -97,7 +97,7 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { callback({ type: "error", error: "WebSocket connection error", - }) + }), ); // The onclose event will handle reconnection logic, so we don't need to call connect() here again. }; @@ -108,7 +108,7 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { callback({ type: "error", error: "Failed to initiate WebSocket connection", - }) + }), ); // Attempt to reconnect even if initial connection fails if (reconnectAttempts < maxReconnectAttempts) { diff --git a/client/src/pages/admin.tsx b/client/src/pages/admin.tsx index 2fe6cb0..cae3c01 100644 --- a/client/src/pages/admin.tsx +++ b/client/src/pages/admin.tsx @@ -181,7 +181,7 @@ export default function AdminPage() { const activeTournaments = tournaments.filter((t: Tournament) => t.status === "active").length; const totalParticipants = tournaments.reduce( (acc: number, t: Tournament) => acc + t.participants.length, - 0 + 0, ); return ( diff --git a/server/auth.ts b/server/auth.ts index ec168d0..bb89e6e 100644 --- a/server/auth.ts +++ b/server/auth.ts @@ -36,7 +36,7 @@ interface TelegramInitData { */ export function validateTelegramInitData( initData: string, - botToken: string + botToken: string, ): TelegramInitData | null { try { // Parse URL-encoded data diff --git a/server/errorHandler.ts b/server/errorHandler.ts index a57c411..cbff3b8 100644 --- a/server/errorHandler.ts +++ b/server/errorHandler.ts @@ -149,7 +149,7 @@ export function errorHandler( req: Request, res: Response, // eslint-disable-next-line @typescript-eslint/no-unused-vars - _next: NextFunction + _next: NextFunction, ): void { const statusCode = getStatusCode(error); const userContext = extractUserContext(req); @@ -232,7 +232,7 @@ export function handleUncaughtException(error: Error): void { * Async error wrapper for route handlers */ export function asyncHandler( - fn: (req: Request, res: Response, next: NextFunction) => Promise + fn: (req: Request, res: Response, next: NextFunction) => Promise, ) { return (req: Request, res: Response, next: NextFunction) => { Promise.resolve(fn(req, res, next)).catch(next); diff --git a/server/index.ts b/server/index.ts index 27c60c2..dad1d80 100644 --- a/server/index.ts +++ b/server/index.ts @@ -80,6 +80,6 @@ app.use((req, res, next) => { log(`📱 Frontend: http://localhost:${port}`); log(`🔗 API: http://localhost:${port}/api`); } - } + }, ); })(); diff --git a/server/logger.ts b/server/logger.ts index 55c356c..d8950e7 100644 --- a/server/logger.ts +++ b/server/logger.ts @@ -6,7 +6,7 @@ const logger = winston.createLogger({ format: winston.format.combine( winston.format.timestamp(), winston.format.errors({ stack: true }), - winston.format.json() + winston.format.json(), ), transports: [ new winston.transports.Console({ @@ -18,7 +18,7 @@ const logger = winston.createLogger({ export function logRequest( req: Request, message: string, - level: "info" | "warn" | "error" = "info" + level: "info" | "warn" | "error" = "info", ) { const userContext = { ip: req.ip, diff --git a/server/middleware.ts b/server/middleware.ts index 6aff925..9e97b5e 100644 --- a/server/middleware.ts +++ b/server/middleware.ts @@ -153,7 +153,7 @@ export const securityHeaders = (req: Request, res: Response, _next: NextFunction // Content Security Policy (basic example) res.setHeader( "Content-Security-Policy", - "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:;" + "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:;", ); _next(); @@ -173,7 +173,7 @@ export const requestLogger = (req: Request, res: Response, _next: NextFunction) // Log format: [timestamp] method url status duration ip userAgent console.log( - `[${new Date().toISOString()}] ${method} ${url} ${status} ${duration}ms ${ip} "${userAgent}"` + `[${new Date().toISOString()}] ${method} ${url} ${status} ${duration}ms ${ip} "${userAgent}"`, ); }); diff --git a/server/routes.ts b/server/routes.ts index afcdc68..0e25155 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -127,7 +127,7 @@ export async function registerRoutes(app: Express): Promise { } res.status(500).json({ message: "Failed to create tournament" }); } - } + }, ); app.put("/api/tournaments/:id", rateLimiters.adminLimiter, async (req, res) => { @@ -231,7 +231,7 @@ export async function registerRoutes(app: Express): Promise { } catch (error) { res.status(500).json({ message: "Failed to register for tournament" }); } - } + }, ); app.delete( @@ -268,7 +268,7 @@ export async function registerRoutes(app: Express): Promise { } catch (error) { res.status(500).json({ message: "Failed to unregister from tournament" }); } - } + }, ); app.get("/api/tournaments/:id/participants", async (req, res) => { @@ -279,7 +279,7 @@ export async function registerRoutes(app: Express): Promise { } const participants = await Promise.all( - tournament.participants.map((userId) => storage.getUser(userId)) + tournament.participants.map((userId) => storage.getUser(userId)), ); res.json(participants.filter(Boolean)); diff --git a/server/storage.ts b/server/storage.ts index 659972f..7fa6614 100644 --- a/server/storage.ts +++ b/server/storage.ts @@ -147,7 +147,7 @@ export class DatabaseStorage implements IStorage { async updateTournament( id: string, - updates: Partial + updates: Partial, ): Promise { const [tournament] = await db .update(tournaments) diff --git a/server/validation.ts b/server/validation.ts index 90a0e65..ce5358f 100644 --- a/server/validation.ts +++ b/server/validation.ts @@ -88,7 +88,7 @@ function secureString( pattern?: RegExp; allowEmpty?: boolean; sanitize?: boolean; - } = {} + } = {}, ) { return z .string() @@ -117,7 +117,7 @@ function secureString( } return true; }, - { message: "Value cannot be empty" } + { message: "Value cannot be empty" }, ) .refine( (val) => { @@ -126,7 +126,7 @@ function secureString( } return true; }, - { message: `Minimum length is ${options.minLength}` } + { message: `Minimum length is ${options.minLength}` }, ) .refine( (val) => { @@ -135,7 +135,7 @@ function secureString( } return true; }, - { message: `Maximum length is ${options.maxLength}` } + { message: `Maximum length is ${options.maxLength}` }, ) .refine( (val) => { @@ -144,7 +144,7 @@ function secureString( } return true; }, - { message: "Invalid format" } + { message: "Invalid format" }, ); } @@ -257,7 +257,7 @@ export const createTournamentSchema = z { message: "End date must be after start date", path: ["endDate"], - } + }, ); /** diff --git a/server/vite.ts b/server/vite.ts index 351b4f5..442853f 100644 --- a/server/vite.ts +++ b/server/vite.ts @@ -66,7 +66,7 @@ export function serveStatic(app: Express) { if (!fs.existsSync(distPath)) { throw new Error( - `Could not find the build directory: ${distPath}, make sure to build the client first` + `Could not find the build directory: ${distPath}, make sure to build the client first`, ); } From 4872fe73068068f4f8fb5b6fd9668a6a45c8ef12 Mon Sep 17 00:00:00 2001 From: WA11AX Date: Wed, 13 Aug 2025 08:21:29 +0300 Subject: [PATCH 3/4] style: run prettier and clean up logging --- .prettierrc.json | 2 +- client/src/components/error-boundary.tsx | 5 +- client/src/components/ui/accordion.tsx | 2 +- client/src/components/ui/alert-dialog.tsx | 4 +- client/src/components/ui/alert.tsx | 4 +- client/src/components/ui/avatar.tsx | 2 +- client/src/components/ui/badge.tsx | 2 +- client/src/components/ui/breadcrumb.tsx | 8 +-- client/src/components/ui/button.tsx | 4 +- client/src/components/ui/calendar.tsx | 4 +- client/src/components/ui/card.tsx | 12 ++-- client/src/components/ui/carousel.tsx | 20 +++--- client/src/components/ui/chart.tsx | 22 +++--- client/src/components/ui/checkbox.tsx | 2 +- client/src/components/ui/command.tsx | 8 +-- client/src/components/ui/context-menu.tsx | 12 ++-- client/src/components/ui/dialog.tsx | 4 +- client/src/components/ui/drawer.tsx | 2 +- client/src/components/ui/dropdown-menu.tsx | 12 ++-- client/src/components/ui/form.tsx | 2 +- client/src/components/ui/hover-card.tsx | 2 +- client/src/components/ui/input-otp.tsx | 4 +- client/src/components/ui/input.tsx | 4 +- client/src/components/ui/label.tsx | 2 +- client/src/components/ui/menubar.tsx | 16 ++--- client/src/components/ui/navigation-menu.tsx | 8 +-- client/src/components/ui/pagination.tsx | 6 +- client/src/components/ui/popover.tsx | 2 +- client/src/components/ui/radio-group.tsx | 2 +- client/src/components/ui/resizable.tsx | 2 +- client/src/components/ui/scroll-area.tsx | 2 +- client/src/components/ui/select.tsx | 8 +-- client/src/components/ui/separator.tsx | 2 +- client/src/components/ui/sheet.tsx | 4 +- client/src/components/ui/sidebar.tsx | 70 ++++++++++---------- client/src/components/ui/switch.tsx | 4 +- client/src/components/ui/table.tsx | 8 +-- client/src/components/ui/tabs.tsx | 6 +- client/src/components/ui/textarea.tsx | 4 +- client/src/components/ui/toast.tsx | 8 +-- client/src/components/ui/toggle-group.tsx | 2 +- client/src/components/ui/toggle.tsx | 2 +- client/src/components/ui/tooltip.tsx | 2 +- client/src/hooks/use-toast.ts | 2 +- client/src/lib/queryClient.ts | 2 +- client/src/lib/websocket.ts | 10 +-- client/src/pages/admin.tsx | 4 +- server/auth.ts | 2 +- server/errorHandler.ts | 4 +- server/index.ts | 2 +- server/logger.ts | 4 +- server/middleware.ts | 4 +- server/routes.ts | 8 +-- server/storage.ts | 2 +- server/validation.ts | 12 ++-- server/vite.ts | 2 +- 56 files changed, 181 insertions(+), 180 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index fd52a9e..0411c3e 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,6 +1,6 @@ { "semi": true, - "trailingComma": "es5", + "trailingComma": "all", "singleQuote": false, "printWidth": 100, "tabWidth": 2, diff --git a/client/src/components/error-boundary.tsx b/client/src/components/error-boundary.tsx index 016c118..5719030 100644 --- a/client/src/components/error-boundary.tsx +++ b/client/src/components/error-boundary.tsx @@ -21,8 +21,9 @@ export class ErrorBoundary extends Component { return { hasError: true, error }; } - override componentDidCatch(error: Error, errorInfo: React.ErrorInfo) { - console.error("ErrorBoundary caught an error:", error, errorInfo); + override componentDidCatch(_error: Error, _errorInfo: React.ErrorInfo) { + // Optional: integrate with a logging service instead of using console.error + // console.error("ErrorBoundary caught an error:", _error, _errorInfo); } override render() { diff --git a/client/src/components/ui/accordion.tsx b/client/src/components/ui/accordion.tsx index 743c06c..ea6e3c2 100644 --- a/client/src/components/ui/accordion.tsx +++ b/client/src/components/ui/accordion.tsx @@ -23,7 +23,7 @@ const AccordionTrigger = React.forwardRef< ref={ref} className={cn( "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", - className + className, )} {...props} > diff --git a/client/src/components/ui/alert-dialog.tsx b/client/src/components/ui/alert-dialog.tsx index 26dbc7e..4295eea 100644 --- a/client/src/components/ui/alert-dialog.tsx +++ b/client/src/components/ui/alert-dialog.tsx @@ -17,7 +17,7 @@ const AlertDialogOverlay = React.forwardRef< diff --git a/client/src/components/ui/alert.tsx b/client/src/components/ui/alert.tsx index b7fc38a..09e9d8d 100644 --- a/client/src/components/ui/alert.tsx +++ b/client/src/components/ui/alert.tsx @@ -16,7 +16,7 @@ const alertVariants = cva( defaultVariants: { variant: "default", }, - } + }, ); const Alert = React.forwardRef< @@ -34,7 +34,7 @@ const AlertTitle = React.forwardRef - ) + ), ); AlertTitle.displayName = "AlertTitle"; diff --git a/client/src/components/ui/avatar.tsx b/client/src/components/ui/avatar.tsx index 1284c5f..13248f4 100644 --- a/client/src/components/ui/avatar.tsx +++ b/client/src/components/ui/avatar.tsx @@ -35,7 +35,7 @@ const AvatarFallback = React.forwardRef< ref={ref} className={cn( "flex h-full w-full items-center justify-center rounded-full bg-muted", - className + className, )} {...props} /> diff --git a/client/src/components/ui/badge.tsx b/client/src/components/ui/badge.tsx index 29e8c26..80c2ca5 100644 --- a/client/src/components/ui/badge.tsx +++ b/client/src/components/ui/badge.tsx @@ -19,7 +19,7 @@ const badgeVariants = cva( defaultVariants: { variant: "default", }, - } + }, ); export interface BadgeProps diff --git a/client/src/components/ui/breadcrumb.tsx b/client/src/components/ui/breadcrumb.tsx index d6d910c..d8fb62b 100644 --- a/client/src/components/ui/breadcrumb.tsx +++ b/client/src/components/ui/breadcrumb.tsx @@ -18,18 +18,18 @@ const BreadcrumbList = React.forwardRef - ) + ), ); BreadcrumbList.displayName = "BreadcrumbList"; const BreadcrumbItem = React.forwardRef>( ({ className, ...props }, ref) => (
    • - ) + ), ); BreadcrumbItem.displayName = "BreadcrumbItem"; @@ -61,7 +61,7 @@ const BreadcrumbPage = React.forwardRef - ) + ), ); BreadcrumbPage.displayName = "BreadcrumbPage"; diff --git a/client/src/components/ui/button.tsx b/client/src/components/ui/button.tsx index 11735fc..2258336 100644 --- a/client/src/components/ui/button.tsx +++ b/client/src/components/ui/button.tsx @@ -27,7 +27,7 @@ const buttonVariants = cva( variant: "default", size: "default", }, - } + }, ); export interface ButtonProps @@ -42,7 +42,7 @@ const Button = React.forwardRef( return ( ); - } + }, ); Button.displayName = "Button"; diff --git a/client/src/components/ui/calendar.tsx b/client/src/components/ui/calendar.tsx index e274bc7..084fb38 100644 --- a/client/src/components/ui/calendar.tsx +++ b/client/src/components/ui/calendar.tsx @@ -20,7 +20,7 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C nav: "space-x-1 flex items-center", nav_button: cn( buttonVariants({ variant: "outline" }), - "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100" + "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100", ), nav_button_previous: "absolute left-1", nav_button_next: "absolute right-1", @@ -31,7 +31,7 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20", day: cn( buttonVariants({ variant: "ghost" }), - "h-9 w-9 p-0 font-normal aria-selected:opacity-100" + "h-9 w-9 p-0 font-normal aria-selected:opacity-100", ), day_range_end: "day-range-end", day_selected: diff --git a/client/src/components/ui/card.tsx b/client/src/components/ui/card.tsx index 66285d7..a32ef21 100644 --- a/client/src/components/ui/card.tsx +++ b/client/src/components/ui/card.tsx @@ -9,14 +9,14 @@ const Card = React.forwardRef - ) + ), ); Card.displayName = "Card"; const CardHeader = React.forwardRef>( ({ className, ...props }, ref) => (
      - ) + ), ); CardHeader.displayName = "CardHeader"; @@ -27,28 +27,28 @@ const CardTitle = React.forwardRef - ) + ), ); CardTitle.displayName = "CardTitle"; const CardDescription = React.forwardRef>( ({ className, ...props }, ref) => (
      - ) + ), ); CardDescription.displayName = "CardDescription"; const CardContent = React.forwardRef>( ({ className, ...props }, ref) => (
      - ) + ), ); CardContent.displayName = "CardContent"; const CardFooter = React.forwardRef>( ({ className, ...props }, ref) => (
      - ) + ), ); CardFooter.displayName = "CardFooter"; diff --git a/client/src/components/ui/carousel.tsx b/client/src/components/ui/carousel.tsx index d865e6c..ed678ce 100644 --- a/client/src/components/ui/carousel.tsx +++ b/client/src/components/ui/carousel.tsx @@ -47,7 +47,7 @@ const Carousel = React.forwardRef< ...opts, axis: orientation === "horizontal" ? "x" : "y", }, - plugins + plugins, ); const [canScrollPrev, setCanScrollPrev] = React.useState(false); const [canScrollNext, setCanScrollNext] = React.useState(false); @@ -79,7 +79,7 @@ const Carousel = React.forwardRef< scrollNext(); } }, - [scrollPrev, scrollNext] + [scrollPrev, scrollNext], ); React.useEffect(() => { @@ -143,13 +143,13 @@ const CarouselContent = React.forwardRef
      ); - } + }, ); CarouselContent.displayName = "CarouselContent"; @@ -165,12 +165,12 @@ const CarouselItem = React.forwardRef ); - } + }, ); CarouselItem.displayName = "CarouselItem"; @@ -188,7 +188,7 @@ const CarouselPrevious = React.forwardRefPrevious slide ); - } + }, ); CarouselPrevious.displayName = "CarouselPrevious"; @@ -216,7 +216,7 @@ const CarouselNext = React.forwardRefNext slide ); - } + }, ); CarouselNext.displayName = "CarouselNext"; diff --git a/client/src/components/ui/chart.tsx b/client/src/components/ui/chart.tsx index fb43956..b9678d3 100644 --- a/client/src/components/ui/chart.tsx +++ b/client/src/components/ui/chart.tsx @@ -49,7 +49,7 @@ const ChartContainer = React.forwardRef< ref={ref} className={cn( "flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none", - className + className, )} {...props} > @@ -63,7 +63,7 @@ ChartContainer.displayName = "Chart"; const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => { const colorConfig = Object.entries(config).filter( - ([, itemConfig]) => itemConfig.theme || itemConfig.color + ([, itemConfig]) => itemConfig.theme || itemConfig.color, ); if (!colorConfig.length) { @@ -84,7 +84,7 @@ ${colorConfig }) .join("\n")} } -` +`, ) .join("\n"), }} @@ -121,7 +121,7 @@ const ChartTooltipContent = React.forwardRef< nameKey, labelKey, }, - ref + ref, ) => { const { config } = useChart(); @@ -162,7 +162,7 @@ const ChartTooltipContent = React.forwardRef< ref={ref} className={cn( "grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", - className + className, )} > {!nestLabel ? tooltipLabel : null} @@ -177,7 +177,7 @@ const ChartTooltipContent = React.forwardRef< key={item.dataKey} className={cn( "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", - indicator === "dot" && "items-center" + indicator === "dot" && "items-center", )} > {formatter && item?.value !== undefined && item.name ? ( @@ -197,7 +197,7 @@ const ChartTooltipContent = React.forwardRef< "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed", "my-0.5": nestLabel && indicator === "dashed", - } + }, )} style={ { @@ -211,7 +211,7 @@ const ChartTooltipContent = React.forwardRef<
      @@ -234,7 +234,7 @@ const ChartTooltipContent = React.forwardRef<
      ); - } + }, ); ChartTooltipContent.displayName = "ChartTooltip"; @@ -260,7 +260,7 @@ const ChartLegendContent = React.forwardRef< className={cn( "flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", - className + className, )} > {payload.map((item) => { @@ -271,7 +271,7 @@ const ChartLegendContent = React.forwardRef<
      svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground" + "flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground", )} > {itemConfig?.icon && !hideIcon ? ( diff --git a/client/src/components/ui/checkbox.tsx b/client/src/components/ui/checkbox.tsx index 79962ad..9a55d09 100644 --- a/client/src/components/ui/checkbox.tsx +++ b/client/src/components/ui/checkbox.tsx @@ -12,7 +12,7 @@ const Checkbox = React.forwardRef< ref={ref} className={cn( "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", - className + className, )} {...props} > diff --git a/client/src/components/ui/command.tsx b/client/src/components/ui/command.tsx index 6947a5d..c03619b 100644 --- a/client/src/components/ui/command.tsx +++ b/client/src/components/ui/command.tsx @@ -14,7 +14,7 @@ const Command = React.forwardRef< ref={ref} className={cn( "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", - className + className, )} {...props} /> @@ -43,7 +43,7 @@ const CommandInput = React.forwardRef< ref={ref} className={cn( "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", - className + className, )} {...props} /> @@ -82,7 +82,7 @@ const CommandGroup = React.forwardRef< ref={ref} className={cn( "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", - className + className, )} {...props} /> @@ -110,7 +110,7 @@ const CommandItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", - className + className, )} {...props} /> diff --git a/client/src/components/ui/context-menu.tsx b/client/src/components/ui/context-menu.tsx index 774327e..c249173 100644 --- a/client/src/components/ui/context-menu.tsx +++ b/client/src/components/ui/context-menu.tsx @@ -27,7 +27,7 @@ const ContextMenuSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", - className + className, )} {...props} > @@ -45,7 +45,7 @@ const ContextMenuSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]", - className + className, )} {...props} /> @@ -61,7 +61,7 @@ const ContextMenuContent = React.forwardRef< ref={ref} className={cn( "z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]", - className + className, )} {...props} /> @@ -80,7 +80,7 @@ const ContextMenuItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", - className + className, )} {...props} /> @@ -95,7 +95,7 @@ const ContextMenuCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} checked={checked} {...props} @@ -118,7 +118,7 @@ const ContextMenuRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/dialog.tsx b/client/src/components/ui/dialog.tsx index 89a5fc1..84b661a 100644 --- a/client/src/components/ui/dialog.tsx +++ b/client/src/components/ui/dialog.tsx @@ -20,7 +20,7 @@ const DialogOverlay = React.forwardRef< ref={ref} className={cn( "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", - className + className, )} {...props} /> @@ -37,7 +37,7 @@ const DialogContent = React.forwardRef< ref={ref} className={cn( "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", - className + className, )} {...props} > diff --git a/client/src/components/ui/drawer.tsx b/client/src/components/ui/drawer.tsx index 9fb2252..33533cc 100644 --- a/client/src/components/ui/drawer.tsx +++ b/client/src/components/ui/drawer.tsx @@ -39,7 +39,7 @@ const DrawerContent = React.forwardRef< ref={ref} className={cn( "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background", - className + className, )} {...props} > diff --git a/client/src/components/ui/dropdown-menu.tsx b/client/src/components/ui/dropdown-menu.tsx index d712f58..921be4d 100644 --- a/client/src/components/ui/dropdown-menu.tsx +++ b/client/src/components/ui/dropdown-menu.tsx @@ -27,7 +27,7 @@ const DropdownMenuSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", - className + className, )} {...props} > @@ -45,7 +45,7 @@ const DropdownMenuSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]", - className + className, )} {...props} /> @@ -62,7 +62,7 @@ const DropdownMenuContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]", - className + className, )} {...props} /> @@ -81,7 +81,7 @@ const DropdownMenuItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", - className + className, )} {...props} /> @@ -96,7 +96,7 @@ const DropdownMenuCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} checked={checked} {...props} @@ -119,7 +119,7 @@ const DropdownMenuRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/form.tsx b/client/src/components/ui/form.tsx index f99a8ef..b88a542 100644 --- a/client/src/components/ui/form.tsx +++ b/client/src/components/ui/form.tsx @@ -75,7 +75,7 @@ const FormItem = React.forwardRef ); - } + }, ); FormItem.displayName = "FormItem"; diff --git a/client/src/components/ui/hover-card.tsx b/client/src/components/ui/hover-card.tsx index ea192a9..98cc73d 100644 --- a/client/src/components/ui/hover-card.tsx +++ b/client/src/components/ui/hover-card.tsx @@ -17,7 +17,7 @@ const HoverCardContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]", - className + className, )} {...props} /> diff --git a/client/src/components/ui/input-otp.tsx b/client/src/components/ui/input-otp.tsx index 329b911..bed7601 100644 --- a/client/src/components/ui/input-otp.tsx +++ b/client/src/components/ui/input-otp.tsx @@ -12,7 +12,7 @@ const InputOTP = React.forwardRef< ref={ref} containerClassName={cn( "flex items-center gap-2 has-[:disabled]:opacity-50", - containerClassName + containerClassName, )} className={cn("disabled:cursor-not-allowed", className)} {...props} @@ -41,7 +41,7 @@ const InputOTPSlot = React.forwardRef< className={cn( "relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md", isActive && "z-10 ring-2 ring-ring ring-offset-background", - className + className, )} {...props} > diff --git a/client/src/components/ui/input.tsx b/client/src/components/ui/input.tsx index bc891a3..09700f6 100644 --- a/client/src/components/ui/input.tsx +++ b/client/src/components/ui/input.tsx @@ -9,13 +9,13 @@ const Input = React.forwardRef>( type={type} className={cn( "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", - className + className, )} ref={ref} {...props} /> ); - } + }, ); Input.displayName = "Input"; diff --git a/client/src/components/ui/label.tsx b/client/src/components/ui/label.tsx index a708f61..5ccd419 100644 --- a/client/src/components/ui/label.tsx +++ b/client/src/components/ui/label.tsx @@ -5,7 +5,7 @@ import * as React from "react"; import { cn } from "@/lib/utils"; const labelVariants = cva( - "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" + "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", ); const Label = React.forwardRef< diff --git a/client/src/components/ui/menubar.tsx b/client/src/components/ui/menubar.tsx index a3e5033..32a4a9a 100644 --- a/client/src/components/ui/menubar.tsx +++ b/client/src/components/ui/menubar.tsx @@ -32,7 +32,7 @@ const Menubar = React.forwardRef< ref={ref} className={cn( "flex h-10 items-center space-x-1 rounded-md border bg-background p-1", - className + className, )} {...props} /> @@ -47,7 +47,7 @@ const MenubarTrigger = React.forwardRef< ref={ref} className={cn( "flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", - className + className, )} {...props} /> @@ -65,7 +65,7 @@ const MenubarSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", - className + className, )} {...props} > @@ -83,7 +83,7 @@ const MenubarSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]", - className + className, )} {...props} /> @@ -102,7 +102,7 @@ const MenubarContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]", - className + className, )} {...props} /> @@ -121,7 +121,7 @@ const MenubarItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", - className + className, )} {...props} /> @@ -136,7 +136,7 @@ const MenubarCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} checked={checked} {...props} @@ -159,7 +159,7 @@ const MenubarRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/navigation-menu.tsx b/client/src/components/ui/navigation-menu.tsx index 5a6cd47..64d0b5c 100644 --- a/client/src/components/ui/navigation-menu.tsx +++ b/client/src/components/ui/navigation-menu.tsx @@ -35,7 +35,7 @@ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName; const NavigationMenuItem = NavigationMenuPrimitive.Item; const navigationMenuTriggerStyle = cva( - "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent" + "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent", ); const NavigationMenuTrigger = React.forwardRef< @@ -64,7 +64,7 @@ const NavigationMenuContent = React.forwardRef< ref={ref} className={cn( "left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ", - className + className, )} {...props} /> @@ -81,7 +81,7 @@ const NavigationMenuViewport = React.forwardRef< diff --git a/client/src/components/ui/pagination.tsx b/client/src/components/ui/pagination.tsx index 2471ef7..e68c177 100644 --- a/client/src/components/ui/pagination.tsx +++ b/client/src/components/ui/pagination.tsx @@ -18,12 +18,12 @@ Pagination.displayName = "Pagination"; const PaginationContent = React.forwardRef>( ({ className, ...props }, ref) => (
        - ) + ), ); PaginationContent.displayName = "PaginationContent"; const PaginationItem = React.forwardRef>( - ({ className, ...props }, ref) =>
      • + ({ className, ...props }, ref) =>
      • , ); PaginationItem.displayName = "PaginationItem"; @@ -40,7 +40,7 @@ const PaginationLink = ({ className, isActive, size = "icon", ...props }: Pagina variant: isActive ? "outline" : "ghost", size, }), - className + className, )} {...props} /> diff --git a/client/src/components/ui/popover.tsx b/client/src/components/ui/popover.tsx index 4a8d51b..f496bbb 100644 --- a/client/src/components/ui/popover.tsx +++ b/client/src/components/ui/popover.tsx @@ -18,7 +18,7 @@ const PopoverContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]", - className + className, )} {...props} /> diff --git a/client/src/components/ui/radio-group.tsx b/client/src/components/ui/radio-group.tsx index c33e9e3..d60fc94 100644 --- a/client/src/components/ui/radio-group.tsx +++ b/client/src/components/ui/radio-group.tsx @@ -21,7 +21,7 @@ const RadioGroupItem = React.forwardRef< ref={ref} className={cn( "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/resizable.tsx b/client/src/components/ui/resizable.tsx index 09aa7c3..23f278b 100644 --- a/client/src/components/ui/resizable.tsx +++ b/client/src/components/ui/resizable.tsx @@ -26,7 +26,7 @@ const ResizableHandle = ({ div]:rotate-90", - className + className, )} {...props} > diff --git a/client/src/components/ui/scroll-area.tsx b/client/src/components/ui/scroll-area.tsx index 4b023aa..4bc8062 100644 --- a/client/src/components/ui/scroll-area.tsx +++ b/client/src/components/ui/scroll-area.tsx @@ -32,7 +32,7 @@ const ScrollBar = React.forwardRef< "flex touch-none select-none transition-colors", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]", - className + className, )} {...props} > diff --git a/client/src/components/ui/select.tsx b/client/src/components/ui/select.tsx index 17d9acc..4c3ba40 100644 --- a/client/src/components/ui/select.tsx +++ b/client/src/components/ui/select.tsx @@ -18,7 +18,7 @@ const SelectTrigger = React.forwardRef< ref={ref} className={cn( "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", - className + className, )} {...props} > @@ -69,7 +69,7 @@ const SelectContent = React.forwardRef< "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", - className + className, )} position={position} {...props} @@ -79,7 +79,7 @@ const SelectContent = React.forwardRef< className={cn( "p-1", position === "popper" && - "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]" + "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]", )} > {children} @@ -110,7 +110,7 @@ const SelectItem = React.forwardRef< ref={ref} className={cn( "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/separator.tsx b/client/src/components/ui/separator.tsx index 3b5a57d..053e61e 100644 --- a/client/src/components/ui/separator.tsx +++ b/client/src/components/ui/separator.tsx @@ -14,7 +14,7 @@ const Separator = React.forwardRef< className={cn( "shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", - className + className, )} {...props} /> diff --git a/client/src/components/ui/sheet.tsx b/client/src/components/ui/sheet.tsx index 6aa71a7..efaad80 100644 --- a/client/src/components/ui/sheet.tsx +++ b/client/src/components/ui/sheet.tsx @@ -20,7 +20,7 @@ const SheetOverlay = React.forwardRef< { const isMobile = useIsMobile(); const [openMobile, setOpenMobile] = React.useState(false); @@ -86,7 +86,7 @@ const SidebarProvider = React.forwardRef< // This sets the cookie to keep the sidebar state. document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`; }, - [setOpenProp, open] + [setOpenProp, open], ); // Helper to toggle the sidebar. @@ -121,7 +121,7 @@ const SidebarProvider = React.forwardRef< setOpenMobile, toggleSidebar, }), - [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar] + [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar], ); return ( @@ -137,7 +137,7 @@ const SidebarProvider = React.forwardRef< } className={cn( "group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar", - className + className, )} ref={ref} {...props} @@ -147,7 +147,7 @@ const SidebarProvider = React.forwardRef< ); - } + }, ); SidebarProvider.displayName = "SidebarProvider"; @@ -168,7 +168,7 @@ const Sidebar = React.forwardRef< children, ...props }, - ref + ref, ) => { const { isMobile, state, openMobile, setOpenMobile } = useSidebar(); @@ -177,7 +177,7 @@ const Sidebar = React.forwardRef<
        @@ -254,7 +254,7 @@ const Sidebar = React.forwardRef<
        ); - } + }, ); Sidebar.displayName = "Sidebar"; @@ -303,12 +303,12 @@ const SidebarRail = React.forwardRef ); - } + }, ); SidebarRail.displayName = "SidebarRail"; @@ -320,12 +320,12 @@ const SidebarInset = React.forwardRef ); - } + }, ); SidebarInset.displayName = "SidebarInset"; @@ -339,7 +339,7 @@ const SidebarInput = React.forwardRef< data-sidebar="input" className={cn( "h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring", - className + className, )} {...props} /> @@ -357,7 +357,7 @@ const SidebarHeader = React.forwardRef ); - } + }, ); SidebarHeader.displayName = "SidebarHeader"; @@ -371,7 +371,7 @@ const SidebarFooter = React.forwardRef ); - } + }, ); SidebarFooter.displayName = "SidebarFooter"; @@ -398,12 +398,12 @@ const SidebarContent = React.forwardRef ); - } + }, ); SidebarContent.displayName = "SidebarContent"; @@ -417,7 +417,7 @@ const SidebarGroup = React.forwardRef ); - } + }, ); SidebarGroup.displayName = "SidebarGroup"; @@ -434,7 +434,7 @@ const SidebarGroupLabel = React.forwardRef< className={cn( "flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", - className + className, )} {...props} /> @@ -457,7 +457,7 @@ const SidebarGroupAction = React.forwardRef< // Increases the hit area of the button on mobile. "after:absolute after:-inset-2 after:md:hidden", "group-data-[collapsible=icon]:hidden", - className + className, )} {...props} /> @@ -473,7 +473,7 @@ const SidebarGroupContent = React.forwardRef - ) + ), ); SidebarGroupContent.displayName = "SidebarGroupContent"; @@ -485,7 +485,7 @@ const SidebarMenu = React.forwardRef - ) + ), ); SidebarMenu.displayName = "SidebarMenu"; @@ -497,7 +497,7 @@ const SidebarMenuItem = React.forwardRef - ) + ), ); SidebarMenuItem.displayName = "SidebarMenuItem"; @@ -520,7 +520,7 @@ const sidebarMenuButtonVariants = cva( variant: "default", size: "default", }, - } + }, ); const SidebarMenuButton = React.forwardRef< @@ -541,7 +541,7 @@ const SidebarMenuButton = React.forwardRef< className, ...props }, - ref + ref, ) => { const Comp = asChild ? Slot : "button"; const { isMobile, state } = useSidebar(); @@ -579,7 +579,7 @@ const SidebarMenuButton = React.forwardRef< /> ); - } + }, ); SidebarMenuButton.displayName = "SidebarMenuButton"; @@ -606,7 +606,7 @@ const SidebarMenuAction = React.forwardRef< "group-data-[collapsible=icon]:hidden", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0", - className + className, )} {...props} /> @@ -626,11 +626,11 @@ const SidebarMenuBadge = React.forwardRef - ) + ), ); SidebarMenuBadge.displayName = "SidebarMenuBadge"; @@ -675,16 +675,16 @@ const SidebarMenuSub = React.forwardRef - ) + ), ); SidebarMenuSub.displayName = "SidebarMenuSub"; const SidebarMenuSubItem = React.forwardRef>( - ({ ...props }, ref) =>
      • + ({ ...props }, ref) =>
      • , ); SidebarMenuSubItem.displayName = "SidebarMenuSubItem"; @@ -710,7 +710,7 @@ const SidebarMenuSubButton = React.forwardRef< size === "sm" && "text-xs", size === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", - className + className, )} {...props} /> diff --git a/client/src/components/ui/switch.tsx b/client/src/components/ui/switch.tsx index fc32559..2d56246 100644 --- a/client/src/components/ui/switch.tsx +++ b/client/src/components/ui/switch.tsx @@ -10,14 +10,14 @@ const Switch = React.forwardRef< diff --git a/client/src/components/ui/table.tsx b/client/src/components/ui/table.tsx index 249d474..7a7026f 100644 --- a/client/src/components/ui/table.tsx +++ b/client/src/components/ui/table.tsx @@ -7,7 +7,7 @@ const Table = React.forwardRef
    • - ) + ), ); Table.displayName = "Table"; @@ -45,11 +45,11 @@ const TableRow = React.forwardRef - ) + ), ); TableRow.displayName = "TableRow"; @@ -61,7 +61,7 @@ const TableHead = React.forwardRef< ref={ref} className={cn( "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", - className + className, )} {...props} /> diff --git a/client/src/components/ui/tabs.tsx b/client/src/components/ui/tabs.tsx index d614e8f..79776c5 100644 --- a/client/src/components/ui/tabs.tsx +++ b/client/src/components/ui/tabs.tsx @@ -13,7 +13,7 @@ const TabsList = React.forwardRef< ref={ref} className={cn( "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", - className + className, )} {...props} /> @@ -28,7 +28,7 @@ const TabsTrigger = React.forwardRef< ref={ref} className={cn( "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", - className + className, )} {...props} /> @@ -43,7 +43,7 @@ const TabsContent = React.forwardRef< ref={ref} className={cn( "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", - className + className, )} {...props} /> diff --git a/client/src/components/ui/textarea.tsx b/client/src/components/ui/textarea.tsx index 78cacf1..69391b2 100644 --- a/client/src/components/ui/textarea.tsx +++ b/client/src/components/ui/textarea.tsx @@ -8,13 +8,13 @@ const Textarea = React.forwardRef ); - } + }, ); Textarea.displayName = "Textarea"; diff --git a/client/src/components/ui/toast.tsx b/client/src/components/ui/toast.tsx index e54b968..8079d5e 100644 --- a/client/src/components/ui/toast.tsx +++ b/client/src/components/ui/toast.tsx @@ -15,7 +15,7 @@ const ToastViewport = React.forwardRef< ref={ref} className={cn( "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", - className + className, )} {...props} /> @@ -35,7 +35,7 @@ const toastVariants = cva( defaultVariants: { variant: "default", }, - } + }, ); const Toast = React.forwardRef< @@ -60,7 +60,7 @@ const ToastAction = React.forwardRef< ref={ref} className={cn( "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", - className + className, )} {...props} /> @@ -75,7 +75,7 @@ const ToastClose = React.forwardRef< ref={ref} className={cn( "absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", - className + className, )} toast-close="" {...props} diff --git a/client/src/components/ui/toggle-group.tsx b/client/src/components/ui/toggle-group.tsx index 86562fd..e469c78 100644 --- a/client/src/components/ui/toggle-group.tsx +++ b/client/src/components/ui/toggle-group.tsx @@ -41,7 +41,7 @@ const ToggleGroupItem = React.forwardRef< variant: context.variant || variant, size: context.size || size, }), - className + className, )} {...props} > diff --git a/client/src/components/ui/toggle.tsx b/client/src/components/ui/toggle.tsx index de2335e..39a1ef2 100644 --- a/client/src/components/ui/toggle.tsx +++ b/client/src/components/ui/toggle.tsx @@ -22,7 +22,7 @@ const toggleVariants = cva( variant: "default", size: "default", }, - } + }, ); const Toggle = React.forwardRef< diff --git a/client/src/components/ui/tooltip.tsx b/client/src/components/ui/tooltip.tsx index 4bae421..04f20e9 100644 --- a/client/src/components/ui/tooltip.tsx +++ b/client/src/components/ui/tooltip.tsx @@ -18,7 +18,7 @@ const TooltipContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]", - className + className, )} {...props} /> diff --git a/client/src/hooks/use-toast.ts b/client/src/hooks/use-toast.ts index 595bab3..0780bb1 100644 --- a/client/src/hooks/use-toast.ts +++ b/client/src/hooks/use-toast.ts @@ -103,7 +103,7 @@ export const reducer = (state: State, action: Action): State => { ...t, open: false, } - : t + : t, ), }; } diff --git a/client/src/lib/queryClient.ts b/client/src/lib/queryClient.ts index dcb965a..1513662 100644 --- a/client/src/lib/queryClient.ts +++ b/client/src/lib/queryClient.ts @@ -25,7 +25,7 @@ async function throwIfResNotOk(res: Response) { export async function apiRequest( method: string, url: string, - data?: unknown | undefined + data?: unknown | undefined, ): Promise { const res = await fetch(url, { method, diff --git a/client/src/lib/websocket.ts b/client/src/lib/websocket.ts index e86bd05..29e27ca 100644 --- a/client/src/lib/websocket.ts +++ b/client/src/lib/websocket.ts @@ -59,14 +59,14 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { const message = JSON.parse(event.data); onMessage?.(message); // Call the primary onMessage handler websocketCallbacks.current.forEach((callback) => - callback({ type: "message", data: message }) + callback({ type: "message", data: message }), ); // Call registered callbacks } catch (_error) { websocketCallbacks.current.forEach((callback) => callback({ type: "error", error: "Failed to parse message", - }) + }), ); } }; @@ -86,7 +86,7 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { callback({ type: "error", error: "Connection failed after maximum attempts", - }) + }), ); } }; @@ -97,7 +97,7 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { callback({ type: "error", error: "WebSocket connection error", - }) + }), ); // The onclose event will handle reconnection logic, so we don't need to call connect() here again. }; @@ -108,7 +108,7 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { callback({ type: "error", error: "Failed to initiate WebSocket connection", - }) + }), ); // Attempt to reconnect even if initial connection fails if (reconnectAttempts < maxReconnectAttempts) { diff --git a/client/src/pages/admin.tsx b/client/src/pages/admin.tsx index 2fe6cb0..468290e 100644 --- a/client/src/pages/admin.tsx +++ b/client/src/pages/admin.tsx @@ -181,7 +181,7 @@ export default function AdminPage() { const activeTournaments = tournaments.filter((t: Tournament) => t.status === "active").length; const totalParticipants = tournaments.reduce( (acc: number, t: Tournament) => acc + t.participants.length, - 0 + 0, ); return ( @@ -432,7 +432,7 @@ export default function AdminPage() { size="sm" variant="ghost" className="p-1 h-auto" - onClick={() => handleDelete(tournament.id, tournament.title)} + onClick={() => handleDelete(tournament.id)} disabled={deleteTournamentMutation.isPending} > diff --git a/server/auth.ts b/server/auth.ts index ec168d0..bb89e6e 100644 --- a/server/auth.ts +++ b/server/auth.ts @@ -36,7 +36,7 @@ interface TelegramInitData { */ export function validateTelegramInitData( initData: string, - botToken: string + botToken: string, ): TelegramInitData | null { try { // Parse URL-encoded data diff --git a/server/errorHandler.ts b/server/errorHandler.ts index a57c411..cbff3b8 100644 --- a/server/errorHandler.ts +++ b/server/errorHandler.ts @@ -149,7 +149,7 @@ export function errorHandler( req: Request, res: Response, // eslint-disable-next-line @typescript-eslint/no-unused-vars - _next: NextFunction + _next: NextFunction, ): void { const statusCode = getStatusCode(error); const userContext = extractUserContext(req); @@ -232,7 +232,7 @@ export function handleUncaughtException(error: Error): void { * Async error wrapper for route handlers */ export function asyncHandler( - fn: (req: Request, res: Response, next: NextFunction) => Promise + fn: (req: Request, res: Response, next: NextFunction) => Promise, ) { return (req: Request, res: Response, next: NextFunction) => { Promise.resolve(fn(req, res, next)).catch(next); diff --git a/server/index.ts b/server/index.ts index 27c60c2..dad1d80 100644 --- a/server/index.ts +++ b/server/index.ts @@ -80,6 +80,6 @@ app.use((req, res, next) => { log(`📱 Frontend: http://localhost:${port}`); log(`🔗 API: http://localhost:${port}/api`); } - } + }, ); })(); diff --git a/server/logger.ts b/server/logger.ts index 55c356c..d8950e7 100644 --- a/server/logger.ts +++ b/server/logger.ts @@ -6,7 +6,7 @@ const logger = winston.createLogger({ format: winston.format.combine( winston.format.timestamp(), winston.format.errors({ stack: true }), - winston.format.json() + winston.format.json(), ), transports: [ new winston.transports.Console({ @@ -18,7 +18,7 @@ const logger = winston.createLogger({ export function logRequest( req: Request, message: string, - level: "info" | "warn" | "error" = "info" + level: "info" | "warn" | "error" = "info", ) { const userContext = { ip: req.ip, diff --git a/server/middleware.ts b/server/middleware.ts index 6aff925..9e97b5e 100644 --- a/server/middleware.ts +++ b/server/middleware.ts @@ -153,7 +153,7 @@ export const securityHeaders = (req: Request, res: Response, _next: NextFunction // Content Security Policy (basic example) res.setHeader( "Content-Security-Policy", - "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:;" + "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:;", ); _next(); @@ -173,7 +173,7 @@ export const requestLogger = (req: Request, res: Response, _next: NextFunction) // Log format: [timestamp] method url status duration ip userAgent console.log( - `[${new Date().toISOString()}] ${method} ${url} ${status} ${duration}ms ${ip} "${userAgent}"` + `[${new Date().toISOString()}] ${method} ${url} ${status} ${duration}ms ${ip} "${userAgent}"`, ); }); diff --git a/server/routes.ts b/server/routes.ts index afcdc68..0e25155 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -127,7 +127,7 @@ export async function registerRoutes(app: Express): Promise { } res.status(500).json({ message: "Failed to create tournament" }); } - } + }, ); app.put("/api/tournaments/:id", rateLimiters.adminLimiter, async (req, res) => { @@ -231,7 +231,7 @@ export async function registerRoutes(app: Express): Promise { } catch (error) { res.status(500).json({ message: "Failed to register for tournament" }); } - } + }, ); app.delete( @@ -268,7 +268,7 @@ export async function registerRoutes(app: Express): Promise { } catch (error) { res.status(500).json({ message: "Failed to unregister from tournament" }); } - } + }, ); app.get("/api/tournaments/:id/participants", async (req, res) => { @@ -279,7 +279,7 @@ export async function registerRoutes(app: Express): Promise { } const participants = await Promise.all( - tournament.participants.map((userId) => storage.getUser(userId)) + tournament.participants.map((userId) => storage.getUser(userId)), ); res.json(participants.filter(Boolean)); diff --git a/server/storage.ts b/server/storage.ts index 659972f..7fa6614 100644 --- a/server/storage.ts +++ b/server/storage.ts @@ -147,7 +147,7 @@ export class DatabaseStorage implements IStorage { async updateTournament( id: string, - updates: Partial + updates: Partial, ): Promise { const [tournament] = await db .update(tournaments) diff --git a/server/validation.ts b/server/validation.ts index 90a0e65..ce5358f 100644 --- a/server/validation.ts +++ b/server/validation.ts @@ -88,7 +88,7 @@ function secureString( pattern?: RegExp; allowEmpty?: boolean; sanitize?: boolean; - } = {} + } = {}, ) { return z .string() @@ -117,7 +117,7 @@ function secureString( } return true; }, - { message: "Value cannot be empty" } + { message: "Value cannot be empty" }, ) .refine( (val) => { @@ -126,7 +126,7 @@ function secureString( } return true; }, - { message: `Minimum length is ${options.minLength}` } + { message: `Minimum length is ${options.minLength}` }, ) .refine( (val) => { @@ -135,7 +135,7 @@ function secureString( } return true; }, - { message: `Maximum length is ${options.maxLength}` } + { message: `Maximum length is ${options.maxLength}` }, ) .refine( (val) => { @@ -144,7 +144,7 @@ function secureString( } return true; }, - { message: "Invalid format" } + { message: "Invalid format" }, ); } @@ -257,7 +257,7 @@ export const createTournamentSchema = z { message: "End date must be after start date", path: ["endDate"], - } + }, ); /** diff --git a/server/vite.ts b/server/vite.ts index 351b4f5..442853f 100644 --- a/server/vite.ts +++ b/server/vite.ts @@ -66,7 +66,7 @@ export function serveStatic(app: Express) { if (!fs.existsSync(distPath)) { throw new Error( - `Could not find the build directory: ${distPath}, make sure to build the client first` + `Could not find the build directory: ${distPath}, make sure to build the client first`, ); } From 893dcb67dba5109e6c14afb37a541d25fcca70c8 Mon Sep 17 00:00:00 2001 From: WA11AX Date: Wed, 13 Aug 2025 08:33:06 +0300 Subject: [PATCH 4/4] chore: pin express-rate-limit --- .prettierrc.json | 2 +- client/src/components/error-boundary.tsx | 5 +- client/src/components/ui/accordion.tsx | 2 +- client/src/components/ui/alert-dialog.tsx | 4 +- client/src/components/ui/alert.tsx | 4 +- client/src/components/ui/avatar.tsx | 2 +- client/src/components/ui/badge.tsx | 2 +- client/src/components/ui/breadcrumb.tsx | 8 +-- client/src/components/ui/button.tsx | 4 +- client/src/components/ui/calendar.tsx | 4 +- client/src/components/ui/card.tsx | 12 ++-- client/src/components/ui/carousel.tsx | 20 +++--- client/src/components/ui/chart.tsx | 22 +++--- client/src/components/ui/checkbox.tsx | 2 +- client/src/components/ui/command.tsx | 8 +-- client/src/components/ui/context-menu.tsx | 12 ++-- client/src/components/ui/dialog.tsx | 4 +- client/src/components/ui/drawer.tsx | 2 +- client/src/components/ui/dropdown-menu.tsx | 12 ++-- client/src/components/ui/form.tsx | 2 +- client/src/components/ui/hover-card.tsx | 2 +- client/src/components/ui/input-otp.tsx | 4 +- client/src/components/ui/input.tsx | 4 +- client/src/components/ui/label.tsx | 2 +- client/src/components/ui/menubar.tsx | 16 ++--- client/src/components/ui/navigation-menu.tsx | 8 +-- client/src/components/ui/pagination.tsx | 6 +- client/src/components/ui/popover.tsx | 2 +- client/src/components/ui/radio-group.tsx | 2 +- client/src/components/ui/resizable.tsx | 2 +- client/src/components/ui/scroll-area.tsx | 2 +- client/src/components/ui/select.tsx | 8 +-- client/src/components/ui/separator.tsx | 2 +- client/src/components/ui/sheet.tsx | 4 +- client/src/components/ui/sidebar.tsx | 70 ++++++++++---------- client/src/components/ui/switch.tsx | 4 +- client/src/components/ui/table.tsx | 8 +-- client/src/components/ui/tabs.tsx | 6 +- client/src/components/ui/textarea.tsx | 4 +- client/src/components/ui/toast.tsx | 8 +-- client/src/components/ui/toggle-group.tsx | 2 +- client/src/components/ui/toggle.tsx | 2 +- client/src/components/ui/tooltip.tsx | 2 +- client/src/hooks/use-toast.ts | 2 +- client/src/lib/queryClient.ts | 2 +- client/src/lib/websocket.ts | 10 +-- client/src/pages/admin.tsx | 4 +- package-lock.json | 2 +- package.json | 2 +- server/auth.ts | 2 +- server/errorHandler.ts | 4 +- server/index.ts | 2 +- server/logger.ts | 4 +- server/middleware.ts | 4 +- server/routes.ts | 8 +-- server/storage.ts | 2 +- server/validation.ts | 12 ++-- server/vite.ts | 2 +- 58 files changed, 183 insertions(+), 182 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index fd52a9e..0411c3e 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,6 +1,6 @@ { "semi": true, - "trailingComma": "es5", + "trailingComma": "all", "singleQuote": false, "printWidth": 100, "tabWidth": 2, diff --git a/client/src/components/error-boundary.tsx b/client/src/components/error-boundary.tsx index 016c118..5719030 100644 --- a/client/src/components/error-boundary.tsx +++ b/client/src/components/error-boundary.tsx @@ -21,8 +21,9 @@ export class ErrorBoundary extends Component { return { hasError: true, error }; } - override componentDidCatch(error: Error, errorInfo: React.ErrorInfo) { - console.error("ErrorBoundary caught an error:", error, errorInfo); + override componentDidCatch(_error: Error, _errorInfo: React.ErrorInfo) { + // Optional: integrate with a logging service instead of using console.error + // console.error("ErrorBoundary caught an error:", _error, _errorInfo); } override render() { diff --git a/client/src/components/ui/accordion.tsx b/client/src/components/ui/accordion.tsx index 743c06c..ea6e3c2 100644 --- a/client/src/components/ui/accordion.tsx +++ b/client/src/components/ui/accordion.tsx @@ -23,7 +23,7 @@ const AccordionTrigger = React.forwardRef< ref={ref} className={cn( "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", - className + className, )} {...props} > diff --git a/client/src/components/ui/alert-dialog.tsx b/client/src/components/ui/alert-dialog.tsx index 26dbc7e..4295eea 100644 --- a/client/src/components/ui/alert-dialog.tsx +++ b/client/src/components/ui/alert-dialog.tsx @@ -17,7 +17,7 @@ const AlertDialogOverlay = React.forwardRef< diff --git a/client/src/components/ui/alert.tsx b/client/src/components/ui/alert.tsx index b7fc38a..09e9d8d 100644 --- a/client/src/components/ui/alert.tsx +++ b/client/src/components/ui/alert.tsx @@ -16,7 +16,7 @@ const alertVariants = cva( defaultVariants: { variant: "default", }, - } + }, ); const Alert = React.forwardRef< @@ -34,7 +34,7 @@ const AlertTitle = React.forwardRef - ) + ), ); AlertTitle.displayName = "AlertTitle"; diff --git a/client/src/components/ui/avatar.tsx b/client/src/components/ui/avatar.tsx index 1284c5f..13248f4 100644 --- a/client/src/components/ui/avatar.tsx +++ b/client/src/components/ui/avatar.tsx @@ -35,7 +35,7 @@ const AvatarFallback = React.forwardRef< ref={ref} className={cn( "flex h-full w-full items-center justify-center rounded-full bg-muted", - className + className, )} {...props} /> diff --git a/client/src/components/ui/badge.tsx b/client/src/components/ui/badge.tsx index 29e8c26..80c2ca5 100644 --- a/client/src/components/ui/badge.tsx +++ b/client/src/components/ui/badge.tsx @@ -19,7 +19,7 @@ const badgeVariants = cva( defaultVariants: { variant: "default", }, - } + }, ); export interface BadgeProps diff --git a/client/src/components/ui/breadcrumb.tsx b/client/src/components/ui/breadcrumb.tsx index d6d910c..d8fb62b 100644 --- a/client/src/components/ui/breadcrumb.tsx +++ b/client/src/components/ui/breadcrumb.tsx @@ -18,18 +18,18 @@ const BreadcrumbList = React.forwardRef - ) + ), ); BreadcrumbList.displayName = "BreadcrumbList"; const BreadcrumbItem = React.forwardRef>( ({ className, ...props }, ref) => (
    • - ) + ), ); BreadcrumbItem.displayName = "BreadcrumbItem"; @@ -61,7 +61,7 @@ const BreadcrumbPage = React.forwardRef - ) + ), ); BreadcrumbPage.displayName = "BreadcrumbPage"; diff --git a/client/src/components/ui/button.tsx b/client/src/components/ui/button.tsx index 11735fc..2258336 100644 --- a/client/src/components/ui/button.tsx +++ b/client/src/components/ui/button.tsx @@ -27,7 +27,7 @@ const buttonVariants = cva( variant: "default", size: "default", }, - } + }, ); export interface ButtonProps @@ -42,7 +42,7 @@ const Button = React.forwardRef( return ( ); - } + }, ); Button.displayName = "Button"; diff --git a/client/src/components/ui/calendar.tsx b/client/src/components/ui/calendar.tsx index e274bc7..084fb38 100644 --- a/client/src/components/ui/calendar.tsx +++ b/client/src/components/ui/calendar.tsx @@ -20,7 +20,7 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C nav: "space-x-1 flex items-center", nav_button: cn( buttonVariants({ variant: "outline" }), - "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100" + "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100", ), nav_button_previous: "absolute left-1", nav_button_next: "absolute right-1", @@ -31,7 +31,7 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20", day: cn( buttonVariants({ variant: "ghost" }), - "h-9 w-9 p-0 font-normal aria-selected:opacity-100" + "h-9 w-9 p-0 font-normal aria-selected:opacity-100", ), day_range_end: "day-range-end", day_selected: diff --git a/client/src/components/ui/card.tsx b/client/src/components/ui/card.tsx index 66285d7..a32ef21 100644 --- a/client/src/components/ui/card.tsx +++ b/client/src/components/ui/card.tsx @@ -9,14 +9,14 @@ const Card = React.forwardRef - ) + ), ); Card.displayName = "Card"; const CardHeader = React.forwardRef>( ({ className, ...props }, ref) => (
      - ) + ), ); CardHeader.displayName = "CardHeader"; @@ -27,28 +27,28 @@ const CardTitle = React.forwardRef - ) + ), ); CardTitle.displayName = "CardTitle"; const CardDescription = React.forwardRef>( ({ className, ...props }, ref) => (
      - ) + ), ); CardDescription.displayName = "CardDescription"; const CardContent = React.forwardRef>( ({ className, ...props }, ref) => (
      - ) + ), ); CardContent.displayName = "CardContent"; const CardFooter = React.forwardRef>( ({ className, ...props }, ref) => (
      - ) + ), ); CardFooter.displayName = "CardFooter"; diff --git a/client/src/components/ui/carousel.tsx b/client/src/components/ui/carousel.tsx index d865e6c..ed678ce 100644 --- a/client/src/components/ui/carousel.tsx +++ b/client/src/components/ui/carousel.tsx @@ -47,7 +47,7 @@ const Carousel = React.forwardRef< ...opts, axis: orientation === "horizontal" ? "x" : "y", }, - plugins + plugins, ); const [canScrollPrev, setCanScrollPrev] = React.useState(false); const [canScrollNext, setCanScrollNext] = React.useState(false); @@ -79,7 +79,7 @@ const Carousel = React.forwardRef< scrollNext(); } }, - [scrollPrev, scrollNext] + [scrollPrev, scrollNext], ); React.useEffect(() => { @@ -143,13 +143,13 @@ const CarouselContent = React.forwardRef
      ); - } + }, ); CarouselContent.displayName = "CarouselContent"; @@ -165,12 +165,12 @@ const CarouselItem = React.forwardRef ); - } + }, ); CarouselItem.displayName = "CarouselItem"; @@ -188,7 +188,7 @@ const CarouselPrevious = React.forwardRefPrevious slide ); - } + }, ); CarouselPrevious.displayName = "CarouselPrevious"; @@ -216,7 +216,7 @@ const CarouselNext = React.forwardRefNext slide ); - } + }, ); CarouselNext.displayName = "CarouselNext"; diff --git a/client/src/components/ui/chart.tsx b/client/src/components/ui/chart.tsx index fb43956..b9678d3 100644 --- a/client/src/components/ui/chart.tsx +++ b/client/src/components/ui/chart.tsx @@ -49,7 +49,7 @@ const ChartContainer = React.forwardRef< ref={ref} className={cn( "flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none", - className + className, )} {...props} > @@ -63,7 +63,7 @@ ChartContainer.displayName = "Chart"; const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => { const colorConfig = Object.entries(config).filter( - ([, itemConfig]) => itemConfig.theme || itemConfig.color + ([, itemConfig]) => itemConfig.theme || itemConfig.color, ); if (!colorConfig.length) { @@ -84,7 +84,7 @@ ${colorConfig }) .join("\n")} } -` +`, ) .join("\n"), }} @@ -121,7 +121,7 @@ const ChartTooltipContent = React.forwardRef< nameKey, labelKey, }, - ref + ref, ) => { const { config } = useChart(); @@ -162,7 +162,7 @@ const ChartTooltipContent = React.forwardRef< ref={ref} className={cn( "grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", - className + className, )} > {!nestLabel ? tooltipLabel : null} @@ -177,7 +177,7 @@ const ChartTooltipContent = React.forwardRef< key={item.dataKey} className={cn( "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", - indicator === "dot" && "items-center" + indicator === "dot" && "items-center", )} > {formatter && item?.value !== undefined && item.name ? ( @@ -197,7 +197,7 @@ const ChartTooltipContent = React.forwardRef< "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed", "my-0.5": nestLabel && indicator === "dashed", - } + }, )} style={ { @@ -211,7 +211,7 @@ const ChartTooltipContent = React.forwardRef<
      @@ -234,7 +234,7 @@ const ChartTooltipContent = React.forwardRef<
      ); - } + }, ); ChartTooltipContent.displayName = "ChartTooltip"; @@ -260,7 +260,7 @@ const ChartLegendContent = React.forwardRef< className={cn( "flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", - className + className, )} > {payload.map((item) => { @@ -271,7 +271,7 @@ const ChartLegendContent = React.forwardRef<
      svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground" + "flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground", )} > {itemConfig?.icon && !hideIcon ? ( diff --git a/client/src/components/ui/checkbox.tsx b/client/src/components/ui/checkbox.tsx index 79962ad..9a55d09 100644 --- a/client/src/components/ui/checkbox.tsx +++ b/client/src/components/ui/checkbox.tsx @@ -12,7 +12,7 @@ const Checkbox = React.forwardRef< ref={ref} className={cn( "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", - className + className, )} {...props} > diff --git a/client/src/components/ui/command.tsx b/client/src/components/ui/command.tsx index 6947a5d..c03619b 100644 --- a/client/src/components/ui/command.tsx +++ b/client/src/components/ui/command.tsx @@ -14,7 +14,7 @@ const Command = React.forwardRef< ref={ref} className={cn( "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", - className + className, )} {...props} /> @@ -43,7 +43,7 @@ const CommandInput = React.forwardRef< ref={ref} className={cn( "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", - className + className, )} {...props} /> @@ -82,7 +82,7 @@ const CommandGroup = React.forwardRef< ref={ref} className={cn( "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", - className + className, )} {...props} /> @@ -110,7 +110,7 @@ const CommandItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", - className + className, )} {...props} /> diff --git a/client/src/components/ui/context-menu.tsx b/client/src/components/ui/context-menu.tsx index 774327e..c249173 100644 --- a/client/src/components/ui/context-menu.tsx +++ b/client/src/components/ui/context-menu.tsx @@ -27,7 +27,7 @@ const ContextMenuSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", - className + className, )} {...props} > @@ -45,7 +45,7 @@ const ContextMenuSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]", - className + className, )} {...props} /> @@ -61,7 +61,7 @@ const ContextMenuContent = React.forwardRef< ref={ref} className={cn( "z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]", - className + className, )} {...props} /> @@ -80,7 +80,7 @@ const ContextMenuItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", - className + className, )} {...props} /> @@ -95,7 +95,7 @@ const ContextMenuCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} checked={checked} {...props} @@ -118,7 +118,7 @@ const ContextMenuRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/dialog.tsx b/client/src/components/ui/dialog.tsx index 89a5fc1..84b661a 100644 --- a/client/src/components/ui/dialog.tsx +++ b/client/src/components/ui/dialog.tsx @@ -20,7 +20,7 @@ const DialogOverlay = React.forwardRef< ref={ref} className={cn( "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", - className + className, )} {...props} /> @@ -37,7 +37,7 @@ const DialogContent = React.forwardRef< ref={ref} className={cn( "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", - className + className, )} {...props} > diff --git a/client/src/components/ui/drawer.tsx b/client/src/components/ui/drawer.tsx index 9fb2252..33533cc 100644 --- a/client/src/components/ui/drawer.tsx +++ b/client/src/components/ui/drawer.tsx @@ -39,7 +39,7 @@ const DrawerContent = React.forwardRef< ref={ref} className={cn( "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background", - className + className, )} {...props} > diff --git a/client/src/components/ui/dropdown-menu.tsx b/client/src/components/ui/dropdown-menu.tsx index d712f58..921be4d 100644 --- a/client/src/components/ui/dropdown-menu.tsx +++ b/client/src/components/ui/dropdown-menu.tsx @@ -27,7 +27,7 @@ const DropdownMenuSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", - className + className, )} {...props} > @@ -45,7 +45,7 @@ const DropdownMenuSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]", - className + className, )} {...props} /> @@ -62,7 +62,7 @@ const DropdownMenuContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]", - className + className, )} {...props} /> @@ -81,7 +81,7 @@ const DropdownMenuItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", - className + className, )} {...props} /> @@ -96,7 +96,7 @@ const DropdownMenuCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} checked={checked} {...props} @@ -119,7 +119,7 @@ const DropdownMenuRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/form.tsx b/client/src/components/ui/form.tsx index f99a8ef..b88a542 100644 --- a/client/src/components/ui/form.tsx +++ b/client/src/components/ui/form.tsx @@ -75,7 +75,7 @@ const FormItem = React.forwardRef ); - } + }, ); FormItem.displayName = "FormItem"; diff --git a/client/src/components/ui/hover-card.tsx b/client/src/components/ui/hover-card.tsx index ea192a9..98cc73d 100644 --- a/client/src/components/ui/hover-card.tsx +++ b/client/src/components/ui/hover-card.tsx @@ -17,7 +17,7 @@ const HoverCardContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]", - className + className, )} {...props} /> diff --git a/client/src/components/ui/input-otp.tsx b/client/src/components/ui/input-otp.tsx index 329b911..bed7601 100644 --- a/client/src/components/ui/input-otp.tsx +++ b/client/src/components/ui/input-otp.tsx @@ -12,7 +12,7 @@ const InputOTP = React.forwardRef< ref={ref} containerClassName={cn( "flex items-center gap-2 has-[:disabled]:opacity-50", - containerClassName + containerClassName, )} className={cn("disabled:cursor-not-allowed", className)} {...props} @@ -41,7 +41,7 @@ const InputOTPSlot = React.forwardRef< className={cn( "relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md", isActive && "z-10 ring-2 ring-ring ring-offset-background", - className + className, )} {...props} > diff --git a/client/src/components/ui/input.tsx b/client/src/components/ui/input.tsx index bc891a3..09700f6 100644 --- a/client/src/components/ui/input.tsx +++ b/client/src/components/ui/input.tsx @@ -9,13 +9,13 @@ const Input = React.forwardRef>( type={type} className={cn( "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", - className + className, )} ref={ref} {...props} /> ); - } + }, ); Input.displayName = "Input"; diff --git a/client/src/components/ui/label.tsx b/client/src/components/ui/label.tsx index a708f61..5ccd419 100644 --- a/client/src/components/ui/label.tsx +++ b/client/src/components/ui/label.tsx @@ -5,7 +5,7 @@ import * as React from "react"; import { cn } from "@/lib/utils"; const labelVariants = cva( - "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" + "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", ); const Label = React.forwardRef< diff --git a/client/src/components/ui/menubar.tsx b/client/src/components/ui/menubar.tsx index a3e5033..32a4a9a 100644 --- a/client/src/components/ui/menubar.tsx +++ b/client/src/components/ui/menubar.tsx @@ -32,7 +32,7 @@ const Menubar = React.forwardRef< ref={ref} className={cn( "flex h-10 items-center space-x-1 rounded-md border bg-background p-1", - className + className, )} {...props} /> @@ -47,7 +47,7 @@ const MenubarTrigger = React.forwardRef< ref={ref} className={cn( "flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", - className + className, )} {...props} /> @@ -65,7 +65,7 @@ const MenubarSubTrigger = React.forwardRef< className={cn( "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", - className + className, )} {...props} > @@ -83,7 +83,7 @@ const MenubarSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]", - className + className, )} {...props} /> @@ -102,7 +102,7 @@ const MenubarContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]", - className + className, )} {...props} /> @@ -121,7 +121,7 @@ const MenubarItem = React.forwardRef< className={cn( "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", - className + className, )} {...props} /> @@ -136,7 +136,7 @@ const MenubarCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} checked={checked} {...props} @@ -159,7 +159,7 @@ const MenubarRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/navigation-menu.tsx b/client/src/components/ui/navigation-menu.tsx index 5a6cd47..64d0b5c 100644 --- a/client/src/components/ui/navigation-menu.tsx +++ b/client/src/components/ui/navigation-menu.tsx @@ -35,7 +35,7 @@ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName; const NavigationMenuItem = NavigationMenuPrimitive.Item; const navigationMenuTriggerStyle = cva( - "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent" + "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent", ); const NavigationMenuTrigger = React.forwardRef< @@ -64,7 +64,7 @@ const NavigationMenuContent = React.forwardRef< ref={ref} className={cn( "left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ", - className + className, )} {...props} /> @@ -81,7 +81,7 @@ const NavigationMenuViewport = React.forwardRef< diff --git a/client/src/components/ui/pagination.tsx b/client/src/components/ui/pagination.tsx index 2471ef7..e68c177 100644 --- a/client/src/components/ui/pagination.tsx +++ b/client/src/components/ui/pagination.tsx @@ -18,12 +18,12 @@ Pagination.displayName = "Pagination"; const PaginationContent = React.forwardRef>( ({ className, ...props }, ref) => (
        - ) + ), ); PaginationContent.displayName = "PaginationContent"; const PaginationItem = React.forwardRef>( - ({ className, ...props }, ref) =>
      • + ({ className, ...props }, ref) =>
      • , ); PaginationItem.displayName = "PaginationItem"; @@ -40,7 +40,7 @@ const PaginationLink = ({ className, isActive, size = "icon", ...props }: Pagina variant: isActive ? "outline" : "ghost", size, }), - className + className, )} {...props} /> diff --git a/client/src/components/ui/popover.tsx b/client/src/components/ui/popover.tsx index 4a8d51b..f496bbb 100644 --- a/client/src/components/ui/popover.tsx +++ b/client/src/components/ui/popover.tsx @@ -18,7 +18,7 @@ const PopoverContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]", - className + className, )} {...props} /> diff --git a/client/src/components/ui/radio-group.tsx b/client/src/components/ui/radio-group.tsx index c33e9e3..d60fc94 100644 --- a/client/src/components/ui/radio-group.tsx +++ b/client/src/components/ui/radio-group.tsx @@ -21,7 +21,7 @@ const RadioGroupItem = React.forwardRef< ref={ref} className={cn( "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/resizable.tsx b/client/src/components/ui/resizable.tsx index 09aa7c3..23f278b 100644 --- a/client/src/components/ui/resizable.tsx +++ b/client/src/components/ui/resizable.tsx @@ -26,7 +26,7 @@ const ResizableHandle = ({ div]:rotate-90", - className + className, )} {...props} > diff --git a/client/src/components/ui/scroll-area.tsx b/client/src/components/ui/scroll-area.tsx index 4b023aa..4bc8062 100644 --- a/client/src/components/ui/scroll-area.tsx +++ b/client/src/components/ui/scroll-area.tsx @@ -32,7 +32,7 @@ const ScrollBar = React.forwardRef< "flex touch-none select-none transition-colors", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]", - className + className, )} {...props} > diff --git a/client/src/components/ui/select.tsx b/client/src/components/ui/select.tsx index 17d9acc..4c3ba40 100644 --- a/client/src/components/ui/select.tsx +++ b/client/src/components/ui/select.tsx @@ -18,7 +18,7 @@ const SelectTrigger = React.forwardRef< ref={ref} className={cn( "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", - className + className, )} {...props} > @@ -69,7 +69,7 @@ const SelectContent = React.forwardRef< "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", - className + className, )} position={position} {...props} @@ -79,7 +79,7 @@ const SelectContent = React.forwardRef< className={cn( "p-1", position === "popper" && - "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]" + "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]", )} > {children} @@ -110,7 +110,7 @@ const SelectItem = React.forwardRef< ref={ref} className={cn( "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > diff --git a/client/src/components/ui/separator.tsx b/client/src/components/ui/separator.tsx index 3b5a57d..053e61e 100644 --- a/client/src/components/ui/separator.tsx +++ b/client/src/components/ui/separator.tsx @@ -14,7 +14,7 @@ const Separator = React.forwardRef< className={cn( "shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", - className + className, )} {...props} /> diff --git a/client/src/components/ui/sheet.tsx b/client/src/components/ui/sheet.tsx index 6aa71a7..efaad80 100644 --- a/client/src/components/ui/sheet.tsx +++ b/client/src/components/ui/sheet.tsx @@ -20,7 +20,7 @@ const SheetOverlay = React.forwardRef< { const isMobile = useIsMobile(); const [openMobile, setOpenMobile] = React.useState(false); @@ -86,7 +86,7 @@ const SidebarProvider = React.forwardRef< // This sets the cookie to keep the sidebar state. document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`; }, - [setOpenProp, open] + [setOpenProp, open], ); // Helper to toggle the sidebar. @@ -121,7 +121,7 @@ const SidebarProvider = React.forwardRef< setOpenMobile, toggleSidebar, }), - [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar] + [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar], ); return ( @@ -137,7 +137,7 @@ const SidebarProvider = React.forwardRef< } className={cn( "group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar", - className + className, )} ref={ref} {...props} @@ -147,7 +147,7 @@ const SidebarProvider = React.forwardRef< ); - } + }, ); SidebarProvider.displayName = "SidebarProvider"; @@ -168,7 +168,7 @@ const Sidebar = React.forwardRef< children, ...props }, - ref + ref, ) => { const { isMobile, state, openMobile, setOpenMobile } = useSidebar(); @@ -177,7 +177,7 @@ const Sidebar = React.forwardRef<
        @@ -254,7 +254,7 @@ const Sidebar = React.forwardRef<
        ); - } + }, ); Sidebar.displayName = "Sidebar"; @@ -303,12 +303,12 @@ const SidebarRail = React.forwardRef ); - } + }, ); SidebarRail.displayName = "SidebarRail"; @@ -320,12 +320,12 @@ const SidebarInset = React.forwardRef ); - } + }, ); SidebarInset.displayName = "SidebarInset"; @@ -339,7 +339,7 @@ const SidebarInput = React.forwardRef< data-sidebar="input" className={cn( "h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring", - className + className, )} {...props} /> @@ -357,7 +357,7 @@ const SidebarHeader = React.forwardRef ); - } + }, ); SidebarHeader.displayName = "SidebarHeader"; @@ -371,7 +371,7 @@ const SidebarFooter = React.forwardRef ); - } + }, ); SidebarFooter.displayName = "SidebarFooter"; @@ -398,12 +398,12 @@ const SidebarContent = React.forwardRef ); - } + }, ); SidebarContent.displayName = "SidebarContent"; @@ -417,7 +417,7 @@ const SidebarGroup = React.forwardRef ); - } + }, ); SidebarGroup.displayName = "SidebarGroup"; @@ -434,7 +434,7 @@ const SidebarGroupLabel = React.forwardRef< className={cn( "flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", - className + className, )} {...props} /> @@ -457,7 +457,7 @@ const SidebarGroupAction = React.forwardRef< // Increases the hit area of the button on mobile. "after:absolute after:-inset-2 after:md:hidden", "group-data-[collapsible=icon]:hidden", - className + className, )} {...props} /> @@ -473,7 +473,7 @@ const SidebarGroupContent = React.forwardRef - ) + ), ); SidebarGroupContent.displayName = "SidebarGroupContent"; @@ -485,7 +485,7 @@ const SidebarMenu = React.forwardRef - ) + ), ); SidebarMenu.displayName = "SidebarMenu"; @@ -497,7 +497,7 @@ const SidebarMenuItem = React.forwardRef - ) + ), ); SidebarMenuItem.displayName = "SidebarMenuItem"; @@ -520,7 +520,7 @@ const sidebarMenuButtonVariants = cva( variant: "default", size: "default", }, - } + }, ); const SidebarMenuButton = React.forwardRef< @@ -541,7 +541,7 @@ const SidebarMenuButton = React.forwardRef< className, ...props }, - ref + ref, ) => { const Comp = asChild ? Slot : "button"; const { isMobile, state } = useSidebar(); @@ -579,7 +579,7 @@ const SidebarMenuButton = React.forwardRef< /> ); - } + }, ); SidebarMenuButton.displayName = "SidebarMenuButton"; @@ -606,7 +606,7 @@ const SidebarMenuAction = React.forwardRef< "group-data-[collapsible=icon]:hidden", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0", - className + className, )} {...props} /> @@ -626,11 +626,11 @@ const SidebarMenuBadge = React.forwardRef - ) + ), ); SidebarMenuBadge.displayName = "SidebarMenuBadge"; @@ -675,16 +675,16 @@ const SidebarMenuSub = React.forwardRef - ) + ), ); SidebarMenuSub.displayName = "SidebarMenuSub"; const SidebarMenuSubItem = React.forwardRef>( - ({ ...props }, ref) =>
      • + ({ ...props }, ref) =>
      • , ); SidebarMenuSubItem.displayName = "SidebarMenuSubItem"; @@ -710,7 +710,7 @@ const SidebarMenuSubButton = React.forwardRef< size === "sm" && "text-xs", size === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", - className + className, )} {...props} /> diff --git a/client/src/components/ui/switch.tsx b/client/src/components/ui/switch.tsx index fc32559..2d56246 100644 --- a/client/src/components/ui/switch.tsx +++ b/client/src/components/ui/switch.tsx @@ -10,14 +10,14 @@ const Switch = React.forwardRef< diff --git a/client/src/components/ui/table.tsx b/client/src/components/ui/table.tsx index 249d474..7a7026f 100644 --- a/client/src/components/ui/table.tsx +++ b/client/src/components/ui/table.tsx @@ -7,7 +7,7 @@ const Table = React.forwardRef
    • - ) + ), ); Table.displayName = "Table"; @@ -45,11 +45,11 @@ const TableRow = React.forwardRef - ) + ), ); TableRow.displayName = "TableRow"; @@ -61,7 +61,7 @@ const TableHead = React.forwardRef< ref={ref} className={cn( "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", - className + className, )} {...props} /> diff --git a/client/src/components/ui/tabs.tsx b/client/src/components/ui/tabs.tsx index d614e8f..79776c5 100644 --- a/client/src/components/ui/tabs.tsx +++ b/client/src/components/ui/tabs.tsx @@ -13,7 +13,7 @@ const TabsList = React.forwardRef< ref={ref} className={cn( "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", - className + className, )} {...props} /> @@ -28,7 +28,7 @@ const TabsTrigger = React.forwardRef< ref={ref} className={cn( "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", - className + className, )} {...props} /> @@ -43,7 +43,7 @@ const TabsContent = React.forwardRef< ref={ref} className={cn( "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", - className + className, )} {...props} /> diff --git a/client/src/components/ui/textarea.tsx b/client/src/components/ui/textarea.tsx index 78cacf1..69391b2 100644 --- a/client/src/components/ui/textarea.tsx +++ b/client/src/components/ui/textarea.tsx @@ -8,13 +8,13 @@ const Textarea = React.forwardRef ); - } + }, ); Textarea.displayName = "Textarea"; diff --git a/client/src/components/ui/toast.tsx b/client/src/components/ui/toast.tsx index e54b968..8079d5e 100644 --- a/client/src/components/ui/toast.tsx +++ b/client/src/components/ui/toast.tsx @@ -15,7 +15,7 @@ const ToastViewport = React.forwardRef< ref={ref} className={cn( "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", - className + className, )} {...props} /> @@ -35,7 +35,7 @@ const toastVariants = cva( defaultVariants: { variant: "default", }, - } + }, ); const Toast = React.forwardRef< @@ -60,7 +60,7 @@ const ToastAction = React.forwardRef< ref={ref} className={cn( "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", - className + className, )} {...props} /> @@ -75,7 +75,7 @@ const ToastClose = React.forwardRef< ref={ref} className={cn( "absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", - className + className, )} toast-close="" {...props} diff --git a/client/src/components/ui/toggle-group.tsx b/client/src/components/ui/toggle-group.tsx index 86562fd..e469c78 100644 --- a/client/src/components/ui/toggle-group.tsx +++ b/client/src/components/ui/toggle-group.tsx @@ -41,7 +41,7 @@ const ToggleGroupItem = React.forwardRef< variant: context.variant || variant, size: context.size || size, }), - className + className, )} {...props} > diff --git a/client/src/components/ui/toggle.tsx b/client/src/components/ui/toggle.tsx index de2335e..39a1ef2 100644 --- a/client/src/components/ui/toggle.tsx +++ b/client/src/components/ui/toggle.tsx @@ -22,7 +22,7 @@ const toggleVariants = cva( variant: "default", size: "default", }, - } + }, ); const Toggle = React.forwardRef< diff --git a/client/src/components/ui/tooltip.tsx b/client/src/components/ui/tooltip.tsx index 4bae421..04f20e9 100644 --- a/client/src/components/ui/tooltip.tsx +++ b/client/src/components/ui/tooltip.tsx @@ -18,7 +18,7 @@ const TooltipContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]", - className + className, )} {...props} /> diff --git a/client/src/hooks/use-toast.ts b/client/src/hooks/use-toast.ts index 595bab3..0780bb1 100644 --- a/client/src/hooks/use-toast.ts +++ b/client/src/hooks/use-toast.ts @@ -103,7 +103,7 @@ export const reducer = (state: State, action: Action): State => { ...t, open: false, } - : t + : t, ), }; } diff --git a/client/src/lib/queryClient.ts b/client/src/lib/queryClient.ts index dcb965a..1513662 100644 --- a/client/src/lib/queryClient.ts +++ b/client/src/lib/queryClient.ts @@ -25,7 +25,7 @@ async function throwIfResNotOk(res: Response) { export async function apiRequest( method: string, url: string, - data?: unknown | undefined + data?: unknown | undefined, ): Promise { const res = await fetch(url, { method, diff --git a/client/src/lib/websocket.ts b/client/src/lib/websocket.ts index e86bd05..29e27ca 100644 --- a/client/src/lib/websocket.ts +++ b/client/src/lib/websocket.ts @@ -59,14 +59,14 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { const message = JSON.parse(event.data); onMessage?.(message); // Call the primary onMessage handler websocketCallbacks.current.forEach((callback) => - callback({ type: "message", data: message }) + callback({ type: "message", data: message }), ); // Call registered callbacks } catch (_error) { websocketCallbacks.current.forEach((callback) => callback({ type: "error", error: "Failed to parse message", - }) + }), ); } }; @@ -86,7 +86,7 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { callback({ type: "error", error: "Connection failed after maximum attempts", - }) + }), ); } }; @@ -97,7 +97,7 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { callback({ type: "error", error: "WebSocket connection error", - }) + }), ); // The onclose event will handle reconnection logic, so we don't need to call connect() here again. }; @@ -108,7 +108,7 @@ export function useWebSocket(onMessage?: (message: WebSocketMessage) => void) { callback({ type: "error", error: "Failed to initiate WebSocket connection", - }) + }), ); // Attempt to reconnect even if initial connection fails if (reconnectAttempts < maxReconnectAttempts) { diff --git a/client/src/pages/admin.tsx b/client/src/pages/admin.tsx index 2fe6cb0..468290e 100644 --- a/client/src/pages/admin.tsx +++ b/client/src/pages/admin.tsx @@ -181,7 +181,7 @@ export default function AdminPage() { const activeTournaments = tournaments.filter((t: Tournament) => t.status === "active").length; const totalParticipants = tournaments.reduce( (acc: number, t: Tournament) => acc + t.participants.length, - 0 + 0, ); return ( @@ -432,7 +432,7 @@ export default function AdminPage() { size="sm" variant="ghost" className="p-1 h-auto" - onClick={() => handleDelete(tournament.id, tournament.title)} + onClick={() => handleDelete(tournament.id)} disabled={deleteTournamentMutation.isPending} > diff --git a/package-lock.json b/package-lock.json index 35af3f5..a36b6d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,7 @@ "drizzle-zod": "^0.7.0", "embla-carousel-react": "^8.6.0", "express": "^4.21.2", - "express-rate-limit": "^8.0.1", + "express-rate-limit": "8.0.1", "express-session": "^1.18.1", "framer-motion": "^11.13.1", "input-otp": "^1.4.2", diff --git a/package.json b/package.json index 405ce17..c7879f7 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "drizzle-zod": "^0.7.0", "embla-carousel-react": "^8.6.0", "express": "^4.21.2", - "express-rate-limit": "^8.0.1", + "express-rate-limit": "8.0.1", "express-session": "^1.18.1", "framer-motion": "^11.13.1", "input-otp": "^1.4.2", diff --git a/server/auth.ts b/server/auth.ts index ec168d0..bb89e6e 100644 --- a/server/auth.ts +++ b/server/auth.ts @@ -36,7 +36,7 @@ interface TelegramInitData { */ export function validateTelegramInitData( initData: string, - botToken: string + botToken: string, ): TelegramInitData | null { try { // Parse URL-encoded data diff --git a/server/errorHandler.ts b/server/errorHandler.ts index a57c411..cbff3b8 100644 --- a/server/errorHandler.ts +++ b/server/errorHandler.ts @@ -149,7 +149,7 @@ export function errorHandler( req: Request, res: Response, // eslint-disable-next-line @typescript-eslint/no-unused-vars - _next: NextFunction + _next: NextFunction, ): void { const statusCode = getStatusCode(error); const userContext = extractUserContext(req); @@ -232,7 +232,7 @@ export function handleUncaughtException(error: Error): void { * Async error wrapper for route handlers */ export function asyncHandler( - fn: (req: Request, res: Response, next: NextFunction) => Promise + fn: (req: Request, res: Response, next: NextFunction) => Promise, ) { return (req: Request, res: Response, next: NextFunction) => { Promise.resolve(fn(req, res, next)).catch(next); diff --git a/server/index.ts b/server/index.ts index 27c60c2..dad1d80 100644 --- a/server/index.ts +++ b/server/index.ts @@ -80,6 +80,6 @@ app.use((req, res, next) => { log(`📱 Frontend: http://localhost:${port}`); log(`🔗 API: http://localhost:${port}/api`); } - } + }, ); })(); diff --git a/server/logger.ts b/server/logger.ts index 55c356c..d8950e7 100644 --- a/server/logger.ts +++ b/server/logger.ts @@ -6,7 +6,7 @@ const logger = winston.createLogger({ format: winston.format.combine( winston.format.timestamp(), winston.format.errors({ stack: true }), - winston.format.json() + winston.format.json(), ), transports: [ new winston.transports.Console({ @@ -18,7 +18,7 @@ const logger = winston.createLogger({ export function logRequest( req: Request, message: string, - level: "info" | "warn" | "error" = "info" + level: "info" | "warn" | "error" = "info", ) { const userContext = { ip: req.ip, diff --git a/server/middleware.ts b/server/middleware.ts index 6aff925..9e97b5e 100644 --- a/server/middleware.ts +++ b/server/middleware.ts @@ -153,7 +153,7 @@ export const securityHeaders = (req: Request, res: Response, _next: NextFunction // Content Security Policy (basic example) res.setHeader( "Content-Security-Policy", - "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:;" + "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:;", ); _next(); @@ -173,7 +173,7 @@ export const requestLogger = (req: Request, res: Response, _next: NextFunction) // Log format: [timestamp] method url status duration ip userAgent console.log( - `[${new Date().toISOString()}] ${method} ${url} ${status} ${duration}ms ${ip} "${userAgent}"` + `[${new Date().toISOString()}] ${method} ${url} ${status} ${duration}ms ${ip} "${userAgent}"`, ); }); diff --git a/server/routes.ts b/server/routes.ts index afcdc68..0e25155 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -127,7 +127,7 @@ export async function registerRoutes(app: Express): Promise { } res.status(500).json({ message: "Failed to create tournament" }); } - } + }, ); app.put("/api/tournaments/:id", rateLimiters.adminLimiter, async (req, res) => { @@ -231,7 +231,7 @@ export async function registerRoutes(app: Express): Promise { } catch (error) { res.status(500).json({ message: "Failed to register for tournament" }); } - } + }, ); app.delete( @@ -268,7 +268,7 @@ export async function registerRoutes(app: Express): Promise { } catch (error) { res.status(500).json({ message: "Failed to unregister from tournament" }); } - } + }, ); app.get("/api/tournaments/:id/participants", async (req, res) => { @@ -279,7 +279,7 @@ export async function registerRoutes(app: Express): Promise { } const participants = await Promise.all( - tournament.participants.map((userId) => storage.getUser(userId)) + tournament.participants.map((userId) => storage.getUser(userId)), ); res.json(participants.filter(Boolean)); diff --git a/server/storage.ts b/server/storage.ts index 659972f..7fa6614 100644 --- a/server/storage.ts +++ b/server/storage.ts @@ -147,7 +147,7 @@ export class DatabaseStorage implements IStorage { async updateTournament( id: string, - updates: Partial + updates: Partial, ): Promise { const [tournament] = await db .update(tournaments) diff --git a/server/validation.ts b/server/validation.ts index 90a0e65..ce5358f 100644 --- a/server/validation.ts +++ b/server/validation.ts @@ -88,7 +88,7 @@ function secureString( pattern?: RegExp; allowEmpty?: boolean; sanitize?: boolean; - } = {} + } = {}, ) { return z .string() @@ -117,7 +117,7 @@ function secureString( } return true; }, - { message: "Value cannot be empty" } + { message: "Value cannot be empty" }, ) .refine( (val) => { @@ -126,7 +126,7 @@ function secureString( } return true; }, - { message: `Minimum length is ${options.minLength}` } + { message: `Minimum length is ${options.minLength}` }, ) .refine( (val) => { @@ -135,7 +135,7 @@ function secureString( } return true; }, - { message: `Maximum length is ${options.maxLength}` } + { message: `Maximum length is ${options.maxLength}` }, ) .refine( (val) => { @@ -144,7 +144,7 @@ function secureString( } return true; }, - { message: "Invalid format" } + { message: "Invalid format" }, ); } @@ -257,7 +257,7 @@ export const createTournamentSchema = z { message: "End date must be after start date", path: ["endDate"], - } + }, ); /** diff --git a/server/vite.ts b/server/vite.ts index 351b4f5..442853f 100644 --- a/server/vite.ts +++ b/server/vite.ts @@ -66,7 +66,7 @@ export function serveStatic(app: Express) { if (!fs.existsSync(distPath)) { throw new Error( - `Could not find the build directory: ${distPath}, make sure to build the client first` + `Could not find the build directory: ${distPath}, make sure to build the client first`, ); }