diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-08-25 23:19:39 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2021-08-25 23:23:21 +0300 |
commit | 2cb367b94bd716ee6b1303927818c7ddbc0fcdfa (patch) | |
tree | 28d77724d165426bd6fa9fa59c1258864bc24b4a /src | |
parent | 4efc9c48acb5a63bf795cc07edb0f52b4fa856fb (diff) |
Apply lint fixes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/EditorFactory.js | 2 | ||||
-rw-r--r-- | src/commands/listInputRule.js | 5 | ||||
-rw-r--r-- | src/components/CollisionResolveDialog.vue | 4 | ||||
-rw-r--r-- | src/components/EditorWrapper.vue | 2 | ||||
-rw-r--r-- | src/extensions/tracking/TrackState.js | 11 | ||||
-rw-r--r-- | src/helpers/index.js | 1 | ||||
-rw-r--r-- | src/services/PollingBackend.js | 6 | ||||
-rw-r--r-- | src/services/SyncService.js | 1 | ||||
-rw-r--r-- | src/views/DirectEditing.vue | 2 |
9 files changed, 28 insertions, 6 deletions
diff --git a/src/EditorFactory.js b/src/EditorFactory.js index 4a5c824ab..f49a77c12 100644 --- a/src/EditorFactory.js +++ b/src/EditorFactory.js @@ -42,7 +42,7 @@ import 'proxy-polyfill' import { MarkdownSerializer, defaultMarkdownSerializer } from 'prosemirror-markdown' -const loadSyntaxHighlight = async(language) => { +const loadSyntaxHighlight = async (language) => { const languages = [language] const modules = {} for (let i = 0; i < languages.length; i++) { diff --git a/src/commands/listInputRule.js b/src/commands/listInputRule.js index b48be7a27..1b5c934d9 100644 --- a/src/commands/listInputRule.js +++ b/src/commands/listInputRule.js @@ -22,6 +22,11 @@ import { InputRule, wrappingInputRule } from 'prosemirror-inputrules' +/** + * @param regexp + * @param nodeType + * @param getAttrs + */ export default function(regexp, nodeType, getAttrs) { return new InputRule(regexp, (state, match, start, end) => { const tr = wrappingInputRule(regexp, nodeType).handler(state, match, start, end) diff --git a/src/components/CollisionResolveDialog.vue b/src/components/CollisionResolveDialog.vue index bcdfe55e9..7129723f3 100644 --- a/src/components/CollisionResolveDialog.vue +++ b/src/components/CollisionResolveDialog.vue @@ -22,10 +22,10 @@ <template> <div id="resolve-conflicts" class="collision-resolve-dialog"> - <button @click="$emit('resolveUseThisVersion')"> + <button @click="$emit('resolve-use-this-version')"> {{ t('text', 'Use current version') }} </button> - <button @click="$emit('resolveUseServerVersion')"> + <button @click="$emit('resolve-use-server-version')"> {{ t('text', 'Use the saved version') }} </button> </div> diff --git a/src/components/EditorWrapper.vue b/src/components/EditorWrapper.vue index 9ac6b9dc4..a50559e86 100644 --- a/src/components/EditorWrapper.vue +++ b/src/components/EditorWrapper.vue @@ -66,7 +66,7 @@ :is-rich-editor="isRichEditor" /> </div> - <CollisionResolveDialog v-if="hasSyncCollission && !readOnly" @resolveUseThisVersion="resolveUseThisVersion" @resolveUseServerVersion="resolveUseServerVersion" /> + <CollisionResolveDialog v-if="hasSyncCollission && !readOnly" @resolve-use-this-version="resolveUseThisVersion" @resolve-use-server-version="resolveUseServerVersion" /> </div> </template> diff --git a/src/extensions/tracking/TrackState.js b/src/extensions/tracking/TrackState.js index 8193ecacb..6d6e7ef29 100644 --- a/src/extensions/tracking/TrackState.js +++ b/src/extensions/tracking/TrackState.js @@ -27,6 +27,11 @@ import { Span } from './models' * https://github.com/ProseMirror/website/blob/master/example/track/index.js */ +/** + * @param map + * @param transform + * @param clientIDs + */ function updateBlameMap(map, transform, clientIDs) { const result = [] const mapping = transform.mapping @@ -47,6 +52,12 @@ function updateBlameMap(map, transform, clientIDs) { return result } +/** + * @param map + * @param from + * @param to + * @param author + */ function insertIntoBlameMap(map, from, to, author) { if (from >= to) { return diff --git a/src/helpers/index.js b/src/helpers/index.js index 6bf6d7c75..491d8008c 100644 --- a/src/helpers/index.js +++ b/src/helpers/index.js @@ -22,6 +22,7 @@ /** * Callback that should be executed after the document is ready + * * @param callback */ import { generateUrl } from '@nextcloud/router' diff --git a/src/services/PollingBackend.js b/src/services/PollingBackend.js index b489e7280..87e885a20 100644 --- a/src/services/PollingBackend.js +++ b/src/services/PollingBackend.js @@ -26,18 +26,21 @@ import { sendableSteps } from 'prosemirror-collab' /** * Minimum inverval to refetch the document changes + * * @type {number} time in ms */ const FETCH_INTERVAL = 300 /** * Maximum interval between refetches of document state if multiple users have joined + * * @type {number} time in ms */ const FETCH_INTERVAL_MAX = 5000 /** * Interval to check for changes when there is only one user joined + * * @type {number} time in ms */ const FETCH_INTERVAL_SINGLE_EDITOR = 5000 @@ -45,6 +48,7 @@ const FETCH_INTERVAL_SINGLE_EDITOR = 5000 /** * Interval to fetch for changes when a browser window is considered invisible by the * page visibility API https://developer.mozilla.org/de/docs/Web/API/Page_Visibility_API + * * @type {number} time in ms */ const FETCH_INTERVAL_INVISIBLE = 60000 @@ -61,7 +65,7 @@ const MAX_RETRY_FETCH_COUNT = 5 /** * Timeout for sessions to be marked as disconnected * Make sure that this is higher than any FETCH_INTERVAL_ values - **/ + */ const COLLABORATOR_DISCONNECT_TIME = FETCH_INTERVAL_INVISIBLE * 1.5 class PollingBackend { diff --git a/src/services/SyncService.js b/src/services/SyncService.js index faf4aa5b8..a533f6b7b 100644 --- a/src/services/SyncService.js +++ b/src/services/SyncService.js @@ -34,6 +34,7 @@ const defaultOptions = { /** * Timeout after which the editor will consider a document without changes being synced as idle * The session will be terminated and the document will stay open in read-only mode with a button to reconnect if needed + * * @type {number} */ const IDLE_TIMEOUT = 30 diff --git a/src/views/DirectEditing.vue b/src/views/DirectEditing.vue index 20d8feb2e..e1de3b21e 100644 --- a/src/views/DirectEditing.vue +++ b/src/views/DirectEditing.vue @@ -110,7 +110,7 @@ export default { methods: { async close() { this.saving = true - setTimeout(async() => { + setTimeout(async () => { await this.$refs.editor.close() callMobileMessage('close') }, 0) |