From c68ae25833f81e5c1e7b1d44a85221e2db349966 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Apr 2021 11:02:15 -0700 Subject: [PATCH 01/12] chore: bump cspell from 5.3.9 to 5.3.11 (#3262) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.3.9 to 5.3.11. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/master/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/compare/v5.3.9...v5.3.11) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 69 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4d04b9fd9e93..6b7bc9261bbf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -501,10 +501,10 @@ "@cspell/dict-software-terms" "^1.0.26" "@cspell/dict-typescript" "^1.0.16" -"@cspell/cspell-types@^5.3.8": - version "5.3.8" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.3.8.tgz#75573a145c71f54f09a3f12eab5527b7c0ae0388" - integrity sha512-vljVDP03VRIwtc7ckAZQAwLfmRC2XGfAXRR3pUR9KN8s2bB+PQftJbbJqhqtgOiNiG42Qd9CeTadwWJnDC40XQ== +"@cspell/cspell-types@^5.3.11": + version "5.3.11" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.3.11.tgz#4c7676502a9f472adce76536f13d9e7b8f283617" + integrity sha512-i0SvYk2jeX+mVnr8wjuIJmDppM37eztCuNrI6cUYRR7sQbWyMsoVvR2zl9aN4ZBoAypzbdCTE8blteeCjU8/ug== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -2878,7 +2878,12 @@ commander@^6.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== -commander@^7.1.0, commander@~7.1.0: +commander@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + +commander@~7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.1.0.tgz#f2eaecf131f10e36e07d894698226e36ae0eb5ff" integrity sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg== @@ -3159,59 +3164,59 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== -cspell-glob@^5.3.8: - version "5.3.8" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.3.8.tgz#0fd8d73c02cbaf683e2063b1afe8a1d5b85757ff" - integrity sha512-dOFotRP+QogT6WdcLHLRrqT/nFKvtZn4rXjBgJ5DI16CB2IEXTk+AqGUn/VIpQI7a64p/yNF5RccQZ11LfhW1w== +cspell-glob@^5.3.11: + version "5.3.11" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.3.11.tgz#30823000be279dd0cd68791c16cf08d789431a9d" + integrity sha512-xQWzscCZReAoHDtaOnfm2PpboaTDlFVou6rha5pLuj/rhZNLFZRs8YbiZAOYd6KrwWU18utEC+7wn9z1k/00KA== dependencies: micromatch "^4.0.2" -cspell-io@^5.3.8: - version "5.3.8" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.3.8.tgz#ff7a901d9bd0b16acd6b62528fff1693164c5dbc" - integrity sha512-+Xw0AWSHPtvns/keYi5iXG7vhrgU8Ebn4Cz78c150T9cKI8Rj0sJxwGa1C/5tNpiNz6YfKOnkpv1Ge+hZ4B9FA== +cspell-io@^5.3.11: + version "5.3.11" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.3.11.tgz#af3411ac03cd48016e3cfca408fc8978b92cb8db" + integrity sha512-n/iluwUf2lMODeZ/NJuM9qFyBvee5JJdEFkCI0CrwpGmEgIWyW1YGM00HrTYvIMYCI49YRfK7Hf+No8Hp+m2sw== dependencies: iconv-lite "^0.6.2" iterable-to-stream "^1.0.1" -cspell-lib@^5.3.9: - version "5.3.9" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.3.9.tgz#dedf781f0027cc8034da4b0a86ec33c41ae33b56" - integrity sha512-Y9BoIQILIN5rQ9Hkz9nNU06zwRklOzTSGPK/zZaXqOo3Ynht5Ecxomoi08Az/MRthD8nwxXPJnSh6fY3ah0UJg== +cspell-lib@^5.3.11: + version "5.3.11" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.3.11.tgz#fc2a019ba525a55e3ed1683f1ccb9eeca3e6d009" + integrity sha512-o7f+nmspy7vvWw65Srspw/HLGdmG4i2QcfSiKhTgdNsC5AnIE4eUY1hnvT6G5r7soPKrAIEtSk3Y9n0ajFlFTA== dependencies: "@cspell/cspell-bundled-dicts" "^5.3.8" - "@cspell/cspell-types" "^5.3.8" + "@cspell/cspell-types" "^5.3.11" comment-json "^4.1.0" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-glob "^5.3.8" - cspell-io "^5.3.8" - cspell-trie-lib "^5.3.8" + cspell-glob "^5.3.11" + cspell-io "^5.3.11" + cspell-trie-lib "^5.3.11" fs-extra "^9.1.0" gensequence "^3.1.1" resolve-from "^5.0.0" resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.3.8: - version "5.3.8" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.3.8.tgz#d6112351aaca5367fe3a17c2e78349e7100fdf53" - integrity sha512-LcgtDyGEEJ0a1YM9HipqSNDFFyFMpV+aOwZixBeTH5x3RIgPkeKTSdGe5x03DFzM7XMyMAbSo6717TSwuQXydQ== +cspell-trie-lib@^5.3.11: + version "5.3.11" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.3.11.tgz#acf8297ad109a54445ab11b5128bb252e37c2ca7" + integrity sha512-h/X1K0mUkLhO56NdhVBuwYiPutpj/znnS3VphYXMc26iYufX/nJ7RUVnnbT9YunrQVIOc9PYzFrTg8V3m0iHtg== dependencies: fs-extra "^9.1.0" gensequence "^3.1.1" cspell@^5.2.4: - version "5.3.9" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.3.9.tgz#9bda30ed30611ff1a22b3435ac75f89ffcce1827" - integrity sha512-NFV7gWLIDx7RoFj1iC4sXbMVRJqWNJj0OhhTFo4nA+ktblFLeiIb1J3SnVSrtwgM3wHP3b+pkuwHSBUTK5pj6w== + version "5.3.11" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.3.11.tgz#9cb18ee29691e806c87fa6e6b06b9c8196fbe720" + integrity sha512-GQuIFkcHx4L/0xStV/wjjswR7/AG1BYnkm7F4pMBvxM1yvUxDFts2OsdLWJLWY/2nVsPQGi8z2oDnFkNh8xdXg== dependencies: - "@cspell/cspell-types" "^5.3.8" + "@cspell/cspell-types" "^5.3.11" chalk "^4.1.0" - commander "^7.1.0" + commander "^7.2.0" comment-json "^4.1.0" - cspell-glob "^5.3.8" - cspell-lib "^5.3.9" + cspell-glob "^5.3.11" + cspell-lib "^5.3.11" fs-extra "^9.1.0" get-stdin "^8.0.0" glob "^7.1.6" From 9dff4b4b2fd8417649a3d119fd0bbb8472b59ac0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Apr 2021 11:02:24 -0700 Subject: [PATCH 02/12] chore: bump eslint-plugin-jest from 24.3.2 to 24.3.4 (#3263) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.3.2 to 24.3.4. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v24.3.2...v24.3.4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6b7bc9261bbf..0ba2d6241745 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3746,9 +3746,9 @@ eslint-plugin-import@^2.22.0: tsconfig-paths "^3.9.0" eslint-plugin-jest@^24.1.3: - version "24.3.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.2.tgz#30a8b2dea6278d0da1d6fb9d6cd530aaf58050a1" - integrity sha512-cicWDr+RvTAOKS3Q/k03+Z3odt3VCiWamNUHWd6QWbVQWcYJyYgUTu8x0mx9GfeDEimawU5kQC+nQ3MFxIM6bw== + version "24.3.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.4.tgz#6d90c3554de0302e879603dd6405474c98849f19" + integrity sha512-3n5oY1+fictanuFkTWPwSlehugBTAgwLnYLFsCllzE3Pl1BwywHl5fL0HFxmMjoQY8xhUDk8uAWc3S4JOHGh3A== dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" From 8bde24690c1b6d70163bd8f8040650b20f8b0c9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Apr 2021 11:02:31 -0700 Subject: [PATCH 03/12] chore: bump @commitlint/cli from 12.0.1 to 12.1.1 (#3264) Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint) from 12.0.1 to 12.1.1. - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/compare/v12.0.1...v12.1.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 168 +++++++++++++++++++++++++++--------------------------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0ba2d6241745..feb01c638b75 100644 --- a/yarn.lock +++ b/yarn.lock @@ -314,15 +314,15 @@ minimist "^1.2.0" "@commitlint/cli@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-12.0.1.tgz#8960e34e8f1aed8b2ea50f223ee817fdf2264ffb" - integrity sha512-V+cMYNHJOr40XT9Kvz3Vrz1Eh7QE1rjQrUbifawDAqcOrBJFuoXwU2SAcRtYFCSqFy9EhbreQGhZFs8dYb90KA== - dependencies: - "@commitlint/format" "^12.0.1" - "@commitlint/lint" "^12.0.1" - "@commitlint/load" "^12.0.1" - "@commitlint/read" "^12.0.1" - "@commitlint/types" "^12.0.1" + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-12.1.1.tgz#740370e557a8a17f415052821cdd5276ecb0ab98" + integrity sha512-SB67/s6VJ50seoPx/Sr2gj1fMzKrx+udgarecGdr8h43ah+M2e22gjQJ7xHv5KwyPQ+6ug1YOMCL34ubT4zupQ== + dependencies: + "@commitlint/format" "^12.1.1" + "@commitlint/lint" "^12.1.1" + "@commitlint/load" "^12.1.1" + "@commitlint/read" "^12.1.1" + "@commitlint/types" "^12.1.1" get-stdin "8.0.0" lodash "^4.17.19" resolve-from "5.0.0" @@ -346,118 +346,118 @@ resolve-pkg "2.0.0" semver "7.3.4" -"@commitlint/ensure@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-12.0.1.tgz#0ed5e997026db25eb080559b6e67f55a21eea080" - integrity sha512-XdBq+q1YBBDxWIAEjE3Y1YMbzhUnUuSLAEWD8SU1xsvEpQXWRYwDlMBRkjO7funNWTdL0ZQSkZDzme70imYjbw== +"@commitlint/ensure@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-12.1.1.tgz#bcefc85f7f8a41bb31f67d7a8966e322b47a6e43" + integrity sha512-XEUQvUjzBVQM7Uv8vYz+c7PDukFvx0AvQEyX/V+PaTkCK/xPvexu7FLbFwvypjSt9BPMf+T/rhB1hVmldkd6lw== dependencies: - "@commitlint/types" "^12.0.1" + "@commitlint/types" "^12.1.1" lodash "^4.17.19" -"@commitlint/execute-rule@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-12.0.1.tgz#5bb2eba929270cafb2bd8191799d8b451de7fb7e" - integrity sha512-JzyweYfZlFLtXpgP+btzSY3YAkGPg61TqUSYQqBr4+5IaVf1FruMm5v4D5eLu9dAJuNKUfHbM3AEfuEPiZ79pg== +"@commitlint/execute-rule@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-12.1.1.tgz#8aad1d46fb78b3199e4ae36debdc93570bf765ea" + integrity sha512-6mplMGvLCKF5LieL7BRhydpg32tm6LICnWQADrWU4S5g9PKi2utNvhiaiuNPoHUXr29RdbNaGNcyyPv8DSjJsQ== -"@commitlint/format@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-12.0.1.tgz#5164e5a9e8592c1983482cbd71e7ea86a645ff1b" - integrity sha512-rF79ipAxR8yFzPzG5tRoEZ//MRkyxCXj4JhpEjtdaCMBAXMssI8uazn3e5D8z4UFgSDe9qOnL0OmQvql7HTMoA== +"@commitlint/format@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-12.1.1.tgz#a6b14f8605171374eecc2c463098d63c127ab7df" + integrity sha512-bTAoOryTFLqls17JTaRwk2WDVOP0NwuG4F/JPK8RaF6DMZNVQTfajkgTxFENNZRnESfau1BvivvEXfUAW2ZsvA== dependencies: - "@commitlint/types" "^12.0.1" + "@commitlint/types" "^12.1.1" chalk "^4.0.0" -"@commitlint/is-ignored@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-12.0.1.tgz#0e59b0524e16300b1d9d62f8c138f083f22ebf9a" - integrity sha512-AplfLn5mX/kWTIiSolcOhTYcgphuGLX8FUr+HmyHBEqUkO36jt0z9caysH47fqU71ePtH63v1DWm+RYQ5RPDjg== +"@commitlint/is-ignored@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-12.1.1.tgz#6075a5cd2dcda7b6ec93322f5dbe2142cfbb3248" + integrity sha512-Sn4fsnWX+wLAJOD/UZeoVruB98te1TyPYRiDEq0MhRJAQIrP+7jE/O3/ass68AAMq00HvH3OK9kt4UBXggcGjA== dependencies: - "@commitlint/types" "^12.0.1" - semver "7.3.4" + "@commitlint/types" "^12.1.1" + semver "7.3.5" -"@commitlint/lint@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-12.0.1.tgz#a88b01c81cb6ca1867bd3d8fd288ba30017c2b7d" - integrity sha512-1lKyRCq4ahJrY+Xxo8LsqCbALeJkodtEfpmYHeA5HpPMnK7lRSplLqOLcTCjoPfd4vO+gl6aDEZN+ow3YGQBOg== +"@commitlint/lint@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-12.1.1.tgz#cdd898af6eadba8f9e71d7f1255b5a479a757078" + integrity sha512-FFFPpku/E0svL1jaUVqosuZJDDWiNWYBlUw5ZEljh3MwWRcoaWtMIX5bseX+IvHpFZsCTAiBs1kCgNulCi0UvA== dependencies: - "@commitlint/is-ignored" "^12.0.1" - "@commitlint/parse" "^12.0.1" - "@commitlint/rules" "^12.0.1" - "@commitlint/types" "^12.0.1" + "@commitlint/is-ignored" "^12.1.1" + "@commitlint/parse" "^12.1.1" + "@commitlint/rules" "^12.1.1" + "@commitlint/types" "^12.1.1" -"@commitlint/load@>6.1.1", "@commitlint/load@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-12.0.1.tgz#4d180fc88e5b4cfcb476a245d899f85154137502" - integrity sha512-dX8KdCWn7w0bTkkk3zKQpe9X8vsTRa5EM+1ffF313wCX9b6tGa9vujhEHCkSzKAbbE2tFV64CHZygE7rtlHdIA== +"@commitlint/load@>6.1.1", "@commitlint/load@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-12.1.1.tgz#5a7fb8be11e520931d1237c5e8dc401b7cc9c6c1" + integrity sha512-qOQtgNdJRULUQWP9jkpTwhj7aEtnqUtqeUpbQ9rjS+GIUST65HZbteNUX4S0mAEGPWqy2aK5xGd73cUfFSvuuw== dependencies: - "@commitlint/execute-rule" "^12.0.1" - "@commitlint/resolve-extends" "^12.0.1" - "@commitlint/types" "^12.0.1" + "@commitlint/execute-rule" "^12.1.1" + "@commitlint/resolve-extends" "^12.1.1" + "@commitlint/types" "^12.1.1" chalk "^4.0.0" cosmiconfig "^7.0.0" lodash "^4.17.19" resolve-from "^5.0.0" -"@commitlint/message@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-12.0.1.tgz#caff6743db78c30a063809501cf4b835c3ce7fa6" - integrity sha512-fXuoxRC+NT1wEQi6p8oHfT7wvWIRgTk+udlRJnWTjmMpiYzVnMmmZfasdShirWr4TtxQtMyL+5DVgh7Y98kURw== +"@commitlint/message@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-12.1.1.tgz#56eb1dbb561e85e9295380a46ff3b09bc93cac65" + integrity sha512-RakDSLAiOligXjhbLahV8HowF4K75pZIcs0+Ii9Q8Gz5H3DWf1Ngit7alFTWfcbf/+DTjSzVPov5HiwQZPIBUg== -"@commitlint/parse@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-12.0.1.tgz#ba8641f53e15b523808ba2eaa48c1bf0129c91c4" - integrity sha512-7oEGASmzBnHir5jSIR7KephXrKh7rIi9a6RpH1tOT+CIENYvhe8EDtIy29qMt+RLa2LlaPF7YrAgaJRfzG0YDQ== +"@commitlint/parse@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-12.1.1.tgz#3e49d6dc113d59cf266af0db99e320e933108c56" + integrity sha512-nuljIvAbBDr93DgL0wCArftEIhjSghawAwhvrKNV9FFcqAJqfVqitwMxJrNDCQ5pgUMCSKULLOEv+dA0bLlTEQ== dependencies: - "@commitlint/types" "^12.0.1" + "@commitlint/types" "^12.1.1" conventional-changelog-angular "^5.0.11" conventional-commits-parser "^3.0.0" -"@commitlint/read@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-12.0.1.tgz#41f3295ed9f451d4c65223cd37ddd59ef714bddb" - integrity sha512-baa0YeD4QOctEuthLpExQSi9xPiw0kDPfUVHqp8I88iuIXJECeS8S1+1GBiz89e8dLN9zmEE+sN9vtJHdAp9YA== +"@commitlint/read@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-12.1.1.tgz#22a2d7fd1eab5e38b9b262311af28ac42f9a5097" + integrity sha512-1k0CQEoZIdixvmqZRKEcWdj2XiKS7SlizEOJ1SE99Qui5d5FlBey8eaooTGgmpR6zObpIHJehtEPzM3VzUT3qA== dependencies: - "@commitlint/top-level" "^12.0.1" - "@commitlint/types" "^12.0.1" + "@commitlint/top-level" "^12.1.1" + "@commitlint/types" "^12.1.1" fs-extra "^9.0.0" git-raw-commits "^2.0.0" -"@commitlint/resolve-extends@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-12.0.1.tgz#77509f386e08bd30262ec9a75c783d8f4f028fd2" - integrity sha512-Mvg0GDi/68Cqw893ha8uhxE8myHfPmiSSSi7d1x4VJNR4hoS37lBdX89kyx4i9NPmLfviY2cUJKTyK8ZrFznZw== +"@commitlint/resolve-extends@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-12.1.1.tgz#80a78b0940775d17888dd2985b52f93d93e0a885" + integrity sha512-/DXRt0S0U3o9lq5cc8OL1Lkx0IjW0HcDWjUkUXshAajBIKBYSJB8x/loNCi1krNEJ8SwLXUEFt5OLxNO6wE9yQ== dependencies: import-fresh "^3.0.0" lodash "^4.17.19" resolve-from "^5.0.0" resolve-global "^1.0.0" -"@commitlint/rules@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-12.0.1.tgz#1c81345f468597656141338a493d5e426e44dab9" - integrity sha512-A5O0ubNGugZR9WWxk5IVOLo07lpdUwhG5WkAW2lYpgZ7Z/2U4PLob9b4Ih1eHbQu+gnVeFr91k7F0DrpM7B8EQ== +"@commitlint/rules@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-12.1.1.tgz#d59182a837d2addf301a3a4ef83316ae7e70248f" + integrity sha512-oCcLF/ykcJfhM2DeeaDyrgdaiuKsqIPNocugdPj2WEyhSYqmx1/u18CV96LAtW+WyyiOLCCeiZwiQutx3T5nXg== dependencies: - "@commitlint/ensure" "^12.0.1" - "@commitlint/message" "^12.0.1" - "@commitlint/to-lines" "^12.0.1" - "@commitlint/types" "^12.0.1" + "@commitlint/ensure" "^12.1.1" + "@commitlint/message" "^12.1.1" + "@commitlint/to-lines" "^12.1.1" + "@commitlint/types" "^12.1.1" -"@commitlint/to-lines@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-12.0.1.tgz#586d89b9f9ff99ef93b3c8aa3d77faffbe3ffedc" - integrity sha512-XwcJ1jY7x2fhudzbGMpNQkTSMVrxWrI8bRMbVe3Abuu7RfYpFf7VXAlhtnLfxBoagaK7RxjC2+eRidp/3txQBg== +"@commitlint/to-lines@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-12.1.1.tgz#40fbed1767d637249ce49b311a51909d8361ecf8" + integrity sha512-W23AH2XF5rI27MOAPSSr0TUDoRe7ZbFoRtYhFnPu2MBmcuDA9Tmfd9N5sM2tBXtdE26uq3SazwKqGt1OoGAilQ== -"@commitlint/top-level@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-12.0.1.tgz#9c7efd319a4f8d29001f011ba8b0e21fad6044f6" - integrity sha512-rHdgt7U24GEau2/9i2vEAbksxkBRiVjHj5ECFL5dd0AJOIvaK++vMg4EF/ME0X/1yd9qVTHTNOl2Q4tTFK7VBQ== +"@commitlint/top-level@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-12.1.1.tgz#228df8fc36b6d7ea7ad149badfb6ef53dbc7001d" + integrity sha512-g7uRbr81QEIg+pbii0OkE17Zh/2C/f6dSmiMDVRn1S0+hNHR1bENCh18hVUKcV/qKTUsKkFlhhWXM9mQBfxQJw== dependencies: find-up "^5.0.0" -"@commitlint/types@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-12.0.1.tgz#04a0cbb8aa56b7c004f8939c2d1ef8892ec68327" - integrity sha512-FsNDMV0W7D19/ZbR412klpqAilXASx75Neqh7jPtK278IEwdukOg3vth1r5kTm+BjDScM7wMUEOwIW3NNfAtwg== +"@commitlint/types@^12.1.1": + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-12.1.1.tgz#8e651f6af0171cd4f8d464c6c37a7cf63ee071bd" + integrity sha512-+qGH+s2Lo6qwacV2X3/ZypZwaAI84ift+1HBjXdXtI/q0F5NtmXucV3lcQOTviMTNiJhq4qWON2fjci2NItASw== dependencies: chalk "^4.0.0" @@ -7788,7 +7788,7 @@ semver@7.3.4: dependencies: lru-cache "^6.0.0" -semver@7.x, semver@^7.2.1, semver@^7.3.2: +semver@7.3.5, semver@7.x, semver@^7.2.1, semver@^7.3.2: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== From 9238e91e9466c925f72b85f4c701df672302702b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Apr 2021 11:02:38 -0700 Subject: [PATCH 04/12] chore: bump @commitlint/config-lerna-scopes from 12.0.1 to 12.1.1 (#3266) Bumps [@commitlint/config-lerna-scopes](https://github.com/conventional-changelog/commitlint) from 12.0.1 to 12.1.1. - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/compare/v12.0.1...v12.1.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index feb01c638b75..fd0deb0eda66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -337,14 +337,14 @@ conventional-changelog-conventionalcommits "^4.3.1" "@commitlint/config-lerna-scopes@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/config-lerna-scopes/-/config-lerna-scopes-12.0.1.tgz#3ae4fe71efbecc49dc92a4c801ea66c00f397f1d" - integrity sha512-k3xT6ey3nyGYFl3xGlzivmuE+/rLJEBWg7wn+3XPRVLdovwxgA3fCqSrK17mJRCKcjcJbto70Uwmj27VDG0Kng== + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/config-lerna-scopes/-/config-lerna-scopes-12.1.1.tgz#d7ebb34c083b181620d2ac97d8de566c37199e87" + integrity sha512-j5u3UHbd4nccBTz0DVraO5cJDVdMgEh7sfuW9BH9SPxlI2F0LmLUIssrUuyCNL1bk+VIH2pdAWonlIlAAfJ4Nw== dependencies: globby "^11.0.1" import-from "3.0.0" resolve-pkg "2.0.0" - semver "7.3.4" + semver "7.3.5" "@commitlint/ensure@^12.1.1": version "12.1.1" From 0292e818eb2e9ce6f622b027eb6ecb8fc2810668 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Apr 2021 14:12:09 -0700 Subject: [PATCH 05/12] chore: bump @types/marked from 2.0.0 to 2.0.1 (#3267) Bumps [@types/marked](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/marked) from 2.0.0 to 2.0.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/marked) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index fd0deb0eda66..78e63c956186 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1918,9 +1918,9 @@ integrity sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q== "@types/marked@*", "@types/marked@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.0.tgz#9319de90410be0ba43d5cad0ede2c26e57edb9eb" - integrity sha512-kSOVa3R6HJvFdd3UIbTYvrSBTPHjXhNErh7/8oSCKOwqdOkk4Oj8N77n+f6dsgd1jW3j3SU5EhnmRxPhNKOmtQ== + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.1.tgz#bbb6d1b570a54652a31953c77972f65b6f9235a4" + integrity sha512-/CFe3HvXMkh7YkJS0DGRsC0hgwWZDZbSCmY/X00bSCnZ4ukS2Glk9veIkRoPu2ElMbKpjxseXn1y9MkTwGHVjw== "@types/minimatch@*": version "3.0.3" From 60f47a032b306c4afa146e12dea352fced241ade Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Apr 2021 14:12:23 -0700 Subject: [PATCH 06/12] chore: bump @commitlint/config-conventional from 12.0.1 to 12.1.1 (#3268) Bumps [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint) from 12.0.1 to 12.1.1. - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/compare/v12.0.1...v12.1.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 78e63c956186..dcee4f3df8a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -330,9 +330,9 @@ yargs "^16.2.0" "@commitlint/config-conventional@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-12.0.1.tgz#7bf3bbf68bda967c5165135ebe8f2055decf1a83" - integrity sha512-1ZhB135lh47zVmf1orwcjxuKuam11fJIH/bdVxW9XiQv8XPwC6iIp19knfl8FcOT78AVBnes1z6EVxgUeP2/4Q== + version "12.1.1" + resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-12.1.1.tgz#73dd3b1a7912138420d248f334f15c94c250bc9e" + integrity sha512-15CqbXMsQiEb0qbzjEHe2OkzaXPYSp7RxaS6KoSVk/4W0QiigquavQ+M0huBZze92h0lMS6Pxoq4AJ5CQ3D+iQ== dependencies: conventional-changelog-conventionalcommits "^4.3.1" From 6f8cfe6f83ee26b66b2146cc17b1205100a54a9c Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Mon, 5 Apr 2021 18:15:01 -0700 Subject: [PATCH 07/12] fix(eslint-plugin): [no-unsafe-argument] handle tuple types on rest arguments (#3269) --- .../src/rules/no-unsafe-argument.ts | 102 ++++++++++++++---- .../tests/rules/no-unsafe-argument.test.ts | 83 +++++++++++++- 2 files changed, 162 insertions(+), 23 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts index 23c8b7bd5080..160519e27683 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts @@ -11,7 +11,31 @@ type MessageIds = | 'unsafeArraySpread' | 'unsafeSpread'; +const enum RestTypeKind { + Array, + Tuple, + Other, +} +type RestType = + | { + type: ts.Type; + kind: RestTypeKind.Array; + index: number; + } + | { + typeArguments: readonly ts.Type[]; + kind: RestTypeKind.Tuple; + index: number; + } + | { + type: ts.Type; + kind: RestTypeKind.Other; + index: number; + }; + class FunctionSignature { + private parameterTypeIndex = 0; + public static create( checker: ts.TypeChecker, tsNode: ts.CallLikeExpression, @@ -22,18 +46,34 @@ class FunctionSignature { } const paramTypes: ts.Type[] = []; - let restType: ts.Type | null = null; + let restType: RestType | null = null; - for (const param of signature.getParameters()) { + const parameters = signature.getParameters(); + for (let i = 0; i < parameters.length; i += 1) { + const param = parameters[i]; const type = checker.getTypeOfSymbolAtLocation(param, tsNode); const decl = param.getDeclarations()?.[0]; if (decl && ts.isParameter(decl) && decl.dotDotDotToken) { // is a rest param if (checker.isArrayType(type)) { - restType = checker.getTypeArguments(type)[0]; + restType = { + type: checker.getTypeArguments(type)[0], + kind: RestTypeKind.Array, + index: i, + }; + } else if (checker.isTupleType(type)) { + restType = { + typeArguments: checker.getTypeArguments(type), + kind: RestTypeKind.Tuple, + index: i, + }; } else { - restType = type; + restType = { + type, + kind: RestTypeKind.Other, + index: i, + }; } break; } @@ -48,12 +88,41 @@ class FunctionSignature { private constructor( private paramTypes: ts.Type[], - private restType: ts.Type | null, + private restType: RestType | null, ) {} - public getParameterType(index: number): ts.Type | null { + public getNextParameterType(): ts.Type | null { + const index = this.parameterTypeIndex; + this.parameterTypeIndex += 1; + if (index >= this.paramTypes.length || this.hasConsumedArguments) { - return this.restType; + if (this.restType == null) { + return null; + } + + switch (this.restType.kind) { + case RestTypeKind.Tuple: { + const typeArguments = this.restType.typeArguments; + if (this.hasConsumedArguments) { + // all types consumed by a rest - just assume it's the last type + // there is one edge case where this is wrong, but we ignore it because + // it's rare and really complicated to handle + // eg: function foo(...a: [number, ...string[], number]) + return typeArguments[typeArguments.length - 1]; + } + + const typeIndex = index - this.restType.index; + if (typeIndex >= typeArguments.length) { + return typeArguments[typeArguments.length - 1]; + } + + return typeArguments[typeIndex]; + } + + case RestTypeKind.Array: + case RestTypeKind.Other: + return this.restType.type; + } } return this.paramTypes[index]; } @@ -112,12 +181,7 @@ export default util.createRule<[], MessageIds>({ return; } - let parameterTypeIndex = 0; - for ( - let i = 0; - i < node.arguments.length; - i += 1, parameterTypeIndex += 1 - ) { + for (let i = 0; i < node.arguments.length; i += 1) { const argument = node.arguments[i]; switch (argument.type) { @@ -146,15 +210,9 @@ export default util.createRule<[], MessageIds>({ const spreadTypeArguments = checker.getTypeArguments( spreadArgType, ); - for ( - let j = 0; - j < spreadTypeArguments.length; - j += 1, parameterTypeIndex += 1 - ) { + for (let j = 0; j < spreadTypeArguments.length; j += 1) { const tupleType = spreadTypeArguments[j]; - const parameterType = signature.getParameterType( - parameterTypeIndex, - ); + const parameterType = signature.getNextParameterType(); if (parameterType == null) { continue; } @@ -188,7 +246,7 @@ export default util.createRule<[], MessageIds>({ } default: { - const parameterType = signature.getParameterType(i); + const parameterType = signature.getNextParameterType(); if (parameterType == null) { continue; } diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts index 395f47344cb2..a9a6bc3eacca 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts @@ -11,9 +11,19 @@ const ruleTester = new RuleTester({ ruleTester.run('no-unsafe-argument', rule, { valid: [ + // unknown function should be ignored + ` +doesNotExist(1 as any); + `, + // non-function call should be ignored + ` +const foo = 1; +foo(1 as any); + `, + // too many arguments should be ignored as this is a TS error ` declare function foo(arg: number): void; -foo(1); +foo(1, 1 as any, 2 as any); `, ` declare function foo(arg: number, arg2: string): void; @@ -60,6 +70,21 @@ foo(new Set(), ...x); declare function foo(arg1: unknown, arg2: Set, arg3: unknown[]): void; foo(1 as any, new Set(), [] as any[]); `, + ` +declare function foo(...params: [number, string, any]): void; +foo(1, 'a', 1 as any); + `, + // Unfortunately - we cannot handle this case because TS infers `params` to be a tuple type + // that tuple type is the same as the type of + ` +declare function foo(...params: E): void; + +foo('a', 'b', 1 as any); + `, + ` +declare function toHaveBeenCalledWith(...params: E): void; +toHaveBeenCalledWith(1 as any); + `, ], invalid: [ { @@ -264,5 +289,61 @@ foo(new Set(), ...x); }, ], }, + { + code: ` +declare function foo(...params: [number, string, any]): void; +foo(1 as any, 'a' as any, 1 as any); + `, + errors: [ + { + messageId: 'unsafeArgument', + line: 3, + column: 5, + endColumn: 13, + data: { + sender: 'any', + receiver: 'number', + }, + }, + { + messageId: 'unsafeArgument', + line: 3, + column: 15, + endColumn: 25, + data: { + sender: 'any', + receiver: 'string', + }, + }, + ], + }, + { + code: ` +declare function foo(param1: string, ...params: [number, string, any]): void; +foo('a', 1 as any, 'a' as any, 1 as any); + `, + errors: [ + { + messageId: 'unsafeArgument', + line: 3, + column: 10, + endColumn: 18, + data: { + sender: 'any', + receiver: 'number', + }, + }, + { + messageId: 'unsafeArgument', + line: 3, + column: 20, + endColumn: 30, + data: { + sender: 'any', + receiver: 'string', + }, + }, + ], + }, ], }); From e6f0698a3123e15ba7b26c2df73515fbdfe37bda Mon Sep 17 00:00:00 2001 From: JounQin Date: Tue, 6 Apr 2021 15:08:06 +0800 Subject: [PATCH 08/12] ci: generate contributors automatically monthly (#3250) --- .github/workflows/generate-contributors.yml | 49 +++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/generate-contributors.yml diff --git a/.github/workflows/generate-contributors.yml b/.github/workflows/generate-contributors.yml new file mode 100644 index 000000000000..3acc1a98429f --- /dev/null +++ b/.github/workflows/generate-contributors.yml @@ -0,0 +1,49 @@ +name: "Generate contributors" + +on: + schedule: + - cron: "0 0 1 * *" + +env: + PRIMARY_NODE_VERSION: 12 + +jobs: + generate-contributors: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ env.PRIMARY_NODE_VERSION }} + uses: actions/setup-node@v2 + with: + node-version: ${{ env.PRIMARY_NODE_VERSION }} + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install dependencies + run: | + yarn --ignore-engines --frozen-lockfile --ignore-scripts + + - name: Generate contributors + run: yarn generate:contributors + + - name: Commit files + run: | + git config --local user.email "actions@github.com" + git config --local user.name "Github Actions" + git commit -am "chore: update contributors [bot]" + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} From a5836be07a21b11ffa3bfedff838af25a6cacd93 Mon Sep 17 00:00:00 2001 From: Yusuke Tanaka Date: Sun, 11 Apr 2021 04:19:43 +0900 Subject: [PATCH 09/12] docs(eslint-plugin): switch check marks to `:white_check_mark:` for visibility (#3277) --- packages/eslint-plugin/README.md | 80 +++++++++---------- packages/eslint-plugin/tests/docs.test.ts | 2 +- .../tools/generate-rules-lists.ts | 4 +- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 32b0cbb72316..537bdab4e916 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -93,16 +93,16 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int -**Key**: :heavy_check_mark: = recommended, :wrench: = fixable, :thought_balloon: = requires type information +**Key**: :white_check_mark: = recommended, :wrench: = fixable, :thought_balloon: = requires type information -| Name | Description | :heavy_check_mark: | :wrench: | :thought_balloon: | +| Name | Description | :white_check_mark: | :wrench: | :thought_balloon: | | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------ | -------- | ----------------- | -| [`@typescript-eslint/adjacent-overload-signatures`](./docs/rules/adjacent-overload-signatures.md) | Require that member overloads be consecutive | :heavy_check_mark: | | | +| [`@typescript-eslint/adjacent-overload-signatures`](./docs/rules/adjacent-overload-signatures.md) | Require that member overloads be consecutive | :white_check_mark: | | | | [`@typescript-eslint/array-type`](./docs/rules/array-type.md) | Requires using either `T[]` or `Array` for arrays | | :wrench: | | -| [`@typescript-eslint/await-thenable`](./docs/rules/await-thenable.md) | Disallows awaiting a value that is not a Thenable | :heavy_check_mark: | | :thought_balloon: | -| [`@typescript-eslint/ban-ts-comment`](./docs/rules/ban-ts-comment.md) | Bans `@ts-` comments from being used or requires descriptions after directive | :heavy_check_mark: | | | +| [`@typescript-eslint/await-thenable`](./docs/rules/await-thenable.md) | Disallows awaiting a value that is not a Thenable | :white_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/ban-ts-comment`](./docs/rules/ban-ts-comment.md) | Bans `@ts-` comments from being used or requires descriptions after directive | :white_check_mark: | | | | [`@typescript-eslint/ban-tslint-comment`](./docs/rules/ban-tslint-comment.md) | Bans `// tslint:` comments from being used | | :wrench: | | -| [`@typescript-eslint/ban-types`](./docs/rules/ban-types.md) | Bans specific types from being used | :heavy_check_mark: | :wrench: | | +| [`@typescript-eslint/ban-types`](./docs/rules/ban-types.md) | Bans specific types from being used | :white_check_mark: | :wrench: | | | [`@typescript-eslint/class-literal-property-style`](./docs/rules/class-literal-property-style.md) | Ensures that literals on classes are exposed in a consistent style | | :wrench: | | | [`@typescript-eslint/consistent-indexed-object-style`](./docs/rules/consistent-indexed-object-style.md) | Enforce or disallow the use of the record type | | :wrench: | | | [`@typescript-eslint/consistent-type-assertions`](./docs/rules/consistent-type-assertions.md) | Enforces consistent usage of type assertions | | | | @@ -110,7 +110,7 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@typescript-eslint/consistent-type-imports`](./docs/rules/consistent-type-imports.md) | Enforces consistent usage of type imports | | :wrench: | | | [`@typescript-eslint/explicit-function-return-type`](./docs/rules/explicit-function-return-type.md) | Require explicit return types on functions and class methods | | | | | [`@typescript-eslint/explicit-member-accessibility`](./docs/rules/explicit-member-accessibility.md) | Require explicit accessibility modifiers on class properties and methods | | :wrench: | | -| [`@typescript-eslint/explicit-module-boundary-types`](./docs/rules/explicit-module-boundary-types.md) | Require explicit return and argument types on exported functions' and classes' public class methods | :heavy_check_mark: | | | +| [`@typescript-eslint/explicit-module-boundary-types`](./docs/rules/explicit-module-boundary-types.md) | Require explicit return and argument types on exported functions' and classes' public class methods | :white_check_mark: | | | | [`@typescript-eslint/member-delimiter-style`](./docs/rules/member-delimiter-style.md) | Require a specific member delimiter style for interfaces and type literals | | :wrench: | | | [`@typescript-eslint/member-ordering`](./docs/rules/member-ordering.md) | Require a consistent member declaration order | | | | | [`@typescript-eslint/method-signature-style`](./docs/rules/method-signature-style.md) | Enforces using a particular method signature syntax. | | :wrench: | | @@ -119,63 +119,63 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@typescript-eslint/no-confusing-non-null-assertion`](./docs/rules/no-confusing-non-null-assertion.md) | Disallow non-null assertion in locations that may be confusing | | :wrench: | | | [`@typescript-eslint/no-confusing-void-expression`](./docs/rules/no-confusing-void-expression.md) | Requires expressions of type void to appear in statement position | | :wrench: | :thought_balloon: | | [`@typescript-eslint/no-dynamic-delete`](./docs/rules/no-dynamic-delete.md) | Disallow the delete operator with computed key expressions | | :wrench: | | -| [`@typescript-eslint/no-empty-interface`](./docs/rules/no-empty-interface.md) | Disallow the declaration of empty interfaces | :heavy_check_mark: | :wrench: | | -| [`@typescript-eslint/no-explicit-any`](./docs/rules/no-explicit-any.md) | Disallow usage of the `any` type | :heavy_check_mark: | :wrench: | | -| [`@typescript-eslint/no-extra-non-null-assertion`](./docs/rules/no-extra-non-null-assertion.md) | Disallow extra non-null assertion | :heavy_check_mark: | :wrench: | | +| [`@typescript-eslint/no-empty-interface`](./docs/rules/no-empty-interface.md) | Disallow the declaration of empty interfaces | :white_check_mark: | :wrench: | | +| [`@typescript-eslint/no-explicit-any`](./docs/rules/no-explicit-any.md) | Disallow usage of the `any` type | :white_check_mark: | :wrench: | | +| [`@typescript-eslint/no-extra-non-null-assertion`](./docs/rules/no-extra-non-null-assertion.md) | Disallow extra non-null assertion | :white_check_mark: | :wrench: | | | [`@typescript-eslint/no-extraneous-class`](./docs/rules/no-extraneous-class.md) | Forbids the use of classes as namespaces | | | | -| [`@typescript-eslint/no-floating-promises`](./docs/rules/no-floating-promises.md) | Requires Promise-like values to be handled appropriately | :heavy_check_mark: | | :thought_balloon: | -| [`@typescript-eslint/no-for-in-array`](./docs/rules/no-for-in-array.md) | Disallow iterating over an array with a for-in loop | :heavy_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/no-floating-promises`](./docs/rules/no-floating-promises.md) | Requires Promise-like values to be handled appropriately | :white_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/no-for-in-array`](./docs/rules/no-for-in-array.md) | Disallow iterating over an array with a for-in loop | :white_check_mark: | | :thought_balloon: | | [`@typescript-eslint/no-implicit-any-catch`](./docs/rules/no-implicit-any-catch.md) | Disallow usage of the implicit `any` type in catch clauses | | :wrench: | | -| [`@typescript-eslint/no-inferrable-types`](./docs/rules/no-inferrable-types.md) | Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean | :heavy_check_mark: | :wrench: | | +| [`@typescript-eslint/no-inferrable-types`](./docs/rules/no-inferrable-types.md) | Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean | :white_check_mark: | :wrench: | | | [`@typescript-eslint/no-invalid-void-type`](./docs/rules/no-invalid-void-type.md) | Disallows usage of `void` type outside of generic or return types | | | | -| [`@typescript-eslint/no-misused-new`](./docs/rules/no-misused-new.md) | Enforce valid definition of `new` and `constructor` | :heavy_check_mark: | | | -| [`@typescript-eslint/no-misused-promises`](./docs/rules/no-misused-promises.md) | Avoid using promises in places not designed to handle them | :heavy_check_mark: | | :thought_balloon: | -| [`@typescript-eslint/no-namespace`](./docs/rules/no-namespace.md) | Disallow the use of custom TypeScript modules and namespaces | :heavy_check_mark: | | | -| [`@typescript-eslint/no-non-null-asserted-optional-chain`](./docs/rules/no-non-null-asserted-optional-chain.md) | Disallows using a non-null assertion after an optional chain expression | :heavy_check_mark: | | | -| [`@typescript-eslint/no-non-null-assertion`](./docs/rules/no-non-null-assertion.md) | Disallows non-null assertions using the `!` postfix operator | :heavy_check_mark: | | | +| [`@typescript-eslint/no-misused-new`](./docs/rules/no-misused-new.md) | Enforce valid definition of `new` and `constructor` | :white_check_mark: | | | +| [`@typescript-eslint/no-misused-promises`](./docs/rules/no-misused-promises.md) | Avoid using promises in places not designed to handle them | :white_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/no-namespace`](./docs/rules/no-namespace.md) | Disallow the use of custom TypeScript modules and namespaces | :white_check_mark: | | | +| [`@typescript-eslint/no-non-null-asserted-optional-chain`](./docs/rules/no-non-null-asserted-optional-chain.md) | Disallows using a non-null assertion after an optional chain expression | :white_check_mark: | | | +| [`@typescript-eslint/no-non-null-assertion`](./docs/rules/no-non-null-assertion.md) | Disallows non-null assertions using the `!` postfix operator | :white_check_mark: | | | | [`@typescript-eslint/no-parameter-properties`](./docs/rules/no-parameter-properties.md) | Disallow the use of parameter properties in class constructors | | | | | [`@typescript-eslint/no-require-imports`](./docs/rules/no-require-imports.md) | Disallows invocation of `require()` | | | | -| [`@typescript-eslint/no-this-alias`](./docs/rules/no-this-alias.md) | Disallow aliasing `this` | :heavy_check_mark: | | | +| [`@typescript-eslint/no-this-alias`](./docs/rules/no-this-alias.md) | Disallow aliasing `this` | :white_check_mark: | | | | [`@typescript-eslint/no-type-alias`](./docs/rules/no-type-alias.md) | Disallow the use of type aliases | | | | | [`@typescript-eslint/no-unnecessary-boolean-literal-compare`](./docs/rules/no-unnecessary-boolean-literal-compare.md) | Flags unnecessary equality comparisons against boolean literals | | :wrench: | :thought_balloon: | | [`@typescript-eslint/no-unnecessary-condition`](./docs/rules/no-unnecessary-condition.md) | Prevents conditionals where the type is always truthy or always falsy | | :wrench: | :thought_balloon: | | [`@typescript-eslint/no-unnecessary-qualifier`](./docs/rules/no-unnecessary-qualifier.md) | Warns when a namespace qualifier is unnecessary | | :wrench: | :thought_balloon: | | [`@typescript-eslint/no-unnecessary-type-arguments`](./docs/rules/no-unnecessary-type-arguments.md) | Enforces that type arguments will not be used if not required | | :wrench: | :thought_balloon: | -| [`@typescript-eslint/no-unnecessary-type-assertion`](./docs/rules/no-unnecessary-type-assertion.md) | Warns if a type assertion does not change the type of an expression | :heavy_check_mark: | :wrench: | :thought_balloon: | +| [`@typescript-eslint/no-unnecessary-type-assertion`](./docs/rules/no-unnecessary-type-assertion.md) | Warns if a type assertion does not change the type of an expression | :white_check_mark: | :wrench: | :thought_balloon: | | [`@typescript-eslint/no-unnecessary-type-constraint`](./docs/rules/no-unnecessary-type-constraint.md) | Disallows unnecessary constraints on generic types | | :wrench: | | | [`@typescript-eslint/no-unsafe-argument`](./docs/rules/no-unsafe-argument.md) | Disallows calling an function with an any type value | | | :thought_balloon: | -| [`@typescript-eslint/no-unsafe-assignment`](./docs/rules/no-unsafe-assignment.md) | Disallows assigning any to variables and properties | :heavy_check_mark: | | :thought_balloon: | -| [`@typescript-eslint/no-unsafe-call`](./docs/rules/no-unsafe-call.md) | Disallows calling an any type value | :heavy_check_mark: | | :thought_balloon: | -| [`@typescript-eslint/no-unsafe-member-access`](./docs/rules/no-unsafe-member-access.md) | Disallows member access on any typed variables | :heavy_check_mark: | | :thought_balloon: | -| [`@typescript-eslint/no-unsafe-return`](./docs/rules/no-unsafe-return.md) | Disallows returning any from a function | :heavy_check_mark: | | :thought_balloon: | -| [`@typescript-eslint/no-var-requires`](./docs/rules/no-var-requires.md) | Disallows the use of require statements except in import statements | :heavy_check_mark: | | | +| [`@typescript-eslint/no-unsafe-assignment`](./docs/rules/no-unsafe-assignment.md) | Disallows assigning any to variables and properties | :white_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/no-unsafe-call`](./docs/rules/no-unsafe-call.md) | Disallows calling an any type value | :white_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/no-unsafe-member-access`](./docs/rules/no-unsafe-member-access.md) | Disallows member access on any typed variables | :white_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/no-unsafe-return`](./docs/rules/no-unsafe-return.md) | Disallows returning any from a function | :white_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/no-var-requires`](./docs/rules/no-var-requires.md) | Disallows the use of require statements except in import statements | :white_check_mark: | | | | [`@typescript-eslint/non-nullable-type-assertion-style`](./docs/rules/non-nullable-type-assertion-style.md) | Prefers a non-null assertion over explicit type cast when possible | | :wrench: | :thought_balloon: | -| [`@typescript-eslint/prefer-as-const`](./docs/rules/prefer-as-const.md) | Prefer usage of `as const` over literal type | :heavy_check_mark: | :wrench: | | +| [`@typescript-eslint/prefer-as-const`](./docs/rules/prefer-as-const.md) | Prefer usage of `as const` over literal type | :white_check_mark: | :wrench: | | | [`@typescript-eslint/prefer-enum-initializers`](./docs/rules/prefer-enum-initializers.md) | Prefer initializing each enums member value | | | | | [`@typescript-eslint/prefer-for-of`](./docs/rules/prefer-for-of.md) | Prefer a ‘for-of’ loop over a standard ‘for’ loop if the index is only used to access the array being iterated | | | | | [`@typescript-eslint/prefer-function-type`](./docs/rules/prefer-function-type.md) | Use function types instead of interfaces with call signatures | | :wrench: | | | [`@typescript-eslint/prefer-includes`](./docs/rules/prefer-includes.md) | Enforce `includes` method over `indexOf` method | | :wrench: | :thought_balloon: | | [`@typescript-eslint/prefer-literal-enum-member`](./docs/rules/prefer-literal-enum-member.md) | Require that all enum members be literal values to prevent unintended enum member name shadow issues | | | | -| [`@typescript-eslint/prefer-namespace-keyword`](./docs/rules/prefer-namespace-keyword.md) | Require the use of the `namespace` keyword instead of the `module` keyword to declare custom TypeScript modules | :heavy_check_mark: | :wrench: | | +| [`@typescript-eslint/prefer-namespace-keyword`](./docs/rules/prefer-namespace-keyword.md) | Require the use of the `namespace` keyword instead of the `module` keyword to declare custom TypeScript modules | :white_check_mark: | :wrench: | | | [`@typescript-eslint/prefer-nullish-coalescing`](./docs/rules/prefer-nullish-coalescing.md) | Enforce the usage of the nullish coalescing operator instead of logical chaining | | | :thought_balloon: | | [`@typescript-eslint/prefer-optional-chain`](./docs/rules/prefer-optional-chain.md) | Prefer using concise optional chain expressions instead of chained logical ands | | | | | [`@typescript-eslint/prefer-readonly`](./docs/rules/prefer-readonly.md) | Requires that private members are marked as `readonly` if they're never modified outside of the constructor | | :wrench: | :thought_balloon: | | [`@typescript-eslint/prefer-readonly-parameter-types`](./docs/rules/prefer-readonly-parameter-types.md) | Requires that function parameters are typed as readonly to prevent accidental mutation of inputs | | | :thought_balloon: | | [`@typescript-eslint/prefer-reduce-type-parameter`](./docs/rules/prefer-reduce-type-parameter.md) | Prefer using type parameter when calling `Array#reduce` instead of casting | | :wrench: | :thought_balloon: | -| [`@typescript-eslint/prefer-regexp-exec`](./docs/rules/prefer-regexp-exec.md) | Enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided | :heavy_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/prefer-regexp-exec`](./docs/rules/prefer-regexp-exec.md) | Enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided | :white_check_mark: | | :thought_balloon: | | [`@typescript-eslint/prefer-string-starts-ends-with`](./docs/rules/prefer-string-starts-ends-with.md) | Enforce the use of `String#startsWith` and `String#endsWith` instead of other equivalent methods of checking substrings | | :wrench: | :thought_balloon: | | [`@typescript-eslint/prefer-ts-expect-error`](./docs/rules/prefer-ts-expect-error.md) | Recommends using `@ts-expect-error` over `@ts-ignore` | | :wrench: | | | [`@typescript-eslint/promise-function-async`](./docs/rules/promise-function-async.md) | Requires any function or method that returns a Promise to be marked async | | :wrench: | :thought_balloon: | | [`@typescript-eslint/require-array-sort-compare`](./docs/rules/require-array-sort-compare.md) | Requires `Array#sort` calls to always provide a `compareFunction` | | | :thought_balloon: | -| [`@typescript-eslint/restrict-plus-operands`](./docs/rules/restrict-plus-operands.md) | When adding two variables, operands must both be of type number or of type string | :heavy_check_mark: | | :thought_balloon: | -| [`@typescript-eslint/restrict-template-expressions`](./docs/rules/restrict-template-expressions.md) | Enforce template literal expressions to be of string type | :heavy_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/restrict-plus-operands`](./docs/rules/restrict-plus-operands.md) | When adding two variables, operands must both be of type number or of type string | :white_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/restrict-template-expressions`](./docs/rules/restrict-template-expressions.md) | Enforce template literal expressions to be of string type | :white_check_mark: | | :thought_balloon: | | [`@typescript-eslint/sort-type-union-intersection-members`](./docs/rules/sort-type-union-intersection-members.md) | Enforces that members of a type union/intersection are sorted alphabetically | | :wrench: | | | [`@typescript-eslint/strict-boolean-expressions`](./docs/rules/strict-boolean-expressions.md) | Restricts the types allowed in boolean expressions | | :wrench: | :thought_balloon: | | [`@typescript-eslint/switch-exhaustiveness-check`](./docs/rules/switch-exhaustiveness-check.md) | Exhaustiveness checking in switch with union type | | | :thought_balloon: | -| [`@typescript-eslint/triple-slash-reference`](./docs/rules/triple-slash-reference.md) | Sets preference level for triple slash directives versus ES6-style import declarations | :heavy_check_mark: | | | +| [`@typescript-eslint/triple-slash-reference`](./docs/rules/triple-slash-reference.md) | Sets preference level for triple slash directives versus ES6-style import declarations | :white_check_mark: | | | | [`@typescript-eslint/type-annotation-spacing`](./docs/rules/type-annotation-spacing.md) | Require consistent spacing around type annotations | | :wrench: | | | [`@typescript-eslint/typedef`](./docs/rules/typedef.md) | Requires type annotations to exist | | | | -| [`@typescript-eslint/unbound-method`](./docs/rules/unbound-method.md) | Enforces unbound methods are called with their expected scope | :heavy_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/unbound-method`](./docs/rules/unbound-method.md) | Enforces unbound methods are called with their expected scope | :white_check_mark: | | :thought_balloon: | | [`@typescript-eslint/unified-signatures`](./docs/rules/unified-signatures.md) | Warns for any two overloads that could be unified into one by using a union or an optional/rest parameter | | | | @@ -187,9 +187,9 @@ In these cases, we create what we call an extension rule; a rule within our plug -**Key**: :heavy_check_mark: = recommended, :wrench: = fixable, :thought_balloon: = requires type information +**Key**: :white_check_mark: = recommended, :wrench: = fixable, :thought_balloon: = requires type information -| Name | Description | :heavy_check_mark: | :wrench: | :thought_balloon: | +| Name | Description | :white_check_mark: | :wrench: | :thought_balloon: | | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------ | -------- | ----------------- | | [`@typescript-eslint/brace-style`](./docs/rules/brace-style.md) | Enforce consistent brace style for blocks | | :wrench: | | | [`@typescript-eslint/comma-dangle`](./docs/rules/comma-dangle.md) | Require or disallow trailing comma | | :wrench: | | @@ -201,13 +201,13 @@ In these cases, we create what we call an extension rule; a rule within our plug | [`@typescript-eslint/init-declarations`](./docs/rules/init-declarations.md) | require or disallow initialization in variable declarations | | | | | [`@typescript-eslint/keyword-spacing`](./docs/rules/keyword-spacing.md) | Enforce consistent spacing before and after keywords | | :wrench: | | | [`@typescript-eslint/lines-between-class-members`](./docs/rules/lines-between-class-members.md) | Require or disallow an empty line between class members | | :wrench: | | -| [`@typescript-eslint/no-array-constructor`](./docs/rules/no-array-constructor.md) | Disallow generic `Array` constructors | :heavy_check_mark: | :wrench: | | +| [`@typescript-eslint/no-array-constructor`](./docs/rules/no-array-constructor.md) | Disallow generic `Array` constructors | :white_check_mark: | :wrench: | | | [`@typescript-eslint/no-dupe-class-members`](./docs/rules/no-dupe-class-members.md) | Disallow duplicate class members | | | | | [`@typescript-eslint/no-duplicate-imports`](./docs/rules/no-duplicate-imports.md) | Disallow duplicate imports | | | | -| [`@typescript-eslint/no-empty-function`](./docs/rules/no-empty-function.md) | Disallow empty functions | :heavy_check_mark: | | | +| [`@typescript-eslint/no-empty-function`](./docs/rules/no-empty-function.md) | Disallow empty functions | :white_check_mark: | | | | [`@typescript-eslint/no-extra-parens`](./docs/rules/no-extra-parens.md) | Disallow unnecessary parentheses | | :wrench: | | -| [`@typescript-eslint/no-extra-semi`](./docs/rules/no-extra-semi.md) | Disallow unnecessary semicolons | :heavy_check_mark: | :wrench: | | -| [`@typescript-eslint/no-implied-eval`](./docs/rules/no-implied-eval.md) | Disallow the use of `eval()`-like methods | :heavy_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/no-extra-semi`](./docs/rules/no-extra-semi.md) | Disallow unnecessary semicolons | :white_check_mark: | :wrench: | | +| [`@typescript-eslint/no-implied-eval`](./docs/rules/no-implied-eval.md) | Disallow the use of `eval()`-like methods | :white_check_mark: | | :thought_balloon: | | [`@typescript-eslint/no-invalid-this`](./docs/rules/no-invalid-this.md) | Disallow `this` keywords outside of classes or class-like objects | | | | | [`@typescript-eslint/no-loop-func`](./docs/rules/no-loop-func.md) | Disallow function declarations that contain unsafe references inside loop statements | | | | | [`@typescript-eslint/no-loss-of-precision`](./docs/rules/no-loss-of-precision.md) | Disallow literal numbers that lose precision | | | | @@ -216,12 +216,12 @@ In these cases, we create what we call an extension rule; a rule within our plug | [`@typescript-eslint/no-shadow`](./docs/rules/no-shadow.md) | Disallow variable declarations from shadowing variables declared in the outer scope | | | | | [`@typescript-eslint/no-throw-literal`](./docs/rules/no-throw-literal.md) | Disallow throwing literals as exceptions | | | :thought_balloon: | | [`@typescript-eslint/no-unused-expressions`](./docs/rules/no-unused-expressions.md) | Disallow unused expressions | | | | -| [`@typescript-eslint/no-unused-vars`](./docs/rules/no-unused-vars.md) | Disallow unused variables | :heavy_check_mark: | | | +| [`@typescript-eslint/no-unused-vars`](./docs/rules/no-unused-vars.md) | Disallow unused variables | :white_check_mark: | | | | [`@typescript-eslint/no-use-before-define`](./docs/rules/no-use-before-define.md) | Disallow the use of variables before they are defined | | | | | [`@typescript-eslint/no-useless-constructor`](./docs/rules/no-useless-constructor.md) | Disallow unnecessary constructors | | | | | [`@typescript-eslint/object-curly-spacing`](./docs/rules/object-curly-spacing.md) | Enforce consistent spacing inside braces | | :wrench: | | | [`@typescript-eslint/quotes`](./docs/rules/quotes.md) | Enforce the consistent use of either backticks, double, or single quotes | | :wrench: | | -| [`@typescript-eslint/require-await`](./docs/rules/require-await.md) | Disallow async functions which have no `await` expression | :heavy_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/require-await`](./docs/rules/require-await.md) | Disallow async functions which have no `await` expression | :white_check_mark: | | :thought_balloon: | | [`@typescript-eslint/return-await`](./docs/rules/return-await.md) | Enforces consistent returning of awaited values | | :wrench: | :thought_balloon: | | [`@typescript-eslint/semi`](./docs/rules/semi.md) | Require or disallow semicolons instead of ASI | | :wrench: | | | [`@typescript-eslint/space-before-function-paren`](./docs/rules/space-before-function-paren.md) | Enforces consistent spacing before function parenthesis | | :wrench: | | diff --git a/packages/eslint-plugin/tests/docs.test.ts b/packages/eslint-plugin/tests/docs.test.ts index 103caeb58ad1..7223df50b90e 100644 --- a/packages/eslint-plugin/tests/docs.test.ts +++ b/packages/eslint-plugin/tests/docs.test.ts @@ -157,7 +157,7 @@ describe('Validating README.md', () => { it('Recommended column should be correct', () => { expect(ruleRow[2]).toEqual( - rule.meta.docs?.recommended ? ':heavy_check_mark:' : '', + rule.meta.docs?.recommended ? ':white_check_mark:' : '', ); }); diff --git a/packages/eslint-plugin/tools/generate-rules-lists.ts b/packages/eslint-plugin/tools/generate-rules-lists.ts index cffe400692c8..65faf6f2aa20 100644 --- a/packages/eslint-plugin/tools/generate-rules-lists.ts +++ b/packages/eslint-plugin/tools/generate-rules-lists.ts @@ -19,13 +19,13 @@ interface RuleDetails { type RuleColumn = [ string, string, - ':heavy_check_mark:' | '', + ':white_check_mark:' | '', ':wrench:' | '', ':thought_balloon:' | '', ]; const emojiKey = { - recommended: ':heavy_check_mark:', + recommended: ':white_check_mark:', fixable: ':wrench:', requiresTypeChecking: ':thought_balloon:', } as const; From e2cbeefb3d9a7cce257b5675f7f19f1b159a9d26 Mon Sep 17 00:00:00 2001 From: Nikita Stefaniak Date: Sat, 10 Apr 2021 21:54:01 +0200 Subject: [PATCH 10/12] feat(eslint-plugin): [prefer-regexp-exec] add autofix (#3207) --- packages/eslint-plugin/README.md | 2 +- .../src/rules/prefer-regexp-exec.ts | 96 +++++- .../src/util/getWrappingFixer.ts | 215 ++++++++---- .../tests/rules/prefer-regexp-exec.test.ts | 76 ++++- .../rules/strict-boolean-expressions.test.ts | 31 +- .../tests/util/getWrappingFixer.test.ts | 311 ++++++++++++++++++ 6 files changed, 632 insertions(+), 99 deletions(-) create mode 100644 packages/eslint-plugin/tests/util/getWrappingFixer.test.ts diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 537bdab4e916..344764dcb96b 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -162,7 +162,7 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@typescript-eslint/prefer-readonly`](./docs/rules/prefer-readonly.md) | Requires that private members are marked as `readonly` if they're never modified outside of the constructor | | :wrench: | :thought_balloon: | | [`@typescript-eslint/prefer-readonly-parameter-types`](./docs/rules/prefer-readonly-parameter-types.md) | Requires that function parameters are typed as readonly to prevent accidental mutation of inputs | | | :thought_balloon: | | [`@typescript-eslint/prefer-reduce-type-parameter`](./docs/rules/prefer-reduce-type-parameter.md) | Prefer using type parameter when calling `Array#reduce` instead of casting | | :wrench: | :thought_balloon: | -| [`@typescript-eslint/prefer-regexp-exec`](./docs/rules/prefer-regexp-exec.md) | Enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided | :white_check_mark: | | :thought_balloon: | +| [`@typescript-eslint/prefer-regexp-exec`](./docs/rules/prefer-regexp-exec.md) | Enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided | :white_check_mark: | :wrench: | :thought_balloon: | | [`@typescript-eslint/prefer-string-starts-ends-with`](./docs/rules/prefer-string-starts-ends-with.md) | Enforce the use of `String#startsWith` and `String#endsWith` instead of other equivalent methods of checking substrings | | :wrench: | :thought_balloon: | | [`@typescript-eslint/prefer-ts-expect-error`](./docs/rules/prefer-ts-expect-error.md) | Recommends using `@ts-expect-error` over `@ts-ignore` | | :wrench: | | | [`@typescript-eslint/promise-function-async`](./docs/rules/promise-function-async.md) | Requires any function or method that returns a Promise to be marked async | | :wrench: | :thought_balloon: | diff --git a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts index dda6f15d3a5c..d78c4496164d 100644 --- a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts +++ b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts @@ -1,9 +1,13 @@ -import { TSESTree } from '@typescript-eslint/experimental-utils'; +import { + AST_NODE_TYPES, + TSESTree, +} from '@typescript-eslint/experimental-utils'; import { createRule, getParserServices, getStaticValue, getTypeName, + getWrappingFixer, } from '../util'; export default createRule({ @@ -12,6 +16,7 @@ export default createRule({ meta: { type: 'suggestion', + fixable: 'code', docs: { description: 'Enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided', @@ -27,44 +32,103 @@ export default createRule({ create(context) { const globalScope = context.getScope(); - const service = getParserServices(context); - const typeChecker = service.program.getTypeChecker(); + const parserServices = getParserServices(context); + const typeChecker = parserServices.program.getTypeChecker(); + const sourceCode = context.getSourceCode(); /** * Check if a given node is a string. * @param node The node to check. */ - function isStringType(node: TSESTree.LeftHandSideExpression): boolean { + function isStringType(node: TSESTree.Expression): boolean { const objectType = typeChecker.getTypeAtLocation( - service.esTreeNodeToTSNodeMap.get(node), + parserServices.esTreeNodeToTSNodeMap.get(node), ); return getTypeName(typeChecker, objectType) === 'string'; } + /** + * Check if a given node is a RegExp. + * @param node The node to check. + */ + function isRegExpType(node: TSESTree.Expression): boolean { + const objectType = typeChecker.getTypeAtLocation( + parserServices.esTreeNodeToTSNodeMap.get(node), + ); + return getTypeName(typeChecker, objectType) === 'RegExp'; + } + return { "CallExpression[arguments.length=1] > MemberExpression.callee[property.name='match'][computed=false]"( - node: TSESTree.MemberExpression, + memberNode: TSESTree.MemberExpression, ): void { - const callNode = node.parent as TSESTree.CallExpression; - const arg = callNode.arguments[0]; - const evaluated = getStaticValue(arg, globalScope); + const objectNode = memberNode.object; + const callNode = memberNode.parent as TSESTree.CallExpression; + const argumentNode = callNode.arguments[0]; + const argumentValue = getStaticValue(argumentNode, globalScope); + + if (!isStringType(objectNode)) { + return; + } // Don't report regular expressions with global flag. if ( - evaluated && - evaluated.value instanceof RegExp && - evaluated.value.flags.includes('g') + argumentValue && + argumentValue.value instanceof RegExp && + argumentValue.value.flags.includes('g') ) { return; } - if (isStringType(node.object)) { - context.report({ - node: callNode, + if ( + argumentNode.type === AST_NODE_TYPES.Literal && + typeof argumentNode.value == 'string' + ) { + const regExp = RegExp(argumentNode.value); + return context.report({ + node: memberNode.property, messageId: 'regExpExecOverStringMatch', + fix: getWrappingFixer({ + sourceCode, + node: callNode, + innerNode: [objectNode], + wrap: objectCode => `${regExp.toString()}.exec(${objectCode})`, + }), + }); + } + + if (isRegExpType(argumentNode)) { + return context.report({ + node: memberNode.property, + messageId: 'regExpExecOverStringMatch', + fix: getWrappingFixer({ + sourceCode, + node: callNode, + innerNode: [objectNode, argumentNode], + wrap: (objectCode, argumentCode) => + `${argumentCode}.exec(${objectCode})`, + }), }); - return; } + + if (isStringType(argumentNode)) { + return context.report({ + node: memberNode.property, + messageId: 'regExpExecOverStringMatch', + fix: getWrappingFixer({ + sourceCode, + node: callNode, + innerNode: [objectNode, argumentNode], + wrap: (objectCode, argumentCode) => + `RegExp(${argumentCode}).exec(${objectCode})`, + }), + }); + } + + return context.report({ + node: memberNode.property, + messageId: 'regExpExecOverStringMatch', + }); }, }; }, diff --git a/packages/eslint-plugin/src/util/getWrappingFixer.ts b/packages/eslint-plugin/src/util/getWrappingFixer.ts index 4a9edcfcc98b..00c00e748829 100644 --- a/packages/eslint-plugin/src/util/getWrappingFixer.ts +++ b/packages/eslint-plugin/src/util/getWrappingFixer.ts @@ -3,6 +3,7 @@ import { TSESLint, TSESTree, } from '@typescript-eslint/experimental-utils'; +import { SourceCode } from '@typescript-eslint/experimental-utils/src/ts-eslint'; import * as util from '../util'; interface WrappingFixerParams { @@ -14,13 +15,15 @@ interface WrappingFixerParams { * Descendant of `node` we want to preserve. * Use this to replace some code with another. * By default it's the node we are modifying (so nothing is removed). + * You can pass multiple nodes as an array. */ - innerNode?: TSESTree.Node; + innerNode?: TSESTree.Node | TSESTree.Node[]; /** * The function which gets the code of the `innerNode` and returns some code around it. + * Receives multiple arguments if there are multiple innerNodes. * E.g. ``code => `${code} != null` `` */ - wrap: (code: string) => string; + wrap: (...code: string[]) => string; } /** @@ -31,38 +34,27 @@ export function getWrappingFixer( params: WrappingFixerParams, ): TSESLint.ReportFixFunction { const { sourceCode, node, innerNode = node, wrap } = params; + const innerNodes = Array.isArray(innerNode) ? innerNode : [innerNode]; + return (fixer): TSESLint.RuleFix => { - let code = sourceCode.getText(innerNode); - - // check the inner expression's precedence - if ( - innerNode.type !== AST_NODE_TYPES.Literal && - innerNode.type !== AST_NODE_TYPES.Identifier && - innerNode.type !== AST_NODE_TYPES.MemberExpression && - innerNode.type !== AST_NODE_TYPES.CallExpression - ) { - // we are wrapping something else than a simple variable or function call - // the code we are adding might have stronger precedence than our wrapped node - // let's wrap our node in parens in case it has a weaker precedence than the code we are wrapping it in - code = `(${code})`; - } + const innerCodes = innerNodes.map(innerNode => { + let code = sourceCode.getText(innerNode); - // do the wrapping - code = wrap(code); + // check the inner expression's precedence + if (!isStrongPrecedenceNode(innerNode)) { + // the code we are adding might have stronger precedence than our wrapped node + // let's wrap our node in parens in case it has a weaker precedence than the code we are wrapping it in + code = `(${code})`; + } + + return code; + }); - let parent = util.nullThrows( - node.parent, - util.NullThrowsReasons.MissingParent, - ); + // do the wrapping + let code = wrap(...innerCodes); // check the outer expression's precedence - if ( - parent.type !== AST_NODE_TYPES.IfStatement && - parent.type !== AST_NODE_TYPES.ForStatement && - parent.type !== AST_NODE_TYPES.WhileStatement && - parent.type !== AST_NODE_TYPES.DoWhileStatement - ) { - // the whole expression's parent is something else than condition of if/for/while + if (isWeakPrecedenceParent(node)) { // we wrapped the node in some expression which very likely has a different precedence than original wrapped node // let's wrap the whole expression in parens just in case if (!util.isParenthesized(node, sourceCode)) { @@ -71,39 +63,150 @@ export function getWrappingFixer( } // check if we need to insert semicolon - for (;;) { - const prevParent = parent; - parent = parent.parent!; + if (/^[`([]/.exec(code) && isMissingSemicolonBefore(node, sourceCode)) { + code = `;${code}`; + } + + return fixer.replaceText(node, code); + }; +} + +/** + * Check if a node will always have the same precedence if it's parent changes. + */ +function isStrongPrecedenceNode(innerNode: TSESTree.Node): boolean { + return ( + innerNode.type === AST_NODE_TYPES.Literal || + innerNode.type === AST_NODE_TYPES.Identifier || + innerNode.type === AST_NODE_TYPES.ArrayExpression || + innerNode.type === AST_NODE_TYPES.ObjectExpression || + innerNode.type === AST_NODE_TYPES.MemberExpression || + innerNode.type === AST_NODE_TYPES.CallExpression || + innerNode.type === AST_NODE_TYPES.NewExpression || + innerNode.type === AST_NODE_TYPES.TaggedTemplateExpression + ); +} + +/** + * Check if a node's parent could have different precedence if the node changes. + */ +function isWeakPrecedenceParent(node: TSESTree.Node): boolean { + const parent = node.parent!; + + if ( + parent.type === AST_NODE_TYPES.UpdateExpression || + parent.type === AST_NODE_TYPES.UnaryExpression || + parent.type === AST_NODE_TYPES.BinaryExpression || + parent.type === AST_NODE_TYPES.LogicalExpression || + parent.type === AST_NODE_TYPES.ConditionalExpression || + parent.type === AST_NODE_TYPES.AwaitExpression + ) { + return true; + } + + if ( + parent.type === AST_NODE_TYPES.MemberExpression && + parent.object === node + ) { + return true; + } + + if ( + (parent.type === AST_NODE_TYPES.CallExpression || + parent.type === AST_NODE_TYPES.NewExpression) && + parent.callee === node + ) { + return true; + } + + if ( + parent.type === AST_NODE_TYPES.TaggedTemplateExpression && + parent.tag === node + ) { + return true; + } + + return false; +} + +/** + * Returns true if a node is at the beginning of expression statement and the statement above doesn't end with semicolon. + * Doesn't check if the node begins with `(`, `[` or `` ` ``. + */ +function isMissingSemicolonBefore( + node: TSESTree.Node, + sourceCode: SourceCode, +): boolean { + for (;;) { + const parent = node.parent!; + + if (parent.type === AST_NODE_TYPES.ExpressionStatement) { + const block = parent.parent!; if ( - parent.type === AST_NODE_TYPES.LogicalExpression || - parent.type === AST_NODE_TYPES.BinaryExpression + block.type === AST_NODE_TYPES.Program || + block.type === AST_NODE_TYPES.BlockStatement ) { - if (parent.left === prevParent) { - // the next parent is a binary expression and current node is on the left - continue; - } - } - if (parent.type === AST_NODE_TYPES.ExpressionStatement) { - const block = parent.parent!; + // parent is an expression statement in a block + const statementIndex = block.body.indexOf(parent); + const previousStatement = block.body[statementIndex - 1]; if ( - block.type === AST_NODE_TYPES.Program || - block.type === AST_NODE_TYPES.BlockStatement + statementIndex > 0 && + sourceCode.getLastToken(previousStatement)!.value !== ';' ) { - // the next parent is an expression in a block - const statementIndex = block.body.indexOf(parent); - const previousStatement = block.body[statementIndex - 1]; - if ( - statementIndex > 0 && - sourceCode.getLastToken(previousStatement)!.value !== ';' - ) { - // the previous statement in a block doesn't end with a semicolon - code = `;${code}`; - } + return true; } } - break; } - return fixer.replaceText(node, code); - }; + if (!isLeftHandSide(node)) { + return false; + } + + node = parent; + } +} + +/** + * Checks if a node is LHS of an operator. + */ +function isLeftHandSide(node: TSESTree.Node): boolean { + const parent = node.parent!; + + // a++ + if (parent.type === AST_NODE_TYPES.UpdateExpression) { + return true; + } + + // a + b + if ( + (parent.type === AST_NODE_TYPES.BinaryExpression || + parent.type === AST_NODE_TYPES.LogicalExpression || + parent.type === AST_NODE_TYPES.AssignmentExpression) && + node === parent.left + ) { + return true; + } + + // a ? b : c + if ( + parent.type === AST_NODE_TYPES.ConditionalExpression && + node === parent.test + ) { + return true; + } + + // a(b) + if (parent.type === AST_NODE_TYPES.CallExpression && node === parent.callee) { + return true; + } + + // a`b` + if ( + parent.type === AST_NODE_TYPES.TaggedTemplateExpression && + node === parent.tag + ) { + return true; + } + + return false; } diff --git a/packages/eslint-plugin/tests/rules/prefer-regexp-exec.test.ts b/packages/eslint-plugin/tests/rules/prefer-regexp-exec.test.ts index fc97766f9f7f..243c4e065b98 100644 --- a/packages/eslint-plugin/tests/rules/prefer-regexp-exec.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-regexp-exec.test.ts @@ -41,9 +41,21 @@ function f(s: string | string[]) { { messageId: 'regExpExecOverStringMatch', line: 1, - column: 1, + column: 13, }, ], + output: "/thing/.exec('something');", + }, + { + code: "'something'.match('^[a-z]+thing/?$');", + errors: [ + { + messageId: 'regExpExecOverStringMatch', + line: 1, + column: 13, + }, + ], + output: "/^[a-z]+thing\\/?$/.exec('something');", }, { code: ` @@ -55,9 +67,33 @@ text.match(search); { messageId: 'regExpExecOverStringMatch', line: 4, - column: 1, + column: 6, }, ], + output: ` +const text = 'something'; +const search = /thing/; +search.exec(text); + `, + }, + { + code: ` +const text = 'something'; +const search = 'thing'; +text.match(search); + `, + errors: [ + { + messageId: 'regExpExecOverStringMatch', + line: 4, + column: 6, + }, + ], + output: ` +const text = 'something'; +const search = 'thing'; +RegExp(search).exec(text); + `, }, { code: "'212'.match(2);", @@ -65,7 +101,7 @@ text.match(search); { messageId: 'regExpExecOverStringMatch', line: 1, - column: 1, + column: 7, }, ], }, @@ -75,7 +111,7 @@ text.match(search); { messageId: 'regExpExecOverStringMatch', line: 1, - column: 1, + column: 7, }, ], }, @@ -85,7 +121,7 @@ text.match(search); { messageId: 'regExpExecOverStringMatch', line: 1, - column: 1, + column: 9, }, ], }, @@ -96,7 +132,7 @@ text.match(search); { messageId: 'regExpExecOverStringMatch', line: 1, - column: 1, + column: 60, }, ], }, @@ -107,7 +143,7 @@ text.match(search); { messageId: 'regExpExecOverStringMatch', line: 1, - column: 1, + column: 60, }, ], }, @@ -118,7 +154,7 @@ text.match(search); { messageId: 'regExpExecOverStringMatch', line: 1, - column: 1, + column: 60, }, ], }, @@ -128,7 +164,7 @@ text.match(search); { messageId: 'regExpExecOverStringMatch', line: 1, - column: 1, + column: 17, }, ], }, @@ -142,9 +178,14 @@ function f(s: 'a' | 'b') { { messageId: 'regExpExecOverStringMatch', line: 3, - column: 3, + column: 5, }, ], + output: ` +function f(s: 'a' | 'b') { + /a/.exec(s); +} + `, }, { code: ` @@ -157,9 +198,15 @@ function f(s: SafeString) { { messageId: 'regExpExecOverStringMatch', line: 4, - column: 3, + column: 5, }, ], + output: ` +type SafeString = string & { __HTML_ESCAPED__: void }; +function f(s: SafeString) { + /thing/.exec(s); +} + `, }, { code: ` @@ -171,9 +218,14 @@ function f(s: T) { { messageId: 'regExpExecOverStringMatch', line: 3, - column: 3, + column: 5, }, ], + output: ` +function f(s: T) { + /thing/.exec(s); +} + `, }, ], }); diff --git a/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts b/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts index 33ec5ba1badb..649d069faeec 100644 --- a/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts +++ b/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts @@ -515,16 +515,16 @@ if (y) { { messageId: 'conditionFixCompareZero', // TODO: fix compare zero suggestion for bigint - output: ` (x: bigint) => (x === 0);`, + output: ` (x: bigint) => x === 0;`, }, { // TODO: remove check NaN suggestion for bigint messageId: 'conditionFixCompareNaN', - output: ` (x: bigint) => (Number.isNaN(x));`, + output: ` (x: bigint) => Number.isNaN(x);`, }, { messageId: 'conditionFixCastBoolean', - output: ` (x: bigint) => (!Boolean(x));`, + output: ` (x: bigint) => !Boolean(x);`, }, ], }, @@ -554,15 +554,15 @@ if (y) { suggestions: [ { messageId: 'conditionFixCompareZero', - output: ` ([]["length"] === 0); // doesn't count as array.length when computed`, + output: ` []["length"] === 0; // doesn't count as array.length when computed`, }, { messageId: 'conditionFixCompareNaN', - output: ` (Number.isNaN([]["length"])); // doesn't count as array.length when computed`, + output: ` Number.isNaN([]["length"]); // doesn't count as array.length when computed`, }, { messageId: 'conditionFixCastBoolean', - output: ` (!Boolean([]["length"])); // doesn't count as array.length when computed`, + output: ` !Boolean([]["length"]); // doesn't count as array.length when computed`, }, ], }, @@ -658,7 +658,7 @@ if (y) { }, { messageId: 'conditionFixCompareFalse', - output: ` (x?: boolean) => (x === false);`, + output: ` (x?: boolean) => x === false;`, }, ], }, @@ -695,7 +695,7 @@ if (y) { ], output: noFormat` declare const x: object | null; if (x != null) {} - (x?: { a: number }) => (x == null); + (x?: { a: number }) => x == null; (x: T) => (x != null) ? 1 : 0; `, }), @@ -734,7 +734,7 @@ if (y) { suggestions: [ { messageId: 'conditionFixCompareNullish', - output: ' (x?: string) => (x == null);', + output: ' (x?: string) => x == null;', }, { messageId: 'conditionFixDefaultEmptyString', @@ -742,7 +742,7 @@ if (y) { }, { messageId: 'conditionFixCastBoolean', - output: ' (x?: string) => (!Boolean(x));', + output: ' (x?: string) => !Boolean(x);', }, ], }, @@ -805,7 +805,7 @@ if (y) { suggestions: [ { messageId: 'conditionFixCompareNullish', - output: ' (x?: number) => (x == null);', + output: ' (x?: number) => x == null;', }, { messageId: 'conditionFixDefaultZero', @@ -813,7 +813,7 @@ if (y) { }, { messageId: 'conditionFixCastBoolean', - output: ' (x?: number) => (!Boolean(x));', + output: ' (x?: number) => !Boolean(x);', }, ], }, @@ -916,18 +916,21 @@ if (x) { options: [{ allowNullableObject: false }], code: noFormat` declare const obj: { x: number } | null; + !obj ? 1 : 0 !obj obj || 0 obj && 1 || 0 `, errors: [ { messageId: 'conditionErrorNullableObject', line: 3, column: 10 }, - { messageId: 'conditionErrorNullableObject', line: 4, column: 9 }, + { messageId: 'conditionErrorNullableObject', line: 4, column: 10 }, { messageId: 'conditionErrorNullableObject', line: 5, column: 9 }, + { messageId: 'conditionErrorNullableObject', line: 6, column: 9 }, ], output: noFormat` declare const obj: { x: number } | null; - (obj == null) + (obj == null) ? 1 : 0 + obj == null ;(obj != null) || 0 ;(obj != null) && 1 || 0 `, diff --git a/packages/eslint-plugin/tests/util/getWrappingFixer.test.ts b/packages/eslint-plugin/tests/util/getWrappingFixer.test.ts new file mode 100644 index 000000000000..223061762115 --- /dev/null +++ b/packages/eslint-plugin/tests/util/getWrappingFixer.test.ts @@ -0,0 +1,311 @@ +import { TSESTree } from '@typescript-eslint/experimental-utils'; +import { getFixturesRootDir, RuleTester } from '../RuleTester'; +import { createRule, getWrappingFixer } from '../../src/util'; + +const rule = createRule({ + name: 'void-everything', + defaultOptions: [], + meta: { + type: 'suggestion', + fixable: 'code', + docs: { + description: 'Add void operator in random places for test purposes.', + category: 'Stylistic Issues', + recommended: false, + }, + messages: { + addVoid: 'Please void this', + }, + schema: [], + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + const report = (node: TSESTree.Node): void => { + context.report({ + node, + messageId: 'addVoid', + fix: getWrappingFixer({ + sourceCode, + node, + wrap: code => `void ${code}`, + }), + }); + }; + + return { + 'Identifier[name="wrapMe"]': report, + 'Literal[value="wrapMe"]': report, + 'ArrayExpression[elements.0.value="wrapArray"]': report, + 'ObjectExpression[properties.0.value.value="wrapObject"]': report, + 'FunctionExpression[id.name="wrapFunction"]': report, + 'ClassExpression[id.name="wrapClass"]': report, + }; + }, +}); + +const rootPath = getFixturesRootDir(); +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', + parserOptions: { + tsconfigRootDir: rootPath, + project: './tsconfig.json', + }, +}); + +ruleTester.run('getWrappingFixer', rule, { + valid: [], + invalid: [ + // should add parens when inner expression might need them + { + code: '(function wrapFunction() {})', + errors: [{ messageId: 'addVoid' }], + output: '(void (function wrapFunction() {}))', + }, + { + code: '(class wrapClass {})', + errors: [{ messageId: 'addVoid' }], + output: '(void (class wrapClass {}))', + }, + + // shouldn't add inner parens when not necessary + { + code: 'wrapMe', + errors: [{ messageId: 'addVoid' }], + output: 'void wrapMe', + }, + { + code: '"wrapMe"', + errors: [{ messageId: 'addVoid' }], + output: 'void "wrapMe"', + }, + { + code: '["wrapArray"]', + errors: [{ messageId: 'addVoid' }], + output: 'void ["wrapArray"]', + }, + { + code: '({ x: "wrapObject" })', + errors: [{ messageId: 'addVoid' }], + output: '(void { x: "wrapObject" })', + }, + + // should add parens when the outer expression might need them + { + code: '!wrapMe', + errors: [{ messageId: 'addVoid' }], + output: '!(void wrapMe)', + }, + { + code: 'wrapMe++', + errors: [{ messageId: 'addVoid' }], + output: '(void wrapMe)++', + }, + { + code: '"wrapMe" + "dontWrap"', + errors: [{ messageId: 'addVoid' }], + output: '(void "wrapMe") + "dontWrap"', + }, + { + code: 'async () => await wrapMe', + errors: [{ messageId: 'addVoid' }], + output: 'async () => await (void wrapMe)', + }, + { + code: 'wrapMe(arg)', + errors: [{ messageId: 'addVoid' }], + output: '(void wrapMe)(arg)', + }, + { + code: 'new wrapMe(arg)', + errors: [{ messageId: 'addVoid' }], + output: 'new (void wrapMe)(arg)', + }, + { + code: 'wrapMe`arg`', + errors: [{ messageId: 'addVoid' }], + output: '(void wrapMe)`arg`', + }, + { + code: 'wrapMe.prop', + errors: [{ messageId: 'addVoid' }], + output: '(void wrapMe).prop', + }, + + // shouldn't add outer parens when not necessary + { + code: 'obj["wrapMe"]', + errors: [{ messageId: 'addVoid' }], + output: 'obj[void "wrapMe"]', + }, + { + code: 'fn(wrapMe)', + errors: [{ messageId: 'addVoid' }], + output: 'fn(void wrapMe)', + }, + { + code: 'new Cls(wrapMe)', + errors: [{ messageId: 'addVoid' }], + output: 'new Cls(void wrapMe)', + }, + { + code: '[wrapMe, ...wrapMe]', + errors: [{ messageId: 'addVoid' }, { messageId: 'addVoid' }], + output: '[void wrapMe, ...void wrapMe]', + }, + { + code: '`${wrapMe}`', + errors: [{ messageId: 'addVoid' }], + output: '`${void wrapMe}`', + }, + { + code: 'tpl`${wrapMe}`', + errors: [{ messageId: 'addVoid' }], + output: 'tpl`${void wrapMe}`', + }, + { + code: '({ ["wrapMe"]: wrapMe, ...wrapMe })', + errors: [ + { messageId: 'addVoid' }, + { messageId: 'addVoid' }, + { messageId: 'addVoid' }, + ], + output: '({ [void "wrapMe"]: void wrapMe, ...void wrapMe })', + }, + { + code: 'function fn() { return wrapMe }', + errors: [{ messageId: 'addVoid' }], + output: 'function fn() { return void wrapMe }', + }, + { + code: 'function* fn() { yield wrapMe }', + errors: [{ messageId: 'addVoid' }], + output: 'function* fn() { yield void wrapMe }', + }, + { + code: '() => wrapMe', + errors: [{ messageId: 'addVoid' }], + output: '() => void wrapMe', + }, + { + code: 'if (wrapMe) {}', + errors: [{ messageId: 'addVoid' }], + output: 'if (void wrapMe) {}', + }, + + // should detect parens at the beginning of a line and add a semi + { + code: ` + "dontWrap" + "wrapMe" + "!" + `, + errors: [{ messageId: 'addVoid' }], + output: ` + "dontWrap" + ;(void "wrapMe") + "!" + `, + }, + { + code: ` + dontWrap + wrapMe++ + `, + errors: [{ messageId: 'addVoid' }], + output: ` + dontWrap + ;(void wrapMe)++ + `, + }, + { + code: ` + dontWrap() + wrapMe() + `, + errors: [{ messageId: 'addVoid' }], + output: ` + dontWrap() + ;(void wrapMe)() + `, + }, + { + code: ` + dontWrap() + wrapMe\`\` + `, + errors: [{ messageId: 'addVoid' }], + output: ` + dontWrap() + ;(void wrapMe)\`\` + `, + }, + + // shouldn't add a semi when not necessary + { + code: ` + "dontWrap" + test() ? "wrapMe" : "dontWrap" + `, + errors: [{ messageId: 'addVoid' }], + output: ` + "dontWrap" + test() ? (void "wrapMe") : "dontWrap" + `, + }, + { + code: ` + "dontWrap"; + wrapMe && f() + `, + errors: [{ messageId: 'addVoid' }], + output: ` + "dontWrap"; + (void wrapMe) && f() + `, + }, + { + code: ` + new dontWrap + new wrapMe + `, + errors: [{ messageId: 'addVoid' }], + output: ` + new dontWrap + new (void wrapMe) + `, + }, + { + code: ` + wrapMe || f() + `, + errors: [{ messageId: 'addVoid' }], + output: ` + (void wrapMe) || f() + `, + }, + { + code: ` + if (true) wrapMe && f() + `, + errors: [{ messageId: 'addVoid' }], + output: ` + if (true) (void wrapMe) && f() + `, + }, + { + code: ` + dontWrap + if (true) { + wrapMe ?? f() + } + `, + errors: [{ messageId: 'addVoid' }], + output: ` + dontWrap + if (true) { + (void wrapMe) ?? f() + } + `, + }, + ], +}); From 20f05f659d5cb219cfc7f7212679c0a17811b3e7 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 12 Apr 2021 02:58:31 -0400 Subject: [PATCH 11/12] chore: enable no-floating-promises internally (#3279) --- .eslintrc.js | 1 - tools/generate-contributors.ts | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 562b6855f75a..5feb95fb9120 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -63,7 +63,6 @@ module.exports = { ], // TODO - enable these new recommended rules - '@typescript-eslint/no-floating-promises': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', diff --git a/tools/generate-contributors.ts b/tools/generate-contributors.ts index 38c3690cb0a4..cd5b63ea98fa 100644 --- a/tools/generate-contributors.ts +++ b/tools/generate-contributors.ts @@ -114,4 +114,7 @@ async function main(): Promise { fs.writeFileSync(rcPath, JSON.stringify(allContributorsConfig, null, 2)); } -main(); +main().catch(error => { + console.error(error); + process.exitCode = 1; +}); From 45d2c3efc206755d9ed150d8af8f7121dbebc714 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 12 Apr 2021 17:02:31 +0000 Subject: [PATCH 12/12] chore: publish v4.22.0 --- CHANGELOG.md | 16 ++++++++++++++++ lerna.json | 2 +- packages/eslint-plugin-internal/CHANGELOG.md | 8 ++++++++ packages/eslint-plugin-internal/package.json | 4 ++-- packages/eslint-plugin-tslint/CHANGELOG.md | 8 ++++++++ packages/eslint-plugin-tslint/package.json | 6 +++--- packages/eslint-plugin/CHANGELOG.md | 16 ++++++++++++++++ packages/eslint-plugin/package.json | 6 +++--- packages/experimental-utils/CHANGELOG.md | 8 ++++++++ packages/experimental-utils/package.json | 8 ++++---- packages/parser/CHANGELOG.md | 8 ++++++++ packages/parser/package.json | 10 +++++----- packages/scope-manager/CHANGELOG.md | 8 ++++++++ packages/scope-manager/package.json | 8 ++++---- packages/shared-fixtures/CHANGELOG.md | 8 ++++++++ packages/shared-fixtures/package.json | 2 +- packages/types/CHANGELOG.md | 8 ++++++++ packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 8 ++++++++ packages/typescript-estree/package.json | 8 ++++---- packages/visitor-keys/CHANGELOG.md | 8 ++++++++ packages/visitor-keys/package.json | 4 ++-- 22 files changed, 134 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b63444232e33..f0dd29fa0e6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.22.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.21.0...v4.22.0) (2021-04-12) + + +### Bug Fixes + +* **eslint-plugin:** [no-unsafe-argument] handle tuple types on rest arguments ([#3269](https://github.com/typescript-eslint/typescript-eslint/issues/3269)) ([6f8cfe6](https://github.com/typescript-eslint/typescript-eslint/commit/6f8cfe6f83ee26b66b2146cc17b1205100a54a9c)) + + +### Features + +* **eslint-plugin:** [prefer-regexp-exec] add autofix ([#3207](https://github.com/typescript-eslint/typescript-eslint/issues/3207)) ([e2cbeef](https://github.com/typescript-eslint/typescript-eslint/commit/e2cbeefb3d9a7cce257b5675f7f19f1b159a9d26)) + + + + + # [4.21.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.20.0...v4.21.0) (2021-04-05) diff --git a/lerna.json b/lerna.json index 4819dc418597..8726f2b8e5a6 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.21.0", + "version": "4.22.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 891dc4bf1505..b620c1012e17 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.22.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.21.0...v4.22.0) (2021-04-12) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.21.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.20.0...v4.21.0) (2021-04-05) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index d8402252f45f..70155100dd14 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-internal", - "version": "4.21.0", + "version": "4.22.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.21.0", + "@typescript-eslint/experimental-utils": "4.22.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index cd7ff138b0ff..d9ee27415ed1 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.22.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.21.0...v4.22.0) (2021-04-12) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.21.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.20.0...v4.21.0) (2021-04-05) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 00e26e2a6750..824b80eac1f3 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-tslint", - "version": "4.21.0", + "version": "4.22.0", "main": "dist/index.js", "typings": "src/index.ts", "description": "TSLint wrapper plugin for ESLint", @@ -38,7 +38,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.21.0", + "@typescript-eslint/experimental-utils": "4.22.0", "lodash": "^4.17.15" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.21.0" + "@typescript-eslint/parser": "4.22.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 890f25c3aacc..8e9fdc4aa5be 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.22.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.21.0...v4.22.0) (2021-04-12) + + +### Bug Fixes + +* **eslint-plugin:** [no-unsafe-argument] handle tuple types on rest arguments ([#3269](https://github.com/typescript-eslint/typescript-eslint/issues/3269)) ([6f8cfe6](https://github.com/typescript-eslint/typescript-eslint/commit/6f8cfe6f83ee26b66b2146cc17b1205100a54a9c)) + + +### Features + +* **eslint-plugin:** [prefer-regexp-exec] add autofix ([#3207](https://github.com/typescript-eslint/typescript-eslint/issues/3207)) ([e2cbeef](https://github.com/typescript-eslint/typescript-eslint/commit/e2cbeefb3d9a7cce257b5675f7f19f1b159a9d26)) + + + + + # [4.21.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.20.0...v4.21.0) (2021-04-05) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index c2ee7821e3c7..fc36b9aeba66 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.21.0", + "version": "4.22.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.21.0", - "@typescript-eslint/scope-manager": "4.21.0", + "@typescript-eslint/experimental-utils": "4.22.0", + "@typescript-eslint/scope-manager": "4.22.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.15", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 353715dd4635..1664bc9b1e37 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.22.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.21.0...v4.22.0) (2021-04-12) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + # [4.21.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.20.0...v4.21.0) (2021-04-05) **Note:** Version bump only for package @typescript-eslint/experimental-utils diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index c32aade9b272..39f3e8c44d0e 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.21.0", + "version": "4.22.0", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.21.0", - "@typescript-eslint/types": "4.21.0", - "@typescript-eslint/typescript-estree": "4.21.0", + "@typescript-eslint/scope-manager": "4.22.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/typescript-estree": "4.22.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 0704567173f9..885f266ea661 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.22.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.21.0...v4.22.0) (2021-04-12) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.21.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.20.0...v4.21.0) (2021-04-05) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index eae074a40c87..5854968fc80d 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.21.0", + "version": "4.22.0", "description": "An ESLint custom parser which leverages TypeScript ESTree", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -44,14 +44,14 @@ "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "4.21.0", - "@typescript-eslint/types": "4.21.0", - "@typescript-eslint/typescript-estree": "4.21.0", + "@typescript-eslint/scope-manager": "4.22.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/typescript-estree": "4.22.0", "debug": "^4.1.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.21.0", + "@typescript-eslint/experimental-utils": "4.22.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 4d2feebf2357..408236317625 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.22.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.21.0...v4.22.0) (2021-04-12) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [4.21.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.20.0...v4.21.0) (2021-04-05) **Note:** Version bump only for package @typescript-eslint/scope-manager diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index d0885fc83b14..f68939babb44 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.21.0", + "version": "4.22.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.21.0", - "@typescript-eslint/visitor-keys": "4.21.0" + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/visitor-keys": "4.22.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.21.0", + "@typescript-eslint/typescript-estree": "4.22.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 4d25f611a9d6..69290639ef60 100644 --- a/packages/shared-fixtures/CHANGELOG.md +++ b/packages/shared-fixtures/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.22.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.21.0...v4.22.0) (2021-04-12) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [4.21.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.20.0...v4.21.0) (2021-04-05) **Note:** Version bump only for package @typescript-eslint/shared-fixtures diff --git a/packages/shared-fixtures/package.json b/packages/shared-fixtures/package.json index ea8929dd167f..f9a9fd59ff88 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.21.0", + "version": "4.22.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index f5a546799969..966bdae0d4aa 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.22.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.21.0...v4.22.0) (2021-04-12) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [4.21.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.20.0...v4.21.0) (2021-04-05) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index b4b29e94e7b7..2f05c0465caa 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.21.0", + "version": "4.22.0", "description": "Types for the TypeScript-ESTree AST spec", "keywords": [ "eslint", diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 85b800fe52a5..9dbff83d990b 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.22.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.21.0...v4.22.0) (2021-04-12) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + # [4.21.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.20.0...v4.21.0) (2021-04-05) **Note:** Version bump only for package @typescript-eslint/typescript-estree diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 92e797aae550..262e429792b3 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.21.0", + "version": "4.22.0", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -41,8 +41,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.21.0", - "@typescript-eslint/visitor-keys": "4.21.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/visitor-keys": "4.22.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.21.0", + "@typescript-eslint/shared-fixtures": "4.22.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index efd8c85036c5..58dc35bbf918 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.22.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.21.0...v4.22.0) (2021-04-12) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.21.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.20.0...v4.21.0) (2021-04-05) **Note:** Version bump only for package @typescript-eslint/visitor-keys diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 70a063fac306..ef343471c3db 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.21.0", + "version": "4.22.0", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "keywords": [ "eslint", @@ -38,7 +38,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/types": "4.22.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": {