From 9a329710509e66d66566c6ce429eae5ce441846f Mon Sep 17 00:00:00 2001 From: Yorke Rhodes Date: Tue, 16 Apr 2024 11:56:56 -0400 Subject: [PATCH] Remove accidental .only and update lint rules (#3614) ### Description Removal accidental .only ### Drive-by Update lint rules --- .eslintrc | 9 +- package.json | 3 +- solidity/.solhint.json | 4 +- solidity/package.json | 2 +- typescript/helloworld/package.json | 2 +- typescript/sdk/src/ism/read.test.ts | 2 +- yarn.lock | 260 ++++++++++++++++++++++++++-- 7 files changed, 263 insertions(+), 19 deletions(-) diff --git a/.eslintrc b/.eslintrc index 0855bdf61..0fffcede5 100644 --- a/.eslintrc +++ b/.eslintrc @@ -11,7 +11,7 @@ "sourceType": "module", "project": "./tsconfig.json" }, - "plugins": ["@typescript-eslint"], + "plugins": ["@typescript-eslint","jest"], "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", @@ -47,6 +47,11 @@ }, "extendDefaults": true } - ] + ], + "jest/no-disabled-tests": "warn", + "jest/no-focused-tests": "error", + "jest/no-identical-title": "error", + "jest/prefer-to-have-length": "warn", + "jest/valid-expect": "error" } } \ No newline at end of file diff --git a/package.json b/package.json index 5d838c09e..344b1f87d 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,9 @@ "@trivago/prettier-plugin-sort-imports": "^4.2.1", "@typescript-eslint/eslint-plugin": "^7.4.0", "@typescript-eslint/parser": "^7.4.0", - "eslint": "^8.57.0", + "eslint": "^9.0.0", "eslint-config-prettier": "^9.1.0", + "eslint-plugin-jest": "^28.2.0", "husky": "^8.0.0", "lint-staged": "^12.4.3", "prettier": "^2.8.8", diff --git a/solidity/.solhint.json b/solidity/.solhint.json index 2cb9a69a6..a4cc08a3b 100644 --- a/solidity/.solhint.json +++ b/solidity/.solhint.json @@ -10,7 +10,9 @@ "var-name-mixedcase": "off", "func-name-mixedcase": "off", "reason-string": ["warn",{"maxLength":64}], - "prettier/prettier": "error" + "prettier/prettier": "error", + "custom-errors": "off", + "gas-custom-errors": "off" }, "plugins": ["prettier"] } diff --git a/solidity/package.json b/solidity/package.json index 5cf9a3985..976c6c625 100644 --- a/solidity/package.json +++ b/solidity/package.json @@ -22,7 +22,7 @@ "hardhat-gas-reporter": "^1.0.9", "prettier": "^2.8.8", "prettier-plugin-solidity": "^1.1.3", - "solhint": "^4.0.0", + "solhint": "^4.5.4", "solhint-plugin-prettier": "^0.0.5", "solidity-coverage": "^0.8.3", "ts-generator": "^0.1.1", diff --git a/typescript/helloworld/package.json b/typescript/helloworld/package.json index 67f563c9f..1805b5f33 100644 --- a/typescript/helloworld/package.json +++ b/typescript/helloworld/package.json @@ -24,7 +24,7 @@ "hardhat-gas-reporter": "^1.0.9", "prettier": "^2.8.8", "prettier-plugin-solidity": "^1.1.3", - "solhint": "^4.0.0", + "solhint": "^4.5.4", "solhint-plugin-prettier": "^0.0.5", "solidity-coverage": "^0.8.3", "ts-node": "^10.8.0", diff --git a/typescript/sdk/src/ism/read.test.ts b/typescript/sdk/src/ism/read.test.ts index 7bb15b174..3790d3137 100644 --- a/typescript/sdk/src/ism/read.test.ts +++ b/typescript/sdk/src/ism/read.test.ts @@ -30,7 +30,7 @@ import { TestIsmConfig, } from './types.js'; -describe.only('EvmIsmReader', () => { +describe('EvmIsmReader', () => { let evmIsmReader: EvmIsmReader; let multiProvider: MultiProvider; let sandbox: sinon.SinonSandbox; diff --git a/yarn.lock b/yarn.lock index b32d882f7..27c1bad3a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3786,6 +3786,23 @@ __metadata: languageName: node linkType: hard +"@eslint/eslintrc@npm:^3.0.2": + version: 3.0.2 + resolution: "@eslint/eslintrc@npm:3.0.2" + dependencies: + ajv: "npm:^6.12.4" + debug: "npm:^4.3.2" + espree: "npm:^10.0.1" + globals: "npm:^14.0.0" + ignore: "npm:^5.2.0" + import-fresh: "npm:^3.2.1" + js-yaml: "npm:^4.1.0" + minimatch: "npm:^3.1.2" + strip-json-comments: "npm:^3.1.1" + checksum: 04e3d7de2b16fd59ba8985ecd6922eb488e630f94e4433858567a8a6c99b478bb7b47854b166b830b44905759547d0a03654eb1265952c812d5d1d70e3e4ccf9 + languageName: node + linkType: hard + "@eslint/js@npm:8.57.0": version: 8.57.0 resolution: "@eslint/js@npm:8.57.0" @@ -3793,6 +3810,13 @@ __metadata: languageName: node linkType: hard +"@eslint/js@npm:9.0.0": + version: 9.0.0 + resolution: "@eslint/js@npm:9.0.0" + checksum: b14b20af72410ef53e3e77e7d83cc1d6e6554b0092ceb9f969d25d765f4d775b4be32b0cd99bbfd6ce72eb2e4fb6b39b42a159b31909fbe1b3a5e88d75211687 + languageName: node + linkType: hard + "@eth-optimism/contracts-bedrock@npm:0.16.2": version: 0.16.2 resolution: "@eth-optimism/contracts-bedrock@npm:0.16.2" @@ -4874,6 +4898,17 @@ __metadata: languageName: node linkType: hard +"@humanwhocodes/config-array@npm:^0.12.3": + version: 0.12.3 + resolution: "@humanwhocodes/config-array@npm:0.12.3" + dependencies: + "@humanwhocodes/object-schema": "npm:^2.0.3" + debug: "npm:^4.3.1" + minimatch: "npm:^3.0.5" + checksum: b05f528c110aa1657d95d213e4ad2662f4161e838806af01a4d3f3b6ee3878d9b6f87d1b10704917f5c2f116757cb5c818480c32c4c4c6f84fe775a170b5f758 + languageName: node + linkType: hard + "@humanwhocodes/module-importer@npm:^1.0.1": version: 1.0.1 resolution: "@humanwhocodes/module-importer@npm:1.0.1" @@ -4888,6 +4923,13 @@ __metadata: languageName: node linkType: hard +"@humanwhocodes/object-schema@npm:^2.0.3": + version: 2.0.3 + resolution: "@humanwhocodes/object-schema@npm:2.0.3" + checksum: 05bb99ed06c16408a45a833f03a732f59bf6184795d4efadd33238ff8699190a8c871ad1121241bb6501589a9598dc83bf25b99dcbcf41e155cdf36e35e937a3 + languageName: node + linkType: hard + "@hyperlane-xyz/ccip-server@workspace:typescript/ccip-server": version: 0.0.0-use.local resolution: "@hyperlane-xyz/ccip-server@workspace:typescript/ccip-server" @@ -4961,7 +5003,7 @@ __metadata: hardhat-gas-reporter: "npm:^1.0.9" prettier: "npm:^2.8.8" prettier-plugin-solidity: "npm:^1.1.3" - solhint: "npm:^4.0.0" + solhint: "npm:^4.5.4" solhint-plugin-prettier: "npm:^0.0.5" solidity-coverage: "npm:^0.8.3" ts-generator: "npm:^0.1.1" @@ -5014,7 +5056,7 @@ __metadata: hardhat-gas-reporter: "npm:^1.0.9" prettier: "npm:^2.8.8" prettier-plugin-solidity: "npm:^1.1.3" - solhint: "npm:^4.0.0" + solhint: "npm:^4.5.4" solhint-plugin-prettier: "npm:^0.0.5" solidity-coverage: "npm:^0.8.3" ts-node: "npm:^10.8.0" @@ -5085,8 +5127,9 @@ __metadata: "@trivago/prettier-plugin-sort-imports": "npm:^4.2.1" "@typescript-eslint/eslint-plugin": "npm:^7.4.0" "@typescript-eslint/parser": "npm:^7.4.0" - eslint: "npm:^8.57.0" + eslint: "npm:^9.0.0" eslint-config-prettier: "npm:^9.1.0" + eslint-plugin-jest: "npm:^28.2.0" husky: "npm:^8.0.0" lint-staged: "npm:^12.4.3" prettier: "npm:^2.8.8" @@ -7600,7 +7643,7 @@ __metadata: languageName: node linkType: hard -"@solidity-parser/parser@npm:^0.16.0, @solidity-parser/parser@npm:^0.16.2": +"@solidity-parser/parser@npm:^0.16.2": version: 0.16.2 resolution: "@solidity-parser/parser@npm:0.16.2" dependencies: @@ -7609,6 +7652,13 @@ __metadata: languageName: node linkType: hard +"@solidity-parser/parser@npm:^0.18.0": + version: 0.18.0 + resolution: "@solidity-parser/parser@npm:0.18.0" + checksum: 3b600b584f49bd84d6d27aeeb453c49c279df49324e104bda00d12cd3b26f18cb6230ff63db6a0ba1f383868620d318b15b7417a92aa8c580099449adaa13d76 + languageName: node + linkType: hard + "@stablelib/aead@npm:^1.0.1": version: 1.0.1 resolution: "@stablelib/aead@npm:1.0.1" @@ -8628,6 +8678,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:6.21.0": + version: 6.21.0 + resolution: "@typescript-eslint/scope-manager@npm:6.21.0" + dependencies: + "@typescript-eslint/types": "npm:6.21.0" + "@typescript-eslint/visitor-keys": "npm:6.21.0" + checksum: fe91ac52ca8e09356a71dc1a2f2c326480f3cccfec6b2b6d9154c1a90651ab8ea270b07c67df5678956c3bbf0bbe7113ab68f68f21b20912ea528b1214197395 + languageName: node + linkType: hard + "@typescript-eslint/scope-manager@npm:7.4.0": version: 7.4.0 resolution: "@typescript-eslint/scope-manager@npm:7.4.0" @@ -8655,6 +8715,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:6.21.0": + version: 6.21.0 + resolution: "@typescript-eslint/types@npm:6.21.0" + checksum: e26da86d6f36ca5b6ef6322619f8ec55aabcd7d43c840c977ae13ae2c964c3091fc92eb33730d8be08927c9de38466c5323e78bfb270a9ff1d3611fe821046c5 + languageName: node + linkType: hard + "@typescript-eslint/types@npm:7.4.0": version: 7.4.0 resolution: "@typescript-eslint/types@npm:7.4.0" @@ -8662,6 +8729,25 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:6.21.0": + version: 6.21.0 + resolution: "@typescript-eslint/typescript-estree@npm:6.21.0" + dependencies: + "@typescript-eslint/types": "npm:6.21.0" + "@typescript-eslint/visitor-keys": "npm:6.21.0" + debug: "npm:^4.3.4" + globby: "npm:^11.1.0" + is-glob: "npm:^4.0.3" + minimatch: "npm:9.0.3" + semver: "npm:^7.5.4" + ts-api-utils: "npm:^1.0.1" + peerDependenciesMeta: + typescript: + optional: true + checksum: b32fa35fca2a229e0f5f06793e5359ff9269f63e9705e858df95d55ca2cd7fdb5b3e75b284095a992c48c5fc46a1431a1a4b6747ede2dd08929dc1cbacc589b8 + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:7.4.0": version: 7.4.0 resolution: "@typescript-eslint/typescript-estree@npm:7.4.0" @@ -8698,6 +8784,33 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/utils@npm:^6.0.0": + version: 6.21.0 + resolution: "@typescript-eslint/utils@npm:6.21.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.4.0" + "@types/json-schema": "npm:^7.0.12" + "@types/semver": "npm:^7.5.0" + "@typescript-eslint/scope-manager": "npm:6.21.0" + "@typescript-eslint/types": "npm:6.21.0" + "@typescript-eslint/typescript-estree": "npm:6.21.0" + semver: "npm:^7.5.4" + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + checksum: b404a2c55a425a79d054346ae123087d30c7ecf7ed7abcf680c47bf70c1de4fabadc63434f3f460b2fa63df76bc9e4a0b9fa2383bb8a9fcd62733fb5c4e4f3e3 + languageName: node + linkType: hard + +"@typescript-eslint/visitor-keys@npm:6.21.0": + version: 6.21.0 + resolution: "@typescript-eslint/visitor-keys@npm:6.21.0" + dependencies: + "@typescript-eslint/types": "npm:6.21.0" + eslint-visitor-keys: "npm:^3.4.1" + checksum: 30422cdc1e2ffad203df40351a031254b272f9c6f2b7e02e9bfa39e3fc2c7b1c6130333b0057412968deda17a3a68a578a78929a8139c6acef44d9d841dc72e1 + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:7.4.0": version: 7.4.0 resolution: "@typescript-eslint/visitor-keys@npm:7.4.0" @@ -9659,7 +9772,7 @@ __metadata: languageName: node linkType: hard -"antlr4@npm:^4.11.0": +"antlr4@npm:^4.13.1-patch-1": version: 4.13.1 resolution: "antlr4@npm:4.13.1" checksum: b17ee045cf30c7cec563f3ce81dc8bffd2c17b546646cd76e7b5f4cc4b676a1960c1a8a9aea53769947b0c6de70ed2aea73431e76c3840ab3b69cf3de5f1fc89 @@ -12725,6 +12838,24 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-jest@npm:^28.2.0": + version: 28.2.0 + resolution: "eslint-plugin-jest@npm:28.2.0" + dependencies: + "@typescript-eslint/utils": "npm:^6.0.0" + peerDependencies: + "@typescript-eslint/eslint-plugin": ^6.0.0 || ^7.0.0 + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 + jest: "*" + peerDependenciesMeta: + "@typescript-eslint/eslint-plugin": + optional: true + jest: + optional: true + checksum: 029a3d140a561d941580cbfee15ccacf4584971975f61111f07b87f01bf64c9739607cbe8e6fd3888429179ea8fd733e655ccd87b3b83b3b5cee2187e2355a4e + languageName: node + linkType: hard + "eslint-scope@npm:^7.2.2": version: 7.2.2 resolution: "eslint-scope@npm:7.2.2" @@ -12735,6 +12866,16 @@ __metadata: languageName: node linkType: hard +"eslint-scope@npm:^8.0.1": + version: 8.0.1 + resolution: "eslint-scope@npm:8.0.1" + dependencies: + esrecurse: "npm:^4.3.0" + estraverse: "npm:^5.2.0" + checksum: 458513863d3c79005b599f40250437bddba923f18549058ea45820a8d3d4bbc67fe292751d522a0cab69dd01fe211ffde5c1a5fc867e86f2d28727b1d61610da + languageName: node + linkType: hard + "eslint-visitor-keys@npm:^3.3.0": version: 3.3.0 resolution: "eslint-visitor-keys@npm:3.3.0" @@ -12756,6 +12897,13 @@ __metadata: languageName: node linkType: hard +"eslint-visitor-keys@npm:^4.0.0": + version: 4.0.0 + resolution: "eslint-visitor-keys@npm:4.0.0" + checksum: c7617166e6291a15ce2982b5c4b9cdfb6409f5c14562712d12e2584480cdf18609694b21d7dad35b02df0fa2cd037505048ded54d2f405c64f600949564eb334 + languageName: node + linkType: hard + "eslint@npm:^8.57.0": version: 8.57.0 resolution: "eslint@npm:8.57.0" @@ -12804,6 +12952,61 @@ __metadata: languageName: node linkType: hard +"eslint@npm:^9.0.0": + version: 9.0.0 + resolution: "eslint@npm:9.0.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.2.0" + "@eslint-community/regexpp": "npm:^4.6.1" + "@eslint/eslintrc": "npm:^3.0.2" + "@eslint/js": "npm:9.0.0" + "@humanwhocodes/config-array": "npm:^0.12.3" + "@humanwhocodes/module-importer": "npm:^1.0.1" + "@nodelib/fs.walk": "npm:^1.2.8" + ajv: "npm:^6.12.4" + chalk: "npm:^4.0.0" + cross-spawn: "npm:^7.0.2" + debug: "npm:^4.3.2" + escape-string-regexp: "npm:^4.0.0" + eslint-scope: "npm:^8.0.1" + eslint-visitor-keys: "npm:^4.0.0" + espree: "npm:^10.0.1" + esquery: "npm:^1.4.2" + esutils: "npm:^2.0.2" + fast-deep-equal: "npm:^3.1.3" + file-entry-cache: "npm:^8.0.0" + find-up: "npm:^5.0.0" + glob-parent: "npm:^6.0.2" + graphemer: "npm:^1.4.0" + ignore: "npm:^5.2.0" + imurmurhash: "npm:^0.1.4" + is-glob: "npm:^4.0.0" + is-path-inside: "npm:^3.0.3" + json-stable-stringify-without-jsonify: "npm:^1.0.1" + levn: "npm:^0.4.1" + lodash.merge: "npm:^4.6.2" + minimatch: "npm:^3.1.2" + natural-compare: "npm:^1.4.0" + optionator: "npm:^0.9.3" + strip-ansi: "npm:^6.0.1" + text-table: "npm:^0.2.0" + bin: + eslint: bin/eslint.js + checksum: 5cf03e14eb114f95bc4e553c8ae2da65ec09d519779beb08e326d98518bce647ce9c8bf3467bcea4cab35a2657cc3a8e945717e784afa4b1bdb9d1ecd9173ba0 + languageName: node + linkType: hard + +"espree@npm:^10.0.1": + version: 10.0.1 + resolution: "espree@npm:10.0.1" + dependencies: + acorn: "npm:^8.11.3" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^4.0.0" + checksum: 557d6cfb4894b1489effcaed8702682086033f8a2449568933bc59493734733d750f2a87907ba575844d3933340aea2d84288f5e67020c6152f6fd18a86497b2 + languageName: node + linkType: hard + "espree@npm:^9.6.0, espree@npm:^9.6.1": version: 9.6.1 resolution: "espree@npm:9.6.1" @@ -13557,6 +13760,15 @@ __metadata: languageName: node linkType: hard +"file-entry-cache@npm:^8.0.0": + version: 8.0.0 + resolution: "file-entry-cache@npm:8.0.0" + dependencies: + flat-cache: "npm:^4.0.0" + checksum: afe55c4de4e0d226a23c1eae62a7219aafb390859122608a89fa4df6addf55c7fd3f1a2da6f5b41e7cdff496e4cf28bbd215d53eab5c817afa96d2b40c81bfb0 + languageName: node + linkType: hard + "file-uri-to-path@npm:1.0.0": version: 1.0.0 resolution: "file-uri-to-path@npm:1.0.0" @@ -13662,6 +13874,16 @@ __metadata: languageName: node linkType: hard +"flat-cache@npm:^4.0.0": + version: 4.0.1 + resolution: "flat-cache@npm:4.0.1" + dependencies: + flatted: "npm:^3.2.9" + keyv: "npm:^4.5.4" + checksum: 58ce851d9045fffc7871ce2bd718bc485ad7e777bf748c054904b87c351ff1080c2c11da00788d78738bfb51b71e4d5ea12d13b98eb36e3358851ffe495b62dc + languageName: node + linkType: hard + "flat@npm:^5.0.2": version: 5.0.2 resolution: "flat@npm:5.0.2" @@ -13678,6 +13900,13 @@ __metadata: languageName: node linkType: hard +"flatted@npm:^3.2.9": + version: 3.3.1 + resolution: "flatted@npm:3.3.1" + checksum: 7b8376061d5be6e0d3658bbab8bde587647f68797cf6bfeae9dea0e5137d9f27547ab92aaff3512dd9d1299086a6d61be98e9d48a56d17531b634f77faadbc49 + languageName: node + linkType: hard + "fmix@npm:^0.1.0": version: 0.1.0 resolution: "fmix@npm:0.1.0" @@ -14413,6 +14642,13 @@ __metadata: languageName: node linkType: hard +"globals@npm:^14.0.0": + version: 14.0.0 + resolution: "globals@npm:14.0.0" + checksum: 03939c8af95c6df5014b137cac83aa909090c3a3985caef06ee9a5a669790877af8698ab38007e4c0186873adc14c0b13764acc754b16a754c216cc56aa5f021 + languageName: node + linkType: hard + "globalthis@npm:^1.0.1, globalthis@npm:^1.0.3": version: 1.0.3 resolution: "globalthis@npm:1.0.3" @@ -16787,7 +17023,7 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.5.3": +"keyv@npm:^4.5.3, keyv@npm:^4.5.4": version: 4.5.4 resolution: "keyv@npm:4.5.4" dependencies: @@ -21374,13 +21610,13 @@ __metadata: languageName: node linkType: hard -"solhint@npm:^4.0.0": - version: 4.0.0 - resolution: "solhint@npm:4.0.0" +"solhint@npm:^4.5.4": + version: 4.5.4 + resolution: "solhint@npm:4.5.4" dependencies: - "@solidity-parser/parser": "npm:^0.16.0" + "@solidity-parser/parser": "npm:^0.18.0" ajv: "npm:^6.12.6" - antlr4: "npm:^4.11.0" + antlr4: "npm:^4.13.1-patch-1" ast-parents: "npm:^0.0.1" chalk: "npm:^4.1.2" commander: "npm:^10.0.0" @@ -21402,7 +21638,7 @@ __metadata: optional: true bin: solhint: solhint.js - checksum: 41e01c292ea16d9b1303d689c6381426aa845697911edd915ccf4019b58fae499af4ee7c47aa2c83601535f3824a1d27220735aa8e35816e03768518ccb18fb6 + checksum: 0d839f4c81b83ec2fa9db5003971623b4ca6895348d55874bd9189c4af06c8c5328789410a2859496b7cbdee0ed0321694d63d83f5c94955f4d00bc15e317e41 languageName: node linkType: hard