♻️ Update eslint config (#1424)

This commit is contained in:
Luke Vella 2024-11-02 11:50:09 +00:00 committed by GitHub
parent 01396b6129
commit d55131c2ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
162 changed files with 337 additions and 266 deletions

View file

@ -1,9 +1,8 @@
"use client";
import * as React from "react";
import * as AvatarPrimitive from "@radix-ui/react-avatar";
import { cn } from "@rallly/ui";
import * as React from "react";
const Avatar = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Root>,
@ -82,4 +81,4 @@ const AvatarFallback = React.forwardRef<
});
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
export { Avatar, AvatarImage, AvatarFallback };
export { Avatar, AvatarFallback,AvatarImage };

View file

@ -1,8 +1,10 @@
"use client";
import { Slot } from "@radix-ui/react-slot";
import { cva, VariantProps } from "class-variance-authority";
import * as React from "react";
import type { VariantProps } from "class-variance-authority";
import { cva } from "class-variance-authority";
import { Loader2Icon } from "lucide-react";
import * as React from "react";
import { cn } from "./lib/utils";
const buttonVariants = cva(

View file

@ -1,7 +1,8 @@
"use client";
import * as React from "react";
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
import * as React from "react";
import CheckboxCheckIcon from "./checkbox-check.svg";
import { cn } from "./lib/utils";

View file

@ -1,13 +1,13 @@
"use client";
import { DialogProps } from "@radix-ui/react-dialog";
import { SearchIcon } from "lucide-react";
import type { DialogProps } from "@radix-ui/react-dialog";
import { Command as CommandPrimitive } from "cmdk";
import { SearchIcon } from "lucide-react";
import * as React from "react";
import { Dialog, DialogContent } from "./dialog";
import { cn } from "./lib/utils";
import { Icon } from "./icon";
import { cn } from "./lib/utils";
const Command = React.forwardRef<
React.ElementRef<typeof CommandPrimitive>,

View file

@ -5,6 +5,7 @@ import { XIcon } from "lucide-react";
import * as React from "react";
import { cn } from "./lib/utils";
export type { DialogProps } from "@radix-ui/react-dialog";
const Dialog = DialogPrimitive.Root;

View file

@ -4,8 +4,8 @@ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
import { CheckIcon, ChevronRightIcon, PlusCircleIcon } from "lucide-react";
import * as React from "react";
import { cn } from "./lib/utils";
import { Icon } from "./icon";
import { cn } from "./lib/utils";
const DropdownMenu = DropdownMenuPrimitive.Root;
@ -21,7 +21,7 @@ const DropdownMenuTrigger = React.forwardRef<
}}
/>
));
DropdownMenuTrigger.displayName = DropdownMenuPrimitive.Trigger.displayName;
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;

View file

@ -1,9 +1,10 @@
import { Slot } from "@radix-ui/react-slot";
import type {VariantProps } from "class-variance-authority";
import { cva } from "class-variance-authority";
import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import type { ComponentPropsWithout, RemovedProps } from "./helpers/component-props";
import { cn } from "./lib/utils";
import { VariantProps, cva } from "class-variance-authority";
import { ComponentPropsWithout, RemovedProps } from "./helpers/component-props";
type FlexElement = React.ElementRef<"div">;
type FlexDivProps = { as?: "div" } & ComponentPropsWithout<"div", RemovedProps>;

View file

@ -1,11 +1,12 @@
import * as LabelPrimitive from "@radix-ui/react-label";
import type * as LabelPrimitive from "@radix-ui/react-label";
import { Slot } from "@radix-ui/react-slot";
import * as React from "react";
import {
Controller,
import type {
ControllerProps,
FieldPath,
FieldValues,
FieldValues} from "react-hook-form";
import {
Controller,
FormProvider,
useFormContext,
} from "react-hook-form";

View file

@ -1,6 +1,7 @@
import type React from "react";
type ComponentPropsAs<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
C extends React.ElementType<any>,
T extends React.ComponentPropsWithoutRef<C>["as"],
> = Omit<

View file

@ -186,4 +186,4 @@ function useToast() {
};
}
export { useToast, toast };
export { toast,useToast };

