From e8da521a5ef862fbc1a394c6445b1c55cf9a7089 Mon Sep 17 00:00:00 2001 From: Jonas Date: Mon, 2 Dec 2024 17:53:21 +0100 Subject: [PATCH] fix: linting code style fixes to typescript files Signed-off-by: Jonas --- cypress/e2e/nodes/Links.spec.js | 8 +++++++- src/components/Editor.vue | 2 +- src/services/Outbox.ts | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/nodes/Links.spec.js b/cypress/e2e/nodes/Links.spec.js index 452fde24dbf..13d6db365e6 100644 --- a/cypress/e2e/nodes/Links.spec.js +++ b/cypress/e2e/nodes/Links.spec.js @@ -27,7 +27,13 @@ describe('test link marks', function() { describe('link bubble', function() { - function clickLink(link, options = {}) { + /** + * Find link and click on it + * + * @param {string} link The link URL + * @param {object|null} options the click options + */ + const clickLink = (link, options = {}) => { cy.getContent() .find(`a[href*="${link}"]`) .click(options) diff --git a/src/components/Editor.vue b/src/components/Editor.vue index df0eae7fe2a..939526834e1 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -92,7 +92,7 @@ import { import ReadonlyBar from './Menu/ReadonlyBar.vue' import { logger } from '../helpers/logger.js' -import { getDocumentState, applyDocumentState } from '../helpers/yjs.js' +import { getDocumentState } from '../helpers/yjs.js' import { SyncService, ERROR_TYPE, IDLE_TIMEOUT } from './../services/SyncService.js' import SessionApi from '../services/SessionApi.js' import createSyncServiceProvider from './../services/SyncServiceProvider.js' diff --git a/src/services/Outbox.ts b/src/services/Outbox.ts index 2ca82416b8d..c6301f9c547 100644 --- a/src/services/Outbox.ts +++ b/src/services/Outbox.ts @@ -11,6 +11,7 @@ type Sendable = { } export default class Outbox { + #awarenessUpdate = '' #syncUpdate = '' #syncQuery = '' @@ -33,7 +34,7 @@ export default class Outbox { } getDataToSend(): Sendable { - return { + return { steps: [this.#syncUpdate, this.#syncQuery].filter(s => s), awareness: this.#awarenessUpdate, }