Skip to content

Commit 6bb912b

Browse files
committed
[runmode addon] Fix lint issues
1 parent f87e118 commit 6bb912b

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

rollup.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ export default [
55
input: "src/codemirror.js",
66
output: {
77
banner: `// CodeMirror, copyright (c) by Marijn Haverbeke and others
8-
// Distributed under an MIT license: https://codemirror.net/LICENSE
8+
// Distributed under an MIT license: https://codemirror.net/LICENSE
99
10-
// This is CodeMirror (https://codemirror.net), a code editor
11-
// implemented in JavaScript on top of the browser's DOM.
12-
//
13-
// You can find some technical background for some of the code below
14-
// at http://marijnhaverbeke.nl/blog/#cm-internals .
15-
`,
10+
// This is CodeMirror (https://codemirror.net), a code editor
11+
// implemented in JavaScript on top of the browser's DOM.
12+
//
13+
// You can find some technical background for some of the code below
14+
// at http://marijnhaverbeke.nl/blog/#cm-internals .
15+
`,
1616
format: "umd",
1717
file: "lib/codemirror.js",
1818
name: "CodeMirror"

src/addon/runmode/codemirror-standalone.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import StringStream from "../../util/StringStream.js"
22
import * as modeMethods from "../../modes.js"
33

4+
// declare global: globalThis, CodeMirror
5+
46
// Create a minimal CodeMirror needed to use runMode, and assign to root.
57
var root = typeof globalThis !== 'undefined' ? globalThis : window
68
root.CodeMirror = {}
@@ -14,7 +16,7 @@ CodeMirror.defineMode("null", () => ({token: stream => stream.skipToEnd()}))
1416
CodeMirror.defineMIME("text/plain", "null")
1517

1618
CodeMirror.registerHelper = CodeMirror.registerGlobalHelper = Math.min
17-
CodeMirror.splitLines = function(string) { return string.split(/\r?\n|\r/); }
19+
CodeMirror.splitLines = function(string) { return string.split(/\r?\n|\r/) }
1820

1921
CodeMirror.defaults = { indentUnit: 2 }
20-
export default CodeMirror;
22+
export default CodeMirror

src/addon/runmode/codemirror.node.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports.StringStream = StringStream
77
exports.countColumn = countColumn
88
for (var exported in modeMethods) exports[exported] = modeMethods[exported]
99

10-
// Shim library CodeMirror with the minimal CodeMirror defined above.
10+
// Shim library CodeMirror with the minimal CodeMirror defined above.
1111
require.cache[require.resolve("../../lib/codemirror")] = require.cache[require.resolve("./runmode.node")]
1212
require.cache[require.resolve("../../addon/runmode/runmode")] = require.cache[require.resolve("./runmode.node")]
1313

@@ -16,6 +16,6 @@ exports.defineMode("null", () => ({token: stream => stream.skipToEnd()}))
1616
exports.defineMIME("text/plain", "null")
1717

1818
exports.registerHelper = exports.registerGlobalHelper = Math.min
19-
exports.splitLines = function(string) { return string.split(/\r?\n|\r/); }
19+
exports.splitLines = function(string) { return string.split(/\r?\n|\r/) }
2020

2121
exports.defaults = { indentUnit: 2 }

0 commit comments

Comments
 (0)