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

@@ -103,21 +103,23 @@ export const CollaborationCursor = Extension.create<CollaborationCursorOptions,
addProseMirrorPlugins() {
return [
yCursorPlugin((() => {
this.options.provider.awareness.setLocalStateField('user', this.options.user)
yCursorPlugin(
(() => {
this.options.provider.awareness.setLocalStateField('user', this.options.user)
this.storage.users = awarenessStatesToArray(this.options.provider.awareness.states)
this.options.provider.awareness.on('update', () => {
this.storage.users = awarenessStatesToArray(this.options.provider.awareness.states)
})
return this.options.provider.awareness
})(),
// @ts-ignore
{
cursorBuilder: this.options.render,
}),
this.options.provider.awareness.on('update', () => {
this.storage.users = awarenessStatesToArray(this.options.provider.awareness.states)
})
return this.options.provider.awareness
})(),
// @ts-ignore
{
cursorBuilder: this.options.render,
},
),
]
},
})