mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 16:14:43 -04:00
Adapt code for eslint-config-standard 17
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
66ab5ab51b
commit
d26dcd04a1
24 changed files with 82 additions and 82 deletions
|
@ -220,7 +220,7 @@ export function getStorageHistory (callback) {
|
|||
if (typeof data === 'string') { data = JSON.parse(data) }
|
||||
callback(data)
|
||||
}
|
||||
// eslint-disable-next-line node/no-callback-literal
|
||||
// eslint-disable-next-line n/no-callback-literal
|
||||
callback([])
|
||||
}
|
||||
|
||||
|
|
|
@ -1230,7 +1230,7 @@ ui.toolbar.export.dropbox.click(function (event) {
|
|||
files: [
|
||||
{
|
||||
url: noteurl + '/download',
|
||||
filename: filename
|
||||
filename
|
||||
}
|
||||
],
|
||||
error: function (errorMessage) {
|
||||
|
@ -1538,7 +1538,7 @@ function initRevisionViewer () {
|
|||
const revisionViewerTextArea = document.getElementById('revisionViewer')
|
||||
revisionViewer = CodeMirror.fromTextArea(revisionViewerTextArea, {
|
||||
mode: defaultEditorMode,
|
||||
viewportMargin: viewportMargin,
|
||||
viewportMargin,
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
showCursorWhenSelecting: true,
|
||||
|
@ -2005,7 +2005,7 @@ function importFromUrl (url) {
|
|||
}
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
url: url,
|
||||
url,
|
||||
success: function (data) {
|
||||
const extension = url.split('.').pop()
|
||||
if (extension === 'html') {
|
||||
|
@ -2999,7 +2999,7 @@ function emitUserStatus (force) {
|
|||
|
||||
const userStatus = {
|
||||
idle: idle.isAway,
|
||||
type: type
|
||||
type
|
||||
}
|
||||
|
||||
if (force || JSON.stringify(userStatus) !== JSON.stringify(userStatusCache)) {
|
||||
|
|
|
@ -99,7 +99,7 @@ export default class Editor {
|
|||
const ch = match[1].length
|
||||
const pos = {
|
||||
line: cursor.line,
|
||||
ch: ch
|
||||
ch
|
||||
}
|
||||
if (cm.getOption('indentWithTabs')) {
|
||||
cm.replaceRange(tab, pos, pos, '+input')
|
||||
|
@ -618,7 +618,7 @@ export default class Editor {
|
|||
mode: defaultEditorMode,
|
||||
backdrop: defaultEditorMode,
|
||||
keyMap: 'sublime',
|
||||
viewportMargin: viewportMargin,
|
||||
viewportMargin,
|
||||
styleActiveLine: true,
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
|
|
|
@ -36,7 +36,7 @@ whiteList.figcaption = []
|
|||
|
||||
const filterXSSOptions = {
|
||||
allowCommentTag: true,
|
||||
whiteList: whiteList,
|
||||
whiteList,
|
||||
escapeHtml: function (html) {
|
||||
// allow html comment in multiple lines
|
||||
return html.replace(/<(?!!--)/g, '<').replace(/-->/g, '__HTML_COMMENT_END__').replace(/>/g, '>').replace(/__HTML_COMMENT_END__/g, '-->')
|
||||
|
@ -73,6 +73,6 @@ function preventXSS (html) {
|
|||
window.preventXSS = preventXSS
|
||||
|
||||
module.exports = {
|
||||
preventXSS: preventXSS,
|
||||
preventXSS,
|
||||
escapeAttrValue: filterXSS.escapeAttrValue
|
||||
}
|
||||
|
|
|
@ -348,8 +348,8 @@ import { md } from './extra'
|
|||
convertSlides()
|
||||
},
|
||||
// TODO: Do these belong in the API?
|
||||
processSlides: processSlides,
|
||||
convertSlides: convertSlides,
|
||||
slidify: slidify
|
||||
processSlides,
|
||||
convertSlides,
|
||||
slidify
|
||||
}
|
||||
}))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue