[WIP - Tech Debt] Typescript config cleanup (#1073)

* initial tsconfig.json consolidation

* consolidate skipLibCheck

* more consolidate tsconfig.json

* remove strict duplicates

* remove strict duplicates

* removed lib

* more changes

* more changes

* more changes

* centralize noEmit

* run pnpm dedupe

* catalog for ethers and dotenv

* Revert "catalog for ethers and dotenv"

This reverts commit 8fc18db1c6f754ecbf1b175b34f6ebf08837068a.

* first catalog

* added more dependencies to catalog

* apply catalog to many dev dependencies

* ethers in catalog

* finetune ethers version

* fixes

* empty
This commit is contained in:
kyzooghost
2025-06-03 17:33:42 +10:00
committed by GitHub
parent 953e7a90a5
commit d27699e452
17 changed files with 638 additions and 829 deletions

View File

@@ -60,7 +60,7 @@
"@types/react": "18.3.11",
"@types/react-dom": "18.3.0",
"autoprefixer": "10.4.21",
"dotenv": "16.4.7",
"dotenv": "catalog:",
"eslint-config-next": "14.2.15",
"nock": "14.0.1",
"postcss": "8.5.3",

View File

@@ -36,14 +36,14 @@
"@safe-global/safe-core-sdk-types": "4.0.2",
"@typechain/hardhat": "9.1.0",
"@types/diff": "5.2.0",
"@types/yargs": "17.0.32",
"@types/yargs": "catalog:",
"c-kzg": "2.1.2",
"chai": "4.1.1",
"colors": "1.4.0",
"csv-parser": "3.0.0",
"dotenv": "16.4.5",
"dotenv": "catalog:",
"edit-json-file": "1.8.0",
"ethers": "6.12.0",
"ethers": "catalog:",
"hardhat": "2.24.0",
"hardhat-deploy": "0.12.4",
"hardhat-storage-layout": "0.1.7",
@@ -51,10 +51,8 @@
"node-gyp": "10.1.0",
"prettier-plugin-solidity": "1.4.2",
"solhint": "5.0.5",
"yargs": "17.7.2"
},
"dependencies": {
"solidity-coverage": "0.8.16",
"solidity-docgen": "0.6.0-beta.36"
"solidity-docgen": "0.6.0-beta.36",
"yargs": "catalog:"
}
}

View File

@@ -1,6 +1,3 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"skipLibCheck": true,
}
"extends": "../tsconfig.json"
}

View File

@@ -18,17 +18,17 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@jest/globals": "29.7.0",
"@jest/globals": "catalog:",
"@openzeppelin/upgrades-core": "1.42.1",
"@typechain/ethers-v6": "0.5.1",
"@types/jest": "29.5.13",
"@typechain/ethers-v6": "catalog:",
"@types/jest": "catalog:",
"async-mutex": "^0.5.0",
"child_process": "1.0.2",
"dotenv": "16.4.5",
"ethers": "6.13.3",
"jest": "29.7.0",
"ts-jest": "29.2.5",
"typechain": "8.3.2",
"winston": "3.17.0"
"dotenv": "catalog:",
"ethers": "catalog:",
"jest": "catalog:",
"ts-jest": "catalog:",
"typechain": "catalog:",
"winston": "catalog:"
}
}

View File

@@ -2,15 +2,8 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["node", "jest"],
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2021",
"baseUrl": "./",
"outDir": "./dist",
"moduleResolution": "node",
"isolatedModules": true,
"noFallthroughCasesInSwitch": true,
"strictPropertyInitialization": false,
},
"references": [

View File

@@ -23,16 +23,16 @@
"@oclif/plugin-help": "6.2.13",
"@oclif/plugin-plugins": "5.4.10",
"axios": "1.7.7",
"ethers": "6.13.2"
"ethers": "catalog:"
},
"devDependencies": {
"@jest/globals": "29.7.0",
"@jest/globals": "catalog:",
"@oclif/test": "4.0.9",
"@types/jest": "29.5.13",
"jest": "29.7.0",
"jest-mock-extended": "3.0.5",
"@types/jest": "catalog:",
"jest": "catalog:",
"jest-mock-extended": "catalog:",
"shx": "0.3.4",
"ts-jest": "29.2.5"
"ts-jest": "catalog:"
},
"engines": {
"node": ">=20"

View File

@@ -1,15 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"declaration": true,
"module": "ES2022",
"outDir": "dist",
"rootDir": "src",
"strict": true,
"target": "es2022",
"moduleResolution": "Node",
"skipLibCheck": true,
"esModuleInterop": true,
"rootDir": "src"
},
"include": ["./src/**/*"],
"exclude": ["node_modules", "dist"]

