diff --git a/web/core/lib/editor/extensions/advice/advice-extension.ts b/web/core/lib/editor/extensions/advice/advice-extension.ts index 8108e92..4836a14 100644 --- a/web/core/lib/editor/extensions/advice/advice-extension.ts +++ b/web/core/lib/editor/extensions/advice/advice-extension.ts @@ -1,7 +1,6 @@ // This code based on https://github.com/sereneinserenade/tiptap-comment-extension which is licensed under MIT License -import { Mark, mergeAttributes, Range } from "@tiptap/core"; import { Mark as PMMark } from "@tiptap/pm/model"; -import { CommandProps } from "@tiptap/react"; +import { CommandProps, Mark, mergeAttributes, Range } from "@tiptap/react"; import { Advice } from "./advice"; declare module "@tiptap/core" { @@ -56,7 +55,6 @@ export const AdviceExtension = Mark.create({ }; }, - // @ts-ignore parseHTML() { return [ { @@ -69,7 +67,7 @@ export const AdviceExtension = Mark.create({ }, renderHTML({ HTMLAttributes }: { - HTMLAttributes: Record + HTMLAttributes: Record }) { return ["span", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0,]; }, @@ -96,7 +94,8 @@ export const AdviceExtension = Mark.create({ }; }, - // @ts-ignore + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-expect-error addCommands() { return { setAdviceCommand: (comment: Advice) => ({ commands }: CommandProps) => { diff --git a/web/core/lib/editor/extensions/inline-completion/inline-completion.tsx b/web/core/lib/editor/extensions/inline-completion/inline-completion.tsx index 6d95a7a..ccf9d89 100644 --- a/web/core/lib/editor/extensions/inline-completion/inline-completion.tsx +++ b/web/core/lib/editor/extensions/inline-completion/inline-completion.tsx @@ -1,6 +1,6 @@ -import { findChildren, Node, NodeViewWrapper, ReactNodeViewRenderer } from '@tiptap/react'; -import { Editor } from "@tiptap/core"; -import React, { useEffect, useRef } from "react"; +import { NodeViewWrapper, ReactNodeViewRenderer } from '@tiptap/react'; +import { Node, Editor } from '@tiptap/core'; +import React, { useEffect, useRef } from 'react'; import { KeyboardIcon } from "@radix-ui/react-icons"; declare module '@tiptap/core' { diff --git a/web/core/lib/editor/extensions/quick-box/quick-box-extension.ts b/web/core/lib/editor/extensions/quick-box/quick-box-extension.ts index 7ae5c9f..936c269 100644 --- a/web/core/lib/editor/extensions/quick-box/quick-box-extension.ts +++ b/web/core/lib/editor/extensions/quick-box/quick-box-extension.ts @@ -4,10 +4,10 @@ * origin: https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-code-block/src/code-block.ts */ import { - Node, RawCommands, ReactNodeViewRenderer, } from "@tiptap/react"; +import { Node } from "@tiptap/core"; import QuickBoxViewWrapper from "./quick-box-view-wrapper"; diff --git a/web/core/vite.config.mts b/web/core/vite.config.mts index 9d07aa3..b1cec62 100644 --- a/web/core/vite.config.mts +++ b/web/core/vite.config.mts @@ -22,6 +22,7 @@ export default defineConfig({ externalizeDeps(), dts({ outDir: './dist-types', + rollupTypes: true }), libInjectCss(), react(),