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,12 +1,12 @@
import {
h,
ref,
PropType,
onMounted,
onBeforeUnmount,
defineComponent,
} from 'vue'
import { BubbleMenuPlugin, BubbleMenuPluginProps } from '@tiptap/extension-bubble-menu'
import {
defineComponent,
h,
onBeforeUnmount,
onMounted,
PropType,
ref,
} from 'vue'
export const BubbleMenu = defineComponent({
name: 'BubbleMenu',

View File

@@ -1,13 +1,14 @@
import { EditorState, Plugin, PluginKey } from 'prosemirror-state'
import { Editor as CoreEditor, EditorOptions } from '@tiptap/core'
import { EditorState, Plugin, PluginKey } from 'prosemirror-state'
import {
markRaw,
Ref,
customRef,
ComponentInternalInstance,
ComponentPublicInstance,
customRef,
markRaw,
reactive,
Ref,
} from 'vue'
import { VueRenderer } from './VueRenderer'
function useDebouncedRef<T>(value: T) {
@@ -56,7 +57,7 @@ export class Editor extends CoreEditor {
this.reactiveExtensionStorage.value = this.extensionStorage
})
return markRaw(this)
return markRaw(this) // eslint-disable-line
}
get state() {

View File

@@ -1,17 +1,18 @@
import {
h,
ref,
Ref,
unref,
Teleport,
PropType,
defineComponent,
DefineComponent,
watchEffect,
defineComponent,
getCurrentInstance,
h,
nextTick,
onBeforeUnmount,
getCurrentInstance,
PropType,
Ref,
ref,
Teleport,
unref,
watchEffect,
} from 'vue'
import { Editor } from './Editor'
export const EditorContent = defineComponent({

View File

@@ -1,12 +1,12 @@
import {
h,
ref,
PropType,
onMounted,
onBeforeUnmount,
defineComponent,
} from 'vue'
import { FloatingMenuPlugin, FloatingMenuPluginProps } from '@tiptap/extension-floating-menu'
import {
defineComponent,
h,
onBeforeUnmount,
onMounted,
PropType,
ref,
} from 'vue'
export const FloatingMenu = defineComponent({
name: 'FloatingMenu',

View File

@@ -1,4 +1,4 @@
import { h, defineComponent } from 'vue'
import { defineComponent, h } from 'vue'
export const NodeViewContent = defineComponent({
props: {
@@ -9,13 +9,11 @@ export const NodeViewContent = defineComponent({
},
render() {
return h(
this.as, {
style: {
whiteSpace: 'pre-wrap',
},
'data-node-view-content': '',
return h(this.as, {
style: {
whiteSpace: 'pre-wrap',
},
)
'data-node-view-content': '',
})
},
})

View File

@@ -1,4 +1,4 @@
import { h, defineComponent } from 'vue'
import { defineComponent, h } from 'vue'
export const NodeViewWrapper = defineComponent({
props: {
@@ -12,7 +12,8 @@ export const NodeViewWrapper = defineComponent({
render() {
return h(
this.as, {
this.as,
{
// @ts-ignore
class: this.decorationClasses.value,
style: {

View File

@@ -2,19 +2,20 @@ import {
NodeView,
NodeViewProps,
NodeViewRenderer,
NodeViewRendererProps,
NodeViewRendererOptions,
NodeViewRendererProps,
} from '@tiptap/core'
import { Node as ProseMirrorNode } from 'prosemirror-model'
import { Decoration, NodeView as ProseMirrorNodeView } from 'prosemirror-view'
import {
ref,
Ref,
provide,
PropType,
Component,
defineComponent,
PropType,
provide,
Ref,
ref,
} from 'vue'
import { Decoration, NodeView as ProseMirrorNodeView } from 'prosemirror-view'
import { Node as ProseMirrorNode } from 'prosemirror-model'
import { Editor } from './Editor'
import { VueRenderer } from './VueRenderer'

View File

@@ -1,5 +1,6 @@
import { reactive, markRaw, Component } from 'vue'
import { Editor } from '@tiptap/core'
import { Component, markRaw, reactive } from 'vue'
import { Editor as ExtendedEditor } from './Editor'
export interface VueRendererOptions {

View File

@@ -1,10 +1,10 @@
export * from '@tiptap/core'
export * from './BubbleMenu'
export { Editor } from './Editor'
export * from './EditorContent'
export * from './FloatingMenu'
export * from './useEditor'
export * from './VueRenderer'
export * from './VueNodeViewRenderer'
export * from './NodeViewWrapper'
export * from './NodeViewContent'
export * from './NodeViewWrapper'
export * from './useEditor'
export * from './VueNodeViewRenderer'
export * from './VueRenderer'
export * from '@tiptap/core'

View File

@@ -1,5 +1,6 @@
import { onMounted, onBeforeUnmount, shallowRef } from 'vue'
import { EditorOptions } from '@tiptap/core'
import { onBeforeUnmount, onMounted, shallowRef } from 'vue'
import { Editor } from './Editor'
export const useEditor = (options: Partial<EditorOptions> = {}) => {