diff --git a/apps/web/app/WithEmbedSSR.test.ts b/apps/web/app/WithEmbedSSR.test.ts index b760097fd3..975555d1be 100644 --- a/apps/web/app/WithEmbedSSR.test.ts +++ b/apps/web/app/WithEmbedSSR.test.ts @@ -13,6 +13,9 @@ export function createMockNextJsRequest(...args: Parameters) return createMocks(...args); } +// eslint-disable-next-line @typescript-eslint/no-empty-function +const noop = () => {}; + vi.mock("next/navigation", () => ({ redirect: vi.fn(), notFound: vi.fn(), @@ -86,7 +89,7 @@ describe("withEmbedSsrAppDir", () => { embed: "namespace1", }, }) - ).catch(() => {}); + ).catch(noop); expect(redirect).toHaveBeenCalledWith("/reschedule/embed?layout=week_view&embed=namespace1"); }); @@ -105,7 +108,7 @@ describe("withEmbedSsrAppDir", () => { embed: "namespace1", }, }) - ).catch(() => {}); + ).catch(noop); expect(redirect).toHaveBeenCalledWith( "/reschedule/embed?redirectParam=1&layout=week_view&embed=namespace1" @@ -126,7 +129,7 @@ describe("withEmbedSsrAppDir", () => { embed: "", }, }) - ).catch(() => {}); + ).catch(noop); expect(redirect).toHaveBeenCalledWith("/reschedule/embed?redirectParam=1&layout=week_view&embed="); }); @@ -147,7 +150,7 @@ describe("withEmbedSsrAppDir", () => { embed: "namespace1", }, }) - ).catch(() => {}); + ).catch(noop); expect(redirect).toHaveBeenCalledWith( "https://calcom.cal.local/owner/embed?layout=week_view&embed=namespace1" @@ -168,7 +171,7 @@ describe("withEmbedSsrAppDir", () => { embed: "namespace1", }, }) - ).catch(() => {}); + ).catch(noop); expect(redirect).toHaveBeenCalledWith( "http://calcom.cal.local/owner/embed?layout=week_view&embed=namespace1" @@ -189,7 +192,7 @@ describe("withEmbedSsrAppDir", () => { embed: "namespace1", }, }) - ).catch(() => {}); + ).catch(noop); expect(redirect).toHaveBeenCalledWith( "/calcom.cal.local/owner/embed?layout=week_view&embed=namespace1" @@ -239,7 +242,7 @@ describe("withEmbedSsrAppDir", () => { embed: "", }, }) - ).catch(() => {}); + ).catch(noop); expect(notFound).toHaveBeenCalled(); }); diff --git a/apps/web/app/_utils.tsx b/apps/web/app/_utils.tsx index 015e1c1e6a..a487888800 100644 --- a/apps/web/app/_utils.tsx +++ b/apps/web/app/_utils.tsx @@ -33,7 +33,7 @@ const createI18nInstance = async (locale: string, ns: string) => { return _i18n; }; -const getTranslationWithCache = async (locale: string, ns: string = "common") => { +const getTranslationWithCache = async (locale: string, ns = "common") => { const localeWithFallback = locale ?? "en"; const i18n = await createI18nInstance(localeWithFallback, ns); return i18n.getFixedT(localeWithFallback, ns); diff --git a/apps/web/app/api/customer-card/route.ts b/apps/web/app/api/customer-card/route.ts index 1ddce87154..0d89278cea 100644 --- a/apps/web/app/api/customer-card/route.ts +++ b/apps/web/app/api/customer-card/route.ts @@ -20,7 +20,7 @@ const inputSchema = z.object({ cardKeys: z.array(z.string()), }); -export async function handler(request: Request) { +async function handler(request: Request) { const headersList = headers(); const requestBody = await request.json(); diff --git a/apps/web/app/bookings/[status]/page.tsx b/apps/web/app/bookings/[status]/page.tsx index b8a21f79bf..6e859d38ca 100644 --- a/apps/web/app/bookings/[status]/page.tsx +++ b/apps/web/app/bookings/[status]/page.tsx @@ -1,4 +1,4 @@ -import { PageProps } from "app/_types"; +import type { PageProps } from "app/_types"; import { _generateMetadata } from "app/_utils"; import { WithLayout } from "app/layoutHOC"; import { redirect } from "next/navigation"; diff --git a/apps/web/app/future/org/[orgSlug]/embed/page.tsx b/apps/web/app/future/org/[orgSlug]/embed/page.tsx index 0f378c48cb..3a592b9af7 100644 --- a/apps/web/app/future/org/[orgSlug]/embed/page.tsx +++ b/apps/web/app/future/org/[orgSlug]/embed/page.tsx @@ -1,6 +1,4 @@ import withEmbedSsrAppDir from "app/WithEmbedSSR"; -import type { PageProps as _PageProps } from "app/_types"; -import { _generateMetadata } from "app/_utils"; import { WithLayout } from "app/layoutHOC"; import { getServerSideProps } from "@lib/team/[slug]/getServerSideProps"; diff --git a/apps/web/app/future/team/[slug]/[type]/embed/page.tsx b/apps/web/app/future/team/[slug]/[type]/embed/page.tsx index 4c15acd877..3430e611a7 100644 --- a/apps/web/app/future/team/[slug]/[type]/embed/page.tsx +++ b/apps/web/app/future/team/[slug]/[type]/embed/page.tsx @@ -1,6 +1,4 @@ import withEmbedSsrAppDir from "app/WithEmbedSSR"; -import type { PageProps as _PageProps } from "app/_types"; -import { _generateMetadata } from "app/_utils"; import { WithLayout } from "app/layoutHOC"; import { getServerSideProps } from "@lib/team/[slug]/[type]/getServerSideProps"; diff --git a/apps/web/app/future/team/[slug]/embed/page.tsx b/apps/web/app/future/team/[slug]/embed/page.tsx index 9978957cb9..5145f0ed0f 100644 --- a/apps/web/app/future/team/[slug]/embed/page.tsx +++ b/apps/web/app/future/team/[slug]/embed/page.tsx @@ -1,7 +1,4 @@ -import { withAppDirSsr } from "app/WithAppDirSsr"; import withEmbedSsrAppDir from "app/WithEmbedSSR"; -import type { PageProps as _PageProps } from "app/_types"; -import { _generateMetadata } from "app/_utils"; import { WithLayout } from "app/layoutHOC"; import { getServerSideProps } from "@lib/team/[slug]/getServerSideProps"; diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index ab000ce5d0..68b3325222 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -76,6 +76,7 @@ export default async function RootLayout({ children }: { children: React.ReactNo