From e12b21a73c800d9aab1131223d0b4d8c7cfb003b Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Fri, 3 Mar 2023 00:28:31 +0530 Subject: [PATCH] Check app-store types on CI (#7190) * Check app-store types on CI * Fix ESLINt error --- packages/app-store/closecom/test/globals.ts | 2 ++ .../ee/routing-forms/playwright/tests/basic.e2e.ts | 6 +++--- packages/app-store/package.json | 1 + packages/app-store/trpc-routers.ts | 2 ++ packages/app-store/tsconfig.json | 4 +--- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/app-store/closecom/test/globals.ts b/packages/app-store/closecom/test/globals.ts index ada50ba128..cc3469f1e5 100644 --- a/packages/app-store/closecom/test/globals.ts +++ b/packages/app-store/closecom/test/globals.ts @@ -13,3 +13,5 @@ jest.mock("@calcom/lib/crypto", () => ({ "userApiKey": "test" }`, })); + +export {}; diff --git a/packages/app-store/ee/routing-forms/playwright/tests/basic.e2e.ts b/packages/app-store/ee/routing-forms/playwright/tests/basic.e2e.ts index bf7f7855f0..554aae1887 100644 --- a/packages/app-store/ee/routing-forms/playwright/tests/basic.e2e.ts +++ b/packages/app-store/ee/routing-forms/playwright/tests/basic.e2e.ts @@ -244,13 +244,13 @@ test.describe("Routing Forms", () => { const thirdResponseCells = csvRows[3].split(","); expect(firstResponseCells.slice(0, -1).join(",")).toEqual("event-routing,"); - expect(new Date(firstResponseCells.at(-1)).getDay()).toEqual(new Date().getDay()); + expect(new Date(firstResponseCells.at(-1) as string).getDay()).toEqual(new Date().getDay()); expect(secondResponseCells.slice(0, -1).join(",")).toEqual("external-redirect,"); - expect(new Date(secondResponseCells.at(-1)).getDay()).toEqual(new Date().getDay()); + expect(new Date(secondResponseCells.at(-1) as string).getDay()).toEqual(new Date().getDay()); expect(thirdResponseCells.slice(0, -1).join(",")).toEqual("custom-page,"); - expect(new Date(thirdResponseCells.at(-1)).getDay()).toEqual(new Date().getDay()); + expect(new Date(thirdResponseCells.at(-1) as string).getDay()).toEqual(new Date().getDay()); }); test("Router URL should work", async ({ page, users }) => { diff --git a/packages/app-store/package.json b/packages/app-store/package.json index f5e8cff00e..5b34186878 100644 --- a/packages/app-store/package.json +++ b/packages/app-store/package.json @@ -7,6 +7,7 @@ "components.ts" ], "scripts": { + "type-check": "tsc --pretty --noEmit", "lint": "eslint . --ext .ts,.js,.tsx,.jsx", "lint:fix": "eslint . --ext .ts,.js,.tsx,.jsx --fix", "lint:report": "eslint . --format json --output-file ../../lint-results/app-store.json" diff --git a/packages/app-store/trpc-routers.ts b/packages/app-store/trpc-routers.ts index 6c651d5846..f8db632aaf 100644 --- a/packages/app-store/trpc-routers.ts +++ b/packages/app-store/trpc-routers.ts @@ -2,3 +2,5 @@ // Can't use this file right now as I am not able to figure out how to keep getting tRPC typesafety with merge calls done on already created router // Till that time import routers from each app directly to core. // import { Router } from "@trpc/server/dist/declarations/src/router"; + +export {}; diff --git a/packages/app-store/tsconfig.json b/packages/app-store/tsconfig.json index b138edc51d..b08597974d 100644 --- a/packages/app-store/tsconfig.json +++ b/packages/app-store/tsconfig.json @@ -18,8 +18,6 @@ "../types/*.d.ts", "../types/next-auth.d.ts", "**/*.ts", - "**/*.tsx", - "../../apps/web/server/**/*.ts", - "../../apps/web/server/**/*.tsx" + "**/*.tsx" ] }