chore: fixes from deno linting/formatting

This commit is contained in:
Dan Ditomaso
2025-03-02 14:46:02 -05:00
parent db08542b39
commit 50eb2a827f
136 changed files with 1018 additions and 1082 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import { cn } from "@app/core/utils/cn";
import { cn } from "../../core/utils/cn.ts";
import type React from "react";
type RGBColor = {
+5 -3
View File
@@ -1,4 +1,4 @@
import { type VariantProps, cva } from "class-variance-authority";
import { cva, type VariantProps } from "class-variance-authority";
import * as React from "react";
import { cn } from "@core/utils/cn.ts";
@@ -20,7 +20,8 @@ const buttonVariants = cva(
"bg-slate-100 text-slate-700 hover:bg-slate-200 dark:bg-slate-500 dark:text-white dark:hover:bg-slate-400",
ghost:
"bg-transparent hover:bg-slate-100 dark:hover:bg-slate-800 dark:text-slate-100 dark:hover:text-slate-100 data-[state=open]:bg-transparent dark:data-[state=open]:bg-transparent",
link: "bg-transparent underline-offset-4 hover:underline text-slate-900 dark:text-slate-100 hover:bg-transparent dark:hover:bg-transparent",
link:
"bg-transparent underline-offset-4 hover:underline text-slate-900 dark:text-slate-100 hover:bg-transparent dark:hover:bg-transparent",
},
size: {
default: "h-10 py-2 px-4",
@@ -38,7 +39,8 @@ const buttonVariants = cva(
export type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
extends
React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {}
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
+3 -3
View File
@@ -144,11 +144,11 @@ CommandShortcut.displayName = "CommandShortcut";
export {
Command,
CommandDialog,
CommandInput,
CommandList,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandShortcut,
CommandList,
CommandSeparator,
CommandShortcut,
};
+5 -5
View File
@@ -23,7 +23,7 @@ DialogPortal.displayName = DialogPrimitive.Portal.displayName;
const DialogOverlay = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Overlay>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
>(({ className, children, ...props }, ref) => (
>(({ className, ...props }, ref) => (
<DialogPrimitive.Overlay
className={cn(
"fixed inset-0 z-50 bg-black/50 backdrop-blur-xs transition-opacity animate-in fade-in",
@@ -113,10 +113,10 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
export {
Dialog,
DialogTrigger,
DialogContent,
DialogHeader,
DialogFooter,
DialogTitle,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
};
+7 -7
View File
@@ -184,18 +184,18 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
export {
DropdownMenu,
DropdownMenuTrigger,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuCheckboxItem,
DropdownMenuRadioItem,
DropdownMenuContent,
DropdownMenuGroup,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuPortal,
DropdownMenuRadioGroup,
DropdownMenuRadioItem,
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuGroup,
DropdownMenuPortal,
DropdownMenuSub,
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMenuRadioGroup,
DropdownMenuTrigger,
};
+6 -3
View File
@@ -1,12 +1,15 @@
import { cn } from "@app/core/utils/cn";
import { cn } from "../../core/utils/cn.ts";
import React from "react";
export interface FooterProps extends React.HTMLAttributes<HTMLElement> {}
const Footer = React.forwardRef<HTMLElement, FooterProps>(
({ className, ...props }, ref) => {
({ className, ...props }) => {
return (
<footer className={cn("flex mt-auto justify-center p-2", className)}>
<footer
className={cn("flex mt-auto justify-center p-2", className)}
{...props}
>
<p>
<a
href="https://vercel.com/?utm_source=meshtastic&utm_campaign=oss"
-1
View File
@@ -54,7 +54,6 @@ const Generator = React.forwardRef<HTMLInputElement, GeneratorProps>(
disabled,
...props
},
ref,
) => {
const inputRef = React.useRef<HTMLInputElement>(null);
+3 -2
View File
@@ -1,7 +1,7 @@
import * as React from "react";
import { cn } from "@core/utils/cn.ts";
import { type VariantProps, cva } from "class-variance-authority";
import { cva, type VariantProps } from "class-variance-authority";
import type { LucideIcon } from "lucide-react";
const inputVariants = cva(
@@ -20,7 +20,8 @@ const inputVariants = cva(
);
export interface InputProps
extends React.InputHTMLAttributes<HTMLInputElement>,
extends
React.InputHTMLAttributes<HTMLInputElement>,
VariantProps<typeof inputVariants> {
prefix?: string;
suffix?: string;
+10 -10
View File
@@ -216,19 +216,19 @@ MenubarShortcut.displayname = "MenubarShortcut";
export {
Menubar,
MenubarMenu,
MenubarTrigger,
MenubarContent,
MenubarItem,
MenubarSeparator,
MenubarLabel,
MenubarCheckboxItem,
MenubarContent,
MenubarGroup,
MenubarItem,
MenubarLabel,
MenubarMenu,
MenubarPortal,
MenubarRadioGroup,
MenubarRadioItem,
MenubarPortal,
MenubarSeparator,
MenubarShortcut,
MenubarSub,
MenubarSubContent,
MenubarSubTrigger,
MenubarGroup,
MenubarSub,
MenubarShortcut,
MenubarTrigger,
};
-25
View File
@@ -1,25 +0,0 @@
export interface ModalProps {
title: string;
actions?: JSX.Element[];
children: React.ReactNode;
}
export const Modal = ({
title,
actions,
children,
}: ModalProps): JSX.Element => {
return (
<div className="rounded-md overflow-hidden w-full">
<div className="flex h-12 px-3 bg-slate-200 dark:bg-slate-700 justify-between">
<h2 className="my-auto font-semibold text-lg">{title}</h2>
{actions && (
<div className="my-auto">{actions.map((action) => action)}</div>
)}
</div>
<div className="h-full border border-slate-200 dark:border-slate-700">
{children}
</div>
</div>
);
};
+3 -4
View File
@@ -1,4 +1,4 @@
import { cn } from "@app/core/utils/cn";
import { cn } from "../../core/utils/cn.ts";
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
import { Check } from "lucide-react";
@@ -8,9 +8,8 @@ interface MultiSelectProps {
}
const MultiSelect = ({ children, className = "" }: MultiSelectProps) => {
return (
<div className={cn("flex flex-wrap gap-2", className)}>{children}</div>
);
return <div className={cn("flex flex-wrap gap-2", className)}>{children}
</div>;
};
interface MultiSelectItemProps {
+1 -1
View File
@@ -26,4 +26,4 @@ const PopoverContent = React.forwardRef<
));
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
export { Popover, PopoverTrigger, PopoverContent };
export { Popover, PopoverContent, PopoverTrigger };
+4 -4
View File
@@ -101,11 +101,11 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
export {
Select,
SelectGroup,
SelectValue,
SelectTrigger,
SelectContent,
SelectLabel,
SelectGroup,
SelectItem,
SelectLabel,
SelectSeparator,
SelectTrigger,
SelectValue,
};
+2 -3
View File
@@ -1,12 +1,11 @@
import { Button } from "@components/UI/Button.tsx";
import type { LucideIcon } from "lucide-react";
import type { JSX } from "react";
export interface SidebarButtonProps {
label: string;
active?: boolean;
Icon?: LucideIcon;
element?: JSX.Element;
element?;
onClick?: () => void;
}
@@ -16,7 +15,7 @@ export const SidebarButton = ({
Icon,
element,
onClick,
}: SidebarButtonProps): JSX.Element => (
}: SidebarButtonProps) => (
<Button
onClick={onClick}
variant={active ? "subtle" : "ghost"}
+1 -1
View File
@@ -1,4 +1,4 @@
import { cn } from "@app/core/utils/cn";
import { cn } from "../../core/utils/cn.ts";
interface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {
size?: "sm" | "md" | "lg";
+1 -1
View File
@@ -50,4 +50,4 @@ const TabsContent = React.forwardRef<
));
TabsContent.displayName = TabsPrimitive.Content.displayName;
export { Tabs, TabsList, TabsTrigger, TabsContent };
export { Tabs, TabsContent, TabsList, TabsTrigger };
+11 -11
View File
@@ -1,9 +1,9 @@
import * as ToastPrimitives from "@radix-ui/react-toast";
import { type VariantProps, cva } from "class-variance-authority";
import { cva, type VariantProps } from "class-variance-authority";
import { X } from "lucide-react";
import * as React from "react";
import { cn } from "@core/utils/cn";
import { cn } from "../../core/utils/cn.ts";
const ToastProvider = ToastPrimitives.Provider;
@@ -41,8 +41,8 @@ const toastVariants = cva(
const Toast = React.forwardRef<
React.ElementRef<typeof ToastPrimitives.Root>,
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &
VariantProps<typeof toastVariants>
& React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root>
& VariantProps<typeof toastVariants>
>(({ className, variant, ...props }, ref) => {
return (
<ToastPrimitives.Root
@@ -116,13 +116,13 @@ type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
type ToastActionElement = React.ReactElement<typeof ToastAction>;
export {
type ToastProps,
type ToastActionElement,
ToastProvider,
ToastViewport,
Toast,
ToastTitle,
ToastDescription,
ToastClose,
ToastAction,
type ToastActionElement,
ToastClose,
ToastDescription,
type ToastProps,
ToastProvider,
ToastTitle,
ToastViewport,
};
+2 -2
View File
@@ -29,8 +29,8 @@ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
export {
Tooltip,
TooltipTrigger,
TooltipArrow,
TooltipContent,
TooltipProvider,
TooltipArrow,
TooltipTrigger,
};
+1 -1
View File
@@ -2,7 +2,7 @@ export interface BlockquoteProps {
children: React.ReactNode;
}
export const BlockQuote = ({ children }: BlockquoteProps): JSX.Element => (
export const BlockQuote = ({ children }: BlockquoteProps) => (
<blockquote className="mt-6 border-l-2 border-slate-300 pl-6 italic text-slate-800 dark:border-slate-600 dark:text-slate-200">
{children}
</blockquote>
+1 -1
View File
@@ -2,7 +2,7 @@ export interface CodeProps {
children: React.ReactNode;
}
export const Code = ({ children }: CodeProps): JSX.Element => (
export const Code = ({ children }: CodeProps) => (
<code className="relative rounded-sm bg-slate-100 px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold text-slate-900 dark:bg-slate-800 dark:text-slate-400">
{children}
</code>
+1 -1
View File
@@ -2,7 +2,7 @@ export interface H1Props {
children: React.ReactNode;
}
export const H1 = ({ children }: H1Props): JSX.Element => (
export const H1 = ({ children }: H1Props) => (
<h1 className="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
{children}
</h1>
+1 -1
View File
@@ -2,7 +2,7 @@ export interface H2Props {
children: React.ReactNode;
}
export const H2 = ({ children }: H2Props): JSX.Element => (
export const H2 = ({ children }: H2Props) => (
<h2 className="scroll-m-20 border-b border-b-slate-200 pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0 dark:border-b-slate-700">
{children}
</h2>
+1 -1
View File
@@ -2,7 +2,7 @@ export interface H3Props {
children: React.ReactNode;
}
export const H3 = ({ children }: H3Props): JSX.Element => (
export const H3 = ({ children }: H3Props) => (
<h3 className="scroll-m-20 text-2xl font-semibold tracking-tight">
{children}
</h3>
+1 -1
View File
@@ -5,7 +5,7 @@ export interface H4Props {
children: React.ReactNode;
}
export const H4 = ({ className, children }: H4Props): JSX.Element => (
export const H4 = ({ className, children }: H4Props) => (
<h4
className={cn(
"scroll-m-20 text-xl font-semibold tracking-tight",
+1 -1
View File
@@ -5,7 +5,7 @@ export interface H5Props {
children: React.ReactNode;
}
export const H5 = ({ className, children }: H5Props): JSX.Element => (
export const H5 = ({ className, children }: H5Props) => (
<h5
className={cn("scroll-m-20 text-lg font-medium tracking-tight", className)}
>
+3 -3
View File
@@ -1,4 +1,4 @@
import { cn } from "@app/core/utils/cn";
import { cn } from "../../../core/utils/cn.ts";
export interface LinkProps {
href: string;
@@ -6,10 +6,10 @@ export interface LinkProps {
className?: string;
}
export const Link = ({ href, children, className }: LinkProps): JSX.Element => (
export const Link = ({ href, children, className }: LinkProps) => (
<a
href={href}
target={"_blank"}
target="_blank"
rel="noopener noreferrer"
className={cn(
"font-medium text-slate-900 underline underline-offset-4 dark:text-slate-50",
+1 -1
View File
@@ -2,6 +2,6 @@ export interface PProps {
children: React.ReactNode;
}
export const P = ({ children }: PProps): JSX.Element => (
export const P = ({ children }: PProps) => (
<p className="leading-7 not-first:mt-6">{children}</p>
);
+1 -1
View File
@@ -5,7 +5,7 @@ export interface SubtleProps {
children: React.ReactNode;
}
export const Subtle = ({ className, children }: SubtleProps): JSX.Element => (
export const Subtle = ({ className, children }: SubtleProps) => (
<p className={cn("text-sm text-slate-500 dark:text-slate-400", className)}>
{children}
</p>