Skip to content

Scheduling infrastructure for absolutely everyone.

chore: fix all `@typescript-eslint/no-explicit-any` warnings (#10656)

GitStart-Cal.com0ddab303409b
diff --git a/apps/web/pages/event-types/index.tsx b/apps/web/pages/event-types/index.tsx
index 8d1620ced63..2ab2a6cfd6a 100644
--- a/apps/web/pages/event-types/index.tsx
+++ b/apps/web/pages/event-types/index.tsx
@@ -832,13 +832,13 @@ const SetupProfileBanner = ({ closeAction }: { closeAction: () => void }) => {
const Main = ({
status,
- error,
+ errorMessage,
data,
filters,
}: {
status: string;
data: GetByViewerResponse;
- error: any;
+ errorMessage?: string;
filters: ReturnType<typeof getTeamsFiltersFromQuery>;
}) => {
const isMobile = useMediaQuery("(max-width: 768px)");
@@ -850,7 +850,7 @@ const Main = ({
}
if (status === "error") {
- return <Alert severity="error" title="Something went wrong" message={error.message} />;
+ return <Alert severity="error" title="Something went wrong" message={errorMessage} />;
}
const isFilteredByOnlyOneItem =
@@ -947,7 +947,7 @@ const EventTypesPage = () => {
title="Event Types"
description="Create events to share for people to book on your calendar."
/>
- <Main data={data} status={status} error={error} filters={filters} />
+ <Main data={data} status={status} errorMessage={error?.message} filters={filters} />
</ShellMain>
);
};
diff --git a/apps/web/playwright/webhook.e2e.ts b/apps/web/playwright/webhook.e2e.ts
index 8f371cf5207..a157578d5ea 100644
--- a/apps/web/playwright/webhook.e2e.ts
+++ b/apps/web/playwright/webhook.e2e.ts
@@ -184,6 +184,7 @@ test.describe("BOOKING_REJECTED", async () => {
expect(webhookReceiver.requestList.length).toBe(1);
});
const [request] = webhookReceiver.requestList;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
const body = request.body as any;
// remove dynamic properties that differs depending on where you run the tests
diff --git a/packages/app-store/hubspot/api/callback.ts b/packages/app-store/hubspot/api/callback.ts
index 58d544d6453..d119573a293 100644
--- a/packages/app-store/hubspot/api/callback.ts
+++ b/packages/app-store/hubspot/api/callback.ts
@@ -14,9 +14,9 @@ let client_id = "";
let client_secret = "";
const hubspotClient = new hubspot.Client();
-export type HubspotToken = TokenResponseIF & {
+export interface HubspotToken extends TokenResponseIF {
expiryDate?: number;
-};
+}
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
const { code } = req.query;
@@ -47,11 +47,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
// set expiry date as offset from current time.
hubspotToken.expiryDate = Math.round(Date.now() + hubspotToken.expiresIn * 1000);
- await createOAuthAppCredential(
- { appId: "hubspot", type: "hubspot_other_calendar" },
- hubspotToken as any,
- req
- );
+ await createOAuthAppCredential({ appId: "hubspot", type: "hubspot_other_calendar" }, hubspotToken, req);
const state = decodeOAuthState(req);
res.redirect(
diff --git a/packages/app-store/salesforce/api/callback.ts b/packages/app-store/salesforce/api/callback.ts
index 647663572a8..7239406a5a4 100644
--- a/packages/app-store/salesforce/api/callback.ts
+++ b/packages/app-store/salesforce/api/callback.ts
@@ -40,7 +40,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
await createOAuthAppCredential(
{ appId: "salesforce", type: "salesforce_other_calendar" },
- salesforceTokenInfo as any,
+ salesforceTokenInfo,
req
);
diff --git a/packages/app-store/zohocrm/api/callback.ts b/packages/app-store/zohocrm/api/callback.ts
index c818d099d7c..32ae5bbb1be 100644
--- a/packages/app-store/zohocrm/api/callback.ts
+++ b/packages/app-store/zohocrm/api/callback.ts
@@ -53,7 +53,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
await createOAuthAppCredential(
{ appId: "zohocrm", type: "zohocrm_other_calendar" },
- zohoCrmTokenInfo.data as any,
+ zohoCrmTokenInfo.data,
req
);
diff --git a/packages/ui/components/button/button.test.tsx b/packages/ui/components/button/button.test.tsx
index 5cd0ce7f529..55c4524ea67 100644
--- a/packages/ui/components/button/button.test.tsx
+++ b/packages/ui/components/button/button.test.tsx
@@ -16,6 +16,7 @@ window.ResizeObserver = vi.fn().mockImplementation(() => ({
}));
vi.mock("../tooltip", async () => {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
const actual = (await vi.importActual("../tooltip")) as any;
const TooltipMock = (props: object) => {
const [open, setOpen] = useState(false);