all the lints

This commit is contained in:
Olivier Gagnon
2021-05-01 03:17:31 -04:00
parent abe0330dc3
commit d745150c45
231 changed files with 1458 additions and 1439 deletions
+9 -7
View File
@@ -16,10 +16,6 @@ import {
import { getTimestamp } from "../../utils/helpers/getTimestamp";
export class RunningScript {
// Initializes a RunningScript Object from a JSON save state
static fromJSON(value: any): RunningScript {
return Generic_fromJSON(RunningScript, value.data);
}
// Script arguments
args: any[] = [];
@@ -101,7 +97,7 @@ export class RunningScript {
}
// Update the moneyStolen and numTimesHack maps when hacking
recordHack(serverIp: string, moneyGained: number, n=1) {
recordHack(serverIp: string, moneyGained: number, n=1): void {
if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {
this.dataMap[serverIp] = [0, 0, 0, 0];
}
@@ -110,7 +106,7 @@ export class RunningScript {
}
// Update the grow map when calling grow()
recordGrow(serverIp: string, n=1) {
recordGrow(serverIp: string, n=1): void {
if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {
this.dataMap[serverIp] = [0, 0, 0, 0];
}
@@ -118,7 +114,7 @@ export class RunningScript {
}
// Update the weaken map when calling weaken() {
recordWeaken(serverIp: string, n=1) {
recordWeaken(serverIp: string, n=1): void {
if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {
this.dataMap[serverIp] = [0, 0, 0, 0];
}
@@ -129,6 +125,12 @@ export class RunningScript {
toJSON(): any {
return Generic_toJSON("RunningScript", this);
}
// Initializes a RunningScript Object from a JSON save state
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
static fromJSON(value: any): RunningScript {
return Generic_fromJSON(RunningScript, value.data);
}
}
Reviver.constructors.RunningScript = RunningScript;