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:
Dominik
2022-06-08 14:10:25 +02:00
committed by GitHub
parent 39f5e4c31e
commit 8c6751f0c6
394 changed files with 1328 additions and 1042 deletions

View File

@@ -1,6 +1,6 @@
// @ts-nocheck
import { NodeView } from 'prosemirror-view'
import { Node as ProseMirrorNode } from 'prosemirror-model'
import { NodeView } from 'prosemirror-view'
export function updateColumns(node: ProseMirrorNode, colgroup: Element, table: Element, cellMinWidth: number, overrideCol?: number, overrideValue?: any) {
let totalWidth = 0

View File

@@ -1,34 +1,35 @@
import {
callOrReturn,
getExtensionField,
mergeAttributes,
Node,
ParentConfig,
mergeAttributes,
getExtensionField,
callOrReturn,
} from '@tiptap/core'
import { TextSelection } from 'prosemirror-state'
import {
tableEditing,
columnResizing,
goToNextCell,
addColumnBefore,
addColumnAfter,
deleteColumn,
addRowBefore,
addColumnBefore,
addRowAfter,
addRowBefore,
CellSelection,
columnResizing,
deleteColumn,
deleteRow,
deleteTable,
fixTables,
goToNextCell,
mergeCells,
setCellAttr,
splitCell,
tableEditing,
toggleHeader,
toggleHeaderCell,
setCellAttr,
fixTables,
CellSelection,
} from 'prosemirror-tables'
import { NodeView } from 'prosemirror-view'
import { TextSelection } from 'prosemirror-state'
import { TableView } from './TableView'
import { createTable } from './utilities/createTable'
import { deleteTableWhenAllCellsSelected } from './utilities/deleteTableWhenAllCellsSelected'
import { TableView } from './TableView'
export interface TableOptions {
HTMLAttributes: Record<string, any>,

View File

@@ -1,7 +1,7 @@
import {
NodeType, Fragment,
Fragment,
Node as ProsemirrorNode,
Schema,
NodeType, Schema,
} from 'prosemirror-model'
export function createCell(cellType: NodeType, cellContent?: Fragment<Schema> | ProsemirrorNode<Schema> | Array<ProsemirrorNode<Schema>>): ProsemirrorNode | null | undefined {

View File

@@ -1,4 +1,5 @@
import { Schema, Fragment, Node as ProsemirrorNode } from 'prosemirror-model'
import { Fragment, Node as ProsemirrorNode, Schema } from 'prosemirror-model'
import { createCell } from './createCell'
import { getTableNodeTypes } from './getTableNodeTypes'

View File

@@ -1,4 +1,5 @@
import { KeyboardShortcutCommand, findParentNodeClosestToPos } from '@tiptap/core'
import { findParentNodeClosestToPos, KeyboardShortcutCommand } from '@tiptap/core'
import { isCellSelection } from './isCellSelection'
export const deleteTableWhenAllCellsSelected: KeyboardShortcutCommand = ({ editor }) => {

View File

@@ -1,4 +1,4 @@
import { Schema, NodeType } from 'prosemirror-model'
import { NodeType, Schema } from 'prosemirror-model'
export function getTableNodeTypes(schema: Schema): { [key: string]: NodeType } {
if (schema.cached.tableNodeTypes) {