Update dependencies and remove unneeded things. This allows building on node v22. Also rely on configs for eslint/prettier so CI and command line runs are guaranteed to be consistent.

This commit is contained in:
Kevin Radloff
2025-02-13 08:07:13 -05:00
committed by Daniël van Noord
parent 9e98208c19
commit a1aaa3de8f
145 changed files with 3775 additions and 5909 deletions

View File

@@ -1,8 +1,8 @@
import { before, beforeEach, describe, it } from 'mocha';
import { assert } from 'chai';
import { l, Game } from '../../GlobalsForTesting';
import { l, Game } from '../../GlobalsForTesting.js';
import ToggleBotBar from '../../../src/Config/Toggles/ToggleBotBar';
import ToggleBotBar from '../../../src/Config/Toggles/ToggleBotBar.js';
describe('ToggleBotBar', () => {
global.l = l;

View File

@@ -1,9 +1,9 @@
import { before, beforeEach, describe, it } from 'mocha';
import { assert } from 'chai';
import { Game } from '../../GlobalsForTesting';
import { Game } from '../../GlobalsForTesting.js';
import ToggleDetailedTime from '../../../src/Config/Toggles/ToggleDetailedTime';
import { BackupFunctions } from '../../../src/Main/VariablesAndData';
import ToggleDetailedTime from '../../../src/Config/Toggles/ToggleDetailedTime.js';
import { BackupFunctions } from '../../../src/Main/VariablesAndData.js';
describe('ToggleDetailedTime', () => {
global.Game = Game;

View File

@@ -1,10 +1,10 @@
import { before, beforeEach, describe, it } from 'mocha';
import { assert } from 'chai';
import { l } from '../../GlobalsForTesting';
import { l } from '../../GlobalsForTesting.js';
import ToggleGCTimer from '../../../src/Config/Toggles/ToggleGCTimer';
import { GCTimers } from '../../../src/Disp/VariablesAndData';
import { CacheGoldenShimmersByID } from '../../../src/Cache/VariablesAndData';
import ToggleGCTimer from '../../../src/Config/Toggles/ToggleGCTimer.js';
import { GCTimers } from '../../../src/Disp/VariablesAndData.js';
import { CacheGoldenShimmersByID } from '../../../src/Cache/VariablesAndData.js';
describe('ToggleGCTimer', () => {
global.l = l;

View File

@@ -1,8 +1,8 @@
import { before, beforeEach, describe, it } from 'mocha';
import { assert } from 'chai';
import { l } from '../../GlobalsForTesting';
import { l } from '../../GlobalsForTesting.js';
import ToggleSectionHideButtons from '../../../src/Config/Toggles/ToggleSectionHideButtons';
import ToggleSectionHideButtons from '../../../src/Config/Toggles/ToggleSectionHideButtons.js';
describe('ToggleSectionHideButtons', () => {
global.l = l;

View File

@@ -1,8 +1,8 @@
import { before, beforeEach, describe, it } from 'mocha';
import { assert } from 'chai';
import { l } from '../../GlobalsForTesting';
import { l } from '../../GlobalsForTesting.js';
import ToggleToolWarnPos from '../../../src/Config/Toggles/ToggleToolWarnPos';
import ToggleToolWarnPos from '../../../src/Config/Toggles/ToggleToolWarnPos.js';
describe('ToggleToolWarnPos', () => {
global.l = l;

View File

@@ -1,8 +1,8 @@
import { before, beforeEach, describe, it } from 'mocha';
import { assert } from 'chai';
import { l, Game } from '../../GlobalsForTesting';
import { l, Game } from '../../GlobalsForTesting.js';
import ToggleUpgradeBarAndColour from '../../../src/Config/Toggles/ToggleUpgradeBarAndColour';
import ToggleUpgradeBarAndColour from '../../../src/Config/Toggles/ToggleUpgradeBarAndColour.js';
describe('ToggleUpgradeBarAndColour', () => {
global.l = l;

View File

@@ -1,8 +1,8 @@
import { before, beforeEach, describe, it } from 'mocha';
import { assert } from 'chai';
import { l } from '../../GlobalsForTesting';
import { l } from '../../GlobalsForTesting.js';
import ToggleUpgradeBarFixedPos from '../../../src/Config/Toggles/ToggleUpgradeBarFixedPos';
import ToggleUpgradeBarFixedPos from '../../../src/Config/Toggles/ToggleUpgradeBarFixedPos.js';
describe('ToggleUpgradeBarFixedPos', () => {
global.l = l;

View File

@@ -1,8 +1,8 @@
import { before, beforeEach, describe, it } from 'mocha';
import { assert } from 'chai';
import { l, Game } from '../../GlobalsForTesting';
import { l, Game } from '../../GlobalsForTesting.js';
import ToggleWrinklerButtons from '../../../src/Config/Toggles/ToggleWrinklerButtons';
import ToggleWrinklerButtons from '../../../src/Config/Toggles/ToggleWrinklerButtons.js';
describe('ToggleWrinklerButtons', () => {
global.l = l;

View File

@@ -1,7 +1,7 @@
import { before, describe, it } from 'mocha';
import { assert } from 'chai';
import FormatTime from '../../src/Disp/BeautifyAndFormatting/FormatTime';
import FormatTime from '../../src/Disp/BeautifyAndFormatting/FormatTime.js';
describe('FormatTime', () => {
it('Format when time is Infinity', () => {

View File

@@ -4,7 +4,7 @@ import { expect } from 'chai';
import CalculateLuckyLevels, {
CalculateSevenDelta,
CountSevens,
} from '../../src/Disp/HelperFunctions/CalculateLuckyLevels';
} from '../../src/Disp/HelperFunctions/CalculateLuckyLevels.js';
describe('CountSevens', () => {
const examples = [
@@ -51,6 +51,7 @@ describe('CalculateLuckyLevels', () => {
{ input: 77777, luckyDigit: 77777, luckyNumber: 77777, luckyPayout: 77777 },
{ input: 799999, luckyDigit: 799999, luckyNumber: 800077, luckyPayout: 807777 },
{ input: 999999, luckyDigit: 1000007, luckyNumber: 1000077, luckyPayout: 1007777 },
/* eslint-disable no-loss-of-precision */
{
input: 123456789123456789,
luckyDigit: 123456789123456789,
@@ -63,6 +64,7 @@ describe('CalculateLuckyLevels', () => {
luckyNumber: 8888888888889770000,
luckyPayout: 8888888888977770000,
},
/* eslint-enable no-loss-of-precision */
];
examples.forEach((example) => {

View File

@@ -1,7 +1,7 @@
import { before, describe, it } from 'mocha';
import { expect } from 'chai';
import GetTimeColour from '../../src/Disp/BeautifyAndFormatting/GetTimeColour';
import GetTimeColour from '../../src/Disp/BeautifyAndFormatting/GetTimeColour.js';
describe('GetTimeColour', () => {
it('Format when time is less than 60', () => {