1278
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,4 +6,19 @@ packages:
- 'operations/**'
- 'bridge-ui/**'
- 'ts-libs/**'
- '!contracts/lib/**'
- '!contracts/lib/**'
catalog:
"@jest/globals": 29.7.0
"@typechain/ethers-v6": 0.5.1
"@types/jest": 29.5.14
"@types/yargs": 17.0.33
dotenv: 16.5.0
ethers: 6.13.7 # TODO in later ticket - investigate why SDK build seems to break with ^6.14.0
jest: 29.7.0
jest-mock-extended: 3.0.7
prettier: 3.5.3
ts-jest: 29.3.4
typechain: 8.3.2
winston: 3.17.0
yargs: 17.7.2

View File

@@ -23,25 +23,25 @@
"@consensys/linea-sdk": "workspace:*",
"better-sqlite3": "11.6.0",
"class-validator": "0.14.1",
"dotenv": "16.4.5",
"ethers": "6.13.4",
"dotenv": "catalog:",
"ethers": "catalog:",
"express": "5.1.0",
"filtrex": "3.1.0",
"pg": "8.13.1",
"prom-client": "15.1.3",
"typeorm": "0.3.20",
"typeorm-naming-strategies": "4.1.0",
"winston": "3.17.0"
"winston": "catalog:"
},
"devDependencies": {
"@jest/globals": "29.7.0",
"@jest/globals": "catalog:",
"@types/express": "5.0.1",
"@types/jest": "29.5.14",
"@types/yargs": "17.0.33",
"jest": "29.7.0",
"jest-mock-extended": "3.0.5",
"ts-jest": "29.2.5",
"yargs": "17.7.2"
"@types/jest": "catalog:",
"@types/yargs": "catalog:",
"jest": "catalog:",
"jest-mock-extended": "catalog:",
"ts-jest": "catalog:",
"yargs": "catalog:"
},
"files": [
"dist/**/*"

View File

@@ -38,7 +38,7 @@ describe("ErrorParser", () => {
const error = makeError("any reason", "NETWORK_ERROR");
expect(ErrorParser.parseEthersError(error)).toStrictEqual({
errorMessage: "any reason (code=NETWORK_ERROR, version=6.13.4)",
errorMessage: "any reason (code=NETWORK_ERROR, version=6.13.7)",
errorCode: "NETWORK_ERROR",
mitigation: {
shouldRetry: true,
@@ -50,7 +50,7 @@ describe("ErrorParser", () => {
const error = makeError("any reason", "SERVER_ERROR");
expect(ErrorParser.parseEthersError(error)).toStrictEqual({
errorMessage: "any reason (code=SERVER_ERROR, version=6.13.4)",
errorMessage: "any reason (code=SERVER_ERROR, version=6.13.7)",
errorCode: "SERVER_ERROR",
mitigation: {
shouldRetry: true,
@@ -62,7 +62,7 @@ describe("ErrorParser", () => {
const error = makeError("any reason", "TIMEOUT");
expect(ErrorParser.parseEthersError(error)).toStrictEqual({
errorMessage: "any reason (code=TIMEOUT, version=6.13.4)",
errorMessage: "any reason (code=TIMEOUT, version=6.13.7)",
errorCode: "TIMEOUT",
mitigation: {
shouldRetry: true,
@@ -74,7 +74,7 @@ describe("ErrorParser", () => {
const error = makeError("any reason", "INSUFFICIENT_FUNDS");
expect(ErrorParser.parseEthersError(error)).toStrictEqual({
errorMessage: "any reason (code=INSUFFICIENT_FUNDS, version=6.13.4)",
errorMessage: "any reason (code=INSUFFICIENT_FUNDS, version=6.13.7)",
errorCode: "INSUFFICIENT_FUNDS",
mitigation: {
shouldRetry: true,
@@ -86,7 +86,7 @@ describe("ErrorParser", () => {
const error = makeError("any reason", "REPLACEMENT_UNDERPRICED");
expect(ErrorParser.parseEthersError(error)).toStrictEqual({
errorMessage: "any reason (code=REPLACEMENT_UNDERPRICED, version=6.13.4)",
errorMessage: "any reason (code=REPLACEMENT_UNDERPRICED, version=6.13.7)",
errorCode: "REPLACEMENT_UNDERPRICED",
mitigation: {
shouldRetry: true,
@@ -98,7 +98,7 @@ describe("ErrorParser", () => {
const error = makeError("any reason", "NONCE_EXPIRED");
expect(ErrorParser.parseEthersError(error)).toStrictEqual({
errorMessage: "any reason (code=NONCE_EXPIRED, version=6.13.4)",
errorMessage: "any reason (code=NONCE_EXPIRED, version=6.13.7)",
errorCode: "NONCE_EXPIRED",
mitigation: {
shouldRetry: true,

View File

@@ -1,12 +1,10 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"lib": ["ES2021", "DOM"],
"noEmit": false,
"skipLibCheck": true,
"strictPropertyInitialization": false,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"strictPropertyInitialization": false,
"exactOptionalPropertyTypes": false
},
"references": [
{

View File

@@ -19,17 +19,17 @@
"test": "npx jest --bail --detectOpenHandles --forceExit"
},
"dependencies": {
"ethers": "6.13.4",
"ethers": "catalog:",
"lru-cache": "11.0.2"
},
"devDependencies": {
"@jest/globals": "29.7.0",
"@typechain/ethers-v6": "0.5.1",
"@types/jest": "29.5.14",
"jest": "29.7.0",
"jest-mock-extended": "3.0.5",
"ts-jest": "29.2.5",
"typechain": "8.3.2"
"@jest/globals": "catalog:",
"@typechain/ethers-v6": "catalog:",
"@types/jest": "catalog:",
"jest": "catalog:",
"jest-mock-extended": "catalog:",
"ts-jest": "catalog:",
"typechain": "catalog:"
},
"files": [
"dist"

View File

@@ -1,14 +1,13 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"lib": ["ES2021", "DOM"],
"noEmit": false,
"skipLibCheck": true,
"noErrorTruncation": true,
"strictPropertyInitialization": false,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"composite": true
"composite": true,
"removeComments": false,
"isolatedModules": false,
"strictPropertyInitialization": false,
"exactOptionalPropertyTypes": false
},
"exclude": ["./dist", "**/node_modules"]
}

View File

@@ -28,13 +28,13 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@jest/globals": "29.7.0",
"@types/jest": "29.5.14",
"@jest/globals": "catalog:",
"@types/jest": "catalog:",
"@types/unzipper": "0.10.11",
"dotenv": "16.5.0",
"jest": "29.7.0",
"dotenv": "catalog:",
"jest": "catalog:",
"jest-it-up": "4.0.1",
"ts-jest": "29.3.2",
"ts-jest": "catalog:",
"tsup": "8.4.0",
"unzipper": "0.12.3",
"viem": "2.29.1"

View File

@@ -1,17 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"esModuleInterop": true,
"exactOptionalPropertyTypes": true,
"forceConsistentCasingInFileNames": true,
"lib": ["ES2020"],
"module": "CommonJS",
"moduleResolution": "node",
"noErrorTruncation": true,
"noUncheckedIndexedAccess": true,
"strict": true,
"target": "es2020",
"composite": true
"composite": true,
"removeComments": false
},
"exclude": ["./dist", "**/node_modules"]
}

View File

@@ -2,20 +2,23 @@
"compilerOptions": {
"outDir": "./dist",
"baseUrl": ".",
"moduleResolution": "Node",
"module": "CommonJS",
"target": "ES2021",
"moduleResolution": "node",
"module": "commonjs",
"target": "es2022",
"sourceMap": true,
"strict": true,
"esModuleInterop": true,
"alwaysStrict": true,
"strictNullChecks": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"resolveJsonModule": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"removeComments": true,
"skipLibCheck": true,
"isolatedModules": true,
"noErrorTruncation": true,
"exactOptionalPropertyTypes": true,
"noEmit": false
},
"exclude": ["node_modules", "dist", "*.d.ts"]
}