Fixed high number of ESLint errors
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import {
|
||||
CacheSpawnedGoldenShimmer,
|
||||
CacheGoldenShimmersByID,
|
||||
@@ -66,7 +65,7 @@ export default function CheckGoldenCookie() {
|
||||
}
|
||||
UpdateFavicon();
|
||||
LastSpawnedGoldenCookieState = CurrSpawnedGoldenCookieState;
|
||||
if (CurrSpawnedGoldenCookieState === 0) CacheSpawnedGoldenShimmer = 0;
|
||||
if (CurrSpawnedGoldenCookieState === 0) CacheSpawnedGoldenShimmer = 0; // eslint-disable-line no-unused-vars
|
||||
} else if (CMOptions.GCTimer === 1 && LastGoldenCookieState) {
|
||||
Object.keys(GCTimers).forEach((i) => {
|
||||
GCTimers[i].style.opacity = CacheGoldenShimmersByID[i].l.style.opacity;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { CacheSeasonPopShimmer } from '../../Cache/VariablesAndData';
|
||||
import { CMOptions } from '../../Config/VariablesAndData';
|
||||
import Flash from '../../Disp/Notifications/Flash';
|
||||
@@ -15,7 +14,7 @@ export default function CheckSeasonPopup() {
|
||||
LastSeasonPopupState = Game.shimmerTypes.reindeer.spawned;
|
||||
Object.keys(Game.shimmers).forEach((i) => {
|
||||
if (Game.shimmers[i].spawnLead && Game.shimmers[i].type === 'reindeer') {
|
||||
CacheSeasonPopShimmer = Game.shimmers[i];
|
||||
CacheSeasonPopShimmer = Game.shimmers[i]; // eslint-disable-line no-unused-vars
|
||||
}
|
||||
});
|
||||
Flash(3, 'SeaFlash', false);
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import InitCache from '../Cache/CacheInit';
|
||||
import { CacheStatsCookies } from '../Cache/Stats/Stats';
|
||||
import { LoadConfig } from '../Config/SaveLoadReload/SaveLoadReloadSettings';
|
||||
import { VersionMajor, VersionMinor } from '../Data/Moddata';
|
||||
import CreateUpgradeBar from '../Disp/BuildingsUpgrades/UpgradeBar';
|
||||
import UpdateColours from '../Disp/HelperFunctions/UpdateColours';
|
||||
import { CreateBotBar } from '../Disp/InfoBars/BottomBar';
|
||||
import { CreateTimerBar } from '../Disp/InfoBars/TimerBar';
|
||||
import CreateSectionHideButtons from '../Disp/Initialization/CreateSectionHideButtons';
|
||||
@@ -31,7 +29,7 @@ export default function InitializeCookieMonster() {
|
||||
InitCache();
|
||||
|
||||
// Stored to check if we need to re-initiliaze data
|
||||
LastModCount = Object.keys(Game.mods).length;
|
||||
LastModCount = Object.keys(Game.mods).length; // eslint-disable-line no-unused-vars
|
||||
|
||||
// Creating visual elements
|
||||
CreateCssArea();
|
||||
@@ -60,7 +58,7 @@ export default function InitializeCookieMonster() {
|
||||
Game.CalculateGains();
|
||||
|
||||
LoadConfig();
|
||||
CMLastAscendState = Game.OnAscend;
|
||||
CMLastAscendState = Game.OnAscend; // eslint-disable-line no-unused-vars
|
||||
|
||||
if (Game.prefs.popups)
|
||||
Game.Popup(
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import InitCache from '../Cache/CacheInit';
|
||||
import LoopCache from '../Cache/CacheLoop';
|
||||
import CacheNoGoldSwitchCPS from '../Cache/CPS/NoGoldSwitchCPS';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { CMOptions } from '../../Config/VariablesAndData';
|
||||
import { FormatTime } from '../../Disp/BeautifyAndFormatting/BeautifyFormatting';
|
||||
|
||||
@@ -47,8 +46,8 @@ function ReplaceNativeGrimoireLaunch() {
|
||||
Game.Objects['Wizard tower'].minigameLoaded
|
||||
) {
|
||||
const { minigame } = Game.Objects['Wizard tower'];
|
||||
BackupGrimoireLaunch = minigame.launch;
|
||||
BackupGrimoireLaunchMod = new Function(
|
||||
BackupGrimoireLaunch = minigame.launch; // eslint-disable-line no-unused-vars
|
||||
BackupGrimoireLaunchMod = new Function( // eslint-disable-line no-new-func
|
||||
`return ${minigame.launch
|
||||
.toString()
|
||||
.split('=this')
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint-disable no-param-reassign */
|
||||
/* eslint-disable no-unused-vars */
|
||||
/** Functions related to replacing tooltips */
|
||||
|
||||
import { CreateTooltip } from '../../Disp/Tooltips/Tooltip';
|
||||
@@ -39,7 +37,7 @@ function ReplaceTooltipBuild() {
|
||||
*/
|
||||
function ReplaceTooltipLump() {
|
||||
if (Game.canLumps()) {
|
||||
TooltipLumpBackup = l('lumps').onmouseover;
|
||||
TooltipLumpBackup = l('lumps').onmouseover; // eslint-disable-line no-unused-vars
|
||||
l('lumps').onmouseover = function () {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(
|
||||
@@ -72,6 +70,7 @@ function ReplaceTooltipGarden() {
|
||||
};
|
||||
Array.from(l('gardenPlot').children).forEach((child) => {
|
||||
const coords = child.id.slice(-3);
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
child.onmouseover = function () {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import jscolor from '@eastdesire/jscolor';
|
||||
import { CMOptions } from '../../Config/VariablesAndData';
|
||||
import {
|
||||
@@ -32,14 +31,14 @@ export default function ReplaceNative() {
|
||||
BackupFunctions.CalculateGains = Game.CalculateGains;
|
||||
Game.CalculateGains = function () {
|
||||
BackupFunctions.CalculateGains();
|
||||
SimDoSims = 1;
|
||||
CycliusDateAtBeginLoop = Date.now();
|
||||
CenturyDateAtBeginLoop = Date.now();
|
||||
SimDoSims = 1; // eslint-disable-line no-unused-vars
|
||||
CycliusDateAtBeginLoop = Date.now(); // eslint-disable-line no-unused-vars
|
||||
CenturyDateAtBeginLoop = Date.now(); // eslint-disable-line no-unused-vars
|
||||
};
|
||||
|
||||
BackupFunctions.tooltip = {};
|
||||
BackupFunctions.tooltip.draw = Game.tooltip.draw;
|
||||
BackupFunctions.tooltip.drawMod = new Function(
|
||||
BackupFunctions.tooltip.drawMod = new Function( // eslint-disable-line no-new-func
|
||||
`return ${Game.tooltip.draw.toString().split('this').join('Game.tooltip')}`,
|
||||
)();
|
||||
Game.tooltip.draw = function (from, text, origin) {
|
||||
@@ -47,7 +46,7 @@ export default function ReplaceNative() {
|
||||
};
|
||||
|
||||
BackupFunctions.tooltip.update = Game.tooltip.update;
|
||||
BackupFunctions.tooltip.updateMod = new Function(
|
||||
BackupFunctions.tooltip.updateMod = new Function( // eslint-disable-line no-new-func
|
||||
`return ${Game.tooltip.update
|
||||
.toString()
|
||||
.split('this.')
|
||||
@@ -132,6 +131,7 @@ export default function ReplaceNative() {
|
||||
};
|
||||
|
||||
BackupFunctions.sayTime = Game.sayTime;
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
CMSayTime = function (time, detail) {
|
||||
if (Number.isNaN(time) || time <= 0)
|
||||
return BackupFunctions.sayTime(time, detail);
|
||||
@@ -145,6 +145,7 @@ export default function ReplaceNative() {
|
||||
// Update tab title
|
||||
let title = 'Cookie Clicker';
|
||||
if (Game.season === 'fools') title = 'Cookie Baker';
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
Title = `${Game.OnAscend ? 'Ascending! ' : ''}${CMBeautify(Game.cookies)} ${
|
||||
Game.cookies === 1 ? 'cookie' : 'cookies'
|
||||
} - ${title}`;
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
/* eslint-disable prefer-const */
|
||||
|
||||
export let LastModCount;
|
||||
export let TooltipBuildBackup = [];
|
||||
export let TooltipBuildBackup = []; // eslint-disable-line prefer-const
|
||||
export let TooltipLumpBackup;
|
||||
export let TooltipGrimoireBackup = [];
|
||||
export let TooltipUpgradeBackup = [];
|
||||
export let TooltipGrimoireBackup = []; // eslint-disable-line prefer-const
|
||||
export let TooltipUpgradeBackup = []; // eslint-disable-line prefer-const
|
||||
export let BackupGrimoireLaunch;
|
||||
export let BackupGrimoireLaunchMod;
|
||||
export let BackupGrimoireDraw;
|
||||
export let HasReplaceNativeGrimoireLaunch;
|
||||
export let HasReplaceNativeGrimoireDraw;
|
||||
export let LoadMinigames;
|
||||
export let BackupFunctions = {};
|
||||
export let BackupFunctions = {}; // eslint-disable-line prefer-const
|
||||
|
||||
export let LastSeasonPopupState;
|
||||
export let LastTickerFortuneState;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import {
|
||||
TooltipWrinklerArea,
|
||||
TooltipWrinklerBeingShown,
|
||||
@@ -13,7 +12,7 @@ export default function AddWrinklerAreaDetect() {
|
||||
TooltipWrinklerArea = 1;
|
||||
};
|
||||
l('backgroundLeftCanvas').onmouseout = function () {
|
||||
TooltipWrinklerArea = 0;
|
||||
TooltipWrinklerArea = 0; // eslint-disable-line no-unused-vars
|
||||
Game.tooltip.hide();
|
||||
Object.keys(Game.wrinklers).forEach((i) => {
|
||||
TooltipWrinklerBeingShown[i] = 0;
|
||||
|
||||
Reference in New Issue
Block a user