Skip to content

Commit 282ba60

Browse files
committed
fix: linting
Signed-off-by: Yukai Huang <[email protected]>
1 parent bda5adc commit 282ba60

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

public/js/lib/editor/index.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-env browser */
12
/* global CodeMirror, $, editor, Cookies */
23
import { options, Alignment, FormatType } from '@susisu/mte-kernel'
34
import debounce from 'lodash/debounce'
@@ -13,7 +14,7 @@ import { availableThemes } from './constants'
1314

1415
// Storage utility class for localStorage operations
1516
class Storage {
16-
static get(key, defaultValue = null) {
17+
static get (key, defaultValue = null) {
1718
try {
1819
const value = localStorage.getItem(key)
1920
return value !== null ? value : defaultValue
@@ -23,7 +24,7 @@ class Storage {
2324
}
2425
}
2526

26-
static set(key, value, options = {}) {
27+
static set (key, value, options = {}) {
2728
try {
2829
localStorage.setItem(key, value)
2930
return true
@@ -33,7 +34,7 @@ class Storage {
3334
}
3435
}
3536

36-
static remove(key) {
37+
static remove (key) {
3738
try {
3839
localStorage.removeItem(key)
3940
return true
@@ -216,13 +217,13 @@ export default class Editor {
216217
CodeMirror.defineMode('markmap', function (config, modeConfig) {
217218
return CodeMirror.overlayMode(CodeMirror.getMode(config, 'gfm'), ignoreOverlay)
218219
})
219-
220+
220221
// Migrate preferences from cookies to localStorage
221222
this.migratePreferences()
222223
}
223224

224225
// Migrate preferences from cookies to localStorage
225-
migratePreferences() {
226+
migratePreferences () {
226227
// Only run migration if window and localStorage are available
227228
if (typeof window === 'undefined' || typeof localStorage === 'undefined' || typeof Cookies === 'undefined') {
228229
return

0 commit comments

Comments
 (0)