Skip to content

Commit

Permalink
chore: Fix linter errors and warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas <jonas@freesources.org>
  • Loading branch information
mejo- committed Nov 27, 2024
1 parent 0e38852 commit 2262e4e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 11 deletions.
3 changes: 3 additions & 0 deletions cypress/e2e/directediting.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { initUserAndFiles, randUser } from '../utils/index.js'

const user = randUser()

/**
* Enter content and close
*/
function enterContentAndClose() {
cy.intercept({ method: 'POST', url: '**/session/*/close' }).as('closeRequest')
cy.intercept({ method: 'POST', url: '**/session/*/push' }).as('push')
Expand Down
6 changes: 6 additions & 0 deletions cypress/e2e/nodes/Links.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ describe('test link marks', function() {

describe('link bubble', function() {

/**
* Find link and click on it
*
* @param {string} link The link URL
* @param {object|null} options the click options
*/
function clickLink(link, options = {}) {
cy.getContent()
.find(`a[href*="${link}"]`)
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/nodes/Preview.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ describe('Preview extension', { retries: 0 }, () => {

/**
*
* @param input
* @param {string} input the markdown content
*/
function prepareEditor(input) {
loadMarkdown(editor, input)
Expand Down
14 changes: 7 additions & 7 deletions cypress/e2e/nodes/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import { createMarkdownSerializer } from './../../../src/extensions/Markdown.js'

/**
*
* @param editor
* @param markdown
* @param {object} editor the editor object
* @param {string} markdown the markdown content
*/
export function loadMarkdown(editor, markdown) {
const stripped = markdown.replace(/\t*/g, '')
Expand All @@ -36,7 +36,7 @@ export function loadMarkdown(editor, markdown) {

/**
*
* @param editor
* @param {object} editor the editor object
*/
export function runCommands(editor) {
let found
Expand All @@ -51,7 +51,7 @@ export function runCommands(editor) {

/**
*
* @param editor
* @param {object} editor the editor object
*/
function findCommand(editor) {
const doc = editor.state.doc
Expand All @@ -62,8 +62,8 @@ function findCommand(editor) {

/**
*
* @param editor
* @param markdown
* @param {object} editor the editor object
* @param {string} markdown the markdown content
*/
export function expectMarkdown(editor, markdown) {
const stripped = markdown.replace(/\t*/g, '')
Expand All @@ -72,7 +72,7 @@ export function expectMarkdown(editor, markdown) {

/**
*
* @param editor
* @param {object} editor the editor object
*/
function getMarkdown(editor) {
const serializer = createMarkdownSerializer(editor.schema)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,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'
Expand Down
1 change: 1 addition & 0 deletions src/nodes/Preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export default Node.create({
/**
* Insert a preview for given link.
*
* @param {string} link the link URL
*/
insertPreview: (link) => ({ state, chain }) => {
return chain()
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/LinkBubblePluginView.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class LinkBubblePluginView {
)
document.addEventListener('scroll',
this.closeOnExternalEvents,
{ capture: true }
{ capture: true },
)
}

Expand All @@ -45,7 +45,7 @@ class LinkBubblePluginView {
)
document.removeEventListener('scroll',
this.closeOnExternalEvents,
{ capture: true }
{ capture: true },
)
}

Expand Down

0 comments on commit 2262e4e

Please sign in to comment.