Fix prettier installation #774

This commit is contained in:
Daniël van Noord
2021-04-30 20:18:30 +02:00
parent 266b808c4a
commit d909f593a7
14 changed files with 124 additions and 258 deletions

View File

@@ -70,16 +70,14 @@ export default function UpdateBuildings() {
return o;
});
arr.sort(function (a, b) {
return ColoursOrdering.indexOf(a.color) > // eslint-disable-line no-nested-ternary
arr.sort((a, b) => ColoursOrdering.indexOf(a.color) > // eslint-disable-line no-nested-ternary
ColoursOrdering.indexOf(b.color)
? 1
: ColoursOrdering.indexOf(a.color) < ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary
? -1
: a.pp < b.pp
? -1
: 0;
});
: 0);
} else if (CMOptions.SortBuildings === 2) {
arr = Object.keys(target).map((k) => {
const o = target[k];
@@ -88,16 +86,14 @@ export default function UpdateBuildings() {
return o;
});
arr.sort(function (a, b) {
return ColoursOrdering.indexOf(a.color) > // eslint-disable-line no-nested-ternary
arr.sort((a, b) => ColoursOrdering.indexOf(a.color) > // eslint-disable-line no-nested-ternary
ColoursOrdering.indexOf(b.color)
? 1
: ColoursOrdering.indexOf(a.color) < ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary
? -1
: a.pp < b.pp
? -1
: 0;
});
: 0);
}
for (let x = 0; x < arr.length; x++) {

View File

@@ -79,15 +79,13 @@ export default function UpdateUpgrades() {
}
if (CMOptions.SortUpgrades) {
arr.sort(function (a, b) {
return ColoursOrdering.indexOf(a.color) > ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary
arr.sort((a, b) => ColoursOrdering.indexOf(a.color) > ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary
? 1
: ColoursOrdering.indexOf(a.color) < ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary
? -1
: a.pp < b.pp
? -1
: 0;
});
: 0);
} else {
arr.sort((a, b) => a.price - b.price);
}

View File

@@ -20,9 +20,7 @@ export default function CreateWrinklerButtons() {
Game.tooltip.dynamic = 1;
Game.tooltip.draw(
this,
function () {
return CreateTooltip('wb', 'PopAll');
},
() => CreateTooltip('wb', 'PopAll'),
'this',
);
Game.tooltip.wobble();
@@ -43,9 +41,7 @@ export default function CreateWrinklerButtons() {
Game.tooltip.dynamic = 1;
Game.tooltip.draw(
this,
function () {
return CreateTooltip('wb', 'PopFattest');
},
() => CreateTooltip('wb', 'PopFattest'),
'this',
);
Game.tooltip.wobble();

View File

@@ -68,13 +68,11 @@ export default function AddMissingAchievements() {
Game.tooltip.dynamic = 1;
Game.tooltip.draw(
this,
function () {
return (function () {
() => (function () {
return CrateTooltipLockedAchievements(
Game.AchievementsById[id],
);
})();
},
})(),
'top',
);
Game.tooltip.wobble();

View File

@@ -21,17 +21,17 @@ export default function Flash(mode, config, forced) {
l('CMFlashScreen').style.opacity = '0.5';
if (mode === 3) {
l('CMFlashScreen').style.display = 'inline';
setTimeout(function () {
setTimeout(() => {
Flash(2, config, true);
}, 1000 / Game.fps);
} else {
setTimeout(function () {
setTimeout(() => {
Flash(0, config, true);
}, 1000 / Game.fps);
}
} else if (mode === 2) {
l('CMFlashScreen').style.opacity = '1';
setTimeout(function () {
setTimeout(() => {
Flash(1, config, true);
}, 1000 / Game.fps);
} else if (mode === 0) l('CMFlashScreen').style.display = 'none';