View file

@ -1,7 +1,9 @@
"use client";
import { Slot } from "@radix-ui/react-slot";
import type {VariantProps } from "class-variance-authority";
import { cva } from "class-variance-authority";
import { cn } from "./lib/utils";
import { VariantProps, cva } from "class-variance-authority";
const iconVariants = cva("", {
variants: {

View file

@ -1,7 +1,7 @@
import { cva } from "class-variance-authority";
import * as React from "react";
import { cn } from "./lib/utils";
import { cva } from "class-variance-authority";
export type InputProps = Omit<
React.InputHTMLAttributes<HTMLInputElement>,

View file

@ -1,7 +1,8 @@
"use client";
import * as LabelPrimitive from "@radix-ui/react-label";
import { cva, VariantProps } from "class-variance-authority";
import type { VariantProps } from "class-variance-authority";
import { cva } from "class-variance-authority";
import * as React from "react";
import { cn } from "./lib/utils";

View file

@ -1,4 +1,5 @@
import clsx, { ClassValue } from "clsx";
import type { ClassValue } from "clsx";
import clsx from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {

View file

@ -15,6 +15,7 @@ const RadioPills = React.forwardRef<
{...props}
/>
));
RadioPills.displayName = Primitive.Root.displayName;
const RadioPillsItem = React.forwardRef<
React.ElementRef<typeof Primitive.Item>,

View file

@ -4,8 +4,8 @@ import * as SelectPrimitive from "@radix-ui/react-select";
import { CheckIcon, ChevronsUpDownIcon } from "lucide-react";
import * as React from "react";
import { cn } from "./lib/utils";
import { Icon } from "./icon";
import { cn } from "./lib/utils";
const Select = SelectPrimitive.Root;
@ -24,6 +24,7 @@ const SelectValue = React.forwardRef<
</div>
);
});
SelectValue.displayName = SelectPrimitive.Value.displayName;
const SelectTrigger = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Trigger>,

View file

@ -1,10 +1,12 @@
"use client";
import type { VariantProps } from "class-variance-authority";
import { cva } from "class-variance-authority";
import * as React from "react";
import type { IconProps } from "./icon";
import { Icon } from "./icon";
import { cn } from "./lib/utils";
import { VariantProps, cva } from "class-variance-authority";
import { Icon, IconProps } from "./icon";
const inputVariants = cva(
cn(
@ -47,13 +49,14 @@ const TextFieldInput = React.forwardRef<HTMLInputElement, InputProps>(
);
},
);
TextFieldInput.displayName = "TextFieldInput";
interface TextFieldProps extends InputProps {
children?: React.ReactNode;
}
const TextField = React.forwardRef<HTMLDivElement, TextFieldProps>(
({ className, size, type, children, ...props }, ref) => {
({ className, size, children, ...props }, ref) => {
return (
<div
ref={ref}

View file

@ -1,7 +1,7 @@
import * as React from "react";
import * as ToastPrimitives from "@radix-ui/react-toast";
import { cva, type VariantProps } from "class-variance-authority";
import { type VariantProps,cva } from "class-variance-authority";
import { X } from "lucide-react";
import * as React from "react";
import { cn } from "./lib/utils";
@ -115,13 +115,13 @@ type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
type ToastActionElement = React.ReactElement<typeof ToastAction>;
export {
type ToastProps,
type ToastActionElement,
ToastProvider,
ToastViewport,
type ToastProps,
Toast,
ToastTitle,
ToastDescription,
ToastClose,
ToastAction,
ToastClose,
ToastDescription,
ToastProvider,
ToastTitle,
ToastViewport,
};

View file

@ -1,4 +1,5 @@
"use client";
import { useToast } from "./hooks/use-toast";
import {
Toast,
ToastClose,
@ -7,7 +8,6 @@ import {
ToastTitle,
ToastViewport,
} from "./toast";
import { useToast } from "./hooks/use-toast";
export function Toaster() {
const { toasts } = useToast();