mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-02 13:57:05 +02:00
CODEBASE: Fix lint errors 3 (#1758)
This is a really big refactor because it actually *fixes* a lot of the lint errors instead of disabling them.
This commit is contained in:
+8
-1
@@ -225,7 +225,12 @@ class BitburnerSaveObject {
|
||||
|
||||
let parsedSaveData;
|
||||
try {
|
||||
parsedSaveData = JSON.parse(decodedSaveData);
|
||||
parsedSaveData = JSON.parse(decodedSaveData) as {
|
||||
ctor: string;
|
||||
data: {
|
||||
PlayerSave: string;
|
||||
};
|
||||
};
|
||||
} catch (error) {
|
||||
console.error(error); // We'll handle below
|
||||
}
|
||||
@@ -632,6 +637,7 @@ function evaluateVersionCompatibility(ver: string | number): void {
|
||||
if (isNaN(intExp)) intExp = 0;
|
||||
anyPlayer.exp.intelligence += intExp;
|
||||
for (const field of removePlayerFields) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
||||
delete anyPlayer[field];
|
||||
}
|
||||
for (const sleeve of anyPlayer.sleeves) {
|
||||
@@ -640,6 +646,7 @@ function evaluateVersionCompatibility(ver: string | number): void {
|
||||
if (isNaN(intExp)) intExp = 0;
|
||||
anySleeve.exp.intelligence += intExp;
|
||||
for (const field of removeSleeveFields) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
||||
delete sleeve[field];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user