Enforces explicit type imports (#7158)

* Enforces explicit type imports

* Upgrades typescript-eslint

* Upgrades eslint related dependencies

* Update config

* Sync packages mismatches

* Syncs prettier version

* Linting

* Relocks node version

* Fixes

* Locks @vitejs/plugin-react to 1.3.2

* Linting
This commit is contained in:
Omar López authored and GitHub committed 2023-02-16 15:39:57 -07:00
1 parent 3df289b557
commit 7c749299bb
425 files changed
+1216 -1069

No files matched your search

+2 -1
View File
@@ -24,6 +24,7 @@
"dev-real": "vite dev --port 3100",
"type-check": "tsc --pretty --noEmit",
"lint": "eslint --ext .ts,.js src",
"lint:fix": "eslint --ext .ts,.js src --fix",
"embed-tests": "yarn playwright test --config=playwright/config/playwright.config.ts",
"embed-tests-quick": "QUICK=true yarn embed-tests",
"embed-tests-update-snapshots:ci": "yarn embed-tests-quick --update-snapshots",
@@ -43,7 +44,7 @@
},
"devDependencies": {
"autoprefixer": "^10.4.12",
"eslint": "^8.22.0",
"eslint": "^8.34.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.18",
"tailwindcss": "^3.2.1",
@@ -1,4 +1,4 @@
import { CalWindow } from "../embed";
import type { CalWindow } from "../embed";
import getFloatingButtonHtml from "./FloatingButtonHtml";
export class FloatingButton extends HTMLElement {
@@ -1,4 +1,4 @@
import { CalWindow } from "../embed";
import type { CalWindow } from "../embed";
import loaderCss from "../loader.css";
import { getErrorString } from "../utils";
import inlineHtml from "./inlineHtml";
@@ -1,4 +1,4 @@
import { CalWindow } from "../embed";
import type { CalWindow } from "../embed";
import loaderCss from "../loader.css";
import { getErrorString } from "../utils";
import modalBoxHtml from "./ModalBoxHtml";
@@ -1,5 +1,6 @@
import { useRouter } from "next/router";
import { useState, useEffect, CSSProperties } from "react";
import type { CSSProperties } from "react";
import { useState, useEffect } from "react";
import { sdkActionManager } from "./sdk-event";
+2 -2
View File
@@ -1,7 +1,7 @@
import { FloatingButton } from "./FloatingButton/FloatingButton";
import { Inline } from "./Inline/inline";
import { ModalBox } from "./ModalBox/ModalBox";
import { methods, UiConfig } from "./embed-iframe";
import type { methods, UiConfig } from "./embed-iframe";
import css from "./embed.css";
import { SdkActionManager } from "./sdk-action-manager";
import allCss from "./tailwind.generated.css";
@@ -428,7 +428,7 @@ export class Cal {
method,
arg,
}: // TODO: Need some TypeScript magic here to remove hardcoded types
| { method: "ui"; arg: Parameters<typeof methods["ui"]>[0] }
| { method: "ui"; arg: Parameters<(typeof methods)["ui"]>[0] }
| { method: "parentKnowsIframeReady"; arg: undefined }) {
if (!this.iframeReady) {
this.iframeDoQueue.push({ method, arg });
+1 -1
View File
@@ -1,4 +1,4 @@
import { CalWindow } from "./embed";
import type { CalWindow } from "./embed";
const WEBAPP_URL =
import.meta.env.EMBED_PUBLIC_WEBAPP_URL || `https://${import.meta.env.EMBED_PUBLIC_VERCEL_URL}`;
+4 -4
View File
@@ -41,10 +41,10 @@
}
},
"devDependencies": {
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^1.3.2",
"eslint": "^8.22.0",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.9",
"@vitejs/plugin-react": "1.3.2",
"eslint": "^8.34.0",
"npm-run-all": "^4.1.5",
"typescript": "^4.9.4",
"vite": "^2.9.15"
+1 -1
View File
@@ -1,4 +1,4 @@
import { CalWindow } from "@calcom/embed-core";
import type { CalWindow } from "@calcom/embed-core";
import EmbedSnippet from "@calcom/embed-snippet";
import Cal from "./Cal";
+1 -1
View File
@@ -24,7 +24,7 @@
],
"types": "./dist/index.d.ts",
"devDependencies": {
"eslint": "^8.22.0",
"eslint": "^8.34.0",
"typescript": "^4.9.4"
},
"dependencies": {
+1 -1
View File
@@ -4,7 +4,7 @@
* As we want to keep control on the size of this snippet but we want some portion of it to be still readable.
* So, write the code that you need directly but keep it short.
*/
import { CalWindow } from "@calcom/embed-core";
import type { CalWindow } from "@calcom/embed-core";
const WEBAPP_URL =
import.meta.env.EMBED_PUBLIC_WEBAPP_URL || `https://${import.meta.env.EMBED_PUBLIC_VERCEL_URL}`;