chore: address TypeScript ESLint v8 upgrade feedback and improve type safety (#895)

* cr feedback

* update based on feedback

* typing updates

* unify yarn package version

* update lock
This commit is contained in:
Justin Hernandez
2025-08-14 09:19:34 -07:00
committed by GitHub
parent 07addb2a9a
commit 6b285c9bf3
32 changed files with 105 additions and 86 deletions

View File

@@ -1,6 +1,7 @@
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
require("dotenv").config({
import dotenv from "dotenv";
dotenv.config({
path: process.env.CI ? ".env.test" : ".env",
});
import "hardhat-contract-sizer";

View File

@@ -32,16 +32,16 @@
"deploy:verifiers": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/verifiers/deployVerifiers.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"deploy:verifiers:all": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/verifiers/deployAllVerifiers.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"export-prod": "bash ./scripts/prod.sh",
"find:error": "npx ts-node scripts/findErrorSelectors.ts",
"find:error": "npx tsx scripts/findErrorSelectors.ts",
"prettier:check": "prettier --list-different '**/*.{json,md,yml,sol,ts}'",
"prettier:write": "prettier --write '**/*.{json,md,yml,sol,ts}'",
"publish": "npm publish --access public",
"set:hub:v2": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-alfajores} npx ts-node scripts/setHubV2.ts'",
"set:registry": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-staging} npx ts-node scripts/setRegistry.ts'",
"set:hub:v2": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-alfajores} npx tsx scripts/setHubV2.ts'",
"set:registry": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-staging} npx tsx scripts/setRegistry.ts'",
"set:registry:hub:v2": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/scripts/updateRegistryHubV2.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"set:registry:idcard": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-staging} npx ts-node scripts/setRegistryId.ts'",
"set:verifiers:v2": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-alfajores} npx ts-node scripts/setVerifiersV2.ts'",
"show:registry": "npx ts-node scripts/showRegistryAddresses.ts",
"set:registry:idcard": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-staging} npx tsx scripts/setRegistryId.ts'",
"set:verifiers:v2": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-alfajores} npx tsx scripts/setVerifiersV2.ts'",
"show:registry": "npx tsx scripts/showRegistryAddresses.ts",
"test": "yarn hardhat test",
"test:airdrop": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/example/airdrop.test.ts'",
"test:attribute": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/unit/CircuitAttributeHandler.test.ts'",
@@ -64,7 +64,7 @@
"test:view": "yarn hardhat test test/view.ts",
"types": "tsc -noEmit",
"update:cscaroot": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/scripts/updateRegistryCscaRoot.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"update:hub": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-staging} npx ts-node scripts/setRegistry.ts'",
"update:hub": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-staging} npx tsx scripts/setRegistry.ts'",
"update:ofacroot": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-alfajores} npx tsx scripts/updateRegistryOfacRoot.ts'",
"update:pcr0": "npx dotenv-cli -- bash -c 'PCR0_ACTION=${PCR0_ACTION:-add} PCR0_KEY=${PCR0_KEY} yarn hardhat ignition deploy ignition/modules/scripts/updatePCR0.ts --network ${NETWORK:-localhost} --reset'",
"upgrade:hub": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/upgrade/deployNewHubAndUpgrade.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
@@ -117,11 +117,10 @@
"prettier": "3.5.3",
"prettier-plugin-solidity": "^2.0.0",
"solidity-coverage": "^0.8.14",
"ts-node": "^10.9.1",
"typechain": "^8.3.2",
"typescript": "^5.9.2"
},
"packageManager": "yarn@4.5.3",
"packageManager": "yarn@4.6.0",
"engines": {
"node": ">=22 <23"
}

View File

@@ -7,7 +7,6 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"types": ["node"]
"resolveJsonModule": true
}
}