[runmode addon] Fix lint issues
This commit is contained in:
parent
f87e1181c0
commit
6bb912b3e2
|
@ -5,14 +5,14 @@ export default [
|
|||
input: "src/codemirror.js",
|
||||
output: {
|
||||
banner: `// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
|
||||
// This is CodeMirror (https://codemirror.net), a code editor
|
||||
// implemented in JavaScript on top of the browser's DOM.
|
||||
//
|
||||
// You can find some technical background for some of the code below
|
||||
// at http://marijnhaverbeke.nl/blog/#cm-internals .
|
||||
`,
|
||||
// This is CodeMirror (https://codemirror.net), a code editor
|
||||
// implemented in JavaScript on top of the browser's DOM.
|
||||
//
|
||||
// You can find some technical background for some of the code below
|
||||
// at http://marijnhaverbeke.nl/blog/#cm-internals .
|
||||
`,
|
||||
format: "umd",
|
||||
file: "lib/codemirror.js",
|
||||
name: "CodeMirror"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import StringStream from "../../util/StringStream.js"
|
||||
import * as modeMethods from "../../modes.js"
|
||||
|
||||
// declare global: globalThis, CodeMirror
|
||||
|
||||
// Create a minimal CodeMirror needed to use runMode, and assign to root.
|
||||
var root = typeof globalThis !== 'undefined' ? globalThis : window
|
||||
root.CodeMirror = {}
|
||||
|
@ -14,7 +16,7 @@ CodeMirror.defineMode("null", () => ({token: stream => stream.skipToEnd()}))
|
|||
CodeMirror.defineMIME("text/plain", "null")
|
||||
|
||||
CodeMirror.registerHelper = CodeMirror.registerGlobalHelper = Math.min
|
||||
CodeMirror.splitLines = function(string) { return string.split(/\r?\n|\r/); }
|
||||
CodeMirror.splitLines = function(string) { return string.split(/\r?\n|\r/) }
|
||||
|
||||
CodeMirror.defaults = { indentUnit: 2 }
|
||||
export default CodeMirror;
|
||||
export default CodeMirror
|
||||
|
|
|
@ -7,7 +7,7 @@ exports.StringStream = StringStream
|
|||
exports.countColumn = countColumn
|
||||
for (var exported in modeMethods) exports[exported] = modeMethods[exported]
|
||||
|
||||
// Shim library CodeMirror with the minimal CodeMirror defined above.
|
||||
// Shim library CodeMirror with the minimal CodeMirror defined above.
|
||||
require.cache[require.resolve("../../lib/codemirror")] = require.cache[require.resolve("./runmode.node")]
|
||||
require.cache[require.resolve("../../addon/runmode/runmode")] = require.cache[require.resolve("./runmode.node")]
|
||||
|
||||
|
@ -16,6 +16,6 @@ exports.defineMode("null", () => ({token: stream => stream.skipToEnd()}))
|
|||
exports.defineMIME("text/plain", "null")
|
||||
|
||||
exports.registerHelper = exports.registerGlobalHelper = Math.min
|
||||
exports.splitLines = function(string) { return string.split(/\r?\n|\r/); }
|
||||
exports.splitLines = function(string) { return string.split(/\r?\n|\r/) }
|
||||
|
||||
exports.defaults = { indentUnit: 2 }
|
||||
|
|
Loading…
Reference in New Issue