Merge pull request #3523 from taralx/patch-5

MISC: upgrade to eslint v8
This commit is contained in:
hydroflame 2022-04-20 13:06:32 -04:00 committed by GitHub
commit 80f037bfdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 22 deletions

@ -66,14 +66,14 @@
"@types/react-beautiful-dnd": "^13.1.2", "@types/react-beautiful-dnd": "^13.1.2",
"@types/react-dom": "^17.0.9", "@types/react-dom": "^17.0.9",
"@types/react-resizable": "^1.7.3", "@types/react-resizable": "^1.7.3",
"@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^4.22.0", "@typescript-eslint/parser": "^5.20.0",
"babel-jest": "^27.0.6", "babel-jest": "^27.0.6",
"babel-loader": "^8.0.5", "babel-loader": "^8.0.5",
"cypress": "^8.3.1", "cypress": "^8.3.1",
"electron": "^14.2.4", "electron": "^14.2.4",
"electron-packager": "^15.4.0", "electron-packager": "^15.4.0",
"eslint": "^7.24.0", "eslint": "^8.13.0",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^6.3.3", "fork-ts-checker-webpack-plugin": "^6.3.3",
"html-webpack-plugin": "^3.2.0", "html-webpack-plugin": "^3.2.0",
@ -94,7 +94,7 @@
"webpack-dev-server": "^3.11.2" "webpack-dev-server": "^3.11.2"
}, },
"engines": { "engines": {
"node": ">=8 || <=9" "node": ">=14"
}, },
"homepage": "https://github.com/danielyxie/bitburner", "homepage": "https://github.com/danielyxie/bitburner",
"repository": { "repository": {

@ -30,17 +30,17 @@ describe("Numeral formatting for positive numbers", () => {
expect(numeralWrapper.formatReallyBigNumber(987654321)).toEqual("987.654m"); expect(numeralWrapper.formatReallyBigNumber(987654321)).toEqual("987.654m");
expect(numeralWrapper.formatReallyBigNumber(987654321987)).toEqual("987.654b"); expect(numeralWrapper.formatReallyBigNumber(987654321987)).toEqual("987.654b");
expect(numeralWrapper.formatReallyBigNumber(987654321987654)).toEqual("987.654t"); expect(numeralWrapper.formatReallyBigNumber(987654321987654)).toEqual("987.654t");
expect(numeralWrapper.formatReallyBigNumber(987654321987654321)).toEqual("987.654q"); expect(numeralWrapper.formatReallyBigNumber(987654321987654e3)).toEqual("987.654q");
expect(numeralWrapper.formatReallyBigNumber(987654321987654321987)).toEqual("987.654Q"); expect(numeralWrapper.formatReallyBigNumber(987654321987654e6)).toEqual("987.654Q");
expect(numeralWrapper.formatReallyBigNumber(987654321987654321987654)).toEqual("987.654s"); expect(numeralWrapper.formatReallyBigNumber(987654321987654e9)).toEqual("987.654s");
expect(numeralWrapper.formatReallyBigNumber(987654321987654321987654321)).toEqual("987.654S"); expect(numeralWrapper.formatReallyBigNumber(987654321987654e12)).toEqual("987.654S");
expect(numeralWrapper.formatReallyBigNumber(987654321987654321987654321987)).toEqual("987.654o"); expect(numeralWrapper.formatReallyBigNumber(987654321987654e15)).toEqual("987.654o");
expect(numeralWrapper.formatReallyBigNumber(987654321987654321987654321987654)).toEqual("987.654n"); expect(numeralWrapper.formatReallyBigNumber(987654321987654e18)).toEqual("987.654n");
}); });
test("should format even bigger really big numbers in scientific format", () => { test("should format even bigger really big numbers in scientific format", () => {
expect(numeralWrapper.formatReallyBigNumber(987654321987654321987654321987654321)).toEqual("9.877e+35"); expect(numeralWrapper.formatReallyBigNumber(987654321987654e21)).toEqual("9.877e+35");
expect(numeralWrapper.formatReallyBigNumber(9876543219876543219876543219876543219)).toEqual("9.877e+36"); expect(numeralWrapper.formatReallyBigNumber(987654321987654e22)).toEqual("9.877e+36");
expect(numeralWrapper.formatReallyBigNumber(98765432198765432198765432198765432198)).toEqual("9.877e+37"); expect(numeralWrapper.formatReallyBigNumber(987654321987654e23)).toEqual("9.877e+37");
}); });
test("should format percentage", () => { test("should format percentage", () => {
expect(numeralWrapper.formatPercentage(1234.56789)).toEqual("123456.79%"); expect(numeralWrapper.formatPercentage(1234.56789)).toEqual("123456.79%");
@ -74,17 +74,17 @@ describe("Numeral formatting for negative numbers", () => {
expect(numeralWrapper.formatReallyBigNumber(-987654321)).toEqual("-987.654m"); expect(numeralWrapper.formatReallyBigNumber(-987654321)).toEqual("-987.654m");
expect(numeralWrapper.formatReallyBigNumber(-987654321987)).toEqual("-987.654b"); expect(numeralWrapper.formatReallyBigNumber(-987654321987)).toEqual("-987.654b");
expect(numeralWrapper.formatReallyBigNumber(-987654321987654)).toEqual("-987.654t"); expect(numeralWrapper.formatReallyBigNumber(-987654321987654)).toEqual("-987.654t");
expect(numeralWrapper.formatReallyBigNumber(-987654321987654321)).toEqual("-987.654q"); expect(numeralWrapper.formatReallyBigNumber(-987654321987654e3)).toEqual("-987.654q");
expect(numeralWrapper.formatReallyBigNumber(-987654321987654321987)).toEqual("-987.654Q"); expect(numeralWrapper.formatReallyBigNumber(-987654321987654e6)).toEqual("-987.654Q");
expect(numeralWrapper.formatReallyBigNumber(-987654321987654321987654)).toEqual("-987.654s"); expect(numeralWrapper.formatReallyBigNumber(-987654321987654e9)).toEqual("-987.654s");
expect(numeralWrapper.formatReallyBigNumber(-987654321987654321987654321)).toEqual("-987.654S"); expect(numeralWrapper.formatReallyBigNumber(-987654321987654e12)).toEqual("-987.654S");
expect(numeralWrapper.formatReallyBigNumber(-987654321987654321987654321987)).toEqual("-987.654o"); expect(numeralWrapper.formatReallyBigNumber(-987654321987654e15)).toEqual("-987.654o");
expect(numeralWrapper.formatReallyBigNumber(-987654321987654321987654321987654)).toEqual("-987.654n"); expect(numeralWrapper.formatReallyBigNumber(-987654321987654e18)).toEqual("-987.654n");
}); });
test("should format even bigger really big numbers in scientific format", () => { test("should format even bigger really big numbers in scientific format", () => {
expect(numeralWrapper.formatReallyBigNumber(-987654321987654321987654321987654321)).toEqual("-9.877e+35"); expect(numeralWrapper.formatReallyBigNumber(-987654321987654e21)).toEqual("-9.877e+35");
expect(numeralWrapper.formatReallyBigNumber(-9876543219876543219876543219876543219)).toEqual("-9.877e+36"); expect(numeralWrapper.formatReallyBigNumber(-987654321987654e22)).toEqual("-9.877e+36");
expect(numeralWrapper.formatReallyBigNumber(-98765432198765432198765432198765432198)).toEqual("-9.877e+37"); expect(numeralWrapper.formatReallyBigNumber(-987654321987654e23)).toEqual("-9.877e+37");
}); });
test("should format percentage", () => { test("should format percentage", () => {
expect(numeralWrapper.formatPercentage(-1234.56789)).toEqual("-123456.79%"); expect(numeralWrapper.formatPercentage(-1234.56789)).toEqual("-123456.79%");