mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 04:17:05 +02:00
all the lints
This commit is contained in:
@@ -23,8 +23,6 @@ import { AceKeybindingSetting } from "../Settings/SettingEnums";
|
||||
import { clearEventListeners } from "../../utils/uiHelpers/clearEventListeners";
|
||||
import { createElement } from "../../utils/uiHelpers/createElement";
|
||||
import { createOptionElement } from "../../utils/uiHelpers/createOptionElement";
|
||||
import { getSelectText,
|
||||
getSelectValue } from "../../utils/uiHelpers/getSelectData";
|
||||
import { removeChildrenFromElement } from "../../utils/uiHelpers/removeChildrenFromElement";
|
||||
|
||||
// Wrapper for Ace editor
|
||||
@@ -78,16 +76,16 @@ class AceEditorWrapper extends ScriptEditor {
|
||||
// Configure some of the VIM keybindings
|
||||
ace.config.loadModule('ace/keyboard/vim', function(module) {
|
||||
var VimApi = module.CodeMirror.Vim;
|
||||
VimApi.defineEx('write', 'w', function(cm, input) {
|
||||
VimApi.defineEx('write', 'w', function(/*cm, input*/) {
|
||||
params.saveAndCloseFn();
|
||||
});
|
||||
VimApi.defineEx('quit', 'q', function(cm, input) {
|
||||
VimApi.defineEx('quit', 'q', function(/*cm, input*/) {
|
||||
params.quitFn();
|
||||
});
|
||||
VimApi.defineEx('xwritequit', 'x', function(cm, input) {
|
||||
VimApi.defineEx('xwritequit', 'x', function(/*cm, input*/) {
|
||||
params.saveAndCloseFn();
|
||||
});
|
||||
VimApi.defineEx('wqwritequit', 'wq', function(cm, input) {
|
||||
VimApi.defineEx('wqwritequit', 'wq', function(/*cm, input*/) {
|
||||
params.saveAndCloseFn();
|
||||
});
|
||||
});
|
||||
@@ -161,8 +159,6 @@ class AceEditorWrapper extends ScriptEditor {
|
||||
}
|
||||
|
||||
try {
|
||||
const optionsPanel = safeGetElementById("script-editor-options-panel", "Script Editor Options Panel");
|
||||
|
||||
// Set editor to visible
|
||||
const elem = document.getElementById("ace-editor");
|
||||
if (elem instanceof HTMLElement) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//This file should be copied into brace/mode/netscript.js
|
||||
import { NetscriptFunctions } from '../NetscriptFunctions';
|
||||
|
||||
ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(acequire, exports, module) {
|
||||
ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(acequire, exports) {
|
||||
"use strict";
|
||||
|
||||
var oop = acequire("../lib/oop");
|
||||
@@ -23,7 +23,7 @@ var DocCommentHighlightRules = function() {
|
||||
|
||||
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
||||
|
||||
DocCommentHighlightRules.getTagRule = function(start) {
|
||||
DocCommentHighlightRules.getTagRule = function() {
|
||||
return {
|
||||
token : "comment.doc.tag.storage.type",
|
||||
regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b",
|
||||
@@ -50,7 +50,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/mode/netscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(acequire, exports, module) {
|
||||
ace.define("ace/mode/netscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(acequire, exports) {
|
||||
"use strict";
|
||||
|
||||
var oop = acequire("../lib/oop");
|
||||
@@ -538,12 +538,14 @@ function comments(next) {
|
||||
exports.NetscriptHighlightRules = NetscriptHighlightRules;
|
||||
});
|
||||
|
||||
ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(acequire, exports, module) {
|
||||
ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(acequire, exports) {
|
||||
"use strict";
|
||||
|
||||
var Range = acequire("../range").Range;
|
||||
|
||||
var MatchingBraceOutdent = function() {};
|
||||
var MatchingBraceOutdent = function() {
|
||||
// do nothing.
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
||||
@@ -578,7 +580,7 @@ var MatchingBraceOutdent = function() {};
|
||||
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
||||
});
|
||||
|
||||
ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(acequire, exports, module) {
|
||||
ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(acequire, exports) {
|
||||
"use strict";
|
||||
|
||||
var oop = acequire("../../lib/oop");
|
||||
@@ -718,7 +720,7 @@ oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/mode/netscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/netscript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(acequire, exports, module) {
|
||||
ace.define("ace/mode/netscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/netscript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(acequire, exports) {
|
||||
"use strict";
|
||||
|
||||
var oop = acequire("../lib/oop");
|
||||
|
||||
@@ -98,8 +98,6 @@ import { Settings } from "../Settings/Settings";
|
||||
import { clearEventListeners } from "../../utils/uiHelpers/clearEventListeners";
|
||||
import { createElement } from "../../utils/uiHelpers/createElement";
|
||||
import { createOptionElement } from "../../utils/uiHelpers/createOptionElement";
|
||||
import { getSelectText,
|
||||
getSelectValue } from "../../utils/uiHelpers/getSelectData";
|
||||
import { removeChildrenFromElement } from "../../utils/uiHelpers/removeChildrenFromElement";
|
||||
|
||||
// Max number of invisibles to be shown in a group if the "Show Invisibles" option
|
||||
@@ -217,16 +215,16 @@ class CodeMirrorEditorWrapper extends ScriptEditor {
|
||||
|
||||
// Configure VIM keybindings
|
||||
var VimApi = CodeMirror.Vim;
|
||||
VimApi.defineEx('write', 'w', function(cm, input) {
|
||||
VimApi.defineEx('write', 'w', function() {
|
||||
params.saveAndCloseFn();
|
||||
});
|
||||
VimApi.defineEx('quit', 'q', function(cm, input) {
|
||||
VimApi.defineEx('quit', 'q', function() {
|
||||
params.quitFn();
|
||||
});
|
||||
VimApi.defineEx('xwritequit', 'x', function(cm, input) {
|
||||
VimApi.defineEx('xwritequit', 'x', function() {
|
||||
params.saveAndCloseFn();
|
||||
});
|
||||
VimApi.defineEx('wqwritequit', 'wq', function(cm, input) {
|
||||
VimApi.defineEx('wqwritequit', 'wq', function() {
|
||||
params.saveAndCloseFn();
|
||||
});
|
||||
}
|
||||
@@ -355,7 +353,7 @@ class CodeMirrorEditorWrapper extends ScriptEditor {
|
||||
keys = keys + key;
|
||||
this.vimCommandDisplay.innerHTML = keys;
|
||||
}
|
||||
const handleVimCommandDone = (e) => {
|
||||
const handleVimCommandDone = () => {
|
||||
keys = '';
|
||||
this.vimCommandDisplay.innerHTML = keys;
|
||||
}
|
||||
@@ -387,7 +385,7 @@ class CodeMirrorEditorWrapper extends ScriptEditor {
|
||||
showInvisiblesChkBox.onchange = () => {
|
||||
const overlayMode = {
|
||||
name: 'invisibles',
|
||||
token: function nextToken(stream) {
|
||||
token: function(stream) {
|
||||
var ret,
|
||||
spaces = 0,
|
||||
space = stream.peek() === ' ';
|
||||
|
||||
@@ -10,7 +10,7 @@ export class PositionTracker {
|
||||
this.positions = new Map<string, Position>();
|
||||
}
|
||||
|
||||
saveCursor(filename: string, pos: Position) {
|
||||
saveCursor(filename: string, pos: Position): void {
|
||||
this.positions.set(filename, pos);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user