mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-09 17:23:53 +01:00
Lint current problems & fix ignore paths
This commit is contained in:
parent
92e8b42d18
commit
3b99da8474
@ -1,7 +1,23 @@
|
||||
node_modules/
|
||||
doc/build/
|
||||
dist/
|
||||
tests/*.bundle.*
|
||||
input/
|
||||
|
||||
assets/
|
||||
css/
|
||||
.cypress/
|
||||
cypress/
|
||||
doc/
|
||||
markdown/
|
||||
netscript_tests/
|
||||
scripts/
|
||||
|
||||
electron/lib
|
||||
electron/greenworks.js
|
||||
src/ThirdParty/*
|
||||
src/JSInterpreter.js
|
||||
main.bundle.js
|
||||
|
||||
test/*.bundle.*
|
||||
editor.main.js
|
||||
main.bundle.js
|
||||
webpack.config.js
|
||||
webpack.config-test.js
|
||||
|
@ -1,4 +1,5 @@
|
||||
const { app, BrowserWindow, Menu, shell } = require("electron");
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const { app, BrowserWindow, Menu, shell } = require("electron");
|
||||
const greenworks = require("./greenworks");
|
||||
|
||||
if (greenworks.init()) {
|
||||
@ -127,6 +128,7 @@ function setStopProcessHandler(app, window, enabled) {
|
||||
const stopProcessHandler = () => {
|
||||
if (process.platform !== "darwin") {
|
||||
app.quit();
|
||||
// eslint-disable-next-line no-process-exit
|
||||
process.exit(0);
|
||||
}
|
||||
};
|
||||
|
@ -32,6 +32,7 @@ function bitNodeFinishedState(): boolean {
|
||||
return Player.bladeburner !== null && Player.bladeburner.blackops.hasOwnProperty("Operation Daedalus");
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
function sfAchievement(): Achievement[] {
|
||||
const achs: Achievement[] = [];
|
||||
for (let i = 0; i <= 11; i++) {
|
||||
|
@ -4,6 +4,7 @@ const defaultInterpreter = new Interpreter("", () => undefined);
|
||||
|
||||
// the acorn interpreter has a bug where it doesn't convert arrays correctly.
|
||||
// so we have to more or less copy it here.
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export function toNative(pseudoObj: any): any {
|
||||
if (pseudoObj == null) return null;
|
||||
if (
|
||||
|
@ -26,7 +26,7 @@ import { Locations } from "../../Locations/Locations";
|
||||
import { CityName } from "../../Locations/data/CityNames";
|
||||
import { LocationName } from "../../Locations/data/LocationNames";
|
||||
import { Sleeve } from "../../PersonObjects/Sleeve/Sleeve";
|
||||
import { calculateSkill as calculateSkillF, calculateSkillProgress as calculateSkillProgressF, getEmptySkillProgress, ISkillProgress } from "../formulas/skill";
|
||||
import { calculateSkill as calculateSkillF, calculateSkillProgress as calculateSkillProgressF, ISkillProgress } from "../formulas/skill";
|
||||
import { calculateIntelligenceBonus } from "../formulas/intelligence";
|
||||
import {
|
||||
getHackingWorkRepGain,
|
||||
|
@ -104,8 +104,8 @@ let currentScript = {} as openScript; // Script currently being viewed
|
||||
export function Root(props: IProps): React.ReactElement {
|
||||
const editorRef = useRef<IStandaloneCodeEditor | null>(null);
|
||||
const monacoRef = useRef<Monaco | null>(null);
|
||||
const [filename, setFilename] = useState(props.filename);
|
||||
const [code, setCode] = useState<string>(props.code);
|
||||
const [filename] = useState(props.filename);
|
||||
const [code] = useState<string>(props.code);
|
||||
const [decorations, setDecorations] = useState<string[]>([]);
|
||||
const [ram, setRAM] = useState("RAM: ???");
|
||||
const [updatingRam, setUpdatingRam] = useState(false);
|
||||
|
@ -246,6 +246,7 @@ export class BaseServer {
|
||||
this.maxRam = ram;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
updateRamUsed(ram: number, player: IPlayer): void {
|
||||
this.ramUsed = ram;
|
||||
}
|
||||
|
@ -178,14 +178,14 @@ export function getAllParentDirectories(path: string): string {
|
||||
* @param cwd The current working directory
|
||||
* @returns A file path which may be absolute or relative
|
||||
*/
|
||||
export function getDestinationFilepath(destination: string, source: string, cwd: string) {
|
||||
export function getDestinationFilepath(destination: string, source: string, cwd: string): string {
|
||||
const dstDir = evaluateDirectoryPath(destination, cwd);
|
||||
// If evaluating the directory for this destination fails, we have a filename or full path.
|
||||
if (dstDir === null) {
|
||||
return destination;
|
||||
} else {
|
||||
// Append the filename to the directory provided.
|
||||
let t_path = removeTrailingSlash(dstDir);
|
||||
const t_path = removeTrailingSlash(dstDir);
|
||||
const fileName = getFileName(source);
|
||||
return t_path + "/" + fileName;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ export function download(
|
||||
const matchEnding = fn.length == 1 || fn === "*.*" ? null : fn.slice(1); // Treat *.* the same as *
|
||||
const zip = new JSZip();
|
||||
// Helper function to zip any file contents whose name matches the pattern
|
||||
const zipFiles = (fileNames: string[], fileContents: string[]) => {
|
||||
const zipFiles = (fileNames: string[], fileContents: string[]): void => {
|
||||
for (let i = 0; i < fileContents.length; ++i) {
|
||||
let name = fileNames[i];
|
||||
if (name.startsWith("/")) name = name.slice(1);
|
||||
|
Loading…
Reference in New Issue
Block a user