Skip to content

Commit 2075588

Browse files
committed
ci: fail build on lint warnings; enforce checks in Vercel build
1 parent 0418166 commit 2075588

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1185
-1181
lines changed

.github/workflows/pre-deploy-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030
- name: Check code formatting
3131
run: pnpm format:check
3232

33-
- name: Run ESLint
34-
run: pnpm lint
33+
- name: Run ESLint (fail on warnings)
34+
run: pnpm lint:ci
3535

3636
- name: Type check
3737
run: pnpm type-check

components/ui/accordion.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
"use client"
1+
'use client';
22

3-
import * as React from "react"
4-
import * as AccordionPrimitive from "@radix-ui/react-accordion"
5-
import { ChevronDownIcon } from "lucide-react"
3+
import * as React from 'react';
4+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
5+
import { ChevronDownIcon } from 'lucide-react';
66

7-
import { cn } from "@/lib/utils"
7+
import { cn } from '@/lib/utils';
88

99
function Accordion({
1010
...props
1111
}: React.ComponentProps<typeof AccordionPrimitive.Root>) {
12-
return <AccordionPrimitive.Root data-slot="accordion" {...props} />
12+
return <AccordionPrimitive.Root data-slot="accordion" {...props} />;
1313
}
1414

1515
function AccordionItem({
@@ -19,10 +19,10 @@ function AccordionItem({
1919
return (
2020
<AccordionPrimitive.Item
2121
data-slot="accordion-item"
22-
className={cn("border-b last:border-b-0", className)}
22+
className={cn('border-b last:border-b-0', className)}
2323
{...props}
2424
/>
25-
)
25+
);
2626
}
2727

2828
function AccordionTrigger({
@@ -35,7 +35,7 @@ function AccordionTrigger({
3535
<AccordionPrimitive.Trigger
3636
data-slot="accordion-trigger"
3737
className={cn(
38-
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
38+
'focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180',
3939
className
4040
)}
4141
{...props}
@@ -44,7 +44,7 @@ function AccordionTrigger({
4444
<ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
4545
</AccordionPrimitive.Trigger>
4646
</AccordionPrimitive.Header>
47-
)
47+
);
4848
}
4949

5050
function AccordionContent({
@@ -58,9 +58,9 @@ function AccordionContent({
5858
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
5959
{...props}
6060
>
61-
<div className={cn("pt-0 pb-4", className)}>{children}</div>
61+
<div className={cn('pt-0 pb-4', className)}>{children}</div>
6262
</AccordionPrimitive.Content>
63-
)
63+
);
6464
}
6565

66-
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
66+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };

components/ui/alert-dialog.tsx

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
"use client"
1+
'use client';
22

3-
import * as React from "react"
4-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
3+
import * as React from 'react';
4+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
55

6-
import { cn } from "@/lib/utils"
7-
import { buttonVariants } from "@/components/ui/button"
6+
import { cn } from '@/lib/utils';
7+
import { buttonVariants } from '@/components/ui/button';
88

99
function AlertDialog({
1010
...props
1111
}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
12-
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
12+
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
1313
}
1414

1515
function AlertDialogTrigger({
1616
...props
1717
}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
1818
return (
1919
<AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
20-
)
20+
);
2121
}
2222

2323
function AlertDialogPortal({
2424
...props
2525
}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
2626
return (
2727
<AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
28-
)
28+
);
2929
}
3030

3131
function AlertDialogOverlay({
@@ -36,12 +36,12 @@ function AlertDialogOverlay({
3636
<AlertDialogPrimitive.Overlay
3737
data-slot="alert-dialog-overlay"
3838
className={cn(
39-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
39+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',
4040
className
4141
)}
4242
{...props}
4343
/>
44-
)
44+
);
4545
}
4646

4747
function AlertDialogContent({
@@ -54,42 +54,42 @@ function AlertDialogContent({
5454
<AlertDialogPrimitive.Content
5555
data-slot="alert-dialog-content"
5656
className={cn(
57-
"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
57+
'bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',
5858
className
5959
)}
6060
{...props}
6161
/>
6262
</AlertDialogPortal>
63-
)
63+
);
6464
}
6565

6666
function AlertDialogHeader({
6767
className,
6868
...props
69-
}: React.ComponentProps<"div">) {
69+
}: React.ComponentProps<'div'>) {
7070
return (
7171
<div
7272
data-slot="alert-dialog-header"
73-
className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
73+
className={cn('flex flex-col gap-2 text-center sm:text-left', className)}
7474
{...props}
7575
/>
76-
)
76+
);
7777
}
7878

7979
function AlertDialogFooter({
8080
className,
8181
...props
82-
}: React.ComponentProps<"div">) {
82+
}: React.ComponentProps<'div'>) {
8383
return (
8484
<div
8585
data-slot="alert-dialog-footer"
8686
className={cn(
87-
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
87+
'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',
8888
className
8989
)}
9090
{...props}
9191
/>
92-
)
92+
);
9393
}
9494

9595
function AlertDialogTitle({
@@ -99,10 +99,10 @@ function AlertDialogTitle({
9999
return (
100100
<AlertDialogPrimitive.Title
101101
data-slot="alert-dialog-title"
102-
className={cn("text-lg font-semibold", className)}
102+
className={cn('text-lg font-semibold', className)}
103103
{...props}
104104
/>
105-
)
105+
);
106106
}
107107

108108
function AlertDialogDescription({
@@ -112,10 +112,10 @@ function AlertDialogDescription({
112112
return (
113113
<AlertDialogPrimitive.Description
114114
data-slot="alert-dialog-description"
115-
className={cn("text-muted-foreground text-sm", className)}
115+
className={cn('text-muted-foreground text-sm', className)}
116116
{...props}
117117
/>
118-
)
118+
);
119119
}
120120

121121
function AlertDialogAction({
@@ -127,7 +127,7 @@ function AlertDialogAction({
127127
className={cn(buttonVariants(), className)}
128128
{...props}
129129
/>
130-
)
130+
);
131131
}
132132

133133
function AlertDialogCancel({
@@ -136,10 +136,10 @@ function AlertDialogCancel({
136136
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
137137
return (
138138
<AlertDialogPrimitive.Cancel
139-
className={cn(buttonVariants({ variant: "outline" }), className)}
139+
className={cn(buttonVariants({ variant: 'outline' }), className)}
140140
{...props}
141141
/>
142-
)
142+
);
143143
}
144144

145145
export {
@@ -154,4 +154,4 @@ export {
154154
AlertDialogDescription,
155155
AlertDialogAction,
156156
AlertDialogCancel,
157-
}
157+
};

components/ui/alert.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
1-
import * as React from "react"
2-
import { cva, type VariantProps } from "class-variance-authority"
1+
import * as React from 'react';
2+
import { cva, type VariantProps } from 'class-variance-authority';
33

4-
import { cn } from "@/lib/utils"
4+
import { cn } from '@/lib/utils';
55

66
const alertVariants = cva(
7-
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
7+
'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',
88
{
99
variants: {
1010
variant: {
11-
default: "bg-card text-card-foreground",
11+
default: 'bg-card text-card-foreground',
1212
destructive:
13-
"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
13+
'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90',
1414
},
1515
},
1616
defaultVariants: {
17-
variant: "default",
17+
variant: 'default',
1818
},
1919
}
20-
)
20+
);
2121

2222
function Alert({
2323
className,
2424
variant,
2525
...props
26-
}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
26+
}: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {
2727
return (
2828
<div
2929
data-slot="alert"
3030
role="alert"
3131
className={cn(alertVariants({ variant }), className)}
3232
{...props}
3333
/>
34-
)
34+
);
3535
}
3636

37-
function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
37+
function AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {
3838
return (
3939
<div
4040
data-slot="alert-title"
4141
className={cn(
42-
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
42+
'col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight',
4343
className
4444
)}
4545
{...props}
4646
/>
47-
)
47+
);
4848
}
4949

5050
function AlertDescription({
5151
className,
5252
...props
53-
}: React.ComponentProps<"div">) {
53+
}: React.ComponentProps<'div'>) {
5454
return (
5555
<div
5656
data-slot="alert-description"
5757
className={cn(
58-
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
58+
'text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed',
5959
className
6060
)}
6161
{...props}
6262
/>
63-
)
63+
);
6464
}
6565

66-
export { Alert, AlertTitle, AlertDescription }
66+
export { Alert, AlertTitle, AlertDescription };

components/ui/aspect-ratio.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
"use client"
1+
'use client';
22

3-
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
3+
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
44

55
function AspectRatio({
66
...props
77
}: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {
8-
return <AspectRatioPrimitive.Root data-slot="aspect-ratio" {...props} />
8+
return <AspectRatioPrimitive.Root data-slot="aspect-ratio" {...props} />;
99
}
1010

11-
export { AspectRatio }
11+
export { AspectRatio };

components/ui/avatar.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
"use client"
1+
'use client';
22

3-
import * as React from "react"
4-
import * as AvatarPrimitive from "@radix-ui/react-avatar"
3+
import * as React from 'react';
4+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
55

6-
import { cn } from "@/lib/utils"
6+
import { cn } from '@/lib/utils';
77

88
function Avatar({
99
className,
@@ -13,12 +13,12 @@ function Avatar({
1313
<AvatarPrimitive.Root
1414
data-slot="avatar"
1515
className={cn(
16-
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
16+
'relative flex size-8 shrink-0 overflow-hidden rounded-full',
1717
className
1818
)}
1919
{...props}
2020
/>
21-
)
21+
);
2222
}
2323

2424
function AvatarImage({
@@ -28,10 +28,10 @@ function AvatarImage({
2828
return (
2929
<AvatarPrimitive.Image
3030
data-slot="avatar-image"
31-
className={cn("aspect-square size-full", className)}
31+
className={cn('aspect-square size-full', className)}
3232
{...props}
3333
/>
34-
)
34+
);
3535
}
3636

3737
function AvatarFallback({
@@ -42,12 +42,12 @@ function AvatarFallback({
4242
<AvatarPrimitive.Fallback
4343
data-slot="avatar-fallback"
4444
className={cn(
45-
"bg-muted flex size-full items-center justify-center rounded-full",
45+
'bg-muted flex size-full items-center justify-center rounded-full',
4646
className
4747
)}
4848
{...props}
4949
/>
50-
)
50+
);
5151
}
5252

53-
export { Avatar, AvatarImage, AvatarFallback }
53+
export { Avatar, AvatarImage, AvatarFallback };

0 commit comments

Comments
 (0)