Skip to content

Commit d41d016

Browse files
committed
Update ESLint config to v5
The ESLint config has been updated to v5, and ESLint related packages have been updated. Two rule changes/additions affected this repo: `jest/no-restricted-matchers` and `jest/no-conditional-expect'. Both have been disabled for now. They've been added to the list of rules to consider re-enabling later.
1 parent 0d03fa4 commit d41d016

File tree

3 files changed

+80
-94
lines changed

3 files changed

+80
-94
lines changed

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ module.exports = {
8282
'node/no-extraneous-require': 'off',
8383

8484
'jest/expect-expect': 'off',
85+
'jest/no-conditional-expect': 'off',
86+
'jest/no-restricted-matchers': 'off',
8587
'jest/no-test-return-statement': 'off',
8688
'jest/no-truthy-falsy': 'off',
8789
'jest/no-try-expect': 'off',

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@
6060
"web3-provider-engine": "^16.0.1"
6161
},
6262
"devDependencies": {
63-
"@metamask/eslint-config": "^4.1.0",
63+
"@metamask/eslint-config": "^5.0.0",
6464
"@types/jest": "^22.2.3",
6565
"@types/node": "^10.1.4",
6666
"@types/sinon": "^9.0.10",
6767
"@types/web3": "^1.0.6",
68-
"@typescript-eslint/eslint-plugin": "^4.1.0",
69-
"@typescript-eslint/parser": "^4.1.0",
70-
"eslint": "^7.19.0",
71-
"eslint-plugin-import": "^2.20.1",
72-
"eslint-plugin-jest": "^23.6.0",
68+
"@typescript-eslint/eslint-plugin": "^4.15.2",
69+
"@typescript-eslint/parser": "^4.15.2",
70+
"eslint": "^7.20.0",
71+
"eslint-plugin-import": "^2.22.1",
72+
"eslint-plugin-jest": "^24.1.5",
7373
"eslint-plugin-node": "^11.1.0",
7474
"ethjs-provider-http": "^0.1.6",
7575
"jest": "^26.4.2",

yarn.lock

Lines changed: 72 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
# yarn lockfile v1
33

44

5+
6+
version "7.12.11"
7+
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f"
8+
integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==
9+
dependencies:
10+
"@babel/highlight" "^7.10.4"
11+
512
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5":
613
version "7.5.5"
714
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d"
@@ -646,10 +653,10 @@
646653
resolved "https://registry.yarnpkg.com/@metamask/contract-metadata/-/contract-metadata-1.23.0.tgz#c70be7f3eaeeb791651ce793b7cdc230e9780b18"
647654
integrity sha512-oTUqL9dtXtbng60DZMRsBmZ5HiOUUfEsZjuswOJ0yHO24YsW0ktCcgCJVYPv1HcOsF0SVrRtG4rtrvOl4nY+HA==
648655

649-
"@metamask/eslint-config@^4.1.0":
650-
version "4.1.0"
651-
resolved "https://registry.yarnpkg.com/@metamask/eslint-config/-/eslint-config-4.1.0.tgz#ace2357af2d9c7d04da40a337fc7f4a81a048921"
652-
integrity sha512-oc4ONdFB1h2yxBebVj4ACYzGzArB8ZQKiFVNCDlYiTCyeQ/GR4+EUwg0KvlO33LlXCRbAhO3CX0nChbvIB8hEw==
656+
"@metamask/eslint-config@^5.0.0":
657+
version "5.0.0"
658+
resolved "https://registry.yarnpkg.com/@metamask/eslint-config/-/eslint-config-5.0.0.tgz#70c1ca854ce9b3b1cabd89cb736e8bb36127d164"
659+
integrity sha512-eZt17NofPMmtoNjmBGOhUdAmyL0C+2/smtqAkVhpzZsU2ZGv+4Kekn8p8gcNONOYN8EotpWUxGkN1CTdVLdWZw==
653660

654661
"@metamask/safe-event-emitter@^2.0.0":
655662
version "2.0.0"
@@ -892,97 +899,74 @@
892899
dependencies:
893900
"@types/yargs-parser" "*"
894901

895-
"@typescript-eslint/eslint-plugin@^4.1.0":
896-
version "4.8.0"
897-
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.0.tgz#ad12cba28e426b24295291ad4c43b1cdc8b9dbb1"
898-
integrity sha512-nm80Yy5D7Ot00bomzBYodnGmGhNdePHS3iaxJ3Th0wxRWEI/6KCgbmL8PR78fF7MtT1VDcYNtY5y+YYyGlRhBg==
902+
"@typescript-eslint/eslint-plugin@^4.15.2":
903+
version "4.15.2"
904+
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.15.2.tgz#981b26b4076c62a5a55873fbef3fe98f83360c61"
905+
integrity sha512-uiQQeu9tWl3f1+oK0yoAv9lt/KXO24iafxgQTkIYO/kitruILGx3uH+QtIAHqxFV+yIsdnJH+alel9KuE3J15Q==
899906
dependencies:
900-
"@typescript-eslint/experimental-utils" "4.8.0"
901-
"@typescript-eslint/scope-manager" "4.8.0"
907+
"@typescript-eslint/experimental-utils" "4.15.2"
908+
"@typescript-eslint/scope-manager" "4.15.2"
902909
debug "^4.1.1"
903910
functional-red-black-tree "^1.0.1"
911+
lodash "^4.17.15"
904912
regexpp "^3.0.0"
905913
semver "^7.3.2"
906914
tsutils "^3.17.1"
907915

908-
"@typescript-eslint/[email protected]":
909-
version "4.8.0"
910-
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.0.tgz#ff035f917aec0698c156a6039166ecf9d7a24f57"
911-
integrity sha512-1yOvI++HMdA9lpaAkXXQlVUwJjruNz7Z9K3lgpcU+JU/Szvsv42H6G6DECalAuz2Dd0KFU/MeUrPC0jXnuAvlA==
912-
dependencies:
913-
"@types/json-schema" "^7.0.3"
914-
"@typescript-eslint/scope-manager" "4.8.0"
915-
"@typescript-eslint/types" "4.8.0"
916-
"@typescript-eslint/typescript-estree" "4.8.0"
917-
eslint-scope "^5.0.0"
918-
eslint-utils "^2.0.0"
919-
920-
"@typescript-eslint/experimental-utils@^2.5.0":
921-
version "2.34.0"
922-
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz#d3524b644cdb40eebceca67f8cf3e4cc9c8f980f"
923-
integrity sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==
916+
"@typescript-eslint/[email protected]", "@typescript-eslint/experimental-utils@^4.0.1":
917+
version "4.15.2"
918+
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.2.tgz#5efd12355bd5b535e1831282e6cf465b9a71cf36"
919+
integrity sha512-Fxoshw8+R5X3/Vmqwsjc8nRO/7iTysRtDqx6rlfLZ7HbT8TZhPeQqbPjTyk2RheH3L8afumecTQnUc9EeXxohQ==
924920
dependencies:
925921
"@types/json-schema" "^7.0.3"
926-
"@typescript-eslint/typescript-estree" "2.34.0"
922+
"@typescript-eslint/scope-manager" "4.15.2"
923+
"@typescript-eslint/types" "4.15.2"
924+
"@typescript-eslint/typescript-estree" "4.15.2"
927925
eslint-scope "^5.0.0"
928926
eslint-utils "^2.0.0"
929927

930-
"@typescript-eslint/parser@^4.1.0":
931-
version "4.8.0"
932-
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.8.0.tgz#ff98c0435a3797d17083a63389078b8aa49dc81e"
933-
integrity sha512-15sp9BIoZalx4wRgkebfau8KizVe6w0eTjPMnuST9kbIeOaloDy1xKkg7eJfFvE/MdCtKlEWZFLoJB8C0SEOaw==
928+
"@typescript-eslint/parser@^4.15.2":
929+
version "4.15.2"
930+
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.15.2.tgz#c804474321ef76a3955aec03664808f0d6e7872e"
931+
integrity sha512-SHeF8xbsC6z2FKXsaTb1tBCf0QZsjJ94H6Bo51Y1aVEZ4XAefaw5ZAilMoDPlGghe+qtq7XdTiDlGfVTOmvA+Q==
934932
dependencies:
935-
"@typescript-eslint/scope-manager" "4.8.0"
936-
"@typescript-eslint/types" "4.8.0"
937-
"@typescript-eslint/typescript-estree" "4.8.0"
933+
"@typescript-eslint/scope-manager" "4.15.2"
934+
"@typescript-eslint/types" "4.15.2"
935+
"@typescript-eslint/typescript-estree" "4.15.2"
938936
debug "^4.1.1"
939937

940-
"@typescript-eslint/scope-manager@4.8.0":
941-
version "4.8.0"
942-
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.0.tgz#f960b6c5df1a5b230b8488e71c5c04e58dd494e0"
943-
integrity sha512-eJ+SV6w5WcyFusQ/Ru4A/c7E65HMGzWWGPJAqSuM/1EKEE6wOw9LUQTqAvLa6v2oIcaDo9F+/EyOPZgoD/BcLA==
938+
"@typescript-eslint/scope-manager@4.15.2":
939+
version "4.15.2"
940+
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.15.2.tgz#5725bda656995960ae1d004bfd1cd70320f37f4f"
941+
integrity sha512-Zm0tf/MSKuX6aeJmuXexgdVyxT9/oJJhaCkijv0DvJVT3ui4zY6XYd6iwIo/8GEZGy43cd7w1rFMiCLHbRzAPQ==
944942
dependencies:
945-
"@typescript-eslint/types" "4.8.0"
946-
"@typescript-eslint/visitor-keys" "4.8.0"
943+
"@typescript-eslint/types" "4.15.2"
944+
"@typescript-eslint/visitor-keys" "4.15.2"
947945

948-
"@typescript-eslint/types@4.8.0":
949-
version "4.8.0"
950-
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.0.tgz#87e73883637f662d9a638b0e9b01ed77edc44fb7"
951-
integrity sha512-2/mGmXxr3sTxCvCT1mhR2b9rbfpMEBK41tiu0lMnMtZEbpphcUyrmgt2ogDFWNvsvyyeUxO1159eDrgFb7zV4Q==
946+
"@typescript-eslint/types@4.15.2":
947+
version "4.15.2"
948+
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.15.2.tgz#04acf3a2dc8001a88985291744241e732ef22c60"
949+
integrity sha512-r7lW7HFkAarfUylJ2tKndyO9njwSyoy6cpfDKWPX6/ctZA+QyaYscAHXVAfJqtnY6aaTwDYrOhp+ginlbc7HfQ==
952950

953-
"@typescript-eslint/typescript-estree@2.34.0":
954-
version "2.34.0"
955-
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz#14aeb6353b39ef0732cc7f1b8285294937cf37d5"
956-
integrity sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==
951+
"@typescript-eslint/typescript-estree@4.15.2":
952+
version "4.15.2"
953+
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.2.tgz#c2f7a1e94f3428d229d5ecff3ead6581ee9b62fa"
954+
integrity sha512-cGR8C2g5SPtHTQvAymEODeqx90pJHadWsgTtx6GbnTWKqsg7yp6Eaya9nFzUd4KrKhxdYTTFBiYeTPQaz/l8bw==
957955
dependencies:
958-
debug "^4.1.1"
959-
eslint-visitor-keys "^1.1.0"
960-
glob "^7.1.6"
961-
is-glob "^4.0.1"
962-
lodash "^4.17.15"
963-
semver "^7.3.2"
964-
tsutils "^3.17.1"
965-
966-
"@typescript-eslint/[email protected]":
967-
version "4.8.0"
968-
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.0.tgz#b5160588495f18b739003b6078309b76fece0c55"
969-
integrity sha512-jEdeERN8DIs7S8PlTdI7Sdy63Caxg2VtR21/RV7Z1Dtixiq/QEFSPrDXggMXKNOPPlrtMS+eCz7d7NV0HWLFVg==
970-
dependencies:
971-
"@typescript-eslint/types" "4.8.0"
972-
"@typescript-eslint/visitor-keys" "4.8.0"
956+
"@typescript-eslint/types" "4.15.2"
957+
"@typescript-eslint/visitor-keys" "4.15.2"
973958
debug "^4.1.1"
974959
globby "^11.0.1"
975960
is-glob "^4.0.1"
976-
lodash "^4.17.15"
977961
semver "^7.3.2"
978962
tsutils "^3.17.1"
979963

980-
"@typescript-eslint/visitor-keys@4.8.0":
981-
version "4.8.0"
982-
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.0.tgz#7786b92bbaf25c6aa9fb860eb8dbb1f7d3b7d0ad"
983-
integrity sha512-JluNZLvnkRUr0h3L6MnQVLuy2rw9DpD0OyMC21FVbgcezr0LQkbBjDp9kyKZhuZrLrtq4mwPiIkpfRb8IRqneA==
964+
"@typescript-eslint/visitor-keys@4.15.2":
965+
version "4.15.2"
966+
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.2.tgz#3d1c7979ce75bf6acf9691109bd0d6b5706192b9"
967+
integrity sha512-TME1VgSb7wTwgENN5KVj4Nqg25hP8DisXxNBojM4Nn31rYaNDIocNm5cmjOFfh42n7NVERxWrDFoETO/76ePyg==
984968
dependencies:
985-
"@typescript-eslint/types" "4.8.0"
969+
"@typescript-eslint/types" "4.15.2"
986970
eslint-visitor-keys "^2.0.0"
987971

988972
abab@^2.0.0:
@@ -2293,7 +2277,7 @@ escodegen@^1.11.1, escodegen@^1.14.1:
22932277
optionalDependencies:
22942278
source-map "~0.6.1"
22952279

2296-
eslint-import-resolver-node@^0.3.3:
2280+
eslint-import-resolver-node@^0.3.4:
22972281
version "0.3.4"
22982282
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717"
22992283
integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==
@@ -2317,17 +2301,17 @@ eslint-plugin-es@^3.0.0:
23172301
eslint-utils "^2.0.0"
23182302
regexpp "^3.0.0"
23192303

2320-
eslint-plugin-import@^2.20.1:
2321-
version "2.22.0"
2322-
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.0.tgz#92f7736fe1fde3e2de77623c838dd992ff5ffb7e"
2323-
integrity sha512-66Fpf1Ln6aIS5Gr/55ts19eUuoDhAbZgnr6UxK5hbDx6l/QgQgx61AePq+BV4PP2uXQFClgMVzep5zZ94qqsxg==
2304+
eslint-plugin-import@^2.22.1:
2305+
version "2.22.1"
2306+
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702"
2307+
integrity sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==
23242308
dependencies:
23252309
array-includes "^3.1.1"
23262310
array.prototype.flat "^1.2.3"
23272311
contains-path "^0.1.0"
23282312
debug "^2.6.9"
23292313
doctrine "1.5.0"
2330-
eslint-import-resolver-node "^0.3.3"
2314+
eslint-import-resolver-node "^0.3.4"
23312315
eslint-module-utils "^2.6.0"
23322316
has "^1.0.3"
23332317
minimatch "^3.0.4"
@@ -2336,12 +2320,12 @@ eslint-plugin-import@^2.20.1:
23362320
resolve "^1.17.0"
23372321
tsconfig-paths "^3.9.0"
23382322

2339-
eslint-plugin-jest@^23.6.0:
2340-
version "23.20.0"
2341-
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.20.0.tgz#e1d69c75f639e99d836642453c4e75ed22da4099"
2342-
integrity sha512-+6BGQt85OREevBDWCvhqj1yYA4+BFK4XnRZSGJionuEYmcglMZYLNNBBemwzbqUAckURaHdJSBcjHPyrtypZOw==
2323+
eslint-plugin-jest@^24.1.5:
2324+
version "24.1.5"
2325+
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.1.5.tgz#1e866a9f0deac587d0a3d5d7cefe99815a580de2"
2326+
integrity sha512-FIP3lwC8EzEG+rOs1y96cOJmMVpdFNreoDJv29B5vIupVssRi8zrSY3QadogT0K3h1Y8TMxJ6ZSAzYUmFCp2hg==
23432327
dependencies:
2344-
"@typescript-eslint/experimental-utils" "^2.5.0"
2328+
"@typescript-eslint/experimental-utils" "^4.0.1"
23452329

23462330
eslint-plugin-node@^11.1.0:
23472331
version "11.1.0"
@@ -2388,12 +2372,12 @@ eslint-visitor-keys@^2.0.0:
23882372
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8"
23892373
integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==
23902374

2391-
eslint@^7.19.0:
2392-
version "7.19.0"
2393-
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.19.0.tgz#6719621b196b5fad72e43387981314e5d0dc3f41"
2394-
integrity sha512-CGlMgJY56JZ9ZSYhJuhow61lMPPjUzWmChFya71Z/jilVos7mR/jPgaEfVGgMBY5DshbKdG8Ezb8FDCHcoMEMg==
2375+
eslint@^7.20.0:
2376+
version "7.20.0"
2377+
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.20.0.tgz#db07c4ca4eda2e2316e7aa57ac7fc91ec550bdc7"
2378+
integrity sha512-qGi0CTcOGP2OtCQBgWZlQjcTuP0XkIpYFj25XtRTQSHC+umNnp7UMshr2G8SLsRFYDdAPFeHOsiteadmMH02Yw==
23952379
dependencies:
2396-
"@babel/code-frame" "^7.0.0"
2380+
"@babel/code-frame" "7.12.11"
23972381
"@eslint/eslintrc" "^0.3.0"
23982382
ajv "^6.10.0"
23992383
chalk "^4.0.0"
@@ -2405,7 +2389,7 @@ eslint@^7.19.0:
24052389
eslint-utils "^2.1.0"
24062390
eslint-visitor-keys "^2.0.0"
24072391
espree "^7.3.1"
2408-
esquery "^1.2.0"
2392+
esquery "^1.4.0"
24092393
esutils "^2.0.2"
24102394
file-entry-cache "^6.0.0"
24112395
functional-red-black-tree "^1.0.1"
@@ -2445,7 +2429,7 @@ esprima@^4.0.0, esprima@^4.0.1:
24452429
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
24462430
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
24472431

2448-
esquery@^1.2.0:
2432+
esquery@^1.4.0:
24492433
version "1.4.0"
24502434
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5"
24512435
integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==
@@ -3341,7 +3325,7 @@ glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3:
33413325
once "^1.3.0"
33423326
path-is-absolute "^1.0.0"
33433327

3344-
glob@^7.1.4, glob@^7.1.6:
3328+
glob@^7.1.4:
33453329
version "7.1.6"
33463330
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
33473331
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==

0 commit comments

Comments
 (0)