From c379c0f3a4b0acc8b8e7d09b5a99b281413d8c31 Mon Sep 17 00:00:00 2001 From: Ephemeral Astronaut Date: Fri, 16 Feb 2024 23:14:23 +0530 Subject: [PATCH] fix: lint issues feat: export the following - DefaultHyperlinkToolbar - EditHyperlinkMenu --- package-lock.json | 4 ++++ packages/dev-scripts/examples/gen.ts | 4 +++- packages/dev-scripts/package.json | 11 +++++++---- packages/react/src/index.ts | 2 ++ playground/src/main.tsx | 5 ++++- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index bf53ca088a..63d7f55439 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20199,6 +20199,10 @@ "name": "@blocknote/dev-scripts", "version": "0.10.0", "license": "MPL-2.0", + "dependencies": { + "react": "^18", + "react-dom": "^18" + }, "devDependencies": { "@types/react": "^18.0.25", "@types/react-dom": "^18.0.9", diff --git a/packages/dev-scripts/examples/gen.ts b/packages/dev-scripts/examples/gen.ts index 6b0d67a308..235336d5ea 100644 --- a/packages/dev-scripts/examples/gen.ts +++ b/packages/dev-scripts/examples/gen.ts @@ -50,7 +50,9 @@ async function writeTemplate(project: Project, templateFile: string) { try { // fs.unlinkSync(targetFilePath); - } catch (e) {} + } catch (e) { + // ignore any errors + } console.log("written", targetFilePath); } diff --git a/packages/dev-scripts/package.json b/packages/dev-scripts/package.json index 7f066a3070..c32fbbe1d0 100644 --- a/packages/dev-scripts/package.json +++ b/packages/dev-scripts/package.json @@ -11,17 +11,20 @@ "gen:examples": "tsx examples/gen.ts", "gen:docs": "tsx examples/genDocs.ts", "build": "tsc", - "lint": "eslint src --max-warnings 0" + "lint": "eslint **/*.ts{,x} --max-warnings 0" }, - "dependencies": {}, "devDependencies": { "@types/react": "^18.0.25", "@types/react-dom": "^18.0.9", "eslint": "^8.10.0", + "glob": "^10.3.10", "prettier": "^2.7.1", - "typescript": "^5.0.4", "tsx": "^4.6.2", - "glob": "^10.3.10" + "typescript": "^5.0.4" + }, + "dependencies": { + "react": "^18", + "react-dom": "^18" }, "peerDependencies": { "react": "^18", diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index 258765b26b..c88e25519f 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -15,6 +15,8 @@ export * from "./components/FormattingToolbar/DefaultFormattingToolbar"; export * from "./components/FormattingToolbar/FormattingToolbarPositioner"; export * from "./components/HyperlinkToolbar/HyperlinkToolbarPositioner"; +export * from "./components/HyperlinkToolbar/DefaultHyperlinkToolbar"; +export * from "./components/HyperlinkToolbar/EditHyperlinkMenu/components/EditHyperlinkMenu"; export * from "./components/SideMenu/DefaultButtons/AddBlockButton"; export * from "./components/SideMenu/DefaultButtons/DragHandle"; diff --git a/playground/src/main.tsx b/playground/src/main.tsx index cef2899070..4799ba8b84 100644 --- a/playground/src/main.tsx +++ b/playground/src/main.tsx @@ -99,7 +99,10 @@ const App = (props: { project: (typeof examples)[0]["projects"][0] }) => { if (!ExampleComponent) { return
Loading...
; } - return ; + + const LoadedExampleComponent = ExampleComponent.default; + + return ; }; const router = createBrowserRouter([