Changes according to Eslint

This commit is contained in:
Daniël van Noord
2021-03-16 09:32:50 +01:00
parent 26d8e75935
commit a65af049b6
63 changed files with 314 additions and 295 deletions

View File

@@ -51,7 +51,7 @@ export function MaxChainCookieReward(digit, maxPayout, mult) {
);
nextRequired = Math.floor((1 / 9) * 10 ** (chain + 1) * digit * mult);
totalFromChain += moni;
chain++;
chain += 1;
}
return [totalFromChain, moni, nextRequired];
}

View File

@@ -19,9 +19,9 @@ export default function CacheAllMissingUpgrades() {
CacheMissingUpgradesPrestige = '';
const list = [];
// sort the upgrades
for (const i of Object.keys(Game.Upgrades)) {
Object.keys(Game.Upgrades).forEach((i) => {
list.push(Game.Upgrades[i]);
}
});
const sortMap = function (a, b) {
if (a.order > b.order) return 1;
if (a.order < b.order) return -1;
@@ -29,7 +29,7 @@ export default function CacheAllMissingUpgrades() {
};
list.sort(sortMap);
for (const i of Object.keys(list)) {
Object.keys(list).forEach((i) => {
const me = list[i];
if (me.bought === 0) {
@@ -45,5 +45,5 @@ export default function CacheAllMissingUpgrades() {
)
CacheMissingUpgrades += str;
}
}
});
}

View File

@@ -42,11 +42,11 @@ export function CacheStatsCookies() {
CacheEdifice = 0;
let max = 0;
let n = 0;
for (const i of Object.keys(Game.Objects)) {
Object.keys(Game.Objects).forEach((i) => {
if (Game.Objects[i].amount > max) max = Game.Objects[i].amount;
if (Game.Objects[i].amount > 0) n++;
}
for (const i of Object.keys(Game.Objects)) {
if (Game.Objects[i].amount > 0) n += 1;
});
Object.keys(Game.Objects).forEach((i) => {
if (
(Game.Objects[i].amount < max || n === 1) &&
Game.Objects[i].amount < 400 &&
@@ -55,7 +55,7 @@ export function CacheStatsCookies() {
CacheEdifice = Game.Objects[i].price * 2;
CacheEdificeBuilding = i;
}
}
});
}
/**