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

Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com>
Co-authored-by: Bailey Pumfleet <bailey@pumfleet.co.uk>
This commit is contained in:
GitStart-Cal.com
2023-08-21 11:01:56 +02:00
committed by GitHub
co-authored by gitstart-calcom Bailey Pumfleet
parent 2a9e061575
commit 0ddab30340
6 changed files with 11 additions and 13 deletions
+4 -4
View File
@@ -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>
);
};
+1
View File
@@ -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
+3 -7
View File
@@ -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(
@@ -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
);
+1 -1
View File
@@ -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
);
@@ -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);