Skip to content

Commit 0381d61

Browse files
authored
Add eslint-plugin-etc no-commented-out-code rule (#1750)
1 parent c803254 commit 0381d61

File tree

4 files changed

+134
-7
lines changed

4 files changed

+134
-7
lines changed

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ module.exports = {
6868
plugins: [
6969
'@typescript-eslint',
7070
'check-file',
71+
'etc',
7172
'jest',
7273
'jsx-a11y',
7374
'react-hooks',
@@ -93,6 +94,7 @@ module.exports = {
9394
'array-callback-return': 'off',
9495
camelcase: 'off',
9596
curly: ['error', 'all'],
97+
'etc/no-commented-out-code': 'error',
9698
'import/no-unresolved': 'off',
9799
'import/order': [
98100
'error',

extension/src/experiments/model/collect.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ const getLogicalGroupName = (
6767
): string | undefined => {
6868
const experiment = experimentsObject[sha]?.data
6969

70-
// if (!experiment) {
71-
// return
72-
// }
73-
7470
const { checkpoint_tip: checkpointTip = undefined, name = undefined } =
7571
experiment || {}
7672

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"eslint-config-prettier-standard": "^4.0.1",
4141
"eslint-config-standard": "^16.0.3",
4242
"eslint-plugin-check-file": "^1.1.0",
43+
"eslint-plugin-etc": "^2.0.2",
4344
"eslint-plugin-import": "^2.25.4",
4445
"eslint-plugin-jest": "^26.1.3",
4546
"eslint-plugin-jsx-a11y": "^6.5.1",

yarn.lock

Lines changed: 131 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,6 +1667,13 @@
16671667
mkdirp "^1.0.4"
16681668
rimraf "^3.0.2"
16691669

1670+
"@phenomnomnominal/tsquery@^4.0.0":
1671+
version "4.2.0"
1672+
resolved "https://registry.yarnpkg.com/@phenomnomnominal/tsquery/-/tsquery-4.2.0.tgz#7742ff4af12ce673b0b601ba5515c934f1876b14"
1673+
integrity sha512-hR2U3uVcrrdkuG30ItQ+uFDs4ncZAybxWG0OjTE8ptPzVoU7GVeXpy+vMU8zX9EbmjGeITPw/su5HjYQyAH8bA==
1674+
dependencies:
1675+
esquery "^1.0.1"
1676+
16701677
"@pmmmwh/react-refresh-webpack-plugin@^0.5.1":
16711678
version "0.5.4"
16721679
resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.4.tgz#df0d0d855fc527db48aac93c218a0bf4ada41f99"
@@ -3495,6 +3502,13 @@
34953502
dependencies:
34963503
"@types/yargs-parser" "*"
34973504

3505+
"@types/yargs@^17.0.0":
3506+
version "17.0.10"
3507+
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.10.tgz#591522fce85d8739bca7b8bb90d048e4478d186a"
3508+
integrity sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==
3509+
dependencies:
3510+
"@types/yargs-parser" "*"
3511+
34983512
"@typescript-eslint/eslint-plugin@^5.17.0":
34993513
version "5.17.0"
35003514
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz#704eb4e75039000531255672bf1c85ee85cf1d67"
@@ -3510,6 +3524,13 @@
35103524
semver "^7.3.5"
35113525
tsutils "^3.21.0"
35123526

3527+
"@typescript-eslint/experimental-utils@^5.0.0":
3528+
version "5.25.0"
3529+
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.25.0.tgz#950ab2ab402852a8a2c02b4b254b06d411a6ba9e"
3530+
integrity sha512-YTe9rmslCh1xAvNa3X+uZe4L2lsyb8V3WIeK9z46nNiPswk/V/0SGLJSfo8W9Hj4R7ak7bolazXGn3DErmb8QA==
3531+
dependencies:
3532+
"@typescript-eslint/utils" "5.25.0"
3533+
35133534
"@typescript-eslint/parser@^5.17.0":
35143535
version "5.17.0"
35153536
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.17.0.tgz#7def77d5bcd8458d12d52909118cf3f0a45f89d5"
@@ -3528,6 +3549,14 @@
35283549
"@typescript-eslint/types" "5.17.0"
35293550
"@typescript-eslint/visitor-keys" "5.17.0"
35303551

3552+
"@typescript-eslint/[email protected]":
3553+
version "5.25.0"
3554+
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.25.0.tgz#e78f1484bca7e484c48782075219c82c6b77a09f"
3555+
integrity sha512-p4SKTFWj+2VpreUZ5xMQsBMDdQ9XdRvODKXN4EksyBjFp2YvQdLkyHqOffakYZPuWJUDNu3jVXtHALDyTv3cww==
3556+
dependencies:
3557+
"@typescript-eslint/types" "5.25.0"
3558+
"@typescript-eslint/visitor-keys" "5.25.0"
3559+
35313560
"@typescript-eslint/[email protected]":
35323561
version "5.17.0"
35333562
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz#1c4549d68c89877662224aabb29fbbebf5fc9672"
@@ -3542,6 +3571,11 @@
35423571
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.17.0.tgz#861ec9e669ffa2aa9b873dd4d28d9b1ce26d216f"
35433572
integrity sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==
35443573

3574+
"@typescript-eslint/[email protected]":
3575+
version "5.25.0"
3576+
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.25.0.tgz#dee51b1855788b24a2eceeae54e4adb89b088dd8"
3577+
integrity sha512-7fWqfxr0KNHj75PFqlGX24gWjdV/FDBABXL5dyvBOWHpACGyveok8Uj4ipPX/1fGU63fBkzSIycEje4XsOxUFA==
3578+
35453579
"@typescript-eslint/[email protected]":
35463580
version "5.17.0"
35473581
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz#a7cba7dfc8f9cc2ac78c18584e684507df4f2488"
@@ -3555,6 +3589,19 @@
35553589
semver "^7.3.5"
35563590
tsutils "^3.21.0"
35573591

3592+
"@typescript-eslint/[email protected]":
3593+
version "5.25.0"
3594+
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.25.0.tgz#a7ab40d32eb944e3fb5b4e3646e81b1bcdd63e00"
3595+
integrity sha512-MrPODKDych/oWs/71LCnuO7NyR681HuBly2uLnX3r5i4ME7q/yBqC4hW33kmxtuauLTM0OuBOhhkFaxCCOjEEw==
3596+
dependencies:
3597+
"@typescript-eslint/types" "5.25.0"
3598+
"@typescript-eslint/visitor-keys" "5.25.0"
3599+
debug "^4.3.4"
3600+
globby "^11.1.0"
3601+
is-glob "^4.0.3"
3602+
semver "^7.3.7"
3603+
tsutils "^3.21.0"
3604+
35583605
"@typescript-eslint/[email protected]", "@typescript-eslint/utils@^5.10.0", "@typescript-eslint/utils@^5.13.0":
35593606
version "5.17.0"
35603607
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.17.0.tgz#549a9e1d491c6ccd3624bc3c1b098f5cfb45f306"
@@ -3567,6 +3614,18 @@
35673614
eslint-scope "^5.1.1"
35683615
eslint-utils "^3.0.0"
35693616

3617+
"@typescript-eslint/[email protected]":
3618+
version "5.25.0"
3619+
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.25.0.tgz#272751fd737733294b4ab95e16c7f2d4a75c2049"
3620+
integrity sha512-qNC9bhnz/n9Kba3yI6HQgQdBLuxDoMgdjzdhSInZh6NaDnFpTUlwNGxplUFWfY260Ya0TRPvkg9dd57qxrJI9g==
3621+
dependencies:
3622+
"@types/json-schema" "^7.0.9"
3623+
"@typescript-eslint/scope-manager" "5.25.0"
3624+
"@typescript-eslint/types" "5.25.0"
3625+
"@typescript-eslint/typescript-estree" "5.25.0"
3626+
eslint-scope "^5.1.1"
3627+
eslint-utils "^3.0.0"
3628+
35703629
"@typescript-eslint/[email protected]":
35713630
version "5.17.0"
35723631
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz#52daae45c61b0211b4c81b53a71841911e479128"
@@ -3575,6 +3634,14 @@
35753634
"@typescript-eslint/types" "5.17.0"
35763635
eslint-visitor-keys "^3.0.0"
35773636

3637+
"@typescript-eslint/[email protected]":
3638+
version "5.25.0"
3639+
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.25.0.tgz#33aa5fdcc5cedb9f4c8828c6a019d58548d4474b"
3640+
integrity sha512-yd26vFgMsC4h2dgX4+LR+GeicSKIfUvZREFLf3DDjZPtqgLx5AJZr6TetMNwFP9hcKreTTeztQYBTNbNoOycwA==
3641+
dependencies:
3642+
"@typescript-eslint/types" "5.25.0"
3643+
eslint-visitor-keys "^3.3.0"
3644+
35783645
35793646
version "1.1.2"
35803647
resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44"
@@ -6116,6 +6183,13 @@ debug@^3.0.0, debug@^3.1.1, debug@^3.2.7:
61166183
dependencies:
61176184
ms "^2.1.1"
61186185

6186+
debug@^4.3.4:
6187+
version "4.3.4"
6188+
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
6189+
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
6190+
dependencies:
6191+
ms "2.1.2"
6192+
61196193
decamelize@^1.2.0:
61206194
version "1.2.0"
61216195
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
@@ -6792,6 +6866,15 @@ eslint-config-standard@^16.0.3:
67926866
resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz#6c8761e544e96c531ff92642eeb87842b8488516"
67936867
integrity sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==
67946868

6869+
eslint-etc@^5.1.0:
6870+
version "5.1.0"
6871+
resolved "https://registry.yarnpkg.com/eslint-etc/-/eslint-etc-5.1.0.tgz#7e99b80452fe8335065fddf7800e4495dc0922a0"
6872+
integrity sha512-Rmjl01h5smi5cbsFne2xpTuch2xNnwXiX2lbS4HttXUN5FwXKAwG1UEFBVGO1nC091YO/QyVahyfNPJSX2ae+g==
6873+
dependencies:
6874+
"@typescript-eslint/experimental-utils" "^5.0.0"
6875+
tsutils "^3.17.1"
6876+
tsutils-etc "^1.4.1"
6877+
67956878
eslint-import-resolver-node@^0.3.6:
67966879
version "0.3.6"
67976880
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd"
@@ -6825,6 +6908,18 @@ eslint-plugin-es@^3.0.0:
68256908
eslint-utils "^2.0.0"
68266909
regexpp "^3.0.0"
68276910

6911+
eslint-plugin-etc@^2.0.2:
6912+
version "2.0.2"
6913+
resolved "https://registry.yarnpkg.com/eslint-plugin-etc/-/eslint-plugin-etc-2.0.2.tgz#98013013058209f5a1d364caf17caeb62bd817ce"
6914+
integrity sha512-g3b95LCdTCwZA8On9EICYL8m1NMWaiGfmNUd/ftZTeGZDXrwujKXUr+unYzqKjKFo1EbqJ31vt+Dqzrdm/sUcw==
6915+
dependencies:
6916+
"@phenomnomnominal/tsquery" "^4.0.0"
6917+
"@typescript-eslint/experimental-utils" "^5.0.0"
6918+
eslint-etc "^5.1.0"
6919+
requireindex "~1.2.0"
6920+
tslib "^2.0.0"
6921+
tsutils "^3.0.0"
6922+
68286923
eslint-plugin-import@^2.25.4:
68296924
version "2.25.4"
68306925
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1"
@@ -7077,7 +7172,7 @@ esprima@^4.0.0, esprima@^4.0.1:
70777172
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
70787173
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
70797174

7080-
esquery@^1.4.0:
7175+
esquery@^1.0.1, esquery@^1.4.0:
70817176
version "1.4.0"
70827177
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5"
70837178
integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==
@@ -7900,7 +7995,7 @@ globalthis@^1.0.0:
79007995
dependencies:
79017996
define-properties "^1.1.3"
79027997

7903-
globby@^11.0.1, globby@^11.0.2, globby@^11.0.4:
7998+
globby@^11.0.1, globby@^11.0.2, globby@^11.0.4, globby@^11.1.0:
79047999
version "11.1.0"
79058000
resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
79068001
integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
@@ -12710,6 +12805,13 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0:
1271012805
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
1271112806
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
1271212807

12808+
semver@^7.3.7:
12809+
version "7.3.7"
12810+
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f"
12811+
integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==
12812+
dependencies:
12813+
lru-cache "^6.0.0"
12814+
1271312815
1271412816
version "0.17.2"
1271512817
resolved "https://registry.yarnpkg.com/send/-/send-0.17.2.tgz#926622f76601c41808012c8bf1688fe3906f7820"
@@ -13895,7 +13997,15 @@ tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3
1389513997
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
1389613998
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==
1389713999

13898-
tsutils@^3.21.0:
14000+
tsutils-etc@^1.4.1:
14001+
version "1.4.1"
14002+
resolved "https://registry.yarnpkg.com/tsutils-etc/-/tsutils-etc-1.4.1.tgz#bd42a0079d534765ab314d087f8a89c77a68723f"
14003+
integrity sha512-6UPYgc7OXcIW5tFxlsZF3OVSBvDInl/BkS3Xsu64YITXk7WrnWTVByKWPCThFDBp5gl5IGHOzGMdQuDCE7OL4g==
14004+
dependencies:
14005+
"@types/yargs" "^17.0.0"
14006+
yargs "^17.0.0"
14007+
14008+
tsutils@^3.0.0, tsutils@^3.17.1, tsutils@^3.21.0:
1389914009
version "3.21.0"
1390014010
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
1390114011
integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==
@@ -15383,6 +15493,11 @@ yargs-parser@^18.1.2:
1538315493
camelcase "^5.0.0"
1538415494
decamelize "^1.2.0"
1538515495

15496+
yargs-parser@^21.0.0:
15497+
version "21.0.1"
15498+
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35"
15499+
integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==
15500+
1538615501
1538715502
version "2.0.0"
1538815503
resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb"
@@ -15423,6 +15538,19 @@ yargs@^15.0.2:
1542315538
y18n "^4.0.0"
1542415539
yargs-parser "^18.1.2"
1542515540

15541+
yargs@^17.0.0:
15542+
version "17.5.1"
15543+
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e"
15544+
integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==
15545+
dependencies:
15546+
cliui "^7.0.2"
15547+
escalade "^3.1.1"
15548+
get-caller-file "^2.0.5"
15549+
require-directory "^2.1.1"
15550+
string-width "^4.2.3"
15551+
y18n "^5.0.5"
15552+
yargs-parser "^21.0.0"
15553+
1542615554
yargs@~17.2.1:
1542715555
version "17.2.1"
1542815556
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.2.1.tgz#e2c95b9796a0e1f7f3bf4427863b42e0418191ea"

0 commit comments

Comments
 (0)