add newline-after-var rule to eslint config

This commit is contained in:
Philipp Kühn
2021-12-03 00:03:39 +01:00
parent 6360278660
commit 40a9404c94
23 changed files with 40 additions and 2 deletions

View File

@@ -281,6 +281,7 @@ export class Editor extends EventEmitter<EditorEvents> {
// Lets store the editor instance in the DOM element.
// So well have access to it for tests.
const dom = this.view.dom as HTMLElement
dom.editor = this
}

View File

@@ -31,6 +31,7 @@ export const undoInputRule: RawCommands['undoInputRule'] = () => ({ state, dispa
if (undoable.text) {
const marks = tr.doc.resolve(undoable.from).marks()
tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks))
} else {
tr.delete(undoable.from, undoable.to)

View File

@@ -7,6 +7,7 @@ export default function getHTMLFromFragment(fragment: Fragment, schema: Schema):
const temporaryDocument = document.implementation.createHTMLDocument()
const container = temporaryDocument.createElement('div')
container.appendChild(documentFragment)
return container.innerHTML

View File

@@ -37,6 +37,7 @@ export default function nodeInputRule(config: {
// insert last typed character
const lastChar = match[0][match[0].length - 1]
tr.insertText(lastChar, start + match[0].length - 1)
// insert node from input rule

View File

@@ -55,10 +55,12 @@ export const CollaborationCursor = Extension.create<CollaborationCursorOptions,
},
render: user => {
const cursor = document.createElement('span')
cursor.classList.add('collaboration-cursor__caret')
cursor.setAttribute('style', `border-color: ${user.color}`)
const label = document.createElement('div')
label.classList.add('collaboration-cursor__label')
label.setAttribute('style', `background-color: ${user.color}`)
label.insertBefore(document.createTextNode(user.name), null)

View File

@@ -14,6 +14,7 @@ export function updateColumns(node: ProseMirrorNode, colgroup: Element, table: E
for (let j = 0; j < colspan; j += 1, col += 1) {
const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j]
const cssWidth = hasWidth ? `${hasWidth}px` : ''
totalWidth += hasWidth || cellMinWidth
if (!hasWidth) {
@@ -34,6 +35,7 @@ export function updateColumns(node: ProseMirrorNode, colgroup: Element, table: E
while (nextDOM) {
const after = nextDOM.nextSibling
nextDOM.parentNode.removeChild(nextDOM)
nextDOM = after
}

View File

@@ -83,6 +83,7 @@ class ReactNodeView extends NodeView<React.FunctionComponent, Editor, ReactNodeV
}
let as = this.node.isInline ? 'span' : 'div'
if (this.options.as) {
as = this.options.as
}

View File

@@ -21,6 +21,7 @@ export class VueRenderer {
// prevents `Avoid mutating a prop directly` error message
const originalSilent = Vue.config.silent
Vue.config.silent = true
Object