Skip to content

Commit d419faf

Browse files
committed
chore: Fix linter errors and warnings
Signed-off-by: Jonas <jonas@freesources.org>
1 parent 94bfbb5 commit d419faf

7 files changed

Lines changed: 21 additions & 11 deletions

File tree

cypress/e2e/directediting.spec.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import { initUserAndFiles, randUser } from '../utils/index.js'
22

33
const user = randUser()
44

5+
/**
6+
* Enter content and close
7+
*/
58
function enterContentAndClose() {
69
cy.intercept({ method: 'POST', url: '**/session/*/close' }).as('closeRequest')
710
cy.intercept({ method: 'POST', url: '**/session/*/push' }).as('push')

cypress/e2e/nodes/Links.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ describe('test link marks', function() {
2222

2323
describe('link bubble', function() {
2424

25+
/**
26+
* Find link and click on it
27+
*
28+
* @param {string} link The link URL
29+
* @param {object|null} options the click options
30+
*/
2531
function clickLink(link, options = {}) {
2632
cy.getContent()
2733
.find(`a[href*="${link}"]`)

cypress/e2e/nodes/Preview.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ describe('Preview extension', { retries: 0 }, () => {
185185

186186
/**
187187
*
188-
* @param input
188+
* @param {string} input the markdown content
189189
*/
190190
function prepareEditor(input) {
191191
loadMarkdown(editor, input)

cypress/e2e/nodes/helpers.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import { createMarkdownSerializer } from './../../../src/extensions/Markdown.js'
2626

2727
/**
2828
*
29-
* @param editor
30-
* @param markdown
29+
* @param {object} editor the editor object
30+
* @param {string} markdown the markdown content
3131
*/
3232
export function loadMarkdown(editor, markdown) {
3333
const stripped = markdown.replace(/\t*/g, '')
@@ -36,7 +36,7 @@ export function loadMarkdown(editor, markdown) {
3636

3737
/**
3838
*
39-
* @param editor
39+
* @param {object} editor the editor object
4040
*/
4141
export function runCommands(editor) {
4242
let found
@@ -51,7 +51,7 @@ export function runCommands(editor) {
5151

5252
/**
5353
*
54-
* @param editor
54+
* @param {object} editor the editor object
5555
*/
5656
function findCommand(editor) {
5757
const doc = editor.state.doc
@@ -62,8 +62,8 @@ function findCommand(editor) {
6262

6363
/**
6464
*
65-
* @param editor
66-
* @param markdown
65+
* @param {object} editor the editor object
66+
* @param {string} markdown the markdown content
6767
*/
6868
export function expectMarkdown(editor, markdown) {
6969
const stripped = markdown.replace(/\t*/g, '')
@@ -72,7 +72,7 @@ export function expectMarkdown(editor, markdown) {
7272

7373
/**
7474
*
75-
* @param editor
75+
* @param {object} editor the editor object
7676
*/
7777
function getMarkdown(editor) {
7878
const serializer = createMarkdownSerializer(editor.schema)

src/components/Editor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ import {
106106
import ReadonlyBar from './Menu/ReadonlyBar.vue'
107107
108108
import { logger } from '../helpers/logger.js'
109-
import { getDocumentState, applyDocumentState } from '../helpers/yjs.js'
109+
import { getDocumentState } from '../helpers/yjs.js'
110110
import { SyncService, ERROR_TYPE, IDLE_TIMEOUT } from './../services/SyncService.js'
111111
import SessionApi from '../services/SessionApi.js'
112112
import createSyncServiceProvider from './../services/SyncServiceProvider.js'

src/nodes/Preview.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export default Node.create({
111111
/**
112112
* Insert a preview for given link.
113113
*
114+
* @param {string} link the link URL
114115
*/
115116
insertPreview: (link) => ({ state, chain }) => {
116117
return chain()

src/plugins/LinkBubblePluginView.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class LinkBubblePluginView {
3232
)
3333
document.addEventListener('scroll',
3434
this.closeOnExternalEvents,
35-
{ capture: true }
35+
{ capture: true },
3636
)
3737
}
3838

@@ -45,7 +45,7 @@ class LinkBubblePluginView {
4545
)
4646
document.removeEventListener('scroll',
4747
this.closeOnExternalEvents,
48-
{ capture: true }
48+
{ capture: true },
4949
)
5050
}
5151

0 commit comments

Comments
 (0)