diff --git a/.eslintrc.cjs b/.eslintrc.cjs index bc019d9820d..0bab9029919 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -6,7 +6,7 @@ module.exports = { root: true, extends: [ - '@nextcloud/eslint-config/typescript', + '@nextcloud', ], rules: { '@typescript-eslint/no-unused-vars': ['off'], 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/package.json b/package.json index 9fa150e9c3c..e7be4ee9fa5 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "build": "NODE_ENV=production NODE_OPTIONS='--max-old-space-size=4096' vite --mode production build", "dev": "NODE_ENV=development NODE_OPTIONS='--max-old-space-size=4096' vite --mode development build", "watch": "NODE_ENV=development NODE_OPTIONS='--max-old-space-size=8192' vite --mode development build --watch", - "lint": "tsc && eslint --ext .js,.vue src cypress", - "lint:fix": "tsc && eslint --ext .js,.vue src cypress --fix", + "lint": "tsc && eslint --ext .js,.ts,.vue src cypress", + "lint:fix": "tsc && eslint --ext .js,.ts,.vue src cypress --fix", "stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css css/*.scss", "stylelint:fix": "stylelint src/**/*.vue src/**/*.scss src/**/*.css css/*.scss --fix", "test": "NODE_ENV=test jest", 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, } diff --git a/tsconfig.json b/tsconfig.json index 9d64b435b9d..43a99b75aea 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "extends": "@vue/tsconfig", "compilerOptions": { "allowSyntheticDefaultImports": true, - "allowJs": true, + "allowJs": true, "declaration": true, "esModuleInterop": true, "lib": ["DOM", "ESNext"],