mirror of
https://github.com/makeplane/plane.git
synced 2026-01-31 11:06:30 -06:00
fix: eslint warnings and errors (#7479)
This commit is contained in:
committed by
GitHub
parent
57479f4554
commit
f8353d3468
@@ -1,3 +1,5 @@
|
||||
// TODO: check all the type errors and fix them
|
||||
|
||||
import { findChildren } from "@tiptap/core";
|
||||
import { Node as ProsemirrorNode } from "@tiptap/pm/model";
|
||||
import { Plugin, PluginKey } from "@tiptap/pm/state";
|
||||
@@ -117,19 +119,15 @@ export function LowlightPlugin({
|
||||
// Such transactions can happen during collab syncing via y-prosemirror, for example.
|
||||
transaction.steps.some(
|
||||
(step) =>
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error type error
|
||||
step.from !== undefined &&
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error type error
|
||||
step.to !== undefined &&
|
||||
oldNodes.some(
|
||||
(node) =>
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error type error
|
||||
node.pos >= step.from &&
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error type error
|
||||
node.pos + node.node.nodeSize <= step.to
|
||||
)
|
||||
))
|
||||
|
||||
@@ -32,11 +32,8 @@ function scrollToNode(editor: Editor, pos: number): void {
|
||||
}
|
||||
}
|
||||
|
||||
export function scrollToNodeViaDOMCoordinates(
|
||||
editor: Editor,
|
||||
pos: number,
|
||||
behavior?: "auto" | "smooth" | "instant"
|
||||
): void {
|
||||
// eslint-disable-next-line no-undef
|
||||
export function scrollToNodeViaDOMCoordinates(editor: Editor, pos: number, behavior?: ScrollBehavior): void {
|
||||
const view = editor.view;
|
||||
|
||||
// Get the coordinates of the position
|
||||
|
||||
@@ -111,7 +111,8 @@ export interface EditorRefApi extends EditorReadOnlyRefApi {
|
||||
onDocumentInfoChange: (callback: (documentInfo: TDocumentInfo) => void) => () => void;
|
||||
onHeadingChange: (callback: (headings: IMarking[]) => void) => () => void;
|
||||
onStateChange: (callback: () => void) => () => void;
|
||||
scrollToNodeViaDOMCoordinates: (behavior?: "auto" | "smooth" | "instant", position?: number) => void;
|
||||
// eslint-disable-next-line no-undef
|
||||
scrollToNodeViaDOMCoordinates: (behavior?: ScrollBehavior, position?: number) => void;
|
||||
setEditorValueAtCursorPosition: (content: string) => void;
|
||||
setFocusAtPosition: (position: number) => void;
|
||||
setProviderDocument: (value: Uint8Array) => void;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Editor, Range } from "@tiptap/core";
|
||||
import { CSSProperties } from "react";
|
||||
import type { Editor, Range } from "@tiptap/core";
|
||||
import type { CSSProperties } from "react";
|
||||
// types
|
||||
import { TEditorCommands } from "@/types";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user