fix more linting issues
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { EditorState, Plugin, Transaction } from 'prosemirror-state'
|
||||
import { EditorView } from 'prosemirror-view'
|
||||
import { Schema, DOMParser, DOMSerializer } from 'prosemirror-model'
|
||||
import { Schema, DOMParser } from 'prosemirror-model'
|
||||
import magicMethods from './utils/magicMethods'
|
||||
import elementFromString from './utils/elementFromString'
|
||||
import nodeIsActive from './utils/nodeIsActive'
|
||||
@@ -16,7 +16,6 @@ import EventEmitter from './EventEmitter'
|
||||
import Extension from './Extension'
|
||||
import Node from './Node'
|
||||
import Mark from './Mark'
|
||||
import ComponentRenderer from './ComponentRenderer'
|
||||
import defaultPlugins from './plugins'
|
||||
import * as coreCommands from './commands'
|
||||
|
||||
|
||||
@@ -14,9 +14,8 @@ declare module '../Editor' {
|
||||
export const removeMark: RemoveMarkCommand = typeOrName => ({ tr, state }) => {
|
||||
const { selection } = tr
|
||||
const type = getMarkType(typeOrName, state.schema)
|
||||
let {
|
||||
from, to, $from, empty,
|
||||
} = selection
|
||||
let { from, to } = selection
|
||||
const { $from, empty } = selection
|
||||
|
||||
if (empty) {
|
||||
const range = getMarkRange($from, type)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export default function magicMethods(Clazz: any) {
|
||||
const classHandler = Object.create(null)
|
||||
|
||||
classHandler.construct = (_, args: any) => {
|
||||
classHandler.construct = (_: any, args: any) => {
|
||||
const instance = new Clazz(...args)
|
||||
const instanceHandler = Object.create(null)
|
||||
const get = Object.getOwnPropertyDescriptor(Clazz.prototype, '__get')
|
||||
|
||||
Reference in New Issue
Block a user