From 703ea60fa1b9f4c84c469d8d9a266099c1bc9587 Mon Sep 17 00:00:00 2001 From: Kevin Wu Date: Wed, 3 Apr 2024 11:09:06 -0700 Subject: [PATCH] chore: fix eslint errors --- components/ui/calendar.tsx | 120 +++++++++++++++++++------------------ lib/analytics.ts | 1 + lib/gtag.ts | 1 + 3 files changed, 64 insertions(+), 58 deletions(-) diff --git a/components/ui/calendar.tsx b/components/ui/calendar.tsx index 2f02434..14d153e 100644 --- a/components/ui/calendar.tsx +++ b/components/ui/calendar.tsx @@ -1,66 +1,70 @@ -"use client" +"use client"; -import * as React from "react" -import { ChevronLeft, ChevronRight } from "lucide-react" -import { DayPicker } from "react-day-picker" +import * as React from "react"; +import { ChevronLeft, ChevronRight } from "lucide-react"; +import { DayPicker } from "react-day-picker"; -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" +import { cn } from "@/lib/utils"; +import { buttonVariants } from "@/components/ui/button"; -export type CalendarProps = React.ComponentProps +export type CalendarProps = React.ComponentProps; function Calendar({ - className, - classNames, - showOutsideDays = true, - ...props + className, + classNames, + showOutsideDays = true, + ...props }: CalendarProps) { - return ( - , - IconRight: ({ ...props }) => , - }} - {...props} - /> - ) + return ( + , + // eslint-disable-next-line @typescript-eslint/no-unused-vars + IconRight: ({ ...props }) => ( + + ), + }} + {...props} + /> + ); } -Calendar.displayName = "Calendar" +Calendar.displayName = "Calendar"; -export { Calendar } +export { Calendar }; diff --git a/lib/analytics.ts b/lib/analytics.ts index fcb4bc2..0b6d37a 100644 --- a/lib/analytics.ts +++ b/lib/analytics.ts @@ -20,6 +20,7 @@ export function logAnalytics({ label, value, }: AnalyticsProps) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (window as any).gtag("event", action, { event_category: category, event_label: label, diff --git a/lib/gtag.ts b/lib/gtag.ts index f6d014b..ee19c61 100644 --- a/lib/gtag.ts +++ b/lib/gtag.ts @@ -4,6 +4,7 @@ export const NEXT_PUBLIC_GA_TRACKING_ID: string | undefined = process.env.NEXT_PUBLIC_GA_TRACKING_ID; export const pageview = (url: string) => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (window as any).gtag("config", NEXT_PUBLIC_GA_TRACKING_ID, { page_path: url, });