fix more linting issues
This commit is contained in:
@@ -48,5 +48,7 @@ module.exports = {
|
|||||||
'consistent-return': 'off',
|
'consistent-return': 'off',
|
||||||
'no-unused-vars': 'off',
|
'no-unused-vars': 'off',
|
||||||
'@typescript-eslint/no-unused-vars': ['error'],
|
'@typescript-eslint/no-unused-vars': ['error'],
|
||||||
|
'no-use-before-define': 'off',
|
||||||
|
'@typescript-eslint/no-use-before-define': ['error'],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export default {
|
|||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
items() {
|
items() {
|
||||||
return this.linkGroups.reduce((acc, group) => (acc.push(...group.items), acc), [])
|
return this.linkGroups.reduce((acc, group) => ((acc.push(...group.items), acc)), [])
|
||||||
},
|
},
|
||||||
|
|
||||||
currentIndex() {
|
currentIndex() {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { EditorState, Plugin, Transaction } from 'prosemirror-state'
|
import { EditorState, Plugin, Transaction } from 'prosemirror-state'
|
||||||
import { EditorView } from 'prosemirror-view'
|
import { EditorView } from 'prosemirror-view'
|
||||||
import { Schema, DOMParser, DOMSerializer } from 'prosemirror-model'
|
import { Schema, DOMParser } from 'prosemirror-model'
|
||||||
import magicMethods from './utils/magicMethods'
|
import magicMethods from './utils/magicMethods'
|
||||||
import elementFromString from './utils/elementFromString'
|
import elementFromString from './utils/elementFromString'
|
||||||
import nodeIsActive from './utils/nodeIsActive'
|
import nodeIsActive from './utils/nodeIsActive'
|
||||||
@@ -16,7 +16,6 @@ import EventEmitter from './EventEmitter'
|
|||||||
import Extension from './Extension'
|
import Extension from './Extension'
|
||||||
import Node from './Node'
|
import Node from './Node'
|
||||||
import Mark from './Mark'
|
import Mark from './Mark'
|
||||||
import ComponentRenderer from './ComponentRenderer'
|
|
||||||
import defaultPlugins from './plugins'
|
import defaultPlugins from './plugins'
|
||||||
import * as coreCommands from './commands'
|
import * as coreCommands from './commands'
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,8 @@ declare module '../Editor' {
|
|||||||
export const removeMark: RemoveMarkCommand = typeOrName => ({ tr, state }) => {
|
export const removeMark: RemoveMarkCommand = typeOrName => ({ tr, state }) => {
|
||||||
const { selection } = tr
|
const { selection } = tr
|
||||||
const type = getMarkType(typeOrName, state.schema)
|
const type = getMarkType(typeOrName, state.schema)
|
||||||
let {
|
let { from, to } = selection
|
||||||
from, to, $from, empty,
|
const { $from, empty } = selection
|
||||||
} = selection
|
|
||||||
|
|
||||||
if (empty) {
|
if (empty) {
|
||||||
const range = getMarkRange($from, type)
|
const range = getMarkRange($from, type)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export default function magicMethods(Clazz: any) {
|
export default function magicMethods(Clazz: any) {
|
||||||
const classHandler = Object.create(null)
|
const classHandler = Object.create(null)
|
||||||
|
|
||||||
classHandler.construct = (_, args: any) => {
|
classHandler.construct = (_: any, args: any) => {
|
||||||
const instance = new Clazz(...args)
|
const instance = new Clazz(...args)
|
||||||
const instanceHandler = Object.create(null)
|
const instanceHandler = Object.create(null)
|
||||||
const get = Object.getOwnPropertyDescriptor(Clazz.prototype, '__get')
|
const get = Object.getOwnPropertyDescriptor(Clazz.prototype, '__get')
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ declare module '@tiptap/core/src/Editor' {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const starInputRegex = /(?:^|\s)((?:\*\*)((?:[^\*\*]+))(?:\*\*))$/gm
|
export const starInputRegex = /(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/gm
|
||||||
export const starPasteRegex = /(?:^|\s)((?:\*\*)((?:[^\*\*]+))(?:\*\*))/gm
|
export const starPasteRegex = /(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/gm
|
||||||
export const underscoreInputRegex = /(?:^|\s)((?:__)((?:[^__]+))(?:__))$/gm
|
export const underscoreInputRegex = /(?:^|\s)((?:__)((?:[^__]+))(?:__))$/gm
|
||||||
export const underscorePasteRegex = /(?:^|\s)((?:__)((?:[^__]+))(?:__))/gm
|
export const underscorePasteRegex = /(?:^|\s)((?:__)((?:[^__]+))(?:__))/gm
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ declare module '@tiptap/core/src/Editor' {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const starInputRegex = /(?:^|\s)((?:\*)((?:[^\*]+))(?:\*))$/gm
|
export const starInputRegex = /(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/gm
|
||||||
export const starPasteRegex = /(?:^|\s)((?:\*)((?:[^\*]+))(?:\*))/gm
|
export const starPasteRegex = /(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/gm
|
||||||
export const underscoreInputRegex = /(?:^|\s)((?:_)((?:[^_]+))(?:_))$/gm
|
export const underscoreInputRegex = /(?:^|\s)((?:_)((?:[^_]+))(?:_))$/gm
|
||||||
export const underscorePasteRegex = /(?:^|\s)((?:_)((?:[^_]+))(?:_))/gm
|
export const underscorePasteRegex = /(?:^|\s)((?:_)((?:[^_]+))(?:_))/gm
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export default class Renderer extends ComponentRenderer {
|
|||||||
|
|
||||||
vm!: Vue
|
vm!: Vue
|
||||||
|
|
||||||
constructor(component: Vue, options: any) {
|
constructor(component: Vue) {
|
||||||
super()
|
super()
|
||||||
this.mount(component)
|
this.mount(component)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user