diff --git a/package-lock.json b/package-lock.json index eae325c93..cbc815e4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@bosonprotocol/common": "1.32.2", "@bosonprotocol/solidoc": "3.0.3", "@eslint/eslintrc": "^3.3.5", - "@eslint/js": "^9.30.1", + "@eslint/js": "^10.0.1", "@nomicfoundation/hardhat-ethers": "3.1.3", "@nomicfoundation/hardhat-network-helpers": "1.1.2", "@nomicfoundation/hardhat-toolbox": "6.0.0", @@ -905,15 +905,24 @@ } }, "node_modules/@eslint/js": { - "version": "9.30.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.1.tgz", - "integrity": "sha512-zXhuECFlyep42KZUhWjfvsmXGX39W8K8LFb8AWXM9gSV9dQB+MrJGLKvW6Zw0Ggnbpw0VHTtrhFXYe3Gym18jg==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", "dev": true, + "license": "MIT", "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^20.19.0 || ^22.13.0 || >=24" }, "funding": { "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, "node_modules/@eslint/object-schema": { diff --git a/package.json b/package.json index d6edc1479..0ade5983a 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@bosonprotocol/common": "1.32.2", "@bosonprotocol/solidoc": "3.0.3", "@eslint/eslintrc": "^3.3.5", - "@eslint/js": "^9.30.1", + "@eslint/js": "^10.0.1", "@nomicfoundation/hardhat-ethers": "3.1.3", "@nomicfoundation/hardhat-network-helpers": "1.1.2", "@nomicfoundation/hardhat-toolbox": "6.0.0", diff --git a/scripts/util/dry-run.js b/scripts/util/dry-run.js index 2dbe67a03..b8d740958 100644 --- a/scripts/util/dry-run.js +++ b/scripts/util/dry-run.js @@ -8,13 +8,11 @@ const environments = require("../../environments"); async function setupDryRun(env) { let forkedChainId; - let forkedEnv = env; + const forkedEnv = env; console.warn("This is a dry run. No actual upgrade will be performed"); ({ chainId: forkedChainId } = await ethers.provider.getNetwork()); - forkedEnv = env; - let deployerBalance = await getBalance(); // const blockNumber = await ethers.provider.getBlockNumber(); diff --git a/scripts/util/estimate-limits.js b/scripts/util/estimate-limits.js index 3da31051c..78a7f4fd3 100644 --- a/scripts/util/estimate-limits.js +++ b/scripts/util/estimate-limits.js @@ -59,6 +59,7 @@ let protocolDiamond, groupHandler, offerHandler, twinHandler; +// eslint-disable-next-line no-unassigned-vars let bosonVoucher; let protocolFeePercentage, protocolFeeFlatBoson, buyerEscalationDepositPercentage; let handlers = {}; diff --git a/scripts/util/validations.js b/scripts/util/validations.js index 315eeb42f..b8a9e42ee 100644 --- a/scripts/util/validations.js +++ b/scripts/util/validations.js @@ -13,7 +13,7 @@ const { MaxUint256 } = ethers; * @returns {boolean} */ function bigNumberIsValid(bigNumber, { optional, gt, lte, empty } = {}) { - let valid = true; + let valid; if (optional && (bigNumber == undefined || bigNumber == null)) { valid = true; diff --git a/test/protocol/clients/BosonVoucherTest.js b/test/protocol/clients/BosonVoucherTest.js index 024d09153..37acdd579 100644 --- a/test/protocol/clients/BosonVoucherTest.js +++ b/test/protocol/clients/BosonVoucherTest.js @@ -1195,12 +1195,12 @@ describe("IBosonVoucher", function () { // Add five more ranges // This tests more getPreMintStatus than ownerOf // Might even be put into integration tests - let previousOfferId = Number(offerId); + const previousOfferId = Number(offerId); let previousStartId = Number(start); let ranges = [new Range(Number(start), length, amount, "0")]; length = Number(length); - offerId = ++previousOfferId; + offerId = previousOfferId + 1; while (offerId <= 6) { start = previousStartId + length + 100; diff --git a/test/util/utils.js b/test/util/utils.js index c73068dcd..8875aad38 100644 --- a/test/util/utils.js +++ b/test/util/utils.js @@ -49,7 +49,7 @@ function getEvent(receipt, factory, eventName) { } catch (e) { if (e.message.includes("no matching event")) continue; console.log("event error: ", e); - throw new Error(e); + throw new Error(e.message, { cause: e }); } } } @@ -61,7 +61,7 @@ function getEvent(receipt, factory, eventName) { function eventEmittedWithArgs(receipt, factory, eventName, args) { let found = false; - let match = false; + let match; const eventFragment = factory.interface.fragments.filter((e) => e.name == eventName); const iface = new Interface(eventFragment); @@ -85,7 +85,7 @@ function eventEmittedWithArgs(receipt, factory, eventName, args) { } catch (e) { if (e.message.includes("no matching event")) continue; console.log("event error: ", e); - throw new Error(e); + throw new Error(e.message, { cause: e }); } } }