EsLint v9 (#154)
* Upgrade ESLint and related configurations to version 9 - Update ESLint to version 9.19.0 - Migrate ESLint configurations to flat config format - Remove deprecated ESLint config files - Update package dependencies and configurations - Simplify ESLint setup across packages - Remove unnecessary ESLint config blocks from package.json files - Improved CI caching with Turborepo tasks - Removed duplicate styles
This commit is contained in:
committed by
GitHub
parent
e2f45cae49
commit
6f9cf22fa8
@@ -28,7 +28,7 @@ const AccordionTrigger: React.FC<
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
<ChevronDownIcon className="h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" />
|
||||
<ChevronDownIcon className="text-muted-foreground h-4 w-4 shrink-0 transition-transform duration-200" />
|
||||
</AccordionPrimitive.Trigger>
|
||||
</AccordionPrimitive.Header>
|
||||
);
|
||||
@@ -38,10 +38,10 @@ const AccordionContent: React.FC<
|
||||
React.ComponentPropsWithRef<typeof AccordionPrimitive.Content>
|
||||
> = ({ className, children, ...props }) => (
|
||||
<AccordionPrimitive.Content
|
||||
className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
||||
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
|
||||
{...props}
|
||||
>
|
||||
<div className={cn('pb-4 pt-0', className)}>{children}</div>
|
||||
<div className={cn('pt-0 pb-4', className)}>{children}</div>
|
||||
</AccordionPrimitive.Content>
|
||||
);
|
||||
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
||||
|
||||
@@ -34,7 +34,7 @@ const AvatarFallback: React.FC<
|
||||
> = ({ className, ...props }) => (
|
||||
<AvatarPrimitive.Fallback
|
||||
className={cn(
|
||||
'flex h-full w-full items-center justify-center rounded-full bg-muted',
|
||||
'bg-muted flex h-full w-full items-center justify-center rounded-full',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@@ -18,7 +18,7 @@ const BreadcrumbList: React.FC<React.ComponentPropsWithRef<'ol'>> = ({
|
||||
}) => (
|
||||
<ol
|
||||
className={cn(
|
||||
'flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground',
|
||||
'text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
@@ -64,7 +64,7 @@ const BreadcrumbPage: React.FC<React.ComponentPropsWithoutRef<'span'>> = ({
|
||||
role="link"
|
||||
aria-disabled="true"
|
||||
aria-current="page"
|
||||
className={cn('font-normal text-foreground', className)}
|
||||
className={cn('text-foreground font-normal', className)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -7,7 +7,7 @@ const Card: React.FC<React.HTMLAttributes<HTMLDivElement>> = ({
|
||||
...props
|
||||
}) => (
|
||||
<div
|
||||
className={cn('rounded-xl border bg-card text-card-foreground', className)}
|
||||
className={cn('bg-card text-card-foreground rounded-xl border', className)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
@@ -26,7 +26,7 @@ const CardTitle: React.FC<React.HTMLAttributes<HTMLHeadingElement>> = ({
|
||||
...props
|
||||
}) => (
|
||||
<h3
|
||||
className={cn('font-semibold leading-none tracking-tight', className)}
|
||||
className={cn('leading-none font-semibold tracking-tight', className)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
@@ -36,7 +36,7 @@ const CardDescription: React.FC<React.HTMLAttributes<HTMLParagraphElement>> = ({
|
||||
className,
|
||||
...props
|
||||
}) => (
|
||||
<p className={cn('text-sm text-muted-foreground', className)} {...props} />
|
||||
<p className={cn('text-muted-foreground text-sm', className)} {...props} />
|
||||
);
|
||||
CardDescription.displayName = 'CardDescription';
|
||||
|
||||
|
||||
@@ -166,8 +166,7 @@ const ChartTooltipContent: React.FC<
|
||||
labelKey,
|
||||
]);
|
||||
|
||||
/* @ts-expect-error: TS issue */
|
||||
if (!active ?? !payload?.length) {
|
||||
if (!active || !payload?.length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -286,7 +285,6 @@ const ChartLegendContent: React.FC<
|
||||
)}
|
||||
>
|
||||
{payload.map((item) => {
|
||||
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
||||
const key = `${nameKey ?? item.dataKey ?? 'value'}`;
|
||||
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
|
||||
const CommandInput: React.FC<
|
||||
React.ComponentPropsWithRef<typeof CommandPrimitive.Input>
|
||||
> = ({ className, ...props }) => (
|
||||
// eslint-disable-next-line react/no-unknown-property
|
||||
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
|
||||
<MagnifyingGlassIcon className="mr-2 h-4 w-4 shrink-0 opacity-50" />
|
||||
<CommandPrimitive.Input
|
||||
|
||||
@@ -12,7 +12,7 @@ export function Heading({
|
||||
return (
|
||||
<h1
|
||||
className={cn(
|
||||
`scroll-m-20 font-heading text-3xl font-bold tracking-tight dark:text-white lg:text-4xl`,
|
||||
`font-heading scroll-m-20 text-3xl font-bold tracking-tight lg:text-4xl dark:text-white`,
|
||||
className,
|
||||
)}
|
||||
>
|
||||
@@ -23,7 +23,7 @@ export function Heading({
|
||||
return (
|
||||
<h2
|
||||
className={cn(
|
||||
`scroll-m-20 pb-2 font-heading text-2xl font-semibold tracking-tight transition-colors first:mt-0 lg:text-3xl`,
|
||||
`font-heading scroll-m-20 pb-2 text-2xl font-semibold tracking-tight transition-colors first:mt-0 lg:text-3xl`,
|
||||
className,
|
||||
)}
|
||||
>
|
||||
@@ -34,7 +34,7 @@ export function Heading({
|
||||
return (
|
||||
<h3
|
||||
className={cn(
|
||||
'scroll-m-20 font-heading text-xl font-semibold tracking-tight lg:text-2xl',
|
||||
'font-heading scroll-m-20 text-xl font-semibold tracking-tight lg:text-2xl',
|
||||
className,
|
||||
)}
|
||||
>
|
||||
@@ -45,7 +45,7 @@ export function Heading({
|
||||
return (
|
||||
<h4
|
||||
className={cn(
|
||||
'scroll-m-20 font-heading text-lg font-semibold tracking-tight lg:text-xl',
|
||||
'font-heading scroll-m-20 text-lg font-semibold tracking-tight lg:text-xl',
|
||||
className,
|
||||
)}
|
||||
>
|
||||
@@ -56,7 +56,7 @@ export function Heading({
|
||||
return (
|
||||
<h5
|
||||
className={cn(
|
||||
'scroll-m-20 font-heading text-base font-medium lg:text-lg',
|
||||
'font-heading scroll-m-20 text-base font-medium lg:text-lg',
|
||||
className,
|
||||
)}
|
||||
>
|
||||
@@ -67,7 +67,7 @@ export function Heading({
|
||||
return (
|
||||
<h6
|
||||
className={cn(
|
||||
'scroll-m-20 font-heading text-base font-medium',
|
||||
'font-heading scroll-m-20 text-base font-medium',
|
||||
className,
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -8,7 +8,7 @@ import { type VariantProps, cva } from 'class-variance-authority';
|
||||
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 leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
|
||||
);
|
||||
|
||||
const Label: React.FC<
|
||||
|
||||
@@ -11,13 +11,13 @@ const Progress: React.FC<
|
||||
> = ({ className, value, ...props }) => (
|
||||
<ProgressPrimitive.Root
|
||||
className={cn(
|
||||
'relative h-2 w-full overflow-hidden rounded-full bg-primary/20',
|
||||
'bg-primary/20 relative h-2 w-full overflow-hidden rounded-full',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<ProgressPrimitive.Indicator
|
||||
className="h-full w-full flex-1 bg-primary transition-all"
|
||||
className="bg-primary h-full w-full flex-1 transition-all"
|
||||
style={{ transform: `translateX(-${100 - (value ?? 0)}%)` }}
|
||||
/>
|
||||
</ProgressPrimitive.Root>
|
||||
|
||||
@@ -28,7 +28,7 @@ const ScrollBar: React.FC<
|
||||
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
||||
orientation={orientation}
|
||||
className={cn(
|
||||
'flex touch-none select-none transition-colors',
|
||||
'flex touch-none transition-colors select-none',
|
||||
orientation === 'vertical' &&
|
||||
'h-full w-2.5 border-l border-l-transparent p-[1px]',
|
||||
orientation === 'horizontal' &&
|
||||
@@ -37,7 +37,7 @@ const ScrollBar: React.FC<
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
|
||||
<ScrollAreaPrimitive.ScrollAreaThumb className="bg-border relative flex-1 rounded-full" />
|
||||
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
||||
);
|
||||
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
||||
|
||||
@@ -18,7 +18,7 @@ const Separator: React.FC<
|
||||
decorative={decorative}
|
||||
orientation={orientation}
|
||||
className={cn(
|
||||
'shrink-0 bg-border',
|
||||
'bg-border shrink-0',
|
||||
orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
|
||||
className,
|
||||
)}
|
||||
|
||||
@@ -6,7 +6,7 @@ function Skeleton({
|
||||
}: React.HTMLAttributes<HTMLDivElement>) {
|
||||
return (
|
||||
<div
|
||||
className={cn('animate-pulse rounded-md bg-primary/10', className)}
|
||||
className={cn('bg-primary/10 animate-pulse rounded-md', className)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -18,7 +18,7 @@ const TooltipContent: React.FC<
|
||||
<TooltipPrimitive.Content
|
||||
sideOffset={sideOffset}
|
||||
className={cn(
|
||||
'z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground 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',
|
||||
'bg-primary text-primary-foreground 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 z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
||||
Reference in New Issue
Block a user