add precommit hook for linting and automatic eslint fixes + update eslint packages (#2862)
* chore: add precommit hook for eslint fixes, fix linting issues * chore: add eslint import sort plugin
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Range, escapeForRegEx } from '@tiptap/core'
|
||||
import { escapeForRegEx, Range } from '@tiptap/core'
|
||||
import { ResolvedPos } from 'prosemirror-model'
|
||||
|
||||
export interface Trigger {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { Editor, Range } from '@tiptap/core'
|
||||
import { EditorState, Plugin, PluginKey } from 'prosemirror-state'
|
||||
import { Decoration, DecorationSet, EditorView } from 'prosemirror-view'
|
||||
|
||||
import { Editor, Range } from '@tiptap/core'
|
||||
|
||||
import { findSuggestionMatch } from './findSuggestionMatch'
|
||||
|
||||
export interface SuggestionOptions<I = any> {
|
||||
@@ -122,7 +121,7 @@ export function Suggestion<I = any>({
|
||||
clientRect: decorationNode
|
||||
? () => {
|
||||
// because of `items` can be asynchrounous we’ll search for the current docoration node
|
||||
const { decorationId } = this.key?.getState(editor.state)
|
||||
const { decorationId } = this.key?.getState(editor.state) // eslint-disable-line
|
||||
const currentDecorationNode = document.querySelector(`[data-decoration-id="${decorationId}"]`)
|
||||
|
||||
return currentDecorationNode?.getBoundingClientRect() || null
|
||||
|
||||
Reference in New Issue
Block a user