From a29b82485c693a602876f6d27844827f94db308d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 21:54:41 +0100 Subject: [PATCH 001/473] chore: bump cspell from 5.2.4 to 5.3.4 (#3126) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.2.4 to 5.3.4. - [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.2.4...v5.3.4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 136 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 71 insertions(+), 65 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7391d1c4c005..1fae5791cbc7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -458,14 +458,15 @@ resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-11.0.0.tgz#719cf05fcc1abb6533610a2e0f5dd1e61eac14fe" integrity sha512-VoNqai1vR5anRF5Tuh/+SWDFk7xi7oMwHrHrbm1BprYXjB2RJsWLhUrStMssDxEl5lW/z3EUdg8RvH/IUBccSQ== -"@cspell/cspell-bundled-dicts@^5.2.4": - version "5.2.4" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.2.4.tgz#dd0e161bb2203f19a2dd9358c3eb9daaffb7a336" - integrity sha512-IVoTVdFIWnWmJYBwjbsYtFyH6fD8bClDZrFpUa/a84vXVopcH1ZjpwotDsHO+P3O1GCFTacT1Z2Lyh56xowmxw== +"@cspell/cspell-bundled-dicts@^5.3.4": + version "5.3.4" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.3.4.tgz#8fa6c783788fec59c042290b5fedce64cbca6d55" + integrity sha512-Gx3ceqTxocxhSF/jgb6GkAQMHiycO7+R9c9KXwgk+HYG7Qs6NWYc4bcChn07d19x8wuM4a++gA65FxUh7lC+Yg== dependencies: + "@cspell/dict-ada" "^1.1.1" "@cspell/dict-aws" "^1.0.13" "@cspell/dict-bash" "^1.0.11" - "@cspell/dict-companies" "^1.0.35" + "@cspell/dict-companies" "^1.0.36" "@cspell/dict-cpp" "^1.1.37" "@cspell/dict-cryptocurrencies" "^1.0.10" "@cspell/dict-csharp" "^1.0.10" @@ -479,8 +480,8 @@ "@cspell/dict-fonts" "^1.0.14" "@cspell/dict-fullstack" "^1.0.36" "@cspell/dict-golang" "^1.1.24" - "@cspell/dict-haskell" "^1.0.12" - "@cspell/dict-html" "^1.1.5" + "@cspell/dict-haskell" "^1.0.13" + "@cspell/dict-html" "^1.1.6" "@cspell/dict-html-symbol-entities" "^1.0.23" "@cspell/dict-java" "^1.0.22" "@cspell/dict-latex" "^1.0.23" @@ -491,16 +492,21 @@ "@cspell/dict-php" "^1.0.23" "@cspell/dict-powershell" "^1.0.14" "@cspell/dict-python" "^1.0.33" - "@cspell/dict-ruby" "^1.0.12" + "@cspell/dict-ruby" "^1.0.13" "@cspell/dict-rust" "^1.0.22" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.25" + "@cspell/dict-software-terms" "^1.0.26" "@cspell/dict-typescript" "^1.0.16" -"@cspell/cspell-types@^5.2.4": - version "5.2.4" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.2.4.tgz#361fdc6c008b82a5c0dfd6c1fd2bee2cb7255b4b" - integrity sha512-luv2hzoKdDrNs2LPDHuS+r9hOniZlYiJJU8og8ftGyuwjytnSaTUvtY8SzFqquKQJ4+rty6AF2RS/foQ69s/2Q== +"@cspell/cspell-types@^5.3.4": + version "5.3.4" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.3.4.tgz#20aafa6debdd58fa825ebf4159016f3f57106be2" + integrity sha512-dM5sblEPqgrCUc53FSzJxrObEqYzVg70iqGMcGrawXy3wk5BiiO7caXWaRuhe0Wy5ooytI5nJK3oRELS8A501g== + +"@cspell/dict-ada@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@cspell/dict-ada/-/dict-ada-1.1.1.tgz#52b636f1728100a493dcc83e82035c371898f39c" + integrity sha512-/tpeKe182ymfKutyVcF3YHVNYnoZPdri3vsUU1v7iyA0WzTu9djb6B78r3QTQVCeizAruBsbSogxMPHBquF/zA== "@cspell/dict-aws@^1.0.13": version "1.0.13" @@ -512,10 +518,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-1.0.11.tgz#5ba56250e467d2c2ed3f2795081f4934af0c9afc" integrity sha512-DTOugbPacEFIav5s+VniByouu4apD1SKS5inwiBndw0TH3Pkm4MFTPUwfT1y7Ki4HEIyfRI2ughig2045SBqRw== -"@cspell/dict-companies@^1.0.35": - version "1.0.35" - resolved "https://registry.yarnpkg.com/@cspell/dict-companies/-/dict-companies-1.0.35.tgz#3f244e005afa533cdec8896ceaf866c82d77251a" - integrity sha512-lFoXFqXgAUjj14t7VJm+D/j9jU9kn4Eud+Q2gVQTKs6+oMivJ0hROpqZv/CEYHlm/4MpP5Livp0z0E6ARCE0kQ== +"@cspell/dict-companies@^1.0.36": + version "1.0.36" + resolved "https://registry.yarnpkg.com/@cspell/dict-companies/-/dict-companies-1.0.36.tgz#c85bcc1f23ac991c56dd25eea5623078aaa513c2" + integrity sha512-Bk9mMJs9spzrtLxZsxBZIK6ukD9REfQYpuTBNJk/IiTViHVQ6ertHAgw1vRVtJAMxViv8dMLNtDyTpEXeaYm7w== "@cspell/dict-cpp@^1.1.37": version "1.1.37" @@ -582,20 +588,20 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-golang/-/dict-golang-1.1.24.tgz#3830812aec816eca46a6d793fcc7710c09d4f5b9" integrity sha512-qq3Cjnx2U1jpeWAGJL1GL0ylEhUMqyaR36Xij6Y6Aq4bViCRp+HRRqk0x5/IHHbOrti45h3yy7ii1itRFo+Xkg== -"@cspell/dict-haskell@^1.0.12": - version "1.0.12" - resolved "https://registry.yarnpkg.com/@cspell/dict-haskell/-/dict-haskell-1.0.12.tgz#cc6ec4d0466b029683e9f861dea3d0e95c514606" - integrity sha512-JrSSuV2oY8Z1/qYi8j1w5M3eokiFkcpRtCrxpKlHYFXFEvmqTH9D8qvzVbAkrQpefMppy8uIUzknSzhwAc/MQA== +"@cspell/dict-haskell@^1.0.13": + version "1.0.13" + resolved "https://registry.yarnpkg.com/@cspell/dict-haskell/-/dict-haskell-1.0.13.tgz#bd159ef474ef427757dd4bc6a66cda977946c927" + integrity sha512-kvl8T84cnYRPpND/P3D86P6WRSqebsbk0FnMfy27zo15L5MLAb3d3MOiT1kW3vEWfQgzUD7uddX/vUiuroQ8TA== "@cspell/dict-html-symbol-entities@^1.0.23": version "1.0.23" resolved "https://registry.yarnpkg.com/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-1.0.23.tgz#0efbdbc7712c9fbe545e14acac637226ac948f2d" integrity sha512-PV0UBgcBFbBLf/m1wfkVMM8w96kvfHoiCGLWO6BR3Q9v70IXoE4ae0+T+f0CkxcEkacMqEQk/I7vuE9MzrjaNw== -"@cspell/dict-html@^1.1.5": - version "1.1.5" - resolved "https://registry.yarnpkg.com/@cspell/dict-html/-/dict-html-1.1.5.tgz#45e7a3e23c27f248b4fab962ce71efdc23a0d9fd" - integrity sha512-ecwFDcponQgLpC9VJK7SRAbLu3CAlw6KUSlLtVOiN3zxlh27MDCCMp9jCD4UImZGACe0YQ1Zj0DW7PjXkHuKHg== +"@cspell/dict-html@^1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@cspell/dict-html/-/dict-html-1.1.6.tgz#29c40c0ebc51de4cfe2d6041206ba39d74b28b67" + integrity sha512-RsZXIrmsnLcUpXfyZdNg7OtO2+e4p7m/qILg03kM6vhSUMY6ryCQNPWKrHqsl8+LBKd54EgFM+O5zcgq6IIsCw== "@cspell/dict-java@^1.0.22": version "1.0.22" @@ -642,10 +648,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-python/-/dict-python-1.0.33.tgz#39ddf401f63ee9b0f95e606d70693e61976a073b" integrity sha512-tRmE4TzHDFPs7sJ1a3XbfyFrvRHwefVz+z1wkm6tkXK9TPrCbIS+rV/T8xhj205q4lpZQ/TkNB3lT40eLB9O8A== -"@cspell/dict-ruby@^1.0.12": - version "1.0.12" - resolved "https://registry.yarnpkg.com/@cspell/dict-ruby/-/dict-ruby-1.0.12.tgz#85af4c0c7e0d03c39115d4a2d1944befe31e04f8" - integrity sha512-1qGZpVbfWfGLujKFyt2Nd9bc7rNXdkjYIRfpGmn/fwVDhWz/D4Q8GLMQPB2ixocSuF3pjfsRTh1D+rKK17WFjg== +"@cspell/dict-ruby@^1.0.13": + version "1.0.13" + resolved "https://registry.yarnpkg.com/@cspell/dict-ruby/-/dict-ruby-1.0.13.tgz#2cb63b575376de3bd85ec9b862bc31cdabb287b9" + integrity sha512-YeN1acY38dgMYlEJ6iWPH+8qXB6seLKHm9BszXxaKT/IzGA9Y9XUWPGobeJFD5E/tC6HjvcqRKxEs8vnvakoLQ== "@cspell/dict-rust@^1.0.22": version "1.0.22" @@ -657,10 +663,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.25": - version "1.0.25" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.25.tgz#a42c488ebf0169727386b5ea7981ac2e40212014" - integrity sha512-GOHfmGT/X7QsKXFKS8riPVXI7jOTfcjSz/mzoUP8t1kOTkp+8qw+hxsQ31Z4Ctz5ZI7sh0xpFFYDNFFzG5XWgw== +"@cspell/dict-software-terms@^1.0.26": + version "1.0.26" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.26.tgz#ce504130dfa3c6ebef58c5c5e41d30484ab5f7e8" + integrity sha512-NN+mv6VnCwxEWzGxOgFG4akDIRvY0j8slHmgxtoPGKDm+K22zvZITxFwF3/NHGOSxQ4n2hW6sYjqMpxAPGhjCQ== "@cspell/dict-typescript@^1.0.16": version "1.0.16" @@ -2870,10 +2876,10 @@ commander@^6.2.0, commander@~6.2.1: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== -commander@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.0.0.tgz#3e2bbfd8bb6724760980988fb5b22b7ee6b71ab2" - integrity sha512-ovx/7NkTrnPuIV8sqk/GjUIIM1+iUQeqA3ye2VNpq9sVoiZsooObWlQy+OPWGI17GDaEoybuAGJm6U8yC077BA== +commander@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.1.0.tgz#f2eaecf131f10e36e07d894698226e36ae0eb5ff" + integrity sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg== comment-json@^4.1.0: version "4.1.0" @@ -3156,62 +3162,62 @@ 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.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.2.0.tgz#19bf774562254d5bccd5491d2a904357c6f4a683" - integrity sha512-Zc80PsQ86Sfsl04+PjoImfrUnFcPJh78Beg/gFjeJ9+7oUk3oBlAcAczat0ZdfOAdQ3x/rWCH30SoefuaEfsiw== +cspell-glob@^5.3.4: + version "5.3.4" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.3.4.tgz#656188388467f8be7e115924e7b43ba85c234fa4" + integrity sha512-SrtfNUP7CqFstTzuRscGI5IFYu1j3ay5a9ioFTx2CoaFqp2BXqFpE8z9NE6Lao+7z7Fg4hiPgvsCd1gn3J/P8A== dependencies: micromatch "^4.0.2" -cspell-io@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.2.0.tgz#a482cdaa165872445fdb0a68b973ff6dbe09efb0" - integrity sha512-8GFIa31vFtFleJ2ZC4Nb3QmG426aEglKu9OD3lcufNWSnFL1A6tbJJ0zGhuiYDpnyVRMKVkur/vh1FVNNvR83w== +cspell-io@^5.3.4: + version "5.3.4" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.3.4.tgz#b468ae8d92de863a5aad5d6d4a542e4ebe63b63d" + integrity sha512-1IHuU8Y4zxGj/nyH6DawKwQevRNYiSjPqoLjqyJFeMtd3Nix0mVHf0UxotPiHhuZkuuMgQkxA4EeavGDS5jOng== dependencies: iconv-lite "^0.6.2" iterable-to-stream "^1.0.1" -cspell-lib@^5.2.4: - version "5.2.4" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.2.4.tgz#8296c5045fa7c4072dcd8b8995e1ae83949c5873" - integrity sha512-DR0ZSNCwurHCobO5QDYyEuCCmkXRutQvfoK18wICuiUElD4WkgksuWPItRr2s5901t/QvImh349U+2UuO9qwCA== +cspell-lib@^5.3.4: + version "5.3.4" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.3.4.tgz#039b4ddd3bfbb24038ef362590ab2b3a2dc8c89c" + integrity sha512-uA35jAW3CAqJeRZhQdAmhDfoHVCK0kBQcXEAerWO1z4xDThE/JRAJEKMAXirVIQufOu9X2btjQZse9ubg0p7sQ== dependencies: - "@cspell/cspell-bundled-dicts" "^5.2.4" - "@cspell/cspell-types" "^5.2.4" + "@cspell/cspell-bundled-dicts" "^5.3.4" + "@cspell/cspell-types" "^5.3.4" comment-json "^4.1.0" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-io "^5.2.0" - cspell-trie-lib "^5.2.2" + cspell-glob "^5.3.4" + cspell-io "^5.3.4" + cspell-trie-lib "^5.3.4" fs-extra "^9.1.0" gensequence "^3.1.1" - minimatch "^3.0.4" resolve-from "^5.0.0" resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.2.2.tgz#5f8878dc09a630ce37a9e6a42f4b5cecaa003ce2" - integrity sha512-Zs4POqx8xPuNF8Cex3NnSv0Ti8sS5UiL5ruo6tKwQWJbpWvrBZ/FTlypG4l2y0BMEqd+/CqmjOv3GX8dDE2lBg== +cspell-trie-lib@^5.3.4: + version "5.3.4" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.3.4.tgz#5e10424a265d6362810e2fd0ad64e4e214f46367" + integrity sha512-WaMGBIdbmOwle7pSmrOMQqfY4ndbNIGiQvpU0xuTWAzvcL/sCzgfqiDt7sI8Mr8vnSGnAphRn0xLlNqXzAgn1Q== dependencies: fs-extra "^9.1.0" gensequence "^3.1.1" cspell@^5.2.4: - version "5.2.4" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.2.4.tgz#d28b6a6ff93d1824c560a2c6f5e4d9000227a12a" - integrity sha512-ONMoI2Yf9of662Ac8Azg+EKXWSDxZIjSWGtkg6FNQOCzD0AgO6ZJv2ti9mHuSZ9rovfaPJUocmiTJSl9TncK6g== + version "5.3.4" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.3.4.tgz#1d79d3bde38a91adcda9fde4b2aa553746ff2f51" + integrity sha512-AXiZzeXXBVZIwRsD30bloqOaJEjTF3e/nzXCLHUq3Eyqiy1ySWMnOMm3OXQ1nI7nkjYpx5+Pdx7cDlH0wFrKYQ== dependencies: + "@cspell/cspell-types" "^5.3.4" chalk "^4.1.0" - commander "^7.0.0" + commander "^7.1.0" comment-json "^4.1.0" - cspell-glob "^5.2.0" - cspell-lib "^5.2.4" + cspell-glob "^5.3.4" + cspell-lib "^5.3.4" fs-extra "^9.1.0" get-stdin "^8.0.0" glob "^7.1.6" - minimatch "^3.0.4" strip-ansi "^6.0.0" cssom@^0.4.4: From 6b16faa0400284b344611dde4950e43e2f809328 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 12:56:35 -0800 Subject: [PATCH 002/473] chore: bump husky from 5.1.1 to 5.1.2 (#3124) Bumps [husky](https://github.com/typicode/husky) from 5.1.1 to 5.1.2. - [Release notes](https://github.com/typicode/husky/releases) - [Commits](https://github.com/typicode/husky/compare/v5.1.1...v5.1.2) 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 1fae5791cbc7..c05550ecffee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4692,9 +4692,9 @@ humanize-ms@^1.2.1: ms "^2.0.0" husky@^5.0.9: - version "5.1.1" - resolved "https://registry.yarnpkg.com/husky/-/husky-5.1.1.tgz#8678953fd8deb86f387cbf1ad50bb2f7f96e83f2" - integrity sha512-80LZ736V0Nr4/st0c2COYaMbEQhHNmAbLMN8J/kLk7/mo0QdUkUGNDjv/7jVkhug377Wh8wfbWyaVXEJ/h2B/Q== + version "5.1.2" + resolved "https://registry.yarnpkg.com/husky/-/husky-5.1.2.tgz#dc6a1f68640455d8d98c28875e073087f86c5081" + integrity sha512-lilaRYeDXcAOj8DuRnN9IxUyEMVbYg9rK7yVNkPB5V4hCvxIUxpMeiv9K2h77CE0HzjCnk1Br0oWe1IghXngDQ== iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" From 00e271e0efea3e25af5377e061a9e93319bc9cb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 12:56:47 -0800 Subject: [PATCH 003/473] chore: bump ts-jest from 26.5.1 to 26.5.2 (#3123) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.1 to 26.5.2. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.5.1...v26.5.2) 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 c05550ecffee..6f0d209e8df2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8528,9 +8528,9 @@ trim-off-newlines@^1.0.0: integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= ts-jest@^26.5.1: - version "26.5.1" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.1.tgz#4d53ee4481552f57c1624f0bd3425c8b17996150" - integrity sha512-G7Rmo3OJMvlqE79amJX8VJKDiRcd7/r61wh9fnvvG8cAjhA9edklGw/dCxRSQmfZ/z8NDums5srSVgwZos1qfg== + version "26.5.2" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.2.tgz#5281d6b44c2f94f71205728a389edc3d7995b0c4" + integrity sha512-bwyJ2zJieSugf7RB+o8fgkMeoMVMM2KPDE0UklRLuACxjwJsOrZNo6chrcScmK33YavPSwhARffy8dZx5LJdUQ== dependencies: "@types/jest" "26.x" bs-logger "0.x" From 18c0f282aee3b4b9d19ed6c72975181eb89e54db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 12:57:54 -0800 Subject: [PATCH 004/473] chore: bump @commitlint/config-conventional from 11.0.0 to 12.0.1 (#3120) Bumps [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint) from 11.0.0 to 12.0.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/v11.0.0...v12.0.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a7a9b8fc318c..ef826dab2300 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ }, "devDependencies": { "@commitlint/cli": "^11.0.0", - "@commitlint/config-conventional": "^11.0.0", + "@commitlint/config-conventional": "^12.0.1", "@commitlint/config-lerna-scopes": "^11.0.0", "@types/babel__code-frame": "^7.0.2", "@types/debug": "^4.1.5", diff --git a/yarn.lock b/yarn.lock index 6f0d209e8df2..b095cc99037f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -331,10 +331,10 @@ resolve-global "1.0.0" yargs "^15.1.0" -"@commitlint/config-conventional@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-11.0.0.tgz#3fa300a1b639273946de3c3f15e1cda518333422" - integrity sha512-SNDRsb5gLuDd2PL83yCOQX6pE7gevC79UPFx+GLbLfw6jGnnbO9/tlL76MLD8MOViqGbo7ZicjChO9Gn+7tHhA== +"@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== dependencies: conventional-changelog-conventionalcommits "^4.3.1" From e22c9fab4d680a8a40f5ef10dca83e464db4a88b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 21:09:14 +0000 Subject: [PATCH 005/473] chore: bump marked from 2.0.0 to 2.0.1 (#3122) Bumps [marked](https://github.com/markedjs/marked) from 2.0.0 to 2.0.1. - [Release notes](https://github.com/markedjs/marked/releases) - [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js) - [Commits](https://github.com/markedjs/marked/compare/v2.0.0...v2.0.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 b095cc99037f..519b387085e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6190,9 +6190,9 @@ markdownlint@~0.22.0: markdown-it "12.0.2" marked@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.0.tgz#9662bbcb77ebbded0662a7be66ff929a8611cee5" - integrity sha512-NqRSh2+LlN2NInpqTQnS614Y/3NkVMFFU6sJlRFEpxJ/LHuK/qJECH7/fXZjk4VZstPW/Pevjil/VtSONsLc7Q== + version "2.0.1" + resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.1.tgz#5e7ed7009bfa5c95182e4eb696f85e948cefcee3" + integrity sha512-5+/fKgMv2hARmMW7DOpykr2iLhl0NgjyELk5yn92iE7z8Se1IS9n3UsFm86hFXIkvMBmVxki8+ckcpjBeyo/hw== mdurl@^1.0.1: version "1.0.1" From e8b87de0ccfbe506c9f02551dc5d635485ee7db4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:54:21 -0800 Subject: [PATCH 006/473] chore: bump @commitlint/config-lerna-scopes from 11.0.0 to 12.0.1 (#3131) Bumps [@commitlint/config-lerna-scopes](https://github.com/conventional-changelog/commitlint) from 11.0.0 to 12.0.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/v11.0.0...v12.0.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index ef826dab2300..2ba540a4ad71 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "devDependencies": { "@commitlint/cli": "^11.0.0", "@commitlint/config-conventional": "^12.0.1", - "@commitlint/config-lerna-scopes": "^11.0.0", + "@commitlint/config-lerna-scopes": "^12.0.1", "@types/babel__code-frame": "^7.0.2", "@types/debug": "^4.1.5", "@types/eslint-visitor-keys": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 519b387085e2..2c540be42cf1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -338,14 +338,15 @@ dependencies: conventional-changelog-conventionalcommits "^4.3.1" -"@commitlint/config-lerna-scopes@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-lerna-scopes/-/config-lerna-scopes-11.0.0.tgz#4152287c5d13ea844160507523b2f98b015adf4a" - integrity sha512-/PjLKefMlnG+Sk27MY3MZo+T/9/PrgDcLk1YCSPVHNkXibXiS2Hb5NEMuNHzPxwts4IvJo0WIOb0YOBx5GBsdA== +"@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== dependencies: + globby "^11.0.1" import-from "3.0.0" resolve-pkg "2.0.0" - semver "7.3.2" + semver "7.3.4" "@commitlint/ensure@^11.0.0": version "11.0.0" @@ -7782,7 +7783,7 @@ semver@7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@7.x, semver@^7.2.1, semver@^7.3.2: +semver@7.3.4, semver@7.x, semver@^7.2.1, semver@^7.3.2: version "7.3.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== From 3e204e9f2fe7008c7d7127d865f58bff1d978e0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:54:56 -0800 Subject: [PATCH 007/473] chore: bump @commitlint/cli from 11.0.0 to 12.0.1 (#3130) Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint) from 11.0.0 to 12.0.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/v11.0.0...v12.0.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 255 +++++++++++++++++++++++++++++---------------------- 2 files changed, 147 insertions(+), 110 deletions(-) diff --git a/package.json b/package.json index 2ba540a4ad71..3394f492b9f3 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "node": "^10.12.0 || >=12.0.0" }, "devDependencies": { - "@commitlint/cli": "^11.0.0", + "@commitlint/cli": "^12.0.1", "@commitlint/config-conventional": "^12.0.1", "@commitlint/config-lerna-scopes": "^12.0.1", "@types/babel__code-frame": "^7.0.2", diff --git a/yarn.lock b/yarn.lock index 2c540be42cf1..39ecbe707264 100644 --- a/yarn.lock +++ b/yarn.lock @@ -260,7 +260,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.12.13" -"@babel/runtime@^7.11.0", "@babel/runtime@^7.11.2", "@babel/runtime@^7.7.6": +"@babel/runtime@^7.11.0", "@babel/runtime@^7.7.6": version "7.13.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.6.tgz#86e0fad6cbb46a680e21c1aa4748717a058d345a" integrity sha512-Y/DEVhSQ91u27rxq7D0EH/sewS6+x06p/MgO1VppbDHMzYXLZrAR5cFjCom78e9RUw1BQAq6qJg6fXc/ep7glA== @@ -313,23 +313,21 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@commitlint/cli@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-11.0.0.tgz#698199bc52afed50aa28169237758fa14a67b5d3" - integrity sha512-YWZWg1DuqqO5Zjh7vUOeSX76vm0FFyz4y0cpGMFhrhvUi5unc4IVfCXZ6337R9zxuBtmveiRuuhQqnRRer+13g== - dependencies: - "@babel/runtime" "^7.11.2" - "@commitlint/format" "^11.0.0" - "@commitlint/lint" "^11.0.0" - "@commitlint/load" "^11.0.0" - "@commitlint/read" "^11.0.0" - chalk "4.1.0" - core-js "^3.6.1" +"@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" get-stdin "8.0.0" lodash "^4.17.19" resolve-from "5.0.0" resolve-global "1.0.0" - yargs "^15.1.0" + yargs "^16.2.0" "@commitlint/config-conventional@^12.0.1": version "12.0.1" @@ -348,116 +346,120 @@ resolve-pkg "2.0.0" semver "7.3.4" -"@commitlint/ensure@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-11.0.0.tgz#3e796b968ab5b72bc6f8a6040076406306c987fb" - integrity sha512-/T4tjseSwlirKZdnx4AuICMNNlFvRyPQimbZIOYujp9DSO6XRtOy9NrmvWujwHsq9F5Wb80QWi4WMW6HMaENug== +"@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== dependencies: - "@commitlint/types" "^11.0.0" + "@commitlint/types" "^12.0.1" lodash "^4.17.19" -"@commitlint/execute-rule@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-11.0.0.tgz#3ed60ab7a33019e58d90e2d891b75d7df77b4b4d" - integrity sha512-g01p1g4BmYlZ2+tdotCavrMunnPFPhTzG1ZiLKTCYrooHRbmvqo42ZZn4QMStUEIcn+jfLb6BRZX3JzIwA1ezQ== +"@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/format@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-11.0.0.tgz#ac47b0b9ca46540c0082c721b290794e67bdc51b" - integrity sha512-bpBLWmG0wfZH/svzqD1hsGTpm79TKJWcf6EXZllh2J/LSSYKxGlv967lpw0hNojme0sZd4a/97R3qA2QHWWSLg== +"@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== dependencies: - "@commitlint/types" "^11.0.0" + "@commitlint/types" "^12.0.1" chalk "^4.0.0" -"@commitlint/is-ignored@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-11.0.0.tgz#7b803eda56276dbe7fec51eb1510676198468f39" - integrity sha512-VLHOUBN+sOlkYC4tGuzE41yNPO2w09sQnOpfS+pSPnBFkNUUHawEuA44PLHtDvQgVuYrMAmSWFQpWabMoP5/Xg== - dependencies: - "@commitlint/types" "^11.0.0" - semver "7.3.2" - -"@commitlint/lint@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-11.0.0.tgz#01e062cd1b0e7c3d756aa2c246462e0b6a3348a4" - integrity sha512-Q8IIqGIHfwKr8ecVZyYh6NtXFmKw4YSEWEr2GJTB/fTZXgaOGtGFZDWOesCZllQ63f1s/oWJYtVv5RAEuwN8BQ== - dependencies: - "@commitlint/is-ignored" "^11.0.0" - "@commitlint/parse" "^11.0.0" - "@commitlint/rules" "^11.0.0" - "@commitlint/types" "^11.0.0" - -"@commitlint/load@>6.1.1", "@commitlint/load@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-11.0.0.tgz#f736562f0ffa7e773f8808fea93319042ee18211" - integrity sha512-t5ZBrtgvgCwPfxmG811FCp39/o3SJ7L+SNsxFL92OR4WQxPcu6c8taD0CG2lzOHGuRyuMxZ7ps3EbngT2WpiCg== - dependencies: - "@commitlint/execute-rule" "^11.0.0" - "@commitlint/resolve-extends" "^11.0.0" - "@commitlint/types" "^11.0.0" - chalk "4.1.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== + dependencies: + "@commitlint/types" "^12.0.1" + semver "7.3.4" + +"@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== + dependencies: + "@commitlint/is-ignored" "^12.0.1" + "@commitlint/parse" "^12.0.1" + "@commitlint/rules" "^12.0.1" + "@commitlint/types" "^12.0.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== + dependencies: + "@commitlint/execute-rule" "^12.0.1" + "@commitlint/resolve-extends" "^12.0.1" + "@commitlint/types" "^12.0.1" + chalk "^4.0.0" cosmiconfig "^7.0.0" lodash "^4.17.19" resolve-from "^5.0.0" -"@commitlint/message@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-11.0.0.tgz#83554c3cbbc884fd07b473593bc3e94bcaa3ee05" - integrity sha512-01ObK/18JL7PEIE3dBRtoMmU6S3ecPYDTQWWhcO+ErA3Ai0KDYqV5VWWEijdcVafNpdeUNrEMigRkxXHQLbyJA== +"@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/parse@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-11.0.0.tgz#d18b08cf67c35d02115207d7009306a2e8e7c901" - integrity sha512-DekKQAIYWAXIcyAZ6/PDBJylWJ1BROTfDIzr9PMVxZRxBPc1gW2TG8fLgjZfBP5mc0cuthPkVi91KQQKGri/7A== +"@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== dependencies: - conventional-changelog-angular "^5.0.0" + "@commitlint/types" "^12.0.1" + conventional-changelog-angular "^5.0.11" conventional-commits-parser "^3.0.0" -"@commitlint/read@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-11.0.0.tgz#f24240548c63587bba139fa5a364cab926077016" - integrity sha512-37V0V91GSv0aDzMzJioKpCoZw6l0shk7+tRG8RkW1GfZzUIytdg3XqJmM+IaIYpaop0m6BbZtfq+idzUwJnw7g== +"@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== dependencies: - "@commitlint/top-level" "^11.0.0" + "@commitlint/top-level" "^12.0.1" + "@commitlint/types" "^12.0.1" fs-extra "^9.0.0" git-raw-commits "^2.0.0" -"@commitlint/resolve-extends@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-11.0.0.tgz#158ecbe27d4a2a51d426111a01478e216fbb1036" - integrity sha512-WinU6Uv6L7HDGLqn/To13KM1CWvZ09VHZqryqxXa1OY+EvJkfU734CwnOEeNlSCK7FVLrB4kmodLJtL1dkEpXw== +"@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== dependencies: import-fresh "^3.0.0" lodash "^4.17.19" resolve-from "^5.0.0" resolve-global "^1.0.0" -"@commitlint/rules@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-11.0.0.tgz#bdb310cc6fc55c9f8d7d917a22b69055c535c375" - integrity sha512-2hD9y9Ep5ZfoNxDDPkQadd2jJeocrwC4vJ98I0g8pNYn/W8hS9+/FuNpolREHN8PhmexXbkjrwyQrWbuC0DVaA== +"@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== dependencies: - "@commitlint/ensure" "^11.0.0" - "@commitlint/message" "^11.0.0" - "@commitlint/to-lines" "^11.0.0" - "@commitlint/types" "^11.0.0" + "@commitlint/ensure" "^12.0.1" + "@commitlint/message" "^12.0.1" + "@commitlint/to-lines" "^12.0.1" + "@commitlint/types" "^12.0.1" -"@commitlint/to-lines@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-11.0.0.tgz#86dea151c10eea41e39ea96fa4de07839258a7fe" - integrity sha512-TIDTB0Y23jlCNubDROUVokbJk6860idYB5cZkLWcRS9tlb6YSoeLn1NLafPlrhhkkkZzTYnlKYzCVrBNVes1iw== +"@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/top-level@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-11.0.0.tgz#bb2d1b6e5ed3be56874633b59e1f7de118c32783" - integrity sha512-O0nFU8o+Ws+py5pfMQIuyxOtfR/kwtr5ybqTvR+C2lUPer2x6lnQU+OnfD7hPM+A+COIUZWx10mYQvkR3MmtAA== +"@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== dependencies: find-up "^5.0.0" -"@commitlint/types@^11.0.0": - version "11.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-11.0.0.tgz#719cf05fcc1abb6533610a2e0f5dd1e61eac14fe" - integrity sha512-VoNqai1vR5anRF5Tuh/+SWDFk7xi7oMwHrHrbm1BprYXjB2RJsWLhUrStMssDxEl5lW/z3EUdg8RvH/IUBccSQ== +"@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== + dependencies: + chalk "^4.0.0" "@cspell/cspell-bundled-dicts@^5.3.4": version "5.3.4" @@ -2679,14 +2681,6 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@4.1.0, chalk@^4.0.0, chalk@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@^2.0.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -2696,6 +2690,14 @@ chalk@^2.0.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^4.0.0, chalk@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -2786,6 +2788,15 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + clone-deep@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" @@ -2981,7 +2992,15 @@ contains-path@^0.1.0: resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= -conventional-changelog-angular@^5.0.0, conventional-changelog-angular@^5.0.3: +conventional-changelog-angular@^5.0.11: + version "5.0.12" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" + integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw== + dependencies: + compare-func "^2.0.0" + q "^1.5.1" + +conventional-changelog-angular@^5.0.3: version "5.0.11" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.11.tgz#99a3ca16e4a5305e0c2c2fae3ef74fd7631fc3fb" integrity sha512-nSLypht/1yEflhuTogC03i7DX7sOrXGsRn14g131Potqi6cbGbGEE9PSDEHKldabB6N76HiSyw9Ph+kLmC04Qw== @@ -3102,11 +3121,6 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -core-js@^3.6.1: - version "3.6.5" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" - integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== - core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -4287,7 +4301,7 @@ gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-caller-file@^2.0.1: +get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -9085,6 +9099,11 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== +y18n@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" + integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== + yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" @@ -9121,6 +9140,11 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^20.2.2: + version "20.2.6" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.6.tgz#69f920addf61aafc0b8b89002f5d66e28f2d8b20" + integrity sha512-AP1+fQIWSM/sMiET8fyayjx/J+JmTPt2Mr0FkrgqB4todtfa53sOsrSAcIrJRD5XS20bKUwaDIuMkWKCEiQLKA== + yargs@^14.2.2: version "14.2.3" resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" @@ -9138,7 +9162,7 @@ yargs@^14.2.2: y18n "^4.0.0" yargs-parser "^15.0.1" -yargs@^15.0.1, yargs@^15.1.0, yargs@^15.4.1: +yargs@^15.0.1, yargs@^15.4.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== @@ -9155,6 +9179,19 @@ yargs@^15.0.1, yargs@^15.1.0, yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" +yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" From 9323eaea81467e51ba99915f8b5d4dc8834e2784 Mon Sep 17 00:00:00 2001 From: Armano Date: Tue, 2 Mar 2021 18:58:23 +0100 Subject: [PATCH 008/473] chore: yarn lock after depencency update (#3134) --- yarn.lock | 5 ----- 1 file changed, 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 39ecbe707264..815a73208c88 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7792,11 +7792,6 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@7.3.2: - version "7.3.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" - integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== - semver@7.3.4, semver@7.x, semver@^7.2.1, semver@^7.3.2: version "7.3.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" From a64229078e72e52d43cbe3e5e45ee0450ecdf2af Mon Sep 17 00:00:00 2001 From: Armano Date: Fri, 5 Mar 2021 18:27:08 +0100 Subject: [PATCH 009/473] chore: remove redundant lerna:init script (#3139) --- .github/workflows/ci.yml | 6 ------ .github/workflows/manual-release.yml | 1 - package.json | 3 +-- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0986c2df8f6c..0cae9596da6e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,6 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn lerna:init yarn check:clean-workspace-after-install - name: Build @@ -86,7 +85,6 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn lerna:init yarn check:clean-workspace-after-install - name: Build @@ -173,7 +171,6 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn lerna:init yarn check:clean-workspace-after-install - name: Build @@ -217,7 +214,6 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn lerna:init yarn check:clean-workspace-after-install - name: Build @@ -257,7 +253,6 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn lerna:init yarn check:clean-workspace-after-install - name: Build @@ -340,7 +335,6 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn lerna:init yarn check:clean-workspace-after-install - name: Build diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml index 4f75c3b438e7..327d5947236a 100644 --- a/.github/workflows/manual-release.yml +++ b/.github/workflows/manual-release.yml @@ -45,7 +45,6 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn lerna:init yarn check:clean-workspace-after-install - name: Run build diff --git a/package.json b/package.json index 3394f492b9f3..65d383df6c6c 100644 --- a/package.json +++ b/package.json @@ -27,12 +27,11 @@ "cz": "git-cz", "format": "prettier --write \"./**/*.{ts,js,json,md}\"", "generate:contributors": "yarn ts-node --transpile-only ./tools/generate-contributors.ts && yarn all-contributors generate", - "lerna:init": "lerna bootstrap --ignore-scripts && lerna link --force-local", "lint:fix": "eslint . --ext .js,.ts --fix", "lint:markdown:fix": "yarn lint:markdown --fix", "lint:markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore", "lint": "eslint . --ext .js,.ts", - "postinstall": "yarn husky install && yarn lerna:init && yarn build", + "postinstall": "yarn husky install && yarn build", "pre-commit": "yarn lint-staged", "pre-push": "yarn check:format", "test": "lerna run test --concurrency 1", From 84fe328c2c7b4e631711c7f22b706f75ea14a495 Mon Sep 17 00:00:00 2001 From: typicode Date: Fri, 5 Mar 2021 18:27:42 +0100 Subject: [PATCH 010/473] chore: remove husky 4 config (#3149) --- .huskyrc | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .huskyrc diff --git a/.huskyrc b/.huskyrc deleted file mode 100644 index 687c2614bf8a..000000000000 --- a/.huskyrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "hooks": { - "pre-commit": "yarn pre-commit", - "pre-push": "yarn pre-push", - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" - } -} From ae0271cd8d6406e2fa54403f49e5072bd729bddd Mon Sep 17 00:00:00 2001 From: Armano Date: Sat, 6 Mar 2021 21:58:30 +0100 Subject: [PATCH 011/473] docs(eslint-plugin): correct no longer valid references and examples (#3152) --- .../eslint-plugin/docs/rules/consistent-type-imports.md | 2 +- packages/eslint-plugin/docs/rules/no-magic-numbers.md | 8 ++++---- .../eslint-plugin/docs/rules/triple-slash-reference.md | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/consistent-type-imports.md b/packages/eslint-plugin/docs/rules/consistent-type-imports.md index c30e59b40b99..a5808b455788 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-imports.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-imports.md @@ -61,6 +61,6 @@ const x: import('Bar') = 1; ## When Not To Use It - If you are not using TypeScript 3.8 (or greater), then you will not be able to use this rule, as type-only imports are not allowed. -- Certain libraries use the non-inlined imports to infer information about the variables. For example, for dependency injection. +- Certain libraries use the non-inlined imports to infer information about the variables. For example, for dependency injection.
type-only imports cannot be used with these libraries. See [#2559](https://github.com/typescript-eslint/typescript-eslint/issues/2559#issuecomment-692780580) - If you specifically want to use both import kinds for stylistic reasons, you can disable this rule. diff --git a/packages/eslint-plugin/docs/rules/no-magic-numbers.md b/packages/eslint-plugin/docs/rules/no-magic-numbers.md index f41204c132bf..8149ad6ddd6b 100644 --- a/packages/eslint-plugin/docs/rules/no-magic-numbers.md +++ b/packages/eslint-plugin/docs/rules/no-magic-numbers.md @@ -53,8 +53,8 @@ Examples of **incorrect** code for the `{ "ignoreEnums": false }` option: ```ts /*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreEnums": false }]*/ -enum foo = { - SECOND = 1000, +enum foo { + SECOND = 1000, } ``` @@ -63,8 +63,8 @@ Examples of **correct** code for the `{ "ignoreEnums": true }` option: ```ts /*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreEnums": true }]*/ -enum foo = { - SECOND = 1000, +enum foo { + SECOND = 1000, } ``` diff --git a/packages/eslint-plugin/docs/rules/triple-slash-reference.md b/packages/eslint-plugin/docs/rules/triple-slash-reference.md index af9e5498b6d4..9eb463a3c790 100644 --- a/packages/eslint-plugin/docs/rules/triple-slash-reference.md +++ b/packages/eslint-plugin/docs/rules/triple-slash-reference.md @@ -2,8 +2,6 @@ Use of triple-slash reference type directives is discouraged in favor of the newer `import` style. This rule allows you to ban use of `/// `, `/// `, or `/// ` directives. -Consider using this rule in place of [`no-triple-slash-reference`](./no-triple-slash-reference.md) which has been deprecated. - ## Rule Details With `{ "path": "never", "types": "never", "lib": "never" }` options set, the following will all be **incorrect** usage: From 3f9e9a1e9fc3e507bd01d1913ef642cd129de402 Mon Sep 17 00:00:00 2001 From: Nikita Stefaniak Date: Mon, 8 Mar 2021 18:33:28 +0100 Subject: [PATCH 012/473] feat(eslint-plugin): [strict-bool-expr] add fixes and suggestions (#2847) --- packages/eslint-plugin/README.md | 2 +- .../docs/rules/strict-boolean-expressions.md | 32 + .../src/rules/strict-boolean-expressions.ts | 473 +++++++++++++- .../src/util/getWrappingFixer.ts | 109 ++++ packages/eslint-plugin/src/util/index.ts | 1 + .../rules/strict-boolean-expressions.test.ts | 604 ++++++++++++++++-- 6 files changed, 1167 insertions(+), 54 deletions(-) create mode 100644 packages/eslint-plugin/src/util/getWrappingFixer.ts diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 3a504fe7d83a..69ea06c23082 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -169,7 +169,7 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@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/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 | | | :thought_balloon: | +| [`@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/type-annotation-spacing`](./docs/rules/type-annotation-spacing.md) | Require consistent spacing around type annotations | | :wrench: | | diff --git a/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md b/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md index 9eb5712ab482..b1ad94d8b340 100644 --- a/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md +++ b/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md @@ -155,6 +155,38 @@ You should be using `strictNullChecks` to ensure complete type-safety in your co If for some reason you cannot turn on `strictNullChecks`, but still want to use this rule - you can use this option to allow it - but know that the behavior of this rule is _undefined_ with the compiler option turned off. We will not accept bug reports if you are using this option. +## Fixes and suggestions + +This rule provides following fixes and suggestions for particular types in boolean context: + +- `boolean` - Always allowed - no fix needed. +- `string` - (when `allowString` is `false`) - Provides following suggestions: + - Change condition to check string's length (`str` → `str.length > 0`) + - Change condition to check for empty string (`str` → `str !== ""`) + - Explicitly cast value to a boolean (`str` → `Boolean(str)`) +- `number` - (when `allowNumber` is `false`): + - For `array.length` - Provides **autofix**: + - Change condition to check for 0 (`array.length` → `array.length > 0`) + - For other number values - Provides following suggestions: + - Change condition to check for 0 (`num` → `num !== 0`) + - Change condition to check for NaN (`num` → `!Number.isNaN(num)`) + - Explicitly cast value to a boolean (`num` → `Boolean(num)`) +- `object | null | undefined` - (when `allowNullableObject` is `false`) - Provides **autofix**: + - Change condition to check for null/undefined (`maybeObj` → `maybeObj != null`) +- `boolean | null | undefined` - Provides following suggestions: + - Explicitly treat nullish value the same as false (`maybeBool` → `maybeBool ?? false`) + - Change condition to check for true/false (`maybeBool` → `maybeBool === true`) +- `string | null | undefined` - Provides following suggestions: + - Change condition to check for null/undefined (`maybeStr` → `maybeStr != null`) + - Explicitly treat nullish value the same as an empty string (`maybeStr` → `maybeStr ?? ""`) + - Explicitly cast value to a boolean (`maybeStr` → `Boolean(maybeStr)`) +- `number | null | undefined` - Provides following suggestions: + - Change condition to check for null/undefined (`maybeNum` → `maybeNum != null`) + - Explicitly treat nullish value the same as 0 (`maybeNum` → `maybeNum ?? 0`) + - Explicitly cast value to a boolean (`maybeNum` → `Boolean(maybeNum)`) +- `any` and `unknown` - Provides following suggestions: + - Explicitly cast value to a boolean (`value` → `Boolean(value)`) + ## Related To - TSLint: [strict-boolean-expressions](https://palantir.github.io/tslint/rules/strict-boolean-expressions) diff --git a/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts b/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts index 51265feb1368..b8e25d4542a3 100644 --- a/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts +++ b/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts @@ -1,9 +1,10 @@ import { - TSESTree, AST_NODE_TYPES, + ParserServices, + TSESTree, } from '@typescript-eslint/experimental-utils'; -import * as ts from 'typescript'; import * as tsutils from 'tsutils'; +import * as ts from 'typescript'; import * as util from '../util'; export type Options = [ @@ -30,12 +31,24 @@ export type MessageId = | 'conditionErrorNullableNumber' | 'conditionErrorObject' | 'conditionErrorNullableObject' - | 'noStrictNullCheck'; + | 'noStrictNullCheck' + | 'conditionFixDefaultFalse' + | 'conditionFixDefaultEmptyString' + | 'conditionFixDefaultZero' + | 'conditionFixCompareNullish' + | 'conditionFixCastBoolean' + | 'conditionFixCompareTrue' + | 'conditionFixCompareFalse' + | 'conditionFixCompareStringLength' + | 'conditionFixCompareEmptyString' + | 'conditionFixCompareZero' + | 'conditionFixCompareNaN'; export default util.createRule({ name: 'strict-boolean-expressions', meta: { type: 'suggestion', + fixable: 'code', docs: { description: 'Restricts the types allowed in boolean expressions', category: 'Best Practices', @@ -93,6 +106,29 @@ export default util.createRule({ 'An explicit null check is required.', noStrictNullCheck: 'This rule requires the `strictNullChecks` compiler option to be turned on to function correctly.', + + conditionFixDefaultFalse: + 'Explicitly treat nullish value the same as false (`value ?? false`)', + conditionFixDefaultEmptyString: + 'Explicitly treat nullish value the same as an empty string (`value ?? ""`)', + conditionFixDefaultZero: + 'Explicitly treat nullish value the same as 0 (`value ?? 0`)', + conditionFixCompareNullish: + 'Change condition to check for null/undefined (`value != null`)', + conditionFixCastBoolean: + 'Explicitly cast value to a boolean (`Boolean(value)`)', + conditionFixCompareTrue: + 'Change condition to check if true (`value === true`)', + conditionFixCompareFalse: + 'Change condition to check if false (`value === false`)', + conditionFixCompareStringLength: + "Change condition to check string's length (`value.length !== 0`)", + conditionFixCompareEmptyString: + 'Change condition to check for empty string (`value !== ""`)', + conditionFixCompareZero: + 'Change condition to check for 0 (`value !== 0`)', + conditionFixCompareNaN: + 'Change condition to check for NaN (`!Number.isNaN(value)`)', }, }, defaultOptions: [ @@ -108,9 +144,10 @@ export default util.createRule({ }, ], create(context, [options]) { - const service = util.getParserServices(context); - const checker = service.program.getTypeChecker(); - const compilerOptions = service.program.getCompilerOptions(); + const parserServices = util.getParserServices(context); + const typeChecker = parserServices.program.getTypeChecker(); + const compilerOptions = parserServices.program.getCompilerOptions(); + const sourceCode = context.getSourceCode(); const isStrictNullChecks = tsutils.isStrictCompilerOptionEnabled( compilerOptions, 'strictNullChecks', @@ -187,8 +224,8 @@ export default util.createRule({ return; } - const tsNode = service.esTreeNodeToTSNodeMap.get(node); - const type = util.getConstrainedTypeAtLocation(checker, tsNode); + const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node); + const type = util.getConstrainedTypeAtLocation(typeChecker, tsNode); const types = inspectVariantTypes(tsutils.unionTypeParts(type)); const is = (...wantedTypes: readonly VariantType[]): boolean => @@ -217,7 +254,56 @@ export default util.createRule({ // nullable boolean if (is('nullish', 'boolean')) { if (!options.allowNullableBoolean) { - context.report({ node, messageId: 'conditionErrorNullableBoolean' }); + if (isLogicalNegationExpression(node.parent!)) { + // if (!nullableBoolean) + context.report({ + node, + messageId: 'conditionErrorNullableBoolean', + suggest: [ + { + messageId: 'conditionFixDefaultFalse', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code} ?? false`, + }), + }, + { + messageId: 'conditionFixCompareFalse', + fix: util.getWrappingFixer({ + sourceCode, + node: node.parent, + innerNode: node, + wrap: code => `${code} === false`, + }), + }, + ], + }); + } else { + // if (nullableBoolean) + context.report({ + node, + messageId: 'conditionErrorNullableBoolean', + suggest: [ + { + messageId: 'conditionFixDefaultFalse', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code} ?? false`, + }), + }, + { + messageId: 'conditionFixCompareTrue', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code} === true`, + }), + }, + ], + }); + } } return; } @@ -225,7 +311,74 @@ export default util.createRule({ // string if (is('string')) { if (!options.allowString) { - context.report({ node, messageId: 'conditionErrorString' }); + if (isLogicalNegationExpression(node.parent!)) { + // if (!string) + context.report({ + node, + messageId: 'conditionErrorString', + suggest: [ + { + messageId: 'conditionFixCompareStringLength', + fix: util.getWrappingFixer({ + sourceCode, + node: node.parent, + innerNode: node, + wrap: code => `${code}.length === 0`, + }), + }, + { + messageId: 'conditionFixCompareEmptyString', + fix: util.getWrappingFixer({ + sourceCode, + node: node.parent, + innerNode: node, + wrap: code => `${code} === ""`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: util.getWrappingFixer({ + sourceCode, + node: node.parent, + innerNode: node, + wrap: code => `!Boolean(${code})`, + }), + }, + ], + }); + } else { + // if (string) + context.report({ + node, + messageId: 'conditionErrorString', + suggest: [ + { + messageId: 'conditionFixCompareStringLength', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code}.length > 0`, + }), + }, + { + messageId: 'conditionFixCompareEmptyString', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code} !== ""`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `Boolean(${code})`, + }), + }, + ], + }); + } } return; } @@ -233,7 +386,73 @@ export default util.createRule({ // nullable string if (is('nullish', 'string')) { if (!options.allowNullableString) { - context.report({ node, messageId: 'conditionErrorNullableString' }); + if (isLogicalNegationExpression(node.parent!)) { + // if (!nullableString) + context.report({ + node, + messageId: 'conditionErrorNullableString', + suggest: [ + { + messageId: 'conditionFixCompareNullish', + fix: util.getWrappingFixer({ + sourceCode, + node: node.parent, + innerNode: node, + wrap: code => `${code} == null`, + }), + }, + { + messageId: 'conditionFixDefaultEmptyString', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code} ?? ""`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: util.getWrappingFixer({ + sourceCode, + node: node.parent, + innerNode: node, + wrap: code => `!Boolean(${code})`, + }), + }, + ], + }); + } else { + // if (nullableString) + context.report({ + node, + messageId: 'conditionErrorNullableString', + suggest: [ + { + messageId: 'conditionFixCompareNullish', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code} != null`, + }), + }, + { + messageId: 'conditionFixDefaultEmptyString', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code} ?? ""`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `Boolean(${code})`, + }), + }, + ], + }); + } } return; } @@ -241,7 +460,101 @@ export default util.createRule({ // number if (is('number')) { if (!options.allowNumber) { - context.report({ node, messageId: 'conditionErrorNumber' }); + if (isArrayLengthExpression(node, typeChecker, parserServices)) { + if (isLogicalNegationExpression(node.parent!)) { + // if (!array.length) + context.report({ + node, + messageId: 'conditionErrorNumber', + fix: util.getWrappingFixer({ + sourceCode, + node: node.parent, + innerNode: node, + wrap: code => `${code} === 0`, + }), + }); + } else { + // if (array.length) + context.report({ + node, + messageId: 'conditionErrorNumber', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code} > 0`, + }), + }); + } + } else if (isLogicalNegationExpression(node.parent!)) { + // if (!number) + context.report({ + node, + messageId: 'conditionErrorNumber', + suggest: [ + { + messageId: 'conditionFixCompareZero', + fix: util.getWrappingFixer({ + sourceCode, + node: node.parent, + innerNode: node, + // TODO: we have to compare to 0n if the type is bigint + wrap: code => `${code} === 0`, + }), + }, + { + // TODO: don't suggest this for bigint because it can't be NaN + messageId: 'conditionFixCompareNaN', + fix: util.getWrappingFixer({ + sourceCode, + node: node.parent, + innerNode: node, + wrap: code => `Number.isNaN(${code})`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: util.getWrappingFixer({ + sourceCode, + node: node.parent, + innerNode: node, + wrap: code => `!Boolean(${code})`, + }), + }, + ], + }); + } else { + // if (number) + context.report({ + node, + messageId: 'conditionErrorNumber', + suggest: [ + { + messageId: 'conditionFixCompareZero', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code} !== 0`, + }), + }, + { + messageId: 'conditionFixCompareNaN', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `!Number.isNaN(${code})`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `Boolean(${code})`, + }), + }, + ], + }); + } } return; } @@ -249,7 +562,73 @@ export default util.createRule({ // nullable number if (is('nullish', 'number')) { if (!options.allowNullableNumber) { - context.report({ node, messageId: 'conditionErrorNullableNumber' }); + if (isLogicalNegationExpression(node.parent!)) { + // if (!nullableNumber) + context.report({ + node, + messageId: 'conditionErrorNullableNumber', + suggest: [ + { + messageId: 'conditionFixCompareNullish', + fix: util.getWrappingFixer({ + sourceCode, + node: node.parent, + innerNode: node, + wrap: code => `${code} == null`, + }), + }, + { + messageId: 'conditionFixDefaultZero', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code} ?? 0`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: util.getWrappingFixer({ + sourceCode, + node: node.parent, + innerNode: node, + wrap: code => `!Boolean(${code})`, + }), + }, + ], + }); + } else { + // if (nullableNumber) + context.report({ + node, + messageId: 'conditionErrorNullableNumber', + suggest: [ + { + messageId: 'conditionFixCompareNullish', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code} != null`, + }), + }, + { + messageId: 'conditionFixDefaultZero', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code} ?? 0`, + }), + }, + { + messageId: 'conditionFixCastBoolean', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `Boolean(${code})`, + }), + }, + ], + }); + } } return; } @@ -264,7 +643,30 @@ export default util.createRule({ // nullable object if (is('nullish', 'object')) { if (!options.allowNullableObject) { - context.report({ node, messageId: 'conditionErrorNullableObject' }); + if (isLogicalNegationExpression(node.parent!)) { + // if (!nullableObject) + context.report({ + node, + messageId: 'conditionErrorNullableObject', + fix: util.getWrappingFixer({ + sourceCode, + node: node.parent, + innerNode: node, + wrap: code => `${code} == null`, + }), + }); + } else { + // if (nullableObject) + context.report({ + node, + messageId: 'conditionErrorNullableObject', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `${code} != null`, + }), + }); + } } return; } @@ -272,7 +674,20 @@ export default util.createRule({ // any if (is('any')) { if (!options.allowAny) { - context.report({ node, messageId: 'conditionErrorAny' }); + context.report({ + node, + messageId: 'conditionErrorAny', + suggest: [ + { + messageId: 'conditionFixCastBoolean', + fix: util.getWrappingFixer({ + sourceCode, + node, + wrap: code => `Boolean(${code})`, + }), + }, + ], + }); } return; } @@ -370,3 +785,31 @@ export default util.createRule({ } }, }); + +function isLogicalNegationExpression( + node: TSESTree.Node, +): node is TSESTree.UnaryExpression { + return node.type === AST_NODE_TYPES.UnaryExpression && node.operator === '!'; +} + +function isArrayLengthExpression( + node: TSESTree.Node, + typeChecker: ts.TypeChecker, + parserServices: ParserServices, +): node is TSESTree.MemberExpressionNonComputedName { + if (node.type !== AST_NODE_TYPES.MemberExpression) { + return false; + } + if (node.computed) { + return false; + } + if (node.property.name !== 'length') { + return false; + } + const objectTsNode = parserServices.esTreeNodeToTSNodeMap.get(node.object); + const objectType = util.getConstrainedTypeAtLocation( + typeChecker, + objectTsNode, + ); + return util.isTypeArrayTypeOrUnionOfArrayTypes(objectType, typeChecker); +} diff --git a/packages/eslint-plugin/src/util/getWrappingFixer.ts b/packages/eslint-plugin/src/util/getWrappingFixer.ts new file mode 100644 index 000000000000..4a9edcfcc98b --- /dev/null +++ b/packages/eslint-plugin/src/util/getWrappingFixer.ts @@ -0,0 +1,109 @@ +import { + AST_NODE_TYPES, + TSESLint, + TSESTree, +} from '@typescript-eslint/experimental-utils'; +import * as util from '../util'; + +interface WrappingFixerParams { + /** Source code. */ + sourceCode: Readonly; + /** The node we want to modify. */ + node: TSESTree.Node; + /** + * 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). + */ + innerNode?: TSESTree.Node; + /** + * The function which gets the code of the `innerNode` and returns some code around it. + * E.g. ``code => `${code} != null` `` + */ + wrap: (code: string) => string; +} + +/** + * Wraps node with some code. Adds parenthesis as necessary. + * @returns Fixer which adds the specified code and parens if necessary. + */ +export function getWrappingFixer( + params: WrappingFixerParams, +): TSESLint.ReportFixFunction { + const { sourceCode, node, innerNode = node, wrap } = params; + 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})`; + } + + // do the wrapping + code = wrap(code); + + let parent = util.nullThrows( + node.parent, + util.NullThrowsReasons.MissingParent, + ); + + // 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 + // 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)) { + code = `(${code})`; + } + } + + // check if we need to insert semicolon + for (;;) { + const prevParent = parent; + parent = parent.parent!; + if ( + parent.type === AST_NODE_TYPES.LogicalExpression || + parent.type === AST_NODE_TYPES.BinaryExpression + ) { + 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!; + if ( + block.type === AST_NODE_TYPES.Program || + block.type === AST_NODE_TYPES.BlockStatement + ) { + // 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}`; + } + } + } + break; + } + + return fixer.replaceText(node, code); + }; +} diff --git a/packages/eslint-plugin/src/util/index.ts b/packages/eslint-plugin/src/util/index.ts index fc5346f73466..e7bb53547fc8 100644 --- a/packages/eslint-plugin/src/util/index.ts +++ b/packages/eslint-plugin/src/util/index.ts @@ -4,6 +4,7 @@ export * from './astUtils'; export * from './collectUnusedVariables'; export * from './createRule'; export * from './getFunctionHeadLoc'; +export * from './getWrappingFixer'; export * from './isTypeReadonly'; export * from './misc'; export * from './nullThrows'; 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 0d697ebb905d..d24de92ac65f 100644 --- a/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts +++ b/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts @@ -1,13 +1,13 @@ import * as path from 'path'; import rule, { - Options, MessageId, + Options, } from '../../src/rules/strict-boolean-expressions'; import { batchedSingleLineTests, getFixturesRootDir, - RuleTester, noFormat, + RuleTester, } from '../RuleTester'; const rootPath = getFixturesRootDir(); @@ -142,13 +142,49 @@ if (x) { { allowString: false, allowNumber: false, allowNullableObject: false }, ], code: noFormat` - if (true && 1) {} - while (false || "a") {} + if (true && (1 + 1)) {} + while (false || "a" + "b") {} (x: object) => true || false || x ? true : false; `, errors: [ - { messageId: 'conditionErrorNumber', line: 2, column: 13 }, - { messageId: 'conditionErrorString', line: 3, column: 25 }, + { + messageId: 'conditionErrorNumber', + line: 2, + column: 14, + suggestions: [ + { + messageId: 'conditionFixCompareZero', + output: 'if (true && ((1 + 1) !== 0)) {}', + }, + { + messageId: 'conditionFixCompareNaN', + output: 'if (true && (!Number.isNaN((1 + 1)))) {}', + }, + { + messageId: 'conditionFixCastBoolean', + output: 'if (true && (Boolean((1 + 1)))) {}', + }, + ], + }, + { + messageId: 'conditionErrorString', + line: 3, + column: 25, + suggestions: [ + { + messageId: 'conditionFixCompareStringLength', + output: ' while (false || (("a" + "b").length > 0)) {}', + }, + { + messageId: 'conditionFixCompareEmptyString', + output: ' while (false || (("a" + "b") !== "")) {}', + }, + { + messageId: 'conditionFixCastBoolean', + output: ' while (false || (Boolean(("a" + "b")))) {}', + }, + ], + }, { messageId: 'conditionErrorObject', line: 4, column: 41 }, ], }), @@ -158,15 +194,48 @@ if (x) { options: [ { allowString: false, allowNumber: false, allowNullableObject: false }, ], - code: ` - if (('' && {}) || (0 && void 0)) { - } - `, + code: noFormat`if (('' && {}) || (0 && void 0)) { }`, errors: [ - { messageId: 'conditionErrorString', line: 2, column: 14 }, - { messageId: 'conditionErrorObject', line: 2, column: 20 }, - { messageId: 'conditionErrorNumber', line: 2, column: 28 }, - { messageId: 'conditionErrorNullish', line: 2, column: 33 }, + { + messageId: 'conditionErrorString', + line: 1, + column: 6, + suggestions: [ + { + messageId: 'conditionFixCompareStringLength', + output: noFormat`if (((''.length > 0) && {}) || (0 && void 0)) { }`, + }, + { + messageId: 'conditionFixCompareEmptyString', + output: noFormat`if ((('' !== "") && {}) || (0 && void 0)) { }`, + }, + { + messageId: 'conditionFixCastBoolean', + output: noFormat`if (((Boolean('')) && {}) || (0 && void 0)) { }`, + }, + ], + }, + { messageId: 'conditionErrorObject', line: 1, column: 12 }, + { + messageId: 'conditionErrorNumber', + line: 1, + column: 20, + suggestions: [ + { + messageId: 'conditionFixCompareZero', + output: noFormat`if (('' && {}) || ((0 !== 0) && void 0)) { }`, + }, + { + messageId: 'conditionFixCompareNaN', + output: noFormat`if (('' && {}) || ((!Number.isNaN(0)) && void 0)) { }`, + }, + { + messageId: 'conditionFixCastBoolean', + output: noFormat`if (('' && {}) || ((Boolean(0)) && void 0)) { }`, + }, + ], + }, + { messageId: 'conditionErrorNullish', line: 1, column: 25 }, ], }, @@ -213,15 +282,105 @@ if (x) { while ("") {} for (; "foo";) {} declare const x: string; if (x) {} - (x: string) => !x; + (x: string) => (!x); (x: T) => x ? 1 : 0; `, errors: [ - { messageId: 'conditionErrorString', line: 2, column: 8 }, - { messageId: 'conditionErrorString', line: 3, column: 16 }, - { messageId: 'conditionErrorString', line: 4, column: 38 }, - { messageId: 'conditionErrorString', line: 5, column: 25 }, - { messageId: 'conditionErrorString', line: 6, column: 37 }, + { + messageId: 'conditionErrorString', + line: 2, + column: 8, + suggestions: [ + { + messageId: 'conditionFixCompareStringLength', + output: `while ("".length > 0) {}`, + }, + { + messageId: 'conditionFixCompareEmptyString', + output: `while ("" !== "") {}`, + }, + { + messageId: 'conditionFixCastBoolean', + output: `while (Boolean("")) {}`, + }, + ], + }, + { + messageId: 'conditionErrorString', + line: 3, + column: 16, + suggestions: [ + { + messageId: 'conditionFixCompareStringLength', + output: ` for (; "foo".length > 0;) {}`, + }, + { + messageId: 'conditionFixCompareEmptyString', + output: ` for (; "foo" !== "";) {}`, + }, + { + messageId: 'conditionFixCastBoolean', + output: ` for (; Boolean("foo");) {}`, + }, + ], + }, + { + messageId: 'conditionErrorString', + line: 4, + column: 38, + suggestions: [ + { + messageId: 'conditionFixCompareStringLength', + output: ` declare const x: string; if (x.length > 0) {}`, + }, + { + messageId: 'conditionFixCompareEmptyString', + output: ` declare const x: string; if (x !== "") {}`, + }, + { + messageId: 'conditionFixCastBoolean', + output: ` declare const x: string; if (Boolean(x)) {}`, + }, + ], + }, + { + messageId: 'conditionErrorString', + line: 5, + column: 26, + suggestions: [ + { + messageId: 'conditionFixCompareStringLength', + output: ` (x: string) => (x.length === 0);`, + }, + { + messageId: 'conditionFixCompareEmptyString', + output: ` (x: string) => (x === "");`, + }, + { + messageId: 'conditionFixCastBoolean', + output: ` (x: string) => (!Boolean(x));`, + }, + ], + }, + { + messageId: 'conditionErrorString', + line: 6, + column: 37, + suggestions: [ + { + messageId: 'conditionFixCompareStringLength', + output: ` (x: T) => (x.length > 0) ? 1 : 0;`, + }, + { + messageId: 'conditionFixCompareEmptyString', + output: ` (x: T) => (x !== "") ? 1 : 0;`, + }, + { + messageId: 'conditionFixCastBoolean', + output: ` (x: T) => (Boolean(x)) ? 1 : 0;`, + }, + ], + }, ], }), @@ -233,15 +392,169 @@ if (x) { for (; 123;) {} declare const x: number; if (x) {} (x: bigint) => !x; - (x: T) => x ? 1 : 0; + (x: T) => (x) ? 1 : 0; + ![]["length"]; // doesn't count as array.length when computed + declare const a: any[] & { notLength: number }; if (a.notLength) {} + `, + errors: [ + { + messageId: 'conditionErrorNumber', + line: 2, + column: 8, + suggestions: [ + { + messageId: 'conditionFixCompareZero', + // TODO: fix compare zero suggestion for bigint + output: `while (0n !== 0) {}`, + }, + { + // TODO: remove check NaN suggestion for bigint + messageId: 'conditionFixCompareNaN', + output: `while (!Number.isNaN(0n)) {}`, + }, + { + messageId: 'conditionFixCastBoolean', + output: `while (Boolean(0n)) {}`, + }, + ], + }, + { + messageId: 'conditionErrorNumber', + line: 3, + column: 16, + suggestions: [ + { + messageId: 'conditionFixCompareZero', + output: ` for (; 123 !== 0;) {}`, + }, + { + messageId: 'conditionFixCompareNaN', + output: ` for (; !Number.isNaN(123);) {}`, + }, + { + messageId: 'conditionFixCastBoolean', + output: ` for (; Boolean(123);) {}`, + }, + ], + }, + { + messageId: 'conditionErrorNumber', + line: 4, + column: 38, + suggestions: [ + { + messageId: 'conditionFixCompareZero', + output: ` declare const x: number; if (x !== 0) {}`, + }, + { + messageId: 'conditionFixCompareNaN', + output: ` declare const x: number; if (!Number.isNaN(x)) {}`, + }, + { + messageId: 'conditionFixCastBoolean', + output: ` declare const x: number; if (Boolean(x)) {}`, + }, + ], + }, + { + messageId: 'conditionErrorNumber', + line: 5, + column: 25, + suggestions: [ + { + messageId: 'conditionFixCompareZero', + // TODO: fix compare zero suggestion for bigint + output: ` (x: bigint) => (x === 0);`, + }, + { + // TODO: remove check NaN suggestion for bigint + messageId: 'conditionFixCompareNaN', + output: ` (x: bigint) => (Number.isNaN(x));`, + }, + { + messageId: 'conditionFixCastBoolean', + output: ` (x: bigint) => (!Boolean(x));`, + }, + ], + }, + { + messageId: 'conditionErrorNumber', + line: 6, + column: 38, + suggestions: [ + { + messageId: 'conditionFixCompareZero', + output: ` (x: T) => (x !== 0) ? 1 : 0;`, + }, + { + messageId: 'conditionFixCompareNaN', + output: ` (x: T) => (!Number.isNaN(x)) ? 1 : 0;`, + }, + { + messageId: 'conditionFixCastBoolean', + output: ` (x: T) => (Boolean(x)) ? 1 : 0;`, + }, + ], + }, + { + messageId: 'conditionErrorNumber', + line: 7, + column: 10, + suggestions: [ + { + messageId: 'conditionFixCompareZero', + 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`, + }, + { + messageId: 'conditionFixCastBoolean', + output: ` (!Boolean([]["length"])); // doesn't count as array.length when computed`, + }, + ], + }, + { + messageId: 'conditionErrorNumber', + line: 8, + column: 61, + suggestions: [ + { + messageId: 'conditionFixCompareZero', + output: ` declare const a: any[] & { notLength: number }; if (a.notLength !== 0) {}`, + }, + { + messageId: 'conditionFixCompareNaN', + output: ` declare const a: any[] & { notLength: number }; if (!Number.isNaN(a.notLength)) {}`, + }, + { + messageId: 'conditionFixCastBoolean', + output: ` declare const a: any[] & { notLength: number }; if (Boolean(a.notLength)) {}`, + }, + ], + }, + ], + }), + + // number (array.length) in boolean context + ...batchedSingleLineTests({ + options: [{ allowNumber: false }], + code: noFormat` + if (![].length) {} + (a: number[]) => a.length && "..." + (...a: T) => a.length || "empty"; `, errors: [ - { messageId: 'conditionErrorNumber', line: 2, column: 8 }, - { messageId: 'conditionErrorNumber', line: 3, column: 16 }, - { messageId: 'conditionErrorNumber', line: 4, column: 38 }, - { messageId: 'conditionErrorNumber', line: 5, column: 25 }, - { messageId: 'conditionErrorNumber', line: 6, column: 37 }, + { messageId: 'conditionErrorNumber', line: 2, column: 6 }, + { messageId: 'conditionErrorNumber', line: 3, column: 26 }, + { messageId: 'conditionErrorNumber', line: 4, column: 43 }, ], + output: noFormat` + if ([].length === 0) {} + (a: number[]) => (a.length > 0) && "..." + (...a: T) => (a.length > 0) || "empty"; + `, }), // mixed `string | number` value in boolean context @@ -268,9 +581,51 @@ if (x) { (x: T) => x ? 1 : 0; `, errors: [ - { messageId: 'conditionErrorNullableBoolean', line: 2, column: 38 }, - { messageId: 'conditionErrorNullableBoolean', line: 3, column: 27 }, - { messageId: 'conditionErrorNullableBoolean', line: 4, column: 57 }, + { + messageId: 'conditionErrorNullableBoolean', + line: 2, + column: 38, + suggestions: [ + { + messageId: 'conditionFixDefaultFalse', + output: `declare const x: boolean | null; if (x ?? false) {}`, + }, + { + messageId: 'conditionFixCompareTrue', + output: `declare const x: boolean | null; if (x === true) {}`, + }, + ], + }, + { + messageId: 'conditionErrorNullableBoolean', + line: 3, + column: 27, + suggestions: [ + { + messageId: 'conditionFixDefaultFalse', + output: ` (x?: boolean) => !(x ?? false);`, + }, + { + messageId: 'conditionFixCompareFalse', + output: ` (x?: boolean) => (x === false);`, + }, + ], + }, + { + messageId: 'conditionErrorNullableBoolean', + line: 4, + column: 57, + suggestions: [ + { + messageId: 'conditionFixDefaultFalse', + output: ` (x: T) => (x ?? false) ? 1 : 0;`, + }, + { + messageId: 'conditionFixCompareTrue', + output: ` (x: T) => (x === true) ? 1 : 0;`, + }, + ], + }, ], }), @@ -287,6 +642,11 @@ if (x) { { messageId: 'conditionErrorNullableObject', line: 3, column: 33 }, { messageId: 'conditionErrorNullableObject', line: 4, column: 52 }, ], + output: noFormat` + declare const x: object | null; if (x != null) {} + (x?: { a: number }) => (x == null); + (x: T) => (x != null) ? 1 : 0; + `, }), // nullable string in boolean context @@ -297,9 +657,66 @@ if (x) { (x: T) => x ? 1 : 0; `, errors: [ - { messageId: 'conditionErrorNullableString', line: 2, column: 37 }, - { messageId: 'conditionErrorNullableString', line: 3, column: 26 }, - { messageId: 'conditionErrorNullableString', line: 4, column: 56 }, + { + messageId: 'conditionErrorNullableString', + line: 2, + column: 37, + suggestions: [ + { + messageId: 'conditionFixCompareNullish', + output: 'declare const x: string | null; if (x != null) {}', + }, + { + messageId: 'conditionFixDefaultEmptyString', + output: 'declare const x: string | null; if (x ?? "") {}', + }, + { + messageId: 'conditionFixCastBoolean', + output: 'declare const x: string | null; if (Boolean(x)) {}', + }, + ], + }, + { + messageId: 'conditionErrorNullableString', + line: 3, + column: 26, + suggestions: [ + { + messageId: 'conditionFixCompareNullish', + output: ' (x?: string) => (x == null);', + }, + { + messageId: 'conditionFixDefaultEmptyString', + output: ' (x?: string) => !(x ?? "");', + }, + { + messageId: 'conditionFixCastBoolean', + output: ' (x?: string) => (!Boolean(x));', + }, + ], + }, + { + messageId: 'conditionErrorNullableString', + line: 4, + column: 56, + suggestions: [ + { + messageId: 'conditionFixCompareNullish', + output: + ' (x: T) => (x != null) ? 1 : 0;', + }, + { + messageId: 'conditionFixDefaultEmptyString', + output: + ' (x: T) => (x ?? "") ? 1 : 0;', + }, + { + messageId: 'conditionFixCastBoolean', + output: + ' (x: T) => (Boolean(x)) ? 1 : 0;', + }, + ], + }, ], }), @@ -311,9 +728,66 @@ if (x) { (x: T) => x ? 1 : 0; `, errors: [ - { messageId: 'conditionErrorNullableNumber', line: 2, column: 37 }, - { messageId: 'conditionErrorNullableNumber', line: 3, column: 26 }, - { messageId: 'conditionErrorNullableNumber', line: 4, column: 56 }, + { + messageId: 'conditionErrorNullableNumber', + line: 2, + column: 37, + suggestions: [ + { + messageId: 'conditionFixCompareNullish', + output: 'declare const x: number | null; if (x != null) {}', + }, + { + messageId: 'conditionFixDefaultZero', + output: 'declare const x: number | null; if (x ?? 0) {}', + }, + { + messageId: 'conditionFixCastBoolean', + output: 'declare const x: number | null; if (Boolean(x)) {}', + }, + ], + }, + { + messageId: 'conditionErrorNullableNumber', + line: 3, + column: 26, + suggestions: [ + { + messageId: 'conditionFixCompareNullish', + output: ' (x?: number) => (x == null);', + }, + { + messageId: 'conditionFixDefaultZero', + output: ' (x?: number) => !(x ?? 0);', + }, + { + messageId: 'conditionFixCastBoolean', + output: ' (x?: number) => (!Boolean(x));', + }, + ], + }, + { + messageId: 'conditionErrorNullableNumber', + line: 4, + column: 56, + suggestions: [ + { + messageId: 'conditionFixCompareNullish', + output: + ' (x: T) => (x != null) ? 1 : 0;', + }, + { + messageId: 'conditionFixDefaultZero', + output: + ' (x: T) => (x ?? 0) ? 1 : 0;', + }, + { + messageId: 'conditionFixCastBoolean', + output: + ' (x: T) => (Boolean(x)) ? 1 : 0;', + }, + ], + }, ], }), @@ -326,11 +800,43 @@ if (x) { (x: T) => x ? 1 : 0; `, errors: [ - { messageId: 'conditionErrorAny', line: 2, column: 5 }, - { messageId: 'conditionErrorAny', line: 3, column: 15 }, - { messageId: 'conditionErrorAny', line: 4, column: 34 }, + { + messageId: 'conditionErrorAny', + line: 2, + column: 5, + suggestions: [ + { + messageId: 'conditionFixCastBoolean', + output: 'if (Boolean(x)) {}', + }, + ], + }, + { + messageId: 'conditionErrorAny', + line: 3, + column: 15, + suggestions: [ + { + messageId: 'conditionFixCastBoolean', + output: ' x => !(Boolean(x));', + }, + ], + }, + { + messageId: 'conditionErrorAny', + line: 4, + column: 34, + suggestions: [ + { + messageId: 'conditionFixCastBoolean', + output: ' (x: T) => (Boolean(x)) ? 1 : 0;', + }, + ], + }, ], }), + + // noStrictNullCheck { code: ` declare const x: string[] | null; @@ -353,5 +859,27 @@ if (x) { tsconfigRootDir: path.join(rootPath, 'unstrict'), }, }, + + // automatic semicolon insertion test + { + options: [{ allowNullableObject: false }], + code: noFormat` + declare const obj: { x: number } | null; + !obj + obj || 0 + obj && 1 || 0 + `, + errors: [ + { messageId: 'conditionErrorNullableObject', line: 3, column: 10 }, + { messageId: 'conditionErrorNullableObject', line: 4, column: 9 }, + { messageId: 'conditionErrorNullableObject', line: 5, column: 9 }, + ], + output: noFormat` + declare const obj: { x: number } | null; + (obj == null) + ;(obj != null) || 0 + ;(obj != null) && 1 || 0 + `, + }, ], }); From cb2256168c67e0383083673a5afe77076de49da5 Mon Sep 17 00:00:00 2001 From: Zen <843968788@qq.com> Date: Tue, 9 Mar 2021 01:35:23 +0800 Subject: [PATCH 013/473] fix(eslint-plugin): [no-unnecessary-type-assertion] handle assignment (#3133) --- .../rules/no-unnecessary-type-assertion.ts | 19 +++++++++ packages/eslint-plugin/src/util/types.ts | 8 ++++ .../no-unnecessary-type-assertion.test.ts | 40 +++++++++++++++++++ 3 files changed, 67 insertions(+) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts index 634d8b890ce1..5ae12f5a33d6 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts @@ -135,7 +135,26 @@ export default util.createRule({ return { TSNonNullExpression(node): void { + if ( + node.parent?.type === AST_NODE_TYPES.AssignmentExpression && + node.parent?.operator === '=' && + node.parent.left === node + ) { + context.report({ + node, + messageId: 'contextuallyUnnecessary', + fix(fixer) { + return fixer.removeRange([ + node.expression.range[1], + node.range[1], + ]); + }, + }); + return; + } + const originalNode = parserServices.esTreeNodeToTSNodeMap.get(node); + const type = util.getConstrainedTypeAtLocation( checker, originalNode.expression, diff --git a/packages/eslint-plugin/src/util/types.ts b/packages/eslint-plugin/src/util/types.ts index d29349f812fc..920ce66de02f 100644 --- a/packages/eslint-plugin/src/util/types.ts +++ b/packages/eslint-plugin/src/util/types.ts @@ -11,6 +11,7 @@ import { isVariableDeclaration, unionTypeParts, isPropertyAssignment, + isBinaryExpression, } from 'tsutils'; import * as ts from 'typescript'; @@ -498,6 +499,13 @@ export function getContextualType( return checker.getContextualType(parent); } else if (isPropertyAssignment(parent) && isIdentifier(node)) { return checker.getContextualType(node); + } else if ( + isBinaryExpression(parent) && + parent.operatorToken.kind === ts.SyntaxKind.EqualsToken && + parent.right === node + ) { + // is RHS of assignment + return checker.getTypeAtLocation(parent.left); } else if ( ![ts.SyntaxKind.TemplateSpan, ts.SyntaxKind.JsxExpression].includes( parent.kind, diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts index f5671dd5d6b9..65d0874dd3af 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts @@ -186,6 +186,22 @@ const c = [...a, ...b]; { code: "const a = { foo: 'foo' };", }, + { + code: ` +let a: number | undefined; +let b: number | undefined; +let c: number; +a = b; +c = b!; +a! -= 1; + `, + }, + { + code: ` +let a: { b?: string } | undefined; +a!.b = ''; + `, + }, ], invalid: [ @@ -451,5 +467,29 @@ function Test(props: { id?: string | number }) { ], filename: 'react.tsx', }, + { + code: ` +let x: number | undefined; +let y: number | undefined; +y = x!; +y! = 0; + `, + output: ` +let x: number | undefined; +let y: number | undefined; +y = x; +y = 0; + `, + errors: [ + { + messageId: 'contextuallyUnnecessary', + line: 4, + }, + { + messageId: 'contextuallyUnnecessary', + line: 5, + }, + ], + }, ], }); From dd25790a435edef78f6e972ab197b0bd0cfac0f4 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 8 Mar 2021 18:02:52 +0000 Subject: [PATCH 014/473] chore: publish v4.17.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 1b47e3099906..3d173877642d 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.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) + + +### Bug Fixes + +* **eslint-plugin:** [no-unnecessary-type-assertion] handle assignment ([#3133](https://github.com/typescript-eslint/typescript-eslint/issues/3133)) ([cb22561](https://github.com/typescript-eslint/typescript-eslint/commit/cb2256168c67e0383083673a5afe77076de49da5)) + + +### Features + +* **eslint-plugin:** [strict-bool-expr] add fixes and suggestions ([#2847](https://github.com/typescript-eslint/typescript-eslint/issues/2847)) ([3f9e9a1](https://github.com/typescript-eslint/typescript-eslint/commit/3f9e9a1e9fc3e507bd01d1913ef642cd129de402)) + + + + + ## [4.16.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.0...v4.16.1) (2021-03-01) diff --git a/lerna.json b/lerna.json index df984d35e16c..f760626ee5dc 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.16.1", + "version": "4.17.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index fbfe59d26529..5f6039b50899 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.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.16.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.0...v4.16.1) (2021-03-01) **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 8d6cc10ab338..0c8f39247c1a 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.16.1", + "version": "4.17.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.16.1", + "@typescript-eslint/experimental-utils": "4.17.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 423df7673046..1180462bd2b6 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.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.16.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.0...v4.16.1) (2021-03-01) **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 1deff124a26e..6874c940ed4e 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.16.1", + "version": "4.17.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.16.1", + "@typescript-eslint/experimental-utils": "4.17.0", "lodash": "^4.17.15" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.16.1" + "@typescript-eslint/parser": "4.17.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 4b4fda7ee153..717d2a5f215c 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.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) + + +### Bug Fixes + +* **eslint-plugin:** [no-unnecessary-type-assertion] handle assignment ([#3133](https://github.com/typescript-eslint/typescript-eslint/issues/3133)) ([cb22561](https://github.com/typescript-eslint/typescript-eslint/commit/cb2256168c67e0383083673a5afe77076de49da5)) + + +### Features + +* **eslint-plugin:** [strict-bool-expr] add fixes and suggestions ([#2847](https://github.com/typescript-eslint/typescript-eslint/issues/2847)) ([3f9e9a1](https://github.com/typescript-eslint/typescript-eslint/commit/3f9e9a1e9fc3e507bd01d1913ef642cd129de402)) + + + + + ## [4.16.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.0...v4.16.1) (2021-03-01) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 8391c2b25500..87cfd4ab8001 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.16.1", + "version": "4.17.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -42,8 +42,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.16.1", - "@typescript-eslint/scope-manager": "4.16.1", + "@typescript-eslint/experimental-utils": "4.17.0", + "@typescript-eslint/scope-manager": "4.17.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 2776535130f6..cee45cb853b2 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.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + ## [4.16.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.0...v4.16.1) (2021-03-01) **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 cb9baec6ed67..214b518e8eb6 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.16.1", + "version": "4.17.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.16.1", - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/typescript-estree": "4.16.1", + "@typescript-eslint/scope-manager": "4.17.0", + "@typescript-eslint/types": "4.17.0", + "@typescript-eslint/typescript-estree": "4.17.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index fc98f1371930..c28cec93ad18 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.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + ## [4.16.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.0...v4.16.1) (2021-03-01) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 4f306dd88b10..c1d8e83cae9c 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.16.1", + "version": "4.17.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.16.1", - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/typescript-estree": "4.16.1", + "@typescript-eslint/scope-manager": "4.17.0", + "@typescript-eslint/types": "4.17.0", + "@typescript-eslint/typescript-estree": "4.17.0", "debug": "^4.1.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.16.1", + "@typescript-eslint/experimental-utils": "4.17.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index f3cfeed1d185..dceda0dbd9de 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.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + ## [4.16.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.0...v4.16.1) (2021-03-01) **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 c38f88ed26cb..f3347a3f541b 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.16.1", + "version": "4.17.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/visitor-keys": "4.16.1" + "@typescript-eslint/types": "4.17.0", + "@typescript-eslint/visitor-keys": "4.17.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.16.1", + "@typescript-eslint/typescript-estree": "4.17.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 04637206ddeb..499029da5326 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.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.16.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.0...v4.16.1) (2021-03-01) **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 f5558a30eb3f..3a4897315d2d 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.16.1", + "version": "4.17.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 627e088a3f67..2206d4d67a50 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.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + ## [4.16.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.0...v4.16.1) (2021-03-01) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 0d04bd8296f9..c6fcd11037e9 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.16.1", + "version": "4.17.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 5cee167088c2..3df66ed1e9ba 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.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + ## [4.16.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.0...v4.16.1) (2021-03-01) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 784d2b788a9a..fa0db38da5d3 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.16.1", + "version": "4.17.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.16.1", - "@typescript-eslint/visitor-keys": "4.16.1", + "@typescript-eslint/types": "4.17.0", + "@typescript-eslint/visitor-keys": "4.17.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.16.1", + "@typescript-eslint/shared-fixtures": "4.17.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index e0ecce16f417..c3f97732be62 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.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.16.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.0...v4.16.1) (2021-03-01) **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 4287d36b0c8f..78f382dcbd72 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.16.1", + "version": "4.17.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.16.1", + "@typescript-eslint/types": "4.17.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From d3086d8acc6092964d98747d782417225871cb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=B7=E5=AD=90=20=28Maiko=20Tan=29?= Date: Tue, 9 Mar 2021 12:10:32 +0800 Subject: [PATCH 015/473] docs(eslint-plugin): [no-floating-promises] correct typo in 'allowAsStatement' (#3154) --- packages/eslint-plugin/docs/rules/no-floating-promises.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/no-floating-promises.md b/packages/eslint-plugin/docs/rules/no-floating-promises.md index bda8c26b7855..86923bfad79c 100644 --- a/packages/eslint-plugin/docs/rules/no-floating-promises.md +++ b/packages/eslint-plugin/docs/rules/no-floating-promises.md @@ -77,7 +77,7 @@ void returnsPromise(); void Promise.reject('value'); ``` -With this option set to `true`, and if you are using `no-void`, you should turn on the [`allowAsAStatement`](https://eslint.org/docs/rules/no-void#allowasstatement) option. +With this option set to `true`, and if you are using `no-void`, you should turn on the [`allowAsStatement`](https://eslint.org/docs/rules/no-void#allowasstatement) option. ### `ignoreIIFE` From d0dea1b03eb1806b30fd6696cadfcc47c17abb86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 04:44:47 +0000 Subject: [PATCH 016/473] chore: bump @types/node from 14.14.31 to 14.14.32 (#3158) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.31 to 14.14.32. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) 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 815a73208c88..b0b73086881b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1933,9 +1933,9 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node@*", "@types/node@>= 8", "@types/node@^14.14.27": - version "14.14.31" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.31.tgz#72286bd33d137aa0d152d47ec7c1762563d34055" - integrity sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g== + version "14.14.32" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.32.tgz#90c5c4a8d72bbbfe53033f122341343249183448" + integrity sha512-/Ctrftx/zp4m8JOujM5ZhwzlWLx22nbQJiVqz8/zE15gOeEW+uly3FSX4fGFpcfEvFzXcMCJwq9lGVWgyARXhg== "@types/normalize-package-data@^2.4.0": version "2.4.0" From 58e8bb3cd2dcacc8a0cf51b40d7083f2bfe37d28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 08:20:16 +0000 Subject: [PATCH 017/473] chore: bump tsutils from 3.20.0 to 3.21.0 (#3166) Bumps [tsutils](https://github.com/ajafff/tsutils) from 3.20.0 to 3.21.0. - [Release notes](https://github.com/ajafff/tsutils/releases) - [Changelog](https://github.com/ajafff/tsutils/blob/master/CHANGELOG.md) - [Commits](https://github.com/ajafff/tsutils/compare/v3.20.0...v3.21.0) 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 b0b73086881b..984edff2b994 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8608,9 +8608,9 @@ tsutils@^2.29.0: tslib "^1.8.1" tsutils@^3.17.1: - version "3.20.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.20.0.tgz#ea03ea45462e146b53d70ce0893de453ff24f698" - integrity sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg== + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== dependencies: tslib "^1.8.1" From f3f2b6560640de37e81dbf0e7aac4aaa56b9aa12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 08:49:54 +0000 Subject: [PATCH 018/473] chore: bump cspell from 5.3.4 to 5.3.7 (#3167) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.3.4 to 5.3.7. - [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.4...v5.3.7) Signed-off-by: dependabot[bot] --- yarn.lock | 60 +++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/yarn.lock b/yarn.lock index 984edff2b994..0ff27eedd8e4 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.4": - version "5.3.4" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.3.4.tgz#20aafa6debdd58fa825ebf4159016f3f57106be2" - integrity sha512-dM5sblEPqgrCUc53FSzJxrObEqYzVg70iqGMcGrawXy3wk5BiiO7caXWaRuhe0Wy5ooytI5nJK3oRELS8A501g== +"@cspell/cspell-types@^5.3.7": + version "5.3.7" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.3.7.tgz#778042121e2b342693c22937e23072c0382c7351" + integrity sha512-3cJcxV8rJez2MLOGuCQEdMVzXUEzH6XsUr3EzO7IDCt6fK66YGTGFuDIHVya1H3xQ+EENv/o9mZh13LNBxikVg== "@cspell/dict-ada@^1.1.1": version "1.1.1" @@ -3177,59 +3177,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.4: - version "5.3.4" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.3.4.tgz#656188388467f8be7e115924e7b43ba85c234fa4" - integrity sha512-SrtfNUP7CqFstTzuRscGI5IFYu1j3ay5a9ioFTx2CoaFqp2BXqFpE8z9NE6Lao+7z7Fg4hiPgvsCd1gn3J/P8A== +cspell-glob@^5.3.7: + version "5.3.7" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.3.7.tgz#0677b43f22c06921d24699529cfd70027b10433c" + integrity sha512-YoOiFEI0fhs2XU0F9Lrg5emKHR2tCrDabG/hVjhEDKYRSN9D7Zx+2hXKFmi0ssmW38XKIqpnmtW/dye1LHffjQ== dependencies: micromatch "^4.0.2" -cspell-io@^5.3.4: - version "5.3.4" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.3.4.tgz#b468ae8d92de863a5aad5d6d4a542e4ebe63b63d" - integrity sha512-1IHuU8Y4zxGj/nyH6DawKwQevRNYiSjPqoLjqyJFeMtd3Nix0mVHf0UxotPiHhuZkuuMgQkxA4EeavGDS5jOng== +cspell-io@^5.3.7: + version "5.3.7" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.3.7.tgz#07ad1e719b6f4f9274535502a425ba706b91cb60" + integrity sha512-uQZed/E+mBsAxH8rW9GqYL8IqaT1Ed4FJZnK4zjIWcY3KPpNnGAywY5XtvcfQSn59WIyjhztzle06z7wGHP8Jg== dependencies: iconv-lite "^0.6.2" iterable-to-stream "^1.0.1" -cspell-lib@^5.3.4: - version "5.3.4" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.3.4.tgz#039b4ddd3bfbb24038ef362590ab2b3a2dc8c89c" - integrity sha512-uA35jAW3CAqJeRZhQdAmhDfoHVCK0kBQcXEAerWO1z4xDThE/JRAJEKMAXirVIQufOu9X2btjQZse9ubg0p7sQ== +cspell-lib@^5.3.7: + version "5.3.7" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.3.7.tgz#ae1927b98449812cd90ada0cc18d172d86b38be6" + integrity sha512-jWHayjdQfpy4dhMAYfdyi33lW8X4ka/t7Bai9WNoRnhsNAzrAuMuo4FX6aiclGXpBLrnm2Por3foyPagcKd69Q== dependencies: "@cspell/cspell-bundled-dicts" "^5.3.4" - "@cspell/cspell-types" "^5.3.4" + "@cspell/cspell-types" "^5.3.7" comment-json "^4.1.0" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-glob "^5.3.4" - cspell-io "^5.3.4" - cspell-trie-lib "^5.3.4" + cspell-glob "^5.3.7" + cspell-io "^5.3.7" + cspell-trie-lib "^5.3.7" 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.4: - version "5.3.4" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.3.4.tgz#5e10424a265d6362810e2fd0ad64e4e214f46367" - integrity sha512-WaMGBIdbmOwle7pSmrOMQqfY4ndbNIGiQvpU0xuTWAzvcL/sCzgfqiDt7sI8Mr8vnSGnAphRn0xLlNqXzAgn1Q== +cspell-trie-lib@^5.3.7: + version "5.3.7" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.3.7.tgz#8d13637e17e96fb5cf656baa57f67d8366830f75" + integrity sha512-gfm/EzYCgaCC8RvB1jAYxMDGqdmqupDALaEHExnOGJUe5ZUNEH8E7YWEsMemHOdjd9vgSFcGpecoFUFBfkKXXA== dependencies: fs-extra "^9.1.0" gensequence "^3.1.1" cspell@^5.2.4: - version "5.3.4" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.3.4.tgz#1d79d3bde38a91adcda9fde4b2aa553746ff2f51" - integrity sha512-AXiZzeXXBVZIwRsD30bloqOaJEjTF3e/nzXCLHUq3Eyqiy1ySWMnOMm3OXQ1nI7nkjYpx5+Pdx7cDlH0wFrKYQ== + version "5.3.7" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.3.7.tgz#00be25bc8bab89628021b49d1322033c4f00f720" + integrity sha512-KNs1i/4pBejBMu536atrVJFVdKg1nBF0BZy3GoVwIMCABxkx8KuGaE7uj2JUaHFjlp1s7ICw/p50eL/FL0HerA== dependencies: - "@cspell/cspell-types" "^5.3.4" + "@cspell/cspell-types" "^5.3.7" chalk "^4.1.0" commander "^7.1.0" comment-json "^4.1.0" - cspell-glob "^5.3.4" - cspell-lib "^5.3.4" + cspell-glob "^5.3.7" + cspell-lib "^5.3.7" fs-extra "^9.1.0" get-stdin "^8.0.0" glob "^7.1.6" From 901a7c90328bb0bd102a2b5fbba9c91141a1d37c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 22:04:58 +0100 Subject: [PATCH 019/473] chore: bump @types/prettier from 2.2.1 to 2.2.2 (#3159) Bumps [@types/prettier](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/prettier) from 2.2.1 to 2.2.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/prettier) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0ff27eedd8e4..901fe93b5fd6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1948,9 +1948,9 @@ integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== "@types/prettier@*", "@types/prettier@^2.0.0", "@types/prettier@^2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.1.tgz#374e31645d58cb18a07b3ecd8e9dede4deb2cccd" - integrity sha512-DxZZbyMAM9GWEzXL+BMZROWz9oo6A9EilwwOMET2UVu2uZTqMWS5S69KVtuVKaRjCUpcrOXRalet86/OpG4kqw== + version "2.2.2" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.2.tgz#e2280c89ddcbeef340099d6968d8c86ba155fdf6" + integrity sha512-i99hy7Ki19EqVOl77WplDrvgNugHnsSjECVR/wUrzw2TJXz1zlUfT2ngGckR6xN7yFYaijsMAqPkOLx9HgUqHg== "@types/rimraf@^3.0.0": version "3.0.0" From 648c3b594cdf01b676a6c40569f5ee435e9eb742 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 23:40:39 +0100 Subject: [PATCH 020/473] chore: bump markdownlint-cli from 0.26.0 to 0.27.1 (#3157) Bumps [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) from 0.26.0 to 0.27.1. - [Release notes](https://github.com/igorshubovych/markdownlint-cli/releases) - [Commits](https://github.com/igorshubovych/markdownlint-cli/compare/v0.26.0...v0.27.1) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 65 +++++++++++++++++++++++++++++----------------------- 2 files changed, 37 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 65d383df6c6c..3890f124c1b7 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "lerna": "^3.22.1", "lint-staged": "^10.2.13", "make-dir": "^3.1.0", - "markdownlint-cli": "^0.26.0", + "markdownlint-cli": "^0.27.1", "prettier": "^2.2.1", "rimraf": "^3.0.2", "ts-jest": "^26.5.1", diff --git a/yarn.lock b/yarn.lock index 901fe93b5fd6..69e8e121c372 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2883,12 +2883,12 @@ commander@^2.12.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^6.2.0, commander@~6.2.1: +commander@^6.2.0: version "6.2.1" 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.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.1.0.tgz#f2eaecf131f10e36e07d894698226e36ae0eb5ff" integrity sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg== @@ -3618,10 +3618,10 @@ enquirer@^2.3.5, enquirer@^2.3.6: dependencies: ansi-colors "^4.1.1" -entities@~2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f" - integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ== +entities@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" + integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== env-paths@^2.2.0: version "2.2.0" @@ -5626,7 +5626,7 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.1, js-yaml@~3.14.1: +js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -5634,6 +5634,13 @@ js-yaml@^3.13.1, js-yaml@~3.14.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" + integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== + dependencies: + argparse "^2.0.1" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -6161,48 +6168,48 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -markdown-it@12.0.2: - version "12.0.2" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.2.tgz#4401beae8df8aa2221fc6565a7188e60a06ef0ed" - integrity sha512-4Lkvjbv2kK+moL9TbeV+6/NHx+1Q+R/NIdUlFlkqkkzUcTod4uiyTJRiBidKR9qXSdkNFkgv+AELY8KN9vSgVA== +markdown-it@12.0.4: + version "12.0.4" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.4.tgz#eec8247d296327eac3ba9746bdeec9cfcc751e33" + integrity sha512-34RwOXZT8kyuOJy25oJNJoulO8L0bTHYWXcdZBYZqFnjIy3NgjeoM3FmPXIOFQ26/lSHYMr8oc62B6adxXcb3Q== dependencies: argparse "^2.0.1" - entities "~2.0.0" + entities "~2.1.0" linkify-it "^3.0.1" mdurl "^1.0.1" uc.micro "^1.0.5" -markdownlint-cli@^0.26.0: - version "0.26.0" - resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.26.0.tgz#cd89e3e39a049303ec125c8aa291da4f3325df29" - integrity sha512-biLfeGNZG9nw0yJbtFBzRlew2/P5w7JSseKwolSox3zejs7dLpGvPgqbC+iqJnqqGWcWLtXaXh8bBEKWmfl10A== +markdownlint-cli@^0.27.1: + version "0.27.1" + resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.27.1.tgz#8fa095eea94936b6dea891f9db7f269c60e6d6fa" + integrity sha512-p1VV6aSbGrDlpUWzHizAnSNEQAweVR3qUI/AIUubxW7BGPXziSXkIED+uRtSohUlRS/jmqp3Wi4es5j6fIrdeQ== dependencies: - commander "~6.2.1" + commander "~7.1.0" deep-extend "~0.6.0" get-stdin "~8.0.0" glob "~7.1.6" ignore "~5.1.8" - js-yaml "~3.14.1" + js-yaml "^4.0.0" jsonc-parser "~3.0.0" lodash.differencewith "~4.5.0" lodash.flatten "~4.4.0" - markdownlint "~0.22.0" - markdownlint-rule-helpers "~0.13.0" + markdownlint "~0.23.1" + markdownlint-rule-helpers "~0.14.0" minimatch "~3.0.4" minimist "~1.2.5" rc "~1.2.8" -markdownlint-rule-helpers@~0.13.0: - version "0.13.0" - resolved "https://registry.yarnpkg.com/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.13.0.tgz#7cc6553bc7f8c4c8a43cf66fb2a3a652124f46f9" - integrity sha512-rRY0itbcHG4e+ntz0bbY3AIceSJMKS0TafEMgEtKVHRZ54/JUSy6/4ypCL618RlJvYRej+xMLxX5nkJqIeTZaQ== +markdownlint-rule-helpers@~0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.14.0.tgz#4d0e1ae320e85559d8cbed1490934855791627bb" + integrity sha512-vRTPqSU4JK8vVXmjICHSBhwXUvbfh/VJo+j7hvxqe15tLJyomv3FLgFdFgb8kpj0Fe8SsJa/TZUAXv7/sN+N7A== -markdownlint@~0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.22.0.tgz#4ed95b61c17ae9f4dfca6a01f038c744846c0a72" - integrity sha512-J4B+iMc12pOdp/wfYi03W2qfAfEyiZzq3qvQh/8vOMNU8vXYY6Jg440EY7dWTBCqROhb1i4nAn3BTByJ5kdx1w== +markdownlint@~0.23.1: + version "0.23.1" + resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.23.1.tgz#98292b5d340d01e9c113f3d7fb3b2ccf89628dc2" + integrity sha512-iOEwhDfNmq2IJlaA8mzEkHYUi/Hwoa6Ss+HO5jkwUR6wQ4quFr0WzSx+Z9rsWZKUaPbyirIdL1zGmJRkWawr4Q== dependencies: - markdown-it "12.0.2" + markdown-it "12.0.4" marked@^2.0.0: version "2.0.1" From 946ee3b68823a48fad2cb7b99589e56a68fb11e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 22:53:09 +0000 Subject: [PATCH 021/473] chore: bump husky from 5.1.2 to 5.1.3 (#3155) Bumps [husky](https://github.com/typicode/husky) from 5.1.2 to 5.1.3. - [Release notes](https://github.com/typicode/husky/releases) - [Commits](https://github.com/typicode/husky/compare/v5.1.2...v5.1.3) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 69e8e121c372..fff525733131 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4707,9 +4707,9 @@ humanize-ms@^1.2.1: ms "^2.0.0" husky@^5.0.9: - version "5.1.2" - resolved "https://registry.yarnpkg.com/husky/-/husky-5.1.2.tgz#dc6a1f68640455d8d98c28875e073087f86c5081" - integrity sha512-lilaRYeDXcAOj8DuRnN9IxUyEMVbYg9rK7yVNkPB5V4hCvxIUxpMeiv9K2h77CE0HzjCnk1Br0oWe1IghXngDQ== + version "5.1.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-5.1.3.tgz#1a0645a4fe3ffc006c4d0d8bd0bcb4c98787cc9d" + integrity sha512-fbNJ+Gz5wx2LIBtMweJNY1D7Uc8p1XERi5KNRMccwfQA+rXlxWNSdUxswo0gT8XqxywTIw7Ywm/F4v/O35RdMg== iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" From 663f6db0f36751a9f5009ac8c340a6f3b5211a0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 00:57:20 -0700 Subject: [PATCH 022/473] chore: bump @babel/parser from 7.13.4 to 7.13.10 (#3165) Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.13.4 to 7.13.10. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.13.10/packages/babel-parser) 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 fff525733131..e5a4eec0590d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -172,9 +172,9 @@ js-tokens "^4.0.0" "@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.4": - version "7.13.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.4.tgz#340211b0da94a351a6f10e63671fa727333d13ab" - integrity sha512-uvoOulWHhI+0+1f9L4BoozY7U5cIkZ9PgJqvb041d6vypgUmtVPG4vmGm4pSggjl8BELzvHyUeJSUyEMY6b+qA== + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.10.tgz#8f8f9bf7b3afa3eabd061f7a5bcdf4fec3c48409" + integrity sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" From 5a189cae7d90956ed539fdb9ec6aa2f2441c71b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 00:57:34 -0700 Subject: [PATCH 023/473] chore: bump @types/marked from 1.2.2 to 2.0.0 (#3168) Bumps [@types/marked](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/marked) from 1.2.2 to 2.0.0. - [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> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3890f124c1b7..899495949d46 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "@types/jest": "^26.0.20", "@types/jest-specific-snapshot": "^0.5.5", "@types/lodash": "^4.14.149", - "@types/marked": "^1.1.0", + "@types/marked": "^2.0.0", "@types/node": "^14.14.27", "@types/prettier": "^2.2.1", "@types/rimraf": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index e5a4eec0590d..7b3d853403af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1917,10 +1917,10 @@ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.168.tgz#fe24632e79b7ade3f132891afff86caa5e5ce008" integrity sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q== -"@types/marked@*", "@types/marked@^1.1.0": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-1.2.2.tgz#1f858a0e690247ecf3b2eef576f98f86e8d960d4" - integrity sha512-wLfw1hnuuDYrFz97IzJja0pdVsC0oedtS4QsKH1/inyW9qkLQbXgMUqEQT0MVtUBx3twjWeInUfjQbhBVLECXw== +"@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== "@types/minimatch@*": version "3.0.3" From 0a36006eba0ed1c959c2bf991042118ef216e6f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 00:57:53 -0700 Subject: [PATCH 024/473] chore: bump ts-jest from 26.5.2 to 26.5.3 (#3170) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.2 to 26.5.3. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.5.2...v26.5.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7b3d853403af..8f76d04e5a9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1894,7 +1894,7 @@ dependencies: "@types/jest" "*" -"@types/jest@*", "@types/jest@26.x", "@types/jest@^26.0.20": +"@types/jest@*", "@types/jest@^26.0.20": version "26.0.20" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.20.tgz#cd2f2702ecf69e86b586e1f5223a60e454056307" integrity sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA== @@ -8545,11 +8545,10 @@ trim-off-newlines@^1.0.0: integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= ts-jest@^26.5.1: - version "26.5.2" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.2.tgz#5281d6b44c2f94f71205728a389edc3d7995b0c4" - integrity sha512-bwyJ2zJieSugf7RB+o8fgkMeoMVMM2KPDE0UklRLuACxjwJsOrZNo6chrcScmK33YavPSwhARffy8dZx5LJdUQ== + version "26.5.3" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.3.tgz#a6ee00ba547be3b09877550df40a1465d0295554" + integrity sha512-nBiiFGNvtujdLryU7MiMQh1iPmnZ/QvOskBbD2kURiI1MwqvxlxNnaAB/z9TbslMqCsSbu5BXvSSQPc5tvHGeA== dependencies: - "@types/jest" "26.x" bs-logger "0.x" buffer-from "1.x" fast-json-stable-stringify "2.x" @@ -9121,10 +9120,10 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== -yargs-parser@20.x: - version "20.2.5" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.5.tgz#5d37729146d3f894f39fc94b6796f5b239513186" - integrity sha512-jYRGS3zWy20NtDtK2kBgo/TlAoy5YUuhD9/LZ7z7W4j1Fdw2cqD0xEEclf8fxc8xjD6X5Qr+qQQwCEsP8iRiYg== +yargs-parser@20.x, yargs-parser@^20.2.2: + version "20.2.6" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.6.tgz#69f920addf61aafc0b8b89002f5d66e28f2d8b20" + integrity sha512-AP1+fQIWSM/sMiET8fyayjx/J+JmTPt2Mr0FkrgqB4todtfa53sOsrSAcIrJRD5XS20bKUwaDIuMkWKCEiQLKA== yargs-parser@^15.0.1: version "15.0.1" @@ -9142,11 +9141,6 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^20.2.2: - version "20.2.6" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.6.tgz#69f920addf61aafc0b8b89002f5d66e28f2d8b20" - integrity sha512-AP1+fQIWSM/sMiET8fyayjx/J+JmTPt2Mr0FkrgqB4todtfa53sOsrSAcIrJRD5XS20bKUwaDIuMkWKCEiQLKA== - yargs@^14.2.2: version "14.2.3" resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" From d9e7916e9c5897d81f01a4ccf1db96bcd39a0f38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 00:58:35 -0700 Subject: [PATCH 025/473] chore: bump @types/node from 14.14.32 to 14.14.34 (#3184) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.32 to 14.14.34. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) 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 8f76d04e5a9b..fe60fd9f01cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1933,9 +1933,9 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node@*", "@types/node@>= 8", "@types/node@^14.14.27": - version "14.14.32" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.32.tgz#90c5c4a8d72bbbfe53033f122341343249183448" - integrity sha512-/Ctrftx/zp4m8JOujM5ZhwzlWLx22nbQJiVqz8/zE15gOeEW+uly3FSX4fGFpcfEvFzXcMCJwq9lGVWgyARXhg== + version "14.14.34" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.34.tgz#07935194fc049069a1c56c0c274265abeddf88da" + integrity sha512-dBPaxocOK6UVyvhbnpFIj2W+S+1cBTkHQbFQfeeJhoKFbzYcVUGHvddeWPSucKATb3F0+pgDq0i6ghEaZjsugA== "@types/normalize-package-data@^2.4.0": version "2.4.0" From a1486736d8ef3555832ddfb27fd0980368b363f5 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 15 Mar 2021 09:59:51 +0200 Subject: [PATCH 026/473] fix(eslint-plugin): [no-extran-class] allowWithDecorator should ignore other errors (#3160) --- .../src/rules/no-extraneous-class.ts | 4 +-- .../tests/rules/no-extraneous-class.test.ts | 31 +++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-extraneous-class.ts b/packages/eslint-plugin/src/rules/no-extraneous-class.ts index 996dd0ea71cd..e57ee5546a39 100644 --- a/packages/eslint-plugin/src/rules/no-extraneous-class.ts +++ b/packages/eslint-plugin/src/rules/no-extraneous-class.ts @@ -79,13 +79,13 @@ export default util.createRule({ | TSESTree.ClassExpression | undefined; - if (!parent || parent.superClass) { + if (!parent || parent.superClass || isAllowWithDecorator(parent)) { return; } const reportNode = 'id' in parent && parent.id ? parent.id : parent; if (node.body.length === 0) { - if (allowEmpty || isAllowWithDecorator(parent)) { + if (allowEmpty) { return; } diff --git a/packages/eslint-plugin/tests/rules/no-extraneous-class.test.ts b/packages/eslint-plugin/tests/rules/no-extraneous-class.test.ts index 2bb96f196ef1..44d32490a102 100644 --- a/packages/eslint-plugin/tests/rules/no-extraneous-class.test.ts +++ b/packages/eslint-plugin/tests/rules/no-extraneous-class.test.ts @@ -76,6 +76,19 @@ class Foo {} `, options: [{ allowWithDecorator: true }], }, + { + code: ` +@FooDecorator +class Foo { + constructor(foo: Foo) { + foo.subscribe(a => { + console.log(a); + }); + } +} + `, + options: [{ allowWithDecorator: true }], + }, ], invalid: [ @@ -150,5 +163,23 @@ class Foo {} }, ], }, + { + code: ` +@FooDecorator +class Foo { + constructor(foo: Foo) { + foo.subscribe(a => { + console.log(a); + }); + } +} + `, + options: [{ allowWithDecorator: false }], + errors: [ + { + messageId: 'onlyConstructor', + }, + ], + }, ], }); From 08b058a7a6db3b59c28753bb322717e1fee44d1f Mon Sep 17 00:00:00 2001 From: JounQin Date: Mon, 15 Mar 2021 16:09:02 +0800 Subject: [PATCH 027/473] feat(eslint-plugin): add package type declaration (#3164) --- packages/eslint-plugin/index.d.ts | 4 ++++ packages/eslint-plugin/package.json | 2 ++ packages/eslint-plugin/tsconfig.json | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 packages/eslint-plugin/index.d.ts diff --git a/packages/eslint-plugin/index.d.ts b/packages/eslint-plugin/index.d.ts new file mode 100644 index 000000000000..8092cabcc4b2 --- /dev/null +++ b/packages/eslint-plugin/index.d.ts @@ -0,0 +1,4 @@ +import { TSESLint } from '@typescript-eslint/experimental-utils'; + +export const rules: Record>; +export const configs: Record; diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 87cfd4ab8001..911d8e7772b4 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -14,6 +14,7 @@ "files": [ "dist", "docs", + "index.d.ts", "package.json", "README.md", "LICENSE" @@ -28,6 +29,7 @@ }, "license": "MIT", "main": "dist/index.js", + "types": "index.d.ts", "scripts": { "build": "tsc -b tsconfig.build.json", "check:docs": "jest tests/docs.test.ts --runTestsByPath --silent --runInBand", diff --git a/packages/eslint-plugin/tsconfig.json b/packages/eslint-plugin/tsconfig.json index a0cdad048692..c7e9c4ecb2b7 100644 --- a/packages/eslint-plugin/tsconfig.json +++ b/packages/eslint-plugin/tsconfig.json @@ -4,7 +4,7 @@ "composite": false, "rootDir": "." }, - "include": ["src", "typings", "tests", "tools"], + "include": ["src", "typings", "tests", "tools", "index.d.ts"], "references": [ { "path": "../experimental-utils/tsconfig.build.json" }, { "path": "../parser/tsconfig.build.json" }, From 1a96426c7a8d60ef5d04a89578cf664a82905ce9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 01:09:36 -0700 Subject: [PATCH 028/473] chore: bump eslint-plugin-jest from 24.1.5 to 24.2.1 (#3172) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.1.5 to 24.2.1. - [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.1.5...v24.2.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Armano --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index fe60fd9f01cc..4d15d230e256 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3759,9 +3759,9 @@ eslint-plugin-import@^2.22.0: tsconfig-paths "^3.9.0" eslint-plugin-jest@^24.1.3: - version "24.1.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.1.5.tgz#1e866a9f0deac587d0a3d5d7cefe99815a580de2" - integrity sha512-FIP3lwC8EzEG+rOs1y96cOJmMVpdFNreoDJv29B5vIupVssRi8zrSY3QadogT0K3h1Y8TMxJ6ZSAzYUmFCp2hg== + version "24.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.2.1.tgz#7e84f16a3ca6589b86be9732a93d71367a4ed627" + integrity sha512-s24ve8WUu3DLVidvlSzaqlOpTZre9lTkZTAO+a7X0WMtj8HraWTiTEkW3pbDT1xVxqEHMWSv+Kx7MyqR50nhBw== dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" From 55e1fbaca985b500cad1cc9ec25717b18cf5a17b Mon Sep 17 00:00:00 2001 From: Anton Kalmanovich Date: Mon, 15 Mar 2021 10:13:03 +0200 Subject: [PATCH 029/473] fix(eslint-plugin): [explicit-module-boundary-types] fixes #2864 related to functions in nested object properties (#3178) --- .../src/util/explicitReturnTypeUtils.ts | 6 ++-- .../explicit-function-return-type.test.ts | 28 +++++++++++++++++++ .../explicit-module-boundary-types.test.ts | 28 +++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts b/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts index cd2f0b11826b..c05d6c6dab35 100644 --- a/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts +++ b/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts @@ -52,11 +52,12 @@ function isConstructorArgument( } /** - * Checks if a node belongs to: + * Checks if a node is a property or a nested property of a typed object: * ``` * const x: Foo = { prop: () => {} } * const x = { prop: () => {} } as Foo * const x = { prop: () => {} } + * const x: Foo = { bar: { prop: () => {} } } * ``` */ function isPropertyOfObjectWithType( @@ -82,7 +83,8 @@ function isPropertyOfObjectWithType( isTypeAssertion(parent) || isClassPropertyWithTypeAnnotation(parent) || isVariableDeclaratorWithTypeAnnotation(parent) || - isFunctionArgument(parent) + isFunctionArgument(parent) || + isPropertyOfObjectWithType(parent) ); } diff --git a/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts b/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts index 6ce8210822ba..4faf3fa18b70 100644 --- a/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts +++ b/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts @@ -156,6 +156,34 @@ const x = { code: ` const x: Foo = { foo: () => {}, +}; + `, + options: [{ allowTypedFunctionExpressions: true }], + }, + // https://github.com/typescript-eslint/typescript-eslint/issues/2864 + { + filename: 'test.ts', + code: ` +const x = { + foo: { bar: () => {} }, +} as Foo; + `, + options: [{ allowTypedFunctionExpressions: true }], + }, + { + filename: 'test.ts', + code: ` +const x = { + foo: { bar: () => {} }, +}; + `, + options: [{ allowTypedFunctionExpressions: true }], + }, + { + filename: 'test.ts', + code: ` +const x: Foo = { + foo: { bar: () => {} }, }; `, options: [{ allowTypedFunctionExpressions: true }], diff --git a/packages/eslint-plugin/tests/rules/explicit-module-boundary-types.test.ts b/packages/eslint-plugin/tests/rules/explicit-module-boundary-types.test.ts index 3652ebc876ac..e05f4f09230d 100644 --- a/packages/eslint-plugin/tests/rules/explicit-module-boundary-types.test.ts +++ b/packages/eslint-plugin/tests/rules/explicit-module-boundary-types.test.ts @@ -181,6 +181,34 @@ export const x = { code: ` export const x: Foo = { foo: () => {}, +}; + `, + options: [{ allowTypedFunctionExpressions: true }], + }, + // https://github.com/typescript-eslint/typescript-eslint/issues/2864 + { + filename: 'test.ts', + code: ` +export const x = { + foo: { bar: () => {} }, +} as Foo; + `, + options: [{ allowTypedFunctionExpressions: true }], + }, + { + filename: 'test.ts', + code: ` +export const x = { + foo: { bar: () => {} }, +}; + `, + options: [{ allowTypedFunctionExpressions: true }], + }, + { + filename: 'test.ts', + code: ` +export const x: Foo = { + foo: { bar: () => {} }, }; `, options: [{ allowTypedFunctionExpressions: true }], From 3f4e9be8f89639319b1d97a54d69a5a7c07e1ff5 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 15 Mar 2021 17:02:36 +0000 Subject: [PATCH 030/473] chore: publish v4.18.0 --- CHANGELOG.md | 17 +++++++++++++++++ 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 | 17 +++++++++++++++++ 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, 136 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d173877642d..f45f0792dacc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) + + +### Bug Fixes + +* **eslint-plugin:** [explicit-module-boundary-types] fixes [#2864](https://github.com/typescript-eslint/typescript-eslint/issues/2864) related to functions in nested object properties ([#3178](https://github.com/typescript-eslint/typescript-eslint/issues/3178)) ([55e1fba](https://github.com/typescript-eslint/typescript-eslint/commit/55e1fbaca985b500cad1cc9ec25717b18cf5a17b)) +* **eslint-plugin:** [no-extran-class] allowWithDecorator should ignore other errors ([#3160](https://github.com/typescript-eslint/typescript-eslint/issues/3160)) ([a148673](https://github.com/typescript-eslint/typescript-eslint/commit/a1486736d8ef3555832ddfb27fd0980368b363f5)) + + +### Features + +* **eslint-plugin:** add package type declaration ([#3164](https://github.com/typescript-eslint/typescript-eslint/issues/3164)) ([08b058a](https://github.com/typescript-eslint/typescript-eslint/commit/08b058a7a6db3b59c28753bb322717e1fee44d1f)) + + + + + # [4.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) diff --git a/lerna.json b/lerna.json index f760626ee5dc..fc89ed9ca0ea 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.17.0", + "version": "4.18.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 5f6039b50899..15f4b61168fc 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.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) **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 0c8f39247c1a..1734089a88b9 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.17.0", + "version": "4.18.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.17.0", + "@typescript-eslint/experimental-utils": "4.18.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 1180462bd2b6..d44f760fa34e 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.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) **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 6874c940ed4e..9b3f6addba39 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.17.0", + "version": "4.18.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.17.0", + "@typescript-eslint/experimental-utils": "4.18.0", "lodash": "^4.17.15" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.17.0" + "@typescript-eslint/parser": "4.18.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 717d2a5f215c..1a8c08249cab 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) + + +### Bug Fixes + +* **eslint-plugin:** [explicit-module-boundary-types] fixes [#2864](https://github.com/typescript-eslint/typescript-eslint/issues/2864) related to functions in nested object properties ([#3178](https://github.com/typescript-eslint/typescript-eslint/issues/3178)) ([55e1fba](https://github.com/typescript-eslint/typescript-eslint/commit/55e1fbaca985b500cad1cc9ec25717b18cf5a17b)) +* **eslint-plugin:** [no-extran-class] allowWithDecorator should ignore other errors ([#3160](https://github.com/typescript-eslint/typescript-eslint/issues/3160)) ([a148673](https://github.com/typescript-eslint/typescript-eslint/commit/a1486736d8ef3555832ddfb27fd0980368b363f5)) + + +### Features + +* **eslint-plugin:** add package type declaration ([#3164](https://github.com/typescript-eslint/typescript-eslint/issues/3164)) ([08b058a](https://github.com/typescript-eslint/typescript-eslint/commit/08b058a7a6db3b59c28753bb322717e1fee44d1f)) + + + + + # [4.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 911d8e7772b4..dc4023088e75 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.17.0", + "version": "4.18.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.17.0", - "@typescript-eslint/scope-manager": "4.17.0", + "@typescript-eslint/experimental-utils": "4.18.0", + "@typescript-eslint/scope-manager": "4.18.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 cee45cb853b2..9e5adeddf9c9 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.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + # [4.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) **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 214b518e8eb6..e81bde7eb2a8 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.17.0", + "version": "4.18.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.17.0", - "@typescript-eslint/types": "4.17.0", - "@typescript-eslint/typescript-estree": "4.17.0", + "@typescript-eslint/scope-manager": "4.18.0", + "@typescript-eslint/types": "4.18.0", + "@typescript-eslint/typescript-estree": "4.18.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index c28cec93ad18..8819d640f26a 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.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index c1d8e83cae9c..b92208c48f9f 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.17.0", + "version": "4.18.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.17.0", - "@typescript-eslint/types": "4.17.0", - "@typescript-eslint/typescript-estree": "4.17.0", + "@typescript-eslint/scope-manager": "4.18.0", + "@typescript-eslint/types": "4.18.0", + "@typescript-eslint/typescript-estree": "4.18.0", "debug": "^4.1.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.17.0", + "@typescript-eslint/experimental-utils": "4.18.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index dceda0dbd9de..ca967ed97850 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.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [4.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) **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 f3347a3f541b..d82525e8cf08 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.17.0", + "version": "4.18.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.17.0", - "@typescript-eslint/visitor-keys": "4.17.0" + "@typescript-eslint/types": "4.18.0", + "@typescript-eslint/visitor-keys": "4.18.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.17.0", + "@typescript-eslint/typescript-estree": "4.18.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 499029da5326..b771cc0bac00 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.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [4.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) **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 3a4897315d2d..ee3e1e508233 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.17.0", + "version": "4.18.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 2206d4d67a50..ba20b0a516ad 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.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [4.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index c6fcd11037e9..199c898b3842 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.17.0", + "version": "4.18.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 3df66ed1e9ba..98252b65820e 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.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + # [4.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) **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 fa0db38da5d3..a5b1865c01c8 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.17.0", + "version": "4.18.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.17.0", - "@typescript-eslint/visitor-keys": "4.17.0", + "@typescript-eslint/types": "4.18.0", + "@typescript-eslint/visitor-keys": "4.18.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.17.0", + "@typescript-eslint/shared-fixtures": "4.18.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index c3f97732be62..a3754372477d 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.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.16.1...v4.17.0) (2021-03-08) **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 78f382dcbd72..fb20068e9f5e 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.17.0", + "version": "4.18.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.17.0", + "@typescript-eslint/types": "4.18.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From e6383fd3a862c7db3f919073967aeee9938b1d9b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 13:06:07 -0700 Subject: [PATCH 031/473] chore: bump eslint-plugin-jest from 24.2.1 to 24.3.1 (#3185) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.2.1 to 24.3.1. - [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.2.1...v24.3.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 4d15d230e256..84441403778d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3759,9 +3759,9 @@ eslint-plugin-import@^2.22.0: tsconfig-paths "^3.9.0" eslint-plugin-jest@^24.1.3: - version "24.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.2.1.tgz#7e84f16a3ca6589b86be9732a93d71367a4ed627" - integrity sha512-s24ve8WUu3DLVidvlSzaqlOpTZre9lTkZTAO+a7X0WMtj8HraWTiTEkW3pbDT1xVxqEHMWSv+Kx7MyqR50nhBw== + version "24.3.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.1.tgz#c8df037847b83397940bef7fbc2cc168ab466bcc" + integrity sha512-RQt59rfMSHyvedImT72iaf8JcvCcR4P7Uq499dALtjY8mrCjbwWrFi1UceG4sid2wVIeDi+0tjxXZ8CZEVO7Zw== dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" From 7b6f2ab4c0206619b493f6e7f82d280313fec9e9 Mon Sep 17 00:00:00 2001 From: JounQin Date: Tue, 16 Mar 2021 04:13:31 +0800 Subject: [PATCH 032/473] docs: update babel-eslint to @babel/eslint-parser (#3186) --- README.md | 8 ++++---- packages/typescript-estree/tests/ast-alignment/utils.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e44cd7102461..d8abbe324a96 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ - [How does `typescript-eslint` work and why do you have multiple packages?](#how-does-typescript-eslint-work-and-why-do-you-have-multiple-packages) - [Can I use all of the existing ESLint plugins and rules without any changes?](#can-i-use-all-of-the-existing-eslint-plugins-and-rules-without-any-changes) - [Can we write rules which leverage type information?](#can-we-write-rules-which-leverage-type-information) -- [What about Babel and `babel-eslint`?](#what-about-babel-and-babel-eslint) +- [What about Babel and `@babel/eslint-parser`?](#what-about-babel-and-babeleslint-parser) - [How can I help?](#how-can-i-help) - [Packages included in this project?](#packages-included-in-this-project) - [Package Versions](#package-versions) @@ -161,15 +161,15 @@ We already do this in numerous rules within [`@typescript-eslint/eslint-plugin`]
-## What about Babel and `babel-eslint`? +## What about Babel and `@babel/eslint-parser`? Babel does now support parsing (but not type-checking) TypeScript source code. This is as an alternative to using the TypeScript Compiler. It also supports many other syntaxes, via plugins, which are not supported by the TypeScript Compiler. As mentioned above, `typescript-eslint` is powered by the TypeScript Compiler, so we support whatever it does. -The key trade-off can be summarized as `babel-eslint` supports additional syntax which TypeScript itself does not, but `typescript-eslint` supports creating rules based on type information, which is not available to babel because there is no type-checker. +The key trade-off can be summarized as `@babel/eslint-parser` supports additional syntax which TypeScript itself does not, but `typescript-eslint` supports creating rules based on type information, which is not available to babel because there is no type-checker. Because they are separate projects powered by different underlying tooling, they are currently not intended to be used together. -Some of the people involved in `typescript-eslint` are also involved in Babel and `babel-eslint`, and in this project, we are working hard to align on the AST format for non-standard JavaScript syntax. This is an ongoing effort. +Some of the people involved in `typescript-eslint` are also involved in Babel and `@babel/eslint-parser`, and in this project, we are working hard to align on the AST format for non-standard JavaScript syntax. This is an ongoing effort.
diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index a2c1d6f87f93..81f4ae71c4d2 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -225,7 +225,7 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any { /** * Template strings seem to also be affected by the difference in opinion between different parsers in * @see https://github.com/babel/babel/issues/6681 - * @see https://github.com/babel/babel-eslint/blob/master/lib/babylon-to-espree/convertAST.js#L81-L96 + * @see https://github.com/babel/babel/blob/main/eslint/babel-eslint-parser/src/convert/convertAST.js#L64-L80 */ TemplateLiteral(node: any) { for (let j = 0; j < node.quasis.length; j++) { From 9ed3c5020cf390f7f26cdb24638c222fc0383647 Mon Sep 17 00:00:00 2001 From: Armano Date: Wed, 17 Mar 2021 11:25:49 +0100 Subject: [PATCH 033/473] refactor(eslint-plugin): use direct ts type guards instead of tsutils (#3193) --- .../eslint-plugin/src/rules/no-floating-promises.ts | 6 +++--- .../src/rules/no-unnecessary-type-arguments.ts | 2 +- packages/eslint-plugin/src/rules/return-await.ts | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-floating-promises.ts b/packages/eslint-plugin/src/rules/no-floating-promises.ts index deb4ee5c00f9..afaa61cd4722 100644 --- a/packages/eslint-plugin/src/rules/no-floating-promises.ts +++ b/packages/eslint-plugin/src/rules/no-floating-promises.ts @@ -227,7 +227,7 @@ function isFunctionParam( function isPromiseCatchCallWithHandler(expression: ts.CallExpression): boolean { return ( - tsutils.isPropertyAccessExpression(expression.expression) && + ts.isPropertyAccessExpression(expression.expression) && expression.expression.name.text === 'catch' && expression.arguments.length >= 1 ); @@ -237,7 +237,7 @@ function isPromiseThenCallWithRejectionHandler( expression: ts.CallExpression, ): boolean { return ( - tsutils.isPropertyAccessExpression(expression.expression) && + ts.isPropertyAccessExpression(expression.expression) && expression.expression.name.text === 'then' && expression.arguments.length >= 2 ); @@ -247,7 +247,7 @@ function isPromiseFinallyCallWithHandler( expression: ts.CallExpression, ): boolean { return ( - tsutils.isPropertyAccessExpression(expression.expression) && + ts.isPropertyAccessExpression(expression.expression) && expression.expression.name.text === 'finally' && expression.arguments.length >= 1 ); diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-arguments.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-arguments.ts index 2ff89c5931b4..2df933084dcf 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-arguments.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-arguments.ts @@ -118,7 +118,7 @@ function getTypeParametersFromType( } return findFirstResult(declarations, decl => - tsutils.isClassLikeDeclaration(decl) || + ts.isClassLike(decl) || ts.isTypeAliasDeclaration(decl) || ts.isInterfaceDeclaration(decl) ? decl.typeParameters diff --git a/packages/eslint-plugin/src/rules/return-await.ts b/packages/eslint-plugin/src/rules/return-await.ts index c8e7f102b095..85a2eebe1f58 100644 --- a/packages/eslint-plugin/src/rules/return-await.ts +++ b/packages/eslint-plugin/src/rules/return-await.ts @@ -61,7 +61,7 @@ export default util.createRule({ let ancestor = node.parent; while (ancestor && !ts.isFunctionLike(ancestor)) { - if (tsutils.isTryStatement(ancestor)) { + if (ts.isTryStatement(ancestor)) { return true; } @@ -75,7 +75,7 @@ export default util.createRule({ let ancestor = node.parent; while (ancestor && !ts.isFunctionLike(ancestor)) { - if (tsutils.isCatchClause(ancestor)) { + if (ts.isCatchClause(ancestor)) { return true; } @@ -90,8 +90,8 @@ export default util.createRule({ while (ancestor && !ts.isFunctionLike(ancestor)) { if ( - tsutils.isTryStatement(ancestor.parent) && - tsutils.isBlock(ancestor) && + ts.isTryStatement(ancestor.parent) && + ts.isBlock(ancestor) && ancestor.parent.end === ancestor.end ) { return true; @@ -106,7 +106,7 @@ export default util.createRule({ let ancestor = node.parent; while (ancestor && !ts.isFunctionLike(ancestor)) { - if (tsutils.isTryStatement(ancestor)) { + if (ts.isTryStatement(ancestor)) { return !!ancestor.finallyBlock; } ancestor = ancestor.parent; @@ -154,7 +154,7 @@ export default util.createRule({ function test(node: TSESTree.Expression, expression: ts.Node): void { let child: ts.Node; - const isAwait = tsutils.isAwaitExpression(expression); + const isAwait = ts.isAwaitExpression(expression); if (isAwait) { child = expression.getChildAt(1); From 6703df194203d9fa233bb5a3cb96560b5d51e345 Mon Sep 17 00:00:00 2001 From: James Craster Date: Thu, 18 Mar 2021 19:40:28 +0000 Subject: [PATCH 034/473] docs(eslint-plugin): [naming-convention] clarify literal regex notation vs. argument to RegExp (#3198) --- packages/eslint-plugin/docs/rules/naming-convention.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/naming-convention.md b/packages/eslint-plugin/docs/rules/naming-convention.md index ff9f8e79a3cf..4b28cffceafe 100644 --- a/packages/eslint-plugin/docs/rules/naming-convention.md +++ b/packages/eslint-plugin/docs/rules/naming-convention.md @@ -110,7 +110,7 @@ This can be useful if you want to enforce no particular format for a specific se The `custom` option defines a custom regex that the identifier must (or must not) match. This option allows you to have a bit more finer-grained control over identifiers, letting you ban (or force) certain patterns and substrings. Accepts an object with the following properties: -- `regex` - accepts a regular expression (anything accepted into `new RegExp(regex)`). +- `regex` - a string that is then passed into RegExp to create a new regular expression: `new RegExp(regex)` - `match` - true if the identifier _must_ match the `regex`, false if the identifier _must not_ match the `regex`. ### `filter` @@ -121,7 +121,7 @@ You can use this to include or exclude specific identifiers from specific config Accepts an object with the following properties: -- `regex` - accepts a regular expression (anything accepted into `new RegExp(regex)`). +- `regex` - a string that is then passed into RegExp to create a new regular expression: `new RegExp(regex)` - `match` - true if the identifier _must_ match the `regex`, false if the identifier _must not_ match the `regex`. Alternatively, `filter` accepts a regular expression (anything accepted into `new RegExp(filter)`). In this case, it's treated as if you had passed an object with the regex and `match: true`. From 56af98964f7c7653de1ef0c0509857d057a05abc Mon Sep 17 00:00:00 2001 From: Armano Date: Thu, 18 Mar 2021 20:52:23 +0100 Subject: [PATCH 035/473] refactor(eslint-plugin): [no-floating-promises] update code to use AST instead of ts nodes (#3195) --- .../src/rules/no-floating-promises.ts | 65 ++++++++++--------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-floating-promises.ts b/packages/eslint-plugin/src/rules/no-floating-promises.ts index afaa61cd4722..905dfd06fcff 100644 --- a/packages/eslint-plugin/src/rules/no-floating-promises.ts +++ b/packages/eslint-plugin/src/rules/no-floating-promises.ts @@ -60,13 +60,11 @@ export default util.createRule({ return { ExpressionStatement(node): void { - const { expression } = parserServices.esTreeNodeToTSNodeMap.get(node); - if (options.ignoreIIFE && isAsyncIife(node)) { return; } - if (isUnhandledPromise(checker, expression)) { + if (isUnhandledPromise(checker, node.expression)) { if (options.ignoreVoid) { context.report({ node, @@ -107,34 +105,34 @@ export default util.createRule({ function isUnhandledPromise( checker: ts.TypeChecker, - node: ts.Node, + node: TSESTree.Node, ): boolean { // First, check expressions whose resulting types may not be promise-like - if ( - ts.isBinaryExpression(node) && - node.operatorToken.kind === ts.SyntaxKind.CommaToken - ) { + if (node.type === AST_NODE_TYPES.SequenceExpression) { // Any child in a comma expression could return a potentially unhandled // promise, so we check them all regardless of whether the final returned // value is promise-like. - return ( - isUnhandledPromise(checker, node.left) || - isUnhandledPromise(checker, node.right) - ); + return node.expressions.some(item => isUnhandledPromise(checker, item)); } - if (ts.isVoidExpression(node) && !options.ignoreVoid) { + if ( + !options.ignoreVoid && + node.type === AST_NODE_TYPES.UnaryExpression && + node.operator === 'void' + ) { // Similarly, a `void` expression always returns undefined, so we need to // see what's inside it without checking the type of the overall expression. - return isUnhandledPromise(checker, node.expression); + return isUnhandledPromise(checker, node.argument); } // Check the type. At this point it can't be unhandled if it isn't a promise - if (!isPromiseLike(checker, node)) { + if ( + !isPromiseLike(checker, parserServices.esTreeNodeToTSNodeMap.get(node)) + ) { return false; } - if (ts.isCallExpression(node)) { + if (node.type === AST_NODE_TYPES.CallExpression) { // If the outer expression is a call, it must be either a `.then()` or // `.catch()` that handles the promise. return ( @@ -142,17 +140,17 @@ export default util.createRule({ !isPromiseThenCallWithRejectionHandler(node) && !isPromiseFinallyCallWithHandler(node) ); - } else if (ts.isConditionalExpression(node)) { + } else if (node.type === AST_NODE_TYPES.ConditionalExpression) { // We must be getting the promise-like value from one of the branches of the // ternary. Check them directly. return ( - isUnhandledPromise(checker, node.whenFalse) || - isUnhandledPromise(checker, node.whenTrue) + isUnhandledPromise(checker, node.alternate) || + isUnhandledPromise(checker, node.consequent) ); } else if ( - ts.isPropertyAccessExpression(node) || - ts.isIdentifier(node) || - ts.isNewExpression(node) + node.type === AST_NODE_TYPES.MemberExpression || + node.type === AST_NODE_TYPES.Identifier || + node.type === AST_NODE_TYPES.NewExpression ) { // If it is just a property access chain or a `new` call (e.g. `foo.bar` or // `new Promise()`), the promise is not handled because it doesn't have the @@ -225,30 +223,35 @@ function isFunctionParam( return false; } -function isPromiseCatchCallWithHandler(expression: ts.CallExpression): boolean { +function isPromiseCatchCallWithHandler( + expression: TSESTree.CallExpression, +): boolean { return ( - ts.isPropertyAccessExpression(expression.expression) && - expression.expression.name.text === 'catch' && + expression.callee.type === AST_NODE_TYPES.MemberExpression && + expression.callee.property.type === AST_NODE_TYPES.Identifier && + expression.callee.property.name === 'catch' && expression.arguments.length >= 1 ); } function isPromiseThenCallWithRejectionHandler( - expression: ts.CallExpression, + expression: TSESTree.CallExpression, ): boolean { return ( - ts.isPropertyAccessExpression(expression.expression) && - expression.expression.name.text === 'then' && + expression.callee.type === AST_NODE_TYPES.MemberExpression && + expression.callee.property.type === AST_NODE_TYPES.Identifier && + expression.callee.property.name === 'then' && expression.arguments.length >= 2 ); } function isPromiseFinallyCallWithHandler( - expression: ts.CallExpression, + expression: TSESTree.CallExpression, ): boolean { return ( - ts.isPropertyAccessExpression(expression.expression) && - expression.expression.name.text === 'finally' && + expression.callee.type === AST_NODE_TYPES.MemberExpression && + expression.callee.property.type === AST_NODE_TYPES.Identifier && + expression.callee.property.name === 'finally' && expression.arguments.length >= 1 ); } From 6a25faf5cfa4d21a7546d9866819f4e017308fb2 Mon Sep 17 00:00:00 2001 From: Armano Date: Thu, 18 Mar 2021 20:55:21 +0100 Subject: [PATCH 036/473] fix(typescript-estree): [ts 4.2] add support for import type equal declaration (#3189) --- .../import-equal-type-declaration.src.ts | 1 + ...mport-export-equal-type-declaration.src.ts | 1 + packages/types/src/ts-estree.ts | 1 + packages/typescript-estree/package.json | 2 +- packages/typescript-estree/src/convert.ts | 1 + .../tests/ast-alignment/fixtures-to-test.ts | 2 + .../semantic-diagnostics-enabled.test.ts.snap | 4 + .../import-equal-declaration.src.ts.shot | 1 + .../import-equal-type-declaration.src.ts.shot | 262 ++++++++++++++++ ...mport-export-equal-declaration.src.ts.shot | 1 + ...-export-equal-type-declaration.src.ts.shot | 280 ++++++++++++++++++ yarn.lock | 99 +++---- 12 files changed, 593 insertions(+), 62 deletions(-) create mode 100644 packages/shared-fixtures/fixtures/typescript/basics/import-equal-type-declaration.src.ts create mode 100644 packages/shared-fixtures/fixtures/typescript/basics/import-export-equal-type-declaration.src.ts create mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-type-declaration.src.ts.shot create mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-type-declaration.src.ts.shot diff --git a/packages/shared-fixtures/fixtures/typescript/basics/import-equal-type-declaration.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/import-equal-type-declaration.src.ts new file mode 100644 index 000000000000..fca40db5fc03 --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/import-equal-type-declaration.src.ts @@ -0,0 +1 @@ +import type foo = require('bar'); diff --git a/packages/shared-fixtures/fixtures/typescript/basics/import-export-equal-type-declaration.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/import-export-equal-type-declaration.src.ts new file mode 100644 index 000000000000..98798d0c07ae --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/import-export-equal-type-declaration.src.ts @@ -0,0 +1 @@ +export import type foo = require('bar'); diff --git a/packages/types/src/ts-estree.ts b/packages/types/src/ts-estree.ts index 9fee42b8ff9b..e296b5668ae0 100644 --- a/packages/types/src/ts-estree.ts +++ b/packages/types/src/ts-estree.ts @@ -1423,6 +1423,7 @@ export interface TSImportEqualsDeclaration extends BaseNode { type: AST_NODE_TYPES.TSImportEqualsDeclaration; id: Identifier; moduleReference: EntityName | TSExternalModuleReference; + importKind: 'type' | 'value'; isExport: boolean; } diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index a5b1865c01c8..009bd688fa25 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -51,7 +51,7 @@ }, "devDependencies": { "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.13.4", + "@babel/parser": "^7.13.11", "@babel/types": "^7.13.0", "@types/babel__code-frame": "*", "@types/debug": "*", diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 28442094c2cd..0c0b552e2d59 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -2690,6 +2690,7 @@ export class Converter { type: AST_NODE_TYPES.TSImportEqualsDeclaration, id: this.convertChild(node.name), moduleReference: this.convertChild(node.moduleReference), + importKind: node.isTypeOnly ? 'type' : 'value', isExport: hasModifier(SyntaxKind.ExportKeyword, node), }); } diff --git a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts index 4acae2c6a5bd..cab81a426fe1 100644 --- a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts +++ b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts @@ -395,6 +395,8 @@ tester.addFixturePatternConfig('typescript/basics', { 'export-assignment', 'import-equal-declaration', 'import-export-equal-declaration', + 'import-equal-type-declaration', + 'import-export-equal-type-declaration', // babel treats declare and types as not a module 'export-declare-const-named-enum', 'export-declare-named-enum', diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap index eb7e5c687e68..7094769a4ad6 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap @@ -1929,8 +1929,12 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-equal-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-equal-type-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-export-equal-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-export-equal-type-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-type-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-type-empty.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-declaration.src.ts.shot index 9dd23441d108..99c14c70ea9b 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-declaration.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-declaration.src.ts.shot @@ -22,6 +22,7 @@ Object { ], "type": "Identifier", }, + "importKind": "value", "isExport": false, "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-type-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-type-declaration.src.ts.shot new file mode 100644 index 000000000000..1e5a56be081c --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/import-equal-type-declaration.src.ts.shot @@ -0,0 +1,262 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics import-equal-type-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + }, + "importKind": "type", + "isExport": false, + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "moduleReference": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 31, + ], + "raw": "'bar'", + "type": "Literal", + "value": "bar", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 32, + ], + "type": "TSExternalModuleReference", + }, + "range": Array [ + 0, + 33, + ], + "type": "TSImportEqualsDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 34, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "Keyword", + "value": "import", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 11, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 25, + ], + "type": "Identifier", + "value": "require", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 31, + ], + "type": "String", + "value": "'bar'", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-declaration.src.ts.shot index 7c39128056b5..ac4b760010d0 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-declaration.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-declaration.src.ts.shot @@ -22,6 +22,7 @@ Object { ], "type": "Identifier", }, + "importKind": "value", "isExport": true, "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-type-declaration.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-type-declaration.src.ts.shot new file mode 100644 index 000000000000..f5763d6fe01c --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/import-export-equal-type-declaration.src.ts.shot @@ -0,0 +1,280 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics import-export-equal-type-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + "importKind": "type", + "isExport": true, + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "moduleReference": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 38, + ], + "raw": "'bar'", + "type": "Literal", + "value": "bar", + }, + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 39, + ], + "type": "TSExternalModuleReference", + }, + "range": Array [ + 0, + 40, + ], + "type": "TSImportEqualsDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 41, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 13, + ], + "type": "Keyword", + "value": "import", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 18, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 32, + ], + "type": "Identifier", + "value": "require", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 38, + ], + "type": "String", + "value": "'bar'", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; diff --git a/yarn.lock b/yarn.lock index 84441403778d..47f77143dcf6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,22 +16,22 @@ dependencies: "@babel/highlight" "^7.12.13" -"@babel/compat-data@^7.13.0": - version "7.13.6" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.6.tgz#11972d07db4c2317afdbf41d6feb3a730301ef4e" - integrity sha512-VhgqKOWYVm7lQXlvbJnWOzwfAQATd2nV52koT0HZ/LdDH0m4DUDwkKYsH+IwpXb+bKPyBJzawA4I6nBKqZcpQw== +"@babel/compat-data@^7.13.8": + version "7.13.11" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.11.tgz#9c8fe523c206979c9a81b1e12fe50c1254f1aa35" + integrity sha512-BwKEkO+2a67DcFeS3RLl0Z3Gs2OvdXewuWjc1Hfokhb5eQWP9YRYH1/+VrVZvql2CfjOiNGqSAFOYt4lsqTHzg== "@babel/core@^7.1.0", "@babel/core@^7.7.5": - version "7.13.1" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.1.tgz#7ddd027176debe40f13bb88bac0c21218c5b1ecf" - integrity sha512-FzeKfFBG2rmFtGiiMdXZPFt/5R5DXubVi82uYhjGX4Msf+pgYQMCFIqFXZWs5vbIYbf14VeBIgdGI03CDOOM1w== + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.10.tgz#07de050bbd8193fcd8a3c27918c0890613a94559" + integrity sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw== dependencies: "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.13.0" - "@babel/helper-compilation-targets" "^7.13.0" + "@babel/generator" "^7.13.9" + "@babel/helper-compilation-targets" "^7.13.10" "@babel/helper-module-transforms" "^7.13.0" - "@babel/helpers" "^7.13.0" - "@babel/parser" "^7.13.0" + "@babel/helpers" "^7.13.10" + "@babel/parser" "^7.13.10" "@babel/template" "^7.12.13" "@babel/traverse" "^7.13.0" "@babel/types" "^7.13.0" @@ -40,27 +40,27 @@ gensync "^1.0.0-beta.2" json5 "^2.1.2" lodash "^4.17.19" - semver "7.0.0" + semver "^6.3.0" source-map "^0.5.0" -"@babel/generator@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.0.tgz#bd00d4394ca22f220390c56a0b5b85568ec1ec0c" - integrity sha512-zBZfgvBB/ywjx0Rgc2+BwoH/3H+lDtlgD4hBOpEv5LxRnYsm/753iRuLepqnYlynpjC3AdQxtxsoeHJoEEwOAw== +"@babel/generator@^7.13.0", "@babel/generator@^7.13.9": + version "7.13.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.9.tgz#3a7aa96f9efb8e2be42d38d80e2ceb4c64d8de39" + integrity sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw== dependencies: "@babel/types" "^7.13.0" jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-compilation-targets@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.0.tgz#c9cf29b82a76fd637f0faa35544c4ace60a155a1" - integrity sha512-SOWD0JK9+MMIhTQiUVd4ng8f3NXhPVQvTv7D3UN4wbp/6cAHnB2EmMaU1zZA2Hh1gwme+THBrVSqTFxHczTh0Q== +"@babel/helper-compilation-targets@^7.13.10": + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.10.tgz#1310a1678cb8427c07a753750da4f8ce442bdd0c" + integrity sha512-/Xju7Qg1GQO4mHZ/Kcs6Au7gfafgZnwm+a7sy/ow/tV1sHeraRUHbjdat8/UvDor4Tez+siGKDk6zIKtCPKVJA== dependencies: - "@babel/compat-data" "^7.13.0" + "@babel/compat-data" "^7.13.8" "@babel/helper-validator-option" "^7.12.17" browserslist "^4.14.5" - semver "7.0.0" + semver "^6.3.0" "@babel/helper-function-name@^7.12.13": version "7.12.13" @@ -153,28 +153,28 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz#d1fbf012e1a79b7eebbfdc6d270baaf8d9eb9831" integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== -"@babel/helpers@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.13.0.tgz#7647ae57377b4f0408bf4f8a7af01c42e41badc0" - integrity sha512-aan1MeFPxFacZeSz6Ld7YZo5aPuqnKlD7+HZY75xQsueczFccP9A7V05+oe0XpLwHK3oLorPe9eaAUljL7WEaQ== +"@babel/helpers@^7.13.10": + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.13.10.tgz#fd8e2ba7488533cdeac45cc158e9ebca5e3c7df8" + integrity sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ== dependencies: "@babel/template" "^7.12.13" "@babel/traverse" "^7.13.0" "@babel/types" "^7.13.0" "@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.12.13.tgz#8ab538393e00370b26271b01fa08f7f27f2e795c" - integrity sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww== + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.13.10.tgz#a8b2a66148f5b27d666b15d81774347a731d52d1" + integrity sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg== dependencies: "@babel/helper-validator-identifier" "^7.12.11" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.4": - version "7.13.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.10.tgz#8f8f9bf7b3afa3eabd061f7a5bcdf4fec3c48409" - integrity sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ== +"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.10", "@babel/parser@^7.13.11": + version "7.13.11" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.11.tgz#f93ebfc99d21c1772afbbaa153f47e7ce2f50b88" + integrity sha512-PhuoqeHoO9fc4ffMEVk4qb/w/s2iOSWohvbHxLtxui0eBg3Lg5gN1U8wp1V1u61hOWkPQJJyJzGH6Y+grwkq8Q== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -261,9 +261,9 @@ "@babel/helper-plugin-utils" "^7.12.13" "@babel/runtime@^7.11.0", "@babel/runtime@^7.7.6": - version "7.13.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.6.tgz#86e0fad6cbb46a680e21c1aa4748717a058d345a" - integrity sha512-Y/DEVhSQ91u27rxq7D0EH/sewS6+x06p/MgO1VppbDHMzYXLZrAR5cFjCom78e9RUw1BQAq6qJg6fXc/ep7glA== + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.10.tgz#47d42a57b6095f4468da440388fdbad8bebf0d7d" + integrity sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw== dependencies: regenerator-runtime "^0.13.4" @@ -2066,17 +2066,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.12.3: - version "6.12.4" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234" - integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.12.4: +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2992,7 +2982,7 @@ contains-path@^0.1.0: resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= -conventional-changelog-angular@^5.0.11: +conventional-changelog-angular@^5.0.11, conventional-changelog-angular@^5.0.3: version "5.0.12" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw== @@ -3000,14 +2990,6 @@ conventional-changelog-angular@^5.0.11: compare-func "^2.0.0" q "^1.5.1" -conventional-changelog-angular@^5.0.3: - version "5.0.11" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.11.tgz#99a3ca16e4a5305e0c2c2fae3ef74fd7631fc3fb" - integrity sha512-nSLypht/1yEflhuTogC03i7DX7sOrXGsRn14g131Potqi6cbGbGEE9PSDEHKldabB6N76HiSyw9Ph+kLmC04Qw== - dependencies: - compare-func "^2.0.0" - q "^1.5.1" - conventional-changelog-conventionalcommits@^4.3.1: version "4.5.0" resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.5.0.tgz#a02e0b06d11d342fdc0f00c91d78265ed0bc0a62" @@ -7794,11 +7776,6 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" - integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== - semver@7.3.4, semver@7.x, semver@^7.2.1, semver@^7.3.2: version "7.3.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" From e3a3ea04757464aa2dded1ef46af8ad4e05246f2 Mon Sep 17 00:00:00 2001 From: Nikita Stefaniak Date: Thu, 18 Mar 2021 20:56:00 +0100 Subject: [PATCH 037/473] fix(eslint-plugin): [promise-function-async] bad fixer with computed and literal methods (#3163) --- .../src/rules/promise-function-async.ts | 35 +++++++++++++++++- .../rules/promise-function-async.test.ts | 36 +++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/src/rules/promise-function-async.ts b/packages/eslint-plugin/src/rules/promise-function-async.ts index ce624be643c1..68b1d42567c5 100644 --- a/packages/eslint-plugin/src/rules/promise-function-async.ts +++ b/packages/eslint-plugin/src/rules/promise-function-async.ts @@ -1,5 +1,6 @@ import { AST_NODE_TYPES, + AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/experimental-utils'; import * as ts from 'typescript'; @@ -156,8 +157,40 @@ export default util.createRule({ (node.parent.type === AST_NODE_TYPES.Property && node.parent.method)) ) { - return fixer.insertTextBefore(node.parent.key, 'async '); + // this function is a class method or object function property shorthand + const method = node.parent; + + // the token to put `async` before + let keyToken = sourceCode.getFirstToken(method)!; + + // if there are decorators then skip past them + if ( + method.type === AST_NODE_TYPES.MethodDefinition && + method.decorators + ) { + const lastDecorator = + method.decorators[method.decorators.length - 1]; + keyToken = sourceCode.getTokenAfter(lastDecorator)!; + } + + // if current token is a keyword like `static` or `public` then skip it + while (keyToken.type === AST_TOKEN_TYPES.Keyword) { + keyToken = sourceCode.getTokenAfter(keyToken)!; + } + + // check if there is a space between key and previous token + const insertSpace = !sourceCode.isSpaceBetween!( + sourceCode.getTokenBefore(keyToken)!, + keyToken, + ); + + let code = 'async '; + if (insertSpace) { + code = ` ${code}`; + } + return fixer.insertTextBefore(keyToken, code); } + return fixer.insertTextBefore(node, 'async '); }, }); diff --git a/packages/eslint-plugin/tests/rules/promise-function-async.test.ts b/packages/eslint-plugin/tests/rules/promise-function-async.test.ts index 961047138c99..6a0451ed8580 100644 --- a/packages/eslint-plugin/tests/rules/promise-function-async.test.ts +++ b/packages/eslint-plugin/tests/rules/promise-function-async.test.ts @@ -1,3 +1,4 @@ +import { noFormat } from '@typescript-eslint/experimental-utils/src/eslint-utils'; import rule from '../../src/rules/promise-function-async'; import { getFixturesRootDir, RuleTester } from '../RuleTester'; @@ -630,6 +631,41 @@ class Test { public async test() { return Promise.resolve(123); } +} + `, + }, + { + code: noFormat` +class Test { + @decorator(async () => {}) + static protected[(1)]() { + return Promise.resolve(1); + } + public'bar'() { + return Promise.resolve(2); + } + private['baz']() { + return Promise.resolve(3); + } +} + `, + errors: [ + { line: 4, column: 3, messageId }, + { line: 7, column: 3, messageId }, + { line: 10, column: 3, messageId }, + ], + output: noFormat` +class Test { + @decorator(async () => {}) + static protected async [(1)]() { + return Promise.resolve(1); + } + public async 'bar'() { + return Promise.resolve(2); + } + private async ['baz']() { + return Promise.resolve(3); + } } `, }, From 0557a439327557f4c0369ae2dddc8282ba45bfe6 Mon Sep 17 00:00:00 2001 From: Matthias Kunnen Date: Sun, 21 Mar 2021 21:39:51 +0100 Subject: [PATCH 038/473] feat(eslint-plugin): [object-curly-spacing] support MappedType (#3176) --- .../src/rules/object-curly-spacing.ts | 39 +++- .../tests/rules/object-curly-spacing.test.ts | 187 +++++++++++++++++- 2 files changed, 214 insertions(+), 12 deletions(-) diff --git a/packages/eslint-plugin/src/rules/object-curly-spacing.ts b/packages/eslint-plugin/src/rules/object-curly-spacing.ts index 581e7ac15557..74161246a31a 100644 --- a/packages/eslint-plugin/src/rules/object-curly-spacing.ts +++ b/packages/eslint-plugin/src/rules/object-curly-spacing.ts @@ -63,7 +63,7 @@ export default createRule({ * @param token The token to use for the report. */ function reportNoBeginningSpace( - node: TSESTree.TSTypeLiteral, + node: TSESTree.TSMappedType | TSESTree.TSTypeLiteral, token: TSESTree.Token, ): void { const nextToken = context @@ -89,7 +89,7 @@ export default createRule({ * @param token The token to use for the report. */ function reportNoEndingSpace( - node: TSESTree.TSTypeLiteral, + node: TSESTree.TSMappedType | TSESTree.TSTypeLiteral, token: TSESTree.Token, ): void { const previousToken = context @@ -115,7 +115,7 @@ export default createRule({ * @param token The token to use for the report. */ function reportRequiredBeginningSpace( - node: TSESTree.TSTypeLiteral, + node: TSESTree.TSMappedType | TSESTree.TSTypeLiteral, token: TSESTree.Token, ): void { context.report({ @@ -137,7 +137,7 @@ export default createRule({ * @param token The token to use for the report. */ function reportRequiredEndingSpace( - node: TSESTree.TSTypeLiteral, + node: TSESTree.TSMappedType | TSESTree.TSTypeLiteral, token: TSESTree.Token, ): void { context.report({ @@ -162,7 +162,7 @@ export default createRule({ * @param last The last token to check (should be closing brace) */ function validateBraceSpacing( - node: TSESTree.TSTypeLiteral, + node: TSESTree.TSMappedType | TSESTree.TSTypeLiteral, first: TSESTree.Token, second: TSESTree.Token | TSESTree.Comment, penultimate: TSESTree.Token | TSESTree.Comment, @@ -175,7 +175,10 @@ export default createRule({ const openingCurlyBraceMustBeSpaced = options.arraysInObjectsException && - secondType === AST_NODE_TYPES.TSIndexSignature + [ + AST_NODE_TYPES.TSMappedType, + AST_NODE_TYPES.TSIndexSignature, + ].includes(secondType) ? !options.spaced : options.spaced; @@ -197,15 +200,19 @@ export default createRule({ isClosingBracketToken(penultimate)) || (options.objectsInObjectsException && isClosingBraceToken(penultimate)); - const penultimateType = - shouldCheckPenultimate && - sourceCode.getNodeByRangeIndex(penultimate.range[0])!.type; + const penultimateType = shouldCheckPenultimate + ? sourceCode.getNodeByRangeIndex(penultimate.range[0])!.type + : undefined; const closingCurlyBraceMustBeSpaced = (options.arraysInObjectsException && penultimateType === AST_NODE_TYPES.TSTupleType) || (options.objectsInObjectsException && - penultimateType === AST_NODE_TYPES.TSTypeLiteral) + penultimateType !== undefined && + [ + AST_NODE_TYPES.TSMappedType, + AST_NODE_TYPES.TSTypeLiteral, + ].includes(penultimateType)) ? !options.spaced : options.spaced; @@ -246,6 +253,18 @@ export default createRule({ const rules = baseRule.create(context); return { ...rules, + TSMappedType(node: TSESTree.TSMappedType): void { + const first = sourceCode.getFirstToken(node)!; + const last = sourceCode.getLastToken(node)!; + const second = sourceCode.getTokenAfter(first, { + includeComments: true, + })!; + const penultimate = sourceCode.getTokenBefore(last, { + includeComments: true, + })!; + + validateBraceSpacing(node, first, second, penultimate, last); + }, TSTypeLiteral(node: TSESTree.TSTypeLiteral): void { if (node.members.length === 0) { return; diff --git a/packages/eslint-plugin/tests/rules/object-curly-spacing.test.ts b/packages/eslint-plugin/tests/rules/object-curly-spacing.test.ts index 5c28cbef7ed7..ecde35b775ff 100644 --- a/packages/eslint-plugin/tests/rules/object-curly-spacing.test.ts +++ b/packages/eslint-plugin/tests/rules/object-curly-spacing.test.ts @@ -570,6 +570,71 @@ ruleTester.run('object-curly-spacing', rule, { code: 'const x:{[key: string]: [number]}', }, + // default - mapped types + { + code: "const x:{[k in 'union']: number}", + }, + { + code: "const x:{ // line-comment\n[k in 'union']: number\n}", + }, + { + code: "const x:{// line-comment\n[k in 'union']: number\n}", + }, + { + code: + "const x:{/* inline-comment */[k in 'union']: number/* inline-comment */}", + }, + { + code: "const x:{\n[k in 'union']: number\n}", + }, + { + code: "const x:{[k in 'union']: {[k in 'union']: number}}", + }, + { + code: "const x:{[k in 'union']: [number]}", + }, + { + code: "const x:{[k in 'union']: value}", + }, + + // never - mapped types + { + code: "const x:{[k in 'union']: {[k in 'union']: number} }", + options: ['never', { objectsInObjects: true }], + }, + { + code: "const x:{[k in 'union']: {[k in 'union']: number}}", + options: ['never', { objectsInObjects: false }], + }, + { + code: "const x:{[k in 'union']: () => {[k in 'union']: number} }", + options: ['never', { objectsInObjects: true }], + }, + { + code: "const x:{[k in 'union']: () => {[k in 'union']: number}}", + options: ['never', { objectsInObjects: false }], + }, + { + code: "const x:{[k in 'union']: [ number ]}", + options: ['never', { arraysInObjects: false }], + }, + { + code: "const x:{ [k in 'union']: value}", + options: ['never', { arraysInObjects: true }], + }, + { + code: "const x:{[k in 'union']: value}", + options: ['never', { arraysInObjects: false }], + }, + { + code: "const x:{ [k in 'union']: [number] }", + options: ['never', { arraysInObjects: true }], + }, + { + code: "const x:{[k in 'union']: [number]}", + options: ['never', { arraysInObjects: false }], + }, + // never - object literal types { code: 'const x:{f: {g: number} }', @@ -612,6 +677,69 @@ ruleTester.run('object-curly-spacing', rule, { options: ['never', { arraysInObjects: false }], }, + // always - mapped types + { + code: "const x:{ [k in 'union']: number }", + options: ['always'], + }, + { + code: "const x:{ // line-comment\n[k in 'union']: number\n}", + options: ['always'], + }, + { + code: + "const x:{ /* inline-comment */ [k in 'union']: number /* inline-comment */ }", + options: ['always'], + }, + { + code: "const x:{\n[k in 'union']: number\n}", + options: ['always'], + }, + { + code: "const x:{ [k in 'union']: [number] }", + options: ['always'], + }, + + // always - mapped types - objectsInObjects + { + code: "const x:{ [k in 'union']: { [k in 'union']: number } }", + options: ['always', { objectsInObjects: true }], + }, + { + code: "const x:{ [k in 'union']: { [k in 'union']: number }}", + options: ['always', { objectsInObjects: false }], + }, + { + code: "const x:{ [k in 'union']: () => { [k in 'union']: number } }", + options: ['always', { objectsInObjects: true }], + }, + { + code: "const x:{ [k in 'union']: () => { [k in 'union']: number }}", + options: ['always', { objectsInObjects: false }], + }, + + // always - mapped types - arraysInObjects + { + code: "type x = { [k in 'union']: number }", + options: ['always'], + }, + { + code: "const x:{ [k in 'union']: [number] }", + options: ['always', { arraysInObjects: true }], + }, + { + code: "const x:{ [k in 'union']: value }", + options: ['always', { arraysInObjects: true }], + }, + { + code: "const x:{[k in 'union']: value }", + options: ['always', { arraysInObjects: false }], + }, + { + code: "const x:{[k in 'union']: [number]}", + options: ['always', { arraysInObjects: false }], + }, + // always - object literal types { code: 'const x:{}', @@ -642,7 +770,7 @@ ruleTester.run('object-curly-spacing', rule, { options: ['always'], }, - // always - objectsInObjects + // always - literal types - objectsInObjects { code: 'const x:{ f: { g: number } }', options: ['always', { objectsInObjects: true }], @@ -660,7 +788,7 @@ ruleTester.run('object-curly-spacing', rule, { options: ['always', { objectsInObjects: false }], }, - // always - arraysInObjects + // always - literal types - arraysInObjects { code: 'const x:{ f: [number] }', options: ['always', { arraysInObjects: true }], @@ -1912,6 +2040,7 @@ ruleTester.run('object-curly-spacing', rule, { }, // object literal types + // never - literal types { code: 'type x = { f: number }', output: 'type x = {f: number}', @@ -1930,6 +2059,7 @@ ruleTester.run('object-curly-spacing', rule, { output: 'type x = {f: number}', errors: [{ messageId: 'unexpectedSpaceBefore' }], }, + // always - literal types { code: 'type x = {f: number}', output: 'type x = { f: number }', @@ -1951,5 +2081,58 @@ ruleTester.run('object-curly-spacing', rule, { options: ['always'], errors: [{ messageId: 'requireSpaceBefore' }], }, + + // never - mapped types + { + code: "type x = { [k in 'union']: number }", + output: "type x = {[k in 'union']: number}", + errors: [ + { messageId: 'unexpectedSpaceAfter' }, + { messageId: 'unexpectedSpaceBefore' }, + ], + }, + { + code: "type x = { [k in 'union']: number}", + output: "type x = {[k in 'union']: number}", + errors: [{ messageId: 'unexpectedSpaceAfter' }], + }, + { + code: "type x = {[k in 'union']: number }", + output: "type x = {[k in 'union']: number}", + errors: [{ messageId: 'unexpectedSpaceBefore' }], + }, + // always - mapped types + { + code: "type x = {[k in 'union']: number}", + output: "type x = { [k in 'union']: number }", + options: ['always'], + errors: [ + { messageId: 'requireSpaceAfter' }, + { messageId: 'requireSpaceBefore' }, + ], + }, + { + code: "type x = {[k in 'union']: number }", + output: "type x = { [k in 'union']: number }", + options: ['always'], + errors: [{ messageId: 'requireSpaceAfter' }], + }, + { + code: "type x = { [k in 'union']: number}", + output: "type x = { [k in 'union']: number }", + options: ['always'], + errors: [{ messageId: 'requireSpaceBefore' }], + }, + // Mapped and literal types mix + { + code: "type x = { [k in 'union']: { [k: string]: number } }", + output: "type x = {[k in 'union']: {[k: string]: number}}", + errors: [ + { messageId: 'unexpectedSpaceAfter' }, + { messageId: 'unexpectedSpaceAfter' }, + { messageId: 'unexpectedSpaceBefore' }, + { messageId: 'unexpectedSpaceBefore' }, + ], + }, ], }); From 5cc5d2ef6d924d301e87f7bcf599352310e74b2c Mon Sep 17 00:00:00 2001 From: JounQin Date: Mon, 22 Mar 2021 04:49:00 +0800 Subject: [PATCH 039/473] feat(eslint-plugin): [unbound-method] improve error message (#3203) * docs: highlight `this: void` and arrow function for unbound-method close #3201 * Update packages/eslint-plugin/docs/rules/unbound-method.md Co-authored-by: Brad Zacher * feat: check if the first param is `this` add new message `unboundWithoutThisAnnotation` Co-authored-by: Brad Zacher --- .../docs/rules/unbound-method.md | 2 + .../eslint-plugin/src/rules/unbound-method.ts | 97 ++++++++++++------- .../tests/rules/unbound-method.test.ts | 36 +++---- 3 files changed, 81 insertions(+), 54 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/unbound-method.md b/packages/eslint-plugin/docs/rules/unbound-method.md index a9a4fe396a24..15063dbb4f3b 100644 --- a/packages/eslint-plugin/docs/rules/unbound-method.md +++ b/packages/eslint-plugin/docs/rules/unbound-method.md @@ -4,6 +4,8 @@ Warns when a method is used outside of a method call. Class functions don't preserve the class scope when passed as standalone variables. +If your function does not access `this`, [you can annotate it with `this: void`](https://www.typescriptlang.org/docs/handbook/2/functions.html#declaring-this-in-a-function), or consider using an arrow function instead. + ## Rule Details Examples of **incorrect** code for this rule diff --git a/packages/eslint-plugin/src/rules/unbound-method.ts b/packages/eslint-plugin/src/rules/unbound-method.ts index 2ec66bc2aa33..ecf9e6528190 100644 --- a/packages/eslint-plugin/src/rules/unbound-method.ts +++ b/packages/eslint-plugin/src/rules/unbound-method.ts @@ -16,7 +16,7 @@ interface Config { export type Options = [Config]; -export type MessageIds = 'unbound'; +export type MessageIds = 'unbound' | 'unboundWithoutThisAnnotation'; /** * The following is a list of exceptions to the rule @@ -121,6 +121,9 @@ const getNodeName = (node: TSESTree.Node): string | null => const getMemberFullName = (node: TSESTree.MemberExpression): string => `${getNodeName(node.object)}.${getNodeName(node.property)}`; +const BASE_MESSAGE = + 'Avoid referencing unbound methods which may cause unintentional scoping of `this`.'; + export default util.createRule({ name: 'unbound-method', meta: { @@ -132,8 +135,11 @@ export default util.createRule({ requiresTypeChecking: true, }, messages: { - unbound: - 'Avoid referencing unbound methods which may cause unintentional scoping of `this`.', + unbound: BASE_MESSAGE, + unboundWithoutThisAnnotation: + BASE_MESSAGE + + '\n' + + 'If your function does not access `this`, you can annotate it with `this: void`, or consider using an arrow function instead.', }, schema: [ { @@ -160,6 +166,26 @@ export default util.createRule({ context.getFilename(), ); + function checkMethodAndReport( + node: TSESTree.Node, + symbol: ts.Symbol | undefined, + ): void { + if (!symbol) { + return; + } + + const { dangerous, firstParamIsThis } = checkMethod(symbol, ignoreStatic); + if (dangerous) { + context.report({ + messageId: + firstParamIsThis === false + ? 'unboundWithoutThisAnnotation' + : 'unbound', + node, + }); + } + } + return { MemberExpression(node: TSESTree.MemberExpression): void { if (isSafeUse(node)) { @@ -179,14 +205,8 @@ export default util.createRule({ } const originalNode = parserServices.esTreeNodeToTSNodeMap.get(node); - const symbol = checker.getSymbolAtLocation(originalNode); - if (symbol && isDangerousMethod(symbol, ignoreStatic)) { - context.report({ - messageId: 'unbound', - node, - }); - } + checkMethodAndReport(node, checker.getSymbolAtLocation(originalNode)); }, 'VariableDeclarator, AssignmentExpression'( node: TSESTree.VariableDeclarator | TSESTree.AssignmentExpression, @@ -219,13 +239,10 @@ export default util.createRule({ return; } - const symbol = initTypes.getProperty(property.key.name); - if (symbol && isDangerousMethod(symbol, ignoreStatic)) { - context.report({ - messageId: 'unbound', - node, - }); - } + checkMethodAndReport( + node, + initTypes.getProperty(property.key.name), + ); } }); } @@ -234,44 +251,52 @@ export default util.createRule({ }, }); -function isDangerousMethod(symbol: ts.Symbol, ignoreStatic: boolean): boolean { +function checkMethod( + symbol: ts.Symbol, + ignoreStatic: boolean, +): { dangerous: boolean; firstParamIsThis?: boolean } { const { valueDeclaration } = symbol; if (!valueDeclaration) { // working around https://github.com/microsoft/TypeScript/issues/31294 - return false; + return { dangerous: false }; } switch (valueDeclaration.kind) { case ts.SyntaxKind.PropertyDeclaration: - return ( - (valueDeclaration as ts.PropertyDeclaration).initializer?.kind === - ts.SyntaxKind.FunctionExpression - ); + return { + dangerous: + (valueDeclaration as ts.PropertyDeclaration).initializer?.kind === + ts.SyntaxKind.FunctionExpression, + }; case ts.SyntaxKind.MethodDeclaration: case ts.SyntaxKind.MethodSignature: { const decl = valueDeclaration as | ts.MethodDeclaration | ts.MethodSignature; const firstParam = decl.parameters[0]; - const thisArgIsVoid = + const firstParamIsThis = firstParam?.name.kind === ts.SyntaxKind.Identifier && - firstParam?.name.escapedText === 'this' && + firstParam?.name.escapedText === 'this'; + const thisArgIsVoid = + firstParamIsThis && firstParam?.type?.kind === ts.SyntaxKind.VoidKeyword; - return ( - !thisArgIsVoid && - !( - ignoreStatic && - tsutils.hasModifier( - valueDeclaration.modifiers, - ts.SyntaxKind.StaticKeyword, - ) - ) - ); + return { + dangerous: + !thisArgIsVoid && + !( + ignoreStatic && + tsutils.hasModifier( + valueDeclaration.modifiers, + ts.SyntaxKind.StaticKeyword, + ) + ), + firstParamIsThis, + }; } } - return false; + return { dangerous: false }; } function isSafeUse(node: TSESTree.Node): boolean { diff --git a/packages/eslint-plugin/tests/rules/unbound-method.test.ts b/packages/eslint-plugin/tests/rules/unbound-method.test.ts index 911206b1f219..3075e93fe67a 100644 --- a/packages/eslint-plugin/tests/rules/unbound-method.test.ts +++ b/packages/eslint-plugin/tests/rules/unbound-method.test.ts @@ -42,7 +42,7 @@ function addContainsMethodsClassInvalid( errors: [ { line: 18, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], })); @@ -298,7 +298,7 @@ Promise.resolve().then(console.log); errors: [ { line: 10, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -310,7 +310,7 @@ const x = console.log; errors: [ { line: 3, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -325,15 +325,15 @@ function foo(arg: ContainsMethods | null) { errors: [ { line: 20, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, { line: 21, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, { line: 22, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -375,7 +375,7 @@ ContainsMethods.unboundStatic; errors: [ { line: 8, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -390,7 +390,7 @@ const x = CommunicationError.prototype.foo; errors: [ { line: 5, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -400,7 +400,7 @@ const x = CommunicationError.prototype.foo; errors: [ { line: 1, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -419,7 +419,7 @@ instance.unbound = x; // THIS SHOULD NOT errors: [ { line: 9, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -447,7 +447,7 @@ const { unbound } = new Foo(); errors: [ { line: 5, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -476,7 +476,7 @@ let unbound; errors: [ { line: 6, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -505,7 +505,7 @@ const { foo } = CommunicationError.prototype; errors: [ { line: 5, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -520,7 +520,7 @@ let foo; errors: [ { line: 6, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -532,7 +532,7 @@ const { log } = console; errors: [ { line: 3, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -541,7 +541,7 @@ const { log } = console; errors: [ { line: 1, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -562,7 +562,7 @@ class OtherClass extends BaseClass { { line: 8, column: 15, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -584,7 +584,7 @@ class OtherClass extends BaseClass { { line: 9, column: 9, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, From 7ad343b067040f6ea816b129323d110d4bc2e830 Mon Sep 17 00:00:00 2001 From: Florian Adonis Date: Sun, 21 Mar 2021 23:51:50 +0300 Subject: [PATCH 040/473] fix(eslint-plugin): [member-delimiter-style] correct invalid fix for multiline with params on the same line (#3177) --- .../src/rules/member-delimiter-style.ts | 93 +++++++++++++++---- .../rules/member-delimiter-style.test.ts | 18 ++++ 2 files changed, 93 insertions(+), 18 deletions(-) diff --git a/packages/eslint-plugin/src/rules/member-delimiter-style.ts b/packages/eslint-plugin/src/rules/member-delimiter-style.ts index 64147b37cf2a..de0a60f013cf 100644 --- a/packages/eslint-plugin/src/rules/member-delimiter-style.ts +++ b/packages/eslint-plugin/src/rules/member-delimiter-style.ts @@ -1,4 +1,5 @@ import { + TSESLint, TSESTree, AST_NODE_TYPES, } from '@typescript-eslint/experimental-utils'; @@ -11,6 +12,9 @@ type TypeOptions = { delimiter?: Delimiter; requireLast?: boolean; }; +type TypeOptionsWithType = TypeOptions & { + type: string; +}; // eslint-disable-next-line @typescript-eslint/consistent-type-definitions type BaseOptions = { multiline?: TypeOptions; @@ -29,6 +33,20 @@ type MessageIds = | 'unexpectedSemi' | 'expectedComma' | 'expectedSemi'; +type LastTokenType = TSESTree.Token; + +interface MakeFixFunctionParams { + optsNone: boolean; + optsSemi: boolean; + lastToken: LastTokenType; + missingDelimiter: boolean; + lastTokenLine: string; + isSingleLine: boolean; +} + +type MakeFixFunctionReturnType = + | ((fixer: TSESLint.RuleFixer) => TSESLint.RuleFix) + | null; const definition = { type: 'object', @@ -54,6 +72,47 @@ const definition = { additionalProperties: false, }; +const isLastTokenEndOfLine = (token: string, line: string): boolean => { + const positionInLine = line.indexOf(token); + + return positionInLine === line.length - 1; +}; + +const makeFixFunction = ({ + optsNone, + optsSemi, + lastToken, + missingDelimiter, + lastTokenLine, + isSingleLine, +}: MakeFixFunctionParams): MakeFixFunctionReturnType => { + // if removing is the action but last token is not the end of the line + if ( + optsNone && + !isLastTokenEndOfLine(lastToken.value, lastTokenLine) && + !isSingleLine + ) { + return null; + } + + return (fixer: TSESLint.RuleFixer): TSESLint.RuleFix => { + if (optsNone) { + // remove the unneeded token + return fixer.remove(lastToken); + } + + const token = optsSemi ? ';' : ','; + + if (missingDelimiter) { + // add the missing delimiter + return fixer.insertTextAfter(lastToken, token); + } + + // correct the current delimiter + return fixer.replaceText(lastToken, token); + }; +}; + export default util.createRule({ name: 'member-delimiter-style', meta: { @@ -127,7 +186,7 @@ export default util.createRule({ */ function checkLastToken( member: TSESTree.TypeElement, - opts: TypeOptions, + opts: TypeOptionsWithType, isLast: boolean, ): void { /** @@ -147,10 +206,14 @@ export default util.createRule({ const lastToken = sourceCode.getLastToken(member, { includeComments: false, }); + if (!lastToken) { return; } + const sourceCodeLines = sourceCode.getLines(); + const lastTokenLine = sourceCodeLines[lastToken?.loc.start.line - 1]; + const optsSemi = getOption('semi'); const optsComma = getOption('comma'); const optsNone = getOption('none'); @@ -193,22 +256,14 @@ export default util.createRule({ }, }, messageId, - fix(fixer) { - if (optsNone) { - // remove the unneeded token - return fixer.remove(lastToken); - } - - const token = optsSemi ? ';' : ','; - - if (missingDelimiter) { - // add the missing delimiter - return fixer.insertTextAfter(lastToken, token); - } - - // correct the current delimiter - return fixer.replaceText(lastToken, token); - }, + fix: makeFixFunction({ + optsNone, + optsSemi, + lastToken, + missingDelimiter, + lastTokenLine, + isSingleLine: opts.type === 'single-line', + }), }); } } @@ -239,7 +294,9 @@ export default util.createRule({ node.type === AST_NODE_TYPES.TSInterfaceBody ? interfaceOptions : typeLiteralOptions; - const opts = isSingleLine ? typeOpts.singleline : typeOpts.multiline; + const opts = isSingleLine + ? { ...typeOpts.singleline, type: 'single-line' } + : { ...typeOpts.multiline, type: 'multi-line' }; members.forEach((member, index) => { checkLastToken(member, opts ?? {}, index === members.length - 1); diff --git a/packages/eslint-plugin/tests/rules/member-delimiter-style.test.ts b/packages/eslint-plugin/tests/rules/member-delimiter-style.test.ts index c69e54e2af00..fa75383df8e3 100644 --- a/packages/eslint-plugin/tests/rules/member-delimiter-style.test.ts +++ b/packages/eslint-plugin/tests/rules/member-delimiter-style.test.ts @@ -851,6 +851,24 @@ interface Foo { }, { code: ` +type Test = { + a: { + one: 1 + }; b: 2 +}; + `, + output: null, + options: [{ multiline: { delimiter: 'none' } }], + errors: [ + { + messageId: 'unexpectedSemi', + line: 5, + column: 5, + }, + ], + }, + { + code: ` interface Foo { name: string age: number From e8239191590c62cdfd449054c845bd1e516ae370 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 22 Mar 2021 17:02:44 +0000 Subject: [PATCH 041/473] chore: publish v4.19.0 --- CHANGELOG.md | 19 +++++++++++++++++++ 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 | 18 ++++++++++++++++++ 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 | 11 +++++++++++ packages/shared-fixtures/package.json | 2 +- packages/types/CHANGELOG.md | 11 +++++++++++ packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 11 +++++++++++ packages/typescript-estree/package.json | 8 ++++---- packages/visitor-keys/CHANGELOG.md | 8 ++++++++ packages/visitor-keys/package.json | 4 ++-- 22 files changed, 148 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f45f0792dacc..0de3cfd54a34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) + + +### Bug Fixes + +* **eslint-plugin:** [member-delimiter-style] correct invalid fix for multiline with params on the same line ([#3177](https://github.com/typescript-eslint/typescript-eslint/issues/3177)) ([7ad343b](https://github.com/typescript-eslint/typescript-eslint/commit/7ad343b067040f6ea816b129323d110d4bc2e830)) +* **eslint-plugin:** [promise-function-async] bad fixer with computed and literal methods ([#3163](https://github.com/typescript-eslint/typescript-eslint/issues/3163)) ([e3a3ea0](https://github.com/typescript-eslint/typescript-eslint/commit/e3a3ea04757464aa2dded1ef46af8ad4e05246f2)) +* **typescript-estree:** [ts 4.2] add support for import type equal declaration ([#3189](https://github.com/typescript-eslint/typescript-eslint/issues/3189)) ([6a25faf](https://github.com/typescript-eslint/typescript-eslint/commit/6a25faf5cfa4d21a7546d9866819f4e017308fb2)) + + +### Features + +* **eslint-plugin:** [object-curly-spacing] support MappedType ([#3176](https://github.com/typescript-eslint/typescript-eslint/issues/3176)) ([0557a43](https://github.com/typescript-eslint/typescript-eslint/commit/0557a439327557f4c0369ae2dddc8282ba45bfe6)) +* **eslint-plugin:** [unbound-method] improve error message ([#3203](https://github.com/typescript-eslint/typescript-eslint/issues/3203)) ([5cc5d2e](https://github.com/typescript-eslint/typescript-eslint/commit/5cc5d2ef6d924d301e87f7bcf599352310e74b2c)), closes [#3201](https://github.com/typescript-eslint/typescript-eslint/issues/3201) + + + + + # [4.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) diff --git a/lerna.json b/lerna.json index fc89ed9ca0ea..c7fb57b16818 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.18.0", + "version": "4.19.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 15f4b61168fc..7861946d900b 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.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) **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 1734089a88b9..f229f2dcac3d 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.18.0", + "version": "4.19.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.18.0", + "@typescript-eslint/experimental-utils": "4.19.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index d44f760fa34e..cd88303c8f7d 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.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) **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 9b3f6addba39..49658a2247d7 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.18.0", + "version": "4.19.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.18.0", + "@typescript-eslint/experimental-utils": "4.19.0", "lodash": "^4.17.15" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.18.0" + "@typescript-eslint/parser": "4.19.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 1a8c08249cab..b4dd710df609 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) + + +### Bug Fixes + +* **eslint-plugin:** [member-delimiter-style] correct invalid fix for multiline with params on the same line ([#3177](https://github.com/typescript-eslint/typescript-eslint/issues/3177)) ([7ad343b](https://github.com/typescript-eslint/typescript-eslint/commit/7ad343b067040f6ea816b129323d110d4bc2e830)) +* **eslint-plugin:** [promise-function-async] bad fixer with computed and literal methods ([#3163](https://github.com/typescript-eslint/typescript-eslint/issues/3163)) ([e3a3ea0](https://github.com/typescript-eslint/typescript-eslint/commit/e3a3ea04757464aa2dded1ef46af8ad4e05246f2)) + + +### Features + +* **eslint-plugin:** [object-curly-spacing] support MappedType ([#3176](https://github.com/typescript-eslint/typescript-eslint/issues/3176)) ([0557a43](https://github.com/typescript-eslint/typescript-eslint/commit/0557a439327557f4c0369ae2dddc8282ba45bfe6)) +* **eslint-plugin:** [unbound-method] improve error message ([#3203](https://github.com/typescript-eslint/typescript-eslint/issues/3203)) ([5cc5d2e](https://github.com/typescript-eslint/typescript-eslint/commit/5cc5d2ef6d924d301e87f7bcf599352310e74b2c)), closes [#3201](https://github.com/typescript-eslint/typescript-eslint/issues/3201) + + + + + # [4.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index dc4023088e75..7783332ecaaa 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.18.0", + "version": "4.19.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.18.0", - "@typescript-eslint/scope-manager": "4.18.0", + "@typescript-eslint/experimental-utils": "4.19.0", + "@typescript-eslint/scope-manager": "4.19.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 9e5adeddf9c9..8fbedca81985 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.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + # [4.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) **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 e81bde7eb2a8..033793fe03b1 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.18.0", + "version": "4.19.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.18.0", - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/typescript-estree": "4.18.0", + "@typescript-eslint/scope-manager": "4.19.0", + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/typescript-estree": "4.19.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 8819d640f26a..f241bd08fbaf 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.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index b92208c48f9f..9cc7802caefa 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.18.0", + "version": "4.19.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.18.0", - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/typescript-estree": "4.18.0", + "@typescript-eslint/scope-manager": "4.19.0", + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/typescript-estree": "4.19.0", "debug": "^4.1.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.18.0", + "@typescript-eslint/experimental-utils": "4.19.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index ca967ed97850..88c0cf7a037b 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.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [4.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) **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 d82525e8cf08..dcfa875412e8 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.18.0", + "version": "4.19.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/visitor-keys": "4.18.0" + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/visitor-keys": "4.19.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.18.0", + "@typescript-eslint/typescript-estree": "4.19.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index b771cc0bac00..1eb1200c709e 100644 --- a/packages/shared-fixtures/CHANGELOG.md +++ b/packages/shared-fixtures/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) + + +### Bug Fixes + +* **typescript-estree:** [ts 4.2] add support for import type equal declaration ([#3189](https://github.com/typescript-eslint/typescript-eslint/issues/3189)) ([6a25faf](https://github.com/typescript-eslint/typescript-eslint/commit/6a25faf5cfa4d21a7546d9866819f4e017308fb2)) + + + + + # [4.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) **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 ee3e1e508233..54046c06a67a 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.18.0", + "version": "4.19.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index ba20b0a516ad..c647367cf3e0 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) + + +### Bug Fixes + +* **typescript-estree:** [ts 4.2] add support for import type equal declaration ([#3189](https://github.com/typescript-eslint/typescript-eslint/issues/3189)) ([6a25faf](https://github.com/typescript-eslint/typescript-eslint/commit/6a25faf5cfa4d21a7546d9866819f4e017308fb2)) + + + + + # [4.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 199c898b3842..c24cc541bc59 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.18.0", + "version": "4.19.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 98252b65820e..cabba9f41bfb 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) + + +### Bug Fixes + +* **typescript-estree:** [ts 4.2] add support for import type equal declaration ([#3189](https://github.com/typescript-eslint/typescript-eslint/issues/3189)) ([6a25faf](https://github.com/typescript-eslint/typescript-eslint/commit/6a25faf5cfa4d21a7546d9866819f4e017308fb2)) + + + + + # [4.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) **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 009bd688fa25..a174adf4d8c1 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.18.0", + "version": "4.19.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.18.0", - "@typescript-eslint/visitor-keys": "4.18.0", + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/visitor-keys": "4.19.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.18.0", + "@typescript-eslint/shared-fixtures": "4.19.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index a3754372477d..5756220219ff 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.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.18.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.17.0...v4.18.0) (2021-03-15) **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 fb20068e9f5e..a1dde093e65c 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.18.0", + "version": "4.19.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.18.0", + "@typescript-eslint/types": "4.19.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 09146213013ffde7cedd57c365c6cfad9a863e33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Mar 2021 16:53:21 -0700 Subject: [PATCH 042/473] chore: bump eslint-plugin-jest from 24.3.1 to 24.3.2 (#3213) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.3.1 to 24.3.2. - [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.1...v24.3.2) 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 47f77143dcf6..1bc588e20bb6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3741,9 +3741,9 @@ eslint-plugin-import@^2.22.0: tsconfig-paths "^3.9.0" eslint-plugin-jest@^24.1.3: - version "24.3.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.1.tgz#c8df037847b83397940bef7fbc2cc168ab466bcc" - integrity sha512-RQt59rfMSHyvedImT72iaf8JcvCcR4P7Uq499dALtjY8mrCjbwWrFi1UceG4sid2wVIeDi+0tjxXZ8CZEVO7Zw== + 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== dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" From dbd811aa0d563f01de552b248f4c6a5b7db31268 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Mar 2021 16:53:32 -0700 Subject: [PATCH 043/473] chore: bump @types/jest from 26.0.20 to 26.0.21 (#3209) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.20 to 26.0.21. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) 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 1bc588e20bb6..3c7f3dba6973 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1895,9 +1895,9 @@ "@types/jest" "*" "@types/jest@*", "@types/jest@^26.0.20": - version "26.0.20" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.20.tgz#cd2f2702ecf69e86b586e1f5223a60e454056307" - integrity sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA== + version "26.0.21" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.21.tgz#3a73c2731e7e4f0fbaea56ce7ff8c79cf812bd24" + integrity sha512-ab9TyM/69yg7eew9eOwKMUmvIZAKEGZYlq/dhe5/0IMUd/QLJv5ldRMdddSn+u22N13FP3s5jYyktxuBwY0kDA== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" From 0339190bb89dd880c02c2a819d73177d924cc9fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Mar 2021 16:53:48 -0700 Subject: [PATCH 044/473] chore: bump cspell from 5.3.7 to 5.3.9 (#3211) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.3.7 to 5.3.9. - [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.7...v5.3.9) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 190 +++++++++++++++++++++++++++--------------------------- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3c7f3dba6973..e40dfcce2bff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -461,24 +461,24 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.3.4": - version "5.3.4" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.3.4.tgz#8fa6c783788fec59c042290b5fedce64cbca6d55" - integrity sha512-Gx3ceqTxocxhSF/jgb6GkAQMHiycO7+R9c9KXwgk+HYG7Qs6NWYc4bcChn07d19x8wuM4a++gA65FxUh7lC+Yg== - dependencies: - "@cspell/dict-ada" "^1.1.1" - "@cspell/dict-aws" "^1.0.13" - "@cspell/dict-bash" "^1.0.11" +"@cspell/cspell-bundled-dicts@^5.3.8": + version "5.3.8" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.3.8.tgz#4b29e2e081355032c02b53b2083cdb8e107219b1" + integrity sha512-cKQrpCtoiJxly8o/84BHUtEyTqY4doNLGASe2gXnoQi0Pmxrp+evtPsDxeDBqpceEsP205KuyzfeAHYYgVer1w== + dependencies: + "@cspell/dict-ada" "^1.1.2" + "@cspell/dict-aws" "^1.0.14" + "@cspell/dict-bash" "^1.0.12" "@cspell/dict-companies" "^1.0.36" - "@cspell/dict-cpp" "^1.1.37" + "@cspell/dict-cpp" "^1.1.38" "@cspell/dict-cryptocurrencies" "^1.0.10" - "@cspell/dict-csharp" "^1.0.10" - "@cspell/dict-css" "^1.0.10" - "@cspell/dict-django" "^1.0.25" - "@cspell/dict-dotnet" "^1.0.24" - "@cspell/dict-elixir" "^1.0.23" - "@cspell/dict-en-gb" "^1.1.27" - "@cspell/dict-en_us" "^1.2.39" + "@cspell/dict-csharp" "^1.0.11" + "@cspell/dict-css" "^1.0.11" + "@cspell/dict-django" "^1.0.26" + "@cspell/dict-dotnet" "^1.0.25" + "@cspell/dict-elixir" "^1.0.24" + "@cspell/dict-en-gb" "^1.1.28" + "@cspell/dict-en_us" "^1.2.40" "@cspell/dict-filetypes" "^1.1.5" "@cspell/dict-fonts" "^1.0.14" "@cspell/dict-fullstack" "^1.0.36" @@ -487,7 +487,7 @@ "@cspell/dict-html" "^1.1.6" "@cspell/dict-html-symbol-entities" "^1.0.23" "@cspell/dict-java" "^1.0.22" - "@cspell/dict-latex" "^1.0.23" + "@cspell/dict-latex" "^1.0.25" "@cspell/dict-lorem-ipsum" "^1.0.22" "@cspell/dict-lua" "^1.0.16" "@cspell/dict-node" "^1.0.10" @@ -501,75 +501,75 @@ "@cspell/dict-software-terms" "^1.0.26" "@cspell/dict-typescript" "^1.0.16" -"@cspell/cspell-types@^5.3.7": - version "5.3.7" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.3.7.tgz#778042121e2b342693c22937e23072c0382c7351" - integrity sha512-3cJcxV8rJez2MLOGuCQEdMVzXUEzH6XsUr3EzO7IDCt6fK66YGTGFuDIHVya1H3xQ+EENv/o9mZh13LNBxikVg== +"@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/dict-ada@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-ada/-/dict-ada-1.1.1.tgz#52b636f1728100a493dcc83e82035c371898f39c" - integrity sha512-/tpeKe182ymfKutyVcF3YHVNYnoZPdri3vsUU1v7iyA0WzTu9djb6B78r3QTQVCeizAruBsbSogxMPHBquF/zA== +"@cspell/dict-ada@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@cspell/dict-ada/-/dict-ada-1.1.2.tgz#89556226c1d5f856ce1f7afa85543b04fa477092" + integrity sha512-UDrcYcKIVyXDz5mInJabRNQpJoehjBFvja5W+GQyu9pGcx3BS3cAU8mWENstGR0Qc/iFTxB010qwF8F3cHA/aA== -"@cspell/dict-aws@^1.0.13": - version "1.0.13" - resolved "https://registry.yarnpkg.com/@cspell/dict-aws/-/dict-aws-1.0.13.tgz#5961c9764a2f731e488debee1c70fd488ee59727" - integrity sha512-9rq8BS5p418THq12PIkLQmGhg4kQ8tMH8vyB7gTF2lOrA+xMwV5HjZAepoYiJCxDQI5GAQJZlAaBi5DRG3AN2A== +"@cspell/dict-aws@^1.0.14": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@cspell/dict-aws/-/dict-aws-1.0.14.tgz#beddede1053ce3622400e36c65da9fd2954e939d" + integrity sha512-K21CfB4ZpKYwwDQiPfic2zJA/uxkbsd4IQGejEvDAhE3z8wBs6g6BwwqdVO767M9NgZqc021yAVpr79N5pWe3w== -"@cspell/dict-bash@^1.0.11": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-1.0.11.tgz#5ba56250e467d2c2ed3f2795081f4934af0c9afc" - integrity sha512-DTOugbPacEFIav5s+VniByouu4apD1SKS5inwiBndw0TH3Pkm4MFTPUwfT1y7Ki4HEIyfRI2ughig2045SBqRw== +"@cspell/dict-bash@^1.0.12": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-1.0.12.tgz#fdf828c520dfd274f1cee6a4a90a0f6d86a703ac" + integrity sha512-BOMHVW/m281mqUSJkZ3oiJiUUItLd7QdzpMjm428V9yBYFwIdbds1CeatS7C6kgpI2eBE4RXmy1Hjk/lR63Jew== "@cspell/dict-companies@^1.0.36": version "1.0.36" resolved "https://registry.yarnpkg.com/@cspell/dict-companies/-/dict-companies-1.0.36.tgz#c85bcc1f23ac991c56dd25eea5623078aaa513c2" integrity sha512-Bk9mMJs9spzrtLxZsxBZIK6ukD9REfQYpuTBNJk/IiTViHVQ6ertHAgw1vRVtJAMxViv8dMLNtDyTpEXeaYm7w== -"@cspell/dict-cpp@^1.1.37": - version "1.1.37" - resolved "https://registry.yarnpkg.com/@cspell/dict-cpp/-/dict-cpp-1.1.37.tgz#79b33a42ebc0d7bed19bd8d07559e95c8668a70a" - integrity sha512-1X48pxiOdAw5Q7zj0k8/L5B1YY2W0k4go4CB5rcsuGRzsWXsdnKXHQTeMTAw7epIe4lj+Ef9oWaU+ODQpDZOCQ== +"@cspell/dict-cpp@^1.1.38": + version "1.1.38" + resolved "https://registry.yarnpkg.com/@cspell/dict-cpp/-/dict-cpp-1.1.38.tgz#a5723f0827be36463894c12dcf42bd1ff1e27003" + integrity sha512-QqVMxVNYX9XtxzflpJ/888GSyjPU5VeotltsHql1BeEPxhyV27ud9bRKDrBGzCijCK/+MvCxiMZGDpYZqHTjXw== "@cspell/dict-cryptocurrencies@^1.0.10": version "1.0.10" resolved "https://registry.yarnpkg.com/@cspell/dict-cryptocurrencies/-/dict-cryptocurrencies-1.0.10.tgz#04426fdfee8752818b375686d34a154b2fb40c7d" integrity sha512-47ABvDJOkaST/rXipNMfNvneHUzASvmL6K/CbOFpYKfsd0x23Jc9k1yaOC7JAm82XSC/8a7+3Yu+Fk2jVJNnsA== -"@cspell/dict-csharp@^1.0.10": - version "1.0.10" - resolved "https://registry.yarnpkg.com/@cspell/dict-csharp/-/dict-csharp-1.0.10.tgz#3806ff6646764f720ac02a0eb65d6b97b99811fe" - integrity sha512-jAl4HeRTwbN2+tEqL8cjM7GLXSJr9Jde3k8CqfxKME7qwVRCoBW6RkhyDHfEyaQ1LomDhnr35uiHEVrw7xCHMw== +"@cspell/dict-csharp@^1.0.11": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@cspell/dict-csharp/-/dict-csharp-1.0.11.tgz#cacdf477a31ca8326c2c91bee0b42b9f6b3c4a7c" + integrity sha512-nub+ZCiTgmT87O+swI+FIAzNwaZPWUGckJU4GN402wBq420V+F4ZFqNV7dVALJrGaWH7LvADRtJxi6cZVHJKeA== -"@cspell/dict-css@^1.0.10": - version "1.0.10" - resolved "https://registry.yarnpkg.com/@cspell/dict-css/-/dict-css-1.0.10.tgz#80ef4e89ec83a8386a69d9770b76184a2c26370e" - integrity sha512-QQbh+GBAyTVU8Wlf1xZPxZQQ3uRzb1lYE5RjE7hnRTSc4HtWYcb2+6XpO51QDl/dRhCmP3vEHzFF/swzHRa5hw== +"@cspell/dict-css@^1.0.11": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@cspell/dict-css/-/dict-css-1.0.11.tgz#09119e9035137ba98c26c62402237faf3be9ac95" + integrity sha512-2Or5oF5ojaXYD8QbO4Z+QdaNXSp+ZyNLJdeyKfejbxLvpL5feSNB0oYtTNrweFPTAvJKQ4DJsdEXy0/s31haRg== + +"@cspell/dict-django@^1.0.26": + version "1.0.26" + resolved "https://registry.yarnpkg.com/@cspell/dict-django/-/dict-django-1.0.26.tgz#b97ce0112fbe8c3c3ada0387c68971b5e27483ab" + integrity sha512-mn9bd7Et1L2zuibc08GVHTiD2Go3/hdjyX5KLukXDklBkq06r+tb0OtKtf1zKodtFDTIaYekGADhNhA6AnKLkg== -"@cspell/dict-django@^1.0.25": +"@cspell/dict-dotnet@^1.0.25": version "1.0.25" - resolved "https://registry.yarnpkg.com/@cspell/dict-django/-/dict-django-1.0.25.tgz#7f821e781b2ae35bc12491a663ca506185f6d008" - integrity sha512-kQfZhvjAodb5CNgryYoEKlUaHA+IVGhZIpON5ZJBuxrPUZ4SyklACPXKxDyXnKAibrERoi4zNL6pBbsljEL03w== + resolved "https://registry.yarnpkg.com/@cspell/dict-dotnet/-/dict-dotnet-1.0.25.tgz#7e7ad82b730d4fa10af5d2383c452d69d23e2aaa" + integrity sha512-3BFhdquYqqjeI8Jm1dYepZKGEg+fKFhw7UfPkVdx13C4ETo5VlsS4FAblC0pCY21pDU3QgRZOGL1Bj+KWCGp/w== -"@cspell/dict-dotnet@^1.0.24": +"@cspell/dict-elixir@^1.0.24": version "1.0.24" - resolved "https://registry.yarnpkg.com/@cspell/dict-dotnet/-/dict-dotnet-1.0.24.tgz#432a1f3bf6920860de86a6e7101639c1b4e348be" - integrity sha512-TxmMSh2T7C+DzF0rGTwVWFGCwqiwqLpyKar37kJt62bhadbxFKv+XxkLjOLVmgoqhA17BXM813hIjjZrICj4jg== + resolved "https://registry.yarnpkg.com/@cspell/dict-elixir/-/dict-elixir-1.0.24.tgz#fc5c15b9f66b8aa5e25c98f54103c796fec70aba" + integrity sha512-pEX6GYlEx4Teusw/m+XmqoXzcHOqpcn1ZX4H33ONqR81XdPwbaKorBr1IG23Ic76IhwrFlOqs48tcnxrHYpFnA== -"@cspell/dict-elixir@^1.0.23": - version "1.0.23" - resolved "https://registry.yarnpkg.com/@cspell/dict-elixir/-/dict-elixir-1.0.23.tgz#1d341626467a2ca109b72c5368645af1f12417a4" - integrity sha512-UKDgNSZ36o31IX4NjCF/lCuOAoLEEsjSB2KwMD2ucT66MSFEPLk1womGY+iWblISeeBmB9EehfL1hjgoRwGlUw== +"@cspell/dict-en-gb@^1.1.28": + version "1.1.28" + resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.28.tgz#7abe6498aea15a87c502eefbf6f1850ccc1f54a2" + integrity sha512-noOH+iv4xFpPxu1agiQgp5LhY/KA0Ir28y1xnC2QTtLvlIid7vIvgixBOz4Zi0P7lo/mPmMjQY+x7//2EKFDgQ== -"@cspell/dict-en-gb@^1.1.27": - version "1.1.27" - resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.27.tgz#5c567fcc0f737e9ac8dc8fa76eb39928a6a2b35b" - integrity sha512-0tY939q0vzmsUotKQe/i8mDGqiiw4V3Kv/nkTvxFfVQAd6JRfpWBKlMbVV5Oy37nQkQiwkDLY4v90AbyqOvG8Q== - -"@cspell/dict-en_us@^1.2.39": - version "1.2.39" - resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.39.tgz#44e30abee9a20ec3cbddd2c91f21de7e3b4ca4ea" - integrity sha512-rMn5pIm3bl+t3Qxdf3WMkLZ2kzs/FDHSCDR9ha+JOtCJ1yrJTLdlZvokGDLwMScztbgooEvabsN8AUqPutOSog== +"@cspell/dict-en_us@^1.2.40": + version "1.2.40" + resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.40.tgz#03e7c7458f9685e09a19fc23f964a9d3dbe52ecd" + integrity sha512-e8leCvGAWPWQIw0SoozgEAiMt2YM12rafOuW4aQwgTJD++vp32a9RrnVL8olBfWaA57rRWWndbMSmPTrsO9mpg== "@cspell/dict-filetypes@^1.1.5": version "1.1.5" @@ -611,10 +611,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-java/-/dict-java-1.0.22.tgz#30e660803922755c314fb61e9c8cd58a1f4bd47e" integrity sha512-CVAJ29dx1XwwutgsMgaj5eCl1Nc7X7qFhWL2KkAdu78A/NUIaS+1I9KS0hHhdZx/wLke9dH8TR7NyPQGpGxeAw== -"@cspell/dict-latex@^1.0.23": - version "1.0.23" - resolved "https://registry.yarnpkg.com/@cspell/dict-latex/-/dict-latex-1.0.23.tgz#bb216e676c66b931bdfd1c8cb93e9625b5b66d45" - integrity sha512-xn9VvX5+q9xxELiOl5o8W/0nKympOc9i6Bq6PqX3fxhVWV4xURT18sp14OI9dNXxOSm5TRzL96vgLYvK/FYQVw== +"@cspell/dict-latex@^1.0.25": + version "1.0.25" + resolved "https://registry.yarnpkg.com/@cspell/dict-latex/-/dict-latex-1.0.25.tgz#6ecf5b8b8fdf46cb8a0f070052dd687e25089e59" + integrity sha512-cEgg91Migqcp1SdVV7dUeMxbPDhxdNo6Fgq2eygAXQjIOFK520FFvh/qxyBvW90qdZbIRoU2AJpchyHfGuwZFA== "@cspell/dict-lorem-ipsum@^1.0.22": version "1.0.22" @@ -3159,59 +3159,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.7: - version "5.3.7" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.3.7.tgz#0677b43f22c06921d24699529cfd70027b10433c" - integrity sha512-YoOiFEI0fhs2XU0F9Lrg5emKHR2tCrDabG/hVjhEDKYRSN9D7Zx+2hXKFmi0ssmW38XKIqpnmtW/dye1LHffjQ== +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== dependencies: micromatch "^4.0.2" -cspell-io@^5.3.7: - version "5.3.7" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.3.7.tgz#07ad1e719b6f4f9274535502a425ba706b91cb60" - integrity sha512-uQZed/E+mBsAxH8rW9GqYL8IqaT1Ed4FJZnK4zjIWcY3KPpNnGAywY5XtvcfQSn59WIyjhztzle06z7wGHP8Jg== +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== dependencies: iconv-lite "^0.6.2" iterable-to-stream "^1.0.1" -cspell-lib@^5.3.7: - version "5.3.7" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.3.7.tgz#ae1927b98449812cd90ada0cc18d172d86b38be6" - integrity sha512-jWHayjdQfpy4dhMAYfdyi33lW8X4ka/t7Bai9WNoRnhsNAzrAuMuo4FX6aiclGXpBLrnm2Por3foyPagcKd69Q== +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== dependencies: - "@cspell/cspell-bundled-dicts" "^5.3.4" - "@cspell/cspell-types" "^5.3.7" + "@cspell/cspell-bundled-dicts" "^5.3.8" + "@cspell/cspell-types" "^5.3.8" comment-json "^4.1.0" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-glob "^5.3.7" - cspell-io "^5.3.7" - cspell-trie-lib "^5.3.7" + cspell-glob "^5.3.8" + cspell-io "^5.3.8" + cspell-trie-lib "^5.3.8" 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.7: - version "5.3.7" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.3.7.tgz#8d13637e17e96fb5cf656baa57f67d8366830f75" - integrity sha512-gfm/EzYCgaCC8RvB1jAYxMDGqdmqupDALaEHExnOGJUe5ZUNEH8E7YWEsMemHOdjd9vgSFcGpecoFUFBfkKXXA== +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== dependencies: fs-extra "^9.1.0" gensequence "^3.1.1" cspell@^5.2.4: - version "5.3.7" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.3.7.tgz#00be25bc8bab89628021b49d1322033c4f00f720" - integrity sha512-KNs1i/4pBejBMu536atrVJFVdKg1nBF0BZy3GoVwIMCABxkx8KuGaE7uj2JUaHFjlp1s7ICw/p50eL/FL0HerA== + version "5.3.9" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.3.9.tgz#9bda30ed30611ff1a22b3435ac75f89ffcce1827" + integrity sha512-NFV7gWLIDx7RoFj1iC4sXbMVRJqWNJj0OhhTFo4nA+ktblFLeiIb1J3SnVSrtwgM3wHP3b+pkuwHSBUTK5pj6w== dependencies: - "@cspell/cspell-types" "^5.3.7" + "@cspell/cspell-types" "^5.3.8" chalk "^4.1.0" commander "^7.1.0" comment-json "^4.1.0" - cspell-glob "^5.3.7" - cspell-lib "^5.3.7" + cspell-glob "^5.3.8" + cspell-lib "^5.3.9" fs-extra "^9.1.0" get-stdin "^8.0.0" glob "^7.1.6" From ed92332e700817363a170402268f95696b37d716 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Mar 2021 16:54:10 -0700 Subject: [PATCH 045/473] chore: bump husky from 5.1.3 to 5.2.0 (#3210) Bumps [husky](https://github.com/typicode/husky) from 5.1.3 to 5.2.0. - [Release notes](https://github.com/typicode/husky/releases) - [Commits](https://github.com/typicode/husky/compare/v5.1.3...v5.2.0) 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 e40dfcce2bff..16a24ede38ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4689,9 +4689,9 @@ humanize-ms@^1.2.1: ms "^2.0.0" husky@^5.0.9: - version "5.1.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-5.1.3.tgz#1a0645a4fe3ffc006c4d0d8bd0bcb4c98787cc9d" - integrity sha512-fbNJ+Gz5wx2LIBtMweJNY1D7Uc8p1XERi5KNRMccwfQA+rXlxWNSdUxswo0gT8XqxywTIw7Ywm/F4v/O35RdMg== + version "5.2.0" + resolved "https://registry.yarnpkg.com/husky/-/husky-5.2.0.tgz#fc5e1c2300d34855d47de4753607d00943fc0802" + integrity sha512-AM8T/auHXRBxlrfPVLKP6jt49GCM2Zz47m8G3FOMsLmTv8Dj/fKVWE0Rh2d4Qrvmy131xEsdQnb3OXRib67PGg== iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" From 9d8cbce542fc4f97f1b2982eeb12be48c717fa40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Mar 2021 16:54:20 -0700 Subject: [PATCH 046/473] chore: bump @types/prettier from 2.2.2 to 2.2.3 (#3212) Bumps [@types/prettier](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/prettier) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/prettier) 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 16a24ede38ef..e448b4b66ede 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1948,9 +1948,9 @@ integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== "@types/prettier@*", "@types/prettier@^2.0.0", "@types/prettier@^2.2.1": - version "2.2.2" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.2.tgz#e2280c89ddcbeef340099d6968d8c86ba155fdf6" - integrity sha512-i99hy7Ki19EqVOl77WplDrvgNugHnsSjECVR/wUrzw2TJXz1zlUfT2ngGckR6xN7yFYaijsMAqPkOLx9HgUqHg== + version "2.2.3" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.3.tgz#ef65165aea2924c9359205bf748865b8881753c0" + integrity sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA== "@types/rimraf@^3.0.0": version "3.0.0" From a4e2e99ece27bcece2069eccbd1f3cf341984ed6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Mar 2021 18:27:31 -0700 Subject: [PATCH 047/473] chore: bump @types/node from 14.14.34 to 14.14.35 (#3214) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.34 to 14.14.35. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) 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 e448b4b66ede..64f2ed5da7f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1933,9 +1933,9 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node@*", "@types/node@>= 8", "@types/node@^14.14.27": - version "14.14.34" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.34.tgz#07935194fc049069a1c56c0c274265abeddf88da" - integrity sha512-dBPaxocOK6UVyvhbnpFIj2W+S+1cBTkHQbFQfeeJhoKFbzYcVUGHvddeWPSucKATb3F0+pgDq0i6ghEaZjsugA== + version "14.14.35" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.35.tgz#42c953a4e2b18ab931f72477e7012172f4ffa313" + integrity sha512-Lt+wj8NVPx0zUmUwumiVXapmaLUcAk3yPuHCFVXras9k5VT9TdhJqKqGVUQCD60OTMCl0qxJ57OiTL0Mic3Iag== "@types/normalize-package-data@^2.4.0": version "2.4.0" From 1f53e69fd2433e953588b0bcabab01e40f0a0485 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Mar 2021 18:27:42 -0700 Subject: [PATCH 048/473] chore: bump globby from 11.0.2 to 11.0.3 (#3215) Bumps [globby](https://github.com/sindresorhus/globby) from 11.0.2 to 11.0.3. - [Release notes](https://github.com/sindresorhus/globby/releases) - [Commits](https://github.com/sindresorhus/globby/compare/v11.0.2...v11.0.3) 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 64f2ed5da7f0..a6db17808f20 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4494,9 +4494,9 @@ globals@^12.1.0: type-fest "^0.8.1" globby@^11.0.1: - version "11.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83" - integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== + version "11.0.3" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" + integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" From 8e78209b3da07d2149a79a75fb9b0bee5dfb6caa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Mar 2021 18:27:55 -0700 Subject: [PATCH 049/473] chore: bump @babel/parser from 7.13.11 to 7.13.12 (#3216) Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.13.11 to 7.13.12. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.13.12/packages/babel-parser) 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 a6db17808f20..cb477d3944f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -172,9 +172,9 @@ js-tokens "^4.0.0" "@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.10", "@babel/parser@^7.13.11": - version "7.13.11" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.11.tgz#f93ebfc99d21c1772afbbaa153f47e7ce2f50b88" - integrity sha512-PhuoqeHoO9fc4ffMEVk4qb/w/s2iOSWohvbHxLtxui0eBg3Lg5gN1U8wp1V1u61hOWkPQJJyJzGH6Y+grwkq8Q== + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.12.tgz#ba320059420774394d3b0c0233ba40e4250b81d1" + integrity sha512-4T7Pb244rxH24yR116LAuJ+adxXXnHhZaLJjegJVKSdoNCe4x1eDBaud5YIcQFcqzsaD5BHvJw5BQ0AZapdCRw== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" From a61c3c91291d5942c2b692914e74d0ef8fc35a44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Mar 2021 18:28:12 -0700 Subject: [PATCH 050/473] chore: bump ts-jest from 26.5.3 to 26.5.4 (#3217) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.3 to 26.5.4. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.5.3...v26.5.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 cb477d3944f7..0d3051ff49f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8522,9 +8522,9 @@ trim-off-newlines@^1.0.0: integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= ts-jest@^26.5.1: - version "26.5.3" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.3.tgz#a6ee00ba547be3b09877550df40a1465d0295554" - integrity sha512-nBiiFGNvtujdLryU7MiMQh1iPmnZ/QvOskBbD2kURiI1MwqvxlxNnaAB/z9TbslMqCsSbu5BXvSSQPc5tvHGeA== + version "26.5.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.4.tgz#207f4c114812a9c6d5746dd4d1cdf899eafc9686" + integrity sha512-I5Qsddo+VTm94SukBJ4cPimOoFZsYTeElR2xy6H2TOVs+NsvgYglW8KuQgKoApOKuaU/Ix/vrF9ebFZlb5D2Pg== dependencies: bs-logger "0.x" buffer-from "1.x" From d0d71862efd7e079694fa9513ea983cc908ec6f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Mar 2021 18:28:22 -0700 Subject: [PATCH 051/473] chore: bump @babel/types from 7.13.0 to 7.13.12 (#3218) Bumps [@babel/types](https://github.com/babel/babel/tree/HEAD/packages/babel-types) from 7.13.0 to 7.13.12. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.13.12/packages/babel-types) 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 0d3051ff49f5..95ea43fd35cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -292,9 +292,9 @@ lodash "^4.17.19" "@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.0.tgz#74424d2816f0171b4100f0ab34e9a374efdf7f80" - integrity sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA== + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.12.tgz#edbf99208ef48852acdff1c8a681a1e4ade580cd" + integrity sha512-K4nY2xFN4QMvQwkQ+zmBDp6ANMbVNw6BbxWmYA4qNjhR9W+Lj/8ky5MEY2Me5r+B2c6/v6F53oMndG+f9s3IiA== dependencies: "@babel/helper-validator-identifier" "^7.12.11" lodash "^4.17.19" From eda91576069c12d4de2da6d12998d5c3f5396114 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Mon, 29 Mar 2021 09:51:25 +1300 Subject: [PATCH 052/473] docs(eslint-plugin): [unbound-method] reference eslint-plugin-jests extension rule (#3232) Relates to #2951 --- packages/eslint-plugin/docs/rules/unbound-method.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/eslint-plugin/docs/rules/unbound-method.md b/packages/eslint-plugin/docs/rules/unbound-method.md index 15063dbb4f3b..538edaf95631 100644 --- a/packages/eslint-plugin/docs/rules/unbound-method.md +++ b/packages/eslint-plugin/docs/rules/unbound-method.md @@ -6,6 +6,8 @@ Class functions don't preserve the class scope when passed as standalone variabl If your function does not access `this`, [you can annotate it with `this: void`](https://www.typescriptlang.org/docs/handbook/2/functions.html#declaring-this-in-a-function), or consider using an arrow function instead. +If you're working with `jest`, you can use [`eslint-plugin-jest`'s version of this rule](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md) to lint your test files, which knows when it's ok to pass an unbound method to `expect` calls. + ## Rule Details Examples of **incorrect** code for this rule @@ -105,6 +107,8 @@ log(); If your code intentionally waits to bind methods after use, such as by passing a `scope: this` along with the method, you can disable this rule. +If you're wanting to use `toBeCalled` and similar matches in `jest` tests, you can disable this rule for your test files in favor of [`eslint-plugin-jest`'s version of this rule](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md). + ## Related To - TSLint: [no-unbound-method](https://palantir.github.io/tslint/rules/no-unbound-method/) From 40bdb0b27b21de511f0ecd151cb8282a625ca6e1 Mon Sep 17 00:00:00 2001 From: Stefan Knutas Date: Sun, 28 Mar 2021 23:11:42 +0200 Subject: [PATCH 053/473] feat(eslint-plugin): [type-annotation-spacing] handle space between ? and : (#3138) * fix(eslint-plugin): [type-annotation-spacing] handle space after ? * fix: skip before flag and add test for interface * fix: add new message * fix: use isSpaceBetweenTokens to support older ESLint --- .../src/rules/type-annotation-spacing.ts | 24 ++++- .../rules/type-annotation-spacing.test.ts | 100 ++++++++++++++++++ 2 files changed, 123 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/src/rules/type-annotation-spacing.ts b/packages/eslint-plugin/src/rules/type-annotation-spacing.ts index 985e008c16d2..0cf3e34b8b88 100644 --- a/packages/eslint-plugin/src/rules/type-annotation-spacing.ts +++ b/packages/eslint-plugin/src/rules/type-annotation-spacing.ts @@ -35,7 +35,8 @@ type MessageIds = | 'expectedSpaceAfter' | 'expectedSpaceBefore' | 'unexpectedSpaceAfter' - | 'unexpectedSpaceBefore'; + | 'unexpectedSpaceBefore' + | 'unexpectedSpaceBetween'; const definition = { type: 'object', @@ -122,6 +123,8 @@ export default util.createRule({ expectedSpaceBefore: "Expected a space before the '{{type}}'.", unexpectedSpaceAfter: "Unexpected space after the '{{type}}'.", unexpectedSpaceBefore: "Unexpected space before the '{{type}}'.", + unexpectedSpaceBetween: + "Unexpected space between the '{{previousToken}}' and the '{{type}}'.", }, schema: [ { @@ -177,6 +180,25 @@ export default util.createRule({ const { before, after } = getRules(ruleSet, typeAnnotation); if (type === ':' && previousToken.value === '?') { + if ( + sourceCode.isSpaceBetweenTokens(previousToken, punctuatorTokenStart) + ) { + context.report({ + node: punctuatorTokenStart, + messageId: 'unexpectedSpaceBetween', + data: { + type, + previousToken: previousToken.value, + }, + fix(fixer) { + return fixer.removeRange([ + previousToken.range[1], + punctuatorTokenStart.range[0], + ]); + }, + }); + } + // shift the start to the ? type = '?:'; punctuatorTokenStart = previousToken; diff --git a/packages/eslint-plugin/tests/rules/type-annotation-spacing.test.ts b/packages/eslint-plugin/tests/rules/type-annotation-spacing.test.ts index de714cff43f4..19349a808898 100644 --- a/packages/eslint-plugin/tests/rules/type-annotation-spacing.test.ts +++ b/packages/eslint-plugin/tests/rules/type-annotation-spacing.test.ts @@ -4593,6 +4593,54 @@ type Bar = Record }, ], }, + { + code: 'function foo(a? : string) {}', + output: 'function foo(a?: string) {}', + errors: [ + { + messageId: 'unexpectedSpaceBetween', + data: { type: ':', previousToken: '?' }, + line: 1, + column: 17, + }, + ], + }, + { + code: 'function foo(a ? : string) {}', + output: 'function foo(a?: string) {}', + errors: [ + { + messageId: 'unexpectedSpaceBefore', + data: { type: '?:' }, + line: 1, + column: 16, + }, + { + messageId: 'unexpectedSpaceBetween', + data: { type: ':', previousToken: '?' }, + line: 1, + column: 18, + }, + ], + }, + { + code: 'function foo(a ? : string) {}', + output: 'function foo(a?: string) {}', + errors: [ + { + messageId: 'unexpectedSpaceBefore', + data: { type: '?:' }, + line: 1, + column: 16, + }, + { + messageId: 'unexpectedSpaceBetween', + data: { type: ':', previousToken: '?' }, + line: 1, + column: 19, + }, + ], + }, { code: ` class Foo { @@ -4635,6 +4683,32 @@ class Foo { }, { code: ` +class Foo { + constructor(message ? : string); +} + `, + output: ` +class Foo { + constructor(message?: string); +} + `, + errors: [ + { + messageId: 'unexpectedSpaceBefore', + data: { type: '?:' }, + line: 3, + column: 25, + }, + { + messageId: 'unexpectedSpaceBetween', + data: { type: ':', previousToken: '?' }, + line: 3, + column: 27, + }, + ], + }, + { + code: ` class Foo { greet(name ?: string) : string { return name; } } @@ -4681,6 +4755,32 @@ interface Foo { }, { code: ` +interface Foo { + name ? : string; +} + `, + output: ` +interface Foo { + name?: string; +} + `, + errors: [ + { + messageId: 'unexpectedSpaceBefore', + data: { type: '?:' }, + line: 3, + column: 10, + }, + { + messageId: 'unexpectedSpaceBetween', + data: { type: ':', previousToken: '?' }, + line: 3, + column: 12, + }, + ], + }, + { + code: ` interface Foo { greet(name ?: string) : string; } From 5414bf27a81311099d001808475d9cf832ce3bfe Mon Sep 17 00:00:00 2001 From: Domas Trijonis Date: Sun, 28 Mar 2021 23:18:44 +0200 Subject: [PATCH 054/473] feat(eslint-plugin): [space-infix-ops] support for class properties and type aliases (#3231) --- .../src/rules/space-infix-ops.ts | 72 +++++++++++--- .../tests/rules/space-infix-ops.test.ts | 94 +++++++++++++++++++ 2 files changed, 151 insertions(+), 15 deletions(-) diff --git a/packages/eslint-plugin/src/rules/space-infix-ops.ts b/packages/eslint-plugin/src/rules/space-infix-ops.ts index 57c56ad0b476..e81d8ef25bb7 100644 --- a/packages/eslint-plugin/src/rules/space-infix-ops.ts +++ b/packages/eslint-plugin/src/rules/space-infix-ops.ts @@ -34,20 +34,11 @@ export default util.createRule({ const rules = baseRule.create(context); const sourceCode = context.getSourceCode(); - /** - * Check if it has an assignment char and report if it's faulty - * @param node The node to report - */ - function checkForAssignmentSpace(node: TSESTree.TSEnumMember): void { - if (!node.initializer) { - return; - } - - const leftNode = sourceCode.getTokenByRangeStart(node.id.range[0])!; - const rightNode = sourceCode.getTokenByRangeStart( - node.initializer.range[0], - )!; - + function checkAndReportAssignmentSpace( + node: TSESTree.Node, + leftNode: TSESTree.Token, + rightNode?: TSESTree.Token | null, + ): void { if (!rightNode) { return; } @@ -94,9 +85,60 @@ export default util.createRule({ } } + /** + * Check if it has an assignment char and report if it's faulty + * @param node The node to report + */ + function checkForEnumAssignmentSpace(node: TSESTree.TSEnumMember): void { + if (!node.initializer) { + return; + } + + const leftNode = sourceCode.getTokenByRangeStart(node.id.range[0])!; + const rightNode = sourceCode.getTokenByRangeStart( + node.initializer.range[0], + )!; + + checkAndReportAssignmentSpace(node, leftNode, rightNode); + } + + /** + * Check if it has an assignment char and report if it's faulty + * @param node The node to report + */ + function checkForClassPropertyAssignmentSpace( + node: TSESTree.ClassProperty, + ): void { + const leftNode = sourceCode.getTokenByRangeStart( + node.typeAnnotation?.range[0] ?? node.range[0], + )!; + const rightNode = node.value + ? sourceCode.getTokenByRangeStart(node.value.range[0]) + : undefined; + + checkAndReportAssignmentSpace(node, leftNode, rightNode); + } + + /** + * Check if it has an assignment char and report if it's faulty + * @param node The node to report + */ + function checkForTypeAliasAssignmentSpace( + node: TSESTree.TSTypeAliasDeclaration, + ): void { + const leftNode = sourceCode.getTokenByRangeStart(node.id.range[0])!; + const rightNode = sourceCode.getTokenByRangeStart( + node.typeAnnotation.range[0], + ); + + checkAndReportAssignmentSpace(node, leftNode, rightNode); + } + return { ...rules, - TSEnumMember: checkForAssignmentSpace, + TSEnumMember: checkForEnumAssignmentSpace, + ClassProperty: checkForClassPropertyAssignmentSpace, + TSTypeAliasDeclaration: checkForTypeAliasAssignmentSpace, }; }, }); diff --git a/packages/eslint-plugin/tests/rules/space-infix-ops.test.ts b/packages/eslint-plugin/tests/rules/space-infix-ops.test.ts index 0c90443ca4fc..6beb4ae06fac 100644 --- a/packages/eslint-plugin/tests/rules/space-infix-ops.test.ts +++ b/packages/eslint-plugin/tests/rules/space-infix-ops.test.ts @@ -33,6 +33,32 @@ ruleTester.run('space-infix-ops', rule, { } `, }, + { + code: ` + class Test { + public readonly value?: number; + } + `, + }, + { + code: ` + class Test { + public readonly value = 1; + } + `, + }, + { + code: ` + class Test { + private value:number = 1; + } + `, + }, + { + code: ` + type Test = string | boolean; + `, + }, ], invalid: [ { @@ -98,5 +124,73 @@ ruleTester.run('space-infix-ops', rule, { }, ], }, + { + code: ` + class Test { + public readonly value= 2; + } + `, + output: ` + class Test { + public readonly value = 2; + } + `, + errors: [ + { + messageId: 'missingSpace', + column: 32, + line: 3, + }, + ], + }, + { + code: ` + class Test { + public readonly value =2; + } + `, + output: ` + class Test { + public readonly value = 2; + } + `, + errors: [ + { + messageId: 'missingSpace', + column: 33, + line: 3, + }, + ], + }, + { + code: ` + type Test= string | number; + `, + output: ` + type Test = string | number; + `, + errors: [ + { + messageId: 'missingSpace', + column: 18, + line: 2, + }, + ], + }, + { + code: ` + type Test =string | number; + `, + output: ` + type Test = string | number; + `, + errors: [ + { + messageId: 'missingSpace', + column: 19, + line: 2, + }, + ], + }, ], }); From c16b42969e286d01e3feb4546655a3784439bfe1 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 29 Mar 2021 17:02:24 +0000 Subject: [PATCH 055/473] chore: publish v4.20.0 --- CHANGELOG.md | 12 ++++++++++++ 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 | 12 ++++++++++++ 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, 126 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0de3cfd54a34..44ebffbf4121 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) + + +### Features + +* **eslint-plugin:** [space-infix-ops] support for class properties and type aliases ([#3231](https://github.com/typescript-eslint/typescript-eslint/issues/3231)) ([5414bf2](https://github.com/typescript-eslint/typescript-eslint/commit/5414bf27a81311099d001808475d9cf832ce3bfe)) +* **eslint-plugin:** [type-annotation-spacing] handle space between ? and : ([#3138](https://github.com/typescript-eslint/typescript-eslint/issues/3138)) ([40bdb0b](https://github.com/typescript-eslint/typescript-eslint/commit/40bdb0b27b21de511f0ecd151cb8282a625ca6e1)) + + + + + # [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) diff --git a/lerna.json b/lerna.json index c7fb57b16818..648c75338267 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.19.0", + "version": "4.20.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 7861946d900b..407982ce241f 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.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) **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 f229f2dcac3d..5334a903a35d 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.19.0", + "version": "4.20.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.19.0", + "@typescript-eslint/experimental-utils": "4.20.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index cd88303c8f7d..8a77d768c3a7 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.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) **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 49658a2247d7..4135e7270ea4 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.19.0", + "version": "4.20.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.19.0", + "@typescript-eslint/experimental-utils": "4.20.0", "lodash": "^4.17.15" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.19.0" + "@typescript-eslint/parser": "4.20.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index b4dd710df609..f9d70654c1f3 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) + + +### Features + +* **eslint-plugin:** [space-infix-ops] support for class properties and type aliases ([#3231](https://github.com/typescript-eslint/typescript-eslint/issues/3231)) ([5414bf2](https://github.com/typescript-eslint/typescript-eslint/commit/5414bf27a81311099d001808475d9cf832ce3bfe)) +* **eslint-plugin:** [type-annotation-spacing] handle space between ? and : ([#3138](https://github.com/typescript-eslint/typescript-eslint/issues/3138)) ([40bdb0b](https://github.com/typescript-eslint/typescript-eslint/commit/40bdb0b27b21de511f0ecd151cb8282a625ca6e1)) + + + + + # [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 7783332ecaaa..2200afd28023 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.19.0", + "version": "4.20.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.19.0", - "@typescript-eslint/scope-manager": "4.19.0", + "@typescript-eslint/experimental-utils": "4.20.0", + "@typescript-eslint/scope-manager": "4.20.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 8fbedca81985..3eb627a542f8 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.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + # [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) **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 033793fe03b1..5dc92e6d4ed9 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.19.0", + "version": "4.20.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.19.0", - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/typescript-estree": "4.19.0", + "@typescript-eslint/scope-manager": "4.20.0", + "@typescript-eslint/types": "4.20.0", + "@typescript-eslint/typescript-estree": "4.20.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index f241bd08fbaf..ae507c9c8990 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.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 9cc7802caefa..892d0c5ebc2c 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.19.0", + "version": "4.20.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.19.0", - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/typescript-estree": "4.19.0", + "@typescript-eslint/scope-manager": "4.20.0", + "@typescript-eslint/types": "4.20.0", + "@typescript-eslint/typescript-estree": "4.20.0", "debug": "^4.1.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.19.0", + "@typescript-eslint/experimental-utils": "4.20.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 88c0cf7a037b..44f0ff59bf2e 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.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) **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 dcfa875412e8..1c5756b2cf32 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.19.0", + "version": "4.20.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/visitor-keys": "4.19.0" + "@typescript-eslint/types": "4.20.0", + "@typescript-eslint/visitor-keys": "4.20.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.19.0", + "@typescript-eslint/typescript-estree": "4.20.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 1eb1200c709e..d45ba39253b5 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.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) diff --git a/packages/shared-fixtures/package.json b/packages/shared-fixtures/package.json index 54046c06a67a..5e5691bc45ed 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.19.0", + "version": "4.20.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index c647367cf3e0..8e7dc1f4a42c 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.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) diff --git a/packages/types/package.json b/packages/types/package.json index c24cc541bc59..95e52db60ebd 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.19.0", + "version": "4.20.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 cabba9f41bfb..5e6000eecf07 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.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + # [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index a174adf4d8c1..18addb958652 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.19.0", + "version": "4.20.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.19.0", - "@typescript-eslint/visitor-keys": "4.19.0", + "@typescript-eslint/types": "4.20.0", + "@typescript-eslint/visitor-keys": "4.20.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.19.0", + "@typescript-eslint/shared-fixtures": "4.20.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 5756220219ff..1b475f652f87 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.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.19.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.18.0...v4.19.0) (2021-03-22) **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 a1dde093e65c..e59866242d4a 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.19.0", + "version": "4.20.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.19.0", + "@typescript-eslint/types": "4.20.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 90fe78eb7593b60efde25c77319b5546ce80df58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Mar 2021 12:00:40 -0700 Subject: [PATCH 056/473] chore: bump @babel/types from 7.13.12 to 7.13.14 (#3246) Bumps [@babel/types](https://github.com/babel/babel/tree/HEAD/packages/babel-types) from 7.13.12 to 7.13.14. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.13.14/packages/babel-types) 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 95ea43fd35cb..faa7f78b2d14 100644 --- a/yarn.lock +++ b/yarn.lock @@ -292,9 +292,9 @@ lodash "^4.17.19" "@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.13.12" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.12.tgz#edbf99208ef48852acdff1c8a681a1e4ade580cd" - integrity sha512-K4nY2xFN4QMvQwkQ+zmBDp6ANMbVNw6BbxWmYA4qNjhR9W+Lj/8ky5MEY2Me5r+B2c6/v6F53oMndG+f9s3IiA== + version "7.13.14" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.14.tgz#c35a4abb15c7cd45a2746d78ab328e362cbace0d" + integrity sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ== dependencies: "@babel/helper-validator-identifier" "^7.12.11" lodash "^4.17.19" From b2ab1408120df0b73f2b94fafdd656e4444aad7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Mar 2021 12:00:53 -0700 Subject: [PATCH 057/473] chore: bump semver from 7.3.4 to 7.3.5 (#3238) Bumps [semver](https://github.com/npm/node-semver) from 7.3.4 to 7.3.5. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/master/CHANGELOG.md) - [Commits](https://github.com/npm/node-semver/compare/v7.3.4...v7.3.5) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index faa7f78b2d14..7dc4aa20339c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7776,13 +7776,20 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.3.4, semver@7.x, semver@^7.2.1, semver@^7.3.2: +semver@7.3.4: version "7.3.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== dependencies: lru-cache "^6.0.0" +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== + dependencies: + lru-cache "^6.0.0" + semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" From ad797c52a6222ed51ca960ab21abebdd6ad1c11b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Mar 2021 12:01:11 -0700 Subject: [PATCH 058/473] chore: bump @babel/parser from 7.13.12 to 7.13.13 (#3237) Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.13.12 to 7.13.13. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.13.13/packages/babel-parser) 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 7dc4aa20339c..1e417e260b51 100644 --- a/yarn.lock +++ b/yarn.lock @@ -172,9 +172,9 @@ js-tokens "^4.0.0" "@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.10", "@babel/parser@^7.13.11": - version "7.13.12" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.12.tgz#ba320059420774394d3b0c0233ba40e4250b81d1" - integrity sha512-4T7Pb244rxH24yR116LAuJ+adxXXnHhZaLJjegJVKSdoNCe4x1eDBaud5YIcQFcqzsaD5BHvJw5BQ0AZapdCRw== + version "7.13.13" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.13.tgz#42f03862f4aed50461e543270916b47dd501f0df" + integrity sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" From 92a0e11c7850498b99d4ac1474eb78e06ae1f149 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Mar 2021 12:02:17 -0700 Subject: [PATCH 059/473] chore: bump @types/node from 14.14.35 to 14.14.37 (#3239) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.35 to 14.14.37. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) 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 1e417e260b51..f47a820ae84a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1933,9 +1933,9 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node@*", "@types/node@>= 8", "@types/node@^14.14.27": - version "14.14.35" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.35.tgz#42c953a4e2b18ab931f72477e7012172f4ffa313" - integrity sha512-Lt+wj8NVPx0zUmUwumiVXapmaLUcAk3yPuHCFVXras9k5VT9TdhJqKqGVUQCD60OTMCl0qxJ57OiTL0Mic3Iag== + version "14.14.37" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.37.tgz#a3dd8da4eb84a996c36e331df98d82abd76b516e" + integrity sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw== "@types/normalize-package-data@^2.4.0": version "2.4.0" From 1b41d60e7e9c44f929e012761155abf3d39b2cea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Mar 2021 12:02:28 -0700 Subject: [PATCH 060/473] chore: bump @types/jest from 26.0.21 to 26.0.22 (#3240) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.21 to 26.0.22. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) 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 f47a820ae84a..4d04b9fd9e93 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1895,9 +1895,9 @@ "@types/jest" "*" "@types/jest@*", "@types/jest@^26.0.20": - version "26.0.21" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.21.tgz#3a73c2731e7e4f0fbaea56ce7ff8c79cf812bd24" - integrity sha512-ab9TyM/69yg7eew9eOwKMUmvIZAKEGZYlq/dhe5/0IMUd/QLJv5ldRMdddSn+u22N13FP3s5jYyktxuBwY0kDA== + version "26.0.22" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.22.tgz#8308a1debdf1b807aa47be2838acdcd91e88fbe6" + integrity sha512-eeWwWjlqxvBxc4oQdkueW5OF/gtfSceKk4OnOAGlUSwS/liBRtZppbJuz1YkgbrbfGOoeBHun9fOvXnjNwrSOw== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" From 265a039c7e728b719143e09ee61066039d721f62 Mon Sep 17 00:00:00 2001 From: YeonJuan Date: Tue, 30 Mar 2021 04:37:15 +0900 Subject: [PATCH 061/473] fix(eslint-plugin): [no-unnecessary-type-assertion] correct bad fix for angle bracket assertion (#3244) --- .../rules/no-unnecessary-type-assertion.ts | 24 ++++++++++++------- .../no-unnecessary-type-assertion.test.ts | 16 +++++++++++++ 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts index 5ae12f5a33d6..d051179eee3c 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts @@ -258,15 +258,21 @@ export default util.createRule({ node, messageId: 'unnecessaryAssertion', fix(fixer) { - return originalNode.kind === ts.SyntaxKind.TypeAssertionExpression - ? fixer.removeRange([ - node.range[0], - node.expression.range[0] - 1, - ]) - : fixer.removeRange([ - node.expression.range[1] + 1, - node.range[1], - ]); + if (originalNode.kind === ts.SyntaxKind.TypeAssertionExpression) { + const closingAngleBracket = sourceCode.getTokenAfter( + node.typeAnnotation, + ); + return closingAngleBracket?.value === '>' + ? fixer.removeRange([ + node.range[0], + closingAngleBracket.range[1], + ]) + : null; + } + return fixer.removeRange([ + node.expression.range[1] + 1, + node.range[1], + ]); }, }); } diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts index 65d0874dd3af..6d3563a0ccdd 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts @@ -358,6 +358,22 @@ function foo(bar: T) { }, { code: ` +declare const foo: Foo; +const bar = foo; + `, + output: ` +declare const foo: Foo; +const bar = foo; + `, + errors: [ + { + messageId: 'unnecessaryAssertion', + line: 3, + }, + ], + }, + { + code: ` declare function nonNull(s: string | null); let s: string | null = null; nonNull(s!); From 329ef023090c004694b5996ddb04fdde5b05ebb0 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 29 Mar 2021 15:38:30 -0400 Subject: [PATCH 062/473] fix(eslint-plugin): [no-type-alias] consider `keyof` as an alias (#3242) --- packages/eslint-plugin/src/rules/no-type-alias.ts | 7 ++++--- packages/eslint-plugin/tests/rules/no-type-alias.test.ts | 7 +++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-type-alias.ts b/packages/eslint-plugin/src/rules/no-type-alias.ts index c53b7d1ee68c..9b80efdd9d64 100644 --- a/packages/eslint-plugin/src/rules/no-type-alias.ts +++ b/packages/eslint-plugin/src/rules/no-type-alias.ts @@ -264,9 +264,10 @@ export default util.createRule({ type.node.type.endsWith('Keyword') || aliasTypes.has(type.node.type) || (type.node.type === AST_NODE_TYPES.TSTypeOperator && - type.node.operator === 'readonly' && - type.node.typeAnnotation && - aliasTypes.has(type.node.typeAnnotation.type)) + (type.node.operator === 'keyof' || + (type.node.operator === 'readonly' && + type.node.typeAnnotation && + aliasTypes.has(type.node.typeAnnotation.type)))) ) { // alias / keyword checkAndReport(allowAliases!, isTopLevel, type, 'Aliases'); diff --git a/packages/eslint-plugin/tests/rules/no-type-alias.test.ts b/packages/eslint-plugin/tests/rules/no-type-alias.test.ts index e06233aeb466..b48acae7e17f 100644 --- a/packages/eslint-plugin/tests/rules/no-type-alias.test.ts +++ b/packages/eslint-plugin/tests/rules/no-type-alias.test.ts @@ -394,6 +394,13 @@ export type ClassValue = code: 'type Foo = typeof bar;', options: [{ allowAliases: 'always' }], }, + { + code: ` +const WithAKey = { AKey: true }; +type KeyNames = keyof typeof SCALARS; + `, + options: [{ allowAliases: 'always' }], + }, { code: 'type Foo = typeof bar | typeof baz;', options: [{ allowAliases: 'in-unions' }], From 62dfcc63f3b6637b0105e2b1551333d7e5d3a215 Mon Sep 17 00:00:00 2001 From: Vitaliy Ryaboy Date: Mon, 29 Mar 2021 21:39:17 +0200 Subject: [PATCH 063/473] docs(eslint-plugin): [typedef] fix typo (#3243) --- packages/eslint-plugin/docs/rules/typedef.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/typedef.md b/packages/eslint-plugin/docs/rules/typedef.md index 6c96fa0317da..03409e110bf8 100644 --- a/packages/eslint-plugin/docs/rules/typedef.md +++ b/packages/eslint-plugin/docs/rules/typedef.md @@ -114,7 +114,7 @@ const mapper = { Examples of **correct** code with `{ "arrowParameter": true }`: ```ts -const logsSize = (size: number) => console.log(text); +const logsSize = (size: number) => console.log(size); ['hello', 'world'].map((text: string) => text.length); From b1aa7dc6971ee8409b729dffb8b69478455734ed Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Fri, 2 Apr 2021 13:19:45 -0700 Subject: [PATCH 064/473] feat(eslint-plugin): [no-unsafe-argument] add rule (#3256) Fixes #791 --- packages/eslint-plugin/README.md | 1 + .../docs/rules/no-unsafe-argument.md | 69 +++++ .../docs/rules/no-unsafe-return.md | 2 +- packages/eslint-plugin/src/configs/all.ts | 1 + packages/eslint-plugin/src/rules/index.ts | 2 + .../src/rules/no-unsafe-argument.ts | 220 ++++++++++++++ .../tests/rules/no-unsafe-argument.test.ts | 268 ++++++++++++++++++ 7 files changed, 562 insertions(+), 1 deletion(-) create mode 100644 packages/eslint-plugin/docs/rules/no-unsafe-argument.md create mode 100644 packages/eslint-plugin/src/rules/no-unsafe-argument.ts create mode 100644 packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 69ea06c23082..32b0cbb72316 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -143,6 +143,7 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@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-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: | diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-argument.md b/packages/eslint-plugin/docs/rules/no-unsafe-argument.md new file mode 100644 index 000000000000..d8e3456d18a8 --- /dev/null +++ b/packages/eslint-plugin/docs/rules/no-unsafe-argument.md @@ -0,0 +1,69 @@ +# Disallows calling an function with an any type value (`no-unsafe-argument`) + +Despite your best intentions, the `any` type can sometimes leak into your codebase. +Call a function with `any` typed argument are not checked at all by TypeScript, so it creates a potential safety hole, and source of bugs in your codebase. + +## Rule Details + +This rule disallows calling a function with `any` in its arguments, and it will disallow spreading `any[]`. +This rule also disallows spreading a tuple type with one of its elements typed as `any`. +This rule also compares the argument's type to the variable's type to ensure you don't pass an unsafe `any` in a generic position to a receiver that's expecting a specific type. For example, it will error if you assign `Set` to an argument declared as `Set`. + +Examples of **incorrect** code for this rule: + +```ts +declare function foo(arg1: string, arg2: number, arg2: string): void; + +const anyTyped = 1 as any; + +foo(...anyTyped); +foo(anyTyped, 1, 'a'); + +const anyArray: any[] = []; +foo(...anyArray); + +const tuple1 = ['a', anyTyped, 'b'] as const; +foo(...tuple1); + +const tuple2 = [1] as const; +foo('a', ...tuple, anyTyped); + +declare function bar(arg1: string, arg2: number, ...rest: string[]): void; +const x = [1, 2] as [number, ...number[]]; +foo('a', ...x, anyTyped); + +declare function baz(arg1: Set, arg2: Map): void; +foo(new Set(), new Map()); +``` + +Examples of **correct** code for this rule: + +```ts +declare function foo(arg1: string, arg2: number, arg2: string): void; + +foo('a', 1, 'b'); + +const tuple1 = ['a', 1, 'b'] as const; +foo(...tuple1); + +declare function bar(arg1: string, arg2: number, ...rest: string[]): void; +const array: string[] = ['a']; +bar('a', 1, ...array); + +declare function baz(arg1: Set, arg2: Map): void; +foo(new Set(), new Map()); +``` + +There are cases where the rule allows passing an argument of `any` to `unknown`. + +Example of `any` to `unknown` assignment that are allowed. + +```ts +declare function foo(arg1: unknown, arg2: Set, arg3: unknown[]): void; +foo(1 as any, new Set(), [] as any[]); +``` + +## Related to + +- [`no-explicit-any`](./no-explicit-any.md) +- TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/) diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-return.md b/packages/eslint-plugin/docs/rules/no-unsafe-return.md index 9810be3cf16f..225593eb02df 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-return.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-return.md @@ -1,7 +1,7 @@ # Disallows returning any from a function (`no-unsafe-return`) Despite your best intentions, the `any` type can sometimes leak into your codebase. -Returned `any` typed values not checked at all by TypeScript, so it creates a potential safety hole, and source of bugs in your codebase. +Returned `any` typed values are not checked at all by TypeScript, so it creates a potential safety hole, and source of bugs in your codebase. ## Rule Details diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index 98afc4ae3a45..b21d14efc9f0 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -99,6 +99,7 @@ export = { '@typescript-eslint/no-unnecessary-type-arguments': 'error', '@typescript-eslint/no-unnecessary-type-assertion': 'error', '@typescript-eslint/no-unnecessary-type-constraint': 'error', + '@typescript-eslint/no-unsafe-argument': 'error', '@typescript-eslint/no-unsafe-assignment': 'error', '@typescript-eslint/no-unsafe-call': 'error', '@typescript-eslint/no-unsafe-member-access': 'error', diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index ffa70e57a290..be78db26f806 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -68,6 +68,7 @@ import noUnnecessaryQualifier from './no-unnecessary-qualifier'; import noUnnecessaryTypeArguments from './no-unnecessary-type-arguments'; import noUnnecessaryTypeAssertion from './no-unnecessary-type-assertion'; import noUnnecessaryTypeConstraint from './no-unnecessary-type-constraint'; +import noUnsafeArgument from './no-unsafe-argument'; import noUnsafeAssignment from './no-unsafe-assignment'; import noUnsafeCall from './no-unsafe-call'; import noUnsafeMemberAccess from './no-unsafe-member-access'; @@ -185,6 +186,7 @@ export default { 'no-unnecessary-type-arguments': noUnnecessaryTypeArguments, 'no-unnecessary-type-assertion': noUnnecessaryTypeAssertion, 'no-unnecessary-type-constraint': noUnnecessaryTypeConstraint, + 'no-unsafe-argument': noUnsafeArgument, 'no-unsafe-assignment': noUnsafeAssignment, 'no-unsafe-call': noUnsafeCall, 'no-unsafe-member-access': noUnsafeMemberAccess, diff --git a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts new file mode 100644 index 000000000000..23c8b7bd5080 --- /dev/null +++ b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts @@ -0,0 +1,220 @@ +import { + AST_NODE_TYPES, + TSESTree, +} from '@typescript-eslint/experimental-utils'; +import * as ts from 'typescript'; +import * as util from '../util'; + +type MessageIds = + | 'unsafeArgument' + | 'unsafeTupleSpread' + | 'unsafeArraySpread' + | 'unsafeSpread'; + +class FunctionSignature { + public static create( + checker: ts.TypeChecker, + tsNode: ts.CallLikeExpression, + ): FunctionSignature | null { + const signature = checker.getResolvedSignature(tsNode); + if (!signature) { + return null; + } + + const paramTypes: ts.Type[] = []; + let restType: ts.Type | null = null; + + for (const param of signature.getParameters()) { + 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]; + } else { + restType = type; + } + break; + } + + paramTypes.push(type); + } + + return new this(paramTypes, restType); + } + + private hasConsumedArguments = false; + + private constructor( + private paramTypes: ts.Type[], + private restType: ts.Type | null, + ) {} + + public getParameterType(index: number): ts.Type | null { + if (index >= this.paramTypes.length || this.hasConsumedArguments) { + return this.restType; + } + return this.paramTypes[index]; + } + + public consumeRemainingArguments(): void { + this.hasConsumedArguments = true; + } +} + +export default util.createRule<[], MessageIds>({ + name: 'no-unsafe-argument', + meta: { + type: 'problem', + docs: { + description: 'Disallows calling an function with an any type value', + category: 'Possible Errors', + // TODO - enable this with next breaking + recommended: false, + requiresTypeChecking: true, + }, + messages: { + unsafeArgument: + 'Unsafe argument of type `{{sender}}` assigned to a parameter of type `{{receiver}}`.', + unsafeTupleSpread: + 'Unsafe spread of a tuple type. The {{index}} element is of type `{{sender}}` and is assigned to a parameter of type `{{reciever}}`.', + unsafeArraySpread: 'Unsafe spread of an `any` array type.', + unsafeSpread: 'Unsafe spread of an `any` type.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const { program, esTreeNodeToTSNodeMap } = util.getParserServices(context); + const checker = program.getTypeChecker(); + + return { + 'CallExpression, NewExpression'( + node: TSESTree.CallExpression | TSESTree.NewExpression, + ): void { + if (node.arguments.length === 0) { + return; + } + + // ignore any-typed calls as these are caught by no-unsafe-call + if ( + util.isTypeAnyType( + checker.getTypeAtLocation(esTreeNodeToTSNodeMap.get(node.callee)), + ) + ) { + return; + } + + const tsNode = esTreeNodeToTSNodeMap.get(node); + const signature = FunctionSignature.create(checker, tsNode); + if (!signature) { + return; + } + + let parameterTypeIndex = 0; + for ( + let i = 0; + i < node.arguments.length; + i += 1, parameterTypeIndex += 1 + ) { + const argument = node.arguments[i]; + + switch (argument.type) { + // spreads consume + case AST_NODE_TYPES.SpreadElement: { + const spreadArgType = checker.getTypeAtLocation( + esTreeNodeToTSNodeMap.get(argument.argument), + ); + + if (util.isTypeAnyType(spreadArgType)) { + // foo(...any) + context.report({ + node: argument, + messageId: 'unsafeSpread', + }); + } else if (util.isTypeAnyArrayType(spreadArgType, checker)) { + // foo(...any[]) + + // TODO - we could break down the spread and compare the array type against each argument + context.report({ + node: argument, + messageId: 'unsafeArraySpread', + }); + } else if (checker.isTupleType(spreadArgType)) { + // foo(...[tuple1, tuple2]) + const spreadTypeArguments = checker.getTypeArguments( + spreadArgType, + ); + for ( + let j = 0; + j < spreadTypeArguments.length; + j += 1, parameterTypeIndex += 1 + ) { + const tupleType = spreadTypeArguments[j]; + const parameterType = signature.getParameterType( + parameterTypeIndex, + ); + if (parameterType == null) { + continue; + } + const result = util.isUnsafeAssignment( + tupleType, + parameterType, + checker, + ); + if (result) { + context.report({ + node: argument, + messageId: 'unsafeTupleSpread', + data: { + sender: checker.typeToString(tupleType), + receiver: checker.typeToString(parameterType), + }, + }); + } + } + if (spreadArgType.target.hasRestElement) { + // the last element was a rest - so all remaining defined arguments can be considered "consumed" + // all remaining arguments should be compared against the rest type (if one exists) + signature.consumeRemainingArguments(); + } + } else { + // something that's iterable + // handling this will be pretty complex - so we ignore it for now + // TODO - handle generic iterable case + } + break; + } + + default: { + const parameterType = signature.getParameterType(i); + if (parameterType == null) { + continue; + } + + const argumentType = checker.getTypeAtLocation( + esTreeNodeToTSNodeMap.get(argument), + ); + const result = util.isUnsafeAssignment( + argumentType, + parameterType, + checker, + ); + if (result) { + context.report({ + node: argument, + messageId: 'unsafeArgument', + data: { + sender: checker.typeToString(argumentType), + receiver: checker.typeToString(parameterType), + }, + }); + } + } + } + } + }, + }; + }, +}); diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts new file mode 100644 index 000000000000..395f47344cb2 --- /dev/null +++ b/packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts @@ -0,0 +1,268 @@ +import rule from '../../src/rules/no-unsafe-argument'; +import { RuleTester, getFixturesRootDir } from '../RuleTester'; + +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', + parserOptions: { + project: './tsconfig.json', + tsconfigRootDir: getFixturesRootDir(), + }, +}); + +ruleTester.run('no-unsafe-argument', rule, { + valid: [ + ` +declare function foo(arg: number): void; +foo(1); + `, + ` +declare function foo(arg: number, arg2: string): void; +foo(1, 'a'); + `, + ` +declare function foo(arg: any): void; +foo(1 as any); + `, + ` +declare function foo(arg: unknown): void; +foo(1 as any); + `, + ` +declare function foo(...arg: number[]): void; +foo(1, 2, 3); + `, + ` +declare function foo(...arg: any[]): void; +foo(1, 2, 3, 4 as any); + `, + ` +declare function foo(arg: number, arg2: number): void; +const x = [1, 2] as const; +foo(...x); + `, + ` +declare function foo(arg: any, arg2: number): void; +const x = [1 as any, 2] as const; +foo(...x); + `, + ` +declare function foo(arg1: string, arg2: string): void; +const x: string[] = []; +foo(...x); + `, + ` +declare function foo(arg1: Set, arg2: Map): void; + +const x = [new Map()] as const; +foo(new Set(), ...x); + `, + ` +declare function foo(arg1: unknown, arg2: Set, arg3: unknown[]): void; +foo(1 as any, new Set(), [] as any[]); + `, + ], + invalid: [ + { + code: ` +declare function foo(arg: number): void; +foo(1 as any); + `, + errors: [ + { + messageId: 'unsafeArgument', + line: 3, + column: 5, + endColumn: 13, + data: { + sender: 'any', + receiver: 'number', + }, + }, + ], + }, + { + code: ` +declare function foo(arg1: number, arg2: string): void; +foo(1, 1 as any); + `, + errors: [ + { + messageId: 'unsafeArgument', + line: 3, + column: 8, + endColumn: 16, + data: { + sender: 'any', + receiver: 'string', + }, + }, + ], + }, + { + code: ` +declare function foo(...arg: number[]): void; +foo(1, 2, 3, 1 as any); + `, + errors: [ + { + messageId: 'unsafeArgument', + line: 3, + column: 14, + endColumn: 22, + data: { + sender: 'any', + receiver: 'number', + }, + }, + ], + }, + { + code: ` +declare function foo(arg: string, ...arg: number[]): void; +foo(1 as any, 1 as any); + `, + errors: [ + { + messageId: 'unsafeArgument', + line: 3, + column: 5, + endColumn: 13, + data: { + sender: 'any', + receiver: 'string', + }, + }, + { + messageId: 'unsafeArgument', + line: 3, + column: 15, + endColumn: 23, + data: { + sender: 'any', + receiver: 'number', + }, + }, + ], + }, + { + code: ` +declare function foo(arg1: string, arg2: number): void; + +foo(...(x as any)); + `, + errors: [ + { + messageId: 'unsafeSpread', + line: 4, + column: 5, + endColumn: 18, + }, + ], + }, + { + code: ` +declare function foo(arg1: string, arg2: number): void; + +foo(...(x as any[])); + `, + errors: [ + { + messageId: 'unsafeArraySpread', + line: 4, + column: 5, + endColumn: 20, + }, + ], + }, + { + code: ` +declare function foo(arg1: string, arg2: number): void; + +const x = ['a', 1 as any] as const; +foo(...x); + `, + errors: [ + { + messageId: 'unsafeTupleSpread', + line: 5, + column: 5, + endColumn: 9, + data: { + sender: 'any', + receiver: 'number', + }, + }, + ], + }, + { + code: ` +declare function foo(arg1: string, arg2: number, arg2: string): void; + +const x = [1] as const; +foo('a', ...x, 1 as any); + `, + errors: [ + { + messageId: 'unsafeArgument', + line: 5, + column: 16, + endColumn: 24, + data: { + sender: 'any', + receiver: 'string', + }, + }, + ], + }, + { + code: ` +declare function foo(arg1: string, arg2: number, ...rest: string[]): void; + +const x = [1, 2] as [number, ...number[]]; +foo('a', ...x, 1 as any); + `, + errors: [ + { + messageId: 'unsafeArgument', + line: 5, + column: 16, + endColumn: 24, + data: { + sender: 'any', + receiver: 'string', + }, + }, + ], + }, + { + code: ` +declare function foo(arg1: Set, arg2: Map): void; + +const x = [new Map()] as const; +foo(new Set(), ...x); + `, + errors: [ + { + messageId: 'unsafeArgument', + line: 5, + column: 5, + endColumn: 19, + data: { + sender: 'Set', + receiver: 'Set', + }, + }, + { + messageId: 'unsafeTupleSpread', + line: 5, + column: 21, + endColumn: 25, + data: { + sender: 'Map', + receiver: 'Map', + }, + }, + ], + }, + ], +}); From b1b26c4843a4cfa209a0c9c3d8bea1de37333b48 Mon Sep 17 00:00:00 2001 From: JounQin Date: Sat, 3 Apr 2021 04:23:32 +0800 Subject: [PATCH 065/473] feat(eslint-plugin): [no-unsafe-call][no-unsafe-member-access] improve report messages for `this` for `noImplicitThis` (#3199) --- .../src/rules/no-unsafe-assignment.ts | 39 +++++++++++++++--- .../eslint-plugin/src/rules/no-unsafe-call.ts | 34 ++++++++++++++- .../src/rules/no-unsafe-member-access.ts | 36 +++++++++++++++- .../src/rules/no-unsafe-return.ts | 38 ++++++++++++++--- .../src/util/getThisExpression.ts | 24 +++++++++++ packages/eslint-plugin/src/util/index.ts | 1 + .../fixtures/tsconfig.noImplicitThis.json | 6 +++ .../tests/rules/no-unsafe-assignment.test.ts | 17 +++++++- .../tests/rules/no-unsafe-call.test.ts | 31 +++++++++++++- .../rules/no-unsafe-member-access.test.ts | 41 ++++++++++++++++++- .../tests/rules/no-unsafe-return.test.ts | 27 +++++++++++- 11 files changed, 276 insertions(+), 18 deletions(-) create mode 100644 packages/eslint-plugin/src/util/getThisExpression.ts create mode 100644 packages/eslint-plugin/tests/fixtures/tsconfig.noImplicitThis.json diff --git a/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts b/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts index 4a8f2a9ea237..ac8152085449 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts @@ -2,8 +2,10 @@ import { TSESTree, AST_NODE_TYPES, } from '@typescript-eslint/experimental-utils'; +import * as tsutils from 'tsutils'; import * as ts from 'typescript'; import * as util from '../util'; +import { getThisExpression } from '../util'; const enum ComparisonType { /** Do no assignment comparison */ @@ -25,13 +27,17 @@ export default util.createRule({ requiresTypeChecking: true, }, messages: { - anyAssignment: 'Unsafe assignment of an any value.', - unsafeArrayPattern: 'Unsafe array destructuring of an any array value.', + anyAssignment: 'Unsafe assignment of an `any` value.', + anyAssignmentThis: [ + 'Unsafe assignment of an `any` value. `this` is typed as `any`.', + 'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.', + ].join('\n'), + unsafeArrayPattern: 'Unsafe array destructuring of an `any` array value.', unsafeArrayPatternFromTuple: - 'Unsafe array destructuring of a tuple element with an any value.', + 'Unsafe array destructuring of a tuple element with an `any` value.', unsafeAssignment: 'Unsafe assignment of type {{sender}} to a variable of type {{receiver}}.', - unsafeArraySpread: 'Unsafe spread of an any value in an array.', + unsafeArraySpread: 'Unsafe spread of an `any` value in an array.', }, schema: [], }, @@ -39,6 +45,11 @@ export default util.createRule({ create(context) { const { program, esTreeNodeToTSNodeMap } = util.getParserServices(context); const checker = program.getTypeChecker(); + const compilerOptions = program.getCompilerOptions(); + const isNoImplicitThis = tsutils.isStrictCompilerOptionEnabled( + compilerOptions, + 'noImplicitThis', + ); // returns true if the assignment reported function checkArrayDestructureHelper( @@ -243,9 +254,27 @@ export default util.createRule({ return false; } + let messageId: 'anyAssignment' | 'anyAssignmentThis' = 'anyAssignment'; + + if (!isNoImplicitThis) { + // `var foo = this` + const thisExpression = getThisExpression(senderNode); + if ( + thisExpression && + util.isTypeAnyType( + util.getConstrainedTypeAtLocation( + checker, + esTreeNodeToTSNodeMap.get(thisExpression), + ), + ) + ) { + messageId = 'anyAssignmentThis'; + } + } + context.report({ node: reportingNode, - messageId: 'anyAssignment', + messageId, }); return true; } diff --git a/packages/eslint-plugin/src/rules/no-unsafe-call.ts b/packages/eslint-plugin/src/rules/no-unsafe-call.ts index 0535bfeab316..b08214d36c27 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-call.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-call.ts @@ -1,7 +1,13 @@ import { TSESTree } from '@typescript-eslint/experimental-utils'; +import * as tsutils from 'tsutils'; import * as util from '../util'; +import { getThisExpression } from '../util'; -type MessageIds = 'unsafeCall' | 'unsafeNew' | 'unsafeTemplateTag'; +type MessageIds = + | 'unsafeCall' + | 'unsafeCallThis' + | 'unsafeNew' + | 'unsafeTemplateTag'; export default util.createRule<[], MessageIds>({ name: 'no-unsafe-call', @@ -14,7 +20,11 @@ export default util.createRule<[], MessageIds>({ requiresTypeChecking: true, }, messages: { - unsafeCall: 'Unsafe call of an any typed value.', + unsafeCall: 'Unsafe call of an `any` typed value.', + unsafeCallThis: [ + 'Unsafe call of an `any` typed value. `this` is typed as `any`.', + 'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.', + ].join('\n'), unsafeNew: 'Unsafe construction of an any type value.', unsafeTemplateTag: 'Unsafe any typed template tag.', }, @@ -24,6 +34,11 @@ export default util.createRule<[], MessageIds>({ create(context) { const { program, esTreeNodeToTSNodeMap } = util.getParserServices(context); const checker = program.getTypeChecker(); + const compilerOptions = program.getCompilerOptions(); + const isNoImplicitThis = tsutils.isStrictCompilerOptionEnabled( + compilerOptions, + 'noImplicitThis', + ); function checkCall( node: TSESTree.Node, @@ -34,6 +49,21 @@ export default util.createRule<[], MessageIds>({ const type = util.getConstrainedTypeAtLocation(checker, tsNode); if (util.isTypeAnyType(type)) { + if (!isNoImplicitThis) { + // `this()` or `this.foo()` or `this.foo[bar]()` + const thisExpression = getThisExpression(node); + if ( + thisExpression && + util.isTypeAnyType( + util.getConstrainedTypeAtLocation( + checker, + esTreeNodeToTSNodeMap.get(thisExpression), + ), + ) + ) { + messageId = 'unsafeCallThis'; + } + } context.report({ node: reportingNode, messageId: messageId, diff --git a/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts b/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts index b326c754136b..13fd7bf0821b 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts @@ -2,7 +2,9 @@ import { TSESTree, AST_NODE_TYPES, } from '@typescript-eslint/experimental-utils'; +import * as tsutils from 'tsutils'; import * as util from '../util'; +import { getThisExpression } from '../util'; const enum State { Unsafe = 1, @@ -21,7 +23,11 @@ export default util.createRule({ }, messages: { unsafeMemberExpression: - 'Unsafe member access {{property}} on an any value.', + 'Unsafe member access {{property}} on an `any` value.', + unsafeThisMemberExpression: [ + 'Unsafe member access {{property}} on an `any` value. `this` is typed as `any`.', + 'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.', + ].join('\n'), unsafeComputedMemberAccess: 'Computed name {{property}} resolves to an any value.', }, @@ -31,6 +37,11 @@ export default util.createRule({ create(context) { const { program, esTreeNodeToTSNodeMap } = util.getParserServices(context); const checker = program.getTypeChecker(); + const compilerOptions = program.getCompilerOptions(); + const isNoImplicitThis = tsutils.isStrictCompilerOptionEnabled( + compilerOptions, + 'noImplicitThis', + ); const sourceCode = context.getSourceCode(); const stateCache = new Map(); @@ -58,9 +69,30 @@ export default util.createRule({ if (state === State.Unsafe) { const propertyName = sourceCode.getText(node.property); + + let messageId: 'unsafeMemberExpression' | 'unsafeThisMemberExpression' = + 'unsafeMemberExpression'; + + if (!isNoImplicitThis) { + // `this.foo` or `this.foo[bar]` + const thisExpression = getThisExpression(node); + + if ( + thisExpression && + util.isTypeAnyType( + util.getConstrainedTypeAtLocation( + checker, + esTreeNodeToTSNodeMap.get(thisExpression), + ), + ) + ) { + messageId = 'unsafeThisMemberExpression'; + } + } + context.report({ node, - messageId: 'unsafeMemberExpression', + messageId, data: { property: node.computed ? `[${propertyName}]` : `.${propertyName}`, }, diff --git a/packages/eslint-plugin/src/rules/no-unsafe-return.ts b/packages/eslint-plugin/src/rules/no-unsafe-return.ts index c2366bc96f2e..a818be4ef4ee 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-return.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-return.ts @@ -2,8 +2,9 @@ import { TSESTree, AST_NODE_TYPES, } from '@typescript-eslint/experimental-utils'; -import { isExpression } from 'tsutils'; +import * as tsutils from 'tsutils'; import * as util from '../util'; +import { getThisExpression } from '../util'; export default util.createRule({ name: 'no-unsafe-return', @@ -16,9 +17,13 @@ export default util.createRule({ requiresTypeChecking: true, }, messages: { - unsafeReturn: 'Unsafe return of an {{type}} typed value', + unsafeReturn: 'Unsafe return of an `{{type}}` typed value.', + unsafeReturnThis: [ + 'Unsafe return of an `{{type}}` typed value. `this` is typed as `any`.', + 'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.', + ].join('\n'), unsafeReturnAssignment: - 'Unsafe return of type {{sender}} from function with return type {{receiver}}.', + 'Unsafe return of type `{{sender}}` from function with return type `{{receiver}}`.', }, schema: [], }, @@ -26,6 +31,11 @@ export default util.createRule({ create(context) { const { program, esTreeNodeToTSNodeMap } = util.getParserServices(context); const checker = program.getTypeChecker(); + const compilerOptions = program.getCompilerOptions(); + const isNoImplicitThis = tsutils.isStrictCompilerOptionEnabled( + compilerOptions, + 'noImplicitThis', + ); function getParentFunctionNode( node: TSESTree.Node, @@ -74,7 +84,7 @@ export default util.createRule({ // so we have to use the contextual typing in these cases, i.e. // const foo1: () => Set = () => new Set(); // the return type of the arrow function is Set even though the variable is typed as Set - let functionType = isExpression(functionTSNode) + let functionType = tsutils.isExpression(functionTSNode) ? util.getContextualType(checker, functionTSNode) : checker.getTypeAtLocation(functionTSNode); if (!functionType) { @@ -100,10 +110,28 @@ export default util.createRule({ } } + let messageId: 'unsafeReturn' | 'unsafeReturnThis' = 'unsafeReturn'; + + if (!isNoImplicitThis) { + // `return this` + const thisExpression = getThisExpression(returnNode); + if ( + thisExpression && + util.isTypeAnyType( + util.getConstrainedTypeAtLocation( + checker, + esTreeNodeToTSNodeMap.get(thisExpression), + ), + ) + ) { + messageId = 'unsafeReturnThis'; + } + } + // If the function return type was not unknown/unknown[], mark usage as unsafeReturn. return context.report({ node: reportingNode, - messageId: 'unsafeReturn', + messageId, data: { type: anyType === util.AnyType.Any ? 'any' : 'any[]', }, diff --git a/packages/eslint-plugin/src/util/getThisExpression.ts b/packages/eslint-plugin/src/util/getThisExpression.ts new file mode 100644 index 000000000000..5e2772aebaec --- /dev/null +++ b/packages/eslint-plugin/src/util/getThisExpression.ts @@ -0,0 +1,24 @@ +import { + AST_NODE_TYPES, + TSESTree, +} from '@typescript-eslint/experimental-utils'; + +export function getThisExpression( + node: TSESTree.Node, +): TSESTree.ThisExpression | undefined { + while (node) { + if (node.type === AST_NODE_TYPES.CallExpression) { + node = node.callee; + } else if (node.type === AST_NODE_TYPES.ThisExpression) { + return node; + } else if (node.type === AST_NODE_TYPES.MemberExpression) { + node = node.object; + } else if (node.type === AST_NODE_TYPES.ChainExpression) { + node = node.expression; + } else { + break; + } + } + + return; +} diff --git a/packages/eslint-plugin/src/util/index.ts b/packages/eslint-plugin/src/util/index.ts index e7bb53547fc8..79e142b15fd4 100644 --- a/packages/eslint-plugin/src/util/index.ts +++ b/packages/eslint-plugin/src/util/index.ts @@ -4,6 +4,7 @@ export * from './astUtils'; export * from './collectUnusedVariables'; export * from './createRule'; export * from './getFunctionHeadLoc'; +export * from './getThisExpression'; export * from './getWrappingFixer'; export * from './isTypeReadonly'; export * from './misc'; diff --git a/packages/eslint-plugin/tests/fixtures/tsconfig.noImplicitThis.json b/packages/eslint-plugin/tests/fixtures/tsconfig.noImplicitThis.json new file mode 100644 index 000000000000..c017e51c6e4c --- /dev/null +++ b/packages/eslint-plugin/tests/fixtures/tsconfig.noImplicitThis.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "noImplicitThis": false + } +} diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts index 6f3baa3fa1a1..b0f8ec612333 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts @@ -68,7 +68,7 @@ function assignmentTest( const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', parserOptions: { - project: './tsconfig.json', + project: './tsconfig.noImplicitThis.json', tsconfigRootDir: getFixturesRootDir(), }, }); @@ -347,5 +347,20 @@ declare function Foo(props: Props): never; }, ], }, + { + code: ` +function foo() { + const bar = this; +} + `, + errors: [ + { + messageId: 'anyAssignmentThis', + line: 3, + column: 9, + endColumn: 19, + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-call.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-call.test.ts index 981abb0eadde..1f70c30e248c 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-call.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-call.test.ts @@ -9,7 +9,7 @@ import { const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', parserOptions: { - project: './tsconfig.json', + project: './tsconfig.noImplicitThis.json', tsconfigRootDir: getFixturesRootDir(), }, }); @@ -148,5 +148,34 @@ function foo(x: { tag: any }) { x.tag\`foo\` } }, ], }), + { + code: noFormat` +const methods = { + methodA() { + return this.methodB() + }, + methodB() { + return true + }, + methodC() { + return this() + } +}; + `, + errors: [ + { + messageId: 'unsafeCallThis', + line: 4, + column: 12, + endColumn: 24, + }, + { + messageId: 'unsafeCallThis', + line: 10, + column: 12, + endColumn: 16, + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-member-access.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-member-access.test.ts index a9c21f8712b9..491d5e97d9f9 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-member-access.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-member-access.test.ts @@ -9,7 +9,7 @@ import { const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', parserOptions: { - project: './tsconfig.json', + project: './tsconfig.noImplicitThis.json', tsconfigRootDir: getFixturesRootDir(), }, }); @@ -202,5 +202,44 @@ function foo(x: string[], y: any) { x[y] } }, ], }), + { + code: noFormat` +const methods = { + methodA() { + return this.methodB() + }, + methodB() { + const getProperty = () => Math.random() > 0.5 ? 'methodB' : 'methodC' + return this[getProperty()]() + }, + methodC() { + return true + }, + methodD() { + return (this?.methodA)?.() + } +}; + `, + errors: [ + { + messageId: 'unsafeThisMemberExpression', + line: 4, + column: 12, + endColumn: 24, + }, + { + messageId: 'unsafeThisMemberExpression', + line: 8, + column: 12, + endColumn: 31, + }, + { + messageId: 'unsafeThisMemberExpression', + line: 14, + column: 13, + endColumn: 26, + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts index 7d7777e46632..5cfd965ab8e1 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts @@ -9,7 +9,7 @@ import { const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', parserOptions: { - project: './tsconfig.json', + project: './tsconfig.noImplicitThis.json', tsconfigRootDir: getFixturesRootDir(), }, }); @@ -293,5 +293,30 @@ receiver(function test() { }, ], }, + { + code: ` +function foo() { + return this; +} + +function bar() { + return () => this; +} + `, + errors: [ + { + messageId: 'unsafeReturnThis', + line: 3, + column: 3, + endColumn: 15, + }, + { + messageId: 'unsafeReturnThis', + line: 7, + column: 16, + endColumn: 20, + }, + ], + }, ], }); From 02214768a3721d8514c70e00546e861da6581e4d Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 5 Apr 2021 00:49:19 -0400 Subject: [PATCH 066/473] fix(eslint-plugin): always ignore assignments in no-unnecessary-type-assertion (#3235) --- .../rules/no-unnecessary-type-assertion.ts | 29 +++++++++++-------- .../no-unnecessary-type-assertion.test.ts | 12 ++++---- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts index d051179eee3c..d16f494fc4af 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts @@ -137,19 +137,24 @@ export default util.createRule({ TSNonNullExpression(node): void { if ( node.parent?.type === AST_NODE_TYPES.AssignmentExpression && - node.parent?.operator === '=' && - node.parent.left === node + node.parent.operator === '=' ) { - context.report({ - node, - messageId: 'contextuallyUnnecessary', - fix(fixer) { - return fixer.removeRange([ - node.expression.range[1], - node.range[1], - ]); - }, - }); + if (node.parent.left === node) { + context.report({ + node, + messageId: 'contextuallyUnnecessary', + fix(fixer) { + return fixer.removeRange([ + node.expression.range[1], + node.range[1], + ]); + }, + }); + } + // for all other = assignments we ignore non-null checks + // this is because non-null assertions can change the type-flow of the code + // so whilst they might be unnecessary for the assignment - they are necessary + // for following code return; } diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts index 6d3563a0ccdd..7cd169601392 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts @@ -202,6 +202,12 @@ let a: { b?: string } | undefined; a!.b = ''; `, }, + ` +let value: number | undefined; +let values: number[] = []; + +value = values.pop()!; + `, ], invalid: [ @@ -493,14 +499,10 @@ y! = 0; output: ` let x: number | undefined; let y: number | undefined; -y = x; +y = x!; y = 0; `, errors: [ - { - messageId: 'contextuallyUnnecessary', - line: 4, - }, { messageId: 'contextuallyUnnecessary', line: 5, From 0913f40c87762de198b05a5473b4fb79aeb46967 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 5 Apr 2021 00:51:24 -0400 Subject: [PATCH 067/473] fix(eslint-plugin): [strict-boolean-expressions] account for truthy literals (#3236) --- .../src/rules/strict-boolean-expressions.ts | 49 ++++++++++++------ .../rules/strict-boolean-expressions.test.ts | 51 +++++++++++++++++++ 2 files changed, 85 insertions(+), 15 deletions(-) diff --git a/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts b/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts index b8e25d4542a3..87796f9f4279 100644 --- a/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts +++ b/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts @@ -308,8 +308,16 @@ export default util.createRule({ return; } + // Known edge case: truthy primitives and nullish values are always valid boolean expressions + if ( + (options.allowNumber && is('nullish', 'truthy number')) || + (options.allowString && is('nullish', 'truthy string')) + ) { + return; + } + // string - if (is('string')) { + if (is('string') || is('truthy string')) { if (!options.allowString) { if (isLogicalNegationExpression(node.parent!)) { // if (!string) @@ -458,7 +466,7 @@ export default util.createRule({ } // number - if (is('number')) { + if (is('number') || is('truthy number')) { if (!options.allowNumber) { if (isArrayLengthExpression(node, typeChecker, parserServices)) { if (isLogicalNegationExpression(node.parent!)) { @@ -701,7 +709,9 @@ export default util.createRule({ | 'nullish' | 'boolean' | 'string' + | 'truthy string' | 'number' + | 'truthy number' | 'object' | 'any' | 'never'; @@ -731,21 +741,30 @@ export default util.createRule({ variantTypes.add('boolean'); } - if ( - types.some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.StringLike)) - ) { - variantTypes.add('string'); + const strings = types.filter(type => + tsutils.isTypeFlagSet(type, ts.TypeFlags.StringLike), + ); + + if (strings.length) { + if (strings.some(type => type.isStringLiteral() && type.value !== '')) { + variantTypes.add('truthy string'); + } else { + variantTypes.add('string'); + } } - if ( - types.some(type => - tsutils.isTypeFlagSet( - type, - ts.TypeFlags.NumberLike | ts.TypeFlags.BigIntLike, - ), - ) - ) { - variantTypes.add('number'); + const numbers = types.filter(type => + tsutils.isTypeFlagSet( + type, + ts.TypeFlags.NumberLike | ts.TypeFlags.BigIntLike, + ), + ); + if (numbers.length) { + if (numbers.some(type => type.isNumberLiteral() && type.value !== 0)) { + variantTypes.add('truthy number'); + } else { + variantTypes.add('number'); + } } if ( 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 d24de92ac65f..33ec5ba1badb 100644 --- a/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts +++ b/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts @@ -133,6 +133,57 @@ if (x) { tsconfigRootDir: path.join(rootPath, 'unstrict'), }, }, + + ` +function f(arg: 'a' | null) { + if (arg) console.log(arg); +} + `, + ` +function f(arg: 'a' | 'b' | null) { + if (arg) console.log(arg); +} + `, + { + code: ` +declare const x: 1 | null; +declare const y: 1; +if (x) { +} +if (y) { +} + `, + options: [ + { + allowNumber: true, + }, + ], + }, + ` +function f(arg: 1 | null) { + if (arg) console.log(arg); +} + `, + ` +function f(arg: 1 | 2 | null) { + if (arg) console.log(arg); +} + `, + { + code: ` +declare const x: 'a' | null; +declare const y: 'a'; +if (x) { +} +if (y) { +} + `, + options: [ + { + allowString: true, + }, + ], + }, ], invalid: [ From ccfd68e365391b3f117df96792355f9c3655288c Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 5 Apr 2021 00:54:19 -0400 Subject: [PATCH 068/473] fix(eslint-plugin): [restrict-plus-operands] consider template literal types as strings (#3234) --- packages/eslint-plugin/src/rules/restrict-plus-operands.ts | 5 ++++- .../tests/rules/restrict-plus-operands.test.ts | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/src/rules/restrict-plus-operands.ts b/packages/eslint-plugin/src/rules/restrict-plus-operands.ts index 0edf8a37d20e..0f3b07e9fb27 100644 --- a/packages/eslint-plugin/src/rules/restrict-plus-operands.ts +++ b/packages/eslint-plugin/src/rules/restrict-plus-operands.ts @@ -57,7 +57,10 @@ export default util.createRule({ if (type.isNumberLiteral()) { return 'number'; } - if (type.isStringLiteral()) { + if ( + type.isStringLiteral() || + util.isTypeFlagSet(type, ts.TypeFlags.TemplateLiteral) + ) { return 'string'; } // is BigIntLiteral diff --git a/packages/eslint-plugin/tests/rules/restrict-plus-operands.test.ts b/packages/eslint-plugin/tests/rules/restrict-plus-operands.test.ts index daa02fa46d9d..af33e3ad3dba 100644 --- a/packages/eslint-plugin/tests/rules/restrict-plus-operands.test.ts +++ b/packages/eslint-plugin/tests/rules/restrict-plus-operands.test.ts @@ -110,6 +110,12 @@ const x = a + b; declare const a: 'string literal' & string; declare const b: string; const x = a + b; + `, + ` +function A(s: string) { + return \`a\${s}b\` as const; +} +const b = A('') + '!'; `, { code: ` From 3181b32d576cb5542cc2346f53cef9d24831f63d Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 5 Apr 2021 17:02:11 +0000 Subject: [PATCH 069/473] chore: publish v4.21.0 --- CHANGELOG.md | 21 ++++++++++++++++++++ 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 | 21 ++++++++++++++++++++ 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, 144 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44ebffbf4121..b63444232e33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.21.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.20.0...v4.21.0) (2021-04-05) + + +### Bug Fixes + +* **eslint-plugin:** [no-type-alias] consider `keyof` as an alias ([#3242](https://github.com/typescript-eslint/typescript-eslint/issues/3242)) ([329ef02](https://github.com/typescript-eslint/typescript-eslint/commit/329ef023090c004694b5996ddb04fdde5b05ebb0)) +* **eslint-plugin:** [no-unnecessary-type-assertion] correct bad fix for angle bracket assertion ([#3244](https://github.com/typescript-eslint/typescript-eslint/issues/3244)) ([265a039](https://github.com/typescript-eslint/typescript-eslint/commit/265a039c7e728b719143e09ee61066039d721f62)) +* **eslint-plugin:** [restrict-plus-operands] consider template literal types as strings ([#3234](https://github.com/typescript-eslint/typescript-eslint/issues/3234)) ([ccfd68e](https://github.com/typescript-eslint/typescript-eslint/commit/ccfd68e365391b3f117df96792355f9c3655288c)) +* **eslint-plugin:** [strict-boolean-expressions] account for truthy literals ([#3236](https://github.com/typescript-eslint/typescript-eslint/issues/3236)) ([0913f40](https://github.com/typescript-eslint/typescript-eslint/commit/0913f40c87762de198b05a5473b4fb79aeb46967)) +* **eslint-plugin:** always ignore assignments in no-unnecessary-type-assertion ([#3235](https://github.com/typescript-eslint/typescript-eslint/issues/3235)) ([0221476](https://github.com/typescript-eslint/typescript-eslint/commit/02214768a3721d8514c70e00546e861da6581e4d)) + + +### Features + +* **eslint-plugin:** [no-unsafe-argument] add rule ([#3256](https://github.com/typescript-eslint/typescript-eslint/issues/3256)) ([b1aa7dc](https://github.com/typescript-eslint/typescript-eslint/commit/b1aa7dc6971ee8409b729dffb8b69478455734ed)), closes [#791](https://github.com/typescript-eslint/typescript-eslint/issues/791) +* **eslint-plugin:** [no-unsafe-call][no-unsafe-member-access] improve report messages for `this` for `noImplicitThis` ([#3199](https://github.com/typescript-eslint/typescript-eslint/issues/3199)) ([b1b26c4](https://github.com/typescript-eslint/typescript-eslint/commit/b1b26c4843a4cfa209a0c9c3d8bea1de37333b48)) + + + + + # [4.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) diff --git a/lerna.json b/lerna.json index 648c75338267..4819dc418597 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.20.0", + "version": "4.21.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 407982ce241f..891dc4bf1505 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.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 + + + + + # [4.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) **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 5334a903a35d..d8402252f45f 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.20.0", + "version": "4.21.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.20.0", + "@typescript-eslint/experimental-utils": "4.21.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 8a77d768c3a7..cd7ff138b0ff 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.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 + + + + + # [4.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) **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 4135e7270ea4..00e26e2a6750 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.20.0", + "version": "4.21.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.20.0", + "@typescript-eslint/experimental-utils": "4.21.0", "lodash": "^4.17.15" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.20.0" + "@typescript-eslint/parser": "4.21.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index f9d70654c1f3..890f25c3aacc 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.21.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.20.0...v4.21.0) (2021-04-05) + + +### Bug Fixes + +* **eslint-plugin:** [no-type-alias] consider `keyof` as an alias ([#3242](https://github.com/typescript-eslint/typescript-eslint/issues/3242)) ([329ef02](https://github.com/typescript-eslint/typescript-eslint/commit/329ef023090c004694b5996ddb04fdde5b05ebb0)) +* **eslint-plugin:** [no-unnecessary-type-assertion] correct bad fix for angle bracket assertion ([#3244](https://github.com/typescript-eslint/typescript-eslint/issues/3244)) ([265a039](https://github.com/typescript-eslint/typescript-eslint/commit/265a039c7e728b719143e09ee61066039d721f62)) +* **eslint-plugin:** [restrict-plus-operands] consider template literal types as strings ([#3234](https://github.com/typescript-eslint/typescript-eslint/issues/3234)) ([ccfd68e](https://github.com/typescript-eslint/typescript-eslint/commit/ccfd68e365391b3f117df96792355f9c3655288c)) +* **eslint-plugin:** [strict-boolean-expressions] account for truthy literals ([#3236](https://github.com/typescript-eslint/typescript-eslint/issues/3236)) ([0913f40](https://github.com/typescript-eslint/typescript-eslint/commit/0913f40c87762de198b05a5473b4fb79aeb46967)) +* **eslint-plugin:** always ignore assignments in no-unnecessary-type-assertion ([#3235](https://github.com/typescript-eslint/typescript-eslint/issues/3235)) ([0221476](https://github.com/typescript-eslint/typescript-eslint/commit/02214768a3721d8514c70e00546e861da6581e4d)) + + +### Features + +* **eslint-plugin:** [no-unsafe-argument] add rule ([#3256](https://github.com/typescript-eslint/typescript-eslint/issues/3256)) ([b1aa7dc](https://github.com/typescript-eslint/typescript-eslint/commit/b1aa7dc6971ee8409b729dffb8b69478455734ed)), closes [#791](https://github.com/typescript-eslint/typescript-eslint/issues/791) +* **eslint-plugin:** [no-unsafe-call][no-unsafe-member-access] improve report messages for `this` for `noImplicitThis` ([#3199](https://github.com/typescript-eslint/typescript-eslint/issues/3199)) ([b1b26c4](https://github.com/typescript-eslint/typescript-eslint/commit/b1b26c4843a4cfa209a0c9c3d8bea1de37333b48)) + + + + + # [4.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 2200afd28023..c2ee7821e3c7 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.20.0", + "version": "4.21.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.20.0", - "@typescript-eslint/scope-manager": "4.20.0", + "@typescript-eslint/experimental-utils": "4.21.0", + "@typescript-eslint/scope-manager": "4.21.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 3eb627a542f8..353715dd4635 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.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 + + + + + # [4.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) **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 5dc92e6d4ed9..c32aade9b272 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.20.0", + "version": "4.21.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.20.0", - "@typescript-eslint/types": "4.20.0", - "@typescript-eslint/typescript-estree": "4.20.0", + "@typescript-eslint/scope-manager": "4.21.0", + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/typescript-estree": "4.21.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index ae507c9c8990..0704567173f9 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.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 + + + + + # [4.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 892d0c5ebc2c..eae074a40c87 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.20.0", + "version": "4.21.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.20.0", - "@typescript-eslint/types": "4.20.0", - "@typescript-eslint/typescript-estree": "4.20.0", + "@typescript-eslint/scope-manager": "4.21.0", + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/typescript-estree": "4.21.0", "debug": "^4.1.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.20.0", + "@typescript-eslint/experimental-utils": "4.21.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 44f0ff59bf2e..4d2feebf2357 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.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 + + + + + # [4.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) **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 1c5756b2cf32..d0885fc83b14 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.20.0", + "version": "4.21.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.20.0", - "@typescript-eslint/visitor-keys": "4.20.0" + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/visitor-keys": "4.21.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.20.0", + "@typescript-eslint/typescript-estree": "4.21.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index d45ba39253b5..4d25f611a9d6 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.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 + + + + + # [4.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) **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 5e5691bc45ed..ea8929dd167f 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.20.0", + "version": "4.21.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 8e7dc1f4a42c..f5a546799969 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.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 + + + + + # [4.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 95e52db60ebd..b4b29e94e7b7 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.20.0", + "version": "4.21.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 5e6000eecf07..85b800fe52a5 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.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 + + + + + # [4.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) **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 18addb958652..92e797aae550 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.20.0", + "version": "4.21.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.20.0", - "@typescript-eslint/visitor-keys": "4.20.0", + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/visitor-keys": "4.21.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.20.0", + "@typescript-eslint/shared-fixtures": "4.21.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 1b475f652f87..efd8c85036c5 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.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 + + + + + # [4.20.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.19.0...v4.20.0) (2021-03-29) **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 e59866242d4a..70a063fac306 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.20.0", + "version": "4.21.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.20.0", + "@typescript-eslint/types": "4.21.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { 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 070/473] 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 071/473] 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 072/473] 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 073/473] 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 074/473] 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 075/473] 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 076/473] 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 077/473] 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 078/473] 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 079/473] 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 080/473] 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 081/473] 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": { From 79df2d1d745278a131ba4bb0fe2bc24781c8038e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Apr 2021 14:08:11 -0700 Subject: [PATCH 082/473] chore: bump marked from 2.0.1 to 2.0.3 (#3287) Bumps [marked](https://github.com/markedjs/marked) from 2.0.1 to 2.0.3. - [Release notes](https://github.com/markedjs/marked/releases) - [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js) - [Commits](https://github.com/markedjs/marked/compare/v2.0.1...v2.0.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/yarn.lock b/yarn.lock index dcee4f3df8a2..aa618d8abe15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6199,9 +6199,9 @@ markdownlint@~0.23.1: markdown-it "12.0.4" marked@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.1.tgz#5e7ed7009bfa5c95182e4eb696f85e948cefcee3" - integrity sha512-5+/fKgMv2hARmMW7DOpykr2iLhl0NgjyELk5yn92iE7z8Se1IS9n3UsFm86hFXIkvMBmVxki8+ckcpjBeyo/hw== + version "2.0.3" + resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.3.tgz#3551c4958c4da36897bda2a16812ef1399c8d6b0" + integrity sha512-5otztIIcJfPc2qGTN8cVtOJEjNJZ0jwa46INMagrYfk0EvqtRuEHLsEe0LrFS0/q+ZRKT0+kXK7P2T1AN5lWRA== mdurl@^1.0.1: version "1.0.1" @@ -7781,13 +7781,6 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.3.4: - version "7.3.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" - integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== - dependencies: - lru-cache "^6.0.0" - 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" From 90bfa01ccd4e7a80af24045f7e666f2d98e8bc06 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Apr 2021 14:08:52 -0700 Subject: [PATCH 083/473] chore: bump @babel/parser from 7.13.13 to 7.13.15 (#3286) Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.13.13 to 7.13.15. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.13.15/packages/babel-parser) 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 aa618d8abe15..ec53a45b645e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -172,9 +172,9 @@ js-tokens "^4.0.0" "@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.10", "@babel/parser@^7.13.11": - version "7.13.13" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.13.tgz#42f03862f4aed50461e543270916b47dd501f0df" - integrity sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw== + version "7.13.15" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.15.tgz#8e66775fb523599acb6a289e12929fa5ab0954d8" + integrity sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" From a362243f3b1b817a4ed9a2282b7ede51742369b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Apr 2021 14:09:35 -0700 Subject: [PATCH 084/473] chore: bump eslint-plugin-eslint-plugin from 2.3.0 to 3.0.0 (#3285) Bumps [eslint-plugin-eslint-plugin](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin) from 2.3.0 to 3.0.0. - [Release notes](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/releases) - [Changelog](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 899495949d46..6e0dfa9fa28b 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "downlevel-dts": "^0.7.0", "eslint": "^7.20.0", "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-eslint-plugin": "^2.3.0", + "eslint-plugin-eslint-plugin": "^3.0.0", "eslint-plugin-import": "^2.22.0", "eslint-plugin-jest": "^24.1.3", "glob": "^7.1.6", diff --git a/yarn.lock b/yarn.lock index ec53a45b645e..a17a6a42109e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3721,10 +3721,10 @@ eslint-plugin-eslint-comments@^3.2.0: escape-string-regexp "^1.0.5" ignore "^5.0.5" -eslint-plugin-eslint-plugin@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.3.0.tgz#1b6ffd13b74da5656e27106b79567b162984fc41" - integrity sha512-xER9XjfTLrAgoUzPguPKoreDGtXt2vUnwqAqdElNrkcSbl5K1rGtSOmhgbiqCb7UN4spnjNhIZplHMNWY6Kz/w== +eslint-plugin-eslint-plugin@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.0.0.tgz#7aac3250ae5e8ee7915fcbb305b4033897588dd5" + integrity sha512-KGBjaO3BErr47Swsf3gBWNOyJFYCCjpzfiZUWdqX6XSI+IFRpnDZy44GxjhxmOuThEi3eRh9HzkW7NLNw4SM1Q== eslint-plugin-import@^2.22.0: version "2.22.1" From 325f8885b89c30c7ae31a094783e98f8479ffbe2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Apr 2021 14:10:00 -0700 Subject: [PATCH 085/473] chore: bump cspell from 5.3.11 to 5.3.12 (#3284) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.3.11 to 5.3.12. - [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.11...v5.3.12) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 120 +++++++++++++++++++++++++++--------------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/yarn.lock b/yarn.lock index a17a6a42109e..f24823f54135 100644 --- a/yarn.lock +++ b/yarn.lock @@ -461,10 +461,10 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.3.8": - version "5.3.8" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.3.8.tgz#4b29e2e081355032c02b53b2083cdb8e107219b1" - integrity sha512-cKQrpCtoiJxly8o/84BHUtEyTqY4doNLGASe2gXnoQi0Pmxrp+evtPsDxeDBqpceEsP205KuyzfeAHYYgVer1w== +"@cspell/cspell-bundled-dicts@^5.3.12": + version "5.3.12" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.3.12.tgz#5ade1c920a778da90af89da27faa7836118e9125" + integrity sha512-epDAs9OsULLZP3tPkqVIZ/5OMpE77J6ACnzMEJVN/oVOSgIncKuAzHXG6Qnw1egeCZ+hsZNl8hG09dJ4lxI0Nw== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" @@ -481,7 +481,7 @@ "@cspell/dict-en_us" "^1.2.40" "@cspell/dict-filetypes" "^1.1.5" "@cspell/dict-fonts" "^1.0.14" - "@cspell/dict-fullstack" "^1.0.36" + "@cspell/dict-fullstack" "^1.0.37" "@cspell/dict-golang" "^1.1.24" "@cspell/dict-haskell" "^1.0.13" "@cspell/dict-html" "^1.1.6" @@ -490,21 +490,21 @@ "@cspell/dict-latex" "^1.0.25" "@cspell/dict-lorem-ipsum" "^1.0.22" "@cspell/dict-lua" "^1.0.16" - "@cspell/dict-node" "^1.0.10" - "@cspell/dict-npm" "^1.0.10" + "@cspell/dict-node" "^1.0.11" + "@cspell/dict-npm" "^1.0.11" "@cspell/dict-php" "^1.0.23" "@cspell/dict-powershell" "^1.0.14" "@cspell/dict-python" "^1.0.33" "@cspell/dict-ruby" "^1.0.13" "@cspell/dict-rust" "^1.0.22" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.26" - "@cspell/dict-typescript" "^1.0.16" + "@cspell/dict-software-terms" "^1.0.27" + "@cspell/dict-typescript" "^1.0.17" -"@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/cspell-types@^5.3.12": + version "5.3.12" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.3.12.tgz#f02a6102901f77c4f1f601cf62be0fd788a50648" + integrity sha512-XiTQ6ngDvclfz/uzTpvukCgaoLmk+L2tGZPNDQmL2m5ylBs7eiqUwtnFyCl5NTvuZ7PCu/n7NrAsC5brqWezCA== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -581,10 +581,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-fonts/-/dict-fonts-1.0.14.tgz#7b18129910d30bd23cd9187d0c0009dfc3fef4ba" integrity sha512-VhIX+FVYAnqQrOuoFEtya6+H72J82cIicz9QddgknsTqZQ3dvgp6lmVnsQXPM3EnzA8n1peTGpLDwHzT7ociLA== -"@cspell/dict-fullstack@^1.0.36": - version "1.0.36" - resolved "https://registry.yarnpkg.com/@cspell/dict-fullstack/-/dict-fullstack-1.0.36.tgz#47c9d1b515405751be40cc177608e1ea6d121c02" - integrity sha512-npScBMAoZsjVE5uC1I72vmM1FCYnqzHH1ujgiBkbKd6Dp73VZ1f6OtpSQgqq9/onb0mSmMVF2kw4gPj8BlwGHg== +"@cspell/dict-fullstack@^1.0.37": + version "1.0.37" + resolved "https://registry.yarnpkg.com/@cspell/dict-fullstack/-/dict-fullstack-1.0.37.tgz#0d3bf8fff97a320037cc9823942b056d194a45a2" + integrity sha512-ljVzUdIlBENMiyHUV06007hz2FPRt+BQmC9Jgn6iGIEQeAQp37Q6oIDmxv2lD65ScEIbysxXuaUgJ5x0j4a48A== "@cspell/dict-golang@^1.1.24": version "1.1.24" @@ -626,15 +626,15 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-lua/-/dict-lua-1.0.16.tgz#c0ca43628f8927fc10731fd27cd9ee0af651bf6a" integrity sha512-YiHDt8kmHJ8nSBy0tHzaxiuitYp+oJ66ffCYuFWTNB3//Y0SI4OGHU3omLsQVeXIfCeVrO4DrVvRDoCls9B5zQ== -"@cspell/dict-node@^1.0.10": - version "1.0.10" - resolved "https://registry.yarnpkg.com/@cspell/dict-node/-/dict-node-1.0.10.tgz#ed78fd80cb99087a817bc7773e64f1e8431171b5" - integrity sha512-MnLy0pOcd+Zo8+M8VmumrIQN5SuAduZZrYKHhvXfxdVfX5vl5BfD6Gl25hzH0DrlAVlJOWAnkMZZFMYh4nGWRA== +"@cspell/dict-node@^1.0.11": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@cspell/dict-node/-/dict-node-1.0.11.tgz#c5a9dbb6dd096850910a5d7bd5c1e78d81df63af" + integrity sha512-q66zAqtNmuvZGKt4stRwQPFLsbOjZGGZOZ1HEbqpOkicxvF0BWhR0Di/JBq27PDxeqQP3S5sLeogQTSNQBuTww== -"@cspell/dict-npm@^1.0.10": - version "1.0.10" - resolved "https://registry.yarnpkg.com/@cspell/dict-npm/-/dict-npm-1.0.10.tgz#327ad3855effcfbf6d2dbb6f655ed29e729dd7a8" - integrity sha512-LxLjMOyELWtVBHpive60G3MJseid30M9GR5Vodo9cT6lqT1CkbdsNP9j3oTwVXHTMKB3I+IOHNapuFG1ILcEew== +"@cspell/dict-npm@^1.0.11": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@cspell/dict-npm/-/dict-npm-1.0.11.tgz#e19f746c76a657be96297d0c68fb4dcc62ad162c" + integrity sha512-mokmv9/Yk1yliDz97drWyuDWv7eKGEcFhdM43YSPK7GuMLh6i2ULOmORPFhUcjxQjPf0uySMDA2JguiQ4m5Lmg== "@cspell/dict-php@^1.0.23": version "1.0.23" @@ -666,15 +666,15 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.26": - version "1.0.26" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.26.tgz#ce504130dfa3c6ebef58c5c5e41d30484ab5f7e8" - integrity sha512-NN+mv6VnCwxEWzGxOgFG4akDIRvY0j8slHmgxtoPGKDm+K22zvZITxFwF3/NHGOSxQ4n2hW6sYjqMpxAPGhjCQ== +"@cspell/dict-software-terms@^1.0.27": + version "1.0.27" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.27.tgz#fe3db2ea4aff05ea5f72966370c0025c89c39be7" + integrity sha512-O6wCGuFSnr9G9Sr62zc7/XyruRRPI0/PJ0xZj8/R+hr+vFjDaScQnkqj10gTVoLAshk1TjL5Firnzyz3ibfgdQ== -"@cspell/dict-typescript@^1.0.16": - version "1.0.16" - resolved "https://registry.yarnpkg.com/@cspell/dict-typescript/-/dict-typescript-1.0.16.tgz#18d20a91c4caf52540c795921a50b0e4ce3bc50c" - integrity sha512-DEKi6vD605ebDhCC4Hrtz29k59TcijPVsmVKheTpMrL1MD/S96Ftb19gW0pEIVK9vwYZIljmGwgz4qYyuM5Liw== +"@cspell/dict-typescript@^1.0.17": + version "1.0.17" + resolved "https://registry.yarnpkg.com/@cspell/dict-typescript/-/dict-typescript-1.0.17.tgz#56ae757bdbf785e90846e62297fe1295c58468f4" + integrity sha512-CXCuXcrgAc56P3kL9I6gW6bZwTs6t3duyAtHerHg5YAYbPs6/4nXgniQgLgu8kjFHFy07XrqaaBdLU9V2DmMtQ== "@eslint/eslintrc@^0.3.0": version "0.3.0" @@ -3164,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.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== +cspell-glob@^5.3.12: + version "5.3.12" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.3.12.tgz#c40af7fb0f06954ec93a2783720eaf19c7ab40c5" + integrity sha512-A/a5WaZhxzzwfVzkCPVHbVY+SejkDLOI6FAd8zcHDIsIkoBxfJ8FZhoEEspY6VjpHuPGgMxUu/MVbzcaQJwkGQ== dependencies: micromatch "^4.0.2" -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== +cspell-io@^5.3.12: + version "5.3.12" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.3.12.tgz#9eef76d4691f0b99016275a7d02abd0afe2964a2" + integrity sha512-SMVG07ctDUvOADuo+jCAo759eKpqVKXFClDiHUX3DOHowOdnjiZJozK9zh1uGVzCPZDjmoIueFxN4daPIcyRmw== dependencies: iconv-lite "^0.6.2" iterable-to-stream "^1.0.1" -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== +cspell-lib@^5.3.12: + version "5.3.12" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.3.12.tgz#4c89638cb9383d8a0c390b5004f8aec0658d8d33" + integrity sha512-Dw8dTeB//5aYK8b5o+ulBJg0iFp+seBQoQKvstPer1tbU3JJTBXx8JJIZlJ5h8934oUYh4IWPyX/JpARaNekQw== dependencies: - "@cspell/cspell-bundled-dicts" "^5.3.8" - "@cspell/cspell-types" "^5.3.11" + "@cspell/cspell-bundled-dicts" "^5.3.12" + "@cspell/cspell-types" "^5.3.12" comment-json "^4.1.0" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-glob "^5.3.11" - cspell-io "^5.3.11" - cspell-trie-lib "^5.3.11" + cspell-glob "^5.3.12" + cspell-io "^5.3.12" + cspell-trie-lib "^5.3.12" 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.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== +cspell-trie-lib@^5.3.12: + version "5.3.12" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.3.12.tgz#2518e6504d252fbbcfb0de85ce162f1698096dee" + integrity sha512-s26GqQhwPRuOP2KPLGhaRdPMlMqOSR1K06q/H1K5RW31ISrA67Gy/O/wTsFcz3j3gjB9yFjsxWYrrjD/inDjsQ== dependencies: fs-extra "^9.1.0" gensequence "^3.1.1" cspell@^5.2.4: - version "5.3.11" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.3.11.tgz#9cb18ee29691e806c87fa6e6b06b9c8196fbe720" - integrity sha512-GQuIFkcHx4L/0xStV/wjjswR7/AG1BYnkm7F4pMBvxM1yvUxDFts2OsdLWJLWY/2nVsPQGi8z2oDnFkNh8xdXg== + version "5.3.12" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.3.12.tgz#80621be7971e475d19c412ee295474ffe90c27f6" + integrity sha512-lwBVphwIvD/TkDZAjzNStpKqk9hAUfKTA5VlnXHCF4l0inw0r8LL17OnxcAAMo44tewxfo9UMEhx0ql68dSNrw== dependencies: - "@cspell/cspell-types" "^5.3.11" + "@cspell/cspell-types" "^5.3.12" chalk "^4.1.0" commander "^7.2.0" comment-json "^4.1.0" - cspell-glob "^5.3.11" - cspell-lib "^5.3.11" + cspell-glob "^5.3.12" + cspell-lib "^5.3.12" fs-extra "^9.1.0" get-stdin "^8.0.0" glob "^7.1.6" From dd20eb226bc217a36fa81587caac2ac3d825b4e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Apr 2021 14:10:23 -0700 Subject: [PATCH 086/473] chore: bump eslint-plugin-jest from 24.3.4 to 24.3.5 (#3283) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.3.4 to 24.3.5. - [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.4...v24.3.5) 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 f24823f54135..d413ec26a3ed 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.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.4.tgz#6d90c3554de0302e879603dd6405474c98849f19" - integrity sha512-3n5oY1+fictanuFkTWPwSlehugBTAgwLnYLFsCllzE3Pl1BwywHl5fL0HFxmMjoQY8xhUDk8uAWc3S4JOHGh3A== + version "24.3.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.5.tgz#71f0b580f87915695c286c3f0eb88cf23664d044" + integrity sha512-XG4rtxYDuJykuqhsOqokYIR84/C8pRihRtEpVskYLbIIKGwPNW2ySxdctuVzETZE+MbF/e7wmsnbNVpzM0rDug== dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" From 26d71b57fbff013b9c9434c96e2ba98c6c541259 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Tue, 13 Apr 2021 00:28:47 -0400 Subject: [PATCH 087/473] chore: enable restrict-plus-operands internally (#3282) --- .eslintrc.js | 8 +++++++- packages/typescript-estree/tests/ast-alignment/parse.ts | 2 +- packages/typescript-estree/tests/ast-alignment/utils.ts | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 5feb95fb9120..bbaf3974244a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -67,7 +67,6 @@ module.exports = { '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/restrict-plus-operands': 'off', '@typescript-eslint/restrict-template-expressions': 'off', // TODO - enable this '@typescript-eslint/naming-convention': 'off', @@ -188,6 +187,13 @@ module.exports = { 'jest/no-deprecated-functions': 'error', }, }, + // test utility scripts + { + files: ['tests/**/*.js'], + rules: { + '@typescript-eslint/restrict-plus-operands': 'off', + }, + }, // plugin source files { files: [ diff --git a/packages/typescript-estree/tests/ast-alignment/parse.ts b/packages/typescript-estree/tests/ast-alignment/parse.ts index 46bef153a0f1..6a17b4096b26 100644 --- a/packages/typescript-estree/tests/ast-alignment/parse.ts +++ b/packages/typescript-estree/tests/ast-alignment/parse.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/restrict-plus-operands */ import type babelParser from '@babel/parser'; import { ParserPlugin } from '@babel/parser'; diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index 81f4ae71c4d2..99956cb694f0 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -1,5 +1,5 @@ // babel types are something we don't really care about -/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/restrict-plus-operands */ import { AST_NODE_TYPES, TSESTree } from '../../src/ts-estree'; import { deeplyCopy, omitDeep } from '../../tools/test-utils'; import * as BabelTypes from '@babel/types'; From b4cf0da0232eb7beea00150b5e9a51c11e2b24ab Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 19 Apr 2021 12:45:10 -0400 Subject: [PATCH 088/473] chore: enable `no-unsafe-call` locally (#3281) --- .eslintrc.js | 3 +- package.json | 3 +- .../eslint-plugin-tslint/src/custom-linter.ts | 7 ++-- .../src/eslint-utils/RuleTester.ts | 1 + packages/parser/tests/tools/test-utils.ts | 6 ++-- packages/typescript-estree/src/convert.ts | 2 +- .../tests/lib/convert.test.ts | 2 +- .../typescript-estree/tests/lib/parse.test.ts | 2 +- .../typescript-estree/tools/test-utils.ts | 6 ++-- .../utils/jest-snapshot-resolver.js | 1 - tools/generate-contributors.ts | 2 +- tsconfig.eslint.json | 3 ++ yarn.lock | 32 +++++++++++-------- 13 files changed, 38 insertions(+), 32 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index bbaf3974244a..5d944cceacbe 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -64,7 +64,6 @@ module.exports = { // TODO - enable these new recommended rules '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/restrict-template-expressions': 'off', @@ -191,6 +190,8 @@ module.exports = { { files: ['tests/**/*.js'], rules: { + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/restrict-plus-operands': 'off', }, }, diff --git a/package.json b/package.json index 6e0dfa9fa28b..431c13ac5668 100644 --- a/package.json +++ b/package.json @@ -84,6 +84,7 @@ "@types/lodash": "^4.14.149", "@types/marked": "^2.0.0", "@types/node": "^14.14.27", + "@types/node-fetch": "^2.5.10", "@types/prettier": "^2.2.1", "@types/rimraf": "^3.0.0", "@types/semver": "^7.3.4", @@ -99,13 +100,13 @@ "eslint-plugin-jest": "^24.1.3", "glob": "^7.1.6", "husky": "^5.0.9", - "isomorphic-fetch": "^3.0.0", "jest": "^26.6.3", "jest-specific-snapshot": "^4.0.0", "lerna": "^3.22.1", "lint-staged": "^10.2.13", "make-dir": "^3.1.0", "markdownlint-cli": "^0.27.1", + "node-fetch": "^2.6.1", "prettier": "^2.2.1", "rimraf": "^3.0.2", "ts-jest": "^26.5.1", diff --git a/packages/eslint-plugin-tslint/src/custom-linter.ts b/packages/eslint-plugin-tslint/src/custom-linter.ts index eb8527b99d71..9fcaf9c2b3ed 100644 --- a/packages/eslint-plugin-tslint/src/custom-linter.ts +++ b/packages/eslint-plugin-tslint/src/custom-linter.ts @@ -1,11 +1,8 @@ import { ILinterOptions, Linter, LintResult } from 'tslint'; import { Program, SourceFile } from 'typescript'; -// We need to access the program, but Linter has private program already -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const TSLintLinter = Linter as any; - -export class CustomLinter extends TSLintLinter { +// @ts-expect-error - We need to access the program, but Linter has private program already +export class CustomLinter extends Linter { constructor(options: ILinterOptions, private readonly program: Program) { super(options, program); } diff --git a/packages/experimental-utils/src/eslint-utils/RuleTester.ts b/packages/experimental-utils/src/eslint-utils/RuleTester.ts index 50c3794328be..a3210162e982 100644 --- a/packages/experimental-utils/src/eslint-utils/RuleTester.ts +++ b/packages/experimental-utils/src/eslint-utils/RuleTester.ts @@ -32,6 +32,7 @@ class RuleTester extends TSESLint.RuleTester { try { // instead of creating a hard dependency, just use a soft require // a bit weird, but if they're using this tooling, it'll be installed + // eslint-disable-next-line @typescript-eslint/no-unsafe-call require(parser).clearCaches(); } catch { // ignored diff --git a/packages/parser/tests/tools/test-utils.ts b/packages/parser/tests/tools/test-utils.ts index 0a14468fee0f..575ac1dc5b73 100644 --- a/packages/parser/tests/tools/test-utils.ts +++ b/packages/parser/tests/tools/test-utils.ts @@ -53,13 +53,13 @@ export function createSnapshotTestBlock( try { const result = parse(); expect(result).toMatchSnapshot(); - } catch (e) { + } catch (error) { /** * If we are deliberately throwing because of encountering an unknown * AST_NODE_TYPE, we rethrow to cause the test to fail */ - if (e.message.match('Unknown AST_NODE_TYPE')) { - throw new Error(e); + if (/Unknown AST_NODE_TYPE/.exec((error as Error).message)) { + throw new Error(error); } expect(parse).toThrowErrorMatchingSnapshot(); } diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 0c0b552e2d59..e0c34e513ec9 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1,5 +1,5 @@ // There's lots of funny stuff due to the typing of ts.Node -/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-call */ import * as ts from 'typescript'; import { canContainDirective, diff --git a/packages/typescript-estree/tests/lib/convert.test.ts b/packages/typescript-estree/tests/lib/convert.test.ts index 52bd377a5bfe..a95916138d76 100644 --- a/packages/typescript-estree/tests/lib/convert.test.ts +++ b/packages/typescript-estree/tests/lib/convert.test.ts @@ -1,5 +1,5 @@ // deeplyCopy is private internal -/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-call */ import { Converter } from '../../src/convert'; import * as ts from 'typescript'; diff --git a/packages/typescript-estree/tests/lib/parse.test.ts b/packages/typescript-estree/tests/lib/parse.test.ts index 33b393670d09..d9057c653b7b 100644 --- a/packages/typescript-estree/tests/lib/parse.test.ts +++ b/packages/typescript-estree/tests/lib/parse.test.ts @@ -506,7 +506,7 @@ describe('parseAndGenerateServices', () => { /** * Aligns paths between environments, node for windows uses `\`, for linux and mac uses `/` */ - error.message = error.message.replace(/\\(?!["])/gm, '/'); + error.message = (error as Error).message.replace(/\\(?!["])/gm, '/'); throw error; } }; diff --git a/packages/typescript-estree/tools/test-utils.ts b/packages/typescript-estree/tools/test-utils.ts index 1b386be14498..362560bc08cc 100644 --- a/packages/typescript-estree/tools/test-utils.ts +++ b/packages/typescript-estree/tools/test-utils.ts @@ -35,13 +35,13 @@ export function createSnapshotTestBlock( try { const result = parse(); expect(result).toMatchSnapshot(); - } catch (e) { + } catch (error) { /** * If we are deliberately throwing because of encountering an unknown * AST_NODE_TYPE, we rethrow to cause the test to fail */ - if (e.message.match('Unknown AST_NODE_TYPE')) { - throw new Error(e); + if (/Unknown AST_NODE_TYPE/.exec((error as Error).message)) { + throw new Error(error); } expect(parse).toThrowErrorMatchingSnapshot(); } diff --git a/tests/integration/utils/jest-snapshot-resolver.js b/tests/integration/utils/jest-snapshot-resolver.js index 366a96118398..3032ef5d575c 100644 --- a/tests/integration/utils/jest-snapshot-resolver.js +++ b/tests/integration/utils/jest-snapshot-resolver.js @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/explicit-function-return-type */ /** * Use a jest snapshotResolver to map the test snapshot output back to the * linked volume. This means that even though we are running our tests inside diff --git a/tools/generate-contributors.ts b/tools/generate-contributors.ts index cd5b63ea98fa..343263b88dee 100644 --- a/tools/generate-contributors.ts +++ b/tools/generate-contributors.ts @@ -3,7 +3,7 @@ // this endpoint returns a list of contributors sorted by number of contributions import * as fs from 'fs'; -import 'isomorphic-fetch'; +import fetch from 'node-fetch'; import * as path from 'path'; const IGNORED_USERS = new Set([ diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 40defd4b3b8d..0cfd463e6b2d 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,4 +1,7 @@ { + "compilerOptions": { + "types": ["@types/node"] + }, "extends": "./tsconfig.base.json", "include": ["tests/**/*.ts", "tools/**/*.ts", ".eslintrc.js"] } diff --git a/yarn.lock b/yarn.lock index d413ec26a3ed..ee93e366ff83 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1932,6 +1932,14 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= +"@types/node-fetch@^2.5.10": + version "2.5.10" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.10.tgz#9b4d4a0425562f9fcea70b12cb3fcdd946ca8132" + integrity sha512-IpkX0AasN44hgEad0gEF/V6EgR5n69VEqPEgnmoM8GsIGro3PowbWs4tR6IhxUTyPLpOn+fiGG6nrQhcmoCuIQ== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + "@types/node@*", "@types/node@>= 8", "@types/node@^14.14.27": version "14.14.37" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.37.tgz#a3dd8da4eb84a996c36e331df98d82abd76b516e" @@ -2861,7 +2869,7 @@ columnify@^1.5.4: strip-ansi "^3.0.0" wcwidth "^1.0.0" -combined-stream@^1.0.6, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -4179,6 +4187,15 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -5169,14 +5186,6 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= -isomorphic-fetch@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz#0267b005049046d2421207215d45d6a262b8b8b4" - integrity sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA== - dependencies: - node-fetch "^2.6.1" - whatwg-fetch "^3.4.1" - isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -8898,11 +8907,6 @@ whatwg-encoding@^1.0.5: dependencies: iconv-lite "0.4.24" -whatwg-fetch@^3.4.1: - version "3.5.0" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.5.0.tgz#605a2cd0a7146e5db141e29d1c62ab84c0c4c868" - integrity sha512-jXkLtsR42xhXg7akoDKvKWE40eJeI+2KZqcp2h3NsOrRnDvtWX36KcKl30dy+hxECivdk2BVUHVNrPtoMBUx6A== - whatwg-mimetype@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" From f661d187b6d9c442db533ba79afd9f515aa6f582 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Apr 2021 13:24:31 -0700 Subject: [PATCH 089/473] chore: bump @types/node from 14.14.37 to 14.14.41 (#3297) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.37 to 14.14.41. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) 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 ee93e366ff83..3b15240298f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1941,9 +1941,9 @@ form-data "^3.0.0" "@types/node@*", "@types/node@>= 8", "@types/node@^14.14.27": - version "14.14.37" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.37.tgz#a3dd8da4eb84a996c36e331df98d82abd76b516e" - integrity sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw== + version "14.14.41" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.41.tgz#d0b939d94c1d7bd53d04824af45f1139b8c45615" + integrity sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g== "@types/normalize-package-data@^2.4.0": version "2.4.0" From 9dde6a88001991d0ce8c1b95cf9127b776170db6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Apr 2021 13:24:40 -0700 Subject: [PATCH 090/473] chore: bump @types/marked from 2.0.1 to 2.0.2 (#3298) Bumps [@types/marked](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/marked) from 2.0.1 to 2.0.2. - [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 3b15240298f2..780869ce3f38 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.1" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.1.tgz#bbb6d1b570a54652a31953c77972f65b6f9235a4" - integrity sha512-/CFe3HvXMkh7YkJS0DGRsC0hgwWZDZbSCmY/X00bSCnZ4ukS2Glk9veIkRoPu2ElMbKpjxseXn1y9MkTwGHVjw== + version "2.0.2" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.2.tgz#33a15106383f6e42cd6bdd38093e6b19904e29e1" + integrity sha512-P4zanhCQKs4tiWPPBGpB7lHflgFCP9DFGNI5YtpW9MALKoy2qs9rHNWJ+z55cegD9uCfnmsKuaosq9FNvbxrOw== "@types/minimatch@*": version "3.0.3" From f150fa7c645c6ab875caf71ad2a6d8d485b24783 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Apr 2021 13:24:51 -0700 Subject: [PATCH 091/473] chore: bump eslint-plugin-eslint-plugin from 3.0.0 to 3.0.2 (#3299) Bumps [eslint-plugin-eslint-plugin](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin) from 3.0.0 to 3.0.2. - [Release notes](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/releases) - [Changelog](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 780869ce3f38..797b5e2697ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3730,9 +3730,11 @@ eslint-plugin-eslint-comments@^3.2.0: ignore "^5.0.5" eslint-plugin-eslint-plugin@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.0.0.tgz#7aac3250ae5e8ee7915fcbb305b4033897588dd5" - integrity sha512-KGBjaO3BErr47Swsf3gBWNOyJFYCCjpzfiZUWdqX6XSI+IFRpnDZy44GxjhxmOuThEi3eRh9HzkW7NLNw4SM1Q== + version "3.0.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.0.2.tgz#8ce72a1e06bad8c4e6ddc1c932e236b8184c1bce" + integrity sha512-pTJhDCiuwa/NgwjsKrlCnF2ExULcG0xK87HdckFpVbaKb2GOd2UUL4L/HtjUV1N3jlrOdtyTfdX1J+oCD01j4Q== + dependencies: + eslint-utils "^2.1.0" eslint-plugin-import@^2.22.0: version "2.22.1" From 348711cc225758ab6138e5a45f999c584ad99327 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Apr 2021 13:25:02 -0700 Subject: [PATCH 092/473] chore: bump ts-jest from 26.5.4 to 26.5.5 (#3300) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.4 to 26.5.5. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.5.4...v26.5.5) 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 797b5e2697ac..6a9f72346b6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8538,9 +8538,9 @@ trim-off-newlines@^1.0.0: integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= ts-jest@^26.5.1: - version "26.5.4" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.4.tgz#207f4c114812a9c6d5746dd4d1cdf899eafc9686" - integrity sha512-I5Qsddo+VTm94SukBJ4cPimOoFZsYTeElR2xy6H2TOVs+NsvgYglW8KuQgKoApOKuaU/Ix/vrF9ebFZlb5D2Pg== + version "26.5.5" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.5.tgz#e40481b6ee4dd162626ba481a2be05fa57160ea5" + integrity sha512-7tP4m+silwt1NHqzNRAPjW1BswnAhopTdc2K3HEkRZjF0ZG2F/e/ypVH0xiZIMfItFtD3CX0XFbwPzp9fIEUVg== dependencies: bs-logger "0.x" buffer-from "1.x" From 1c1b572c3000d72cfe665b7afbada0ec415e7855 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Apr 2021 13:25:59 -0700 Subject: [PATCH 093/473] chore: bump ssri from 6.0.1 to 6.0.2 (#3302) Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2. - [Release notes](https://github.com/npm/ssri/releases) - [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md) - [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2) 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 6a9f72346b6a..6d63f30fdd4b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8072,9 +8072,9 @@ sshpk@^1.7.0: tweetnacl "~0.14.0" ssri@^6.0.0, ssri@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" - integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== + version "6.0.2" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" + integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q== dependencies: figgy-pudding "^3.5.1" From 2523f9974fbfa6e833b4e959ed3306250910b0bf Mon Sep 17 00:00:00 2001 From: James Henry Date: Tue, 4 May 2021 13:42:40 +0400 Subject: [PATCH 094/473] chore: iterating on contributors generation --- .github/workflows/generate-contributors.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/generate-contributors.yml b/.github/workflows/generate-contributors.yml index 3acc1a98429f..a74dee4ccda9 100644 --- a/.github/workflows/generate-contributors.yml +++ b/.github/workflows/generate-contributors.yml @@ -1,8 +1,7 @@ name: "Generate contributors" on: - schedule: - - cron: "0 0 1 * *" + workflow_dispatch: env: PRIMARY_NODE_VERSION: 12 @@ -37,13 +36,10 @@ jobs: - 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 + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "chore: update contributors" + title: "chore: update contributors" + branch: auto-update-contributors From 5217c249a872ad5f9384cfc6fac2a15fa17046ca Mon Sep 17 00:00:00 2001 From: James Henry Date: Tue, 4 May 2021 13:56:10 +0400 Subject: [PATCH 095/473] chore: iterating on contributors generation --- .github/workflows/generate-contributors.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-contributors.yml b/.github/workflows/generate-contributors.yml index a74dee4ccda9..fed052364bc0 100644 --- a/.github/workflows/generate-contributors.yml +++ b/.github/workflows/generate-contributors.yml @@ -21,7 +21,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v1 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 }} @@ -39,7 +39,11 @@ jobs: - name: Create Pull Request uses: peter-evans/create-pull-request@v3 with: - token: ${{ secrets.GITHUB_TOKEN }} + # The standard GITHUB_TOKEN cannot be used as it will not trigger status checks on + # the PR that gets created (this behavior is not specific to this action). + # https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#triggering-further-workflow-runs + token: ${{ secrets.JAMES_HENRY_GH_TOKEN }} commit-message: "chore: update contributors" title: "chore: update contributors" + body: "" branch: auto-update-contributors From 5706e0e53070589c0bb0d53ff2ecb0ded076b704 Mon Sep 17 00:00:00 2001 From: James Henry Date: Tue, 4 May 2021 10:06:26 +0000 Subject: [PATCH 096/473] chore: publish v4.22.1 --- CHANGELOG.md | 8 ++++++++ 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 | 8 ++++++++ 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, 118 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0dd29fa0e6f..0a1c7c9bdf60 100644 --- a/CHANGELOG.md +++ b/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.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + + + + + # [4.22.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.21.0...v4.22.0) (2021-04-12) diff --git a/lerna.json b/lerna.json index 8726f2b8e5a6..559d00dca269 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.22.0", + "version": "4.22.1", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index b620c1012e17..0d3715d66a7c 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.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [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 diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 70155100dd14..f0c64a185df3 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.22.0", + "version": "4.22.1", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.22.0", + "@typescript-eslint/experimental-utils": "4.22.1", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index d9ee27415ed1..d24f79ee7598 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.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [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 diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 824b80eac1f3..fcd692ca596e 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.22.0", + "version": "4.22.1", "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.22.0", + "@typescript-eslint/experimental-utils": "4.22.1", "lodash": "^4.17.15" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.22.0" + "@typescript-eslint/parser": "4.22.1" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 8e9fdc4aa5be..fb6b1f65dd07 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/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.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + + + + + # [4.22.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.21.0...v4.22.0) (2021-04-12) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index fc36b9aeba66..38db92807b9e 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.22.0", + "version": "4.22.1", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.22.0", - "@typescript-eslint/scope-manager": "4.22.0", + "@typescript-eslint/experimental-utils": "4.22.1", + "@typescript-eslint/scope-manager": "4.22.1", "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 1664bc9b1e37..063cc2fbe70f 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.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + # [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 diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 39f3e8c44d0e..b3402e64bde0 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.22.0", + "version": "4.22.1", "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.22.0", - "@typescript-eslint/types": "4.22.0", - "@typescript-eslint/typescript-estree": "4.22.0", + "@typescript-eslint/scope-manager": "4.22.1", + "@typescript-eslint/types": "4.22.1", + "@typescript-eslint/typescript-estree": "4.22.1", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 885f266ea661..9cf4c93a41da 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.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [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 diff --git a/packages/parser/package.json b/packages/parser/package.json index 5854968fc80d..7aaac815772d 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.22.0", + "version": "4.22.1", "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.22.0", - "@typescript-eslint/types": "4.22.0", - "@typescript-eslint/typescript-estree": "4.22.0", + "@typescript-eslint/scope-manager": "4.22.1", + "@typescript-eslint/types": "4.22.1", + "@typescript-eslint/typescript-estree": "4.22.1", "debug": "^4.1.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.22.0", + "@typescript-eslint/experimental-utils": "4.22.1", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 408236317625..6e810ce89e75 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.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [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 diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index f68939babb44..51f58e98474b 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.22.0", + "version": "4.22.1", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.22.0", - "@typescript-eslint/visitor-keys": "4.22.0" + "@typescript-eslint/types": "4.22.1", + "@typescript-eslint/visitor-keys": "4.22.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.22.0", + "@typescript-eslint/typescript-estree": "4.22.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 69290639ef60..da5b4caeb197 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.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [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 diff --git a/packages/shared-fixtures/package.json b/packages/shared-fixtures/package.json index f9a9fd59ff88..3c06d355b8fa 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.22.0", + "version": "4.22.1", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 966bdae0d4aa..f62ac84b89d4 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.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [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 diff --git a/packages/types/package.json b/packages/types/package.json index 2f05c0465caa..5251c580de59 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.22.0", + "version": "4.22.1", "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 9dbff83d990b..e6363f7ae2da 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.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + # [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 diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 262e429792b3..4f65000f6bc6 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.22.0", + "version": "4.22.1", "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.22.0", - "@typescript-eslint/visitor-keys": "4.22.0", + "@typescript-eslint/types": "4.22.1", + "@typescript-eslint/visitor-keys": "4.22.1", "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.22.0", + "@typescript-eslint/shared-fixtures": "4.22.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 58dc35bbf918..29bc084e5c5d 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.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [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 diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index ef343471c3db..594ca4ce55b1 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.22.0", + "version": "4.22.1", "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.22.0", + "@typescript-eslint/types": "4.22.1", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From f09343a5892e38f671fe03f2623fb527dc5d284c Mon Sep 17 00:00:00 2001 From: James Henry Date: Tue, 4 May 2021 14:14:11 +0400 Subject: [PATCH 097/473] chore: update contributors (#3343) --- .all-contributorsrc | 53 +++++++++++++++++++++++++++++++-------------- CONTRIBUTORS.md | 28 ++++++++++++++---------- 2 files changed, 54 insertions(+), 27 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 3223dd887fc0..9302be7a782e 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -58,6 +58,13 @@ "profile": "https://github.com/G-Rath", "contributions": [] }, + { + "login": "JoshuaKGoldberg", + "name": "Josh Goldberg", + "avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4", + "profile": "https://github.com/JoshuaKGoldberg", + "contributions": [] + }, { "login": "nzakas", "name": "Nicholas C. Zakas", @@ -73,10 +80,10 @@ "contributions": [] }, { - "login": "JoshuaKGoldberg", - "name": "Josh Goldberg", - "avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4", - "profile": "https://github.com/JoshuaKGoldberg", + "login": "yeonjuan", + "name": "YeonJuan", + "avatar_url": "https://avatars.githubusercontent.com/u/41323220?v=4", + "profile": "https://github.com/yeonjuan", "contributions": [] }, { @@ -87,10 +94,10 @@ "contributions": [] }, { - "login": "yeonjuan", - "name": "YeonJuan", - "avatar_url": "https://avatars.githubusercontent.com/u/41323220?v=4", - "profile": "https://github.com/yeonjuan", + "login": "phaux", + "name": "Nikita Stefaniak", + "avatar_url": "https://avatars.githubusercontent.com/u/1270987?v=4", + "profile": "https://github.com/phaux", "contributions": [] }, { @@ -135,13 +142,6 @@ "profile": "https://github.com/mysticatea", "contributions": [] }, - { - "login": "phaux", - "name": "Nikita Stefaniak", - "avatar_url": "https://avatars.githubusercontent.com/u/1270987?v=4", - "profile": "https://github.com/phaux", - "contributions": [] - }, { "login": "azz", "name": "Lucas Azzola", @@ -170,6 +170,13 @@ "profile": "https://github.com/macklinu", "contributions": [] }, + { + "login": "JounQin", + "name": "JounQin", + "avatar_url": "https://avatars.githubusercontent.com/u/8336744?v=4", + "profile": "https://github.com/JounQin", + "contributions": [] + }, { "login": "lukyth", "name": "Kanitkorn Sujautra", @@ -207,7 +214,7 @@ }, { "login": "ldrick", - "name": "Ricky Lippmann", + "name": "ldrick", "avatar_url": "https://avatars.githubusercontent.com/u/3674067?v=4", "profile": "https://github.com/ldrick", "contributions": [] @@ -352,6 +359,20 @@ "profile": "https://github.com/timkraut", "contributions": [] }, + { + "login": "magurotuna", + "name": "Yusuke Tanaka", + "avatar_url": "https://avatars.githubusercontent.com/u/23649474?v=4", + "profile": "https://github.com/magurotuna", + "contributions": [] + }, + { + "login": "Zzzen", + "name": "Zzzen", + "avatar_url": "https://avatars.githubusercontent.com/u/6630042?v=4", + "profile": "https://github.com/Zzzen", + "contributions": [] + }, { "login": "koooge", "name": "koooge", diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 5616c037282c..0a2e0963cfcc 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -16,75 +16,81 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/all-contri
Patricio Trevino


Gareth Jones

+
Josh Goldberg


Nicholas C. Zakas


Jed Fox

-
Josh Goldberg

-
Ben Lichtman


YeonJuan

+
Ben Lichtman

+
Nikita Stefaniak


Scott O'Hara


Retsam

-
Sosuke Suzuki

+
Sosuke Suzuki


Kai Cataldo


Rasmus Eneman


Toru Nagashima

-
Nikita Stefaniak


Lucas Azzola


Danny Fritz


Ika


mackie

+
JounQin


Kanitkorn Sujautra

-
cherryblossom000

+
cherryblossom000


Simen Bekkhus


Anix


Pete Gonzalez

-
Ricky Lippmann

-
Susisu

+
ldrick

+
Susisu


G r e y


Gavin Barron


Kevin Partington


Lucas Duailibe

-
Validark

+
Validark


Pavel Birukov


Shahar Dawn Or


ulrichb


Daniil Dubrava

-
Daniel Nixon

+
Daniel Nixon


Denys Kniazevych


Dimitri Mitropoulos


Ian MacLeod


Jonathan Delgado

-
Philipp A.

+
Philipp A.


Pig Fang


Tadhg McDonald-Jensen


Thomas den Hollander


Tim Kraut

-
koooge

+
Yusuke Tanaka

+
Zzzen

+
koooge


thomas michael wallace


Bence Dányi

+ +
Soobin Bak

+ This list is auto-generated using `yarn generate-contributors`. It shows the top 100 contributors with > 3 contributions. From 0e5cd96b3d15af25d0a36f5efdc26443a0ada285 Mon Sep 17 00:00:00 2001 From: James Henry Date: Tue, 4 May 2021 14:15:11 +0400 Subject: [PATCH 098/473] chore: automate monthly contributors generation --- .github/workflows/generate-contributors.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate-contributors.yml b/.github/workflows/generate-contributors.yml index fed052364bc0..e658217d294f 100644 --- a/.github/workflows/generate-contributors.yml +++ b/.github/workflows/generate-contributors.yml @@ -1,7 +1,8 @@ name: "Generate contributors" on: - workflow_dispatch: + schedule: + - cron: "0 0 1 * *" env: PRIMARY_NODE_VERSION: 12 From 209f6d0c85a86ea97f227a05596d655098fe6401 Mon Sep 17 00:00:00 2001 From: James Henry Date: Wed, 5 May 2021 00:57:30 +0400 Subject: [PATCH 099/473] chore: use actions/cache@v2 in all workflows (#3346) --- .github/workflows/ci.yml | 12 ++-- .github/workflows/generate-contributors.yml | 2 +- .github/workflows/manual-release.yml | 65 --------------------- 3 files changed, 7 insertions(+), 72 deletions(-) delete mode 100644 .github/workflows/manual-release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cae9596da6e..9e1a349e5aa3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 + - 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 }} @@ -74,7 +74,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 + - 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 }} @@ -160,7 +160,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 + - 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 }} @@ -203,7 +203,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 + - 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 }} @@ -242,7 +242,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 + - 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 }} @@ -324,7 +324,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 + - 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 }} diff --git a/.github/workflows/generate-contributors.yml b/.github/workflows/generate-contributors.yml index e658217d294f..c45a78430669 100644 --- a/.github/workflows/generate-contributors.yml +++ b/.github/workflows/generate-contributors.yml @@ -22,7 +22,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 + - 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 }} diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml deleted file mode 100644 index 327d5947236a..000000000000 --- a/.github/workflows/manual-release.yml +++ /dev/null @@ -1,65 +0,0 @@ -# This workflow is used on the rare occassion we need to manually cut a release. -# It can be triggered via the Github UI or the Github API. - -name: Manual publish to Github Releases and NPM - -on: - workflow_dispatch: - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - # Check out as an admin to allow for pushing back to master - token: ${{ secrets.JAMES_HENRY_GH_TOKEN }} - # Check out the branch that was specified as part of the trigger - ref: ${{ github.ref }} - # We need to fetch all tags and branches - fetch-depth: 0 - - - name: Verify head of master hasn't changed - run: | - # We ensure that the latest commit on master is still the one we expected when - # we started the release job, otherwise we exit - if [ "$GITHUB_SHA" != "$(git rev-parse --verify HEAD)" ]; then - echo "ERROR: The commit SHA at the HEAD of master has changed" - echo "Expected: $GITHUB_SHA" - echo "Actual: $(git rev-parse --verify HEAD)" - exit 1; - fi - - - 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 - yarn check:clean-workspace-after-install - - - name: Run build - run: | - yarn build - - - name: Determine what version to release and publish to Github (--yes skips the confirmation prompt) - run: | - # Required for github release to work - git config user.name 'James Henry' - git config user.email 'james@henry.sc' - - GH_TOKEN=${{ secrets.JAMES_HENRY_GH_TOKEN }} npx lerna version --loglevel=silly --yes --conventional-commits --exact --force-publish --github-release -m "chore: publish %s" - - - name: Publish the updated versions to NPM (--yes skips the confirmation prompt) - run: npx lerna publish from-package --yes - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 25ea953cc60b118bd385c71e0a9b61c286c26fcf Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Tue, 4 May 2021 16:15:37 -0700 Subject: [PATCH 100/473] feat: refactor to split AST specification out as its own module (#2911) --- .eslintignore | 3 + .eslintrc.js | 23 + .gitignore | 4 + .vscode/settings.json | 4 +- package.json | 3 +- packages/ast-spec/LICENSE | 21 + packages/ast-spec/README.md | 24 + packages/ast-spec/api-extractor.json | 31 + packages/ast-spec/jest.config.js | 20 + packages/ast-spec/package.json | 46 + .../{types => ast-spec}/src/ast-node-types.ts | 22 +- .../src/ast-token-types.ts | 4 +- packages/ast-spec/src/base/Accessibility.ts | 1 + packages/ast-spec/src/base/BaseNode.ts | 22 + packages/ast-spec/src/base/BaseToken.ts | 8 + .../ast-spec/src/base/BinaryExpressionBase.ts | 8 + .../ast-spec/src/base/ClassDeclarationBase.ts | 20 + .../ast-spec/src/base/ClassPropertyBase.ts | 34 + .../src/base/FunctionDeclarationBase.ts | 18 + .../ast-spec/src/base/LineAndColumnData.ts | 10 + packages/ast-spec/src/base/LiteralBase.ts | 6 + .../ast-spec/src/base/MethodDefinitionBase.ts | 35 + .../ast-spec/src/base/OptionalRangeAndLoc.ts | 11 + packages/ast-spec/src/base/Range.ts | 6 + packages/ast-spec/src/base/SourceLocation.ts | 12 + .../src/base/TSFunctionSignatureBase.ts | 10 + packages/ast-spec/src/base/TSHeritageBase.ts | 8 + .../ast-spec/src/base/UnaryExpressionBase.ts | 10 + .../src/declaration/ClassDeclaration/spec.ts | 6 + .../declaration/ExportAllDeclaration/spec.ts | 11 + .../ExportDefaultDeclaration/spec.ts | 10 + .../ExportNamedDeclaration/spec.ts | 13 + .../declaration/FunctionDeclaration/spec.ts | 8 + .../src/declaration/TSDeclareFunction/spec.ts | 6 + .../src/declaration/TSEnumDeclaration/spec.ts | 14 + .../TSImportEqualsDeclaration/spec.ts | 13 + .../TSInterfaceDeclaration/spec.ts | 17 + .../declaration/TSModuleDeclaration/spec.ts | 26 + .../TSNamespaceExportDeclaration/spec.ts | 8 + .../TSTypeAliasDeclaration/spec.ts | 13 + .../declaration/VariableDeclaration/spec.ts | 11 + packages/ast-spec/src/declaration/spec.ts | 13 + .../src/element/ClassProperty/spec.ts | 19 + .../src/element/MethodDefinition/spec.ts | 19 + .../ast-spec/src/element/Property/spec.ts | 37 + .../src/element/SpreadElement/spec.ts | 8 + .../element/TSAbstractClassProperty/spec.ts | 19 + .../TSAbstractMethodDefinition/spec.ts | 19 + .../TSCallSignatureDeclaration/spec.ts | 6 + .../TSConstructSignatureDeclaration/spec.ts | 7 + .../ast-spec/src/element/TSEnumMember/spec.ts | 41 + .../src/element/TSIndexSignature/spec.ts | 15 + .../src/element/TSMethodSignature/spec.ts | 39 + .../src/element/TSPropertySignature/spec.ts | 39 + packages/ast-spec/src/element/spec.ts | 12 + .../src/expression/ArrayExpression/spec.ts | 8 + .../ArrowFunctionExpression/spec.ts | 19 + .../expression/AssignmentExpression/spec.ts | 23 + .../src/expression/AwaitExpression/spec.ts | 16 + .../src/expression/BinaryExpression/spec.ts | 6 + .../src/expression/CallExpression/spec.ts | 13 + .../src/expression/ChainExpression/spec.ts | 8 + .../src/expression/ClassExpression/spec.ts | 6 + .../expression/ConditionalExpression/spec.ts | 10 + .../src/expression/FunctionExpression/spec.ts | 8 + .../src/expression/Identifier/spec.ts | 12 + .../src/expression/ImportExpression/spec.ts | 8 + .../src/expression/JSXElement/spec.ts | 12 + .../src/expression/JSXFragment/spec.ts | 12 + .../src/expression/LogicalExpression/spec.ts | 6 + .../src/expression/MemberExpression/spec.ts | 28 + .../src/expression/MetaProperty/spec.ts | 9 + .../src/expression/NewExpression/spec.ts | 12 + .../src/expression/ObjectExpression/spec.ts | 8 + .../src/expression/SequenceExpression/spec.ts | 8 + .../ast-spec/src/expression/Super/spec.ts | 6 + .../src/expression/TSAsExpression/spec.ts | 10 + .../TSEmptyBodyFunctionExpression/spec.ts | 7 + .../expression/TSNonNullExpression/spec.ts | 8 + .../src/expression/TSTypeAssertion/spec.ts | 10 + .../TaggedTemplateExpression/spec.ts | 12 + .../src/expression/TemplateLiteral/spec.ts | 10 + .../src/expression/ThisExpression/spec.ts | 6 + .../src/expression/UnaryExpression/spec.ts | 7 + .../src/expression/UpdateExpression/spec.ts | 7 + .../src/expression/YieldExpression/spec.ts | 9 + .../expression/literal/BigIntLiteral/spec.ts | 8 + .../expression/literal/BooleanLiteral/spec.ts | 8 + .../expression/literal/NullLiteral/spec.ts | 8 + .../expression/literal/NumberLiteral/spec.ts | 7 + .../expression/literal/RegExpLiteral/spec.ts | 11 + .../expression/literal/StringLiteral/spec.ts | 7 + .../ast-spec/src/expression/literal/spec.ts | 6 + packages/ast-spec/src/expression/spec.ts | 33 + packages/ast-spec/src/index.ts | 52 + .../ast-spec/src/jsx/JSXAttribute/spec.ts | 12 + .../src/jsx/JSXClosingElement/spec.ts | 8 + .../src/jsx/JSXClosingFragment/spec.ts | 6 + .../src/jsx/JSXEmptyExpression/spec.ts | 6 + .../src/jsx/JSXExpressionContainer/spec.ts | 9 + .../ast-spec/src/jsx/JSXIdentifier/spec.ts | 7 + .../src/jsx/JSXMemberExpression/spec.ts | 10 + .../src/jsx/JSXNamespacedName/spec.ts | 9 + .../src/jsx/JSXOpeningElement/spec.ts | 14 + .../src/jsx/JSXOpeningFragment/spec.ts | 6 + .../src/jsx/JSXSpreadAttribute/spec.ts | 8 + .../ast-spec/src/jsx/JSXSpreadChild/spec.ts | 9 + packages/ast-spec/src/jsx/JSXText/spec.ts | 8 + packages/ast-spec/src/jsx/spec.ts | 13 + .../src/parameter/ArrayPattern/spec.ts | 13 + .../src/parameter/AssignmentPattern/spec.ts | 15 + .../src/parameter/ObjectPattern/spec.ts | 14 + .../src/parameter/RestElement/spec.ts | 15 + .../src/parameter/TSParameterProperty/spec.ts | 17 + packages/ast-spec/src/parameter/spec.ts | 5 + .../ast-spec/src/special/CatchClause/spec.ts | 10 + .../ast-spec/src/special/ClassBody/spec.ts | 8 + .../ast-spec/src/special/Decorator/spec.ts | 8 + .../src/special/EmptyStatement/spec.ts | 6 + .../src/special/ExportSpecifier/spec.ts | 9 + .../special/ImportDefaultSpecifier/spec.ts | 8 + .../special/ImportNamespaceSpecifier/spec.ts | 8 + .../src/special/ImportSpecifier/spec.ts | 9 + packages/ast-spec/src/special/Program/spec.ts | 13 + .../ast-spec/src/special/SwitchCase/spec.ts | 10 + .../src/special/TSClassImplements/spec.ts | 6 + .../special/TSExternalModuleReference/spec.ts | 8 + .../src/special/TSInterfaceBody/spec.ts | 8 + .../src/special/TSInterfaceHeritage/spec.ts | 6 + .../src/special/TSModuleBlock/spec.ts | 8 + .../src/special/TSTypeAnnotation/spec.ts | 8 + .../src/special/TSTypeParameter/spec.ts | 11 + .../TSTypeParameterDeclaration/spec.ts | 8 + .../TSTypeParameterInstantiation/spec.ts | 8 + .../src/special/TemplateElement/spec.ts | 11 + .../src/special/VariableDeclarator/spec.ts | 11 + packages/ast-spec/src/special/spec.ts | 21 + .../src/statement/BlockStatement/spec.ts | 8 + .../src/statement/BreakStatement/spec.ts | 8 + .../src/statement/ContinueStatement/spec.ts | 8 + .../src/statement/DebuggerStatement/spec.ts | 6 + .../src/statement/DoWhileStatement/spec.ts | 10 + .../src/statement/ExpressionStatement/spec.ts | 9 + .../src/statement/ForInStatement/spec.ts | 12 + .../src/statement/ForOfStatement/spec.ts | 13 + .../src/statement/ForStatement/spec.ts | 13 + .../src/statement/IfStatement/spec.ts | 11 + .../src/statement/ImportDeclaration/spec.ts | 11 + .../src/statement/LabeledStatement/spec.ts | 10 + .../src/statement/ReturnStatement/spec.ts | 8 + .../src/statement/SwitchStatement/spec.ts | 10 + .../src/statement/TSExportAssignment/spec.ts | 8 + .../src/statement/ThrowStatement/spec.ts | 9 + .../src/statement/TryStatement/spec.ts | 11 + .../src/statement/WhileStatement/spec.ts | 10 + .../src/statement/WithStatement/spec.ts | 10 + packages/ast-spec/src/statement/spec.ts | 19 + .../ast-spec/src/token/BlockComment/spec.ts | 6 + .../ast-spec/src/token/BooleanToken/spec.ts | 6 + .../src/token/IdentifierToken/spec.ts | 6 + .../src/token/JSXIdentifierToken/spec.ts | 6 + .../ast-spec/src/token/JSXTextToken/spec.ts | 6 + .../ast-spec/src/token/KeywordToken/spec.ts | 6 + .../ast-spec/src/token/LineComment/spec.ts | 6 + packages/ast-spec/src/token/NullToken/spec.ts | 6 + .../ast-spec/src/token/NumericToken/spec.ts | 6 + .../src/token/PunctuatorToken/spec.ts | 6 + .../src/token/RegularExpressionToken/spec.ts | 10 + .../ast-spec/src/token/StringToken/spec.ts | 6 + .../src/token/TSAbstractKeyword/spec.ts | 6 + .../ast-spec/src/token/TSAsyncKeyword/spec.ts | 6 + .../src/token/TSDeclareKeyword/spec.ts | 6 + .../src/token/TSExportKeyword/spec.ts | 6 + .../src/token/TSPrivateKeyword/spec.ts | 6 + .../src/token/TSProtectedKeyword/spec.ts | 6 + .../src/token/TSPublicKeyword/spec.ts | 6 + .../src/token/TSReadonlyKeyword/spec.ts | 6 + .../src/token/TSStaticKeyword/spec.ts | 6 + .../ast-spec/src/token/TemplateToken/spec.ts | 6 + packages/ast-spec/src/token/spec.ts | 22 + .../ast-spec/src/type/TSAnyKeyword/spec.ts | 6 + .../ast-spec/src/type/TSArrayType/spec.ts | 8 + .../ast-spec/src/type/TSBigIntKeyword/spec.ts | 6 + .../src/type/TSBooleanKeyword/spec.ts | 6 + .../src/type/TSConditionalType/spec.ts | 11 + .../src/type/TSConstructorType/spec.ts | 7 + .../ast-spec/src/type/TSFunctionType/spec.ts | 6 + .../ast-spec/src/type/TSImportType/spec.ts | 13 + .../src/type/TSIndexedAccessType/spec.ts | 9 + .../ast-spec/src/type/TSInferType/spec.ts | 8 + .../src/type/TSIntersectionType/spec.ts | 8 + .../ast-spec/src/type/TSIntrinsicType/spec.ts | 6 + .../ast-spec/src/type/TSLiteralType/spec.ts | 10 + .../ast-spec/src/type/TSMappedType/spec.ts | 13 + .../src/type/TSNamedTupleMember/spec.ts | 11 + .../ast-spec/src/type/TSNeverKeyword/spec.ts | 6 + .../ast-spec/src/type/TSNullKeyword/spec.ts | 6 + .../ast-spec/src/type/TSNumberKeyword/spec.ts | 6 + .../ast-spec/src/type/TSObjectKeyword/spec.ts | 6 + .../ast-spec/src/type/TSOptionalType/spec.ts | 8 + .../src/type/TSParenthesizedType/spec.ts | 8 + .../ast-spec/src/type/TSQualifiedName/spec.ts | 10 + packages/ast-spec/src/type/TSRestType/spec.ts | 8 + .../ast-spec/src/type/TSStringKeyword/spec.ts | 6 + .../ast-spec/src/type/TSSymbolKeyword/spec.ts | 6 + .../src/type/TSTemplateLiteralType/spec.ts | 10 + packages/ast-spec/src/type/TSThisType/spec.ts | 6 + .../ast-spec/src/type/TSTupleType/spec.ts | 8 + .../ast-spec/src/type/TSTypeLiteral/spec.ts | 8 + .../ast-spec/src/type/TSTypeOperator/spec.ts | 9 + .../ast-spec/src/type/TSTypePredicate/spec.ts | 12 + .../ast-spec/src/type/TSTypeQuery/spec.ts | 8 + .../ast-spec/src/type/TSTypeReference/spec.ts | 10 + .../src/type/TSUndefinedKeyword/spec.ts | 6 + .../ast-spec/src/type/TSUnionType/spec.ts | 8 + .../src/type/TSUnknownKeyword/spec.ts | 6 + .../ast-spec/src/type/TSVoidKeyword/spec.ts | 6 + packages/ast-spec/src/type/spec.ts | 36 + packages/ast-spec/src/unions/BindingName.ts | 4 + .../ast-spec/src/unions/BindingPattern.ts | 4 + .../src/unions/CallExpressionArgument.ts | 4 + packages/ast-spec/src/unions/ChainElement.ts | 8 + packages/ast-spec/src/unions/ClassElement.ts | 12 + packages/ast-spec/src/unions/Comment.ts | 4 + .../src/unions/DeclarationStatement.ts | 29 + .../src/unions/DestructuringPattern.ts | 14 + packages/ast-spec/src/unions/EntityName.ts | 4 + .../ast-spec/src/unions/ExportDeclaration.ts | 20 + packages/ast-spec/src/unions/Expression.ts | 78 + .../ast-spec/src/unions/ForInitialiser.ts | 4 + packages/ast-spec/src/unions/FunctionLike.ts | 12 + packages/ast-spec/src/unions/ImportClause.ts | 8 + .../ast-spec/src/unions/IterationStatement.ts | 12 + packages/ast-spec/src/unions/JSXChild.ts | 6 + packages/ast-spec/src/unions/JSXExpression.ts | 8 + .../src/unions/JSXTagNameExpression.ts | 8 + .../src/unions/LeftHandSideExpression.ts | 44 + packages/ast-spec/src/unions/Literal.ts | 14 + .../ast-spec/src/unions/LiteralExpression.ts | 4 + packages/ast-spec/src/unions/Modifier.ts | 16 + packages/ast-spec/src/unions/Node.ts | 329 +++ .../src/unions/ObjectLiteralElement.ts | 8 + packages/ast-spec/src/unions/Parameter.ts | 14 + .../ast-spec/src/unions/PrimaryExpression.ts | 35 + packages/ast-spec/src/unions/PropertyName.ts | 11 + packages/ast-spec/src/unions/Statement.ts | 78 + .../ast-spec/src/unions/TSUnaryExpression.ts | 13 + packages/ast-spec/src/unions/Token.ts | 26 + packages/ast-spec/src/unions/TypeElement.ts | 12 + packages/ast-spec/src/unions/TypeNode.ts | 74 + .../ast-spec/tests/ast-node-types.test.ts | 16 + packages/ast-spec/tsconfig.build.json | 10 + packages/ast-spec/tsconfig.json | 8 + packages/eslint-plugin-internal/package.json | 2 +- .../src/rules/plugin-test-formatting.ts | 4 +- packages/eslint-plugin-tslint/package.json | 2 +- packages/eslint-plugin/package.json | 2 +- .../src/rules/no-loss-of-precision.ts | 2 +- .../src/rules/no-unnecessary-condition.ts | 2 +- .../src/rules/prefer-regexp-exec.ts | 4 +- .../sort-type-union-intersection-members.ts | 1 - packages/experimental-utils/package.json | 2 +- packages/parser/package.json | 2 +- packages/scope-manager/package.json | 2 +- packages/scope-manager/src/scope/ScopeBase.ts | 24 +- packages/types/package.json | 5 +- packages/types/src/index.ts | 6 +- packages/types/src/ts-estree.ts | 1780 +---------------- packages/types/tools/copy-ast-spec.ts | 59 + packages/types/tsconfig.build.json | 3 +- packages/types/tsconfig.json | 3 +- packages/typescript-estree/package.json | 2 +- packages/typescript-estree/src/convert.ts | 4 +- packages/visitor-keys/package.json | 2 +- tests/integration/docker-compose.yml | 36 +- tests/integration/fixtures/eslint-v6/test.sh | 1 + tests/integration/fixtures/markdown/test.sh | 1 + .../test.sh | 1 + .../test.sh | 1 + tests/integration/fixtures/vue-jsx/test.sh | 1 + tests/integration/fixtures/vue-sfc/test.sh | 1 + yarn.lock | 151 +- 282 files changed, 3647 insertions(+), 1847 deletions(-) create mode 100644 packages/ast-spec/LICENSE create mode 100644 packages/ast-spec/README.md create mode 100644 packages/ast-spec/api-extractor.json create mode 100644 packages/ast-spec/jest.config.js create mode 100644 packages/ast-spec/package.json rename packages/{types => ast-spec}/src/ast-node-types.ts (88%) rename packages/{types => ast-spec}/src/ast-token-types.ts (87%) create mode 100644 packages/ast-spec/src/base/Accessibility.ts create mode 100644 packages/ast-spec/src/base/BaseNode.ts create mode 100644 packages/ast-spec/src/base/BaseToken.ts create mode 100644 packages/ast-spec/src/base/BinaryExpressionBase.ts create mode 100644 packages/ast-spec/src/base/ClassDeclarationBase.ts create mode 100644 packages/ast-spec/src/base/ClassPropertyBase.ts create mode 100644 packages/ast-spec/src/base/FunctionDeclarationBase.ts create mode 100644 packages/ast-spec/src/base/LineAndColumnData.ts create mode 100644 packages/ast-spec/src/base/LiteralBase.ts create mode 100644 packages/ast-spec/src/base/MethodDefinitionBase.ts create mode 100644 packages/ast-spec/src/base/OptionalRangeAndLoc.ts create mode 100644 packages/ast-spec/src/base/Range.ts create mode 100644 packages/ast-spec/src/base/SourceLocation.ts create mode 100644 packages/ast-spec/src/base/TSFunctionSignatureBase.ts create mode 100644 packages/ast-spec/src/base/TSHeritageBase.ts create mode 100644 packages/ast-spec/src/base/UnaryExpressionBase.ts create mode 100644 packages/ast-spec/src/declaration/ClassDeclaration/spec.ts create mode 100644 packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts create mode 100644 packages/ast-spec/src/declaration/ExportDefaultDeclaration/spec.ts create mode 100644 packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts create mode 100644 packages/ast-spec/src/declaration/FunctionDeclaration/spec.ts create mode 100644 packages/ast-spec/src/declaration/TSDeclareFunction/spec.ts create mode 100644 packages/ast-spec/src/declaration/TSEnumDeclaration/spec.ts create mode 100644 packages/ast-spec/src/declaration/TSImportEqualsDeclaration/spec.ts create mode 100644 packages/ast-spec/src/declaration/TSInterfaceDeclaration/spec.ts create mode 100644 packages/ast-spec/src/declaration/TSModuleDeclaration/spec.ts create mode 100644 packages/ast-spec/src/declaration/TSNamespaceExportDeclaration/spec.ts create mode 100644 packages/ast-spec/src/declaration/TSTypeAliasDeclaration/spec.ts create mode 100644 packages/ast-spec/src/declaration/VariableDeclaration/spec.ts create mode 100644 packages/ast-spec/src/declaration/spec.ts create mode 100644 packages/ast-spec/src/element/ClassProperty/spec.ts create mode 100644 packages/ast-spec/src/element/MethodDefinition/spec.ts create mode 100644 packages/ast-spec/src/element/Property/spec.ts create mode 100644 packages/ast-spec/src/element/SpreadElement/spec.ts create mode 100644 packages/ast-spec/src/element/TSAbstractClassProperty/spec.ts create mode 100644 packages/ast-spec/src/element/TSAbstractMethodDefinition/spec.ts create mode 100644 packages/ast-spec/src/element/TSCallSignatureDeclaration/spec.ts create mode 100644 packages/ast-spec/src/element/TSConstructSignatureDeclaration/spec.ts create mode 100644 packages/ast-spec/src/element/TSEnumMember/spec.ts create mode 100644 packages/ast-spec/src/element/TSIndexSignature/spec.ts create mode 100644 packages/ast-spec/src/element/TSMethodSignature/spec.ts create mode 100644 packages/ast-spec/src/element/TSPropertySignature/spec.ts create mode 100644 packages/ast-spec/src/element/spec.ts create mode 100644 packages/ast-spec/src/expression/ArrayExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/ArrowFunctionExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/AssignmentExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/AwaitExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/BinaryExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/CallExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/ChainExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/ClassExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/ConditionalExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/FunctionExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/Identifier/spec.ts create mode 100644 packages/ast-spec/src/expression/ImportExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/JSXElement/spec.ts create mode 100644 packages/ast-spec/src/expression/JSXFragment/spec.ts create mode 100644 packages/ast-spec/src/expression/LogicalExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/MemberExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/MetaProperty/spec.ts create mode 100644 packages/ast-spec/src/expression/NewExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/ObjectExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/SequenceExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/Super/spec.ts create mode 100644 packages/ast-spec/src/expression/TSAsExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/TSEmptyBodyFunctionExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/TSNonNullExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/TSTypeAssertion/spec.ts create mode 100644 packages/ast-spec/src/expression/TaggedTemplateExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/TemplateLiteral/spec.ts create mode 100644 packages/ast-spec/src/expression/ThisExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/UnaryExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/UpdateExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/YieldExpression/spec.ts create mode 100644 packages/ast-spec/src/expression/literal/BigIntLiteral/spec.ts create mode 100644 packages/ast-spec/src/expression/literal/BooleanLiteral/spec.ts create mode 100644 packages/ast-spec/src/expression/literal/NullLiteral/spec.ts create mode 100644 packages/ast-spec/src/expression/literal/NumberLiteral/spec.ts create mode 100644 packages/ast-spec/src/expression/literal/RegExpLiteral/spec.ts create mode 100644 packages/ast-spec/src/expression/literal/StringLiteral/spec.ts create mode 100644 packages/ast-spec/src/expression/literal/spec.ts create mode 100644 packages/ast-spec/src/expression/spec.ts create mode 100644 packages/ast-spec/src/index.ts create mode 100644 packages/ast-spec/src/jsx/JSXAttribute/spec.ts create mode 100644 packages/ast-spec/src/jsx/JSXClosingElement/spec.ts create mode 100644 packages/ast-spec/src/jsx/JSXClosingFragment/spec.ts create mode 100644 packages/ast-spec/src/jsx/JSXEmptyExpression/spec.ts create mode 100644 packages/ast-spec/src/jsx/JSXExpressionContainer/spec.ts create mode 100644 packages/ast-spec/src/jsx/JSXIdentifier/spec.ts create mode 100644 packages/ast-spec/src/jsx/JSXMemberExpression/spec.ts create mode 100644 packages/ast-spec/src/jsx/JSXNamespacedName/spec.ts create mode 100644 packages/ast-spec/src/jsx/JSXOpeningElement/spec.ts create mode 100644 packages/ast-spec/src/jsx/JSXOpeningFragment/spec.ts create mode 100644 packages/ast-spec/src/jsx/JSXSpreadAttribute/spec.ts create mode 100644 packages/ast-spec/src/jsx/JSXSpreadChild/spec.ts create mode 100644 packages/ast-spec/src/jsx/JSXText/spec.ts create mode 100644 packages/ast-spec/src/jsx/spec.ts create mode 100644 packages/ast-spec/src/parameter/ArrayPattern/spec.ts create mode 100644 packages/ast-spec/src/parameter/AssignmentPattern/spec.ts create mode 100644 packages/ast-spec/src/parameter/ObjectPattern/spec.ts create mode 100644 packages/ast-spec/src/parameter/RestElement/spec.ts create mode 100644 packages/ast-spec/src/parameter/TSParameterProperty/spec.ts create mode 100644 packages/ast-spec/src/parameter/spec.ts create mode 100644 packages/ast-spec/src/special/CatchClause/spec.ts create mode 100644 packages/ast-spec/src/special/ClassBody/spec.ts create mode 100644 packages/ast-spec/src/special/Decorator/spec.ts create mode 100644 packages/ast-spec/src/special/EmptyStatement/spec.ts create mode 100644 packages/ast-spec/src/special/ExportSpecifier/spec.ts create mode 100644 packages/ast-spec/src/special/ImportDefaultSpecifier/spec.ts create mode 100644 packages/ast-spec/src/special/ImportNamespaceSpecifier/spec.ts create mode 100644 packages/ast-spec/src/special/ImportSpecifier/spec.ts create mode 100644 packages/ast-spec/src/special/Program/spec.ts create mode 100644 packages/ast-spec/src/special/SwitchCase/spec.ts create mode 100644 packages/ast-spec/src/special/TSClassImplements/spec.ts create mode 100644 packages/ast-spec/src/special/TSExternalModuleReference/spec.ts create mode 100644 packages/ast-spec/src/special/TSInterfaceBody/spec.ts create mode 100644 packages/ast-spec/src/special/TSInterfaceHeritage/spec.ts create mode 100644 packages/ast-spec/src/special/TSModuleBlock/spec.ts create mode 100644 packages/ast-spec/src/special/TSTypeAnnotation/spec.ts create mode 100644 packages/ast-spec/src/special/TSTypeParameter/spec.ts create mode 100644 packages/ast-spec/src/special/TSTypeParameterDeclaration/spec.ts create mode 100644 packages/ast-spec/src/special/TSTypeParameterInstantiation/spec.ts create mode 100644 packages/ast-spec/src/special/TemplateElement/spec.ts create mode 100644 packages/ast-spec/src/special/VariableDeclarator/spec.ts create mode 100644 packages/ast-spec/src/special/spec.ts create mode 100644 packages/ast-spec/src/statement/BlockStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/BreakStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/ContinueStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/DebuggerStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/DoWhileStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/ExpressionStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/ForInStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/ForOfStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/ForStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/IfStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/ImportDeclaration/spec.ts create mode 100644 packages/ast-spec/src/statement/LabeledStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/ReturnStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/SwitchStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/TSExportAssignment/spec.ts create mode 100644 packages/ast-spec/src/statement/ThrowStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/TryStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/WhileStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/WithStatement/spec.ts create mode 100644 packages/ast-spec/src/statement/spec.ts create mode 100644 packages/ast-spec/src/token/BlockComment/spec.ts create mode 100644 packages/ast-spec/src/token/BooleanToken/spec.ts create mode 100644 packages/ast-spec/src/token/IdentifierToken/spec.ts create mode 100644 packages/ast-spec/src/token/JSXIdentifierToken/spec.ts create mode 100644 packages/ast-spec/src/token/JSXTextToken/spec.ts create mode 100644 packages/ast-spec/src/token/KeywordToken/spec.ts create mode 100644 packages/ast-spec/src/token/LineComment/spec.ts create mode 100644 packages/ast-spec/src/token/NullToken/spec.ts create mode 100644 packages/ast-spec/src/token/NumericToken/spec.ts create mode 100644 packages/ast-spec/src/token/PunctuatorToken/spec.ts create mode 100644 packages/ast-spec/src/token/RegularExpressionToken/spec.ts create mode 100644 packages/ast-spec/src/token/StringToken/spec.ts create mode 100644 packages/ast-spec/src/token/TSAbstractKeyword/spec.ts create mode 100644 packages/ast-spec/src/token/TSAsyncKeyword/spec.ts create mode 100644 packages/ast-spec/src/token/TSDeclareKeyword/spec.ts create mode 100644 packages/ast-spec/src/token/TSExportKeyword/spec.ts create mode 100644 packages/ast-spec/src/token/TSPrivateKeyword/spec.ts create mode 100644 packages/ast-spec/src/token/TSProtectedKeyword/spec.ts create mode 100644 packages/ast-spec/src/token/TSPublicKeyword/spec.ts create mode 100644 packages/ast-spec/src/token/TSReadonlyKeyword/spec.ts create mode 100644 packages/ast-spec/src/token/TSStaticKeyword/spec.ts create mode 100644 packages/ast-spec/src/token/TemplateToken/spec.ts create mode 100644 packages/ast-spec/src/token/spec.ts create mode 100644 packages/ast-spec/src/type/TSAnyKeyword/spec.ts create mode 100644 packages/ast-spec/src/type/TSArrayType/spec.ts create mode 100644 packages/ast-spec/src/type/TSBigIntKeyword/spec.ts create mode 100644 packages/ast-spec/src/type/TSBooleanKeyword/spec.ts create mode 100644 packages/ast-spec/src/type/TSConditionalType/spec.ts create mode 100644 packages/ast-spec/src/type/TSConstructorType/spec.ts create mode 100644 packages/ast-spec/src/type/TSFunctionType/spec.ts create mode 100644 packages/ast-spec/src/type/TSImportType/spec.ts create mode 100644 packages/ast-spec/src/type/TSIndexedAccessType/spec.ts create mode 100644 packages/ast-spec/src/type/TSInferType/spec.ts create mode 100644 packages/ast-spec/src/type/TSIntersectionType/spec.ts create mode 100644 packages/ast-spec/src/type/TSIntrinsicType/spec.ts create mode 100644 packages/ast-spec/src/type/TSLiteralType/spec.ts create mode 100644 packages/ast-spec/src/type/TSMappedType/spec.ts create mode 100644 packages/ast-spec/src/type/TSNamedTupleMember/spec.ts create mode 100644 packages/ast-spec/src/type/TSNeverKeyword/spec.ts create mode 100644 packages/ast-spec/src/type/TSNullKeyword/spec.ts create mode 100644 packages/ast-spec/src/type/TSNumberKeyword/spec.ts create mode 100644 packages/ast-spec/src/type/TSObjectKeyword/spec.ts create mode 100644 packages/ast-spec/src/type/TSOptionalType/spec.ts create mode 100644 packages/ast-spec/src/type/TSParenthesizedType/spec.ts create mode 100644 packages/ast-spec/src/type/TSQualifiedName/spec.ts create mode 100644 packages/ast-spec/src/type/TSRestType/spec.ts create mode 100644 packages/ast-spec/src/type/TSStringKeyword/spec.ts create mode 100644 packages/ast-spec/src/type/TSSymbolKeyword/spec.ts create mode 100644 packages/ast-spec/src/type/TSTemplateLiteralType/spec.ts create mode 100644 packages/ast-spec/src/type/TSThisType/spec.ts create mode 100644 packages/ast-spec/src/type/TSTupleType/spec.ts create mode 100644 packages/ast-spec/src/type/TSTypeLiteral/spec.ts create mode 100644 packages/ast-spec/src/type/TSTypeOperator/spec.ts create mode 100644 packages/ast-spec/src/type/TSTypePredicate/spec.ts create mode 100644 packages/ast-spec/src/type/TSTypeQuery/spec.ts create mode 100644 packages/ast-spec/src/type/TSTypeReference/spec.ts create mode 100644 packages/ast-spec/src/type/TSUndefinedKeyword/spec.ts create mode 100644 packages/ast-spec/src/type/TSUnionType/spec.ts create mode 100644 packages/ast-spec/src/type/TSUnknownKeyword/spec.ts create mode 100644 packages/ast-spec/src/type/TSVoidKeyword/spec.ts create mode 100644 packages/ast-spec/src/type/spec.ts create mode 100644 packages/ast-spec/src/unions/BindingName.ts create mode 100644 packages/ast-spec/src/unions/BindingPattern.ts create mode 100644 packages/ast-spec/src/unions/CallExpressionArgument.ts create mode 100644 packages/ast-spec/src/unions/ChainElement.ts create mode 100644 packages/ast-spec/src/unions/ClassElement.ts create mode 100644 packages/ast-spec/src/unions/Comment.ts create mode 100644 packages/ast-spec/src/unions/DeclarationStatement.ts create mode 100644 packages/ast-spec/src/unions/DestructuringPattern.ts create mode 100644 packages/ast-spec/src/unions/EntityName.ts create mode 100644 packages/ast-spec/src/unions/ExportDeclaration.ts create mode 100644 packages/ast-spec/src/unions/Expression.ts create mode 100644 packages/ast-spec/src/unions/ForInitialiser.ts create mode 100644 packages/ast-spec/src/unions/FunctionLike.ts create mode 100644 packages/ast-spec/src/unions/ImportClause.ts create mode 100644 packages/ast-spec/src/unions/IterationStatement.ts create mode 100644 packages/ast-spec/src/unions/JSXChild.ts create mode 100644 packages/ast-spec/src/unions/JSXExpression.ts create mode 100644 packages/ast-spec/src/unions/JSXTagNameExpression.ts create mode 100644 packages/ast-spec/src/unions/LeftHandSideExpression.ts create mode 100644 packages/ast-spec/src/unions/Literal.ts create mode 100644 packages/ast-spec/src/unions/LiteralExpression.ts create mode 100644 packages/ast-spec/src/unions/Modifier.ts create mode 100644 packages/ast-spec/src/unions/Node.ts create mode 100644 packages/ast-spec/src/unions/ObjectLiteralElement.ts create mode 100644 packages/ast-spec/src/unions/Parameter.ts create mode 100644 packages/ast-spec/src/unions/PrimaryExpression.ts create mode 100644 packages/ast-spec/src/unions/PropertyName.ts create mode 100644 packages/ast-spec/src/unions/Statement.ts create mode 100644 packages/ast-spec/src/unions/TSUnaryExpression.ts create mode 100644 packages/ast-spec/src/unions/Token.ts create mode 100644 packages/ast-spec/src/unions/TypeElement.ts create mode 100644 packages/ast-spec/src/unions/TypeNode.ts create mode 100644 packages/ast-spec/tests/ast-node-types.test.ts create mode 100644 packages/ast-spec/tsconfig.build.json create mode 100644 packages/ast-spec/tsconfig.json create mode 100644 packages/types/tools/copy-ast-spec.ts diff --git a/.eslintignore b/.eslintignore index 3c9816ccb5cc..255b369df6b0 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,3 +7,6 @@ coverage __snapshots__ packages/eslint-plugin-tslint/tests + +# Files copied as part of the build +packages/types/src/ast-spec.ts diff --git a/.eslintrc.js b/.eslintrc.js index 5d944cceacbe..c02abfbd7a8d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,6 +7,7 @@ module.exports = { 'import', 'eslint-comments', '@typescript-eslint/internal', + 'simple-import-sort', ], env: { es6: true, @@ -261,5 +262,27 @@ module.exports = { '@typescript-eslint/internal/prefer-ast-types-enum': 'off', }, }, + // ast spec specific standardization + { + files: ['packages/ast-spec/src/**/*.ts'], + rules: { + '@typescript-eslint/consistent-type-imports': [ + 'error', + { prefer: 'type-imports', disallowTypeAnnotations: true }, + ], + '@typescript-eslint/no-unused-vars': 'error', + '@typescript-eslint/sort-type-union-intersection-members': 'error', + 'import/first': 'error', + 'import/newline-after-import': 'error', + 'import/no-duplicates': 'error', + 'simple-import-sort/imports': 'error', + }, + }, + { + files: ['rollup.config.ts'], + rules: { + 'import/no-default-export': 'off', + }, + }, ], }; diff --git a/.gitignore b/.gitignore index b7d08022ef73..95ec54effa37 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,7 @@ dist _ts3.4 *.tsbuildinfo .watchmanconfig +.rollup.cache + +# Files copied as part of the build +packages/types/src/ast-spec.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 20830a2fa0b8..f0677068d037 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,8 +13,8 @@ // typescript auto-format settings "typescript.tsdk": "node_modules/typescript/lib", - "javascript.preferences.importModuleSpecifier": "auto", - "typescript.preferences.importModuleSpecifier": "auto", + "javascript.preferences.importModuleSpecifier": "project-relative", + "typescript.preferences.importModuleSpecifier": "project-relative", "javascript.preferences.quoteStyle": "single", "typescript.preferences.quoteStyle": "single", "editor.defaultFormatter": "esbenp.prettier-vscode", diff --git a/package.json b/package.json index 431c13ac5668..f93f8088afdc 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "url": "https://github.com/typescript-eslint/typescript-eslint/issues" }, "scripts": { - "build": "lerna run build", + "build": "lerna run build --ignore ast-spec", "check:clean-workspace-after-install": "git diff --quiet --exit-code", "check:configs": "lerna run check:configs", "check:docs": "lerna run check:docs", @@ -98,6 +98,7 @@ "eslint-plugin-eslint-plugin": "^3.0.0", "eslint-plugin-import": "^2.22.0", "eslint-plugin-jest": "^24.1.3", + "eslint-plugin-simple-import-sort": "^7.0.0", "glob": "^7.1.6", "husky": "^5.0.9", "jest": "^26.6.3", diff --git a/packages/ast-spec/LICENSE b/packages/ast-spec/LICENSE new file mode 100644 index 000000000000..7e7370143b26 --- /dev/null +++ b/packages/ast-spec/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 TypeScript ESLint and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/ast-spec/README.md b/packages/ast-spec/README.md new file mode 100644 index 000000000000..7c954398395b --- /dev/null +++ b/packages/ast-spec/README.md @@ -0,0 +1,24 @@ +

TypeScript-ESTree AST Specification

+ +

+ CI + NPM Version + NPM Downloads +

+ +This is the complete specification for the TypeScript-ESTree AST. + +It includes: + +- Node definitions as TypeScript types (the specification) +- Logic for converting from the TypeScript AST to the TypeScript-ESTree AST. +- Tests/Fixtures/Examples for each Node + +**You probably don't want to use it directly.** + +If you're building an ESLint plugin, consider using [`@typescript-eslint/experimental-utils`](../experimental-utils). +If you're parsing TypeScript code, consider using [`@typescript-eslint/typescript-estree`](../typescript-estree). + +## Contributing + +[See the contributing guide here](../../CONTRIBUTING.md) diff --git a/packages/ast-spec/api-extractor.json b/packages/ast-spec/api-extractor.json new file mode 100644 index 000000000000..f474f3bf26fd --- /dev/null +++ b/packages/ast-spec/api-extractor.json @@ -0,0 +1,31 @@ +{ + "mainEntryPointFilePath": "/dist/index.d.ts", + "apiReport": { + "enabled": false + }, + "docModel": { + "enabled": false + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "/dist/ast-spec.ts" + }, + "tsdocMetadata": { + "enabled": false + }, + "messages": { + "extractorMessageReporting": { + "default": { + "logLevel": "none" + }, + "ae-forgotten-export": { + "logLevel": "none" + } + }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + } + } +} diff --git a/packages/ast-spec/jest.config.js b/packages/ast-spec/jest.config.js new file mode 100644 index 000000000000..c23ca67fbc68 --- /dev/null +++ b/packages/ast-spec/jest.config.js @@ -0,0 +1,20 @@ +'use strict'; + +// @ts-check +/** @type {import('@jest/types').Config.InitialOptions} */ +module.exports = { + globals: { + 'ts-jest': { + isolatedModules: true, + }, + }, + testEnvironment: 'node', + transform: { + ['^.+\\.tsx?$']: 'ts-jest', + }, + testRegex: ['./tests/.+\\.test\\.ts$'], + collectCoverage: false, + collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'], + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], + coverageReporters: ['text-summary', 'lcov'], +}; diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json new file mode 100644 index 000000000000..c688fcdda2e1 --- /dev/null +++ b/packages/ast-spec/package.json @@ -0,0 +1,46 @@ +{ + "name": "@typescript-eslint/ast-spec", + "version": "4.20.0", + "description": "TypeScript-ESTree AST spec", + "private": true, + "keywords": [ + "eslint", + "typescript", + "estree" + ], + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "files": [ + "dist", + "package.json", + "README.md", + "LICENSE" + ], + "repository": { + "type": "git", + "url": "https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/ast-spec" + }, + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "license": "MIT", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "build": "tsc -b tsconfig.build.json && api-extractor run --local", + "clean": "tsc -b tsconfig.build.json --clean", + "postclean": "rimraf dist && rimraf _ts3.4 && rimraf .rollup.cache && rimraf coverage", + "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", + "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", + "typecheck": "tsc -p tsconfig.json --noEmit" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "devDependencies": { + "@microsoft/api-extractor": "^7.13.2" + } +} diff --git a/packages/types/src/ast-node-types.ts b/packages/ast-spec/src/ast-node-types.ts similarity index 88% rename from packages/types/src/ast-node-types.ts rename to packages/ast-spec/src/ast-node-types.ts index f233d60f8aeb..6aa0087d5eb2 100644 --- a/packages/types/src/ast-node-types.ts +++ b/packages/ast-spec/src/ast-node-types.ts @@ -1,4 +1,4 @@ -enum AST_NODE_TYPES { +export enum AST_NODE_TYPES { ArrayExpression = 'ArrayExpression', ArrayPattern = 'ArrayPattern', ArrowFunctionExpression = 'ArrowFunctionExpression', @@ -164,23 +164,3 @@ enum AST_NODE_TYPES { TSUnknownKeyword = 'TSUnknownKeyword', TSVoidKeyword = 'TSVoidKeyword', } - -export { AST_NODE_TYPES }; - -// Below is a special type-only test which ensures that we don't accidentally leave unused keys in this enum -// eslint-disable-next-line import/first -- purposely down here to colocate it with this hack of a test -import type { Node } from './ts-estree'; - -type GetKeys = keyof Extract; - -type AllKeys = { - readonly [T in AST_NODE_TYPES]: GetKeys; -}; - -type TakesString> = T; - -// @ts-expect-error: purposely unused -type _Test = - // forcing the test onto a new line so it isn't covered by the expect error - // If there are any enum members that don't have a corresponding TSESTree.Node, then this line will error with "Type 'string | number | symbol' is not assignable to type 'string'." - void | TakesString; diff --git a/packages/types/src/ast-token-types.ts b/packages/ast-spec/src/ast-token-types.ts similarity index 87% rename from packages/types/src/ast-token-types.ts rename to packages/ast-spec/src/ast-token-types.ts index 144befece83e..f839d8dfae59 100644 --- a/packages/types/src/ast-token-types.ts +++ b/packages/ast-spec/src/ast-token-types.ts @@ -1,4 +1,4 @@ -enum AST_TOKEN_TYPES { +export enum AST_TOKEN_TYPES { Boolean = 'Boolean', Identifier = 'Identifier', JSXIdentifier = 'JSXIdentifier', @@ -15,5 +15,3 @@ enum AST_TOKEN_TYPES { Block = 'Block', Line = 'Line', } - -export { AST_TOKEN_TYPES }; diff --git a/packages/ast-spec/src/base/Accessibility.ts b/packages/ast-spec/src/base/Accessibility.ts new file mode 100644 index 000000000000..d52942f43ab2 --- /dev/null +++ b/packages/ast-spec/src/base/Accessibility.ts @@ -0,0 +1 @@ +export type Accessibility = 'private' | 'protected' | 'public'; diff --git a/packages/ast-spec/src/base/BaseNode.ts b/packages/ast-spec/src/base/BaseNode.ts new file mode 100644 index 000000000000..362f156832b4 --- /dev/null +++ b/packages/ast-spec/src/base/BaseNode.ts @@ -0,0 +1,22 @@ +// import type { Node } from '../unions/Node'; +import type { Range } from './Range'; +import type { SourceLocation } from './SourceLocation'; + +export interface BaseNode { + /** + * The source location information of the node. + * @see {SourceLocation} + */ + loc: SourceLocation; + /** + * @see {Range} + */ + range: Range; + /** + * The parent node of the current node + */ + // parent?: Node; + + // every node *will* have a type, but let the nodes define their own exact string + // type: string; +} diff --git a/packages/ast-spec/src/base/BaseToken.ts b/packages/ast-spec/src/base/BaseToken.ts new file mode 100644 index 000000000000..cdf0d1286438 --- /dev/null +++ b/packages/ast-spec/src/base/BaseToken.ts @@ -0,0 +1,8 @@ +import type { BaseNode } from './BaseNode'; + +/* + * Token and Comment are pseudo-nodes to represent pieces of source code + */ +export interface BaseToken extends BaseNode { + value: string; +} diff --git a/packages/ast-spec/src/base/BinaryExpressionBase.ts b/packages/ast-spec/src/base/BinaryExpressionBase.ts new file mode 100644 index 000000000000..926491d49855 --- /dev/null +++ b/packages/ast-spec/src/base/BinaryExpressionBase.ts @@ -0,0 +1,8 @@ +import type { Expression } from '../unions/Expression'; +import type { BaseNode } from './BaseNode'; + +export interface BinaryExpressionBase extends BaseNode { + operator: string; + left: Expression; + right: Expression; +} diff --git a/packages/ast-spec/src/base/ClassDeclarationBase.ts b/packages/ast-spec/src/base/ClassDeclarationBase.ts new file mode 100644 index 000000000000..f104b739b517 --- /dev/null +++ b/packages/ast-spec/src/base/ClassDeclarationBase.ts @@ -0,0 +1,20 @@ +import type { Identifier } from '../expression/Identifier/spec'; +import type { ClassBody } from '../special/ClassBody/spec'; +import type { Decorator } from '../special/Decorator/spec'; +import type { TSClassImplements } from '../special/TSClassImplements/spec'; +import type { TSTypeParameterDeclaration } from '../special/TSTypeParameterDeclaration/spec'; +import type { TSTypeParameterInstantiation } from '../special/TSTypeParameterInstantiation/spec'; +import type { LeftHandSideExpression } from '../unions/LeftHandSideExpression'; +import type { BaseNode } from './BaseNode'; + +export interface ClassDeclarationBase extends BaseNode { + typeParameters?: TSTypeParameterDeclaration; + superTypeParameters?: TSTypeParameterInstantiation; + id: Identifier | null; + body: ClassBody; + superClass: LeftHandSideExpression | null; + implements?: TSClassImplements[]; + abstract?: boolean; + declare?: boolean; + decorators?: Decorator[]; +} diff --git a/packages/ast-spec/src/base/ClassPropertyBase.ts b/packages/ast-spec/src/base/ClassPropertyBase.ts new file mode 100644 index 000000000000..8ac19b05fa55 --- /dev/null +++ b/packages/ast-spec/src/base/ClassPropertyBase.ts @@ -0,0 +1,34 @@ +import type { Decorator } from '../special/Decorator/spec'; +import type { TSTypeAnnotation } from '../special/TSTypeAnnotation/spec'; +import type { Expression } from '../unions/Expression'; +import type { + PropertyName, + PropertyNameComputed, + PropertyNameNonComputed, +} from '../unions/PropertyName'; +import type { Accessibility } from './Accessibility'; +import type { BaseNode } from './BaseNode'; + +interface ClassPropertyBase extends BaseNode { + key: PropertyName; + value: Expression | null; + computed: boolean; + static: boolean; + declare: boolean; + readonly?: boolean; + decorators?: Decorator[]; + accessibility?: Accessibility; + optional?: boolean; + definite?: boolean; + typeAnnotation?: TSTypeAnnotation; +} + +export interface ClassPropertyComputedNameBase extends ClassPropertyBase { + key: PropertyNameComputed; + computed: true; +} + +export interface ClassPropertyNonComputedNameBase extends ClassPropertyBase { + key: PropertyNameNonComputed; + computed: false; +} diff --git a/packages/ast-spec/src/base/FunctionDeclarationBase.ts b/packages/ast-spec/src/base/FunctionDeclarationBase.ts new file mode 100644 index 000000000000..50b7aa97bf2f --- /dev/null +++ b/packages/ast-spec/src/base/FunctionDeclarationBase.ts @@ -0,0 +1,18 @@ +import type { Identifier } from '../expression/Identifier/spec'; +import type { TSTypeAnnotation } from '../special/TSTypeAnnotation/spec'; +import type { TSTypeParameterDeclaration } from '../special/TSTypeParameterDeclaration/spec'; +import type { BlockStatement } from '../statement/BlockStatement/spec'; +import type { Parameter } from '../unions/Parameter'; +import type { BaseNode } from './BaseNode'; + +export interface FunctionDeclarationBase extends BaseNode { + id: Identifier | null; + generator: boolean; + expression: boolean; + async: boolean; + params: Parameter[]; + body?: BlockStatement | null; + returnType?: TSTypeAnnotation; + typeParameters?: TSTypeParameterDeclaration; + declare?: boolean; +} diff --git a/packages/ast-spec/src/base/LineAndColumnData.ts b/packages/ast-spec/src/base/LineAndColumnData.ts new file mode 100644 index 000000000000..740ebe6fa467 --- /dev/null +++ b/packages/ast-spec/src/base/LineAndColumnData.ts @@ -0,0 +1,10 @@ +export interface LineAndColumnData { + /** + * Line number (1-indexed) + */ + line: number; + /** + * Column number on the line (0-indexed) + */ + column: number; +} diff --git a/packages/ast-spec/src/base/LiteralBase.ts b/packages/ast-spec/src/base/LiteralBase.ts new file mode 100644 index 000000000000..01a480ddc3cb --- /dev/null +++ b/packages/ast-spec/src/base/LiteralBase.ts @@ -0,0 +1,6 @@ +import type { BaseNode } from './BaseNode'; + +export interface LiteralBase extends BaseNode { + raw: string; + value: RegExp | bigint | boolean | number | string | null; +} diff --git a/packages/ast-spec/src/base/MethodDefinitionBase.ts b/packages/ast-spec/src/base/MethodDefinitionBase.ts new file mode 100644 index 000000000000..fe8846062106 --- /dev/null +++ b/packages/ast-spec/src/base/MethodDefinitionBase.ts @@ -0,0 +1,35 @@ +import type { FunctionExpression } from '../expression/FunctionExpression/spec'; +import type { TSEmptyBodyFunctionExpression } from '../expression/TSEmptyBodyFunctionExpression/spec'; +import type { Decorator } from '../special/Decorator/spec'; +import type { TSTypeParameterDeclaration } from '../special/TSTypeParameterDeclaration/spec'; +import type { + PropertyName, + PropertyNameComputed, + PropertyNameNonComputed, +} from '../unions/PropertyName'; +import type { Accessibility } from './Accessibility'; +import type { BaseNode } from './BaseNode'; + +/** this should not be directly used - instead use MethodDefinitionComputedNameBase or MethodDefinitionNonComputedNameBase */ +interface MethodDefinitionBase extends BaseNode { + key: PropertyName; + value: FunctionExpression | TSEmptyBodyFunctionExpression; + computed: boolean; + static: boolean; + kind: 'constructor' | 'get' | 'method' | 'set'; + optional?: boolean; + decorators?: Decorator[]; + accessibility?: Accessibility; + typeParameters?: TSTypeParameterDeclaration; +} + +export interface MethodDefinitionComputedNameBase extends MethodDefinitionBase { + key: PropertyNameComputed; + computed: true; +} + +export interface MethodDefinitionNonComputedNameBase + extends MethodDefinitionBase { + key: PropertyNameNonComputed; + computed: false; +} diff --git a/packages/ast-spec/src/base/OptionalRangeAndLoc.ts b/packages/ast-spec/src/base/OptionalRangeAndLoc.ts new file mode 100644 index 000000000000..d9b8cc9f874d --- /dev/null +++ b/packages/ast-spec/src/base/OptionalRangeAndLoc.ts @@ -0,0 +1,11 @@ +import type { Range } from './Range'; +import type { SourceLocation } from './SourceLocation'; + +// TODO - breaking change move this into `typescript-estree` +export type OptionalRangeAndLoc = Pick< + T, + Exclude +> & { + range?: Range; + loc?: SourceLocation; +}; diff --git a/packages/ast-spec/src/base/Range.ts b/packages/ast-spec/src/base/Range.ts new file mode 100644 index 000000000000..e78f71e3f747 --- /dev/null +++ b/packages/ast-spec/src/base/Range.ts @@ -0,0 +1,6 @@ +/** + * An array of two numbers. + * Both numbers are a 0-based index which is the position in the array of source code characters. + * The first is the start position of the node, the second is the end position of the node. + */ +export type Range = [number, number]; diff --git a/packages/ast-spec/src/base/SourceLocation.ts b/packages/ast-spec/src/base/SourceLocation.ts new file mode 100644 index 000000000000..e1a8e272a6fc --- /dev/null +++ b/packages/ast-spec/src/base/SourceLocation.ts @@ -0,0 +1,12 @@ +import type { LineAndColumnData } from './LineAndColumnData'; + +export interface SourceLocation { + /** + * The position of the first character of the parsed source region + */ + start: LineAndColumnData; + /** + * The position of the first character after the parsed source region + */ + end: LineAndColumnData; +} diff --git a/packages/ast-spec/src/base/TSFunctionSignatureBase.ts b/packages/ast-spec/src/base/TSFunctionSignatureBase.ts new file mode 100644 index 000000000000..0da1e7b414d6 --- /dev/null +++ b/packages/ast-spec/src/base/TSFunctionSignatureBase.ts @@ -0,0 +1,10 @@ +import type { TSTypeAnnotation } from '../special/TSTypeAnnotation/spec'; +import type { TSTypeParameterDeclaration } from '../special/TSTypeParameterDeclaration/spec'; +import type { Parameter } from '../unions/Parameter'; +import type { BaseNode } from './BaseNode'; + +export interface TSFunctionSignatureBase extends BaseNode { + params: Parameter[]; + returnType?: TSTypeAnnotation; + typeParameters?: TSTypeParameterDeclaration; +} diff --git a/packages/ast-spec/src/base/TSHeritageBase.ts b/packages/ast-spec/src/base/TSHeritageBase.ts new file mode 100644 index 000000000000..b3ed1770b674 --- /dev/null +++ b/packages/ast-spec/src/base/TSHeritageBase.ts @@ -0,0 +1,8 @@ +import type { TSTypeParameterInstantiation } from '../special/TSTypeParameterInstantiation/spec'; +import type { Expression } from '../unions/Expression'; +import type { BaseNode } from './BaseNode'; + +export interface TSHeritageBase extends BaseNode { + expression: Expression; + typeParameters?: TSTypeParameterInstantiation; +} diff --git a/packages/ast-spec/src/base/UnaryExpressionBase.ts b/packages/ast-spec/src/base/UnaryExpressionBase.ts new file mode 100644 index 000000000000..feb681ccbc3c --- /dev/null +++ b/packages/ast-spec/src/base/UnaryExpressionBase.ts @@ -0,0 +1,10 @@ +import type { UnaryExpression } from '../expression/UnaryExpression/spec'; +import type { LeftHandSideExpression } from '../unions/LeftHandSideExpression'; +import type { Literal } from '../unions/Literal'; +import type { BaseNode } from './BaseNode'; + +export interface UnaryExpressionBase extends BaseNode { + operator: string; + prefix: boolean; + argument: LeftHandSideExpression | Literal | UnaryExpression; +} diff --git a/packages/ast-spec/src/declaration/ClassDeclaration/spec.ts b/packages/ast-spec/src/declaration/ClassDeclaration/spec.ts new file mode 100644 index 000000000000..2154b8863a02 --- /dev/null +++ b/packages/ast-spec/src/declaration/ClassDeclaration/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { ClassDeclarationBase } from '../../base/ClassDeclarationBase'; + +export interface ClassDeclaration extends ClassDeclarationBase { + type: AST_NODE_TYPES.ClassDeclaration; +} diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts new file mode 100644 index 000000000000..e9657a7536fa --- /dev/null +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts @@ -0,0 +1,11 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; +import type { Expression } from '../../unions/Expression'; + +export interface ExportAllDeclaration extends BaseNode { + type: AST_NODE_TYPES.ExportAllDeclaration; + source: Expression | null; + exportKind: 'type' | 'value'; + exported: Identifier | null; +} diff --git a/packages/ast-spec/src/declaration/ExportDefaultDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportDefaultDeclaration/spec.ts new file mode 100644 index 000000000000..f34b6e44668f --- /dev/null +++ b/packages/ast-spec/src/declaration/ExportDefaultDeclaration/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { ExportDeclaration } from '../../unions/ExportDeclaration'; +import type { Expression } from '../../unions/Expression'; + +export interface ExportDefaultDeclaration extends BaseNode { + type: AST_NODE_TYPES.ExportDefaultDeclaration; + declaration: ExportDeclaration | Expression; + exportKind: 'type' | 'value'; +} diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts new file mode 100644 index 000000000000..021fea1c6330 --- /dev/null +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts @@ -0,0 +1,13 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { ExportSpecifier } from '../../special/ExportSpecifier/spec'; +import type { ExportDeclaration } from '../../unions/ExportDeclaration'; +import type { Expression } from '../../unions/Expression'; + +export interface ExportNamedDeclaration extends BaseNode { + type: AST_NODE_TYPES.ExportNamedDeclaration; + declaration: ExportDeclaration | null; + specifiers: ExportSpecifier[]; + source: Expression | null; + exportKind: 'type' | 'value'; +} diff --git a/packages/ast-spec/src/declaration/FunctionDeclaration/spec.ts b/packages/ast-spec/src/declaration/FunctionDeclaration/spec.ts new file mode 100644 index 000000000000..59d7c4ffe39d --- /dev/null +++ b/packages/ast-spec/src/declaration/FunctionDeclaration/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { FunctionDeclarationBase } from '../../base/FunctionDeclarationBase'; +import type { BlockStatement } from '../../statement/BlockStatement/spec'; + +export interface FunctionDeclaration extends FunctionDeclarationBase { + type: AST_NODE_TYPES.FunctionDeclaration; + body: BlockStatement; +} diff --git a/packages/ast-spec/src/declaration/TSDeclareFunction/spec.ts b/packages/ast-spec/src/declaration/TSDeclareFunction/spec.ts new file mode 100644 index 000000000000..88bd4aff2f21 --- /dev/null +++ b/packages/ast-spec/src/declaration/TSDeclareFunction/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { FunctionDeclarationBase } from '../../base/FunctionDeclarationBase'; + +export interface TSDeclareFunction extends FunctionDeclarationBase { + type: AST_NODE_TYPES.TSDeclareFunction; +} diff --git a/packages/ast-spec/src/declaration/TSEnumDeclaration/spec.ts b/packages/ast-spec/src/declaration/TSEnumDeclaration/spec.ts new file mode 100644 index 000000000000..1c1530d501ff --- /dev/null +++ b/packages/ast-spec/src/declaration/TSEnumDeclaration/spec.ts @@ -0,0 +1,14 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSEnumMember } from '../../element/TSEnumMember/spec'; +import type { Identifier } from '../../expression/Identifier/spec'; +import type { Modifier } from '../../unions/Modifier'; + +export interface TSEnumDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSEnumDeclaration; + id: Identifier; + members: TSEnumMember[]; + const?: boolean; + declare?: boolean; + modifiers?: Modifier[]; +} diff --git a/packages/ast-spec/src/declaration/TSImportEqualsDeclaration/spec.ts b/packages/ast-spec/src/declaration/TSImportEqualsDeclaration/spec.ts new file mode 100644 index 000000000000..4c434dded782 --- /dev/null +++ b/packages/ast-spec/src/declaration/TSImportEqualsDeclaration/spec.ts @@ -0,0 +1,13 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; +import type { TSExternalModuleReference } from '../../special/TSExternalModuleReference/spec'; +import type { EntityName } from '../../unions/EntityName'; + +export interface TSImportEqualsDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSImportEqualsDeclaration; + id: Identifier; + moduleReference: EntityName | TSExternalModuleReference; + importKind: 'type' | 'value'; + isExport: boolean; +} diff --git a/packages/ast-spec/src/declaration/TSInterfaceDeclaration/spec.ts b/packages/ast-spec/src/declaration/TSInterfaceDeclaration/spec.ts new file mode 100644 index 000000000000..1e95380c3cbb --- /dev/null +++ b/packages/ast-spec/src/declaration/TSInterfaceDeclaration/spec.ts @@ -0,0 +1,17 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; +import type { TSInterfaceBody } from '../../special/TSInterfaceBody/spec'; +import type { TSInterfaceHeritage } from '../../special/TSInterfaceHeritage/spec'; +import type { TSTypeParameterDeclaration } from '../../special/TSTypeParameterDeclaration/spec'; + +export interface TSInterfaceDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSInterfaceDeclaration; + body: TSInterfaceBody; + id: Identifier; + typeParameters?: TSTypeParameterDeclaration; + extends?: TSInterfaceHeritage[]; + implements?: TSInterfaceHeritage[]; + abstract?: boolean; + declare?: boolean; +} diff --git a/packages/ast-spec/src/declaration/TSModuleDeclaration/spec.ts b/packages/ast-spec/src/declaration/TSModuleDeclaration/spec.ts new file mode 100644 index 000000000000..ac63e52a5938 --- /dev/null +++ b/packages/ast-spec/src/declaration/TSModuleDeclaration/spec.ts @@ -0,0 +1,26 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; +import type { TSModuleBlock } from '../../special/TSModuleBlock/spec'; +import type { Literal } from '../../unions/Literal'; +import type { Modifier } from '../../unions/Modifier'; + +export interface TSModuleDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSModuleDeclaration; + id: Identifier | Literal; + body?: + | TSModuleBlock + /* + TODO - we currently emit this due to bad parser handling of nested modules + namespace Foo.Bar {} + ^^^^^^^^^^^^^^^^^^^^ TSModuleDeclaration + ^^^^^^ TSModuleDeclaration + ^^ TSModuleBlock + + This should instead emit a TSQualifiedName for the `id` and not emit an inner TSModuleDeclaration + */ + | TSModuleDeclaration; + global?: boolean; + declare?: boolean; + modifiers?: Modifier[]; +} diff --git a/packages/ast-spec/src/declaration/TSNamespaceExportDeclaration/spec.ts b/packages/ast-spec/src/declaration/TSNamespaceExportDeclaration/spec.ts new file mode 100644 index 000000000000..6853d4a28544 --- /dev/null +++ b/packages/ast-spec/src/declaration/TSNamespaceExportDeclaration/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; + +export interface TSNamespaceExportDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSNamespaceExportDeclaration; + id: Identifier; +} diff --git a/packages/ast-spec/src/declaration/TSTypeAliasDeclaration/spec.ts b/packages/ast-spec/src/declaration/TSTypeAliasDeclaration/spec.ts new file mode 100644 index 000000000000..61ce986c2a23 --- /dev/null +++ b/packages/ast-spec/src/declaration/TSTypeAliasDeclaration/spec.ts @@ -0,0 +1,13 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; +import type { TSTypeParameterDeclaration } from '../../special/TSTypeParameterDeclaration/spec'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSTypeAliasDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSTypeAliasDeclaration; + id: Identifier; + typeAnnotation: TypeNode; + declare?: boolean; + typeParameters?: TSTypeParameterDeclaration; +} diff --git a/packages/ast-spec/src/declaration/VariableDeclaration/spec.ts b/packages/ast-spec/src/declaration/VariableDeclaration/spec.ts new file mode 100644 index 000000000000..418a51eb735b --- /dev/null +++ b/packages/ast-spec/src/declaration/VariableDeclaration/spec.ts @@ -0,0 +1,11 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { VariableDeclarator } from '../../special/VariableDeclarator/spec'; + +export interface VariableDeclaration extends BaseNode { + type: AST_NODE_TYPES.VariableDeclaration; + // NOTE - this is not guaranteed to have any elements in it. i.e. `const;` + declarations: VariableDeclarator[]; + kind: 'const' | 'let' | 'var'; + declare?: boolean; +} diff --git a/packages/ast-spec/src/declaration/spec.ts b/packages/ast-spec/src/declaration/spec.ts new file mode 100644 index 000000000000..8d29c3cd70a1 --- /dev/null +++ b/packages/ast-spec/src/declaration/spec.ts @@ -0,0 +1,13 @@ +export * from './ClassDeclaration/spec'; +export * from './ExportAllDeclaration/spec'; +export * from './ExportDefaultDeclaration/spec'; +export * from './ExportNamedDeclaration/spec'; +export * from './FunctionDeclaration/spec'; +export * from './TSDeclareFunction/spec'; +export * from './TSEnumDeclaration/spec'; +export * from './TSImportEqualsDeclaration/spec'; +export * from './TSInterfaceDeclaration/spec'; +export * from './TSModuleDeclaration/spec'; +export * from './TSNamespaceExportDeclaration/spec'; +export * from './TSTypeAliasDeclaration/spec'; +export * from './VariableDeclaration/spec'; diff --git a/packages/ast-spec/src/element/ClassProperty/spec.ts b/packages/ast-spec/src/element/ClassProperty/spec.ts new file mode 100644 index 000000000000..29fe75aa84e6 --- /dev/null +++ b/packages/ast-spec/src/element/ClassProperty/spec.ts @@ -0,0 +1,19 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { + ClassPropertyComputedNameBase, + ClassPropertyNonComputedNameBase, +} from '../../base/ClassPropertyBase'; + +export interface ClassPropertyComputedName + extends ClassPropertyComputedNameBase { + type: AST_NODE_TYPES.ClassProperty; +} + +export interface ClassPropertyNonComputedName + extends ClassPropertyNonComputedNameBase { + type: AST_NODE_TYPES.ClassProperty; +} + +export type ClassProperty = + | ClassPropertyComputedName + | ClassPropertyNonComputedName; diff --git a/packages/ast-spec/src/element/MethodDefinition/spec.ts b/packages/ast-spec/src/element/MethodDefinition/spec.ts new file mode 100644 index 000000000000..f097f9f8e854 --- /dev/null +++ b/packages/ast-spec/src/element/MethodDefinition/spec.ts @@ -0,0 +1,19 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { + MethodDefinitionComputedNameBase, + MethodDefinitionNonComputedNameBase, +} from '../../base/MethodDefinitionBase'; + +export interface MethodDefinitionComputedName + extends MethodDefinitionComputedNameBase { + type: AST_NODE_TYPES.MethodDefinition; +} + +export interface MethodDefinitionNonComputedName + extends MethodDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.MethodDefinition; +} + +export type MethodDefinition = + | MethodDefinitionComputedName + | MethodDefinitionNonComputedName; diff --git a/packages/ast-spec/src/element/Property/spec.ts b/packages/ast-spec/src/element/Property/spec.ts new file mode 100644 index 000000000000..c96a7a26e371 --- /dev/null +++ b/packages/ast-spec/src/element/Property/spec.ts @@ -0,0 +1,37 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSEmptyBodyFunctionExpression } from '../../expression/TSEmptyBodyFunctionExpression/spec'; +import type { AssignmentPattern } from '../../parameter/AssignmentPattern/spec'; +import type { BindingName } from '../../unions/BindingName'; +import type { Expression } from '../../unions/Expression'; +import type { + PropertyName, + PropertyNameComputed, + PropertyNameNonComputed, +} from '../../unions/PropertyName'; + +interface PropertyBase extends BaseNode { + type: AST_NODE_TYPES.Property; + key: PropertyName; + value: + | AssignmentPattern + | BindingName + | Expression + | TSEmptyBodyFunctionExpression; + computed: boolean; + method: boolean; + shorthand: boolean; + optional?: boolean; + kind: 'get' | 'init' | 'set'; +} + +export interface PropertyComputedName extends PropertyBase { + key: PropertyNameComputed; + computed: true; +} +export interface PropertyNonComputedName extends PropertyBase { + key: PropertyNameNonComputed; + computed: false; +} + +export type Property = PropertyComputedName | PropertyNonComputedName; diff --git a/packages/ast-spec/src/element/SpreadElement/spec.ts b/packages/ast-spec/src/element/SpreadElement/spec.ts new file mode 100644 index 000000000000..13a691901710 --- /dev/null +++ b/packages/ast-spec/src/element/SpreadElement/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; + +export interface SpreadElement extends BaseNode { + type: AST_NODE_TYPES.SpreadElement; + argument: Expression; +} diff --git a/packages/ast-spec/src/element/TSAbstractClassProperty/spec.ts b/packages/ast-spec/src/element/TSAbstractClassProperty/spec.ts new file mode 100644 index 000000000000..0d845a893290 --- /dev/null +++ b/packages/ast-spec/src/element/TSAbstractClassProperty/spec.ts @@ -0,0 +1,19 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { + ClassPropertyComputedNameBase, + ClassPropertyNonComputedNameBase, +} from '../../base/ClassPropertyBase'; + +export interface TSAbstractClassPropertyComputedName + extends ClassPropertyComputedNameBase { + type: AST_NODE_TYPES.TSAbstractClassProperty; +} + +export interface TSAbstractClassPropertyNonComputedName + extends ClassPropertyNonComputedNameBase { + type: AST_NODE_TYPES.TSAbstractClassProperty; +} + +export type TSAbstractClassProperty = + | TSAbstractClassPropertyComputedName + | TSAbstractClassPropertyNonComputedName; diff --git a/packages/ast-spec/src/element/TSAbstractMethodDefinition/spec.ts b/packages/ast-spec/src/element/TSAbstractMethodDefinition/spec.ts new file mode 100644 index 000000000000..a8f5a05c50ab --- /dev/null +++ b/packages/ast-spec/src/element/TSAbstractMethodDefinition/spec.ts @@ -0,0 +1,19 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { + MethodDefinitionComputedNameBase, + MethodDefinitionNonComputedNameBase, +} from '../../base/MethodDefinitionBase'; + +export interface TSAbstractMethodDefinitionComputedName + extends MethodDefinitionComputedNameBase { + type: AST_NODE_TYPES.TSAbstractMethodDefinition; +} + +export interface TSAbstractMethodDefinitionNonComputedName + extends MethodDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.TSAbstractMethodDefinition; +} + +export type TSAbstractMethodDefinition = + | TSAbstractMethodDefinitionComputedName + | TSAbstractMethodDefinitionNonComputedName; diff --git a/packages/ast-spec/src/element/TSCallSignatureDeclaration/spec.ts b/packages/ast-spec/src/element/TSCallSignatureDeclaration/spec.ts new file mode 100644 index 000000000000..8ba015661ccb --- /dev/null +++ b/packages/ast-spec/src/element/TSCallSignatureDeclaration/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { TSFunctionSignatureBase } from '../../base/TSFunctionSignatureBase'; + +export interface TSCallSignatureDeclaration extends TSFunctionSignatureBase { + type: AST_NODE_TYPES.TSCallSignatureDeclaration; +} diff --git a/packages/ast-spec/src/element/TSConstructSignatureDeclaration/spec.ts b/packages/ast-spec/src/element/TSConstructSignatureDeclaration/spec.ts new file mode 100644 index 000000000000..21feddb824d1 --- /dev/null +++ b/packages/ast-spec/src/element/TSConstructSignatureDeclaration/spec.ts @@ -0,0 +1,7 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { TSFunctionSignatureBase } from '../../base/TSFunctionSignatureBase'; + +export interface TSConstructSignatureDeclaration + extends TSFunctionSignatureBase { + type: AST_NODE_TYPES.TSConstructSignatureDeclaration; +} diff --git a/packages/ast-spec/src/element/TSEnumMember/spec.ts b/packages/ast-spec/src/element/TSEnumMember/spec.ts new file mode 100644 index 000000000000..97d8e49fcd94 --- /dev/null +++ b/packages/ast-spec/src/element/TSEnumMember/spec.ts @@ -0,0 +1,41 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { + PropertyNameComputed, + PropertyNameNonComputed, +} from '../../unions/PropertyName'; + +interface TSEnumMemberBase extends BaseNode { + type: AST_NODE_TYPES.TSEnumMember; + id: + | PropertyNameComputed // this should only happen in semantically invalid code (ts error 1164) + | PropertyNameNonComputed; + initializer?: Expression; + computed?: boolean; +} + +/** + * this should only really happen in semantically invalid code (errors 1164 and 2452) + * + * VALID: + * enum Foo { ['a'] } + * + * INVALID: + * const x = 'a'; + * enum Foo { [x] } + * enum Bar { ['a' + 'b'] } + */ +export interface TSEnumMemberComputedName extends TSEnumMemberBase { + id: PropertyNameComputed; + computed: true; +} + +export interface TSEnumMemberNonComputedName extends TSEnumMemberBase { + id: PropertyNameNonComputed; + computed?: false; +} + +export type TSEnumMember = + | TSEnumMemberComputedName + | TSEnumMemberNonComputedName; diff --git a/packages/ast-spec/src/element/TSIndexSignature/spec.ts b/packages/ast-spec/src/element/TSIndexSignature/spec.ts new file mode 100644 index 000000000000..38002bec2951 --- /dev/null +++ b/packages/ast-spec/src/element/TSIndexSignature/spec.ts @@ -0,0 +1,15 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { Accessibility } from '../../base/Accessibility'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSTypeAnnotation } from '../../special/TSTypeAnnotation/spec'; +import type { Parameter } from '../../unions/Parameter'; + +export interface TSIndexSignature extends BaseNode { + type: AST_NODE_TYPES.TSIndexSignature; + parameters: Parameter[]; + typeAnnotation?: TSTypeAnnotation; + readonly?: boolean; + accessibility?: Accessibility; + export?: boolean; + static?: boolean; +} diff --git a/packages/ast-spec/src/element/TSMethodSignature/spec.ts b/packages/ast-spec/src/element/TSMethodSignature/spec.ts new file mode 100644 index 000000000000..76b2e71ab3ad --- /dev/null +++ b/packages/ast-spec/src/element/TSMethodSignature/spec.ts @@ -0,0 +1,39 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { Accessibility } from '../../base/Accessibility'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSTypeAnnotation } from '../../special/TSTypeAnnotation/spec'; +import type { TSTypeParameterDeclaration } from '../../special/TSTypeParameterDeclaration/spec'; +import type { Parameter } from '../../unions/Parameter'; +import type { + PropertyName, + PropertyNameComputed, + PropertyNameNonComputed, +} from '../../unions/PropertyName'; + +interface TSMethodSignatureBase extends BaseNode { + type: AST_NODE_TYPES.TSMethodSignature; + key: PropertyName; + computed: boolean; + params: Parameter[]; + optional?: boolean; + returnType?: TSTypeAnnotation; + readonly?: boolean; + typeParameters?: TSTypeParameterDeclaration; + accessibility?: Accessibility; + export?: boolean; + static?: boolean; +} + +export interface TSMethodSignatureComputedName extends TSMethodSignatureBase { + key: PropertyNameComputed; + computed: true; +} +export interface TSMethodSignatureNonComputedName + extends TSMethodSignatureBase { + key: PropertyNameNonComputed; + computed: false; +} + +export type TSMethodSignature = + | TSMethodSignatureComputedName + | TSMethodSignatureNonComputedName; diff --git a/packages/ast-spec/src/element/TSPropertySignature/spec.ts b/packages/ast-spec/src/element/TSPropertySignature/spec.ts new file mode 100644 index 000000000000..a3f91ac26807 --- /dev/null +++ b/packages/ast-spec/src/element/TSPropertySignature/spec.ts @@ -0,0 +1,39 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { Accessibility } from '../../base/Accessibility'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSTypeAnnotation } from '../../special/TSTypeAnnotation/spec'; +import type { Expression } from '../../unions/Expression'; +import type { + PropertyName, + PropertyNameComputed, + PropertyNameNonComputed, +} from '../../unions/PropertyName'; + +interface TSPropertySignatureBase extends BaseNode { + type: AST_NODE_TYPES.TSPropertySignature; + key: PropertyName; + optional?: boolean; + computed: boolean; + typeAnnotation?: TSTypeAnnotation; + initializer?: Expression; + readonly?: boolean; + static?: boolean; + export?: boolean; + accessibility?: Accessibility; +} + +export interface TSPropertySignatureComputedName + extends TSPropertySignatureBase { + key: PropertyNameComputed; + computed: true; +} + +export interface TSPropertySignatureNonComputedName + extends TSPropertySignatureBase { + key: PropertyNameNonComputed; + computed: false; +} + +export type TSPropertySignature = + | TSPropertySignatureComputedName + | TSPropertySignatureNonComputedName; diff --git a/packages/ast-spec/src/element/spec.ts b/packages/ast-spec/src/element/spec.ts new file mode 100644 index 000000000000..5ee18d914024 --- /dev/null +++ b/packages/ast-spec/src/element/spec.ts @@ -0,0 +1,12 @@ +export * from './ClassProperty/spec'; +export * from './MethodDefinition/spec'; +export * from './Property/spec'; +export * from './SpreadElement/spec'; +export * from './TSAbstractClassProperty/spec'; +export * from './TSAbstractMethodDefinition/spec'; +export * from './TSCallSignatureDeclaration/spec'; +export * from './TSConstructSignatureDeclaration/spec'; +export * from './TSEnumMember/spec'; +export * from './TSIndexSignature/spec'; +export * from './TSMethodSignature/spec'; +export * from './TSPropertySignature/spec'; diff --git a/packages/ast-spec/src/expression/ArrayExpression/spec.ts b/packages/ast-spec/src/expression/ArrayExpression/spec.ts new file mode 100644 index 000000000000..7da330e231a4 --- /dev/null +++ b/packages/ast-spec/src/expression/ArrayExpression/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; + +export interface ArrayExpression extends BaseNode { + type: AST_NODE_TYPES.ArrayExpression; + elements: Expression[]; +} diff --git a/packages/ast-spec/src/expression/ArrowFunctionExpression/spec.ts b/packages/ast-spec/src/expression/ArrowFunctionExpression/spec.ts new file mode 100644 index 000000000000..347ee8541371 --- /dev/null +++ b/packages/ast-spec/src/expression/ArrowFunctionExpression/spec.ts @@ -0,0 +1,19 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSTypeAnnotation } from '../../special/TSTypeAnnotation/spec'; +import type { TSTypeParameterDeclaration } from '../../special/TSTypeParameterDeclaration/spec'; +import type { BlockStatement } from '../../statement/BlockStatement/spec'; +import type { Expression } from '../../unions/Expression'; +import type { Parameter } from '../../unions/Parameter'; + +export interface ArrowFunctionExpression extends BaseNode { + type: AST_NODE_TYPES.ArrowFunctionExpression; + generator: boolean; + id: null; + params: Parameter[]; + body: BlockStatement | Expression; + async: boolean; + expression: boolean; + returnType?: TSTypeAnnotation; + typeParameters?: TSTypeParameterDeclaration; +} diff --git a/packages/ast-spec/src/expression/AssignmentExpression/spec.ts b/packages/ast-spec/src/expression/AssignmentExpression/spec.ts new file mode 100644 index 000000000000..8d76be21bdcc --- /dev/null +++ b/packages/ast-spec/src/expression/AssignmentExpression/spec.ts @@ -0,0 +1,23 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BinaryExpressionBase } from '../../base/BinaryExpressionBase'; + +export interface AssignmentExpression extends BinaryExpressionBase { + type: AST_NODE_TYPES.AssignmentExpression; + operator: + | '-=' + | '??=' + | '**=' + | '*=' + | '/=' + | '&&=' + | '&=' + | '%=' + | '^=' + | '+=' + | '<<=' + | '=' + | '>>=' + | '>>>=' + | '|=' + | '||='; +} diff --git a/packages/ast-spec/src/expression/AwaitExpression/spec.ts b/packages/ast-spec/src/expression/AwaitExpression/spec.ts new file mode 100644 index 000000000000..248e371e871b --- /dev/null +++ b/packages/ast-spec/src/expression/AwaitExpression/spec.ts @@ -0,0 +1,16 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { LeftHandSideExpression } from '../../unions/LeftHandSideExpression'; +import type { TSTypeAssertion } from '../TSTypeAssertion/spec'; +import type { UnaryExpression } from '../UnaryExpression/spec'; +import type { UpdateExpression } from '../UpdateExpression/spec'; + +export interface AwaitExpression extends BaseNode { + type: AST_NODE_TYPES.AwaitExpression; + argument: + | AwaitExpression + | LeftHandSideExpression + | TSTypeAssertion + | UnaryExpression + | UpdateExpression; +} diff --git a/packages/ast-spec/src/expression/BinaryExpression/spec.ts b/packages/ast-spec/src/expression/BinaryExpression/spec.ts new file mode 100644 index 000000000000..5df33cc3e16a --- /dev/null +++ b/packages/ast-spec/src/expression/BinaryExpression/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BinaryExpressionBase } from '../../base/BinaryExpressionBase'; + +export interface BinaryExpression extends BinaryExpressionBase { + type: AST_NODE_TYPES.BinaryExpression; +} diff --git a/packages/ast-spec/src/expression/CallExpression/spec.ts b/packages/ast-spec/src/expression/CallExpression/spec.ts new file mode 100644 index 000000000000..bd71773a1be8 --- /dev/null +++ b/packages/ast-spec/src/expression/CallExpression/spec.ts @@ -0,0 +1,13 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSTypeParameterInstantiation } from '../../special/TSTypeParameterInstantiation/spec'; +import type { CallExpressionArgument } from '../../unions/CallExpressionArgument'; +import type { LeftHandSideExpression } from '../../unions/LeftHandSideExpression'; + +export interface CallExpression extends BaseNode { + type: AST_NODE_TYPES.CallExpression; + callee: LeftHandSideExpression; + arguments: CallExpressionArgument[]; + typeParameters?: TSTypeParameterInstantiation; + optional: boolean; +} diff --git a/packages/ast-spec/src/expression/ChainExpression/spec.ts b/packages/ast-spec/src/expression/ChainExpression/spec.ts new file mode 100644 index 000000000000..dfad50f3580f --- /dev/null +++ b/packages/ast-spec/src/expression/ChainExpression/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { ChainElement } from '../../unions/ChainElement'; + +export interface ChainExpression extends BaseNode { + type: AST_NODE_TYPES.ChainExpression; + expression: ChainElement; +} diff --git a/packages/ast-spec/src/expression/ClassExpression/spec.ts b/packages/ast-spec/src/expression/ClassExpression/spec.ts new file mode 100644 index 000000000000..15215c31f1b6 --- /dev/null +++ b/packages/ast-spec/src/expression/ClassExpression/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { ClassDeclarationBase } from '../../base/ClassDeclarationBase'; + +export interface ClassExpression extends ClassDeclarationBase { + type: AST_NODE_TYPES.ClassExpression; +} diff --git a/packages/ast-spec/src/expression/ConditionalExpression/spec.ts b/packages/ast-spec/src/expression/ConditionalExpression/spec.ts new file mode 100644 index 000000000000..545fc9497b77 --- /dev/null +++ b/packages/ast-spec/src/expression/ConditionalExpression/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; + +export interface ConditionalExpression extends BaseNode { + type: AST_NODE_TYPES.ConditionalExpression; + test: Expression; + consequent: Expression; + alternate: Expression; +} diff --git a/packages/ast-spec/src/expression/FunctionExpression/spec.ts b/packages/ast-spec/src/expression/FunctionExpression/spec.ts new file mode 100644 index 000000000000..111be168b024 --- /dev/null +++ b/packages/ast-spec/src/expression/FunctionExpression/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { FunctionDeclarationBase } from '../../base/FunctionDeclarationBase'; +import type { BlockStatement } from '../../statement/BlockStatement/spec'; + +export interface FunctionExpression extends FunctionDeclarationBase { + type: AST_NODE_TYPES.FunctionExpression; + body: BlockStatement; +} diff --git a/packages/ast-spec/src/expression/Identifier/spec.ts b/packages/ast-spec/src/expression/Identifier/spec.ts new file mode 100644 index 000000000000..384922a061a1 --- /dev/null +++ b/packages/ast-spec/src/expression/Identifier/spec.ts @@ -0,0 +1,12 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Decorator } from '../../special/Decorator/spec'; +import type { TSTypeAnnotation } from '../../special/TSTypeAnnotation/spec'; + +export interface Identifier extends BaseNode { + type: AST_NODE_TYPES.Identifier; + name: string; + typeAnnotation?: TSTypeAnnotation; + optional?: boolean; + decorators?: Decorator[]; +} diff --git a/packages/ast-spec/src/expression/ImportExpression/spec.ts b/packages/ast-spec/src/expression/ImportExpression/spec.ts new file mode 100644 index 000000000000..c381802571a6 --- /dev/null +++ b/packages/ast-spec/src/expression/ImportExpression/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; + +export interface ImportExpression extends BaseNode { + type: AST_NODE_TYPES.ImportExpression; + source: Expression; +} diff --git a/packages/ast-spec/src/expression/JSXElement/spec.ts b/packages/ast-spec/src/expression/JSXElement/spec.ts new file mode 100644 index 000000000000..32a514f677a3 --- /dev/null +++ b/packages/ast-spec/src/expression/JSXElement/spec.ts @@ -0,0 +1,12 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { JSXClosingElement } from '../../jsx/JSXClosingElement/spec'; +import type { JSXOpeningElement } from '../../jsx/JSXOpeningElement/spec'; +import type { JSXChild } from '../../unions/JSXChild'; + +export interface JSXElement extends BaseNode { + type: AST_NODE_TYPES.JSXElement; + openingElement: JSXOpeningElement; + closingElement: JSXClosingElement | null; + children: JSXChild[]; +} diff --git a/packages/ast-spec/src/expression/JSXFragment/spec.ts b/packages/ast-spec/src/expression/JSXFragment/spec.ts new file mode 100644 index 000000000000..9adce12ada58 --- /dev/null +++ b/packages/ast-spec/src/expression/JSXFragment/spec.ts @@ -0,0 +1,12 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { JSXClosingFragment } from '../../jsx/JSXClosingFragment/spec'; +import type { JSXOpeningFragment } from '../../jsx/JSXOpeningFragment/spec'; +import type { JSXChild } from '../../unions/JSXChild'; + +export interface JSXFragment extends BaseNode { + type: AST_NODE_TYPES.JSXFragment; + openingFragment: JSXOpeningFragment; + closingFragment: JSXClosingFragment; + children: JSXChild[]; +} diff --git a/packages/ast-spec/src/expression/LogicalExpression/spec.ts b/packages/ast-spec/src/expression/LogicalExpression/spec.ts new file mode 100644 index 000000000000..a9bd50e1dfe1 --- /dev/null +++ b/packages/ast-spec/src/expression/LogicalExpression/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BinaryExpressionBase } from '../../base/BinaryExpressionBase'; + +export interface LogicalExpression extends BinaryExpressionBase { + type: AST_NODE_TYPES.LogicalExpression; +} diff --git a/packages/ast-spec/src/expression/MemberExpression/spec.ts b/packages/ast-spec/src/expression/MemberExpression/spec.ts new file mode 100644 index 000000000000..92bad8cf3dc3 --- /dev/null +++ b/packages/ast-spec/src/expression/MemberExpression/spec.ts @@ -0,0 +1,28 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { LeftHandSideExpression } from '../../unions/LeftHandSideExpression'; +import type { Identifier } from '../Identifier/spec'; + +interface MemberExpressionBase extends BaseNode { + object: LeftHandSideExpression; + property: Expression | Identifier; + computed: boolean; + optional: boolean; +} + +export interface MemberExpressionComputedName extends MemberExpressionBase { + type: AST_NODE_TYPES.MemberExpression; + property: Expression; + computed: true; +} + +export interface MemberExpressionNonComputedName extends MemberExpressionBase { + type: AST_NODE_TYPES.MemberExpression; + property: Identifier; + computed: false; +} + +export type MemberExpression = + | MemberExpressionComputedName + | MemberExpressionNonComputedName; diff --git a/packages/ast-spec/src/expression/MetaProperty/spec.ts b/packages/ast-spec/src/expression/MetaProperty/spec.ts new file mode 100644 index 000000000000..5bc9afb81113 --- /dev/null +++ b/packages/ast-spec/src/expression/MetaProperty/spec.ts @@ -0,0 +1,9 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../Identifier/spec'; + +export interface MetaProperty extends BaseNode { + type: AST_NODE_TYPES.MetaProperty; + meta: Identifier; + property: Identifier; +} diff --git a/packages/ast-spec/src/expression/NewExpression/spec.ts b/packages/ast-spec/src/expression/NewExpression/spec.ts new file mode 100644 index 000000000000..bb75ae3f4b8f --- /dev/null +++ b/packages/ast-spec/src/expression/NewExpression/spec.ts @@ -0,0 +1,12 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSTypeParameterInstantiation } from '../../special/TSTypeParameterInstantiation/spec'; +import type { Expression } from '../../unions/Expression'; +import type { LeftHandSideExpression } from '../../unions/LeftHandSideExpression'; + +export interface NewExpression extends BaseNode { + type: AST_NODE_TYPES.NewExpression; + callee: LeftHandSideExpression; + arguments: Expression[]; + typeParameters?: TSTypeParameterInstantiation; +} diff --git a/packages/ast-spec/src/expression/ObjectExpression/spec.ts b/packages/ast-spec/src/expression/ObjectExpression/spec.ts new file mode 100644 index 000000000000..0573a2a76faf --- /dev/null +++ b/packages/ast-spec/src/expression/ObjectExpression/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { ObjectLiteralElement } from '../../unions/ObjectLiteralElement'; + +export interface ObjectExpression extends BaseNode { + type: AST_NODE_TYPES.ObjectExpression; + properties: ObjectLiteralElement[]; +} diff --git a/packages/ast-spec/src/expression/SequenceExpression/spec.ts b/packages/ast-spec/src/expression/SequenceExpression/spec.ts new file mode 100644 index 000000000000..fa571adb4f08 --- /dev/null +++ b/packages/ast-spec/src/expression/SequenceExpression/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; + +export interface SequenceExpression extends BaseNode { + type: AST_NODE_TYPES.SequenceExpression; + expressions: Expression[]; +} diff --git a/packages/ast-spec/src/expression/Super/spec.ts b/packages/ast-spec/src/expression/Super/spec.ts new file mode 100644 index 000000000000..eb310620d8ed --- /dev/null +++ b/packages/ast-spec/src/expression/Super/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface Super extends BaseNode { + type: AST_NODE_TYPES.Super; +} diff --git a/packages/ast-spec/src/expression/TSAsExpression/spec.ts b/packages/ast-spec/src/expression/TSAsExpression/spec.ts new file mode 100644 index 000000000000..b90925a53ca7 --- /dev/null +++ b/packages/ast-spec/src/expression/TSAsExpression/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSAsExpression extends BaseNode { + type: AST_NODE_TYPES.TSAsExpression; + expression: Expression; + typeAnnotation: TypeNode; +} diff --git a/packages/ast-spec/src/expression/TSEmptyBodyFunctionExpression/spec.ts b/packages/ast-spec/src/expression/TSEmptyBodyFunctionExpression/spec.ts new file mode 100644 index 000000000000..2cc413c01095 --- /dev/null +++ b/packages/ast-spec/src/expression/TSEmptyBodyFunctionExpression/spec.ts @@ -0,0 +1,7 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { FunctionDeclarationBase } from '../../base/FunctionDeclarationBase'; + +export interface TSEmptyBodyFunctionExpression extends FunctionDeclarationBase { + type: AST_NODE_TYPES.TSEmptyBodyFunctionExpression; + body: null; +} diff --git a/packages/ast-spec/src/expression/TSNonNullExpression/spec.ts b/packages/ast-spec/src/expression/TSNonNullExpression/spec.ts new file mode 100644 index 000000000000..fd25d33d372f --- /dev/null +++ b/packages/ast-spec/src/expression/TSNonNullExpression/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; + +export interface TSNonNullExpression extends BaseNode { + type: AST_NODE_TYPES.TSNonNullExpression; + expression: Expression; +} diff --git a/packages/ast-spec/src/expression/TSTypeAssertion/spec.ts b/packages/ast-spec/src/expression/TSTypeAssertion/spec.ts new file mode 100644 index 000000000000..d820f8fcc378 --- /dev/null +++ b/packages/ast-spec/src/expression/TSTypeAssertion/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSTypeAssertion extends BaseNode { + type: AST_NODE_TYPES.TSTypeAssertion; + typeAnnotation: TypeNode; + expression: Expression; +} diff --git a/packages/ast-spec/src/expression/TaggedTemplateExpression/spec.ts b/packages/ast-spec/src/expression/TaggedTemplateExpression/spec.ts new file mode 100644 index 000000000000..e3438484d9dd --- /dev/null +++ b/packages/ast-spec/src/expression/TaggedTemplateExpression/spec.ts @@ -0,0 +1,12 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSTypeParameterInstantiation } from '../../special/TSTypeParameterInstantiation/spec'; +import type { LeftHandSideExpression } from '../../unions/LeftHandSideExpression'; +import type { TemplateLiteral } from '../TemplateLiteral/spec'; + +export interface TaggedTemplateExpression extends BaseNode { + type: AST_NODE_TYPES.TaggedTemplateExpression; + typeParameters?: TSTypeParameterInstantiation; + tag: LeftHandSideExpression; + quasi: TemplateLiteral; +} diff --git a/packages/ast-spec/src/expression/TemplateLiteral/spec.ts b/packages/ast-spec/src/expression/TemplateLiteral/spec.ts new file mode 100644 index 000000000000..4d92ef79176d --- /dev/null +++ b/packages/ast-spec/src/expression/TemplateLiteral/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TemplateElement } from '../../special/TemplateElement/spec'; +import type { Expression } from '../../unions/Expression'; + +export interface TemplateLiteral extends BaseNode { + type: AST_NODE_TYPES.TemplateLiteral; + quasis: TemplateElement[]; + expressions: Expression[]; +} diff --git a/packages/ast-spec/src/expression/ThisExpression/spec.ts b/packages/ast-spec/src/expression/ThisExpression/spec.ts new file mode 100644 index 000000000000..63b5a213a883 --- /dev/null +++ b/packages/ast-spec/src/expression/ThisExpression/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface ThisExpression extends BaseNode { + type: AST_NODE_TYPES.ThisExpression; +} diff --git a/packages/ast-spec/src/expression/UnaryExpression/spec.ts b/packages/ast-spec/src/expression/UnaryExpression/spec.ts new file mode 100644 index 000000000000..26ec8a0e9cdf --- /dev/null +++ b/packages/ast-spec/src/expression/UnaryExpression/spec.ts @@ -0,0 +1,7 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { UnaryExpressionBase } from '../../base/UnaryExpressionBase'; + +export interface UnaryExpression extends UnaryExpressionBase { + type: AST_NODE_TYPES.UnaryExpression; + operator: '-' | '!' | '+' | '~' | 'delete' | 'typeof' | 'void'; +} diff --git a/packages/ast-spec/src/expression/UpdateExpression/spec.ts b/packages/ast-spec/src/expression/UpdateExpression/spec.ts new file mode 100644 index 000000000000..909815fdabf3 --- /dev/null +++ b/packages/ast-spec/src/expression/UpdateExpression/spec.ts @@ -0,0 +1,7 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { UnaryExpressionBase } from '../../base/UnaryExpressionBase'; + +export interface UpdateExpression extends UnaryExpressionBase { + type: AST_NODE_TYPES.UpdateExpression; + operator: '--' | '++'; +} diff --git a/packages/ast-spec/src/expression/YieldExpression/spec.ts b/packages/ast-spec/src/expression/YieldExpression/spec.ts new file mode 100644 index 000000000000..1f07e4f78e32 --- /dev/null +++ b/packages/ast-spec/src/expression/YieldExpression/spec.ts @@ -0,0 +1,9 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; + +export interface YieldExpression extends BaseNode { + type: AST_NODE_TYPES.YieldExpression; + delegate: boolean; + argument?: Expression; +} diff --git a/packages/ast-spec/src/expression/literal/BigIntLiteral/spec.ts b/packages/ast-spec/src/expression/literal/BigIntLiteral/spec.ts new file mode 100644 index 000000000000..c27a85543ff8 --- /dev/null +++ b/packages/ast-spec/src/expression/literal/BigIntLiteral/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../../ast-node-types'; +import type { LiteralBase } from '../../../base/LiteralBase'; + +export interface BigIntLiteral extends LiteralBase { + type: AST_NODE_TYPES.Literal; + value: bigint | null; + bigint: string; +} diff --git a/packages/ast-spec/src/expression/literal/BooleanLiteral/spec.ts b/packages/ast-spec/src/expression/literal/BooleanLiteral/spec.ts new file mode 100644 index 000000000000..a2310a698d02 --- /dev/null +++ b/packages/ast-spec/src/expression/literal/BooleanLiteral/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../../ast-node-types'; +import type { LiteralBase } from '../../../base/LiteralBase'; + +export interface BooleanLiteral extends LiteralBase { + type: AST_NODE_TYPES.Literal; + value: boolean; + raw: 'false' | 'true'; +} diff --git a/packages/ast-spec/src/expression/literal/NullLiteral/spec.ts b/packages/ast-spec/src/expression/literal/NullLiteral/spec.ts new file mode 100644 index 000000000000..f520b7b3d454 --- /dev/null +++ b/packages/ast-spec/src/expression/literal/NullLiteral/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../../ast-node-types'; +import type { LiteralBase } from '../../../base/LiteralBase'; + +export interface NullLiteral extends LiteralBase { + type: AST_NODE_TYPES.Literal; + value: null; + raw: 'null'; +} diff --git a/packages/ast-spec/src/expression/literal/NumberLiteral/spec.ts b/packages/ast-spec/src/expression/literal/NumberLiteral/spec.ts new file mode 100644 index 000000000000..8155bb45cafc --- /dev/null +++ b/packages/ast-spec/src/expression/literal/NumberLiteral/spec.ts @@ -0,0 +1,7 @@ +import type { AST_NODE_TYPES } from '../../../ast-node-types'; +import type { LiteralBase } from '../../../base/LiteralBase'; + +export interface NumberLiteral extends LiteralBase { + type: AST_NODE_TYPES.Literal; + value: number; +} diff --git a/packages/ast-spec/src/expression/literal/RegExpLiteral/spec.ts b/packages/ast-spec/src/expression/literal/RegExpLiteral/spec.ts new file mode 100644 index 000000000000..ab45f651b768 --- /dev/null +++ b/packages/ast-spec/src/expression/literal/RegExpLiteral/spec.ts @@ -0,0 +1,11 @@ +import type { AST_NODE_TYPES } from '../../../ast-node-types'; +import type { LiteralBase } from '../../../base/LiteralBase'; + +export interface RegExpLiteral extends LiteralBase { + type: AST_NODE_TYPES.Literal; + value: RegExp | null; + regex: { + pattern: string; + flags: string; + }; +} diff --git a/packages/ast-spec/src/expression/literal/StringLiteral/spec.ts b/packages/ast-spec/src/expression/literal/StringLiteral/spec.ts new file mode 100644 index 000000000000..de83d9d20e1d --- /dev/null +++ b/packages/ast-spec/src/expression/literal/StringLiteral/spec.ts @@ -0,0 +1,7 @@ +import type { AST_NODE_TYPES } from '../../../ast-node-types'; +import type { LiteralBase } from '../../../base/LiteralBase'; + +export interface StringLiteral extends LiteralBase { + type: AST_NODE_TYPES.Literal; + value: string; +} diff --git a/packages/ast-spec/src/expression/literal/spec.ts b/packages/ast-spec/src/expression/literal/spec.ts new file mode 100644 index 000000000000..d40804b424e1 --- /dev/null +++ b/packages/ast-spec/src/expression/literal/spec.ts @@ -0,0 +1,6 @@ +export * from './BigIntLiteral/spec'; +export * from './BooleanLiteral/spec'; +export * from './NullLiteral/spec'; +export * from './NumberLiteral/spec'; +export * from './RegExpLiteral/spec'; +export * from './StringLiteral/spec'; diff --git a/packages/ast-spec/src/expression/spec.ts b/packages/ast-spec/src/expression/spec.ts new file mode 100644 index 000000000000..9ea054546202 --- /dev/null +++ b/packages/ast-spec/src/expression/spec.ts @@ -0,0 +1,33 @@ +export * from './ArrayExpression/spec'; +export * from './ArrowFunctionExpression/spec'; +export * from './AssignmentExpression/spec'; +export * from './AwaitExpression/spec'; +export * from './BinaryExpression/spec'; +export * from './CallExpression/spec'; +export * from './ChainExpression/spec'; +export * from './ClassExpression/spec'; +export * from './ConditionalExpression/spec'; +export * from './FunctionExpression/spec'; +export * from './Identifier/spec'; +export * from './ImportExpression/spec'; +export * from './JSXElement/spec'; +export * from './JSXFragment/spec'; +export * from './LogicalExpression/spec'; +export * from './MemberExpression/spec'; +export * from './MetaProperty/spec'; +export * from './NewExpression/spec'; +export * from './ObjectExpression/spec'; +export * from './SequenceExpression/spec'; +export * from './Super/spec'; +export * from './TSAsExpression/spec'; +export * from './TSEmptyBodyFunctionExpression/spec'; +export * from './TSNonNullExpression/spec'; +export * from './TSTypeAssertion/spec'; +export * from './TaggedTemplateExpression/spec'; +export * from './TemplateLiteral/spec'; +export * from './ThisExpression/spec'; +export * from './UnaryExpression/spec'; +export * from './UpdateExpression/spec'; +export * from './YieldExpression/spec'; + +export * from './literal/spec'; diff --git a/packages/ast-spec/src/index.ts b/packages/ast-spec/src/index.ts new file mode 100644 index 000000000000..bd4b6584482d --- /dev/null +++ b/packages/ast-spec/src/index.ts @@ -0,0 +1,52 @@ +export * from './base/Accessibility'; +export * from './base/BaseNode'; // this is exported so that the `types` package can merge the decl and add the `parent` property +export * from './base/OptionalRangeAndLoc'; +export * from './base/LineAndColumnData'; +export * from './base/Range'; +export * from './base/SourceLocation'; + +export * from './unions/BindingName'; +export * from './unions/BindingPattern'; +export * from './unions/CallExpressionArgument'; +export * from './unions/ChainElement'; +export * from './unions/ClassElement'; +export * from './unions/Comment'; +export * from './unions/DeclarationStatement'; +export * from './unions/DestructuringPattern'; +export * from './unions/EntityName'; +export * from './unions/ExportDeclaration'; +export * from './unions/Expression'; +export * from './unions/ForInitialiser'; +export * from './unions/FunctionLike'; +export * from './unions/ImportClause'; +export * from './unions/IterationStatement'; +export * from './unions/JSXChild'; +export * from './unions/JSXExpression'; +export * from './unions/JSXTagNameExpression'; +export * from './unions/LeftHandSideExpression'; +export * from './unions/Literal'; +export * from './unions/LiteralExpression'; +export * from './unions/Modifier'; +export * from './unions/Node'; +export * from './unions/ObjectLiteralElement'; +export * from './unions/Parameter'; +export * from './unions/PrimaryExpression'; +export * from './unions/PropertyName'; +export * from './unions/Statement'; +export * from './unions/TSUnaryExpression'; +export * from './unions/Token'; +export * from './unions/TypeElement'; +export * from './unions/TypeNode'; + +export * from './declaration/spec'; +export * from './element/spec'; +export * from './expression/spec'; +export * from './jsx/spec'; +export * from './parameter/spec'; +export * from './special/spec'; +export * from './statement/spec'; +export * from './token/spec'; +export * from './type/spec'; + +export * from './ast-node-types'; +export * from './ast-token-types'; diff --git a/packages/ast-spec/src/jsx/JSXAttribute/spec.ts b/packages/ast-spec/src/jsx/JSXAttribute/spec.ts new file mode 100644 index 000000000000..8fc8364c05fd --- /dev/null +++ b/packages/ast-spec/src/jsx/JSXAttribute/spec.ts @@ -0,0 +1,12 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { JSXExpression } from '../../unions/JSXExpression'; +import type { Literal } from '../../unions/Literal'; +import type { JSXIdentifier } from '../JSXIdentifier/spec'; +import type { JSXNamespacedName } from '../JSXNamespacedName/spec'; + +export interface JSXAttribute extends BaseNode { + type: AST_NODE_TYPES.JSXAttribute; + name: JSXIdentifier | JSXNamespacedName; + value: JSXExpression | Literal | null; +} diff --git a/packages/ast-spec/src/jsx/JSXClosingElement/spec.ts b/packages/ast-spec/src/jsx/JSXClosingElement/spec.ts new file mode 100644 index 000000000000..ea698d6059ed --- /dev/null +++ b/packages/ast-spec/src/jsx/JSXClosingElement/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { JSXTagNameExpression } from '../../unions/JSXTagNameExpression'; + +export interface JSXClosingElement extends BaseNode { + type: AST_NODE_TYPES.JSXClosingElement; + name: JSXTagNameExpression; +} diff --git a/packages/ast-spec/src/jsx/JSXClosingFragment/spec.ts b/packages/ast-spec/src/jsx/JSXClosingFragment/spec.ts new file mode 100644 index 000000000000..8edd7c4e958f --- /dev/null +++ b/packages/ast-spec/src/jsx/JSXClosingFragment/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface JSXClosingFragment extends BaseNode { + type: AST_NODE_TYPES.JSXClosingFragment; +} diff --git a/packages/ast-spec/src/jsx/JSXEmptyExpression/spec.ts b/packages/ast-spec/src/jsx/JSXEmptyExpression/spec.ts new file mode 100644 index 000000000000..36e3c16069c4 --- /dev/null +++ b/packages/ast-spec/src/jsx/JSXEmptyExpression/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface JSXEmptyExpression extends BaseNode { + type: AST_NODE_TYPES.JSXEmptyExpression; +} diff --git a/packages/ast-spec/src/jsx/JSXExpressionContainer/spec.ts b/packages/ast-spec/src/jsx/JSXExpressionContainer/spec.ts new file mode 100644 index 000000000000..1a0673e6fd15 --- /dev/null +++ b/packages/ast-spec/src/jsx/JSXExpressionContainer/spec.ts @@ -0,0 +1,9 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { JSXEmptyExpression } from '../JSXEmptyExpression/spec'; + +export interface JSXExpressionContainer extends BaseNode { + type: AST_NODE_TYPES.JSXExpressionContainer; + expression: Expression | JSXEmptyExpression; +} diff --git a/packages/ast-spec/src/jsx/JSXIdentifier/spec.ts b/packages/ast-spec/src/jsx/JSXIdentifier/spec.ts new file mode 100644 index 000000000000..1d7b71d67ab0 --- /dev/null +++ b/packages/ast-spec/src/jsx/JSXIdentifier/spec.ts @@ -0,0 +1,7 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface JSXIdentifier extends BaseNode { + type: AST_NODE_TYPES.JSXIdentifier; + name: string; +} diff --git a/packages/ast-spec/src/jsx/JSXMemberExpression/spec.ts b/packages/ast-spec/src/jsx/JSXMemberExpression/spec.ts new file mode 100644 index 000000000000..e0cda9c16ee4 --- /dev/null +++ b/packages/ast-spec/src/jsx/JSXMemberExpression/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { JSXTagNameExpression } from '../../unions/JSXTagNameExpression'; +import type { JSXIdentifier } from '../JSXIdentifier/spec'; + +export interface JSXMemberExpression extends BaseNode { + type: AST_NODE_TYPES.JSXMemberExpression; + object: JSXTagNameExpression; + property: JSXIdentifier; +} diff --git a/packages/ast-spec/src/jsx/JSXNamespacedName/spec.ts b/packages/ast-spec/src/jsx/JSXNamespacedName/spec.ts new file mode 100644 index 000000000000..22443d938eca --- /dev/null +++ b/packages/ast-spec/src/jsx/JSXNamespacedName/spec.ts @@ -0,0 +1,9 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { JSXIdentifier } from '../JSXIdentifier/spec'; + +export interface JSXNamespacedName extends BaseNode { + type: AST_NODE_TYPES.JSXNamespacedName; + namespace: JSXIdentifier; + name: JSXIdentifier; +} diff --git a/packages/ast-spec/src/jsx/JSXOpeningElement/spec.ts b/packages/ast-spec/src/jsx/JSXOpeningElement/spec.ts new file mode 100644 index 000000000000..710fade02fa5 --- /dev/null +++ b/packages/ast-spec/src/jsx/JSXOpeningElement/spec.ts @@ -0,0 +1,14 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSTypeParameterInstantiation } from '../../special/TSTypeParameterInstantiation/spec'; +import type { JSXTagNameExpression } from '../../unions/JSXTagNameExpression'; +import type { JSXAttribute } from '../JSXAttribute/spec'; +import type { JSXSpreadAttribute } from '../JSXSpreadAttribute/spec'; + +export interface JSXOpeningElement extends BaseNode { + type: AST_NODE_TYPES.JSXOpeningElement; + typeParameters?: TSTypeParameterInstantiation; + selfClosing: boolean; + name: JSXTagNameExpression; + attributes: (JSXAttribute | JSXSpreadAttribute)[]; +} diff --git a/packages/ast-spec/src/jsx/JSXOpeningFragment/spec.ts b/packages/ast-spec/src/jsx/JSXOpeningFragment/spec.ts new file mode 100644 index 000000000000..9b972a237f22 --- /dev/null +++ b/packages/ast-spec/src/jsx/JSXOpeningFragment/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface JSXOpeningFragment extends BaseNode { + type: AST_NODE_TYPES.JSXOpeningFragment; +} diff --git a/packages/ast-spec/src/jsx/JSXSpreadAttribute/spec.ts b/packages/ast-spec/src/jsx/JSXSpreadAttribute/spec.ts new file mode 100644 index 000000000000..db6e6fc1d1bc --- /dev/null +++ b/packages/ast-spec/src/jsx/JSXSpreadAttribute/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; + +export interface JSXSpreadAttribute extends BaseNode { + type: AST_NODE_TYPES.JSXSpreadAttribute; + argument: Expression; +} diff --git a/packages/ast-spec/src/jsx/JSXSpreadChild/spec.ts b/packages/ast-spec/src/jsx/JSXSpreadChild/spec.ts new file mode 100644 index 000000000000..53fe53555c30 --- /dev/null +++ b/packages/ast-spec/src/jsx/JSXSpreadChild/spec.ts @@ -0,0 +1,9 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { JSXEmptyExpression } from '../JSXEmptyExpression/spec'; + +export interface JSXSpreadChild extends BaseNode { + type: AST_NODE_TYPES.JSXSpreadChild; + expression: Expression | JSXEmptyExpression; +} diff --git a/packages/ast-spec/src/jsx/JSXText/spec.ts b/packages/ast-spec/src/jsx/JSXText/spec.ts new file mode 100644 index 000000000000..a323493fba90 --- /dev/null +++ b/packages/ast-spec/src/jsx/JSXText/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface JSXText extends BaseNode { + type: AST_NODE_TYPES.JSXText; + value: string; + raw: string; +} diff --git a/packages/ast-spec/src/jsx/spec.ts b/packages/ast-spec/src/jsx/spec.ts new file mode 100644 index 000000000000..1efb134bed7f --- /dev/null +++ b/packages/ast-spec/src/jsx/spec.ts @@ -0,0 +1,13 @@ +export * from './JSXAttribute/spec'; +export * from './JSXClosingElement/spec'; +export * from './JSXClosingFragment/spec'; +export * from './JSXEmptyExpression/spec'; +export * from './JSXExpressionContainer/spec'; +export * from './JSXIdentifier/spec'; +export * from './JSXMemberExpression/spec'; +export * from './JSXNamespacedName/spec'; +export * from './JSXOpeningElement/spec'; +export * from './JSXOpeningFragment/spec'; +export * from './JSXSpreadAttribute/spec'; +export * from './JSXSpreadChild/spec'; +export * from './JSXText/spec'; diff --git a/packages/ast-spec/src/parameter/ArrayPattern/spec.ts b/packages/ast-spec/src/parameter/ArrayPattern/spec.ts new file mode 100644 index 000000000000..420a93278731 --- /dev/null +++ b/packages/ast-spec/src/parameter/ArrayPattern/spec.ts @@ -0,0 +1,13 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Decorator } from '../../special/Decorator/spec'; +import type { TSTypeAnnotation } from '../../special/TSTypeAnnotation/spec'; +import type { DestructuringPattern } from '../../unions/DestructuringPattern'; + +export interface ArrayPattern extends BaseNode { + type: AST_NODE_TYPES.ArrayPattern; + elements: (DestructuringPattern | null)[]; + typeAnnotation?: TSTypeAnnotation; + optional?: boolean; + decorators?: Decorator[]; +} diff --git a/packages/ast-spec/src/parameter/AssignmentPattern/spec.ts b/packages/ast-spec/src/parameter/AssignmentPattern/spec.ts new file mode 100644 index 000000000000..ee558c2167c2 --- /dev/null +++ b/packages/ast-spec/src/parameter/AssignmentPattern/spec.ts @@ -0,0 +1,15 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Decorator } from '../../special/Decorator/spec'; +import type { TSTypeAnnotation } from '../../special/TSTypeAnnotation/spec'; +import type { BindingName } from '../../unions/BindingName'; +import type { Expression } from '../../unions/Expression'; + +export interface AssignmentPattern extends BaseNode { + type: AST_NODE_TYPES.AssignmentPattern; + left: BindingName; + right: Expression; + typeAnnotation?: TSTypeAnnotation; + optional?: boolean; + decorators?: Decorator[]; +} diff --git a/packages/ast-spec/src/parameter/ObjectPattern/spec.ts b/packages/ast-spec/src/parameter/ObjectPattern/spec.ts new file mode 100644 index 000000000000..12c89878794e --- /dev/null +++ b/packages/ast-spec/src/parameter/ObjectPattern/spec.ts @@ -0,0 +1,14 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Property } from '../../element/Property/spec'; +import type { Decorator } from '../../special/Decorator/spec'; +import type { TSTypeAnnotation } from '../../special/TSTypeAnnotation/spec'; +import type { RestElement } from '../RestElement/spec'; + +export interface ObjectPattern extends BaseNode { + type: AST_NODE_TYPES.ObjectPattern; + properties: (Property | RestElement)[]; + typeAnnotation?: TSTypeAnnotation; + optional?: boolean; + decorators?: Decorator[]; +} diff --git a/packages/ast-spec/src/parameter/RestElement/spec.ts b/packages/ast-spec/src/parameter/RestElement/spec.ts new file mode 100644 index 000000000000..006f5e48ba3b --- /dev/null +++ b/packages/ast-spec/src/parameter/RestElement/spec.ts @@ -0,0 +1,15 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Decorator } from '../../special/Decorator/spec'; +import type { TSTypeAnnotation } from '../../special/TSTypeAnnotation/spec'; +import type { DestructuringPattern } from '../../unions/DestructuringPattern'; +import type { AssignmentPattern } from '../AssignmentPattern/spec'; + +export interface RestElement extends BaseNode { + type: AST_NODE_TYPES.RestElement; + argument: DestructuringPattern; + typeAnnotation?: TSTypeAnnotation; + optional?: boolean; + value?: AssignmentPattern; + decorators?: Decorator[]; +} diff --git a/packages/ast-spec/src/parameter/TSParameterProperty/spec.ts b/packages/ast-spec/src/parameter/TSParameterProperty/spec.ts new file mode 100644 index 000000000000..d04e49fd98b8 --- /dev/null +++ b/packages/ast-spec/src/parameter/TSParameterProperty/spec.ts @@ -0,0 +1,17 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { Accessibility } from '../../base/Accessibility'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Decorator } from '../../special/Decorator/spec'; +import type { BindingName } from '../../unions/BindingName'; +import type { AssignmentPattern } from '../AssignmentPattern/spec'; +import type { RestElement } from '../RestElement/spec'; + +export interface TSParameterProperty extends BaseNode { + type: AST_NODE_TYPES.TSParameterProperty; + accessibility?: Accessibility; + readonly?: boolean; + static?: boolean; + export?: boolean; + parameter: AssignmentPattern | BindingName | RestElement; + decorators?: Decorator[]; +} diff --git a/packages/ast-spec/src/parameter/spec.ts b/packages/ast-spec/src/parameter/spec.ts new file mode 100644 index 000000000000..b006664a36ae --- /dev/null +++ b/packages/ast-spec/src/parameter/spec.ts @@ -0,0 +1,5 @@ +export * from './ArrayPattern/spec'; +export * from './AssignmentPattern/spec'; +export * from './ObjectPattern/spec'; +export * from './RestElement/spec'; +export * from './TSParameterProperty/spec'; diff --git a/packages/ast-spec/src/special/CatchClause/spec.ts b/packages/ast-spec/src/special/CatchClause/spec.ts new file mode 100644 index 000000000000..dea8168acda0 --- /dev/null +++ b/packages/ast-spec/src/special/CatchClause/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { BlockStatement } from '../../statement/BlockStatement/spec'; +import type { BindingName } from '../../unions/BindingName'; + +export interface CatchClause extends BaseNode { + type: AST_NODE_TYPES.CatchClause; + param: BindingName | null; + body: BlockStatement; +} diff --git a/packages/ast-spec/src/special/ClassBody/spec.ts b/packages/ast-spec/src/special/ClassBody/spec.ts new file mode 100644 index 000000000000..11c93d540fb3 --- /dev/null +++ b/packages/ast-spec/src/special/ClassBody/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { ClassElement } from '../../unions/ClassElement'; + +export interface ClassBody extends BaseNode { + type: AST_NODE_TYPES.ClassBody; + body: ClassElement[]; +} diff --git a/packages/ast-spec/src/special/Decorator/spec.ts b/packages/ast-spec/src/special/Decorator/spec.ts new file mode 100644 index 000000000000..3c8d1e819042 --- /dev/null +++ b/packages/ast-spec/src/special/Decorator/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { LeftHandSideExpression } from '../../unions/LeftHandSideExpression'; + +export interface Decorator extends BaseNode { + type: AST_NODE_TYPES.Decorator; + expression: LeftHandSideExpression; +} diff --git a/packages/ast-spec/src/special/EmptyStatement/spec.ts b/packages/ast-spec/src/special/EmptyStatement/spec.ts new file mode 100644 index 000000000000..530283d3bdc1 --- /dev/null +++ b/packages/ast-spec/src/special/EmptyStatement/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface EmptyStatement extends BaseNode { + type: AST_NODE_TYPES.EmptyStatement; +} diff --git a/packages/ast-spec/src/special/ExportSpecifier/spec.ts b/packages/ast-spec/src/special/ExportSpecifier/spec.ts new file mode 100644 index 000000000000..8fd038e92be6 --- /dev/null +++ b/packages/ast-spec/src/special/ExportSpecifier/spec.ts @@ -0,0 +1,9 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; + +export interface ExportSpecifier extends BaseNode { + type: AST_NODE_TYPES.ExportSpecifier; + local: Identifier; + exported: Identifier; +} diff --git a/packages/ast-spec/src/special/ImportDefaultSpecifier/spec.ts b/packages/ast-spec/src/special/ImportDefaultSpecifier/spec.ts new file mode 100644 index 000000000000..c4ad22f20340 --- /dev/null +++ b/packages/ast-spec/src/special/ImportDefaultSpecifier/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; + +export interface ImportDefaultSpecifier extends BaseNode { + type: AST_NODE_TYPES.ImportDefaultSpecifier; + local: Identifier; +} diff --git a/packages/ast-spec/src/special/ImportNamespaceSpecifier/spec.ts b/packages/ast-spec/src/special/ImportNamespaceSpecifier/spec.ts new file mode 100644 index 000000000000..eec79636f1fc --- /dev/null +++ b/packages/ast-spec/src/special/ImportNamespaceSpecifier/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; + +export interface ImportNamespaceSpecifier extends BaseNode { + type: AST_NODE_TYPES.ImportNamespaceSpecifier; + local: Identifier; +} diff --git a/packages/ast-spec/src/special/ImportSpecifier/spec.ts b/packages/ast-spec/src/special/ImportSpecifier/spec.ts new file mode 100644 index 000000000000..326df7db6b65 --- /dev/null +++ b/packages/ast-spec/src/special/ImportSpecifier/spec.ts @@ -0,0 +1,9 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; + +export interface ImportSpecifier extends BaseNode { + type: AST_NODE_TYPES.ImportSpecifier; + local: Identifier; + imported: Identifier; +} diff --git a/packages/ast-spec/src/special/Program/spec.ts b/packages/ast-spec/src/special/Program/spec.ts new file mode 100644 index 000000000000..81d69e1e604d --- /dev/null +++ b/packages/ast-spec/src/special/Program/spec.ts @@ -0,0 +1,13 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Comment } from '../../unions/Comment'; +import type { ProgramStatement } from '../../unions/Statement'; +import type { Token } from '../../unions/Token'; + +export interface Program extends BaseNode { + type: AST_NODE_TYPES.Program; + body: ProgramStatement[]; + sourceType: 'module' | 'script'; + comments?: Comment[]; + tokens?: Token[]; +} diff --git a/packages/ast-spec/src/special/SwitchCase/spec.ts b/packages/ast-spec/src/special/SwitchCase/spec.ts new file mode 100644 index 000000000000..f48f323536a4 --- /dev/null +++ b/packages/ast-spec/src/special/SwitchCase/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { Statement } from '../../unions/Statement'; + +export interface SwitchCase extends BaseNode { + type: AST_NODE_TYPES.SwitchCase; + test: Expression | null; + consequent: Statement[]; +} diff --git a/packages/ast-spec/src/special/TSClassImplements/spec.ts b/packages/ast-spec/src/special/TSClassImplements/spec.ts new file mode 100644 index 000000000000..98213713edc4 --- /dev/null +++ b/packages/ast-spec/src/special/TSClassImplements/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { TSHeritageBase } from '../../base/TSHeritageBase'; + +export interface TSClassImplements extends TSHeritageBase { + type: AST_NODE_TYPES.TSClassImplements; +} diff --git a/packages/ast-spec/src/special/TSExternalModuleReference/spec.ts b/packages/ast-spec/src/special/TSExternalModuleReference/spec.ts new file mode 100644 index 000000000000..e634d4d0d6e9 --- /dev/null +++ b/packages/ast-spec/src/special/TSExternalModuleReference/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; + +export interface TSExternalModuleReference extends BaseNode { + type: AST_NODE_TYPES.TSExternalModuleReference; + expression: Expression; +} diff --git a/packages/ast-spec/src/special/TSInterfaceBody/spec.ts b/packages/ast-spec/src/special/TSInterfaceBody/spec.ts new file mode 100644 index 000000000000..1ee1c901c14d --- /dev/null +++ b/packages/ast-spec/src/special/TSInterfaceBody/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeElement } from '../../unions/TypeElement'; + +export interface TSInterfaceBody extends BaseNode { + type: AST_NODE_TYPES.TSInterfaceBody; + body: TypeElement[]; +} diff --git a/packages/ast-spec/src/special/TSInterfaceHeritage/spec.ts b/packages/ast-spec/src/special/TSInterfaceHeritage/spec.ts new file mode 100644 index 000000000000..29382acd5460 --- /dev/null +++ b/packages/ast-spec/src/special/TSInterfaceHeritage/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { TSHeritageBase } from '../../base/TSHeritageBase'; + +export interface TSInterfaceHeritage extends TSHeritageBase { + type: AST_NODE_TYPES.TSInterfaceHeritage; +} diff --git a/packages/ast-spec/src/special/TSModuleBlock/spec.ts b/packages/ast-spec/src/special/TSModuleBlock/spec.ts new file mode 100644 index 000000000000..9fed19af3b80 --- /dev/null +++ b/packages/ast-spec/src/special/TSModuleBlock/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { ProgramStatement } from '../../unions/Statement'; + +export interface TSModuleBlock extends BaseNode { + type: AST_NODE_TYPES.TSModuleBlock; + body: ProgramStatement[]; +} diff --git a/packages/ast-spec/src/special/TSTypeAnnotation/spec.ts b/packages/ast-spec/src/special/TSTypeAnnotation/spec.ts new file mode 100644 index 000000000000..bb9272353cbc --- /dev/null +++ b/packages/ast-spec/src/special/TSTypeAnnotation/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSTypeAnnotation extends BaseNode { + type: AST_NODE_TYPES.TSTypeAnnotation; + typeAnnotation: TypeNode; +} diff --git a/packages/ast-spec/src/special/TSTypeParameter/spec.ts b/packages/ast-spec/src/special/TSTypeParameter/spec.ts new file mode 100644 index 000000000000..61d75a6a29ed --- /dev/null +++ b/packages/ast-spec/src/special/TSTypeParameter/spec.ts @@ -0,0 +1,11 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSTypeParameter extends BaseNode { + type: AST_NODE_TYPES.TSTypeParameter; + name: Identifier; + constraint?: TypeNode; + default?: TypeNode; +} diff --git a/packages/ast-spec/src/special/TSTypeParameterDeclaration/spec.ts b/packages/ast-spec/src/special/TSTypeParameterDeclaration/spec.ts new file mode 100644 index 000000000000..ac8971e38a0c --- /dev/null +++ b/packages/ast-spec/src/special/TSTypeParameterDeclaration/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSTypeParameter } from '../TSTypeParameter/spec'; + +export interface TSTypeParameterDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSTypeParameterDeclaration; + params: TSTypeParameter[]; +} diff --git a/packages/ast-spec/src/special/TSTypeParameterInstantiation/spec.ts b/packages/ast-spec/src/special/TSTypeParameterInstantiation/spec.ts new file mode 100644 index 000000000000..e5122c2f6a5c --- /dev/null +++ b/packages/ast-spec/src/special/TSTypeParameterInstantiation/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSTypeParameterInstantiation extends BaseNode { + type: AST_NODE_TYPES.TSTypeParameterInstantiation; + params: TypeNode[]; +} diff --git a/packages/ast-spec/src/special/TemplateElement/spec.ts b/packages/ast-spec/src/special/TemplateElement/spec.ts new file mode 100644 index 000000000000..abf4dc910457 --- /dev/null +++ b/packages/ast-spec/src/special/TemplateElement/spec.ts @@ -0,0 +1,11 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TemplateElement extends BaseNode { + type: AST_NODE_TYPES.TemplateElement; + value: { + raw: string; + cooked: string; + }; + tail: boolean; +} diff --git a/packages/ast-spec/src/special/VariableDeclarator/spec.ts b/packages/ast-spec/src/special/VariableDeclarator/spec.ts new file mode 100644 index 000000000000..619c6a57d5dc --- /dev/null +++ b/packages/ast-spec/src/special/VariableDeclarator/spec.ts @@ -0,0 +1,11 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { BindingName } from '../../unions/BindingName'; +import type { Expression } from '../../unions/Expression'; + +export interface VariableDeclarator extends BaseNode { + type: AST_NODE_TYPES.VariableDeclarator; + id: BindingName; + init: Expression | null; + definite?: boolean; +} diff --git a/packages/ast-spec/src/special/spec.ts b/packages/ast-spec/src/special/spec.ts new file mode 100644 index 000000000000..07142e15c8f9 --- /dev/null +++ b/packages/ast-spec/src/special/spec.ts @@ -0,0 +1,21 @@ +export * from './CatchClause/spec'; +export * from './ClassBody/spec'; +export * from './Decorator/spec'; +export * from './EmptyStatement/spec'; +export * from './ExportSpecifier/spec'; +export * from './ImportDefaultSpecifier/spec'; +export * from './ImportNamespaceSpecifier/spec'; +export * from './ImportSpecifier/spec'; +export * from './Program/spec'; +export * from './SwitchCase/spec'; +export * from './TSClassImplements/spec'; +export * from './TSExternalModuleReference/spec'; +export * from './TSInterfaceBody/spec'; +export * from './TSInterfaceHeritage/spec'; +export * from './TSModuleBlock/spec'; +export * from './TSTypeAnnotation/spec'; +export * from './TSTypeParameter/spec'; +export * from './TSTypeParameterDeclaration/spec'; +export * from './TSTypeParameterInstantiation/spec'; +export * from './TemplateElement/spec'; +export * from './VariableDeclarator/spec'; diff --git a/packages/ast-spec/src/statement/BlockStatement/spec.ts b/packages/ast-spec/src/statement/BlockStatement/spec.ts new file mode 100644 index 000000000000..298a962e5161 --- /dev/null +++ b/packages/ast-spec/src/statement/BlockStatement/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Statement } from '../../unions/Statement'; + +export interface BlockStatement extends BaseNode { + type: AST_NODE_TYPES.BlockStatement; + body: Statement[]; +} diff --git a/packages/ast-spec/src/statement/BreakStatement/spec.ts b/packages/ast-spec/src/statement/BreakStatement/spec.ts new file mode 100644 index 000000000000..0441c298d365 --- /dev/null +++ b/packages/ast-spec/src/statement/BreakStatement/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; + +export interface BreakStatement extends BaseNode { + type: AST_NODE_TYPES.BreakStatement; + label: Identifier | null; +} diff --git a/packages/ast-spec/src/statement/ContinueStatement/spec.ts b/packages/ast-spec/src/statement/ContinueStatement/spec.ts new file mode 100644 index 000000000000..70f2373dc217 --- /dev/null +++ b/packages/ast-spec/src/statement/ContinueStatement/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; + +export interface ContinueStatement extends BaseNode { + type: AST_NODE_TYPES.ContinueStatement; + label: Identifier | null; +} diff --git a/packages/ast-spec/src/statement/DebuggerStatement/spec.ts b/packages/ast-spec/src/statement/DebuggerStatement/spec.ts new file mode 100644 index 000000000000..f28b7fc41b72 --- /dev/null +++ b/packages/ast-spec/src/statement/DebuggerStatement/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface DebuggerStatement extends BaseNode { + type: AST_NODE_TYPES.DebuggerStatement; +} diff --git a/packages/ast-spec/src/statement/DoWhileStatement/spec.ts b/packages/ast-spec/src/statement/DoWhileStatement/spec.ts new file mode 100644 index 000000000000..933ce61b2c4c --- /dev/null +++ b/packages/ast-spec/src/statement/DoWhileStatement/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { Statement } from '../../unions/Statement'; + +export interface DoWhileStatement extends BaseNode { + type: AST_NODE_TYPES.DoWhileStatement; + test: Expression; + body: Statement; +} diff --git a/packages/ast-spec/src/statement/ExpressionStatement/spec.ts b/packages/ast-spec/src/statement/ExpressionStatement/spec.ts new file mode 100644 index 000000000000..f5fd336a9604 --- /dev/null +++ b/packages/ast-spec/src/statement/ExpressionStatement/spec.ts @@ -0,0 +1,9 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; + +export interface ExpressionStatement extends BaseNode { + type: AST_NODE_TYPES.ExpressionStatement; + expression: Expression; + directive?: string; +} diff --git a/packages/ast-spec/src/statement/ForInStatement/spec.ts b/packages/ast-spec/src/statement/ForInStatement/spec.ts new file mode 100644 index 000000000000..7abe3b2f5fad --- /dev/null +++ b/packages/ast-spec/src/statement/ForInStatement/spec.ts @@ -0,0 +1,12 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { ForInitialiser } from '../../unions/ForInitialiser'; +import type { Statement } from '../../unions/Statement'; + +export interface ForInStatement extends BaseNode { + type: AST_NODE_TYPES.ForInStatement; + left: ForInitialiser; + right: Expression; + body: Statement; +} diff --git a/packages/ast-spec/src/statement/ForOfStatement/spec.ts b/packages/ast-spec/src/statement/ForOfStatement/spec.ts new file mode 100644 index 000000000000..963261eaaac8 --- /dev/null +++ b/packages/ast-spec/src/statement/ForOfStatement/spec.ts @@ -0,0 +1,13 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { ForInitialiser } from '../../unions/ForInitialiser'; +import type { Statement } from '../../unions/Statement'; + +export interface ForOfStatement extends BaseNode { + type: AST_NODE_TYPES.ForOfStatement; + left: ForInitialiser; + right: Expression; + body: Statement; + await: boolean; +} diff --git a/packages/ast-spec/src/statement/ForStatement/spec.ts b/packages/ast-spec/src/statement/ForStatement/spec.ts new file mode 100644 index 000000000000..1b56756b3a50 --- /dev/null +++ b/packages/ast-spec/src/statement/ForStatement/spec.ts @@ -0,0 +1,13 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { ForInitialiser } from '../../unions/ForInitialiser'; +import type { Statement } from '../../unions/Statement'; + +export interface ForStatement extends BaseNode { + type: AST_NODE_TYPES.ForStatement; + init: Expression | ForInitialiser | null; + test: Expression | null; + update: Expression | null; + body: Statement; +} diff --git a/packages/ast-spec/src/statement/IfStatement/spec.ts b/packages/ast-spec/src/statement/IfStatement/spec.ts new file mode 100644 index 000000000000..f9081923e64a --- /dev/null +++ b/packages/ast-spec/src/statement/IfStatement/spec.ts @@ -0,0 +1,11 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { Statement } from '../../unions/Statement'; + +export interface IfStatement extends BaseNode { + type: AST_NODE_TYPES.IfStatement; + test: Expression; + consequent: Statement; + alternate: Statement | null; +} diff --git a/packages/ast-spec/src/statement/ImportDeclaration/spec.ts b/packages/ast-spec/src/statement/ImportDeclaration/spec.ts new file mode 100644 index 000000000000..eaaad5f53e32 --- /dev/null +++ b/packages/ast-spec/src/statement/ImportDeclaration/spec.ts @@ -0,0 +1,11 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { ImportClause } from '../../unions/ImportClause'; +import type { Literal } from '../../unions/Literal'; + +export interface ImportDeclaration extends BaseNode { + type: AST_NODE_TYPES.ImportDeclaration; + source: Literal; + specifiers: ImportClause[]; + importKind: 'type' | 'value'; +} diff --git a/packages/ast-spec/src/statement/LabeledStatement/spec.ts b/packages/ast-spec/src/statement/LabeledStatement/spec.ts new file mode 100644 index 000000000000..d007008d3a4b --- /dev/null +++ b/packages/ast-spec/src/statement/LabeledStatement/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; +import type { Statement } from '../../unions/Statement'; + +export interface LabeledStatement extends BaseNode { + type: AST_NODE_TYPES.LabeledStatement; + label: Identifier; + body: Statement; +} diff --git a/packages/ast-spec/src/statement/ReturnStatement/spec.ts b/packages/ast-spec/src/statement/ReturnStatement/spec.ts new file mode 100644 index 000000000000..d7758715c8dd --- /dev/null +++ b/packages/ast-spec/src/statement/ReturnStatement/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; + +export interface ReturnStatement extends BaseNode { + type: AST_NODE_TYPES.ReturnStatement; + argument: Expression | null; +} diff --git a/packages/ast-spec/src/statement/SwitchStatement/spec.ts b/packages/ast-spec/src/statement/SwitchStatement/spec.ts new file mode 100644 index 000000000000..9c76f81455c8 --- /dev/null +++ b/packages/ast-spec/src/statement/SwitchStatement/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { SwitchCase } from '../../special/SwitchCase/spec'; +import type { Expression } from '../../unions/Expression'; + +export interface SwitchStatement extends BaseNode { + type: AST_NODE_TYPES.SwitchStatement; + discriminant: Expression; + cases: SwitchCase[]; +} diff --git a/packages/ast-spec/src/statement/TSExportAssignment/spec.ts b/packages/ast-spec/src/statement/TSExportAssignment/spec.ts new file mode 100644 index 000000000000..3792bc5012b1 --- /dev/null +++ b/packages/ast-spec/src/statement/TSExportAssignment/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; + +export interface TSExportAssignment extends BaseNode { + type: AST_NODE_TYPES.TSExportAssignment; + expression: Expression; +} diff --git a/packages/ast-spec/src/statement/ThrowStatement/spec.ts b/packages/ast-spec/src/statement/ThrowStatement/spec.ts new file mode 100644 index 000000000000..ac47bd98778c --- /dev/null +++ b/packages/ast-spec/src/statement/ThrowStatement/spec.ts @@ -0,0 +1,9 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSAsExpression } from '../../expression/TSAsExpression/spec'; +import type { Statement } from '../../unions/Statement'; + +export interface ThrowStatement extends BaseNode { + type: AST_NODE_TYPES.ThrowStatement; + argument: Statement | TSAsExpression | null; +} diff --git a/packages/ast-spec/src/statement/TryStatement/spec.ts b/packages/ast-spec/src/statement/TryStatement/spec.ts new file mode 100644 index 000000000000..0435fbeb2100 --- /dev/null +++ b/packages/ast-spec/src/statement/TryStatement/spec.ts @@ -0,0 +1,11 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { CatchClause } from '../../special/CatchClause/spec'; +import type { BlockStatement } from '../BlockStatement/spec'; + +export interface TryStatement extends BaseNode { + type: AST_NODE_TYPES.TryStatement; + block: BlockStatement; + handler: CatchClause | null; + finalizer: BlockStatement | null; +} diff --git a/packages/ast-spec/src/statement/WhileStatement/spec.ts b/packages/ast-spec/src/statement/WhileStatement/spec.ts new file mode 100644 index 000000000000..1c9492c77140 --- /dev/null +++ b/packages/ast-spec/src/statement/WhileStatement/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { Statement } from '../../unions/Statement'; + +export interface WhileStatement extends BaseNode { + type: AST_NODE_TYPES.WhileStatement; + test: Expression; + body: Statement; +} diff --git a/packages/ast-spec/src/statement/WithStatement/spec.ts b/packages/ast-spec/src/statement/WithStatement/spec.ts new file mode 100644 index 000000000000..c661a5175b9a --- /dev/null +++ b/packages/ast-spec/src/statement/WithStatement/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Expression } from '../../unions/Expression'; +import type { Statement } from '../../unions/Statement'; + +export interface WithStatement extends BaseNode { + type: AST_NODE_TYPES.WithStatement; + object: Expression; + body: Statement; +} diff --git a/packages/ast-spec/src/statement/spec.ts b/packages/ast-spec/src/statement/spec.ts new file mode 100644 index 000000000000..d1ce293283e4 --- /dev/null +++ b/packages/ast-spec/src/statement/spec.ts @@ -0,0 +1,19 @@ +export * from './BlockStatement/spec'; +export * from './BreakStatement/spec'; +export * from './ContinueStatement/spec'; +export * from './DebuggerStatement/spec'; +export * from './DoWhileStatement/spec'; +export * from './ExpressionStatement/spec'; +export * from './ForInStatement/spec'; +export * from './ForOfStatement/spec'; +export * from './ForStatement/spec'; +export * from './IfStatement/spec'; +export * from './ImportDeclaration/spec'; +export * from './LabeledStatement/spec'; +export * from './ReturnStatement/spec'; +export * from './SwitchStatement/spec'; +export * from './TSExportAssignment/spec'; +export * from './ThrowStatement/spec'; +export * from './TryStatement/spec'; +export * from './WhileStatement/spec'; +export * from './WithStatement/spec'; diff --git a/packages/ast-spec/src/token/BlockComment/spec.ts b/packages/ast-spec/src/token/BlockComment/spec.ts new file mode 100644 index 000000000000..c2c7db298a4f --- /dev/null +++ b/packages/ast-spec/src/token/BlockComment/spec.ts @@ -0,0 +1,6 @@ +import type { AST_TOKEN_TYPES } from '../../ast-token-types'; +import type { BaseToken } from '../../base/BaseToken'; + +export interface BlockComment extends BaseToken { + type: AST_TOKEN_TYPES.Block; +} diff --git a/packages/ast-spec/src/token/BooleanToken/spec.ts b/packages/ast-spec/src/token/BooleanToken/spec.ts new file mode 100644 index 000000000000..eeace18c8cd9 --- /dev/null +++ b/packages/ast-spec/src/token/BooleanToken/spec.ts @@ -0,0 +1,6 @@ +import type { AST_TOKEN_TYPES } from '../../ast-token-types'; +import type { BaseToken } from '../../base/BaseToken'; + +export interface BooleanToken extends BaseToken { + type: AST_TOKEN_TYPES.Boolean; +} diff --git a/packages/ast-spec/src/token/IdentifierToken/spec.ts b/packages/ast-spec/src/token/IdentifierToken/spec.ts new file mode 100644 index 000000000000..9df6e14c3c99 --- /dev/null +++ b/packages/ast-spec/src/token/IdentifierToken/spec.ts @@ -0,0 +1,6 @@ +import type { AST_TOKEN_TYPES } from '../../ast-token-types'; +import type { BaseToken } from '../../base/BaseToken'; + +export interface IdentifierToken extends BaseToken { + type: AST_TOKEN_TYPES.Identifier; +} diff --git a/packages/ast-spec/src/token/JSXIdentifierToken/spec.ts b/packages/ast-spec/src/token/JSXIdentifierToken/spec.ts new file mode 100644 index 000000000000..858775073735 --- /dev/null +++ b/packages/ast-spec/src/token/JSXIdentifierToken/spec.ts @@ -0,0 +1,6 @@ +import type { AST_TOKEN_TYPES } from '../../ast-token-types'; +import type { BaseToken } from '../../base/BaseToken'; + +export interface JSXIdentifierToken extends BaseToken { + type: AST_TOKEN_TYPES.JSXIdentifier; +} diff --git a/packages/ast-spec/src/token/JSXTextToken/spec.ts b/packages/ast-spec/src/token/JSXTextToken/spec.ts new file mode 100644 index 000000000000..6a8d3aa5d50d --- /dev/null +++ b/packages/ast-spec/src/token/JSXTextToken/spec.ts @@ -0,0 +1,6 @@ +import type { AST_TOKEN_TYPES } from '../../ast-token-types'; +import type { BaseToken } from '../../base/BaseToken'; + +export interface JSXTextToken extends BaseToken { + type: AST_TOKEN_TYPES.JSXText; +} diff --git a/packages/ast-spec/src/token/KeywordToken/spec.ts b/packages/ast-spec/src/token/KeywordToken/spec.ts new file mode 100644 index 000000000000..b7e9c058f692 --- /dev/null +++ b/packages/ast-spec/src/token/KeywordToken/spec.ts @@ -0,0 +1,6 @@ +import type { AST_TOKEN_TYPES } from '../../ast-token-types'; +import type { BaseToken } from '../../base/BaseToken'; + +export interface KeywordToken extends BaseToken { + type: AST_TOKEN_TYPES.Keyword; +} diff --git a/packages/ast-spec/src/token/LineComment/spec.ts b/packages/ast-spec/src/token/LineComment/spec.ts new file mode 100644 index 000000000000..82db26f07442 --- /dev/null +++ b/packages/ast-spec/src/token/LineComment/spec.ts @@ -0,0 +1,6 @@ +import type { AST_TOKEN_TYPES } from '../../ast-token-types'; +import type { BaseToken } from '../../base/BaseToken'; + +export interface LineComment extends BaseToken { + type: AST_TOKEN_TYPES.Line; +} diff --git a/packages/ast-spec/src/token/NullToken/spec.ts b/packages/ast-spec/src/token/NullToken/spec.ts new file mode 100644 index 000000000000..d5ae492de83a --- /dev/null +++ b/packages/ast-spec/src/token/NullToken/spec.ts @@ -0,0 +1,6 @@ +import type { AST_TOKEN_TYPES } from '../../ast-token-types'; +import type { BaseToken } from '../../base/BaseToken'; + +export interface NullToken extends BaseToken { + type: AST_TOKEN_TYPES.Null; +} diff --git a/packages/ast-spec/src/token/NumericToken/spec.ts b/packages/ast-spec/src/token/NumericToken/spec.ts new file mode 100644 index 000000000000..a00fd383df75 --- /dev/null +++ b/packages/ast-spec/src/token/NumericToken/spec.ts @@ -0,0 +1,6 @@ +import type { AST_TOKEN_TYPES } from '../../ast-token-types'; +import type { BaseToken } from '../../base/BaseToken'; + +export interface NumericToken extends BaseToken { + type: AST_TOKEN_TYPES.Numeric; +} diff --git a/packages/ast-spec/src/token/PunctuatorToken/spec.ts b/packages/ast-spec/src/token/PunctuatorToken/spec.ts new file mode 100644 index 000000000000..39b9507348c2 --- /dev/null +++ b/packages/ast-spec/src/token/PunctuatorToken/spec.ts @@ -0,0 +1,6 @@ +import type { AST_TOKEN_TYPES } from '../../ast-token-types'; +import type { BaseToken } from '../../base/BaseToken'; + +export interface PunctuatorToken extends BaseToken { + type: AST_TOKEN_TYPES.Punctuator; +} diff --git a/packages/ast-spec/src/token/RegularExpressionToken/spec.ts b/packages/ast-spec/src/token/RegularExpressionToken/spec.ts new file mode 100644 index 000000000000..7b0bb09d5262 --- /dev/null +++ b/packages/ast-spec/src/token/RegularExpressionToken/spec.ts @@ -0,0 +1,10 @@ +import type { AST_TOKEN_TYPES } from '../../ast-token-types'; +import type { BaseToken } from '../../base/BaseToken'; + +export interface RegularExpressionToken extends BaseToken { + type: AST_TOKEN_TYPES.RegularExpression; + regex: { + pattern: string; + flags: string; + }; +} diff --git a/packages/ast-spec/src/token/StringToken/spec.ts b/packages/ast-spec/src/token/StringToken/spec.ts new file mode 100644 index 000000000000..6b6535c6208d --- /dev/null +++ b/packages/ast-spec/src/token/StringToken/spec.ts @@ -0,0 +1,6 @@ +import type { AST_TOKEN_TYPES } from '../../ast-token-types'; +import type { BaseToken } from '../../base/BaseToken'; + +export interface StringToken extends BaseToken { + type: AST_TOKEN_TYPES.String; +} diff --git a/packages/ast-spec/src/token/TSAbstractKeyword/spec.ts b/packages/ast-spec/src/token/TSAbstractKeyword/spec.ts new file mode 100644 index 000000000000..d15a55443c57 --- /dev/null +++ b/packages/ast-spec/src/token/TSAbstractKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSAbstractKeyword extends BaseNode { + type: AST_NODE_TYPES.TSAbstractKeyword; +} diff --git a/packages/ast-spec/src/token/TSAsyncKeyword/spec.ts b/packages/ast-spec/src/token/TSAsyncKeyword/spec.ts new file mode 100644 index 000000000000..26baddf7ad64 --- /dev/null +++ b/packages/ast-spec/src/token/TSAsyncKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSAsyncKeyword extends BaseNode { + type: AST_NODE_TYPES.TSAsyncKeyword; +} diff --git a/packages/ast-spec/src/token/TSDeclareKeyword/spec.ts b/packages/ast-spec/src/token/TSDeclareKeyword/spec.ts new file mode 100644 index 000000000000..8b6e6606b3e8 --- /dev/null +++ b/packages/ast-spec/src/token/TSDeclareKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSDeclareKeyword extends BaseNode { + type: AST_NODE_TYPES.TSDeclareKeyword; +} diff --git a/packages/ast-spec/src/token/TSExportKeyword/spec.ts b/packages/ast-spec/src/token/TSExportKeyword/spec.ts new file mode 100644 index 000000000000..016664d11b03 --- /dev/null +++ b/packages/ast-spec/src/token/TSExportKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSExportKeyword extends BaseNode { + type: AST_NODE_TYPES.TSExportKeyword; +} diff --git a/packages/ast-spec/src/token/TSPrivateKeyword/spec.ts b/packages/ast-spec/src/token/TSPrivateKeyword/spec.ts new file mode 100644 index 000000000000..ae57db0a066c --- /dev/null +++ b/packages/ast-spec/src/token/TSPrivateKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSPrivateKeyword extends BaseNode { + type: AST_NODE_TYPES.TSPrivateKeyword; +} diff --git a/packages/ast-spec/src/token/TSProtectedKeyword/spec.ts b/packages/ast-spec/src/token/TSProtectedKeyword/spec.ts new file mode 100644 index 000000000000..815b28a1c2c1 --- /dev/null +++ b/packages/ast-spec/src/token/TSProtectedKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSProtectedKeyword extends BaseNode { + type: AST_NODE_TYPES.TSProtectedKeyword; +} diff --git a/packages/ast-spec/src/token/TSPublicKeyword/spec.ts b/packages/ast-spec/src/token/TSPublicKeyword/spec.ts new file mode 100644 index 000000000000..3409fc6d689a --- /dev/null +++ b/packages/ast-spec/src/token/TSPublicKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSPublicKeyword extends BaseNode { + type: AST_NODE_TYPES.TSPublicKeyword; +} diff --git a/packages/ast-spec/src/token/TSReadonlyKeyword/spec.ts b/packages/ast-spec/src/token/TSReadonlyKeyword/spec.ts new file mode 100644 index 000000000000..462849972785 --- /dev/null +++ b/packages/ast-spec/src/token/TSReadonlyKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSReadonlyKeyword extends BaseNode { + type: AST_NODE_TYPES.TSReadonlyKeyword; +} diff --git a/packages/ast-spec/src/token/TSStaticKeyword/spec.ts b/packages/ast-spec/src/token/TSStaticKeyword/spec.ts new file mode 100644 index 000000000000..1c2417eeb589 --- /dev/null +++ b/packages/ast-spec/src/token/TSStaticKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSStaticKeyword extends BaseNode { + type: AST_NODE_TYPES.TSStaticKeyword; +} diff --git a/packages/ast-spec/src/token/TemplateToken/spec.ts b/packages/ast-spec/src/token/TemplateToken/spec.ts new file mode 100644 index 000000000000..da64ef0b6e98 --- /dev/null +++ b/packages/ast-spec/src/token/TemplateToken/spec.ts @@ -0,0 +1,6 @@ +import type { AST_TOKEN_TYPES } from '../../ast-token-types'; +import type { BaseToken } from '../../base/BaseToken'; + +export interface TemplateToken extends BaseToken { + type: AST_TOKEN_TYPES.Template; +} diff --git a/packages/ast-spec/src/token/spec.ts b/packages/ast-spec/src/token/spec.ts new file mode 100644 index 000000000000..45df05189eb2 --- /dev/null +++ b/packages/ast-spec/src/token/spec.ts @@ -0,0 +1,22 @@ +export * from './BlockComment/spec'; +export * from './BooleanToken/spec'; +export * from './IdentifierToken/spec'; +export * from './JSXIdentifierToken/spec'; +export * from './JSXTextToken/spec'; +export * from './KeywordToken/spec'; +export * from './LineComment/spec'; +export * from './NullToken/spec'; +export * from './NumericToken/spec'; +export * from './PunctuatorToken/spec'; +export * from './RegularExpressionToken/spec'; +export * from './StringToken/spec'; +export * from './TSAbstractKeyword/spec'; +export * from './TSAsyncKeyword/spec'; +export * from './TSDeclareKeyword/spec'; +export * from './TSExportKeyword/spec'; +export * from './TSPrivateKeyword/spec'; +export * from './TSProtectedKeyword/spec'; +export * from './TSPublicKeyword/spec'; +export * from './TSReadonlyKeyword/spec'; +export * from './TSStaticKeyword/spec'; +export * from './TemplateToken/spec'; diff --git a/packages/ast-spec/src/type/TSAnyKeyword/spec.ts b/packages/ast-spec/src/type/TSAnyKeyword/spec.ts new file mode 100644 index 000000000000..a9e2ba977f1d --- /dev/null +++ b/packages/ast-spec/src/type/TSAnyKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSAnyKeyword extends BaseNode { + type: AST_NODE_TYPES.TSAnyKeyword; +} diff --git a/packages/ast-spec/src/type/TSArrayType/spec.ts b/packages/ast-spec/src/type/TSArrayType/spec.ts new file mode 100644 index 000000000000..f7aa4f16a596 --- /dev/null +++ b/packages/ast-spec/src/type/TSArrayType/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSArrayType extends BaseNode { + type: AST_NODE_TYPES.TSArrayType; + elementType: TypeNode; +} diff --git a/packages/ast-spec/src/type/TSBigIntKeyword/spec.ts b/packages/ast-spec/src/type/TSBigIntKeyword/spec.ts new file mode 100644 index 000000000000..fc18a9519dee --- /dev/null +++ b/packages/ast-spec/src/type/TSBigIntKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSBigIntKeyword extends BaseNode { + type: AST_NODE_TYPES.TSBigIntKeyword; +} diff --git a/packages/ast-spec/src/type/TSBooleanKeyword/spec.ts b/packages/ast-spec/src/type/TSBooleanKeyword/spec.ts new file mode 100644 index 000000000000..89438151de1f --- /dev/null +++ b/packages/ast-spec/src/type/TSBooleanKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSBooleanKeyword extends BaseNode { + type: AST_NODE_TYPES.TSBooleanKeyword; +} diff --git a/packages/ast-spec/src/type/TSConditionalType/spec.ts b/packages/ast-spec/src/type/TSConditionalType/spec.ts new file mode 100644 index 000000000000..979fcb3e6026 --- /dev/null +++ b/packages/ast-spec/src/type/TSConditionalType/spec.ts @@ -0,0 +1,11 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSConditionalType extends BaseNode { + type: AST_NODE_TYPES.TSConditionalType; + checkType: TypeNode; + extendsType: TypeNode; + trueType: TypeNode; + falseType: TypeNode; +} diff --git a/packages/ast-spec/src/type/TSConstructorType/spec.ts b/packages/ast-spec/src/type/TSConstructorType/spec.ts new file mode 100644 index 000000000000..08e19757d14a --- /dev/null +++ b/packages/ast-spec/src/type/TSConstructorType/spec.ts @@ -0,0 +1,7 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { TSFunctionSignatureBase } from '../../base/TSFunctionSignatureBase'; + +export interface TSConstructorType extends TSFunctionSignatureBase { + type: AST_NODE_TYPES.TSConstructorType; + abstract: boolean; +} diff --git a/packages/ast-spec/src/type/TSFunctionType/spec.ts b/packages/ast-spec/src/type/TSFunctionType/spec.ts new file mode 100644 index 000000000000..4388b097efd5 --- /dev/null +++ b/packages/ast-spec/src/type/TSFunctionType/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { TSFunctionSignatureBase } from '../../base/TSFunctionSignatureBase'; + +export interface TSFunctionType extends TSFunctionSignatureBase { + type: AST_NODE_TYPES.TSFunctionType; +} diff --git a/packages/ast-spec/src/type/TSImportType/spec.ts b/packages/ast-spec/src/type/TSImportType/spec.ts new file mode 100644 index 000000000000..b2eea1a78e01 --- /dev/null +++ b/packages/ast-spec/src/type/TSImportType/spec.ts @@ -0,0 +1,13 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSTypeParameterInstantiation } from '../../special/TSTypeParameterInstantiation/spec'; +import type { EntityName } from '../../unions/EntityName'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSImportType extends BaseNode { + type: AST_NODE_TYPES.TSImportType; + isTypeOf: boolean; + parameter: TypeNode; + qualifier: EntityName | null; + typeParameters: TSTypeParameterInstantiation | null; +} diff --git a/packages/ast-spec/src/type/TSIndexedAccessType/spec.ts b/packages/ast-spec/src/type/TSIndexedAccessType/spec.ts new file mode 100644 index 000000000000..86a22e22a16e --- /dev/null +++ b/packages/ast-spec/src/type/TSIndexedAccessType/spec.ts @@ -0,0 +1,9 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSIndexedAccessType extends BaseNode { + type: AST_NODE_TYPES.TSIndexedAccessType; + objectType: TypeNode; + indexType: TypeNode; +} diff --git a/packages/ast-spec/src/type/TSInferType/spec.ts b/packages/ast-spec/src/type/TSInferType/spec.ts new file mode 100644 index 000000000000..11cdacb25d20 --- /dev/null +++ b/packages/ast-spec/src/type/TSInferType/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSTypeParameter } from '../../special/TSTypeParameter/spec'; + +export interface TSInferType extends BaseNode { + type: AST_NODE_TYPES.TSInferType; + typeParameter: TSTypeParameter; +} diff --git a/packages/ast-spec/src/type/TSIntersectionType/spec.ts b/packages/ast-spec/src/type/TSIntersectionType/spec.ts new file mode 100644 index 000000000000..b84834143a0e --- /dev/null +++ b/packages/ast-spec/src/type/TSIntersectionType/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSIntersectionType extends BaseNode { + type: AST_NODE_TYPES.TSIntersectionType; + types: TypeNode[]; +} diff --git a/packages/ast-spec/src/type/TSIntrinsicType/spec.ts b/packages/ast-spec/src/type/TSIntrinsicType/spec.ts new file mode 100644 index 000000000000..b7158c2803c0 --- /dev/null +++ b/packages/ast-spec/src/type/TSIntrinsicType/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSIntrinsicKeyword extends BaseNode { + type: AST_NODE_TYPES.TSIntrinsicKeyword; +} diff --git a/packages/ast-spec/src/type/TSLiteralType/spec.ts b/packages/ast-spec/src/type/TSLiteralType/spec.ts new file mode 100644 index 000000000000..39f6ae0d2961 --- /dev/null +++ b/packages/ast-spec/src/type/TSLiteralType/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { UnaryExpression } from '../../expression/UnaryExpression/spec'; +import type { UpdateExpression } from '../../expression/UpdateExpression/spec'; +import type { LiteralExpression } from '../../unions/LiteralExpression'; + +export interface TSLiteralType extends BaseNode { + type: AST_NODE_TYPES.TSLiteralType; + literal: LiteralExpression | UnaryExpression | UpdateExpression; +} diff --git a/packages/ast-spec/src/type/TSMappedType/spec.ts b/packages/ast-spec/src/type/TSMappedType/spec.ts new file mode 100644 index 000000000000..db5abd4063a1 --- /dev/null +++ b/packages/ast-spec/src/type/TSMappedType/spec.ts @@ -0,0 +1,13 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSTypeParameter } from '../../special/TSTypeParameter/spec'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSMappedType extends BaseNode { + type: AST_NODE_TYPES.TSMappedType; + typeParameter: TSTypeParameter; + readonly?: boolean | '-' | '+'; + optional?: boolean | '-' | '+'; + typeAnnotation?: TypeNode; + nameType: TypeNode | null; +} diff --git a/packages/ast-spec/src/type/TSNamedTupleMember/spec.ts b/packages/ast-spec/src/type/TSNamedTupleMember/spec.ts new file mode 100644 index 000000000000..540d8bf19db5 --- /dev/null +++ b/packages/ast-spec/src/type/TSNamedTupleMember/spec.ts @@ -0,0 +1,11 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSNamedTupleMember extends BaseNode { + type: AST_NODE_TYPES.TSNamedTupleMember; + elementType: TypeNode; + label: Identifier; + optional: boolean; +} diff --git a/packages/ast-spec/src/type/TSNeverKeyword/spec.ts b/packages/ast-spec/src/type/TSNeverKeyword/spec.ts new file mode 100644 index 000000000000..59fe839e3473 --- /dev/null +++ b/packages/ast-spec/src/type/TSNeverKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSNeverKeyword extends BaseNode { + type: AST_NODE_TYPES.TSNeverKeyword; +} diff --git a/packages/ast-spec/src/type/TSNullKeyword/spec.ts b/packages/ast-spec/src/type/TSNullKeyword/spec.ts new file mode 100644 index 000000000000..254d5cc592d5 --- /dev/null +++ b/packages/ast-spec/src/type/TSNullKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSNullKeyword extends BaseNode { + type: AST_NODE_TYPES.TSNullKeyword; +} diff --git a/packages/ast-spec/src/type/TSNumberKeyword/spec.ts b/packages/ast-spec/src/type/TSNumberKeyword/spec.ts new file mode 100644 index 000000000000..768742a425dc --- /dev/null +++ b/packages/ast-spec/src/type/TSNumberKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSNumberKeyword extends BaseNode { + type: AST_NODE_TYPES.TSNumberKeyword; +} diff --git a/packages/ast-spec/src/type/TSObjectKeyword/spec.ts b/packages/ast-spec/src/type/TSObjectKeyword/spec.ts new file mode 100644 index 000000000000..3472bc9191ff --- /dev/null +++ b/packages/ast-spec/src/type/TSObjectKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSObjectKeyword extends BaseNode { + type: AST_NODE_TYPES.TSObjectKeyword; +} diff --git a/packages/ast-spec/src/type/TSOptionalType/spec.ts b/packages/ast-spec/src/type/TSOptionalType/spec.ts new file mode 100644 index 000000000000..9cdb0f636d32 --- /dev/null +++ b/packages/ast-spec/src/type/TSOptionalType/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSOptionalType extends BaseNode { + type: AST_NODE_TYPES.TSOptionalType; + typeAnnotation: TypeNode; +} diff --git a/packages/ast-spec/src/type/TSParenthesizedType/spec.ts b/packages/ast-spec/src/type/TSParenthesizedType/spec.ts new file mode 100644 index 000000000000..2d20d5d2f2bc --- /dev/null +++ b/packages/ast-spec/src/type/TSParenthesizedType/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSParenthesizedType extends BaseNode { + type: AST_NODE_TYPES.TSParenthesizedType; + typeAnnotation: TypeNode; +} diff --git a/packages/ast-spec/src/type/TSQualifiedName/spec.ts b/packages/ast-spec/src/type/TSQualifiedName/spec.ts new file mode 100644 index 000000000000..cdd6feeee0ef --- /dev/null +++ b/packages/ast-spec/src/type/TSQualifiedName/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; +import type { EntityName } from '../../unions/EntityName'; + +export interface TSQualifiedName extends BaseNode { + type: AST_NODE_TYPES.TSQualifiedName; + left: EntityName; + right: Identifier; +} diff --git a/packages/ast-spec/src/type/TSRestType/spec.ts b/packages/ast-spec/src/type/TSRestType/spec.ts new file mode 100644 index 000000000000..f1b4f2ecfa85 --- /dev/null +++ b/packages/ast-spec/src/type/TSRestType/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSRestType extends BaseNode { + type: AST_NODE_TYPES.TSRestType; + typeAnnotation: TypeNode; +} diff --git a/packages/ast-spec/src/type/TSStringKeyword/spec.ts b/packages/ast-spec/src/type/TSStringKeyword/spec.ts new file mode 100644 index 000000000000..35721dd44137 --- /dev/null +++ b/packages/ast-spec/src/type/TSStringKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSStringKeyword extends BaseNode { + type: AST_NODE_TYPES.TSStringKeyword; +} diff --git a/packages/ast-spec/src/type/TSSymbolKeyword/spec.ts b/packages/ast-spec/src/type/TSSymbolKeyword/spec.ts new file mode 100644 index 000000000000..6b8b949dd0b8 --- /dev/null +++ b/packages/ast-spec/src/type/TSSymbolKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSSymbolKeyword extends BaseNode { + type: AST_NODE_TYPES.TSSymbolKeyword; +} diff --git a/packages/ast-spec/src/type/TSTemplateLiteralType/spec.ts b/packages/ast-spec/src/type/TSTemplateLiteralType/spec.ts new file mode 100644 index 000000000000..c2e8783da873 --- /dev/null +++ b/packages/ast-spec/src/type/TSTemplateLiteralType/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TemplateElement } from '../../special/TemplateElement/spec'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSTemplateLiteralType extends BaseNode { + type: AST_NODE_TYPES.TSTemplateLiteralType; + quasis: TemplateElement[]; + types: TypeNode[]; +} diff --git a/packages/ast-spec/src/type/TSThisType/spec.ts b/packages/ast-spec/src/type/TSThisType/spec.ts new file mode 100644 index 000000000000..319e82460f67 --- /dev/null +++ b/packages/ast-spec/src/type/TSThisType/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSThisType extends BaseNode { + type: AST_NODE_TYPES.TSThisType; +} diff --git a/packages/ast-spec/src/type/TSTupleType/spec.ts b/packages/ast-spec/src/type/TSTupleType/spec.ts new file mode 100644 index 000000000000..641a0c15b4c6 --- /dev/null +++ b/packages/ast-spec/src/type/TSTupleType/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSTupleType extends BaseNode { + type: AST_NODE_TYPES.TSTupleType; + elementTypes: TypeNode[]; +} diff --git a/packages/ast-spec/src/type/TSTypeLiteral/spec.ts b/packages/ast-spec/src/type/TSTypeLiteral/spec.ts new file mode 100644 index 000000000000..243179d23d9f --- /dev/null +++ b/packages/ast-spec/src/type/TSTypeLiteral/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeElement } from '../../unions/TypeElement'; + +export interface TSTypeLiteral extends BaseNode { + type: AST_NODE_TYPES.TSTypeLiteral; + members: TypeElement[]; +} diff --git a/packages/ast-spec/src/type/TSTypeOperator/spec.ts b/packages/ast-spec/src/type/TSTypeOperator/spec.ts new file mode 100644 index 000000000000..c83b8721eed9 --- /dev/null +++ b/packages/ast-spec/src/type/TSTypeOperator/spec.ts @@ -0,0 +1,9 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSTypeOperator extends BaseNode { + type: AST_NODE_TYPES.TSTypeOperator; + operator: 'keyof' | 'readonly' | 'unique'; + typeAnnotation?: TypeNode; +} diff --git a/packages/ast-spec/src/type/TSTypePredicate/spec.ts b/packages/ast-spec/src/type/TSTypePredicate/spec.ts new file mode 100644 index 000000000000..cd34a31bcaf0 --- /dev/null +++ b/packages/ast-spec/src/type/TSTypePredicate/spec.ts @@ -0,0 +1,12 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Identifier } from '../../expression/Identifier/spec'; +import type { TSTypeAnnotation } from '../../special/TSTypeAnnotation/spec'; +import type { TSThisType } from '../TSThisType/spec'; + +export interface TSTypePredicate extends BaseNode { + type: AST_NODE_TYPES.TSTypePredicate; + asserts: boolean; + parameterName: Identifier | TSThisType; + typeAnnotation: TSTypeAnnotation | null; +} diff --git a/packages/ast-spec/src/type/TSTypeQuery/spec.ts b/packages/ast-spec/src/type/TSTypeQuery/spec.ts new file mode 100644 index 000000000000..bf1cd3e192df --- /dev/null +++ b/packages/ast-spec/src/type/TSTypeQuery/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { EntityName } from '../../unions/EntityName'; + +export interface TSTypeQuery extends BaseNode { + type: AST_NODE_TYPES.TSTypeQuery; + exprName: EntityName; +} diff --git a/packages/ast-spec/src/type/TSTypeReference/spec.ts b/packages/ast-spec/src/type/TSTypeReference/spec.ts new file mode 100644 index 000000000000..9d88fe7f6b4f --- /dev/null +++ b/packages/ast-spec/src/type/TSTypeReference/spec.ts @@ -0,0 +1,10 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TSTypeParameterInstantiation } from '../../special/TSTypeParameterInstantiation/spec'; +import type { EntityName } from '../../unions/EntityName'; + +export interface TSTypeReference extends BaseNode { + type: AST_NODE_TYPES.TSTypeReference; + typeName: EntityName; + typeParameters?: TSTypeParameterInstantiation; +} diff --git a/packages/ast-spec/src/type/TSUndefinedKeyword/spec.ts b/packages/ast-spec/src/type/TSUndefinedKeyword/spec.ts new file mode 100644 index 000000000000..0aa062c84212 --- /dev/null +++ b/packages/ast-spec/src/type/TSUndefinedKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSUndefinedKeyword extends BaseNode { + type: AST_NODE_TYPES.TSUndefinedKeyword; +} diff --git a/packages/ast-spec/src/type/TSUnionType/spec.ts b/packages/ast-spec/src/type/TSUnionType/spec.ts new file mode 100644 index 000000000000..a286f796a23d --- /dev/null +++ b/packages/ast-spec/src/type/TSUnionType/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { TypeNode } from '../../unions/TypeNode'; + +export interface TSUnionType extends BaseNode { + type: AST_NODE_TYPES.TSUnionType; + types: TypeNode[]; +} diff --git a/packages/ast-spec/src/type/TSUnknownKeyword/spec.ts b/packages/ast-spec/src/type/TSUnknownKeyword/spec.ts new file mode 100644 index 000000000000..c8c1f9340c6e --- /dev/null +++ b/packages/ast-spec/src/type/TSUnknownKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSUnknownKeyword extends BaseNode { + type: AST_NODE_TYPES.TSUnknownKeyword; +} diff --git a/packages/ast-spec/src/type/TSVoidKeyword/spec.ts b/packages/ast-spec/src/type/TSVoidKeyword/spec.ts new file mode 100644 index 000000000000..abf0c14c5ab3 --- /dev/null +++ b/packages/ast-spec/src/type/TSVoidKeyword/spec.ts @@ -0,0 +1,6 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface TSVoidKeyword extends BaseNode { + type: AST_NODE_TYPES.TSVoidKeyword; +} diff --git a/packages/ast-spec/src/type/spec.ts b/packages/ast-spec/src/type/spec.ts new file mode 100644 index 000000000000..bbbea76cbd8e --- /dev/null +++ b/packages/ast-spec/src/type/spec.ts @@ -0,0 +1,36 @@ +export * from './TSAnyKeyword/spec'; +export * from './TSArrayType/spec'; +export * from './TSBigIntKeyword/spec'; +export * from './TSBooleanKeyword/spec'; +export * from './TSConditionalType/spec'; +export * from './TSConstructorType/spec'; +export * from './TSFunctionType/spec'; +export * from './TSImportType/spec'; +export * from './TSIndexedAccessType/spec'; +export * from './TSInferType/spec'; +export * from './TSIntersectionType/spec'; +export * from './TSLiteralType/spec'; +export * from './TSMappedType/spec'; +export * from './TSNamedTupleMember/spec'; +export * from './TSNeverKeyword/spec'; +export * from './TSNullKeyword/spec'; +export * from './TSNumberKeyword/spec'; +export * from './TSObjectKeyword/spec'; +export * from './TSOptionalType/spec'; +export * from './TSParenthesizedType/spec'; +export * from './TSQualifiedName/spec'; +export * from './TSRestType/spec'; +export * from './TSStringKeyword/spec'; +export * from './TSSymbolKeyword/spec'; +export * from './TSTemplateLiteralType/spec'; +export * from './TSThisType/spec'; +export * from './TSTupleType/spec'; +export * from './TSTypeLiteral/spec'; +export * from './TSTypeOperator/spec'; +export * from './TSTypePredicate/spec'; +export * from './TSTypeQuery/spec'; +export * from './TSTypeReference/spec'; +export * from './TSUndefinedKeyword/spec'; +export * from './TSUnionType/spec'; +export * from './TSUnknownKeyword/spec'; +export * from './TSVoidKeyword/spec'; diff --git a/packages/ast-spec/src/unions/BindingName.ts b/packages/ast-spec/src/unions/BindingName.ts new file mode 100644 index 000000000000..2da273d80476 --- /dev/null +++ b/packages/ast-spec/src/unions/BindingName.ts @@ -0,0 +1,4 @@ +import type { Identifier } from '../expression/Identifier/spec'; +import type { BindingPattern } from './BindingPattern'; + +export type BindingName = BindingPattern | Identifier; diff --git a/packages/ast-spec/src/unions/BindingPattern.ts b/packages/ast-spec/src/unions/BindingPattern.ts new file mode 100644 index 000000000000..ef39d0af1126 --- /dev/null +++ b/packages/ast-spec/src/unions/BindingPattern.ts @@ -0,0 +1,4 @@ +import type { ArrayPattern } from '../parameter/ArrayPattern/spec'; +import type { ObjectPattern } from '../parameter/ObjectPattern/spec'; + +export type BindingPattern = ArrayPattern | ObjectPattern; diff --git a/packages/ast-spec/src/unions/CallExpressionArgument.ts b/packages/ast-spec/src/unions/CallExpressionArgument.ts new file mode 100644 index 000000000000..42a419b4b25b --- /dev/null +++ b/packages/ast-spec/src/unions/CallExpressionArgument.ts @@ -0,0 +1,4 @@ +import type { SpreadElement } from '../element/SpreadElement/spec'; +import type { Expression } from './Expression'; + +export type CallExpressionArgument = Expression | SpreadElement; diff --git a/packages/ast-spec/src/unions/ChainElement.ts b/packages/ast-spec/src/unions/ChainElement.ts new file mode 100644 index 000000000000..fccde99ed8c6 --- /dev/null +++ b/packages/ast-spec/src/unions/ChainElement.ts @@ -0,0 +1,8 @@ +import type { CallExpression } from '../expression/CallExpression/spec'; +import type { MemberExpression } from '../expression/MemberExpression/spec'; +import type { TSNonNullExpression } from '../expression/TSNonNullExpression/spec'; + +export type ChainElement = + | CallExpression + | MemberExpression + | TSNonNullExpression; diff --git a/packages/ast-spec/src/unions/ClassElement.ts b/packages/ast-spec/src/unions/ClassElement.ts new file mode 100644 index 000000000000..a4d986d09c73 --- /dev/null +++ b/packages/ast-spec/src/unions/ClassElement.ts @@ -0,0 +1,12 @@ +import type { ClassProperty } from '../element/ClassProperty/spec'; +import type { MethodDefinition } from '../element/MethodDefinition/spec'; +import type { TSAbstractClassProperty } from '../element/TSAbstractClassProperty/spec'; +import type { TSAbstractMethodDefinition } from '../element/TSAbstractMethodDefinition/spec'; +import type { TSIndexSignature } from '../element/TSIndexSignature/spec'; + +export type ClassElement = + | ClassProperty + | MethodDefinition + | TSAbstractClassProperty + | TSAbstractMethodDefinition + | TSIndexSignature; diff --git a/packages/ast-spec/src/unions/Comment.ts b/packages/ast-spec/src/unions/Comment.ts new file mode 100644 index 000000000000..d5cdca042476 --- /dev/null +++ b/packages/ast-spec/src/unions/Comment.ts @@ -0,0 +1,4 @@ +import type { BlockComment } from '../token/BlockComment/spec'; +import type { LineComment } from '../token/LineComment/spec'; + +export type Comment = BlockComment | LineComment; diff --git a/packages/ast-spec/src/unions/DeclarationStatement.ts b/packages/ast-spec/src/unions/DeclarationStatement.ts new file mode 100644 index 000000000000..be0637254ae7 --- /dev/null +++ b/packages/ast-spec/src/unions/DeclarationStatement.ts @@ -0,0 +1,29 @@ +import type { ClassDeclaration } from '../declaration/ClassDeclaration/spec'; +import type { ExportAllDeclaration } from '../declaration/ExportAllDeclaration/spec'; +import type { ExportDefaultDeclaration } from '../declaration/ExportDefaultDeclaration/spec'; +import type { ExportNamedDeclaration } from '../declaration/ExportNamedDeclaration/spec'; +import type { FunctionDeclaration } from '../declaration/FunctionDeclaration/spec'; +import type { TSDeclareFunction } from '../declaration/TSDeclareFunction/spec'; +import type { TSEnumDeclaration } from '../declaration/TSEnumDeclaration/spec'; +import type { TSImportEqualsDeclaration } from '../declaration/TSImportEqualsDeclaration/spec'; +import type { TSInterfaceDeclaration } from '../declaration/TSInterfaceDeclaration/spec'; +import type { TSModuleDeclaration } from '../declaration/TSModuleDeclaration/spec'; +import type { TSNamespaceExportDeclaration } from '../declaration/TSNamespaceExportDeclaration/spec'; +import type { TSTypeAliasDeclaration } from '../declaration/TSTypeAliasDeclaration/spec'; +import type { ClassExpression } from '../expression/ClassExpression/spec'; + +// TODO - breaking change remove this +export type DeclarationStatement = + | ClassDeclaration + | ClassExpression + | ExportAllDeclaration + | ExportDefaultDeclaration + | ExportNamedDeclaration + | FunctionDeclaration + | TSDeclareFunction + | TSEnumDeclaration + | TSImportEqualsDeclaration + | TSInterfaceDeclaration + | TSModuleDeclaration + | TSNamespaceExportDeclaration + | TSTypeAliasDeclaration; diff --git a/packages/ast-spec/src/unions/DestructuringPattern.ts b/packages/ast-spec/src/unions/DestructuringPattern.ts new file mode 100644 index 000000000000..40d07009651c --- /dev/null +++ b/packages/ast-spec/src/unions/DestructuringPattern.ts @@ -0,0 +1,14 @@ +import type { Identifier } from '../expression/Identifier/spec'; +import type { MemberExpression } from '../expression/MemberExpression/spec'; +import type { ArrayPattern } from '../parameter/ArrayPattern/spec'; +import type { AssignmentPattern } from '../parameter/AssignmentPattern/spec'; +import type { ObjectPattern } from '../parameter/ObjectPattern/spec'; +import type { RestElement } from '../parameter/RestElement/spec'; + +export type DestructuringPattern = + | ArrayPattern + | AssignmentPattern + | Identifier + | MemberExpression + | ObjectPattern + | RestElement; diff --git a/packages/ast-spec/src/unions/EntityName.ts b/packages/ast-spec/src/unions/EntityName.ts new file mode 100644 index 000000000000..82f7b1c9b0ca --- /dev/null +++ b/packages/ast-spec/src/unions/EntityName.ts @@ -0,0 +1,4 @@ +import type { Identifier } from '../expression/Identifier/spec'; +import type { TSQualifiedName } from '../type/TSQualifiedName/spec'; + +export type EntityName = Identifier | TSQualifiedName; diff --git a/packages/ast-spec/src/unions/ExportDeclaration.ts b/packages/ast-spec/src/unions/ExportDeclaration.ts new file mode 100644 index 000000000000..1ae9d9ddb9f8 --- /dev/null +++ b/packages/ast-spec/src/unions/ExportDeclaration.ts @@ -0,0 +1,20 @@ +import type { ClassDeclaration } from '../declaration/ClassDeclaration/spec'; +import type { FunctionDeclaration } from '../declaration/FunctionDeclaration/spec'; +import type { TSDeclareFunction } from '../declaration/TSDeclareFunction/spec'; +import type { TSEnumDeclaration } from '../declaration/TSEnumDeclaration/spec'; +import type { TSInterfaceDeclaration } from '../declaration/TSInterfaceDeclaration/spec'; +import type { TSModuleDeclaration } from '../declaration/TSModuleDeclaration/spec'; +import type { TSTypeAliasDeclaration } from '../declaration/TSTypeAliasDeclaration/spec'; +import type { VariableDeclaration } from '../declaration/VariableDeclaration/spec'; +import type { ClassExpression } from '../expression/ClassExpression/spec'; + +export type ExportDeclaration = + | ClassDeclaration + | ClassExpression + | FunctionDeclaration + | TSDeclareFunction + | TSEnumDeclaration + | TSInterfaceDeclaration + | TSModuleDeclaration + | TSTypeAliasDeclaration + | VariableDeclaration; diff --git a/packages/ast-spec/src/unions/Expression.ts b/packages/ast-spec/src/unions/Expression.ts new file mode 100644 index 000000000000..fd1a14b114e2 --- /dev/null +++ b/packages/ast-spec/src/unions/Expression.ts @@ -0,0 +1,78 @@ +import type { ArrayExpression } from '../expression/ArrayExpression/spec'; +import type { ArrowFunctionExpression } from '../expression/ArrowFunctionExpression/spec'; +import type { AssignmentExpression } from '../expression/AssignmentExpression/spec'; +import type { AwaitExpression } from '../expression/AwaitExpression/spec'; +import type { BinaryExpression } from '../expression/BinaryExpression/spec'; +import type { CallExpression } from '../expression/CallExpression/spec'; +import type { ChainExpression } from '../expression/ChainExpression/spec'; +import type { ClassExpression } from '../expression/ClassExpression/spec'; +import type { ConditionalExpression } from '../expression/ConditionalExpression/spec'; +import type { FunctionExpression } from '../expression/FunctionExpression/spec'; +import type { Identifier } from '../expression/Identifier/spec'; +import type { ImportExpression } from '../expression/ImportExpression/spec'; +import type { JSXElement } from '../expression/JSXElement/spec'; +import type { JSXFragment } from '../expression/JSXFragment/spec'; +import type { LogicalExpression } from '../expression/LogicalExpression/spec'; +import type { MemberExpression } from '../expression/MemberExpression/spec'; +import type { MetaProperty } from '../expression/MetaProperty/spec'; +import type { NewExpression } from '../expression/NewExpression/spec'; +import type { ObjectExpression } from '../expression/ObjectExpression/spec'; +import type { SequenceExpression } from '../expression/SequenceExpression/spec'; +import type { Super } from '../expression/Super/spec'; +import type { TaggedTemplateExpression } from '../expression/TaggedTemplateExpression/spec'; +import type { TemplateLiteral } from '../expression/TemplateLiteral/spec'; +import type { ThisExpression } from '../expression/ThisExpression/spec'; +import type { TSAsExpression } from '../expression/TSAsExpression/spec'; +import type { TSNonNullExpression } from '../expression/TSNonNullExpression/spec'; +import type { TSTypeAssertion } from '../expression/TSTypeAssertion/spec'; +import type { UnaryExpression } from '../expression/UnaryExpression/spec'; +import type { UpdateExpression } from '../expression/UpdateExpression/spec'; +import type { YieldExpression } from '../expression/YieldExpression/spec'; +import type { ArrayPattern } from '../parameter/ArrayPattern/spec'; +import type { ObjectPattern } from '../parameter/ObjectPattern/spec'; +import type { LiteralExpression } from './LiteralExpression'; + +/* +This isn't technically correct, as it includes ArrayPattern and ObjectPattern - which are only valid +in a LeftHandSideExpression, and not in a general expression location. + +However most of the time that this type is used, the intention will be to assign a LeftHandSideExpression to this type. +So excluding the Pattern types just makes it a pain, as people have to write Expression | LeftHandSideExpression everywhere. +*/ + +export type Expression = + | ArrayExpression + | ArrayPattern + | ArrowFunctionExpression + | AssignmentExpression + | AwaitExpression + | BinaryExpression + | CallExpression + | ChainExpression + | ClassExpression + | ClassExpression + | ConditionalExpression + | FunctionExpression + | FunctionExpression + | Identifier + | ImportExpression + | JSXElement + | JSXFragment + | LiteralExpression + | LogicalExpression + | MemberExpression + | MetaProperty + | NewExpression + | ObjectExpression + | ObjectPattern + | SequenceExpression + | Super + | TaggedTemplateExpression + | TemplateLiteral + | ThisExpression + | TSAsExpression + | TSNonNullExpression + | TSTypeAssertion + | UnaryExpression + | UpdateExpression + | YieldExpression; diff --git a/packages/ast-spec/src/unions/ForInitialiser.ts b/packages/ast-spec/src/unions/ForInitialiser.ts new file mode 100644 index 000000000000..05138cb52fbc --- /dev/null +++ b/packages/ast-spec/src/unions/ForInitialiser.ts @@ -0,0 +1,4 @@ +import type { VariableDeclaration } from '../declaration/VariableDeclaration/spec'; +import type { Expression } from './Expression'; + +export type ForInitialiser = Expression | VariableDeclaration; diff --git a/packages/ast-spec/src/unions/FunctionLike.ts b/packages/ast-spec/src/unions/FunctionLike.ts new file mode 100644 index 000000000000..6ab06d834960 --- /dev/null +++ b/packages/ast-spec/src/unions/FunctionLike.ts @@ -0,0 +1,12 @@ +import type { FunctionDeclaration } from '../declaration/FunctionDeclaration/spec'; +import type { TSDeclareFunction } from '../declaration/TSDeclareFunction/spec'; +import type { ArrowFunctionExpression } from '../expression/ArrowFunctionExpression/spec'; +import type { FunctionExpression } from '../expression/FunctionExpression/spec'; +import type { TSEmptyBodyFunctionExpression } from '../expression/TSEmptyBodyFunctionExpression/spec'; + +export type FunctionLike = + | ArrowFunctionExpression + | FunctionDeclaration + | FunctionExpression + | TSDeclareFunction + | TSEmptyBodyFunctionExpression; diff --git a/packages/ast-spec/src/unions/ImportClause.ts b/packages/ast-spec/src/unions/ImportClause.ts new file mode 100644 index 000000000000..80b40826ff6d --- /dev/null +++ b/packages/ast-spec/src/unions/ImportClause.ts @@ -0,0 +1,8 @@ +import type { ImportDefaultSpecifier } from '../special/ImportDefaultSpecifier/spec'; +import type { ImportNamespaceSpecifier } from '../special/ImportNamespaceSpecifier/spec'; +import type { ImportSpecifier } from '../special/ImportSpecifier/spec'; + +export type ImportClause = + | ImportDefaultSpecifier + | ImportNamespaceSpecifier + | ImportSpecifier; diff --git a/packages/ast-spec/src/unions/IterationStatement.ts b/packages/ast-spec/src/unions/IterationStatement.ts new file mode 100644 index 000000000000..6a611431ca05 --- /dev/null +++ b/packages/ast-spec/src/unions/IterationStatement.ts @@ -0,0 +1,12 @@ +import type { DoWhileStatement } from '../statement/DoWhileStatement/spec'; +import type { ForInStatement } from '../statement/ForInStatement/spec'; +import type { ForOfStatement } from '../statement/ForOfStatement/spec'; +import type { ForStatement } from '../statement/ForStatement/spec'; +import type { WhileStatement } from '../statement/WhileStatement/spec'; + +export type IterationStatement = + | DoWhileStatement + | ForInStatement + | ForOfStatement + | ForStatement + | WhileStatement; diff --git a/packages/ast-spec/src/unions/JSXChild.ts b/packages/ast-spec/src/unions/JSXChild.ts new file mode 100644 index 000000000000..2b38836c82ef --- /dev/null +++ b/packages/ast-spec/src/unions/JSXChild.ts @@ -0,0 +1,6 @@ +import type { JSXElement } from '../expression/JSXElement/spec'; +import type { JSXFragment } from '../expression/JSXFragment/spec'; +import type { JSXText } from '../jsx/JSXText/spec'; +import type { JSXExpression } from './JSXExpression'; + +export type JSXChild = JSXElement | JSXExpression | JSXFragment | JSXText; diff --git a/packages/ast-spec/src/unions/JSXExpression.ts b/packages/ast-spec/src/unions/JSXExpression.ts new file mode 100644 index 000000000000..78dfad53525b --- /dev/null +++ b/packages/ast-spec/src/unions/JSXExpression.ts @@ -0,0 +1,8 @@ +import type { JSXEmptyExpression } from '../jsx/JSXEmptyExpression/spec'; +import type { JSXExpressionContainer } from '../jsx/JSXExpressionContainer/spec'; +import type { JSXSpreadChild } from '../jsx/JSXSpreadChild/spec'; + +export type JSXExpression = + | JSXEmptyExpression + | JSXExpressionContainer + | JSXSpreadChild; diff --git a/packages/ast-spec/src/unions/JSXTagNameExpression.ts b/packages/ast-spec/src/unions/JSXTagNameExpression.ts new file mode 100644 index 000000000000..05a831f68b45 --- /dev/null +++ b/packages/ast-spec/src/unions/JSXTagNameExpression.ts @@ -0,0 +1,8 @@ +import type { JSXIdentifier } from '../jsx/JSXIdentifier/spec'; +import type { JSXMemberExpression } from '../jsx/JSXMemberExpression/spec'; +import type { JSXNamespacedName } from '../jsx/JSXNamespacedName/spec'; + +export type JSXTagNameExpression = + | JSXIdentifier + | JSXMemberExpression + | JSXNamespacedName; diff --git a/packages/ast-spec/src/unions/LeftHandSideExpression.ts b/packages/ast-spec/src/unions/LeftHandSideExpression.ts new file mode 100644 index 000000000000..a8a24bb08d2d --- /dev/null +++ b/packages/ast-spec/src/unions/LeftHandSideExpression.ts @@ -0,0 +1,44 @@ +import type { ArrayExpression } from '../expression/ArrayExpression/spec'; +import type { ArrowFunctionExpression } from '../expression/ArrowFunctionExpression/spec'; +import type { CallExpression } from '../expression/CallExpression/spec'; +import type { ClassExpression } from '../expression/ClassExpression/spec'; +import type { FunctionExpression } from '../expression/FunctionExpression/spec'; +import type { Identifier } from '../expression/Identifier/spec'; +import type { JSXElement } from '../expression/JSXElement/spec'; +import type { JSXFragment } from '../expression/JSXFragment/spec'; +import type { MemberExpression } from '../expression/MemberExpression/spec'; +import type { MetaProperty } from '../expression/MetaProperty/spec'; +import type { ObjectExpression } from '../expression/ObjectExpression/spec'; +import type { Super } from '../expression/Super/spec'; +import type { TaggedTemplateExpression } from '../expression/TaggedTemplateExpression/spec'; +import type { TemplateLiteral } from '../expression/TemplateLiteral/spec'; +import type { ThisExpression } from '../expression/ThisExpression/spec'; +import type { TSAsExpression } from '../expression/TSAsExpression/spec'; +import type { TSNonNullExpression } from '../expression/TSNonNullExpression/spec'; +import type { TSTypeAssertion } from '../expression/TSTypeAssertion/spec'; +import type { ArrayPattern } from '../parameter/ArrayPattern/spec'; +import type { ObjectPattern } from '../parameter/ObjectPattern/spec'; +import type { LiteralExpression } from './LiteralExpression'; + +export type LeftHandSideExpression = + | ArrayExpression + | ArrayPattern + | ArrowFunctionExpression + | CallExpression + | ClassExpression + | FunctionExpression + | Identifier + | JSXElement + | JSXFragment + | LiteralExpression + | MemberExpression + | MetaProperty + | ObjectExpression + | ObjectPattern + | Super + | TaggedTemplateExpression + | TemplateLiteral + | ThisExpression + | TSAsExpression + | TSNonNullExpression + | TSTypeAssertion; diff --git a/packages/ast-spec/src/unions/Literal.ts b/packages/ast-spec/src/unions/Literal.ts new file mode 100644 index 000000000000..4da361d88423 --- /dev/null +++ b/packages/ast-spec/src/unions/Literal.ts @@ -0,0 +1,14 @@ +import type { BigIntLiteral } from '../expression/literal/BigIntLiteral/spec'; +import type { BooleanLiteral } from '../expression/literal/BooleanLiteral/spec'; +import type { NullLiteral } from '../expression/literal/NullLiteral/spec'; +import type { NumberLiteral } from '../expression/literal/NumberLiteral/spec'; +import type { RegExpLiteral } from '../expression/literal/RegExpLiteral/spec'; +import type { StringLiteral } from '../expression/literal/StringLiteral/spec'; + +export type Literal = + | BigIntLiteral + | BooleanLiteral + | NullLiteral + | NumberLiteral + | RegExpLiteral + | StringLiteral; diff --git a/packages/ast-spec/src/unions/LiteralExpression.ts b/packages/ast-spec/src/unions/LiteralExpression.ts new file mode 100644 index 000000000000..e29ddeec7ee5 --- /dev/null +++ b/packages/ast-spec/src/unions/LiteralExpression.ts @@ -0,0 +1,4 @@ +import type { TemplateLiteral } from '../expression/TemplateLiteral/spec'; +import type { Literal } from './Literal'; + +export type LiteralExpression = Literal | TemplateLiteral; diff --git a/packages/ast-spec/src/unions/Modifier.ts b/packages/ast-spec/src/unions/Modifier.ts new file mode 100644 index 000000000000..0922a52eca2e --- /dev/null +++ b/packages/ast-spec/src/unions/Modifier.ts @@ -0,0 +1,16 @@ +import type { TSAbstractKeyword } from '../token/TSAbstractKeyword/spec'; +import type { TSAsyncKeyword } from '../token/TSAsyncKeyword/spec'; +import type { TSPrivateKeyword } from '../token/TSPrivateKeyword/spec'; +import type { TSProtectedKeyword } from '../token/TSProtectedKeyword/spec'; +import type { TSPublicKeyword } from '../token/TSPublicKeyword/spec'; +import type { TSReadonlyKeyword } from '../token/TSReadonlyKeyword/spec'; +import type { TSStaticKeyword } from '../token/TSStaticKeyword/spec'; + +export type Modifier = + | TSAbstractKeyword + | TSAsyncKeyword + | TSPrivateKeyword + | TSProtectedKeyword + | TSPublicKeyword + | TSReadonlyKeyword + | TSStaticKeyword; diff --git a/packages/ast-spec/src/unions/Node.ts b/packages/ast-spec/src/unions/Node.ts new file mode 100644 index 000000000000..fe3435596a98 --- /dev/null +++ b/packages/ast-spec/src/unions/Node.ts @@ -0,0 +1,329 @@ +import type { ClassDeclaration } from '../declaration/ClassDeclaration/spec'; +import type { ExportAllDeclaration } from '../declaration/ExportAllDeclaration/spec'; +import type { ExportDefaultDeclaration } from '../declaration/ExportDefaultDeclaration/spec'; +import type { ExportNamedDeclaration } from '../declaration/ExportNamedDeclaration/spec'; +import type { FunctionDeclaration } from '../declaration/FunctionDeclaration/spec'; +import type { TSDeclareFunction } from '../declaration/TSDeclareFunction/spec'; +import type { TSEnumDeclaration } from '../declaration/TSEnumDeclaration/spec'; +import type { TSImportEqualsDeclaration } from '../declaration/TSImportEqualsDeclaration/spec'; +import type { TSInterfaceDeclaration } from '../declaration/TSInterfaceDeclaration/spec'; +import type { TSModuleDeclaration } from '../declaration/TSModuleDeclaration/spec'; +import type { TSNamespaceExportDeclaration } from '../declaration/TSNamespaceExportDeclaration/spec'; +import type { TSTypeAliasDeclaration } from '../declaration/TSTypeAliasDeclaration/spec'; +import type { VariableDeclaration } from '../declaration/VariableDeclaration/spec'; +import type { ClassProperty } from '../element/ClassProperty/spec'; +import type { MethodDefinition } from '../element/MethodDefinition/spec'; +import type { Property } from '../element/Property/spec'; +import type { SpreadElement } from '../element/SpreadElement/spec'; +import type { TSAbstractClassProperty } from '../element/TSAbstractClassProperty/spec'; +import type { TSAbstractMethodDefinition } from '../element/TSAbstractMethodDefinition/spec'; +import type { TSCallSignatureDeclaration } from '../element/TSCallSignatureDeclaration/spec'; +import type { TSConstructSignatureDeclaration } from '../element/TSConstructSignatureDeclaration/spec'; +import type { TSEnumMember } from '../element/TSEnumMember/spec'; +import type { TSIndexSignature } from '../element/TSIndexSignature/spec'; +import type { TSMethodSignature } from '../element/TSMethodSignature/spec'; +import type { TSPropertySignature } from '../element/TSPropertySignature/spec'; +import type { ArrayExpression } from '../expression/ArrayExpression/spec'; +import type { ArrowFunctionExpression } from '../expression/ArrowFunctionExpression/spec'; +import type { AssignmentExpression } from '../expression/AssignmentExpression/spec'; +import type { AwaitExpression } from '../expression/AwaitExpression/spec'; +import type { BinaryExpression } from '../expression/BinaryExpression/spec'; +import type { CallExpression } from '../expression/CallExpression/spec'; +import type { ChainExpression } from '../expression/ChainExpression/spec'; +import type { ClassExpression } from '../expression/ClassExpression/spec'; +import type { ConditionalExpression } from '../expression/ConditionalExpression/spec'; +import type { FunctionExpression } from '../expression/FunctionExpression/spec'; +import type { Identifier } from '../expression/Identifier/spec'; +import type { ImportExpression } from '../expression/ImportExpression/spec'; +import type { JSXElement } from '../expression/JSXElement/spec'; +import type { JSXFragment } from '../expression/JSXFragment/spec'; +import type { LogicalExpression } from '../expression/LogicalExpression/spec'; +import type { MemberExpression } from '../expression/MemberExpression/spec'; +import type { MetaProperty } from '../expression/MetaProperty/spec'; +import type { NewExpression } from '../expression/NewExpression/spec'; +import type { ObjectExpression } from '../expression/ObjectExpression/spec'; +import type { SequenceExpression } from '../expression/SequenceExpression/spec'; +import type { Super } from '../expression/Super/spec'; +import type { TaggedTemplateExpression } from '../expression/TaggedTemplateExpression/spec'; +import type { TemplateLiteral } from '../expression/TemplateLiteral/spec'; +import type { ThisExpression } from '../expression/ThisExpression/spec'; +import type { TSAsExpression } from '../expression/TSAsExpression/spec'; +import type { TSEmptyBodyFunctionExpression } from '../expression/TSEmptyBodyFunctionExpression/spec'; +import type { TSNonNullExpression } from '../expression/TSNonNullExpression/spec'; +import type { TSTypeAssertion } from '../expression/TSTypeAssertion/spec'; +import type { UnaryExpression } from '../expression/UnaryExpression/spec'; +import type { UpdateExpression } from '../expression/UpdateExpression/spec'; +import type { YieldExpression } from '../expression/YieldExpression/spec'; +import type { JSXAttribute } from '../jsx/JSXAttribute/spec'; +import type { JSXClosingElement } from '../jsx/JSXClosingElement/spec'; +import type { JSXClosingFragment } from '../jsx/JSXClosingFragment/spec'; +import type { JSXEmptyExpression } from '../jsx/JSXEmptyExpression/spec'; +import type { JSXExpressionContainer } from '../jsx/JSXExpressionContainer/spec'; +import type { JSXIdentifier } from '../jsx/JSXIdentifier/spec'; +import type { JSXMemberExpression } from '../jsx/JSXMemberExpression/spec'; +import type { JSXNamespacedName } from '../jsx/JSXNamespacedName/spec'; +import type { JSXOpeningElement } from '../jsx/JSXOpeningElement/spec'; +import type { JSXOpeningFragment } from '../jsx/JSXOpeningFragment/spec'; +import type { JSXSpreadAttribute } from '../jsx/JSXSpreadAttribute/spec'; +import type { JSXSpreadChild } from '../jsx/JSXSpreadChild/spec'; +import type { JSXText } from '../jsx/JSXText/spec'; +import type { ArrayPattern } from '../parameter/ArrayPattern/spec'; +import type { AssignmentPattern } from '../parameter/AssignmentPattern/spec'; +import type { ObjectPattern } from '../parameter/ObjectPattern/spec'; +import type { RestElement } from '../parameter/RestElement/spec'; +import type { TSParameterProperty } from '../parameter/TSParameterProperty/spec'; +import type { CatchClause } from '../special/CatchClause/spec'; +import type { ClassBody } from '../special/ClassBody/spec'; +import type { Decorator } from '../special/Decorator/spec'; +import type { EmptyStatement } from '../special/EmptyStatement/spec'; +import type { ExportSpecifier } from '../special/ExportSpecifier/spec'; +import type { ImportDefaultSpecifier } from '../special/ImportDefaultSpecifier/spec'; +import type { ImportNamespaceSpecifier } from '../special/ImportNamespaceSpecifier/spec'; +import type { ImportSpecifier } from '../special/ImportSpecifier/spec'; +import type { Program } from '../special/Program/spec'; +import type { SwitchCase } from '../special/SwitchCase/spec'; +import type { TemplateElement } from '../special/TemplateElement/spec'; +import type { TSClassImplements } from '../special/TSClassImplements/spec'; +import type { TSExternalModuleReference } from '../special/TSExternalModuleReference/spec'; +import type { TSInterfaceBody } from '../special/TSInterfaceBody/spec'; +import type { TSInterfaceHeritage } from '../special/TSInterfaceHeritage/spec'; +import type { TSModuleBlock } from '../special/TSModuleBlock/spec'; +import type { TSTypeAnnotation } from '../special/TSTypeAnnotation/spec'; +import type { TSTypeParameter } from '../special/TSTypeParameter/spec'; +import type { TSTypeParameterDeclaration } from '../special/TSTypeParameterDeclaration/spec'; +import type { TSTypeParameterInstantiation } from '../special/TSTypeParameterInstantiation/spec'; +import type { VariableDeclarator } from '../special/VariableDeclarator/spec'; +import type { BlockStatement } from '../statement/BlockStatement/spec'; +import type { BreakStatement } from '../statement/BreakStatement/spec'; +import type { ContinueStatement } from '../statement/ContinueStatement/spec'; +import type { DebuggerStatement } from '../statement/DebuggerStatement/spec'; +import type { DoWhileStatement } from '../statement/DoWhileStatement/spec'; +import type { ExpressionStatement } from '../statement/ExpressionStatement/spec'; +import type { ForInStatement } from '../statement/ForInStatement/spec'; +import type { ForOfStatement } from '../statement/ForOfStatement/spec'; +import type { ForStatement } from '../statement/ForStatement/spec'; +import type { IfStatement } from '../statement/IfStatement/spec'; +import type { ImportDeclaration } from '../statement/ImportDeclaration/spec'; +import type { LabeledStatement } from '../statement/LabeledStatement/spec'; +import type { ReturnStatement } from '../statement/ReturnStatement/spec'; +import type { SwitchStatement } from '../statement/SwitchStatement/spec'; +import type { ThrowStatement } from '../statement/ThrowStatement/spec'; +import type { TryStatement } from '../statement/TryStatement/spec'; +import type { TSExportAssignment } from '../statement/TSExportAssignment/spec'; +import type { WhileStatement } from '../statement/WhileStatement/spec'; +import type { WithStatement } from '../statement/WithStatement/spec'; +import type { TSAbstractKeyword } from '../token/TSAbstractKeyword/spec'; +import type { TSAsyncKeyword } from '../token/TSAsyncKeyword/spec'; +import type { TSDeclareKeyword } from '../token/TSDeclareKeyword/spec'; +import type { TSExportKeyword } from '../token/TSExportKeyword/spec'; +import type { TSPrivateKeyword } from '../token/TSPrivateKeyword/spec'; +import type { TSProtectedKeyword } from '../token/TSProtectedKeyword/spec'; +import type { TSPublicKeyword } from '../token/TSPublicKeyword/spec'; +import type { TSReadonlyKeyword } from '../token/TSReadonlyKeyword/spec'; +import type { TSStaticKeyword } from '../token/TSStaticKeyword/spec'; +import type { TSAnyKeyword } from '../type/TSAnyKeyword/spec'; +import type { TSArrayType } from '../type/TSArrayType/spec'; +import type { TSBigIntKeyword } from '../type/TSBigIntKeyword/spec'; +import type { TSBooleanKeyword } from '../type/TSBooleanKeyword/spec'; +import type { TSConditionalType } from '../type/TSConditionalType/spec'; +import type { TSConstructorType } from '../type/TSConstructorType/spec'; +import type { TSFunctionType } from '../type/TSFunctionType/spec'; +import type { TSImportType } from '../type/TSImportType/spec'; +import type { TSIndexedAccessType } from '../type/TSIndexedAccessType/spec'; +import type { TSInferType } from '../type/TSInferType/spec'; +import type { TSIntersectionType } from '../type/TSIntersectionType/spec'; +import type { TSIntrinsicKeyword } from '../type/TSIntrinsicType/spec'; +import type { TSLiteralType } from '../type/TSLiteralType/spec'; +import type { TSMappedType } from '../type/TSMappedType/spec'; +import type { TSNamedTupleMember } from '../type/TSNamedTupleMember/spec'; +import type { TSNeverKeyword } from '../type/TSNeverKeyword/spec'; +import type { TSNullKeyword } from '../type/TSNullKeyword/spec'; +import type { TSNumberKeyword } from '../type/TSNumberKeyword/spec'; +import type { TSObjectKeyword } from '../type/TSObjectKeyword/spec'; +import type { TSOptionalType } from '../type/TSOptionalType/spec'; +import type { TSParenthesizedType } from '../type/TSParenthesizedType/spec'; +import type { TSQualifiedName } from '../type/TSQualifiedName/spec'; +import type { TSRestType } from '../type/TSRestType/spec'; +import type { TSStringKeyword } from '../type/TSStringKeyword/spec'; +import type { TSSymbolKeyword } from '../type/TSSymbolKeyword/spec'; +import type { TSTemplateLiteralType } from '../type/TSTemplateLiteralType/spec'; +import type { TSThisType } from '../type/TSThisType/spec'; +import type { TSTupleType } from '../type/TSTupleType/spec'; +import type { TSTypeLiteral } from '../type/TSTypeLiteral/spec'; +import type { TSTypeOperator } from '../type/TSTypeOperator/spec'; +import type { TSTypePredicate } from '../type/TSTypePredicate/spec'; +import type { TSTypeQuery } from '../type/TSTypeQuery/spec'; +import type { TSTypeReference } from '../type/TSTypeReference/spec'; +import type { TSUndefinedKeyword } from '../type/TSUndefinedKeyword/spec'; +import type { TSUnionType } from '../type/TSUnionType/spec'; +import type { TSUnknownKeyword } from '../type/TSUnknownKeyword/spec'; +import type { TSVoidKeyword } from '../type/TSVoidKeyword/spec'; +import type { Literal } from './Literal'; + +/* + * NOTE: + * Tokens are not included in the `Node` union below on purpose because they are not ever included as part of the standard AST tree. + */ + +export type Node = + | ArrayExpression + | ArrayPattern + | ArrowFunctionExpression + | AssignmentExpression + | AssignmentPattern + | AwaitExpression + | BinaryExpression + | BlockStatement + | BreakStatement + | CallExpression + | CatchClause + | ChainExpression + | ClassBody + | ClassDeclaration + | ClassExpression + | ClassProperty + | ConditionalExpression + | ContinueStatement + | DebuggerStatement + | Decorator + | DoWhileStatement + | EmptyStatement + | ExportAllDeclaration + | ExportDefaultDeclaration + | ExportNamedDeclaration + | ExportSpecifier + | ExpressionStatement + | ForInStatement + | ForOfStatement + | ForStatement + | FunctionDeclaration + | FunctionExpression + | Identifier + | IfStatement + | ImportDeclaration + | ImportDefaultSpecifier + | ImportExpression + | ImportNamespaceSpecifier + | ImportSpecifier + | JSXAttribute + | JSXClosingElement + | JSXClosingFragment + | JSXElement + | JSXEmptyExpression + | JSXExpressionContainer + | JSXFragment + | JSXIdentifier + | JSXMemberExpression + | JSXNamespacedName + | JSXOpeningElement + | JSXOpeningFragment + | JSXSpreadAttribute + | JSXSpreadChild + | JSXText + | LabeledStatement + | Literal + | LogicalExpression + | MemberExpression + | MetaProperty + | MethodDefinition + | NewExpression + | ObjectExpression + | ObjectPattern + | Program + | Property + | RestElement + | ReturnStatement + | SequenceExpression + | SpreadElement + | Super + | SwitchCase + | SwitchStatement + | TaggedTemplateExpression + | TemplateElement + | TemplateLiteral + | ThisExpression + | ThrowStatement + | TryStatement + | TSAbstractClassProperty + | TSAbstractKeyword + | TSAbstractMethodDefinition + | TSAnyKeyword + | TSArrayType + | TSAsExpression + | TSAsyncKeyword + | TSBigIntKeyword + | TSBooleanKeyword + | TSCallSignatureDeclaration + | TSClassImplements + | TSConditionalType + | TSConstructorType + | TSConstructSignatureDeclaration + | TSDeclareFunction + | TSDeclareKeyword + | TSEmptyBodyFunctionExpression + | TSEnumDeclaration + | TSEnumMember + | TSExportAssignment + | TSExportKeyword + | TSExternalModuleReference + | TSFunctionType + | TSImportEqualsDeclaration + | TSImportType + | TSIndexedAccessType + | TSIndexSignature + | TSInferType + | TSInterfaceBody + | TSInterfaceDeclaration + | TSInterfaceHeritage + | TSIntersectionType + | TSIntrinsicKeyword + | TSLiteralType + | TSMappedType + | TSMethodSignature + | TSModuleBlock + | TSModuleDeclaration + | TSNamedTupleMember + | TSNamespaceExportDeclaration + | TSNeverKeyword + | TSNonNullExpression + | TSNullKeyword + | TSNumberKeyword + | TSObjectKeyword + | TSOptionalType + | TSParameterProperty + | TSParenthesizedType + | TSPrivateKeyword + | TSPropertySignature + | TSProtectedKeyword + | TSPublicKeyword + | TSQualifiedName + | TSReadonlyKeyword + | TSRestType + | TSStaticKeyword + | TSStringKeyword + | TSSymbolKeyword + | TSTemplateLiteralType + | TSThisType + | TSTupleType + | TSTypeAliasDeclaration + | TSTypeAnnotation + | TSTypeAssertion + | TSTypeLiteral + | TSTypeOperator + | TSTypeParameter + | TSTypeParameterDeclaration + | TSTypeParameterInstantiation + | TSTypePredicate + | TSTypeQuery + | TSTypeReference + | TSUndefinedKeyword + | TSUnionType + | TSUnknownKeyword + | TSVoidKeyword + | UnaryExpression + | UpdateExpression + | VariableDeclaration + | VariableDeclarator + | WhileStatement + | WithStatement + | YieldExpression; diff --git a/packages/ast-spec/src/unions/ObjectLiteralElement.ts b/packages/ast-spec/src/unions/ObjectLiteralElement.ts new file mode 100644 index 000000000000..d7575c80c1b9 --- /dev/null +++ b/packages/ast-spec/src/unions/ObjectLiteralElement.ts @@ -0,0 +1,8 @@ +import type { MethodDefinition } from '../element/MethodDefinition/spec'; +import type { Property } from '../element/Property/spec'; +import type { SpreadElement } from '../element/SpreadElement/spec'; + +export type ObjectLiteralElement = MethodDefinition | Property | SpreadElement; + +// TODO - breaking change remove this +export type ObjectLiteralElementLike = ObjectLiteralElement; diff --git a/packages/ast-spec/src/unions/Parameter.ts b/packages/ast-spec/src/unions/Parameter.ts new file mode 100644 index 000000000000..766a8dedbe7e --- /dev/null +++ b/packages/ast-spec/src/unions/Parameter.ts @@ -0,0 +1,14 @@ +import type { Identifier } from '../expression/Identifier/spec'; +import type { ArrayPattern } from '../parameter/ArrayPattern/spec'; +import type { AssignmentPattern } from '../parameter/AssignmentPattern/spec'; +import type { ObjectPattern } from '../parameter/ObjectPattern/spec'; +import type { RestElement } from '../parameter/RestElement/spec'; +import type { TSParameterProperty } from '../parameter/TSParameterProperty/spec'; + +export type Parameter = + | ArrayPattern + | AssignmentPattern + | Identifier + | ObjectPattern + | RestElement + | TSParameterProperty; diff --git a/packages/ast-spec/src/unions/PrimaryExpression.ts b/packages/ast-spec/src/unions/PrimaryExpression.ts new file mode 100644 index 000000000000..3c1dbf07fb85 --- /dev/null +++ b/packages/ast-spec/src/unions/PrimaryExpression.ts @@ -0,0 +1,35 @@ +import type { ArrayExpression } from '../expression/ArrayExpression/spec'; +import type { ClassExpression } from '../expression/ClassExpression/spec'; +import type { FunctionExpression } from '../expression/FunctionExpression/spec'; +import type { Identifier } from '../expression/Identifier/spec'; +import type { JSXElement } from '../expression/JSXElement/spec'; +import type { JSXFragment } from '../expression/JSXFragment/spec'; +import type { MetaProperty } from '../expression/MetaProperty/spec'; +import type { ObjectExpression } from '../expression/ObjectExpression/spec'; +import type { Super } from '../expression/Super/spec'; +import type { TemplateLiteral } from '../expression/TemplateLiteral/spec'; +import type { ThisExpression } from '../expression/ThisExpression/spec'; +import type { JSXOpeningElement } from '../jsx/JSXOpeningElement/spec'; +import type { ArrayPattern } from '../parameter/ArrayPattern/spec'; +import type { ObjectPattern } from '../parameter/ObjectPattern/spec'; +import type { TSNullKeyword } from '../type/TSNullKeyword/spec'; +import type { LiteralExpression } from './LiteralExpression'; + +// TODO - breaking change remove this +export type PrimaryExpression = + | ArrayExpression + | ArrayPattern + | ClassExpression + | FunctionExpression + | Identifier + | JSXElement + | JSXFragment + | JSXOpeningElement + | LiteralExpression + | MetaProperty + | ObjectExpression + | ObjectPattern + | Super + | TemplateLiteral + | ThisExpression + | TSNullKeyword; diff --git a/packages/ast-spec/src/unions/PropertyName.ts b/packages/ast-spec/src/unions/PropertyName.ts new file mode 100644 index 000000000000..56ba04cabbea --- /dev/null +++ b/packages/ast-spec/src/unions/PropertyName.ts @@ -0,0 +1,11 @@ +import type { Identifier } from '../expression/Identifier/spec'; +import type { NumberLiteral } from '../expression/literal/NumberLiteral/spec'; +import type { StringLiteral } from '../expression/literal/StringLiteral/spec'; +import type { Expression } from '../unions/Expression'; + +export type PropertyName = PropertyNameComputed | PropertyNameNonComputed; +export type PropertyNameComputed = Expression; +export type PropertyNameNonComputed = + | Identifier + | NumberLiteral + | StringLiteral; diff --git a/packages/ast-spec/src/unions/Statement.ts b/packages/ast-spec/src/unions/Statement.ts new file mode 100644 index 000000000000..7345a159982e --- /dev/null +++ b/packages/ast-spec/src/unions/Statement.ts @@ -0,0 +1,78 @@ +import type { ClassDeclaration } from '../declaration/ClassDeclaration/spec'; +import type { ExportAllDeclaration } from '../declaration/ExportAllDeclaration/spec'; +import type { ExportDefaultDeclaration } from '../declaration/ExportDefaultDeclaration/spec'; +import type { ExportNamedDeclaration } from '../declaration/ExportNamedDeclaration/spec'; +import type { FunctionDeclaration } from '../declaration/FunctionDeclaration/spec'; +import type { TSDeclareFunction } from '../declaration/TSDeclareFunction/spec'; +import type { TSEnumDeclaration } from '../declaration/TSEnumDeclaration/spec'; +import type { TSImportEqualsDeclaration } from '../declaration/TSImportEqualsDeclaration/spec'; +import type { TSInterfaceDeclaration } from '../declaration/TSInterfaceDeclaration/spec'; +import type { TSModuleDeclaration } from '../declaration/TSModuleDeclaration/spec'; +import type { TSNamespaceExportDeclaration } from '../declaration/TSNamespaceExportDeclaration/spec'; +import type { TSTypeAliasDeclaration } from '../declaration/TSTypeAliasDeclaration/spec'; +import type { VariableDeclaration } from '../declaration/VariableDeclaration/spec'; +import type { BlockStatement } from '../statement/BlockStatement/spec'; +import type { BreakStatement } from '../statement/BreakStatement/spec'; +import type { ContinueStatement } from '../statement/ContinueStatement/spec'; +import type { DebuggerStatement } from '../statement/DebuggerStatement/spec'; +import type { DoWhileStatement } from '../statement/DoWhileStatement/spec'; +import type { ExpressionStatement } from '../statement/ExpressionStatement/spec'; +import type { ForInStatement } from '../statement/ForInStatement/spec'; +import type { ForOfStatement } from '../statement/ForOfStatement/spec'; +import type { ForStatement } from '../statement/ForStatement/spec'; +import type { IfStatement } from '../statement/IfStatement/spec'; +import type { ImportDeclaration } from '../statement/ImportDeclaration/spec'; +import type { LabeledStatement } from '../statement/LabeledStatement/spec'; +import type { ReturnStatement } from '../statement/ReturnStatement/spec'; +import type { SwitchStatement } from '../statement/SwitchStatement/spec'; +import type { ThrowStatement } from '../statement/ThrowStatement/spec'; +import type { TryStatement } from '../statement/TryStatement/spec'; +import type { TSExportAssignment } from '../statement/TSExportAssignment/spec'; +import type { WhileStatement } from '../statement/WhileStatement/spec'; +import type { WithStatement } from '../statement/WithStatement/spec'; + +export type Statement = + | BlockStatement + | BreakStatement + | ClassDeclaration + | ContinueStatement + | DebuggerStatement + | DoWhileStatement + | ExportAllDeclaration + | ExportDefaultDeclaration + | ExportNamedDeclaration + | ExpressionStatement + | ForInStatement + | ForOfStatement + | ForStatement + | FunctionDeclaration + | IfStatement + | ImportDeclaration + | LabeledStatement + | ReturnStatement + | SwitchStatement + | ThrowStatement + | TryStatement + | TSDeclareFunction + | TSEnumDeclaration + | TSExportAssignment + | TSImportEqualsDeclaration + | TSInterfaceDeclaration + | TSModuleDeclaration + | TSNamespaceExportDeclaration + | TSTypeAliasDeclaration + | VariableDeclaration + | WhileStatement + | WithStatement; + +// These nodes are ***only*** allowed at the top-level +export type ProgramStatement = + | ExportAllDeclaration + | ExportDefaultDeclaration + | ExportNamedDeclaration + | ImportDeclaration + | Statement + | TSImportEqualsDeclaration + | TSNamespaceExportDeclaration; + +// TODO - once we have syntax errors, the types in ProgramStatement should not be in Statement diff --git a/packages/ast-spec/src/unions/TSUnaryExpression.ts b/packages/ast-spec/src/unions/TSUnaryExpression.ts new file mode 100644 index 000000000000..b4dd05627bf6 --- /dev/null +++ b/packages/ast-spec/src/unions/TSUnaryExpression.ts @@ -0,0 +1,13 @@ +import type { AwaitExpression } from '../expression/AwaitExpression/spec'; +import type { TSTypeAssertion } from '../expression/TSTypeAssertion/spec'; +import type { UnaryExpression } from '../expression/UnaryExpression/spec'; +import type { UpdateExpression } from '../expression/UpdateExpression/spec'; +import type { LeftHandSideExpression } from './LeftHandSideExpression'; + +// TODO - breaking change remove this +export type TSUnaryExpression = + | AwaitExpression + | LeftHandSideExpression + | TSTypeAssertion + | UnaryExpression + | UpdateExpression; diff --git a/packages/ast-spec/src/unions/Token.ts b/packages/ast-spec/src/unions/Token.ts new file mode 100644 index 000000000000..3d71cb019a7f --- /dev/null +++ b/packages/ast-spec/src/unions/Token.ts @@ -0,0 +1,26 @@ +import type { BooleanToken } from '../token/BooleanToken/spec'; +import type { IdentifierToken } from '../token/IdentifierToken/spec'; +import type { JSXIdentifierToken } from '../token/JSXIdentifierToken/spec'; +import type { JSXTextToken } from '../token/JSXTextToken/spec'; +import type { KeywordToken } from '../token/KeywordToken/spec'; +import type { NullToken } from '../token/NullToken/spec'; +import type { NumericToken } from '../token/NumericToken/spec'; +import type { PunctuatorToken } from '../token/PunctuatorToken/spec'; +import type { RegularExpressionToken } from '../token/RegularExpressionToken/spec'; +import type { StringToken } from '../token/StringToken/spec'; +import type { TemplateToken } from '../token/TemplateToken/spec'; +import type { Comment } from './Comment'; + +export type Token = + | BooleanToken + | Comment + | IdentifierToken + | JSXIdentifierToken + | JSXTextToken + | KeywordToken + | NullToken + | NumericToken + | PunctuatorToken + | RegularExpressionToken + | StringToken + | TemplateToken; diff --git a/packages/ast-spec/src/unions/TypeElement.ts b/packages/ast-spec/src/unions/TypeElement.ts new file mode 100644 index 000000000000..9a4bbc99c223 --- /dev/null +++ b/packages/ast-spec/src/unions/TypeElement.ts @@ -0,0 +1,12 @@ +import type { TSCallSignatureDeclaration } from '../element/TSCallSignatureDeclaration/spec'; +import type { TSConstructSignatureDeclaration } from '../element/TSConstructSignatureDeclaration/spec'; +import type { TSIndexSignature } from '../element/TSIndexSignature/spec'; +import type { TSMethodSignature } from '../element/TSMethodSignature/spec'; +import type { TSPropertySignature } from '../element/TSPropertySignature/spec'; + +export type TypeElement = + | TSCallSignatureDeclaration + | TSConstructSignatureDeclaration + | TSIndexSignature + | TSMethodSignature + | TSPropertySignature; diff --git a/packages/ast-spec/src/unions/TypeNode.ts b/packages/ast-spec/src/unions/TypeNode.ts new file mode 100644 index 000000000000..c50630e6cd6a --- /dev/null +++ b/packages/ast-spec/src/unions/TypeNode.ts @@ -0,0 +1,74 @@ +import type { TSAnyKeyword } from '../type/TSAnyKeyword/spec'; +import type { TSArrayType } from '../type/TSArrayType/spec'; +import type { TSBigIntKeyword } from '../type/TSBigIntKeyword/spec'; +import type { TSBooleanKeyword } from '../type/TSBooleanKeyword/spec'; +import type { TSConditionalType } from '../type/TSConditionalType/spec'; +import type { TSConstructorType } from '../type/TSConstructorType/spec'; +import type { TSFunctionType } from '../type/TSFunctionType/spec'; +import type { TSImportType } from '../type/TSImportType/spec'; +import type { TSIndexedAccessType } from '../type/TSIndexedAccessType/spec'; +import type { TSInferType } from '../type/TSInferType/spec'; +import type { TSIntersectionType } from '../type/TSIntersectionType/spec'; +import type { TSIntrinsicKeyword } from '../type/TSIntrinsicType/spec'; +import type { TSLiteralType } from '../type/TSLiteralType/spec'; +import type { TSMappedType } from '../type/TSMappedType/spec'; +import type { TSNamedTupleMember } from '../type/TSNamedTupleMember/spec'; +import type { TSNeverKeyword } from '../type/TSNeverKeyword/spec'; +import type { TSNullKeyword } from '../type/TSNullKeyword/spec'; +import type { TSNumberKeyword } from '../type/TSNumberKeyword/spec'; +import type { TSObjectKeyword } from '../type/TSObjectKeyword/spec'; +import type { TSOptionalType } from '../type/TSOptionalType/spec'; +import type { TSParenthesizedType } from '../type/TSParenthesizedType/spec'; +import type { TSRestType } from '../type/TSRestType/spec'; +import type { TSStringKeyword } from '../type/TSStringKeyword/spec'; +import type { TSSymbolKeyword } from '../type/TSSymbolKeyword/spec'; +import type { TSTemplateLiteralType } from '../type/TSTemplateLiteralType/spec'; +import type { TSThisType } from '../type/TSThisType/spec'; +import type { TSTupleType } from '../type/TSTupleType/spec'; +import type { TSTypeLiteral } from '../type/TSTypeLiteral/spec'; +import type { TSTypeOperator } from '../type/TSTypeOperator/spec'; +import type { TSTypePredicate } from '../type/TSTypePredicate/spec'; +import type { TSTypeQuery } from '../type/TSTypeQuery/spec'; +import type { TSTypeReference } from '../type/TSTypeReference/spec'; +import type { TSUndefinedKeyword } from '../type/TSUndefinedKeyword/spec'; +import type { TSUnionType } from '../type/TSUnionType/spec'; +import type { TSUnknownKeyword } from '../type/TSUnknownKeyword/spec'; +import type { TSVoidKeyword } from '../type/TSVoidKeyword/spec'; + +export type TypeNode = + | TSAnyKeyword + | TSArrayType + | TSBigIntKeyword + | TSBooleanKeyword + | TSConditionalType + | TSConstructorType + | TSFunctionType + | TSImportType + | TSIndexedAccessType + | TSInferType + | TSIntersectionType + | TSIntrinsicKeyword + | TSLiteralType + | TSMappedType + | TSNamedTupleMember + | TSNeverKeyword + | TSNullKeyword + | TSNumberKeyword + | TSObjectKeyword + | TSOptionalType + | TSParenthesizedType + | TSRestType + | TSStringKeyword + | TSSymbolKeyword + | TSTemplateLiteralType + | TSThisType + | TSTupleType + | TSTypeLiteral + | TSTypeOperator + | TSTypePredicate + | TSTypeQuery + | TSTypeReference + | TSUndefinedKeyword + | TSUnionType + | TSUnknownKeyword + | TSVoidKeyword; diff --git a/packages/ast-spec/tests/ast-node-types.test.ts b/packages/ast-spec/tests/ast-node-types.test.ts new file mode 100644 index 000000000000..7cc247f2d094 --- /dev/null +++ b/packages/ast-spec/tests/ast-node-types.test.ts @@ -0,0 +1,16 @@ +import type { AST_NODE_TYPES } from '../src/ast-node-types'; +import type { Node } from '../src/unions/Node'; + +type GetKeys = keyof Extract; + +type AllKeys = { + readonly [T in AST_NODE_TYPES]: GetKeys; +}; + +type TakesString> = T; + +// @ts-expect-error: purposely unused +type _Test = + // forcing the test onto a new line so it isn't covered by the expect error + // If there are any enum members that don't have a corresponding TSESTree.Node, then this line will error with "Type 'string | number | symbol' is not assignable to type 'string'." + TakesString | void; diff --git a/packages/ast-spec/tsconfig.build.json b/packages/ast-spec/tsconfig.build.json new file mode 100644 index 000000000000..215a0282df2b --- /dev/null +++ b/packages/ast-spec/tsconfig.build.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./dist", + "rootDir": "./src", + "resolveJsonModule": true + }, + "include": ["src", "typings"] +} diff --git a/packages/ast-spec/tsconfig.json b/packages/ast-spec/tsconfig.json new file mode 100644 index 000000000000..4b76ef4253b9 --- /dev/null +++ b/packages/ast-spec/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": false, + "rootDir": "." + }, + "include": ["src", "typings", "tests", "tools", "./rollup.config.ts"] +} diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index f0c64a185df3..ed377ea25988 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -6,7 +6,7 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", + "postclean": "rimraf dist && rimraf coverage", "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", "test": "jest --coverage", diff --git a/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts b/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts index bc26d9d9d9a1..64fefc08f8ef 100644 --- a/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts +++ b/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts @@ -408,7 +408,9 @@ export default createRule({ } } - function isNoFormatTemplateTag(tag: TSESTree.Expression): boolean { + function isNoFormatTemplateTag( + tag: TSESTree.LeftHandSideExpression, + ): boolean { return tag.type === AST_NODE_TYPES.Identifier && tag.name === 'noFormat'; } diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index fcd692ca596e..b35badc6bfd4 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -31,7 +31,7 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", + "postclean": "rimraf dist && rimraf coverage", "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", "test": "jest --coverage", diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 38db92807b9e..72ca9feaf597 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -35,7 +35,7 @@ "check:docs": "jest tests/docs.test.ts --runTestsByPath --silent --runInBand", "check:configs": "jest tests/configs.test.ts --runTestsByPath --silent --runInBand", "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", + "postclean": "rimraf dist && rimraf coverage", "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", "generate:configs": "../../node_modules/.bin/ts-node --files --transpile-only tools/generate-configs.ts", "generate:rules-lists": "../../node_modules/.bin/ts-node --files --transpile-only tools/generate-rules-lists.ts", diff --git a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts index 47ab5b1a74fa..1e04d080e747 100644 --- a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts +++ b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts @@ -46,7 +46,7 @@ export default util.createRule({ rules.Literal({ ...node, raw: isSeperatedNumeric(node) ? node.raw.replace(/_/g, '') : node.raw, - }); + } as never); }, }; }, diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts index aee4963a0c05..f5ca89e88d60 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts @@ -167,7 +167,7 @@ export default createRule({ }); } - function getNodeType(node: TSESTree.Expression): ts.Type { + function getNodeType(node: TSESTree.Node): ts.Type { const tsNode = service.esTreeNodeToTSNodeMap.get(node); return getConstrainedTypeAtLocation(checker, tsNode); } diff --git a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts index d78c4496164d..636fe2b3825a 100644 --- a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts +++ b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts @@ -40,7 +40,7 @@ export default createRule({ * Check if a given node is a string. * @param node The node to check. */ - function isStringType(node: TSESTree.Expression): boolean { + function isStringType(node: TSESTree.Node): boolean { const objectType = typeChecker.getTypeAtLocation( parserServices.esTreeNodeToTSNodeMap.get(node), ); @@ -51,7 +51,7 @@ export default createRule({ * Check if a given node is a RegExp. * @param node The node to check. */ - function isRegExpType(node: TSESTree.Expression): boolean { + function isRegExpType(node: TSESTree.Node): boolean { const objectType = typeChecker.getTypeAtLocation( parserServices.esTreeNodeToTSNodeMap.get(node), ); diff --git a/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts b/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts index fb83da6f318b..af80720c2904 100644 --- a/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts +++ b/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts @@ -82,7 +82,6 @@ function getGroup(node: TSESTree.TypeNode): Group { return Group.union; // These types should never occur as part of a union/intersection - case AST_NODE_TYPES.TSInterfaceHeritage: case AST_NODE_TYPES.TSNamedTupleMember: case AST_NODE_TYPES.TSOptionalType: case AST_NODE_TYPES.TSRestType: diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index b3402e64bde0..d2ebd2a40720 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -32,7 +32,7 @@ "build": "tsc -b tsconfig.build.json", "postbuild": "downlevel-dts dist _ts3.4/dist", "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist && rimraf _ts3.4", + "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", "test": "jest --coverage", diff --git a/packages/parser/package.json b/packages/parser/package.json index 7aaac815772d..9e9fd7f81858 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -34,7 +34,7 @@ "build": "tsc -b tsconfig.build.json", "postbuild": "downlevel-dts dist _ts3.4/dist", "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", + "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", "test": "jest --coverage", diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 51f58e98474b..b130cdea237e 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -31,7 +31,7 @@ "build": "tsc -b tsconfig.build.json", "postbuild": "downlevel-dts dist _ts3.4/dist", "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", + "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", "generate:lib": "../../node_modules/.bin/ts-node --files --transpile-only tools/generate-lib.ts", "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", diff --git a/packages/scope-manager/src/scope/ScopeBase.ts b/packages/scope-manager/src/scope/ScopeBase.ts index 04f38e8a65f3..602dd81a206a 100644 --- a/packages/scope-manager/src/scope/ScopeBase.ts +++ b/packages/scope-manager/src/scope/ScopeBase.ts @@ -87,22 +87,20 @@ function isStrictScope( if (stmt.type !== AST_NODE_TYPES.ExpressionStatement) { break; } - const expr = stmt.expression; - if ( - expr.type !== AST_NODE_TYPES.Literal || - typeof expr.value !== 'string' - ) { + if (stmt.directive === 'use strict') { + return true; + } + + const expr = stmt.expression; + if (expr.type !== AST_NODE_TYPES.Literal) { break; } - if (expr.raw !== null && expr.raw !== undefined) { - if (expr.raw === '"use strict"' || expr.raw === "'use strict'") { - return true; - } - } else { - if (expr.value === 'use strict') { - return true; - } + if (expr.raw === '"use strict"' || expr.raw === "'use strict'") { + return true; + } + if (expr.value === 'use strict') { + return true; } } return false; diff --git a/packages/types/package.json b/packages/types/package.json index 5251c580de59..cd37019cbf4b 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -19,7 +19,7 @@ "repository": { "type": "git", "url": "https://github.com/typescript-eslint/typescript-eslint.git", - "directory": "packages/visitor-keys" + "directory": "packages/types" }, "bugs": { "url": "https://github.com/typescript-eslint/typescript-eslint/issues" @@ -28,10 +28,11 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { + "prebuild": "yarn ts-node --transpile-only ./tools/copy-ast-spec.ts", "build": "tsc -b tsconfig.build.json", "postbuild": "downlevel-dts dist _ts3.4/dist", "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", + "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", "generate:lib": "../../node_modules/.bin/ts-node --files --transpile-only ../scope-manager/tools/generate-lib.ts", "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 59df48302df5..4bda24b13818 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,5 +1,5 @@ -export { AST_NODE_TYPES } from './ast-node-types'; -export { AST_TOKEN_TYPES } from './ast-token-types'; +export { AST_NODE_TYPES } from './ast-spec'; +export { AST_TOKEN_TYPES } from './ast-spec'; export * from './lib'; export * from './parser-options'; -export * as TSESTree from './ts-estree'; +export * from './ts-estree'; diff --git a/packages/types/src/ts-estree.ts b/packages/types/src/ts-estree.ts index e296b5668ae0..037bd3f92c97 100644 --- a/packages/types/src/ts-estree.ts +++ b/packages/types/src/ts-estree.ts @@ -1,1769 +1,21 @@ -import { AST_NODE_TYPES } from './ast-node-types'; -import { AST_TOKEN_TYPES } from './ast-token-types'; +import * as TSESTree from './ast-spec'; -export interface LineAndColumnData { - /** - * Line number (1-indexed) - */ - line: number; - /** - * Column number on the line (0-indexed) - */ - column: number; -} -export interface SourceLocation { - /** - * The position of the first character of the parsed source region - */ - start: LineAndColumnData; - /** - * The position of the first character after the parsed source region - */ - end: LineAndColumnData; -} -export type Range = [number, number]; - -export interface BaseNode { - /** - * The source location information of the node. - */ - loc: SourceLocation; - /** - * An array of two numbers. - * Both numbers are a 0-based index which is the position in the array of source code characters. - * The first is the start position of the node, the second is the end position of the node. - */ - range: Range; - /** - * The parent node of the current node - */ - parent?: Node; - - // every node *will* have a type, but let the nodes define their own exact string - // type: string; - - // we don't ever set this from within ts-estree - // source?: string | null; -} - -/* - * Token and Comment are pseudo-nodes to represent pieces of source code - * - * NOTE: - * They are not included in the `Node` union below on purpose because they - * are not ever included as part of the standard AST tree. - */ -interface BaseToken extends BaseNode { - value: string; -} - -export interface BooleanToken extends BaseToken { - type: AST_TOKEN_TYPES.Boolean; -} - -export interface IdentifierToken extends BaseToken { - type: AST_TOKEN_TYPES.Identifier; -} - -export interface JSXIdentifierToken extends BaseToken { - type: AST_TOKEN_TYPES.JSXIdentifier; -} - -export interface JSXTextToken extends BaseToken { - type: AST_TOKEN_TYPES.JSXText; -} - -export interface KeywordToken extends BaseToken { - type: AST_TOKEN_TYPES.Keyword; -} - -export interface NullToken extends BaseToken { - type: AST_TOKEN_TYPES.Null; -} - -export interface NumericToken extends BaseToken { - type: AST_TOKEN_TYPES.Numeric; -} - -export interface PunctuatorToken extends BaseToken { - type: AST_TOKEN_TYPES.Punctuator; -} - -export interface RegularExpressionToken extends BaseToken { - type: AST_TOKEN_TYPES.RegularExpression; - regex: { - pattern: string; - flags: string; - }; -} - -export interface StringToken extends BaseToken { - type: AST_TOKEN_TYPES.String; -} - -export interface TemplateToken extends BaseToken { - type: AST_TOKEN_TYPES.Template; -} - -export interface BlockComment extends BaseToken { - type: AST_TOKEN_TYPES.Block; -} - -export interface LineComment extends BaseToken { - type: AST_TOKEN_TYPES.Line; -} - -export type Comment = BlockComment | LineComment; -export type Token = - | BooleanToken - | Comment - | IdentifierToken - | JSXIdentifierToken - | JSXTextToken - | KeywordToken - | NullToken - | NumericToken - | PunctuatorToken - | RegularExpressionToken - | StringToken - | TemplateToken; - -export type OptionalRangeAndLoc = Pick< - T, - Exclude -> & { - range?: Range; - loc?: SourceLocation; -}; - -// Every single valid AST Node -// Please keep it sorted alphabetically. -export type Node = - | ArrayExpression - | ArrayPattern - | ArrowFunctionExpression - | AssignmentExpression - | AssignmentPattern - | AwaitExpression - | BigIntLiteral - | BinaryExpression - | BlockStatement - | BreakStatement - | CallExpression - | CatchClause - | ChainExpression - | ClassBody - | ClassDeclaration - | ClassExpression - | ClassProperty - | ConditionalExpression - | ContinueStatement - | DebuggerStatement - | Decorator - | DoWhileStatement - | EmptyStatement - | ExportAllDeclaration - | ExportDefaultDeclaration - | ExportNamedDeclaration - | ExportSpecifier - | ExpressionStatement - | ForInStatement - | ForOfStatement - | ForStatement - | FunctionDeclaration - | FunctionExpression - | Identifier - | IfStatement - | ImportDeclaration - | ImportDefaultSpecifier - | ImportExpression - | ImportNamespaceSpecifier - | ImportSpecifier - | JSXAttribute - | JSXClosingElement - | JSXClosingFragment - | JSXElement - | JSXEmptyExpression - | JSXExpressionContainer - | JSXFragment - | JSXIdentifier - | JSXMemberExpression - | JSXNamespacedName - | JSXOpeningElement - | JSXOpeningFragment - | JSXSpreadAttribute - | JSXSpreadChild - | JSXText - | LabeledStatement - | Literal - | LogicalExpression - | MemberExpression - | MetaProperty - | MethodDefinition - | NewExpression - | ObjectExpression - | ObjectPattern - | Program - | Property - | RestElement - | ReturnStatement - | SequenceExpression - | SpreadElement - | Super - | SwitchCase - | SwitchStatement - | TaggedTemplateExpression - | TemplateElement - | TemplateLiteral - | ThisExpression - | ThrowStatement - | TryStatement - | TSAbstractClassProperty - | TSAbstractKeyword - | TSAbstractMethodDefinition - | TSAnyKeyword - | TSArrayType - | TSAsExpression - | TSAsyncKeyword - | TSBigIntKeyword - | TSBooleanKeyword - | TSCallSignatureDeclaration - | TSClassImplements - | TSConditionalType - | TSConstructorType - | TSConstructSignatureDeclaration - | TSDeclareFunction - | TSDeclareKeyword - | TSEmptyBodyFunctionExpression - | TSEnumDeclaration - | TSEnumMember - | TSExportAssignment - | TSExportKeyword - | TSExternalModuleReference - | TSFunctionType - | TSImportEqualsDeclaration - | TSImportType - | TSIndexedAccessType - | TSIndexSignature - | TSInferType - | TSInterfaceBody - | TSInterfaceDeclaration - | TSInterfaceHeritage - | TSIntersectionType - | TSIntrinsicKeyword - | TSLiteralType - | TSMappedType - | TSMethodSignature - | TSModuleBlock - | TSModuleDeclaration - | TSNamedTupleMember - | TSNamespaceExportDeclaration - | TSNeverKeyword - | TSNonNullExpression - | TSNullKeyword - | TSNumberKeyword - | TSObjectKeyword - | TSOptionalType - | TSParameterProperty - | TSParenthesizedType - | TSPrivateKeyword - | TSPropertySignature - | TSProtectedKeyword - | TSPublicKeyword - | TSQualifiedName - | TSReadonlyKeyword - | TSRestType - | TSStaticKeyword - | TSStringKeyword - | TSSymbolKeyword - | TSTemplateLiteralType - | TSThisType - | TSTupleType - | TSTypeAliasDeclaration - | TSTypeAnnotation - | TSTypeAssertion - | TSTypeLiteral - | TSTypeOperator - | TSTypeParameter - | TSTypeParameterDeclaration - | TSTypeParameterInstantiation - | TSTypePredicate - | TSTypeQuery - | TSTypeReference - | TSUndefinedKeyword - | TSUnionType - | TSUnknownKeyword - | TSVoidKeyword - | UnaryExpression - | UpdateExpression - | VariableDeclaration - | VariableDeclarator - | WhileStatement - | WithStatement - | YieldExpression; - -////////// -// Reusable Unions -// These are based off of types used in the Typescript AST definitions -// **Ensure you sort the union members alphabetically** -////////// - -export type Accessibility = 'public' | 'protected' | 'private'; -export type BindingPattern = ArrayPattern | ObjectPattern; -export type BindingName = BindingPattern | Identifier; -export type ChainElement = - | CallExpression - | MemberExpression - | TSNonNullExpression; -export type ClassElement = - | ClassProperty - | MethodDefinition - | TSAbstractClassProperty - | TSAbstractMethodDefinition - | TSIndexSignature; -export type ClassProperty = - | ClassPropertyComputedName - | ClassPropertyNonComputedName; -export type DeclarationStatement = - | ClassDeclaration - | ClassExpression - | ExportDefaultDeclaration - | ExportAllDeclaration - | ExportNamedDeclaration - | FunctionDeclaration - | TSDeclareFunction - | TSImportEqualsDeclaration - | TSInterfaceDeclaration - | TSModuleDeclaration - | TSNamespaceExportDeclaration - | TSTypeAliasDeclaration - | TSEnumDeclaration; -export type DestructuringPattern = - | Identifier - | ObjectPattern - | ArrayPattern - | RestElement - | AssignmentPattern - | MemberExpression; -export type EntityName = Identifier | TSQualifiedName; -export type ExportDeclaration = - | ClassDeclaration - | ClassExpression - | FunctionDeclaration - | TSDeclareFunction - | TSEnumDeclaration - | TSInterfaceDeclaration - | TSModuleDeclaration - | TSTypeAliasDeclaration - | VariableDeclaration; -export type Expression = - | ArrowFunctionExpression - | AssignmentExpression - | BinaryExpression - | ChainExpression - | ConditionalExpression - | ImportExpression - | JSXClosingElement - | JSXClosingFragment - | JSXExpressionContainer - | JSXOpeningElement - | JSXOpeningFragment - | JSXSpreadChild - | LogicalExpression - | NewExpression - | RestElement - | SequenceExpression - | SpreadElement - | TSAsExpression - | TSTypeAssertion - | TSUnaryExpression - | YieldExpression; -export type ForInitialiser = Expression | VariableDeclaration; -export type FunctionLike = - | ArrowFunctionExpression - | FunctionDeclaration - | FunctionExpression - | TSDeclareFunction - | TSEmptyBodyFunctionExpression; -export type ImportClause = - | ImportDefaultSpecifier - | ImportNamespaceSpecifier - | ImportSpecifier; -export type IterationStatement = - | DoWhileStatement - | ForInStatement - | ForOfStatement - | ForStatement - | WhileStatement; -export type JSXChild = JSXElement | JSXExpression | JSXFragment | JSXText; -export type JSXExpression = - | JSXEmptyExpression - | JSXSpreadChild - | JSXExpressionContainer; -export type JSXTagNameExpression = - | JSXIdentifier - | JSXMemberExpression - | JSXNamespacedName; -export type LeftHandSideExpression = - | CallExpression - | ClassExpression - | ClassDeclaration - | FunctionExpression - | LiteralExpression - | MemberExpression - | PrimaryExpression - | TaggedTemplateExpression - | TSNonNullExpression - | TSAsExpression - | ArrowFunctionExpression; -export type Literal = - | BigIntLiteral - | BooleanLiteral - | NumberLiteral - | NullLiteral - | RegExpLiteral - | StringLiteral; -export type LiteralExpression = Literal | TemplateLiteral; -export type MemberExpression = - | MemberExpressionComputedName - | MemberExpressionNonComputedName; -export type MethodDefinition = - | MethodDefinitionComputedName - | MethodDefinitionNonComputedName; -export type Modifier = - | TSAbstractKeyword - | TSAsyncKeyword - | TSPrivateKeyword - | TSProtectedKeyword - | TSPublicKeyword - | TSReadonlyKeyword - | TSStaticKeyword; -export type ObjectLiteralElementLike = - | MethodDefinition - | Property - | SpreadElement - | TSAbstractMethodDefinition; -export type Parameter = - | ArrayPattern - | AssignmentPattern - | Identifier - | ObjectPattern - | RestElement - | TSParameterProperty; -export type PrimaryExpression = - | ArrayExpression - | ArrayPattern - | ClassExpression - | FunctionExpression - | Identifier - | JSXElement - | JSXFragment - | JSXOpeningElement - | Literal - | LiteralExpression - | MetaProperty - | ObjectExpression - | ObjectPattern - | Super - | TemplateLiteral - | ThisExpression - | TSNullKeyword; -/** TODO: re-align this with EStree spec in next major release */ -export type ProgramStatement = Statement; -export type Property = PropertyComputedName | PropertyNonComputedName; -export type PropertyName = PropertyNameComputed | PropertyNameNonComputed; -export type PropertyNameComputed = Expression; -export type PropertyNameNonComputed = - | Identifier - | StringLiteral - | NumberLiteral; -export type Statement = - | BlockStatement - | BreakStatement - | ClassDeclaration - | ContinueStatement - | DebuggerStatement - | DeclarationStatement - | EmptyStatement - | ExportAllDeclaration - | ExportDefaultDeclaration - | ExportNamedDeclaration - | ExpressionStatement - | IfStatement - | IterationStatement - | ImportDeclaration - | LabeledStatement - | TSDeclareFunction - | TSEnumDeclaration - | TSExportAssignment - | TSImportEqualsDeclaration - | TSInterfaceDeclaration - | TSModuleBlock - | TSNamespaceExportDeclaration - | TSTypeAliasDeclaration - | ReturnStatement - | SwitchStatement - | ThrowStatement - | TryStatement - | VariableDeclaration - | WithStatement; -export type TSAbstractClassProperty = - | TSAbstractClassPropertyComputedName - | TSAbstractClassPropertyNonComputedName; -export type TSAbstractMethodDefinition = - | TSAbstractMethodDefinitionComputedName - | TSAbstractMethodDefinitionNonComputedName; -export type TSMethodSignature = - | TSMethodSignatureComputedName - | TSMethodSignatureNonComputedName; -export type TSPropertySignature = - | TSPropertySignatureComputedName - | TSPropertySignatureNonComputedName; -export type TSEnumMember = - | TSEnumMemberComputedName - | TSEnumMemberNonComputedName; -export type TSUnaryExpression = - | AwaitExpression - | LeftHandSideExpression - | TSTypeAssertion - | UnaryExpression - | UpdateExpression; -export type TypeElement = - | TSCallSignatureDeclaration - | TSConstructSignatureDeclaration - | TSIndexSignature - | TSMethodSignature - | TSPropertySignature; -export type TypeNode = - | TSAnyKeyword - | TSArrayType - | TSBigIntKeyword - | TSBooleanKeyword - | TSConditionalType - | TSConstructorType - | TSFunctionType - | TSImportType - | TSIndexedAccessType - | TSInferType - | TSInterfaceHeritage - | TSIntersectionType - | TSIntrinsicKeyword - | TSLiteralType - | TSMappedType - | TSNamedTupleMember - | TSNeverKeyword - | TSNullKeyword - | TSNumberKeyword - | TSObjectKeyword - | TSOptionalType - | TSParenthesizedType - | TSRestType - | TSStringKeyword - | TSSymbolKeyword - | TSTemplateLiteralType - | TSThisType - | TSTupleType - | TSTypeLiteral - | TSTypeOperator - | TSTypePredicate - | TSTypeQuery - | TSTypeReference - | TSUndefinedKeyword - | TSUnionType - | TSUnknownKeyword - | TSVoidKeyword; - -/////////////// -// Base, common types -// **Ensure you sort the interfaces alphabetically** -/////////////// - -interface BinaryExpressionBase extends BaseNode { - operator: string; - left: Expression; - right: Expression; -} - -interface CallExpressionBase extends BaseNode { - callee: LeftHandSideExpression; - arguments: Expression[]; - typeParameters?: TSTypeParameterInstantiation; - optional: boolean; -} - -interface ClassDeclarationBase extends BaseNode { - typeParameters?: TSTypeParameterDeclaration; - superTypeParameters?: TSTypeParameterInstantiation; - id: Identifier | null; - body: ClassBody; - superClass: LeftHandSideExpression | null; - implements?: TSClassImplements[]; - abstract?: boolean; - declare?: boolean; - decorators?: Decorator[]; -} - -/** this should not be directly used - instead use ClassPropertyComputedNameBase or ClassPropertyNonComputedNameBase */ -interface ClassPropertyBase extends BaseNode { - key: PropertyName; - value: Expression | null; - computed: boolean; - static: boolean; - declare: boolean; - readonly?: boolean; - decorators?: Decorator[]; - accessibility?: Accessibility; - optional?: boolean; - definite?: boolean; - typeAnnotation?: TSTypeAnnotation; -} - -interface ClassPropertyComputedNameBase extends ClassPropertyBase { - key: PropertyNameComputed; - computed: true; -} - -interface ClassPropertyNonComputedNameBase extends ClassPropertyBase { - key: PropertyNameNonComputed; - computed: false; -} - -interface FunctionDeclarationBase extends BaseNode { - id: Identifier | null; - generator: boolean; - expression: boolean; - async: boolean; - params: Parameter[]; - body?: BlockStatement | null; - returnType?: TSTypeAnnotation; - typeParameters?: TSTypeParameterDeclaration; - declare?: boolean; -} +// augment to add the parent property, which isn't part of the spec +declare module './ast-spec' { + interface BaseNode { + parent?: TSESTree.Node; + } -interface FunctionSignatureBase extends BaseNode { - params: Parameter[]; - returnType?: TSTypeAnnotation; - typeParameters?: TSTypeParameterDeclaration; -} - -interface LiteralBase extends BaseNode { - raw: string; - value: string | boolean | null | number | RegExp | bigint; - regex?: { - pattern: string; - flags: string; - }; -} - -/** this should not be directly used - instead use MemberExpressionComputedNameBase or MemberExpressionNonComputedNameBase */ -interface MemberExpressionBase extends BaseNode { - object: LeftHandSideExpression; - property: Expression | Identifier; - computed: boolean; - optional: boolean; -} - -interface MemberExpressionComputedNameBase extends MemberExpressionBase { - property: Expression; - computed: true; -} - -interface MemberExpressionNonComputedNameBase extends MemberExpressionBase { - property: Identifier; - computed: false; -} - -/** this should not be directly used - instead use MethodDefinitionComputedNameBase or MethodDefinitionNonComputedNameBase */ -interface MethodDefinitionBase extends BaseNode { - key: PropertyName; - value: FunctionExpression | TSEmptyBodyFunctionExpression; - computed: boolean; - static: boolean; - kind: 'method' | 'get' | 'set' | 'constructor'; - optional?: boolean; - decorators?: Decorator[]; - accessibility?: Accessibility; - typeParameters?: TSTypeParameterDeclaration; -} - -interface MethodDefinitionComputedNameBase extends MethodDefinitionBase { - key: PropertyNameComputed; - computed: true; -} - -interface MethodDefinitionNonComputedNameBase extends MethodDefinitionBase { - key: PropertyNameNonComputed; - computed: false; -} - -interface PropertyBase extends BaseNode { - type: AST_NODE_TYPES.Property; - key: PropertyName; - value: - | Expression - | AssignmentPattern - | BindingName - | TSEmptyBodyFunctionExpression; - computed: boolean; - method: boolean; - shorthand: boolean; - optional?: boolean; - kind: 'init' | 'get' | 'set'; -} - -interface TSEnumMemberBase extends BaseNode { - type: AST_NODE_TYPES.TSEnumMember; - id: - | PropertyNameNonComputed - // this should only happen in semantically invalid code (ts error 1164) - | PropertyNameComputed; - initializer?: Expression; - computed?: boolean; -} - -interface TSHeritageBase extends BaseNode { - expression: Expression; - typeParameters?: TSTypeParameterInstantiation; -} - -interface TSMethodSignatureBase extends BaseNode { - type: AST_NODE_TYPES.TSMethodSignature; - key: PropertyName; - computed: boolean; - params: Parameter[]; - optional?: boolean; - returnType?: TSTypeAnnotation; - readonly?: boolean; - typeParameters?: TSTypeParameterDeclaration; - accessibility?: Accessibility; - export?: boolean; - static?: boolean; -} - -interface TSPropertySignatureBase extends BaseNode { - type: AST_NODE_TYPES.TSPropertySignature; - key: PropertyName; - optional?: boolean; - computed: boolean; - typeAnnotation?: TSTypeAnnotation; - initializer?: Expression; - readonly?: boolean; - static?: boolean; - export?: boolean; - accessibility?: Accessibility; -} - -interface UnaryExpressionBase extends BaseNode { - operator: string; - prefix: boolean; - argument: LeftHandSideExpression | Literal | UnaryExpression; -} - -/////////////// -// Typescript ESTree Nodes -// **Ensure you sort the interfaces alphabetically** -/////////////// - -export interface ArrayExpression extends BaseNode { - type: AST_NODE_TYPES.ArrayExpression; - elements: Expression[]; -} - -export interface ArrayPattern extends BaseNode { - type: AST_NODE_TYPES.ArrayPattern; - elements: (DestructuringPattern | null)[]; - typeAnnotation?: TSTypeAnnotation; - optional?: boolean; - decorators?: Decorator[]; -} - -export interface ArrowFunctionExpression extends BaseNode { - type: AST_NODE_TYPES.ArrowFunctionExpression; - generator: boolean; - id: null; - params: Parameter[]; - body: Expression | BlockStatement; - async: boolean; - expression: boolean; - returnType?: TSTypeAnnotation; - typeParameters?: TSTypeParameterDeclaration; -} - -export interface AssignmentExpression extends BinaryExpressionBase { - type: AST_NODE_TYPES.AssignmentExpression; - operator: - | '-=' - | '??=' - | '**=' - | '*=' - | '/=' - | '&&=' - | '&=' - | '%=' - | '^=' - | '+=' - | '<<=' - | '=' - | '>>=' - | '>>>=' - | '|=' - | '||='; -} - -export interface AssignmentPattern extends BaseNode { - type: AST_NODE_TYPES.AssignmentPattern; - left: BindingName; - right: Expression; - typeAnnotation?: TSTypeAnnotation; - optional?: boolean; - decorators?: Decorator[]; -} - -export interface AwaitExpression extends BaseNode { - type: AST_NODE_TYPES.AwaitExpression; - argument: TSUnaryExpression; -} - -export interface BigIntLiteral extends LiteralBase { - type: AST_NODE_TYPES.Literal; - value: bigint | null; - bigint: string; -} - -export interface BinaryExpression extends BinaryExpressionBase { - type: AST_NODE_TYPES.BinaryExpression; -} - -export interface BlockStatement extends BaseNode { - type: AST_NODE_TYPES.BlockStatement; - body: Statement[]; -} - -export interface BooleanLiteral extends LiteralBase { - type: AST_NODE_TYPES.Literal; - value: boolean; -} - -export interface BreakStatement extends BaseNode { - type: AST_NODE_TYPES.BreakStatement; - label: Identifier | null; -} - -export interface ChainExpression extends BaseNode { - type: AST_NODE_TYPES.ChainExpression; - expression: ChainElement; -} - -export interface CallExpression extends CallExpressionBase { - type: AST_NODE_TYPES.CallExpression; -} + // TODO - make this change as a breaking change + /* + interface BaseNode { + parent: TSESTree.Node; + } -export interface CatchClause extends BaseNode { - type: AST_NODE_TYPES.CatchClause; - param: BindingName | null; - body: BlockStatement; + interface Program { + parent?: undefined; + } + */ } -export interface ClassBody extends BaseNode { - type: AST_NODE_TYPES.ClassBody; - body: ClassElement[]; -} - -export interface ClassDeclaration extends ClassDeclarationBase { - type: AST_NODE_TYPES.ClassDeclaration; -} - -export interface ClassExpression extends ClassDeclarationBase { - type: AST_NODE_TYPES.ClassExpression; -} - -export interface ClassPropertyComputedName - extends ClassPropertyComputedNameBase { - type: AST_NODE_TYPES.ClassProperty; -} - -export interface ClassPropertyNonComputedName - extends ClassPropertyNonComputedNameBase { - type: AST_NODE_TYPES.ClassProperty; -} - -export interface ConditionalExpression extends BaseNode { - type: AST_NODE_TYPES.ConditionalExpression; - test: Expression; - consequent: Expression; - alternate: Expression; -} - -export interface ContinueStatement extends BaseNode { - type: AST_NODE_TYPES.ContinueStatement; - label: Identifier | null; -} - -export interface DebuggerStatement extends BaseNode { - type: AST_NODE_TYPES.DebuggerStatement; -} - -export interface Decorator extends BaseNode { - type: AST_NODE_TYPES.Decorator; - expression: LeftHandSideExpression; -} - -export interface DoWhileStatement extends BaseNode { - type: AST_NODE_TYPES.DoWhileStatement; - test: Expression; - body: Statement; -} - -export interface EmptyStatement extends BaseNode { - type: AST_NODE_TYPES.EmptyStatement; -} - -export interface ExportAllDeclaration extends BaseNode { - type: AST_NODE_TYPES.ExportAllDeclaration; - source: Expression | null; - exportKind: 'type' | 'value'; - exported: Identifier | null; -} - -export interface ExportDefaultDeclaration extends BaseNode { - type: AST_NODE_TYPES.ExportDefaultDeclaration; - declaration: ExportDeclaration | Expression; - exportKind: 'type' | 'value'; -} - -export interface ExportNamedDeclaration extends BaseNode { - type: AST_NODE_TYPES.ExportNamedDeclaration; - declaration: ExportDeclaration | null; - specifiers: ExportSpecifier[]; - source: Expression | null; - exportKind: 'type' | 'value'; -} - -export interface ExportSpecifier extends BaseNode { - type: AST_NODE_TYPES.ExportSpecifier; - local: Identifier; - exported: Identifier; -} - -export interface ExpressionStatement extends BaseNode { - type: AST_NODE_TYPES.ExpressionStatement; - expression: Expression; - directive?: string; -} - -export interface ForInStatement extends BaseNode { - type: AST_NODE_TYPES.ForInStatement; - left: ForInitialiser; - right: Expression; - body: Statement; -} - -export interface ForOfStatement extends BaseNode { - type: AST_NODE_TYPES.ForOfStatement; - left: ForInitialiser; - right: Expression; - body: Statement; - await: boolean; -} - -export interface ForStatement extends BaseNode { - type: AST_NODE_TYPES.ForStatement; - init: Expression | ForInitialiser | null; - test: Expression | null; - update: Expression | null; - body: Statement; -} - -export interface FunctionDeclaration extends FunctionDeclarationBase { - type: AST_NODE_TYPES.FunctionDeclaration; - body: BlockStatement; -} - -export interface FunctionExpression extends FunctionDeclarationBase { - type: AST_NODE_TYPES.FunctionExpression; - body: BlockStatement; -} - -export interface Identifier extends BaseNode { - type: AST_NODE_TYPES.Identifier; - name: string; - typeAnnotation?: TSTypeAnnotation; - optional?: boolean; - decorators?: Decorator[]; -} - -export interface IfStatement extends BaseNode { - type: AST_NODE_TYPES.IfStatement; - test: Expression; - consequent: Statement; - alternate: Statement | null; -} - -export interface ImportDeclaration extends BaseNode { - type: AST_NODE_TYPES.ImportDeclaration; - source: Literal; - specifiers: ImportClause[]; - importKind: 'type' | 'value'; -} - -export interface ImportDefaultSpecifier extends BaseNode { - type: AST_NODE_TYPES.ImportDefaultSpecifier; - local: Identifier; -} - -export interface ImportExpression extends BaseNode { - type: AST_NODE_TYPES.ImportExpression; - source: Expression; -} - -export interface ImportNamespaceSpecifier extends BaseNode { - type: AST_NODE_TYPES.ImportNamespaceSpecifier; - local: Identifier; -} - -export interface ImportSpecifier extends BaseNode { - type: AST_NODE_TYPES.ImportSpecifier; - local: Identifier; - imported: Identifier; -} - -export interface JSXAttribute extends BaseNode { - type: AST_NODE_TYPES.JSXAttribute; - name: JSXIdentifier | JSXNamespacedName; - value: Literal | JSXExpression | null; -} - -export interface JSXClosingElement extends BaseNode { - type: AST_NODE_TYPES.JSXClosingElement; - name: JSXTagNameExpression; -} - -export interface JSXClosingFragment extends BaseNode { - type: AST_NODE_TYPES.JSXClosingFragment; -} - -export interface JSXElement extends BaseNode { - type: AST_NODE_TYPES.JSXElement; - openingElement: JSXOpeningElement; - closingElement: JSXClosingElement | null; - children: JSXChild[]; -} - -export interface JSXEmptyExpression extends BaseNode { - type: AST_NODE_TYPES.JSXEmptyExpression; -} - -export interface JSXExpressionContainer extends BaseNode { - type: AST_NODE_TYPES.JSXExpressionContainer; - expression: Expression | JSXEmptyExpression; -} - -export interface JSXFragment extends BaseNode { - type: AST_NODE_TYPES.JSXFragment; - openingFragment: JSXOpeningFragment; - closingFragment: JSXClosingFragment; - children: JSXChild[]; -} - -export interface JSXIdentifier extends BaseNode { - type: AST_NODE_TYPES.JSXIdentifier; - name: string; -} - -export interface JSXMemberExpression extends BaseNode { - type: AST_NODE_TYPES.JSXMemberExpression; - object: JSXTagNameExpression; - property: JSXIdentifier; -} - -export interface JSXNamespacedName extends BaseNode { - type: AST_NODE_TYPES.JSXNamespacedName; - namespace: JSXIdentifier; - name: JSXIdentifier; -} - -export interface JSXOpeningElement extends BaseNode { - type: AST_NODE_TYPES.JSXOpeningElement; - typeParameters?: TSTypeParameterInstantiation; - selfClosing: boolean; - name: JSXTagNameExpression; - attributes: (JSXAttribute | JSXSpreadAttribute)[]; -} - -export interface JSXOpeningFragment extends BaseNode { - type: AST_NODE_TYPES.JSXOpeningFragment; -} - -export interface JSXSpreadAttribute extends BaseNode { - type: AST_NODE_TYPES.JSXSpreadAttribute; - argument: Expression; -} - -export interface JSXSpreadChild extends BaseNode { - type: AST_NODE_TYPES.JSXSpreadChild; - expression: Expression | JSXEmptyExpression; -} - -export interface JSXText extends BaseNode { - type: AST_NODE_TYPES.JSXText; - value: string; - raw: string; -} - -export interface LabeledStatement extends BaseNode { - type: AST_NODE_TYPES.LabeledStatement; - label: Identifier; - body: Statement; -} - -export interface LogicalExpression extends BinaryExpressionBase { - type: AST_NODE_TYPES.LogicalExpression; -} - -export interface MemberExpressionComputedName - extends MemberExpressionComputedNameBase { - type: AST_NODE_TYPES.MemberExpression; -} - -export interface MemberExpressionNonComputedName - extends MemberExpressionNonComputedNameBase { - type: AST_NODE_TYPES.MemberExpression; -} - -export interface MetaProperty extends BaseNode { - type: AST_NODE_TYPES.MetaProperty; - meta: Identifier; - property: Identifier; -} - -export interface MethodDefinitionComputedName - extends MethodDefinitionComputedNameBase { - type: AST_NODE_TYPES.MethodDefinition; -} - -export interface MethodDefinitionNonComputedName - extends MethodDefinitionNonComputedNameBase { - type: AST_NODE_TYPES.MethodDefinition; -} - -export interface NewExpression extends BaseNode { - type: AST_NODE_TYPES.NewExpression; - callee: LeftHandSideExpression; - arguments: Expression[]; - typeParameters?: TSTypeParameterInstantiation; -} - -export interface NumberLiteral extends LiteralBase { - type: AST_NODE_TYPES.Literal; - value: number; -} - -export interface NullLiteral extends LiteralBase { - type: AST_NODE_TYPES.Literal; - value: null; -} - -export interface ObjectExpression extends BaseNode { - type: AST_NODE_TYPES.ObjectExpression; - properties: ObjectLiteralElementLike[]; -} - -export interface ObjectPattern extends BaseNode { - type: AST_NODE_TYPES.ObjectPattern; - properties: (Property | RestElement)[]; - typeAnnotation?: TSTypeAnnotation; - optional?: boolean; - decorators?: Decorator[]; -} - -export interface Program extends BaseNode { - type: AST_NODE_TYPES.Program; - body: Statement[]; - sourceType: 'module' | 'script'; - comments?: Comment[]; - tokens?: Token[]; -} - -export interface PropertyComputedName extends PropertyBase { - key: PropertyNameComputed; - computed: true; -} - -export interface PropertyNonComputedName extends PropertyBase { - key: PropertyNameNonComputed; - computed: false; -} - -export interface RegExpLiteral extends LiteralBase { - type: AST_NODE_TYPES.Literal; - value: RegExp | null; -} - -export interface RestElement extends BaseNode { - type: AST_NODE_TYPES.RestElement; - argument: DestructuringPattern; - typeAnnotation?: TSTypeAnnotation; - optional?: boolean; - value?: AssignmentPattern; - decorators?: Decorator[]; -} - -export interface ReturnStatement extends BaseNode { - type: AST_NODE_TYPES.ReturnStatement; - argument: Expression | null; -} - -export interface SequenceExpression extends BaseNode { - type: AST_NODE_TYPES.SequenceExpression; - expressions: Expression[]; -} - -export interface SpreadElement extends BaseNode { - type: AST_NODE_TYPES.SpreadElement; - argument: Expression; -} - -export interface StringLiteral extends LiteralBase { - type: AST_NODE_TYPES.Literal; - value: string; -} - -export interface Super extends BaseNode { - type: AST_NODE_TYPES.Super; -} - -export interface SwitchCase extends BaseNode { - type: AST_NODE_TYPES.SwitchCase; - test: Expression | null; - consequent: Statement[]; -} - -export interface SwitchStatement extends BaseNode { - type: AST_NODE_TYPES.SwitchStatement; - discriminant: Expression; - cases: SwitchCase[]; -} - -export interface TaggedTemplateExpression extends BaseNode { - type: AST_NODE_TYPES.TaggedTemplateExpression; - typeParameters?: TSTypeParameterInstantiation; - tag: LeftHandSideExpression; - quasi: TemplateLiteral; -} - -export interface TemplateElement extends BaseNode { - type: AST_NODE_TYPES.TemplateElement; - value: { - raw: string; - cooked: string; - }; - tail: boolean; -} - -export interface TemplateLiteral extends BaseNode { - type: AST_NODE_TYPES.TemplateLiteral; - quasis: TemplateElement[]; - expressions: Expression[]; -} - -export interface ThisExpression extends BaseNode { - type: AST_NODE_TYPES.ThisExpression; -} - -export interface ThrowStatement extends BaseNode { - type: AST_NODE_TYPES.ThrowStatement; - argument: Statement | TSAsExpression | null; -} - -export interface TryStatement extends BaseNode { - type: AST_NODE_TYPES.TryStatement; - block: BlockStatement; - handler: CatchClause | null; - finalizer: BlockStatement | null; -} - -export interface TSAbstractClassPropertyComputedName - extends ClassPropertyComputedNameBase { - type: AST_NODE_TYPES.TSAbstractClassProperty; -} - -export interface TSAbstractClassPropertyNonComputedName - extends ClassPropertyNonComputedNameBase { - type: AST_NODE_TYPES.TSAbstractClassProperty; -} - -export interface TSAbstractKeyword extends BaseNode { - type: AST_NODE_TYPES.TSAbstractKeyword; -} - -export interface TSAbstractMethodDefinitionComputedName - extends MethodDefinitionComputedNameBase { - type: AST_NODE_TYPES.TSAbstractMethodDefinition; -} - -export interface TSAbstractMethodDefinitionNonComputedName - extends MethodDefinitionNonComputedNameBase { - type: AST_NODE_TYPES.TSAbstractMethodDefinition; -} - -export interface TSAnyKeyword extends BaseNode { - type: AST_NODE_TYPES.TSAnyKeyword; -} - -export interface TSArrayType extends BaseNode { - type: AST_NODE_TYPES.TSArrayType; - elementType: TypeNode; -} - -export interface TSAsExpression extends BaseNode { - type: AST_NODE_TYPES.TSAsExpression; - expression: Expression; - typeAnnotation: TypeNode; -} - -export interface TSAsyncKeyword extends BaseNode { - type: AST_NODE_TYPES.TSAsyncKeyword; -} - -export interface TSBigIntKeyword extends BaseNode { - type: AST_NODE_TYPES.TSBigIntKeyword; -} - -export interface TSBooleanKeyword extends BaseNode { - type: AST_NODE_TYPES.TSBooleanKeyword; -} - -export interface TSCallSignatureDeclaration extends FunctionSignatureBase { - type: AST_NODE_TYPES.TSCallSignatureDeclaration; -} - -export interface TSClassImplements extends TSHeritageBase { - type: AST_NODE_TYPES.TSClassImplements; -} - -export interface TSConditionalType extends BaseNode { - type: AST_NODE_TYPES.TSConditionalType; - checkType: TypeNode; - extendsType: TypeNode; - trueType: TypeNode; - falseType: TypeNode; -} - -export interface TSConstructorType extends FunctionSignatureBase { - type: AST_NODE_TYPES.TSConstructorType; - abstract: boolean; -} - -export interface TSConstructSignatureDeclaration extends FunctionSignatureBase { - type: AST_NODE_TYPES.TSConstructSignatureDeclaration; -} - -export interface TSDeclareFunction extends FunctionDeclarationBase { - type: AST_NODE_TYPES.TSDeclareFunction; -} - -export interface TSDeclareKeyword extends BaseNode { - type: AST_NODE_TYPES.TSDeclareKeyword; -} - -export interface TSEmptyBodyFunctionExpression extends FunctionDeclarationBase { - type: AST_NODE_TYPES.TSEmptyBodyFunctionExpression; - body: null; -} - -export interface TSEnumDeclaration extends BaseNode { - type: AST_NODE_TYPES.TSEnumDeclaration; - id: Identifier; - members: TSEnumMember[]; - const?: boolean; - declare?: boolean; - modifiers?: Modifier[]; -} - -/** - * this should only really happen in semantically invalid code (errors 1164 and 2452) - * - * VALID: - * enum Foo { ['a'] } - * - * INVALID: - * const x = 'a'; - * enum Foo { [x] } - * enum Bar { ['a' + 'b'] } - */ -export interface TSEnumMemberComputedName extends TSEnumMemberBase { - id: PropertyNameComputed; - computed: true; -} - -export interface TSEnumMemberNonComputedName extends TSEnumMemberBase { - id: PropertyNameNonComputed; - computed?: false; -} - -export interface TSExportAssignment extends BaseNode { - type: AST_NODE_TYPES.TSExportAssignment; - expression: Expression; -} - -export interface TSExportKeyword extends BaseNode { - type: AST_NODE_TYPES.TSExportKeyword; -} - -export interface TSExternalModuleReference extends BaseNode { - type: AST_NODE_TYPES.TSExternalModuleReference; - expression: Expression; -} - -export interface TSFunctionType extends FunctionSignatureBase { - type: AST_NODE_TYPES.TSFunctionType; -} - -export interface TSImportEqualsDeclaration extends BaseNode { - type: AST_NODE_TYPES.TSImportEqualsDeclaration; - id: Identifier; - moduleReference: EntityName | TSExternalModuleReference; - importKind: 'type' | 'value'; - isExport: boolean; -} - -export interface TSImportType extends BaseNode { - type: AST_NODE_TYPES.TSImportType; - isTypeOf: boolean; - parameter: TypeNode; - qualifier: EntityName | null; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface TSIndexedAccessType extends BaseNode { - type: AST_NODE_TYPES.TSIndexedAccessType; - objectType: TypeNode; - indexType: TypeNode; -} - -export interface TSIndexSignature extends BaseNode { - type: AST_NODE_TYPES.TSIndexSignature; - parameters: Parameter[]; - typeAnnotation?: TSTypeAnnotation; - readonly?: boolean; - accessibility?: Accessibility; - export?: boolean; - static?: boolean; -} - -export interface TSInferType extends BaseNode { - type: AST_NODE_TYPES.TSInferType; - typeParameter: TSTypeParameter; -} - -export interface TSInterfaceDeclaration extends BaseNode { - type: AST_NODE_TYPES.TSInterfaceDeclaration; - body: TSInterfaceBody; - id: Identifier; - typeParameters?: TSTypeParameterDeclaration; - extends?: TSInterfaceHeritage[]; - implements?: TSInterfaceHeritage[]; - abstract?: boolean; - declare?: boolean; -} - -export interface TSInterfaceBody extends BaseNode { - type: AST_NODE_TYPES.TSInterfaceBody; - body: TypeElement[]; -} - -export interface TSInterfaceHeritage extends TSHeritageBase { - type: AST_NODE_TYPES.TSInterfaceHeritage; -} - -export interface TSIntersectionType extends BaseNode { - type: AST_NODE_TYPES.TSIntersectionType; - types: TypeNode[]; -} - -export interface TSIntrinsicKeyword extends BaseNode { - type: AST_NODE_TYPES.TSIntrinsicKeyword; -} - -export interface TSLiteralType extends BaseNode { - type: AST_NODE_TYPES.TSLiteralType; - literal: LiteralExpression | UnaryExpression | UpdateExpression; -} - -export interface TSMappedType extends BaseNode { - type: AST_NODE_TYPES.TSMappedType; - typeParameter: TSTypeParameter; - readonly?: boolean | '-' | '+'; - optional?: boolean | '-' | '+'; - typeAnnotation?: TypeNode; - nameType: TypeNode | null; -} - -export interface TSMethodSignatureComputedName extends TSMethodSignatureBase { - key: PropertyNameComputed; - computed: true; -} - -export interface TSMethodSignatureNonComputedName - extends TSMethodSignatureBase { - key: PropertyNameNonComputed; - computed: false; -} - -export interface TSModuleBlock extends BaseNode { - type: AST_NODE_TYPES.TSModuleBlock; - body: Statement[]; -} - -export interface TSModuleDeclaration extends BaseNode { - type: AST_NODE_TYPES.TSModuleDeclaration; - id: Identifier | Literal; - body?: TSModuleBlock | TSModuleDeclaration; - global?: boolean; - declare?: boolean; - modifiers?: Modifier[]; -} - -export interface TSNamedTupleMember extends BaseNode { - type: AST_NODE_TYPES.TSNamedTupleMember; - elementType: TypeNode; - label: Identifier; - optional: boolean; -} - -export interface TSNamespaceExportDeclaration extends BaseNode { - type: AST_NODE_TYPES.TSNamespaceExportDeclaration; - id: Identifier; -} - -export interface TSNeverKeyword extends BaseNode { - type: AST_NODE_TYPES.TSNeverKeyword; -} - -export interface TSNonNullExpression extends BaseNode { - type: AST_NODE_TYPES.TSNonNullExpression; - expression: Expression; -} - -export interface TSNullKeyword extends BaseNode { - type: AST_NODE_TYPES.TSNullKeyword; -} - -export interface TSNumberKeyword extends BaseNode { - type: AST_NODE_TYPES.TSNumberKeyword; -} - -export interface TSObjectKeyword extends BaseNode { - type: AST_NODE_TYPES.TSObjectKeyword; -} - -export interface TSOptionalType extends BaseNode { - type: AST_NODE_TYPES.TSOptionalType; - typeAnnotation: TypeNode; -} - -export interface TSParameterProperty extends BaseNode { - type: AST_NODE_TYPES.TSParameterProperty; - accessibility?: Accessibility; - readonly?: boolean; - static?: boolean; - export?: boolean; - parameter: AssignmentPattern | BindingName | RestElement; - decorators?: Decorator[]; -} - -export interface TSParenthesizedType extends BaseNode { - type: AST_NODE_TYPES.TSParenthesizedType; - typeAnnotation: TypeNode; -} - -export interface TSPropertySignatureComputedName - extends TSPropertySignatureBase { - key: PropertyNameComputed; - computed: true; -} - -export interface TSPropertySignatureNonComputedName - extends TSPropertySignatureBase { - key: PropertyNameNonComputed; - computed: false; -} - -export interface TSPublicKeyword extends BaseNode { - type: AST_NODE_TYPES.TSPublicKeyword; -} - -export interface TSPrivateKeyword extends BaseNode { - type: AST_NODE_TYPES.TSPrivateKeyword; -} - -export interface TSProtectedKeyword extends BaseNode { - type: AST_NODE_TYPES.TSProtectedKeyword; -} - -export interface TSQualifiedName extends BaseNode { - type: AST_NODE_TYPES.TSQualifiedName; - left: EntityName; - right: Identifier; -} - -export interface TSReadonlyKeyword extends BaseNode { - type: AST_NODE_TYPES.TSReadonlyKeyword; -} - -export interface TSRestType extends BaseNode { - type: AST_NODE_TYPES.TSRestType; - typeAnnotation: TypeNode; -} - -export interface TSStaticKeyword extends BaseNode { - type: AST_NODE_TYPES.TSStaticKeyword; -} - -export interface TSStringKeyword extends BaseNode { - type: AST_NODE_TYPES.TSStringKeyword; -} - -export interface TSSymbolKeyword extends BaseNode { - type: AST_NODE_TYPES.TSSymbolKeyword; -} - -export interface TSTemplateLiteralType extends BaseNode { - type: AST_NODE_TYPES.TSTemplateLiteralType; - quasis: TemplateElement[]; - types: TypeNode[]; -} - -export interface TSThisType extends BaseNode { - type: AST_NODE_TYPES.TSThisType; -} - -export interface TSTupleType extends BaseNode { - type: AST_NODE_TYPES.TSTupleType; - elementTypes: TypeNode[]; -} - -export interface TSTypeAliasDeclaration extends BaseNode { - type: AST_NODE_TYPES.TSTypeAliasDeclaration; - id: Identifier; - typeAnnotation: TypeNode; - declare?: boolean; - typeParameters?: TSTypeParameterDeclaration; -} - -export interface TSTypeAnnotation extends BaseNode { - type: AST_NODE_TYPES.TSTypeAnnotation; - typeAnnotation: TypeNode; -} - -export interface TSTypeAssertion extends BaseNode { - type: AST_NODE_TYPES.TSTypeAssertion; - typeAnnotation: TypeNode; - expression: Expression; -} - -export interface TSTypeLiteral extends BaseNode { - type: AST_NODE_TYPES.TSTypeLiteral; - members: TypeElement[]; -} - -export interface TSTypeOperator extends BaseNode { - type: AST_NODE_TYPES.TSTypeOperator; - operator: 'keyof' | 'unique' | 'readonly'; - typeAnnotation?: TypeNode; -} - -export interface TSTypeParameter extends BaseNode { - type: AST_NODE_TYPES.TSTypeParameter; - name: Identifier; - constraint?: TypeNode; - default?: TypeNode; -} - -export interface TSTypeParameterDeclaration extends BaseNode { - type: AST_NODE_TYPES.TSTypeParameterDeclaration; - params: TSTypeParameter[]; -} - -export interface TSTypeParameterInstantiation extends BaseNode { - type: AST_NODE_TYPES.TSTypeParameterInstantiation; - params: TypeNode[]; -} - -export interface TSTypePredicate extends BaseNode { - type: AST_NODE_TYPES.TSTypePredicate; - asserts: boolean; - parameterName: Identifier | TSThisType; - typeAnnotation: TSTypeAnnotation | null; -} - -export interface TSTypeQuery extends BaseNode { - type: AST_NODE_TYPES.TSTypeQuery; - exprName: EntityName; -} - -export interface TSTypeReference extends BaseNode { - type: AST_NODE_TYPES.TSTypeReference; - typeName: EntityName; - typeParameters?: TSTypeParameterInstantiation; -} - -export interface TSUndefinedKeyword extends BaseNode { - type: AST_NODE_TYPES.TSUndefinedKeyword; -} - -export interface TSUnionType extends BaseNode { - type: AST_NODE_TYPES.TSUnionType; - types: TypeNode[]; -} - -export interface TSUnknownKeyword extends BaseNode { - type: AST_NODE_TYPES.TSUnknownKeyword; -} - -export interface TSVoidKeyword extends BaseNode { - type: AST_NODE_TYPES.TSVoidKeyword; -} - -export interface UpdateExpression extends UnaryExpressionBase { - type: AST_NODE_TYPES.UpdateExpression; - operator: '++' | '--'; -} - -export interface UnaryExpression extends UnaryExpressionBase { - type: AST_NODE_TYPES.UnaryExpression; - operator: '+' | '-' | '!' | '~' | 'delete' | 'void' | 'typeof'; -} - -export interface VariableDeclaration extends BaseNode { - type: AST_NODE_TYPES.VariableDeclaration; - // NOTE - this is not guaranteed to have any elements in it. i.e. `const;` - declarations: VariableDeclarator[]; - kind: 'let' | 'const' | 'var'; - declare?: boolean; -} - -export interface VariableDeclarator extends BaseNode { - type: AST_NODE_TYPES.VariableDeclarator; - id: BindingName; - init: Expression | null; - definite?: boolean; -} - -export interface WhileStatement extends BaseNode { - type: AST_NODE_TYPES.WhileStatement; - test: Expression; - body: Statement; -} - -export interface WithStatement extends BaseNode { - type: AST_NODE_TYPES.WithStatement; - object: Expression; - body: Statement; -} - -export interface YieldExpression extends BaseNode { - type: AST_NODE_TYPES.YieldExpression; - delegate: boolean; - argument?: Expression; -} +export * as TSESTree from './ast-spec'; diff --git a/packages/types/tools/copy-ast-spec.ts b/packages/types/tools/copy-ast-spec.ts new file mode 100644 index 000000000000..ed231195eeb4 --- /dev/null +++ b/packages/types/tools/copy-ast-spec.ts @@ -0,0 +1,59 @@ +import chlidProcess from 'child_process'; +import fs from 'fs'; +import path from 'path'; +import { promisify } from 'util'; + +const readFile = promisify(fs.readFile); +const writeFile = promisify(fs.writeFile); +const execAsync = promisify(chlidProcess.exec); + +const AST_SPEC_PATH = path.resolve(__dirname, '../../ast-spec'); +const OUTPUT_PATH = path.join(path.resolve(__dirname, '../src/')); + +// ensure the package is built +chlidProcess.execSync('yarn build', { cwd: AST_SPEC_PATH }); + +const HEADER = `\ +/********************************************** + * DO NOT MODIFY THIS FILE MANUALLY * + * * + * THIS FILE HAS BEEN COPIED FROM ast-spec. * + * ANY CHANGES WILL BE LOST ON THE NEXT BUILD * + * * + * MAKE CHANGES TO ast-spec AND THEN RUN * + * yarn build * + **********************************************/ + +`; + +async function copyFile( + folderName: string, + fileName: string, + transformer: (code: string) => string = (s): string => s, +): Promise { + const code = await readFile( + path.join(AST_SPEC_PATH, folderName, fileName), + 'utf-8', + ); + + const transformedCode = transformer(code); + + const outpath = path.join(OUTPUT_PATH, fileName); + await writeFile(outpath, HEADER + transformedCode, { + encoding: 'utf-8', + }); + + await execAsync(`yarn prettier --write ${outpath}`); + + console.log('Copied', fileName); +} + +async function main(): Promise { + await Promise.all([ + copyFile('dist', 'ast-spec.ts', code => + code.replace(/export declare enum/g, 'export enum'), + ), + ]); +} + +void main(); diff --git a/packages/types/tsconfig.build.json b/packages/types/tsconfig.build.json index 215a0282df2b..b9ac3e1b9770 100644 --- a/packages/types/tsconfig.build.json +++ b/packages/types/tsconfig.build.json @@ -6,5 +6,6 @@ "rootDir": "./src", "resolveJsonModule": true }, - "include": ["src", "typings"] + "include": ["src", "typings"], + "references": [] } diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index 9cea515ba6b2..d1305674c8bb 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -4,5 +4,6 @@ "composite": false, "rootDir": "." }, - "include": ["src", "typings", "tests", "tools"] + "include": ["src", "typings", "tests", "tools"], + "references": [] } diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 4f65000f6bc6..61d6febc6d67 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -34,7 +34,7 @@ "build": "tsc -b tsconfig.build.json", "postbuild": "downlevel-dts dist _ts3.4/dist", "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", + "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", "test": "jest --coverage", diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index e0c34e513ec9..aad29f9b1467 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1987,7 +1987,7 @@ export class Converter { let regex = null; try { regex = new RegExp(pattern, flags); - } catch (exception) { + } catch (exception: unknown) { regex = null; } @@ -2166,7 +2166,7 @@ export class Converter { range: [start, end], }); } else { - return this.createNode(node, { + return this.createNode(node, { type: AST_NODE_TYPES.Literal, value: unescapeStringLiteralText(text), raw: text, diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 594ca4ce55b1..e4a90301784d 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -31,7 +31,7 @@ "build": "tsc -b tsconfig.build.json", "postbuild": "downlevel-dts dist _ts3.4/dist", "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", + "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", "test": "jest --coverage", diff --git a/tests/integration/docker-compose.yml b/tests/integration/docker-compose.yml index abe82a67cfb6..b1df8c206699 100644 --- a/tests/integration/docker-compose.yml +++ b/tests/integration/docker-compose.yml @@ -22,9 +22,11 @@ services: - ../../packages/types/:/usr/types - /usr/types/tests - ../../packages/visitor-keys/:/usr/visitor-keys - - /usr/types/visitor-keys + - /usr/visitor-keys/tests - ../../packages/scope-manager/:/usr/scope-manager - - /usr/types/scope-manager + - /usr/scope-manager/tests + - ../../packages/ast-spec/:/usr/ast-spec + - /usr/ast-spec/tests # Runtime link to all the specific integration test files, so that most updates don't require a rebuild. - ./fixtures/typescript-and-tslint-plugins-together:/usr/linked @@ -47,9 +49,11 @@ services: - ../../packages/types/:/usr/types - /usr/types/tests - ../../packages/visitor-keys/:/usr/visitor-keys - - /usr/types/visitor-keys + - /usr/visitor-keys/tests - ../../packages/scope-manager/:/usr/scope-manager - - /usr/types/scope-manager + - /usr/scope-manager/tests + - ../../packages/ast-spec/:/usr/ast-spec + - /usr/ast-spec/tests # Runtime link to all the specific integration test files, so that most updates don't require a rebuild. - ./fixtures/vue-sfc:/usr/linked @@ -72,9 +76,11 @@ services: - ../../packages/types/:/usr/types - /usr/types/tests - ../../packages/visitor-keys/:/usr/visitor-keys - - /usr/types/visitor-keys + - /usr/visitor-keys/tests - ../../packages/scope-manager/:/usr/scope-manager - - /usr/types/scope-manager + - /usr/scope-manager/tests + - ../../packages/ast-spec/:/usr/ast-spec + - /usr/ast-spec/tests # Runtime link to all the specific integration test files, so that most updates don't require a rebuild. - ./fixtures/vue-jsx:/usr/linked @@ -97,9 +103,11 @@ services: - ../../packages/types/:/usr/types - /usr/types/tests - ../../packages/visitor-keys/:/usr/visitor-keys - - /usr/types/visitor-keys + - /usr/visitor-keys/tests - ../../packages/scope-manager/:/usr/scope-manager - - /usr/types/scope-manager + - /usr/scope-manager/tests + - ../../packages/ast-spec/:/usr/ast-spec + - /usr/ast-spec/tests # Runtime link to all the specific integration test files, so that most updates don't require a rebuild. - ./fixtures/recommended-does-not-require-program:/usr/linked @@ -122,9 +130,11 @@ services: - ../../packages/types/:/usr/types - /usr/types/tests - ../../packages/visitor-keys/:/usr/visitor-keys - - /usr/types/visitor-keys + - /usr/visitor-keys/tests - ../../packages/scope-manager/:/usr/scope-manager - - /usr/types/scope-manager + - /usr/scope-manager/tests + - ../../packages/ast-spec/:/usr/ast-spec + - /usr/ast-spec/tests # Runtime link to all the specific integration test files, so that most updates don't require a rebuild. - ./fixtures/markdown:/usr/linked @@ -147,8 +157,10 @@ services: - ../../packages/types/:/usr/types - /usr/types/tests - ../../packages/visitor-keys/:/usr/visitor-keys - - /usr/types/visitor-keys + - /usr/visitor-keys/tests - ../../packages/scope-manager/:/usr/scope-manager - - /usr/types/scope-manager + - /usr/scope-manager/tests + - ../../packages/ast-spec/:/usr/ast-spec + - /usr/ast-spec/tests # Runtime link to all the specific integration test files, so that most updates don't require a rebuild. - ./fixtures/eslint-v6:/usr/linked diff --git a/tests/integration/fixtures/eslint-v6/test.sh b/tests/integration/fixtures/eslint-v6/test.sh index ab184f9ceb15..e2c988854164 100755 --- a/tests/integration/fixtures/eslint-v6/test.sh +++ b/tests/integration/fixtures/eslint-v6/test.sh @@ -9,6 +9,7 @@ npm install npm install eslint@6.0.0 # Use the local volumes for our own packages +npm install $(npm pack /usr/ast-spec | tail -1) npm install $(npm pack /usr/types | tail -1) npm install $(npm pack /usr/visitor-keys | tail -1) npm install $(npm pack /usr/scope-manager | tail -1) diff --git a/tests/integration/fixtures/markdown/test.sh b/tests/integration/fixtures/markdown/test.sh index 30cd435eaac7..91e4c4f0a045 100755 --- a/tests/integration/fixtures/markdown/test.sh +++ b/tests/integration/fixtures/markdown/test.sh @@ -8,6 +8,7 @@ node /usr/utils/generate-package-json.js npm install # Use the local volumes for our own packages +npm install $(npm pack /usr/ast-spec | tail -1) npm install $(npm pack /usr/types | tail -1) npm install $(npm pack /usr/visitor-keys | tail -1) npm install $(npm pack /usr/scope-manager | tail -1) diff --git a/tests/integration/fixtures/recommended-does-not-require-program/test.sh b/tests/integration/fixtures/recommended-does-not-require-program/test.sh index cfe4d0e6d570..ea25b6d7292d 100755 --- a/tests/integration/fixtures/recommended-does-not-require-program/test.sh +++ b/tests/integration/fixtures/recommended-does-not-require-program/test.sh @@ -8,6 +8,7 @@ node /usr/utils/generate-package-json.js npm install # Use the local volumes for our own packages +npm install $(npm pack /usr/ast-spec | tail -1) npm install $(npm pack /usr/types | tail -1) npm install $(npm pack /usr/visitor-keys | tail -1) npm install $(npm pack /usr/scope-manager | tail -1) diff --git a/tests/integration/fixtures/typescript-and-tslint-plugins-together/test.sh b/tests/integration/fixtures/typescript-and-tslint-plugins-together/test.sh index 6abbeb42aa61..27c243e38081 100755 --- a/tests/integration/fixtures/typescript-and-tslint-plugins-together/test.sh +++ b/tests/integration/fixtures/typescript-and-tslint-plugins-together/test.sh @@ -8,6 +8,7 @@ node /usr/utils/generate-package-json.js npm install # Use the local volumes for our own packages +npm install $(npm pack /usr/ast-spec | tail -1) npm install $(npm pack /usr/types | tail -1) npm install $(npm pack /usr/visitor-keys | tail -1) npm install $(npm pack /usr/scope-manager | tail -1) diff --git a/tests/integration/fixtures/vue-jsx/test.sh b/tests/integration/fixtures/vue-jsx/test.sh index 96376fb0f83c..fc41933a87ec 100755 --- a/tests/integration/fixtures/vue-jsx/test.sh +++ b/tests/integration/fixtures/vue-jsx/test.sh @@ -8,6 +8,7 @@ node /usr/utils/generate-package-json.js npm install # Use the local volumes for our own packages +npm install $(npm pack /usr/ast-spec | tail -1) npm install $(npm pack /usr/types | tail -1) npm install $(npm pack /usr/visitor-keys | tail -1) npm install $(npm pack /usr/scope-manager | tail -1) diff --git a/tests/integration/fixtures/vue-sfc/test.sh b/tests/integration/fixtures/vue-sfc/test.sh index 80f7cfe4adf4..e22a51a62c62 100755 --- a/tests/integration/fixtures/vue-sfc/test.sh +++ b/tests/integration/fixtures/vue-sfc/test.sh @@ -8,6 +8,7 @@ node /usr/utils/generate-package-json.js npm install # Use the local volumes for our own packages +npm install $(npm pack /usr/ast-spec | tail -1) npm install $(npm pack /usr/types | tail -1) npm install $(npm pack /usr/visitor-keys | tail -1) npm install $(npm pack /usr/scope-manager | tail -1) diff --git a/yarn.lock b/yarn.lock index 6d63f30fdd4b..589b6e6b4e17 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1638,6 +1638,36 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" +"@microsoft/api-extractor-model@7.12.2": + version "7.12.2" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.12.2.tgz#d48b35e8ed20643b1c19d7a4f80c90c42dc7d1d8" + integrity sha512-EU+U09Mj65zUH0qwPF4PFJiL6Y+PQQE/RRGEHEDGJJzab/mRQDpKOyrzSdb00xvcd/URehIHJqC55cY2Y4jGOA== + dependencies: + "@microsoft/tsdoc" "0.12.24" + "@rushstack/node-core-library" "3.36.0" + +"@microsoft/api-extractor@^7.13.2": + version "7.13.2" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.13.2.tgz#c44762d27aee05c4da16c03fc8786bd0fa31c7eb" + integrity sha512-2fD0c8OxZW+e6NTaxbtrdNxXVuX7aqil3+cqig3pKsHymvUuRJVCEAcAJmZrJ/ENqYXNiB265EyqOT6VxbMysw== + dependencies: + "@microsoft/api-extractor-model" "7.12.2" + "@microsoft/tsdoc" "0.12.24" + "@rushstack/node-core-library" "3.36.0" + "@rushstack/rig-package" "0.2.10" + "@rushstack/ts-command-line" "4.7.8" + colors "~1.2.1" + lodash "~4.17.15" + resolve "~1.17.0" + semver "~7.3.0" + source-map "~0.6.1" + typescript "~4.1.3" + +"@microsoft/tsdoc@0.12.24": + version "0.12.24" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.12.24.tgz#30728e34ebc90351dd3aff4e18d038eed2c3e098" + integrity sha512-Mfmij13RUTmHEMi9vRUhMXD7rnGR2VvxeNYtaGtaJ4redwwjT4UXYJ+nzmVJF7hhd4pn/Fx5sncDKxMVFJSWPg== + "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -1781,6 +1811,39 @@ dependencies: "@types/node" ">= 8" +"@rushstack/node-core-library@3.36.0": + version "3.36.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.36.0.tgz#95dace39d763c8695d6607c421f95c6ac65b0ed4" + integrity sha512-bID2vzXpg8zweXdXgQkKToEdZwVrVCN9vE9viTRk58gqzYaTlz4fMId6V3ZfpXN6H0d319uGi2KDlm+lUEeqCg== + dependencies: + "@types/node" "10.17.13" + colors "~1.2.1" + fs-extra "~7.0.1" + import-lazy "~4.0.0" + jju "~1.4.0" + resolve "~1.17.0" + semver "~7.3.0" + timsort "~0.3.0" + z-schema "~3.18.3" + +"@rushstack/rig-package@0.2.10": + version "0.2.10" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.10.tgz#e861eb94953d8c22c509dc3e9d91d6f337eab3cd" + integrity sha512-WXYerEJEPf8bS3ruqfM57NnwXtA7ehn8VJjLjrjls6eSduE5CRydcob/oBTzlHKsQ7N196XKlqQl9P6qIyYG2A== + dependencies: + resolve "~1.17.0" + strip-json-comments "~3.1.1" + +"@rushstack/ts-command-line@4.7.8": + version "4.7.8" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.7.8.tgz#3aa77cf544c571be3206fc2bcba20c7a096ed254" + integrity sha512-8ghIWhkph7NnLCMDJtthpsb7TMOsVGXVDvmxjE/CeklTqjbbUFBjGXizJfpbEkRQTELuZQ2+vGn7sGwIWKN2uA== + dependencies: + "@types/argparse" "1.0.38" + argparse "~1.0.9" + colors "~1.2.1" + string-argv "~0.3.1" + "@sinonjs/commons@^1.7.0": version "1.8.2" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.2.tgz#858f5c4b48d80778fde4b9d541f27edc0d56488b" @@ -1795,6 +1858,11 @@ dependencies: "@sinonjs/commons" "^1.7.0" +"@types/argparse@1.0.38": + version "1.0.38" + resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9" + integrity sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== + "@types/babel__code-frame@*", "@types/babel__code-frame@^7.0.2": version "7.0.2" resolved "https://registry.yarnpkg.com/@types/babel__code-frame/-/babel__code-frame-7.0.2.tgz#e0c0f1648cbc09a9d4e5b4ed2ae9a6f7c8f5aeb0" @@ -1945,6 +2013,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.41.tgz#d0b939d94c1d7bd53d04824af45f1139b8c45615" integrity sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g== +"@types/node@10.17.13": + version "10.17.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" + integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== + "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -2206,7 +2279,7 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@^1.0.7: +argparse@^1.0.7, argparse@~1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -2861,6 +2934,11 @@ colorette@^1.2.1: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== +colors@~1.2.1: + version "1.2.5" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.5.tgz#89c7ad9a374bc030df8013241f68136ed8835afc" + integrity sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg== + columnify@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" @@ -2876,7 +2954,7 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.12.1: +commander@^2.12.1, commander@^2.7.1: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -3762,6 +3840,11 @@ eslint-plugin-jest@^24.1.3: dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" +eslint-plugin-simple-import-sort@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-7.0.0.tgz#a1dad262f46d2184a90095a60c66fef74727f0f8" + integrity sha512-U3vEDB5zhYPNfxT5TYR7u01dboFZp+HNpnGhkDB2g/2E4wZ/g1Q9Ton8UwCLfRV9yAKyYqDh62oHOamvkFxsvw== + eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -4241,6 +4324,15 @@ fs-extra@^9.0.0, fs-extra@^9.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@~7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-minipass@^1.2.5: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" @@ -4776,6 +4868,11 @@ import-from@3.0.0: dependencies: resolve-from "^5.0.0" +import-lazy@~4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" + integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== + import-local@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" @@ -5619,6 +5716,11 @@ jest@^26.6.3: import-local "^3.0.2" jest-cli "^26.6.3" +jju@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a" + integrity sha1-o6vicYryQaKykE+EpiWXDzia4yo= + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -5989,11 +6091,16 @@ lodash.flatten@~4.4.0: resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= -lodash.get@^4.4.2: +lodash.get@^4.0.0, lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= +lodash.isequal@^4.0.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= + lodash.ismatch@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" @@ -6034,7 +6141,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@4.x, lodash@^4.11.2, lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.2.1: +lodash@4.x, lodash@^4.11.2, lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.2.1, lodash@~4.17.15: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -7664,6 +7771,13 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.18 is-core-module "^2.1.0" path-parse "^1.0.6" +resolve@~1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -7792,7 +7906,7 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.3.5, 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, semver@~7.3.0: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -8111,7 +8225,7 @@ stream-shift@^1.0.0: resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== -string-argv@0.3.1: +string-argv@0.3.1, string-argv@~0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== @@ -8277,7 +8391,7 @@ strip-json-comments@3.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1, strip-json-comments@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -8430,6 +8544,11 @@ through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= +timsort@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" + integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -8681,7 +8800,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.2.2, "typescript@>=3.3.1 <4.3.0", typescript@^4.1.0-dev.20201026: +typescript@*, typescript@4.2.2, "typescript@>=3.3.1 <4.3.0", typescript@^4.1.0-dev.20201026, typescript@~4.1.3: version "4.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.2.tgz#1450f020618f872db0ea17317d16d8da8ddb8c4c" integrity sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ== @@ -8845,6 +8964,11 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" +validator@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-8.2.0.tgz#3c1237290e37092355344fef78c231249dab77b9" + integrity sha512-Yw5wW34fSv5spzTXNkokD6S6/Oq92d8q/t14TqsS3fAiA1RYnxSFSIZ+CY3n6PGGRCq5HhJTSepQvFUS2QUDxA== + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -9185,3 +9309,14 @@ yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +z-schema@~3.18.3: + version "3.18.4" + resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-3.18.4.tgz#ea8132b279533ee60be2485a02f7e3e42541a9a2" + integrity sha512-DUOKC/IhbkdLKKiV89gw9DUauTV8U/8yJl1sjf6MtDmzevLKOF2duNJ495S3MFVjqZarr+qNGCPbkg4mu4PpLw== + dependencies: + lodash.get "^4.0.0" + lodash.isequal "^4.0.0" + validator "^8.0.0" + optionalDependencies: + commander "^2.7.1" From 89f4d439a531d378ab1f5385e7c34b7c8b382461 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 May 2021 22:27:49 -0700 Subject: [PATCH 101/473] chore: bump @babel/types from 7.13.14 to 7.14.1 (#3345) Bumps [@babel/types](https://github.com/babel/babel/tree/HEAD/packages/babel-types) from 7.13.14 to 7.14.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.1/packages/babel-types) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 589b6e6b4e17..f660ec1e4f82 100644 --- a/yarn.lock +++ b/yarn.lock @@ -143,10 +143,10 @@ dependencies: "@babel/types" "^7.12.13" -"@babel/helper-validator-identifier@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" - integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== +"@babel/helper-validator-identifier@^7.12.11", "@babel/helper-validator-identifier@^7.14.0": + version "7.14.0" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz#d26cad8a47c65286b15df1547319a5d0bcf27288" + integrity sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A== "@babel/helper-validator-option@^7.12.17": version "7.12.17" @@ -292,12 +292,11 @@ lodash "^4.17.19" "@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.13.14" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.14.tgz#c35a4abb15c7cd45a2746d78ab328e362cbace0d" - integrity sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ== + version "7.14.1" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.1.tgz#095bd12f1c08ab63eff6e8f7745fa7c9cc15a9db" + integrity sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA== dependencies: - "@babel/helper-validator-identifier" "^7.12.11" - lodash "^4.17.19" + "@babel/helper-validator-identifier" "^7.14.0" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": From c3bc0bbe408a01279705bdc6044cba137c69a871 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 May 2021 22:28:05 -0700 Subject: [PATCH 102/473] chore: bump eslint-plugin-jest from 24.3.5 to 24.3.6 (#3313) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.3.5 to 24.3.6. - [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.5...v24.3.6) 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 f660ec1e4f82..df72078fe908 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3833,9 +3833,9 @@ eslint-plugin-import@^2.22.0: tsconfig-paths "^3.9.0" eslint-plugin-jest@^24.1.3: - version "24.3.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.5.tgz#71f0b580f87915695c286c3f0eb88cf23664d044" - integrity sha512-XG4rtxYDuJykuqhsOqokYIR84/C8pRihRtEpVskYLbIIKGwPNW2ySxdctuVzETZE+MbF/e7wmsnbNVpzM0rDug== + version "24.3.6" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.6.tgz#5f0ca019183c3188c5ad3af8e80b41de6c8e9173" + integrity sha512-WOVH4TIaBLIeCX576rLcOgjNXqP+jNlCiEmRgFTfQtJ52DpwnIQKAVGlGPAN7CZ33bW6eNfHD6s8ZbEUTQubJg== dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" From ddfab95841814351db0bf3d89281a964ee9daa43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 May 2021 22:28:14 -0700 Subject: [PATCH 103/473] chore: bump @types/node from 14.14.41 to 15.0.2 (#3351) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.41 to 15.0.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f93f8088afdc..4464751bb450 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "@types/jest-specific-snapshot": "^0.5.5", "@types/lodash": "^4.14.149", "@types/marked": "^2.0.0", - "@types/node": "^14.14.27", + "@types/node": "^15.0.2", "@types/node-fetch": "^2.5.10", "@types/prettier": "^2.2.1", "@types/rimraf": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index df72078fe908..ab703f24418c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2007,10 +2007,15 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@>= 8", "@types/node@^14.14.27": - version "14.14.41" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.41.tgz#d0b939d94c1d7bd53d04824af45f1139b8c45615" - integrity sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g== +"@types/node@*", "@types/node@>= 8", "@types/node@^15.0.2": + version "15.0.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.0.2.tgz#51e9c0920d1b45936ea04341aa3e2e58d339fb67" + integrity sha512-p68+a+KoxpoB47015IeYZYRrdqMUcpbK8re/zpFB8Ld46LHC1lPEbp3EXgkEhAYEcPvjJF6ZO+869SQ0aH1dcA== + +"@types/node@10.17.13": + version "10.17.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" + integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== "@types/node@10.17.13": version "10.17.13" From 87521a024103bc5fc643861649bee9a288f55b7b Mon Sep 17 00:00:00 2001 From: YeonJuan Date: Mon, 10 May 2021 02:05:05 +0900 Subject: [PATCH 104/473] fix(scope-manager): fix visiting TSAsExpression in assignment (#3355) --- packages/eslint-plugin/tests/eslint-rules/no-undef.test.ts | 7 +++++++ packages/scope-manager/src/referencer/Referencer.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/tests/eslint-rules/no-undef.test.ts b/packages/eslint-plugin/tests/eslint-rules/no-undef.test.ts index 020a4e715d67..4f2c9702411b 100644 --- a/packages/eslint-plugin/tests/eslint-rules/no-undef.test.ts +++ b/packages/eslint-plugin/tests/eslint-rules/no-undef.test.ts @@ -139,6 +139,13 @@ function predicate(arg: any): asserts arg is T { throw 'oops'; } } + `, + ` +interface ITest { + attr: string; +} +let test: unknown; +(test as ITest) = { attr: '' }; `, { code: ` diff --git a/packages/scope-manager/src/referencer/Referencer.ts b/packages/scope-manager/src/referencer/Referencer.ts index b0e7557ee7eb..ef8bb513822f 100644 --- a/packages/scope-manager/src/referencer/Referencer.ts +++ b/packages/scope-manager/src/referencer/Referencer.ts @@ -320,7 +320,7 @@ class Referencer extends Visitor { case AST_NODE_TYPES.TSAsExpression: case AST_NODE_TYPES.TSTypeAssertion: // explicitly visit the type annotation - this.visit(left.typeAnnotation); + this.visitType(left.typeAnnotation); // intentional fallthrough case AST_NODE_TYPES.TSNonNullExpression: // unwrap the expression From 2b75c11d69bee88ca0cb77d7efd32b8d0387e6b3 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Mon, 10 May 2021 03:21:35 +1000 Subject: [PATCH 105/473] feat(experimental-utils): Include `getCwd()` in `RuleContext` type (#3308) --- packages/experimental-utils/src/ts-eslint/Rule.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index d74af833121e..19f457201ef1 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -211,6 +211,14 @@ interface RuleContext< */ getDeclaredVariables(node: TSESTree.Node): Scope.Variable[]; + /** + * Returns the current working directory passed to Linter. + * It is a path to a directory that should be considered as the current working directory. + * This was added in v6.6.0 + * @since 6.6.0 + */ + getCwd?(): string; + /** * Returns the filename associated with the source. */ From 299d86f470ee950bbcb6fb77552e90288ecf712a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 9 May 2021 21:14:38 -0700 Subject: [PATCH 106/473] chore: bump hosted-git-info from 2.8.8 to 2.8.9 (#3364) Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9. - [Release notes](https://github.com/npm/hosted-git-info/releases) - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md) - [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index ab703f24418c..3f720199bc2c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2017,11 +2017,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== -"@types/node@10.17.13": - version "10.17.13" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" - integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== - "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -4750,9 +4745,9 @@ homedir-polyfill@^1.0.1: parse-passwd "^1.0.0" hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: - version "2.8.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" - integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== html-encoding-sniffer@^2.0.1: version "2.0.1" From 18d8151e54f0ee7015ed4a4d83c0a7bd8887396c Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 10 May 2021 17:03:06 +0000 Subject: [PATCH 107/473] chore: publish v4.23.0 --- CHANGELOG.md | 17 +++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 11 +++++++++++ packages/ast-spec/package.json | 2 +- packages/eslint-plugin-internal/CHANGELOG.md | 11 +++++++++++ packages/eslint-plugin-internal/package.json | 4 ++-- packages/eslint-plugin-tslint/CHANGELOG.md | 11 +++++++++++ packages/eslint-plugin-tslint/package.json | 6 +++--- packages/eslint-plugin/CHANGELOG.md | 16 ++++++++++++++++ packages/eslint-plugin/package.json | 6 +++--- packages/experimental-utils/CHANGELOG.md | 12 ++++++++++++ packages/experimental-utils/package.json | 8 ++++---- packages/parser/CHANGELOG.md | 11 +++++++++++ packages/parser/package.json | 10 +++++----- packages/scope-manager/CHANGELOG.md | 16 ++++++++++++++++ packages/scope-manager/package.json | 8 ++++---- packages/shared-fixtures/CHANGELOG.md | 8 ++++++++ packages/shared-fixtures/package.json | 2 +- packages/types/CHANGELOG.md | 11 +++++++++++ packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 11 +++++++++++ packages/typescript-estree/package.json | 8 ++++---- packages/visitor-keys/CHANGELOG.md | 11 +++++++++++ packages/visitor-keys/package.json | 4 ++-- 24 files changed, 177 insertions(+), 31 deletions(-) create mode 100644 packages/ast-spec/CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a1c7c9bdf60..288eede8e2cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) + + +### Bug Fixes + +* **scope-manager:** fix visiting TSAsExpression in assignment ([#3355](https://github.com/typescript-eslint/typescript-eslint/issues/3355)) ([87521a0](https://github.com/typescript-eslint/typescript-eslint/commit/87521a024103bc5fc643861649bee9a288f55b7b)) + + +### Features + +* **experimental-utils:** Include `getCwd()` in `RuleContext` type ([#3308](https://github.com/typescript-eslint/typescript-eslint/issues/3308)) ([2b75c11](https://github.com/typescript-eslint/typescript-eslint/commit/2b75c11d69bee88ca0cb77d7efd32b8d0387e6b3)) +* refactor to split AST specification out as its own module ([#2911](https://github.com/typescript-eslint/typescript-eslint/issues/2911)) ([25ea953](https://github.com/typescript-eslint/typescript-eslint/commit/25ea953cc60b118bd385c71e0a9b61c286c26fcf)) + + + + + ## [4.22.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) **Note:** Version bump only for package @typescript-eslint/typescript-eslint diff --git a/lerna.json b/lerna.json index 559d00dca269..222524221fd6 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.22.1", + "version": "4.23.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md new file mode 100644 index 000000000000..d892d6b7659d --- /dev/null +++ b/packages/ast-spec/CHANGELOG.md @@ -0,0 +1,11 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) + + +### Features + +* refactor to split AST specification out as its own module ([#2911](https://github.com/typescript-eslint/typescript-eslint/issues/2911)) ([25ea953](https://github.com/typescript-eslint/typescript-eslint/commit/25ea953cc60b118bd385c71e0a9b61c286c26fcf)) diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index c688fcdda2e1..646db4030555 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.20.0", + "version": "4.23.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 0d3715d66a7c..eabb843ecc74 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) + + +### Features + +* refactor to split AST specification out as its own module ([#2911](https://github.com/typescript-eslint/typescript-eslint/issues/2911)) ([25ea953](https://github.com/typescript-eslint/typescript-eslint/commit/25ea953cc60b118bd385c71e0a9b61c286c26fcf)) + + + + + ## [4.22.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) **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 ed377ea25988..19c94ac2096e 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.22.1", + "version": "4.23.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.22.1", + "@typescript-eslint/experimental-utils": "4.23.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index d24f79ee7598..42674a224c72 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) + + +### Features + +* refactor to split AST specification out as its own module ([#2911](https://github.com/typescript-eslint/typescript-eslint/issues/2911)) ([25ea953](https://github.com/typescript-eslint/typescript-eslint/commit/25ea953cc60b118bd385c71e0a9b61c286c26fcf)) + + + + + ## [4.22.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) **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 b35badc6bfd4..b623a32ad7b6 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.22.1", + "version": "4.23.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.22.1", + "@typescript-eslint/experimental-utils": "4.23.0", "lodash": "^4.17.15" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.22.1" + "@typescript-eslint/parser": "4.23.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index fb6b1f65dd07..8e6b83868d96 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.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) + + +### Bug Fixes + +* **scope-manager:** fix visiting TSAsExpression in assignment ([#3355](https://github.com/typescript-eslint/typescript-eslint/issues/3355)) ([87521a0](https://github.com/typescript-eslint/typescript-eslint/commit/87521a024103bc5fc643861649bee9a288f55b7b)) + + +### Features + +* refactor to split AST specification out as its own module ([#2911](https://github.com/typescript-eslint/typescript-eslint/issues/2911)) ([25ea953](https://github.com/typescript-eslint/typescript-eslint/commit/25ea953cc60b118bd385c71e0a9b61c286c26fcf)) + + + + + ## [4.22.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 72ca9feaf597..486d0bb75c1a 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.22.1", + "version": "4.23.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.22.1", - "@typescript-eslint/scope-manager": "4.22.1", + "@typescript-eslint/experimental-utils": "4.23.0", + "@typescript-eslint/scope-manager": "4.23.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 063cc2fbe70f..eeb5bdce9315 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) + + +### Features + +* **experimental-utils:** Include `getCwd()` in `RuleContext` type ([#3308](https://github.com/typescript-eslint/typescript-eslint/issues/3308)) ([2b75c11](https://github.com/typescript-eslint/typescript-eslint/commit/2b75c11d69bee88ca0cb77d7efd32b8d0387e6b3)) +* refactor to split AST specification out as its own module ([#2911](https://github.com/typescript-eslint/typescript-eslint/issues/2911)) ([25ea953](https://github.com/typescript-eslint/typescript-eslint/commit/25ea953cc60b118bd385c71e0a9b61c286c26fcf)) + + + + + ## [4.22.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) **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 d2ebd2a40720..b6b957d9fbd4 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.22.1", + "version": "4.23.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.22.1", - "@typescript-eslint/types": "4.22.1", - "@typescript-eslint/typescript-estree": "4.22.1", + "@typescript-eslint/scope-manager": "4.23.0", + "@typescript-eslint/types": "4.23.0", + "@typescript-eslint/typescript-estree": "4.23.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 9cf4c93a41da..24ee584b6616 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) + + +### Features + +* refactor to split AST specification out as its own module ([#2911](https://github.com/typescript-eslint/typescript-eslint/issues/2911)) ([25ea953](https://github.com/typescript-eslint/typescript-eslint/commit/25ea953cc60b118bd385c71e0a9b61c286c26fcf)) + + + + + ## [4.22.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 9e9fd7f81858..3d1d4e994c68 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.22.1", + "version": "4.23.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.22.1", - "@typescript-eslint/types": "4.22.1", - "@typescript-eslint/typescript-estree": "4.22.1", + "@typescript-eslint/scope-manager": "4.23.0", + "@typescript-eslint/types": "4.23.0", + "@typescript-eslint/typescript-estree": "4.23.0", "debug": "^4.1.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.22.1", + "@typescript-eslint/experimental-utils": "4.23.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 6e810ce89e75..0ed98170f798 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/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.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) + + +### Bug Fixes + +* **scope-manager:** fix visiting TSAsExpression in assignment ([#3355](https://github.com/typescript-eslint/typescript-eslint/issues/3355)) ([87521a0](https://github.com/typescript-eslint/typescript-eslint/commit/87521a024103bc5fc643861649bee9a288f55b7b)) + + +### Features + +* refactor to split AST specification out as its own module ([#2911](https://github.com/typescript-eslint/typescript-eslint/issues/2911)) ([25ea953](https://github.com/typescript-eslint/typescript-eslint/commit/25ea953cc60b118bd385c71e0a9b61c286c26fcf)) + + + + + ## [4.22.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) **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 b130cdea237e..0950b9c97ace 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.22.1", + "version": "4.23.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.22.1", - "@typescript-eslint/visitor-keys": "4.22.1" + "@typescript-eslint/types": "4.23.0", + "@typescript-eslint/visitor-keys": "4.23.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.22.1", + "@typescript-eslint/typescript-estree": "4.23.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index da5b4caeb197..6419ab67f15f 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.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.22.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) **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 3c06d355b8fa..a8e0d833683c 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.22.1", + "version": "4.23.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index f62ac84b89d4..0e43ee7cd8af 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) + + +### Features + +* refactor to split AST specification out as its own module ([#2911](https://github.com/typescript-eslint/typescript-eslint/issues/2911)) ([25ea953](https://github.com/typescript-eslint/typescript-eslint/commit/25ea953cc60b118bd385c71e0a9b61c286c26fcf)) + + + + + ## [4.22.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index cd37019cbf4b..46b53fd9fd9d 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.22.1", + "version": "4.23.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 e6363f7ae2da..6f3659179752 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) + + +### Features + +* refactor to split AST specification out as its own module ([#2911](https://github.com/typescript-eslint/typescript-eslint/issues/2911)) ([25ea953](https://github.com/typescript-eslint/typescript-eslint/commit/25ea953cc60b118bd385c71e0a9b61c286c26fcf)) + + + + + ## [4.22.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) **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 61d6febc6d67..4a3f520faed9 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.22.1", + "version": "4.23.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.22.1", - "@typescript-eslint/visitor-keys": "4.22.1", + "@typescript-eslint/types": "4.23.0", + "@typescript-eslint/visitor-keys": "4.23.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.22.1", + "@typescript-eslint/shared-fixtures": "4.23.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 29bc084e5c5d..ee37f1a8cc19 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) + + +### Features + +* refactor to split AST specification out as its own module ([#2911](https://github.com/typescript-eslint/typescript-eslint/issues/2911)) ([25ea953](https://github.com/typescript-eslint/typescript-eslint/commit/25ea953cc60b118bd385c71e0a9b61c286c26fcf)) + + + + + ## [4.22.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.0...v4.22.1) (2021-05-04) **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 e4a90301784d..018dd006a0cb 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.22.1", + "version": "4.23.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.22.1", + "@typescript-eslint/types": "4.23.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 2dd2d9e844b7ccec45802d96f20dd5003332b0d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 10:27:35 -0700 Subject: [PATCH 108/473] chore: bump handlebars from 4.7.6 to 4.7.7 (#3356) Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.6 to 4.7.7. - [Release notes](https://github.com/wycats/handlebars.js/releases) - [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md) - [Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...v4.7.7) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3f720199bc2c..d933980c8bea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4645,9 +4645,9 @@ growly@^1.3.0: integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= handlebars@^4.7.6: - version "4.7.6" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" - integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== dependencies: minimist "^1.2.5" neo-async "^2.6.0" @@ -8810,9 +8810,9 @@ uc.micro@^1.0.1, uc.micro@^1.0.5: integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== uglify-js@^3.1.4: - version "3.10.2" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.10.2.tgz#8cfa1209fd04199cc8a7f9930ddedb30b0f1912d" - integrity sha512-GXCYNwqoo0MbLARghYjxVBxDCnU0tLqN7IPLdHHbibCb1NI5zBkU2EPcy/GaVxc0BtTjqyGXJCINe6JMR2Dpow== + version "3.13.5" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.5.tgz#5d71d6dbba64cf441f32929b1efce7365bb4f113" + integrity sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw== uid-number@0.0.6: version "0.0.6" From 80f8a571b7bfc6fb56c2008b88f0f5e091be5f23 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 10:27:58 -0700 Subject: [PATCH 109/473] chore: bump @microsoft/api-extractor from 7.13.2 to 7.15.1 (#3367) Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack) from 7.13.2 to 7.15.1. - [Release notes](https://github.com/microsoft/rushstack/releases) - [Commits](https://github.com/microsoft/rushstack/compare/@microsoft/api-extractor_v7.13.2...@microsoft/api-extractor_v7.15.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 82 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 35 deletions(-) diff --git a/yarn.lock b/yarn.lock index d933980c8bea..9132c0799bde 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1637,35 +1637,47 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@microsoft/api-extractor-model@7.12.2": - version "7.12.2" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.12.2.tgz#d48b35e8ed20643b1c19d7a4f80c90c42dc7d1d8" - integrity sha512-EU+U09Mj65zUH0qwPF4PFJiL6Y+PQQE/RRGEHEDGJJzab/mRQDpKOyrzSdb00xvcd/URehIHJqC55cY2Y4jGOA== +"@microsoft/api-extractor-model@7.13.1": + version "7.13.1" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.1.tgz#6dd9c4bd49b5d0d32b44c564a94c34b3c3aa2a87" + integrity sha512-PKAjDmAJ6X07tvqCHSN1PRaKq8bZQXF9QI6WGEMnCHNFWwXUoITOAcvFW0Ol3TzwHO5rLbuy/CqWebfhv8eOtw== dependencies: - "@microsoft/tsdoc" "0.12.24" - "@rushstack/node-core-library" "3.36.0" + "@microsoft/tsdoc" "0.13.2" + "@microsoft/tsdoc-config" "~0.15.2" + "@rushstack/node-core-library" "3.37.0" "@microsoft/api-extractor@^7.13.2": - version "7.13.2" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.13.2.tgz#c44762d27aee05c4da16c03fc8786bd0fa31c7eb" - integrity sha512-2fD0c8OxZW+e6NTaxbtrdNxXVuX7aqil3+cqig3pKsHymvUuRJVCEAcAJmZrJ/ENqYXNiB265EyqOT6VxbMysw== - dependencies: - "@microsoft/api-extractor-model" "7.12.2" - "@microsoft/tsdoc" "0.12.24" - "@rushstack/node-core-library" "3.36.0" - "@rushstack/rig-package" "0.2.10" - "@rushstack/ts-command-line" "4.7.8" + version "7.15.1" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.15.1.tgz#c3791933367ddded72a2f1d3c437e17fa050eac5" + integrity sha512-PYbGAvxbM5B6HbafXY7tJ4ObYpeUZrZFt9vlN68tpYG/7aeldMLAZSjTyB30VFXaGlArjeEooKZIcs2ZnVAbNg== + dependencies: + "@microsoft/api-extractor-model" "7.13.1" + "@microsoft/tsdoc" "0.13.2" + "@microsoft/tsdoc-config" "~0.15.2" + "@rushstack/node-core-library" "3.37.0" + "@rushstack/rig-package" "0.2.12" + "@rushstack/ts-command-line" "4.7.10" colors "~1.2.1" lodash "~4.17.15" resolve "~1.17.0" semver "~7.3.0" source-map "~0.6.1" - typescript "~4.1.3" + typescript "~4.2.4" -"@microsoft/tsdoc@0.12.24": - version "0.12.24" - resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.12.24.tgz#30728e34ebc90351dd3aff4e18d038eed2c3e098" - integrity sha512-Mfmij13RUTmHEMi9vRUhMXD7rnGR2VvxeNYtaGtaJ4redwwjT4UXYJ+nzmVJF7hhd4pn/Fx5sncDKxMVFJSWPg== +"@microsoft/tsdoc-config@~0.15.2": + version "0.15.2" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz#eb353c93f3b62ab74bdc9ab6f4a82bcf80140f14" + integrity sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA== + dependencies: + "@microsoft/tsdoc" "0.13.2" + ajv "~6.12.6" + jju "~1.4.0" + resolve "~1.19.0" + +"@microsoft/tsdoc@0.13.2": + version "0.13.2" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz#3b0efb6d3903bd49edb073696f60e90df08efb26" + integrity sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg== "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" @@ -1810,10 +1822,10 @@ dependencies: "@types/node" ">= 8" -"@rushstack/node-core-library@3.36.0": - version "3.36.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.36.0.tgz#95dace39d763c8695d6607c421f95c6ac65b0ed4" - integrity sha512-bID2vzXpg8zweXdXgQkKToEdZwVrVCN9vE9viTRk58gqzYaTlz4fMId6V3ZfpXN6H0d319uGi2KDlm+lUEeqCg== +"@rushstack/node-core-library@3.37.0": + version "3.37.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.37.0.tgz#6e8ebfdbe2829d380bc827bbb450361fb48e142c" + integrity sha512-b0OGvl20zfepytLBnKsOtemtiadNZAVolXxaSYssV9VjXaLPF97oLvtLfwc58BX05ufIsrKZgXatnRo8YeffNg== dependencies: "@types/node" "10.17.13" colors "~1.2.1" @@ -1825,18 +1837,18 @@ timsort "~0.3.0" z-schema "~3.18.3" -"@rushstack/rig-package@0.2.10": - version "0.2.10" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.10.tgz#e861eb94953d8c22c509dc3e9d91d6f337eab3cd" - integrity sha512-WXYerEJEPf8bS3ruqfM57NnwXtA7ehn8VJjLjrjls6eSduE5CRydcob/oBTzlHKsQ7N196XKlqQl9P6qIyYG2A== +"@rushstack/rig-package@0.2.12": + version "0.2.12" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.12.tgz#c434d62b28e0418a040938226f8913971d0424c7" + integrity sha512-nbePcvF8hQwv0ql9aeQxcaMPK/h1OLAC00W7fWCRWIvD2MchZOE8jumIIr66HGrfG2X1sw++m/ZYI4D+BM5ovQ== dependencies: resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.7.8": - version "4.7.8" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.7.8.tgz#3aa77cf544c571be3206fc2bcba20c7a096ed254" - integrity sha512-8ghIWhkph7NnLCMDJtthpsb7TMOsVGXVDvmxjE/CeklTqjbbUFBjGXizJfpbEkRQTELuZQ2+vGn7sGwIWKN2uA== +"@rushstack/ts-command-line@4.7.10": + version "4.7.10" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.7.10.tgz#a2ec6efb1945b79b496671ce90eb1be4f1397d31" + integrity sha512-8t042g8eerypNOEcdpxwRA3uCmz0duMo21rG4Z2mdz7JxJeylDmzjlU3wDdef2t3P1Z61JCdZB6fbm1Mh0zi7w== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" @@ -2146,7 +2158,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@~6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -7762,7 +7774,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.3.2: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.3.2, resolve@~1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== @@ -8799,7 +8811,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.2.2, "typescript@>=3.3.1 <4.3.0", typescript@^4.1.0-dev.20201026, typescript@~4.1.3: +typescript@*, typescript@4.2.2, "typescript@>=3.3.1 <4.3.0", typescript@^4.1.0-dev.20201026, typescript@~4.2.4: version "4.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.2.tgz#1450f020618f872db0ea17317d16d8da8ddb8c4c" integrity sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ== From c7f90e43d9bd69c127ccf3daf655eed7281c49bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 10:28:07 -0700 Subject: [PATCH 110/473] chore: bump ts-jest from 26.5.5 to 26.5.6 (#3366) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.5 to 26.5.6. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.5.5...v26.5.6) 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 9132c0799bde..597100ac5d11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8668,9 +8668,9 @@ trim-off-newlines@^1.0.0: integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= ts-jest@^26.5.1: - version "26.5.5" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.5.tgz#e40481b6ee4dd162626ba481a2be05fa57160ea5" - integrity sha512-7tP4m+silwt1NHqzNRAPjW1BswnAhopTdc2K3HEkRZjF0ZG2F/e/ypVH0xiZIMfItFtD3CX0XFbwPzp9fIEUVg== + version "26.5.6" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.6.tgz#c32e0746425274e1dfe333f43cd3c800e014ec35" + integrity sha512-rua+rCP8DxpA8b4DQD/6X2HQS8Zy/xzViVYfEs2OQu68tkCuKLV0Md8pmX55+W24uRIyAsf/BajRfxOs+R2MKA== dependencies: bs-logger "0.x" buffer-from "1.x" From c6f834fdd2c7192e4d35efb49925d4da7bfd0f76 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 10:28:15 -0700 Subject: [PATCH 111/473] chore: bump cspell from 5.3.12 to 5.4.0 (#3369) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.3.12 to 5.4.0. - [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.12...v5.4.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 125 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 69 insertions(+), 56 deletions(-) diff --git a/yarn.lock b/yarn.lock index 597100ac5d11..1a872f11f8e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -460,15 +460,15 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.3.12": - version "5.3.12" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.3.12.tgz#5ade1c920a778da90af89da27faa7836118e9125" - integrity sha512-epDAs9OsULLZP3tPkqVIZ/5OMpE77J6ACnzMEJVN/oVOSgIncKuAzHXG6Qnw1egeCZ+hsZNl8hG09dJ4lxI0Nw== +"@cspell/cspell-bundled-dicts@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.4.0.tgz#ef241c9cee00e674fd8ac034bd1dacec77d94f5c" + integrity sha512-aZyml0UaJ2BXmqcrjdMJWyKGQVu33FQ1eRsnV2SZ4WkdkRsxPtdQoFDi+lKSSvIEYSfRkis6lffzwvp0CPQOmw== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" "@cspell/dict-bash" "^1.0.12" - "@cspell/dict-companies" "^1.0.36" + "@cspell/dict-companies" "^1.0.37" "@cspell/dict-cpp" "^1.1.38" "@cspell/dict-cryptocurrencies" "^1.0.10" "@cspell/dict-csharp" "^1.0.11" @@ -493,17 +493,17 @@ "@cspell/dict-npm" "^1.0.11" "@cspell/dict-php" "^1.0.23" "@cspell/dict-powershell" "^1.0.14" - "@cspell/dict-python" "^1.0.33" + "@cspell/dict-python" "^1.0.34" "@cspell/dict-ruby" "^1.0.13" "@cspell/dict-rust" "^1.0.22" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.27" + "@cspell/dict-software-terms" "^1.0.28" "@cspell/dict-typescript" "^1.0.17" -"@cspell/cspell-types@^5.3.12": - version "5.3.12" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.3.12.tgz#f02a6102901f77c4f1f601cf62be0fd788a50648" - integrity sha512-XiTQ6ngDvclfz/uzTpvukCgaoLmk+L2tGZPNDQmL2m5ylBs7eiqUwtnFyCl5NTvuZ7PCu/n7NrAsC5brqWezCA== +"@cspell/cspell-types@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.4.0.tgz#af555d9a9c08a75cdd2b38bac259a5127a59cb31" + integrity sha512-mQM+65u0jbTilhj0Mrnufk3jC7dWRymlWdxVK9phLRqtJsDJsxpa0opumVw1CnoBHfPj6HnW7SBGufmcCQp/PQ== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -520,10 +520,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-1.0.12.tgz#fdf828c520dfd274f1cee6a4a90a0f6d86a703ac" integrity sha512-BOMHVW/m281mqUSJkZ3oiJiUUItLd7QdzpMjm428V9yBYFwIdbds1CeatS7C6kgpI2eBE4RXmy1Hjk/lR63Jew== -"@cspell/dict-companies@^1.0.36": - version "1.0.36" - resolved "https://registry.yarnpkg.com/@cspell/dict-companies/-/dict-companies-1.0.36.tgz#c85bcc1f23ac991c56dd25eea5623078aaa513c2" - integrity sha512-Bk9mMJs9spzrtLxZsxBZIK6ukD9REfQYpuTBNJk/IiTViHVQ6ertHAgw1vRVtJAMxViv8dMLNtDyTpEXeaYm7w== +"@cspell/dict-companies@^1.0.37": + version "1.0.37" + resolved "https://registry.yarnpkg.com/@cspell/dict-companies/-/dict-companies-1.0.37.tgz#eaaf51c5356e6949071f78f6bc8a32c0dda7ef80" + integrity sha512-7DuwT64u88v0qvvuhHK23zn8zyX7S3lIYj0ntAoMvErr1+O0SuUopZrw4Y1pm1pgcVAv6+ny80RDDhSD1h565w== "@cspell/dict-cpp@^1.1.38": version "1.1.38" @@ -645,10 +645,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-powershell/-/dict-powershell-1.0.14.tgz#f8998f2f413b3b94e69a512117de89552cfa1834" integrity sha512-hisOXXi5PBXB5YKtrJQIis2FIRHgSW1U0/sd4yI36lzb3ZMEvGJwdAdyhXN3IGiqRUNxMzJiXAeXfhnia4xPtQ== -"@cspell/dict-python@^1.0.33": - version "1.0.33" - resolved "https://registry.yarnpkg.com/@cspell/dict-python/-/dict-python-1.0.33.tgz#39ddf401f63ee9b0f95e606d70693e61976a073b" - integrity sha512-tRmE4TzHDFPs7sJ1a3XbfyFrvRHwefVz+z1wkm6tkXK9TPrCbIS+rV/T8xhj205q4lpZQ/TkNB3lT40eLB9O8A== +"@cspell/dict-python@^1.0.34": + version "1.0.34" + resolved "https://registry.yarnpkg.com/@cspell/dict-python/-/dict-python-1.0.34.tgz#26601cbc78e937b6f5c45110722c720cde4ca7c3" + integrity sha512-1VvyvvEv3ToVdlFIPzD6sOh+bFVrYMHoAL6VnJYfFMnCxw/YftHIc7INg9LEUWcolovVFoUHFOhBN8saXw8bzA== "@cspell/dict-ruby@^1.0.13": version "1.0.13" @@ -665,10 +665,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.27": - version "1.0.27" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.27.tgz#fe3db2ea4aff05ea5f72966370c0025c89c39be7" - integrity sha512-O6wCGuFSnr9G9Sr62zc7/XyruRRPI0/PJ0xZj8/R+hr+vFjDaScQnkqj10gTVoLAshk1TjL5Firnzyz3ibfgdQ== +"@cspell/dict-software-terms@^1.0.28": + version "1.0.28" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.28.tgz#0c26bbfa89546d257b52cd433000ba7fe86a1901" + integrity sha512-N/5H+J68CgToDSZiMMSJl3ws5qU7GJOj1sXZ9oXr1wojvu/qifCp32zDh8hzFWrZF1VUdnStusNVTeW1Wq4Pog== "@cspell/dict-typescript@^1.0.17": version "1.0.17" @@ -2772,10 +2772,10 @@ chalk@^2.0.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" + integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" @@ -3261,59 +3261,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.12: - version "5.3.12" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.3.12.tgz#c40af7fb0f06954ec93a2783720eaf19c7ab40c5" - integrity sha512-A/a5WaZhxzzwfVzkCPVHbVY+SejkDLOI6FAd8zcHDIsIkoBxfJ8FZhoEEspY6VjpHuPGgMxUu/MVbzcaQJwkGQ== +cspell-glob@^5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.4.0.tgz#13a2948e9e1defc59f25d76a9a95134521057cfe" + integrity sha512-4CwXDdO3Z0VdfZcD7OS7zFM8h5ay2ZHtzoc5oPLmxSs+tNQdRGNeFSPIv6CNt80AqILtZrlO7nVIbA6KtARqYA== dependencies: - micromatch "^4.0.2" + micromatch "^4.0.4" -cspell-io@^5.3.12: - version "5.3.12" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.3.12.tgz#9eef76d4691f0b99016275a7d02abd0afe2964a2" - integrity sha512-SMVG07ctDUvOADuo+jCAo759eKpqVKXFClDiHUX3DOHowOdnjiZJozK9zh1uGVzCPZDjmoIueFxN4daPIcyRmw== +cspell-io@^5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.4.0.tgz#b2b74f3cf20db86ca37b4c3a7f648b8db7184f4e" + integrity sha512-VIPb/TmTNK/dG5nrbGhuhvWZQYAFXpYQQJ4hmlmuczhhQ2Qw1YSkRgoEB4Ir0neoRJTeEM2x5tgvSJCOwflSuA== dependencies: iconv-lite "^0.6.2" iterable-to-stream "^1.0.1" -cspell-lib@^5.3.12: - version "5.3.12" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.3.12.tgz#4c89638cb9383d8a0c390b5004f8aec0658d8d33" - integrity sha512-Dw8dTeB//5aYK8b5o+ulBJg0iFp+seBQoQKvstPer1tbU3JJTBXx8JJIZlJ5h8934oUYh4IWPyX/JpARaNekQw== +cspell-lib@^5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.4.0.tgz#8e60a2ad7d46e79965bcb95cff9f1d97c37b65f1" + integrity sha512-ja1zvRF+pNi+hioWYZUGpWGXPFfhDujd+qbAoQ08It4xMTVER8cDYQpSo2ll4DPJ2YphPW//2Br6TBvQ5xO50Q== dependencies: - "@cspell/cspell-bundled-dicts" "^5.3.12" - "@cspell/cspell-types" "^5.3.12" + "@cspell/cspell-bundled-dicts" "^5.4.0" + "@cspell/cspell-types" "^5.4.0" comment-json "^4.1.0" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-glob "^5.3.12" - cspell-io "^5.3.12" - cspell-trie-lib "^5.3.12" + cspell-glob "^5.4.0" + cspell-io "^5.4.0" + cspell-trie-lib "^5.4.0" 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.12: - version "5.3.12" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.3.12.tgz#2518e6504d252fbbcfb0de85ce162f1698096dee" - integrity sha512-s26GqQhwPRuOP2KPLGhaRdPMlMqOSR1K06q/H1K5RW31ISrA67Gy/O/wTsFcz3j3gjB9yFjsxWYrrjD/inDjsQ== +cspell-trie-lib@^5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.4.0.tgz#bfe721b6a5e5885f3edb73b5861500c142f3b46b" + integrity sha512-IpDFdOoUEdiyzDGEUCIAoAUenIMy0FjOKotmsl9GTbOyq0XPHE6s7Yz5s9pFzX9IHxvsJ7Plhvn627k7QAC6DQ== dependencies: fs-extra "^9.1.0" gensequence "^3.1.1" cspell@^5.2.4: - version "5.3.12" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.3.12.tgz#80621be7971e475d19c412ee295474ffe90c27f6" - integrity sha512-lwBVphwIvD/TkDZAjzNStpKqk9hAUfKTA5VlnXHCF4l0inw0r8LL17OnxcAAMo44tewxfo9UMEhx0ql68dSNrw== + version "5.4.0" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.4.0.tgz#3cafddc67b445deaea52b72af318b8c716891748" + integrity sha512-613oEbxry/xJWrFf/r6RS3jQ88Az0W3LRazGi0s+tcIAlprJn78inTKUn23oQslhoF0dhYADJdFaR6Q4Fd6+zw== dependencies: - "@cspell/cspell-types" "^5.3.12" - chalk "^4.1.0" + "@cspell/cspell-types" "^5.4.0" + chalk "^4.1.1" commander "^7.2.0" comment-json "^4.1.0" - cspell-glob "^5.3.12" - cspell-lib "^5.3.12" + cspell-glob "^5.4.0" + cspell-lib "^5.4.0" fs-extra "^9.1.0" get-stdin "^8.0.0" glob "^7.1.6" @@ -6427,6 +6427,14 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" +micromatch@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== + dependencies: + braces "^3.0.1" + picomatch "^2.2.3" + mime-db@1.44.0: version "1.44.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" @@ -7233,6 +7241,11 @@ picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== +picomatch@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.3.tgz#465547f359ccc206d3c48e46a1bcb89bf7ee619d" + integrity sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg== + pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" From 7307e8ff68b759b9f9e6ccfbdec328a89727ea2c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 11:53:27 -0700 Subject: [PATCH 112/473] chore: bump @types/semver from 7.3.4 to 7.3.5 (#3368) Bumps [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) from 7.3.4 to 7.3.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver) 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 1a872f11f8e4..f78d6dea29a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2053,9 +2053,9 @@ "@types/node" "*" "@types/semver@*", "@types/semver@^7.3.4": - version "7.3.4" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.4.tgz#43d7168fec6fa0988bb1a513a697b29296721afb" - integrity sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ== + version "7.3.5" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.5.tgz#74deebbbcb1e86634dbf10a5b5e8798626f5a597" + integrity sha512-iotVxtCCsPLRAvxMFFgxL8HD2l4mAZ2Oin7/VJ2ooWO0VOK4EGOGmZWZn1uCq7RofR3I/1IOSjCHlFT71eVK0Q== "@types/stack-utils@^2.0.0": version "2.0.0" From 1be9302c3b17e13773852e880b45a8e4d32aa1c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 12:39:03 -0700 Subject: [PATCH 113/473] chore: bump lint-staged from 10.5.4 to 11.0.0 (#3372) Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.5.4 to 11.0.0. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](https://github.com/okonet/lint-staged/compare/v10.5.4...v11.0.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 113 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 70 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index 4464751bb450..61fff8533211 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "jest": "^26.6.3", "jest-specific-snapshot": "^4.0.0", "lerna": "^3.22.1", - "lint-staged": "^10.2.13", + "lint-staged": "^11.0.0", "make-dir": "^3.1.0", "markdownlint-cli": "^0.27.1", "node-fetch": "^2.6.1", diff --git a/yarn.lock b/yarn.lock index f78d6dea29a7..3414bd6c7a30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2970,11 +2970,6 @@ commander@^2.12.1, commander@^2.7.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^6.2.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" - integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== - commander@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" @@ -3247,7 +3242,7 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0, cross-spawn@^7.0.2: +cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -3430,7 +3425,7 @@ debug@^3.1.0: dependencies: ms "^2.1.1" -debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0: +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== @@ -3990,7 +3985,7 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^4.0.0, execa@^4.1.0: +execa@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== @@ -4005,6 +4000,21 @@ execa@^4.0.0, execa@^4.1.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" + integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -4465,6 +4475,11 @@ get-stream@^5.0.0: dependencies: pump "^3.0.0" +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -4808,6 +4823,11 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -5257,6 +5277,11 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + is-utf8@^0.2.0, is-utf8@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" @@ -5974,39 +5999,39 @@ linkify-it@^3.0.1: dependencies: uc.micro "^1.0.1" -lint-staged@^10.2.13: - version "10.5.4" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.5.4.tgz#cd153b5f0987d2371fc1d2847a409a2fe705b665" - integrity sha512-EechC3DdFic/TdOPgj/RB3FicqE6932LTHCUm0Y2fsD9KGlLB+RwJl2q1IYBIvEsKzDOgn0D4gll+YxG5RsrKg== +lint-staged@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.0.0.tgz#24d0a95aa316ba28e257f5c4613369a75a10c712" + integrity sha512-3rsRIoyaE8IphSUtO1RVTFl1e0SLBtxxUOPBtHxQgBHS5/i6nqvjcUfNioMa4BU9yGnPzbO+xkfLtXtxBpCzjw== dependencies: - chalk "^4.1.0" + chalk "^4.1.1" cli-truncate "^2.1.0" - commander "^6.2.0" + commander "^7.2.0" cosmiconfig "^7.0.0" - debug "^4.2.0" + debug "^4.3.1" dedent "^0.7.0" enquirer "^2.3.6" - execa "^4.1.0" - listr2 "^3.2.2" - log-symbols "^4.0.0" - micromatch "^4.0.2" + execa "^5.0.0" + listr2 "^3.8.2" + log-symbols "^4.1.0" + micromatch "^4.0.4" normalize-path "^3.0.0" please-upgrade-node "^3.2.0" string-argv "0.3.1" stringify-object "^3.3.0" -listr2@^3.2.2: - version "3.3.1" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.3.1.tgz#87b57cc0b8541fa794b814c8bcb76f1211cfbf5c" - integrity sha512-8Zoxe7s/8nNr4bJ8bdAduHD8uJce+exmMmUWTXlq0WuUdffnH3muisHPHPFtW2vvOfohIsq7FGCaguUxN/h3Iw== +listr2@^3.8.2: + version "3.8.2" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.8.2.tgz#99b138ad1cfb08f1b0aacd422972e49b2d814b99" + integrity sha512-E28Fw7Zd3HQlCJKzb9a8C8M0HtFWQeucE+S8YrSrqZObuCLPRHMRrR8gNmYt65cU9orXYHwvN5agXC36lYt7VQ== dependencies: - chalk "^4.1.0" + chalk "^4.1.1" cli-truncate "^2.1.0" figures "^3.2.0" indent-string "^4.0.0" log-update "^4.0.0" p-map "^4.0.0" - rxjs "^6.6.3" + rxjs "^6.6.7" through "^2.3.8" wrap-ansi "^7.0.0" @@ -6157,12 +6182,13 @@ lodash@4.x, lodash@^4.11.2, lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, l resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" - integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== +log-symbols@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== dependencies: - chalk "^4.0.0" + chalk "^4.1.0" + is-unicode-supported "^0.1.0" log-update@^4.0.0: version "4.0.0" @@ -6419,15 +6445,7 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -micromatch@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" - integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== - dependencies: - braces "^3.0.1" - picomatch "^2.0.5" - -micromatch@^4.0.4: +micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== @@ -6791,7 +6809,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npm-run-path@^4.0.0: +npm-run-path@^4.0.0, npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== @@ -6908,7 +6926,7 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -onetime@^5.1.0: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -7236,7 +7254,7 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: +picomatch@^2.0.4, picomatch@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== @@ -7869,13 +7887,20 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.3: +rxjs@^6.4.0, rxjs@^6.6.0: version "6.6.3" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== dependencies: tslib "^1.9.0" +rxjs@^6.6.7: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -8002,7 +8027,7 @@ shellwords@^0.1.1: resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== -signal-exit@^3.0.0, signal-exit@^3.0.2: +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== From 0fe85792d07c34cc1c13c9957a3601c2c98414e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 13:29:16 -0700 Subject: [PATCH 114/473] chore: bump eslint-plugin-eslint-plugin from 3.0.2 to 3.0.3 (#3373) Bumps [eslint-plugin-eslint-plugin](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin) from 3.0.2 to 3.0.3. - [Release notes](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/releases) - [Changelog](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/compare/v3.0.2...v3.0.3) 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 3414bd6c7a30..7569a2ab499c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3814,9 +3814,9 @@ eslint-plugin-eslint-comments@^3.2.0: ignore "^5.0.5" eslint-plugin-eslint-plugin@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.0.2.tgz#8ce72a1e06bad8c4e6ddc1c932e236b8184c1bce" - integrity sha512-pTJhDCiuwa/NgwjsKrlCnF2ExULcG0xK87HdckFpVbaKb2GOd2UUL4L/HtjUV1N3jlrOdtyTfdX1J+oCD01j4Q== + version "3.0.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.0.3.tgz#3356adec58bd4904f98001779f61eff5b7006ec8" + integrity sha512-vVNx9qexy0iQwqtOzzJPFAfC6j6i4L6QE//JqwJOnAC5aUHJA4yFQy56kX9JOJ2rx3iKlpTt3h/adErgbqU/SA== dependencies: eslint-utils "^2.1.0" From dc2072df6de963e5c0a7c5c870431d5573d96247 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 13:29:26 -0700 Subject: [PATCH 115/473] chore: bump @types/jest from 26.0.22 to 26.0.23 (#3377) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.22 to 26.0.23. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) 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 7569a2ab499c..7d2672dcb383 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1974,9 +1974,9 @@ "@types/jest" "*" "@types/jest@*", "@types/jest@^26.0.20": - version "26.0.22" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.22.tgz#8308a1debdf1b807aa47be2838acdcd91e88fbe6" - integrity sha512-eeWwWjlqxvBxc4oQdkueW5OF/gtfSceKk4OnOAGlUSwS/liBRtZppbJuz1YkgbrbfGOoeBHun9fOvXnjNwrSOw== + version "26.0.23" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.23.tgz#a1b7eab3c503b80451d019efb588ec63522ee4e7" + integrity sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" From e8c4b9ba81228149ad213b3157dfcf275f1af492 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 13:29:34 -0700 Subject: [PATCH 116/473] chore: bump glob from 7.1.6 to 7.1.7 (#3374) Bumps [glob](https://github.com/isaacs/node-glob) from 7.1.6 to 7.1.7. - [Release notes](https://github.com/isaacs/node-glob/releases) - [Changelog](https://github.com/isaacs/node-glob/blob/master/changelog.md) - [Commits](https://github.com/isaacs/node-glob/compare/v7.1.6...v7.1.7) 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 7d2672dcb383..3facce7c4413 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4573,9 +4573,9 @@ glob-to-regexp@^0.3.0: integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= glob@*, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.6: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" From c80b5f2830d2915a0ac902dbec23ccdee14df8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sat, 15 May 2021 20:44:41 +0200 Subject: [PATCH 117/473] chore(experimental-utils): remove useless union types `ast-utils` predicates (#3289) --- .../experimental-utils/src/ast-utils/predicates.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/predicates.ts index bf62a6f77cb2..a7f722b810c6 100644 --- a/packages/experimental-utils/src/ast-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/predicates.ts @@ -1,24 +1,20 @@ import { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree } from '../ts-estree'; function isOptionalChainPunctuator( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ): token is TSESTree.PunctuatorToken & { value: '?.' } { return token.type === AST_TOKEN_TYPES.Punctuator && token.value === '?.'; } -function isNotOptionalChainPunctuator( - token: TSESTree.Token | TSESTree.Comment, -): boolean { +function isNotOptionalChainPunctuator(token: TSESTree.Token): boolean { return !isOptionalChainPunctuator(token); } function isNonNullAssertionPunctuator( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ): token is TSESTree.PunctuatorToken & { value: '!' } { return token.type === AST_TOKEN_TYPES.Punctuator && token.value === '!'; } -function isNotNonNullAssertionPunctuator( - token: TSESTree.Token | TSESTree.Comment, -): boolean { +function isNotNonNullAssertionPunctuator(token: TSESTree.Token): boolean { return !isNonNullAssertionPunctuator(token); } @@ -209,7 +205,7 @@ function isAwaitExpression( * Checks if a possible token is the `await` keyword. */ function isAwaitKeyword( - node: TSESTree.Token | TSESTree.Comment | undefined | null, + node: TSESTree.Token | undefined | null, ): node is TSESTree.KeywordToken & { value: 'await' } { return node?.type === AST_TOKEN_TYPES.Identifier && node.value === 'await'; } From df7a0d66607c2e00242aaa01314e4322fb68d826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sat, 15 May 2021 21:42:41 +0200 Subject: [PATCH 118/473] chore(eslint-plugin): [no-loss-of-precision] fix spelling of `isSeparatedNumeric` (#3390) --- packages/eslint-plugin/src/rules/no-loss-of-precision.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts index 1e04d080e747..f6b15c0430c1 100644 --- a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts +++ b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts @@ -38,14 +38,14 @@ export default util.createRule({ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion const rules = baseRule!.create(context); - function isSeperatedNumeric(node: TSESTree.Literal): boolean { + function isSeparatedNumeric(node: TSESTree.Literal): boolean { return typeof node.value === 'number' && node.raw.includes('_'); } return { Literal(node: TSESTree.Literal): void { rules.Literal({ ...node, - raw: isSeperatedNumeric(node) ? node.raw.replace(/_/g, '') : node.raw, + raw: isSeparatedNumeric(node) ? node.raw.replace(/_/g, '') : node.raw, } as never); }, }; From b85261c20951c6319694e57a0c3e3a060bc8eee5 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Sat, 15 May 2021 21:39:24 +0100 Subject: [PATCH 119/473] docs(eslint-plugin): update justification for `prefer-regexp-exec` (#3392) --- packages/eslint-plugin/docs/rules/prefer-regexp-exec.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md b/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md index 4640d35a98ec..3f3d149a7f7a 100644 --- a/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md +++ b/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md @@ -1,18 +1,16 @@ # Enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided (`prefer-regexp-exec`) -`RegExp#exec` is faster than `String#match` and both work the same when not using the `/g` flag. +As `String#match` is defined to be the same as `RegExp#exec` when the regular expression does not include the `g` flag, prefer a consistent usage. ## Rule Details -This rule is aimed at enforcing the more performant way of applying regular expressions on strings. +This rule is aimed at enforcing a consistent way to apply regular expressions to strings. From [`String#match` on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match): > If the regular expression does not include the g flag, returns the same result as `RegExp.exec()`. -From [Stack Overflow](https://stackoverflow.com/questions/9214754/what-is-the-difference-between-regexp-s-exec-function-and-string-s-match-fun) - -> `RegExp.prototype.exec` is a lot faster than `String.prototype.match`, but that’s because they are not exactly the same thing, they are different. +`RegExp#exec` may also be slightly faster than `String#match`; this is the reason to choose it as the preferred usage. Examples of **incorrect** code for this rule: From b1e1c8a44695a58d29d19cf32ce35a8267bf506f Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 15 May 2021 14:11:12 -0700 Subject: [PATCH 120/473] fix(eslint-plugin): [no-shadow] fix static class method generics shadowing class generics (#3393) Fixes #2592 Unfortunately I think this is impossible to solve from the scope analysis side.. So I opted instead to just ignore it from the lint rule. --- packages/eslint-plugin/src/rules/no-shadow.ts | 85 +++++++++++++++++++ .../tests/rules/no-shadow.test.ts | 13 +++ 2 files changed, 98 insertions(+) diff --git a/packages/eslint-plugin/src/rules/no-shadow.ts b/packages/eslint-plugin/src/rules/no-shadow.ts index 1d1f894b651f..6eb2ef38f7c8 100644 --- a/packages/eslint-plugin/src/rules/no-shadow.ts +++ b/packages/eslint-plugin/src/rules/no-shadow.ts @@ -126,6 +126,84 @@ export default util.createRule({ return util.isFunctionType(id.parent); } + function isGenericOfStaticMethod( + variable: TSESLint.Scope.Variable, + ): boolean { + if (!('isTypeVariable' in variable)) { + // this shouldn't happen... + return false; + } + + if (!variable.isTypeVariable) { + return false; + } + + if (variable.identifiers.length === 0) { + return false; + } + + const typeParameter = variable.identifiers[0].parent; + if (typeParameter?.type !== AST_NODE_TYPES.TSTypeParameter) { + return false; + } + const typeParameterDecl = typeParameter.parent; + if ( + typeParameterDecl?.type !== AST_NODE_TYPES.TSTypeParameterDeclaration + ) { + return false; + } + const functionExpr = typeParameterDecl.parent; + if ( + !functionExpr || + (functionExpr.type !== AST_NODE_TYPES.FunctionExpression && + functionExpr.type !== AST_NODE_TYPES.TSEmptyBodyFunctionExpression) + ) { + return false; + } + const methodDefinition = functionExpr.parent; + if (methodDefinition?.type !== AST_NODE_TYPES.MethodDefinition) { + return false; + } + return methodDefinition.static; + } + + function isGenericOfClassDecl(variable: TSESLint.Scope.Variable): boolean { + if (!('isTypeVariable' in variable)) { + // this shouldn't happen... + return false; + } + + if (!variable.isTypeVariable) { + return false; + } + + if (variable.identifiers.length === 0) { + return false; + } + + const typeParameter = variable.identifiers[0].parent; + if (typeParameter?.type !== AST_NODE_TYPES.TSTypeParameter) { + return false; + } + const typeParameterDecl = typeParameter.parent; + if ( + typeParameterDecl?.type !== AST_NODE_TYPES.TSTypeParameterDeclaration + ) { + return false; + } + const classDecl = typeParameterDecl.parent; + return classDecl?.type === AST_NODE_TYPES.ClassDeclaration; + } + + function isGenericOfAStaticMethodShadow( + variable: TSESLint.Scope.Variable, + shadowed: TSESLint.Scope.Variable, + ): boolean { + return ( + isGenericOfStaticMethod(variable) && isGenericOfClassDecl(shadowed) + ); + } + /** * Check if variable name is allowed. * @param variable The variable to check. @@ -321,6 +399,13 @@ export default util.createRule({ continue; } + // ignore static class method generic shadowing class generic + // this is impossible for the scope analyser to understand + // so we have to handle this manually in this rule + if (isGenericOfAStaticMethodShadow(variable, shadowed)) { + continue; + } + const isESLintGlobal = 'writeable' in shadowed; if ( (shadowed.identifiers.length > 0 || diff --git a/packages/eslint-plugin/tests/rules/no-shadow.test.ts b/packages/eslint-plugin/tests/rules/no-shadow.test.ts index abc78ee5f3ec..f48adfc1b57c 100644 --- a/packages/eslint-plugin/tests/rules/no-shadow.test.ts +++ b/packages/eslint-plugin/tests/rules/no-shadow.test.ts @@ -159,6 +159,19 @@ type Fn = (Foo: string) => typeof Foo; `, options: [{ ignoreFunctionTypeParameterNameValueShadow: false }], }, + ` +export class Wrapper { + private constructor(private readonly wrapped: Wrapped) {} + + unwrap(): Wrapped { + return this.wrapped; + } + + static create(wrapped: Wrapped) { + return new Wrapper(wrapped); + } +} + `, ], invalid: [ { From 37ec2c2264add3e6ce20ac4e02d48644afda3fa8 Mon Sep 17 00:00:00 2001 From: Daniel Cassidy Date: Sat, 15 May 2021 22:13:12 +0100 Subject: [PATCH 121/473] feat(eslint-plugin): [dot-notation] optionally allow square bracket notation where an index signature exists in conjunction with `noPropertyAccessFromIndexSignature` (#3361) --- .../eslint-plugin/docs/rules/dot-notation.md | 24 ++++++++- .../eslint-plugin/src/rules/dot-notation.ts | 49 +++++++++++++++---- .../tests/rules/dot-notation.test.ts | 34 +++++++++++++ .../eslint-plugin/typings/eslint-rules.d.ts | 1 + 4 files changed, 97 insertions(+), 11 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/dot-notation.md b/packages/eslint-plugin/docs/rules/dot-notation.md index 56097090e2e0..094e2e4fc673 100644 --- a/packages/eslint-plugin/docs/rules/dot-notation.md +++ b/packages/eslint-plugin/docs/rules/dot-notation.md @@ -3,7 +3,10 @@ ## Rule Details This rule extends the base [`eslint/dot-notation`](https://eslint.org/docs/rules/dot-notation) rule. -It adds support for optionally ignoring computed `private` member access. +It adds: + +- Support for optionally ignoring computed `private` and/or `protected` member access. +- Compatibility with TypeScript's `noPropertyAccessFromIndexSignature` option. ## How to use @@ -24,14 +27,18 @@ This rule adds the following options: interface Options extends BaseDotNotationOptions { allowPrivateClassPropertyAccess?: boolean; allowProtectedClassPropertyAccess?: boolean; + allowIndexSignaturePropertyAccess?: boolean; } const defaultOptions: Options = { ...baseDotNotationDefaultOptions, allowPrivateClassPropertyAccess: false, allowProtectedClassPropertyAccess: false, + allowIndexSignaturePropertyAccess: false, }; ``` +If the TypeScript compiler option `noPropertyAccessFromIndexSignature` is set to `true`, then this rule always allows the use of square bracket notation to access properties of types that have a `string` index signature, even if `allowIndexSignaturePropertyAccess` is `false`. + ### `allowPrivateClassPropertyAccess` Example of a correct code when `allowPrivateClassPropertyAccess` is set to `true` @@ -58,4 +65,19 @@ const x = new X(); x['protected_prop'] = 123; ``` +### `allowIndexSignaturePropertyAccess` + +Example of correct code when `allowIndexSignaturePropertyAccess` is set to `true` + +```ts +class X { + [key: string]: number; +} + +const x = new X(); +x['hello'] = 123; +``` + +If the TypeScript compiler option `noPropertyAccessFromIndexSignature` is set to `true`, then the above code is always allowed, even if `allowIndexSignaturePropertyAccess` is `false`. + Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/dot-notation.md) diff --git a/packages/eslint-plugin/src/rules/dot-notation.ts b/packages/eslint-plugin/src/rules/dot-notation.ts index 2c9dd9f23514..055b97ecab25 100644 --- a/packages/eslint-plugin/src/rules/dot-notation.ts +++ b/packages/eslint-plugin/src/rules/dot-notation.ts @@ -1,11 +1,12 @@ import { TSESTree } from '@typescript-eslint/experimental-utils'; import * as ts from 'typescript'; +import * as tsutils from 'tsutils'; import baseRule from 'eslint/lib/rules/dot-notation'; import { - InferOptionsTypeFromRule, - InferMessageIdsTypeFromRule, createRule, getParserServices, + InferMessageIdsTypeFromRule, + InferOptionsTypeFromRule, } from '../util'; export type Options = InferOptionsTypeFromRule; @@ -42,6 +43,10 @@ export default createRule({ type: 'boolean', default: false, }, + allowIndexSignaturePropertyAccess: { + type: 'boolean', + default: false, + }, }, additionalProperties: false, }, @@ -53,32 +58,41 @@ export default createRule({ { allowPrivateClassPropertyAccess: false, allowProtectedClassPropertyAccess: false, + allowIndexSignaturePropertyAccess: false, allowKeywords: true, allowPattern: '', }, ], create(context, [options]) { const rules = baseRule.create(context); + + const { program, esTreeNodeToTSNodeMap } = getParserServices(context); + const typeChecker = program.getTypeChecker(); + const allowPrivateClassPropertyAccess = options.allowPrivateClassPropertyAccess; const allowProtectedClassPropertyAccess = options.allowProtectedClassPropertyAccess; - - const parserServices = getParserServices(context); - const typeChecker = parserServices.program.getTypeChecker(); + const allowIndexSignaturePropertyAccess = + (options.allowIndexSignaturePropertyAccess ?? false) || + tsutils.isCompilerOptionEnabled( + program.getCompilerOptions(), + 'noPropertyAccessFromIndexSignature', + ); return { MemberExpression(node: TSESTree.MemberExpression): void { if ( (allowPrivateClassPropertyAccess || - allowProtectedClassPropertyAccess) && + allowProtectedClassPropertyAccess || + allowIndexSignaturePropertyAccess) && node.computed ) { - // for perf reasons - only fetch the symbol if we have to - const objectSymbol = typeChecker.getSymbolAtLocation( - parserServices.esTreeNodeToTSNodeMap.get(node.property), + // for perf reasons - only fetch symbols if we have to + const propertySymbol = typeChecker.getSymbolAtLocation( + esTreeNodeToTSNodeMap.get(node.property), ); - const modifierKind = objectSymbol?.getDeclarations()?.[0] + const modifierKind = propertySymbol?.getDeclarations()?.[0] ?.modifiers?.[0].kind; if ( (allowPrivateClassPropertyAccess && @@ -88,6 +102,21 @@ export default createRule({ ) { return; } + if ( + propertySymbol === undefined && + allowIndexSignaturePropertyAccess + ) { + const objectType = typeChecker.getTypeAtLocation( + esTreeNodeToTSNodeMap.get(node.object), + ); + const indexType = typeChecker.getIndexTypeOfType( + objectType, + ts.IndexKind.String, + ); + if (indexType != undefined) { + return; + } + } } rules.MemberExpression(node); }, diff --git a/packages/eslint-plugin/tests/rules/dot-notation.test.ts b/packages/eslint-plugin/tests/rules/dot-notation.test.ts index 0d1f755b4829..cbdb2d523425 100644 --- a/packages/eslint-plugin/tests/rules/dot-notation.test.ts +++ b/packages/eslint-plugin/tests/rules/dot-notation.test.ts @@ -87,6 +87,18 @@ x['protected_prop'] = 123; `, options: [{ allowProtectedClassPropertyAccess: true }], }, + { + code: ` +class X { + prop: string; + [key: string]: number; +} + +const x = new X(); +x['hello'] = 3; + `, + options: [{ allowIndexSignaturePropertyAccess: true }], + }, ], invalid: [ { @@ -287,5 +299,27 @@ x.protected_prop = 123; `, errors: [{ messageId: 'useDot' }], }, + { + code: ` +class X { + prop: string; + [key: string]: number; +} + +const x = new X(); +x['prop'] = 'hello'; + `, + options: [{ allowIndexSignaturePropertyAccess: true }], + errors: [{ messageId: 'useDot' }], + output: ` +class X { + prop: string; + [key: string]: number; +} + +const x = new X(); +x.prop = 'hello'; + `, + }, ], }); diff --git a/packages/eslint-plugin/typings/eslint-rules.d.ts b/packages/eslint-plugin/typings/eslint-rules.d.ts index 425956e1f256..d6677e9dc93a 100644 --- a/packages/eslint-plugin/typings/eslint-rules.d.ts +++ b/packages/eslint-plugin/typings/eslint-rules.d.ts @@ -713,6 +713,7 @@ declare module 'eslint/lib/rules/dot-notation' { allowPattern?: string; allowPrivateClassPropertyAccess?: boolean; allowProtectedClassPropertyAccess?: boolean; + allowIndexSignaturePropertyAccess?: boolean; }, ], { From cae4f4a0f33f8c954b1670d0abcfc8edd6193a06 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 15 May 2021 14:52:27 -0700 Subject: [PATCH 122/473] fix(eslint-plugin): [no-unsafe-*] special case handling for the empty map constructor with no generics (#3394) Fixes #2109 Sucks that it had to be this way, but oh well. --- .../src/rules/no-unsafe-argument.ts | 4 ++ .../src/rules/no-unsafe-assignment.ts | 7 ++- .../src/rules/no-unsafe-return.ts | 1 + packages/eslint-plugin/src/util/types.ts | 20 +++++++- .../tests/rules/no-unsafe-argument.test.ts | 5 ++ .../tests/rules/no-unsafe-assignment.test.ts | 2 + .../tests/rules/no-unsafe-return.test.ts | 6 +++ .../tests/util/isUnsafeAssignment.test.ts | 49 +++++++++++++------ 8 files changed, 76 insertions(+), 18 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts index 160519e27683..84887bd8d658 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts @@ -220,6 +220,9 @@ export default util.createRule<[], MessageIds>({ tupleType, parameterType, checker, + // we can't pass the individual tuple members in here as this will most likely be a spread variable + // not a spread array + null, ); if (result) { context.report({ @@ -258,6 +261,7 @@ export default util.createRule<[], MessageIds>({ argumentType, parameterType, checker, + argument, ); if (result) { context.report({ diff --git a/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts b/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts index ac8152085449..ae900b14f0cd 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts @@ -283,7 +283,12 @@ export default util.createRule({ return false; } - const result = util.isUnsafeAssignment(senderType, receiverType, checker); + const result = util.isUnsafeAssignment( + senderType, + receiverType, + checker, + senderNode, + ); if (!result) { return false; } diff --git a/packages/eslint-plugin/src/rules/no-unsafe-return.ts b/packages/eslint-plugin/src/rules/no-unsafe-return.ts index a818be4ef4ee..4d65ce529af0 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-return.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-return.ts @@ -151,6 +151,7 @@ export default util.createRule({ returnNodeType, functionReturnType, checker, + returnNode, ); if (!result) { return; diff --git a/packages/eslint-plugin/src/util/types.ts b/packages/eslint-plugin/src/util/types.ts index 920ce66de02f..089620e702a3 100644 --- a/packages/eslint-plugin/src/util/types.ts +++ b/packages/eslint-plugin/src/util/types.ts @@ -1,3 +1,7 @@ +import { + AST_NODE_TYPES, + TSESTree, +} from '@typescript-eslint/experimental-utils'; import debug from 'debug'; import { isCallExpression, @@ -419,6 +423,7 @@ export function isUnsafeAssignment( type: ts.Type, receiver: ts.Type, checker: ts.TypeChecker, + senderNode: TSESTree.Node | null, ): false | { sender: ts.Type; receiver: ts.Type } { if (isTypeAnyType(type)) { // Allow assignment of any ==> unknown. @@ -451,6 +456,19 @@ export function isUnsafeAssignment( return false; } + if ( + senderNode?.type === AST_NODE_TYPES.NewExpression && + senderNode.callee.type === AST_NODE_TYPES.Identifier && + senderNode.callee.name === 'Map' && + senderNode.arguments.length === 0 && + senderNode.typeParameters == null + ) { + // special case to handle `new Map()` + // unfortunately Map's default empty constructor is typed to return `Map` :( + // https://github.com/typescript-eslint/typescript-eslint/issues/2109#issuecomment-634144396 + return false; + } + const typeArguments = type.typeArguments ?? []; const receiverTypeArguments = receiver.typeArguments ?? []; @@ -458,7 +476,7 @@ export function isUnsafeAssignment( const arg = typeArguments[i]; const receiverArg = receiverTypeArguments[i]; - const unsafe = isUnsafeAssignment(arg, receiverArg, checker); + const unsafe = isUnsafeAssignment(arg, receiverArg, checker, senderNode); if (unsafe) { return { sender: type, receiver }; } 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 a9a6bc3eacca..6205a371a14a 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-argument.test.ts @@ -85,6 +85,11 @@ foo('a', 'b', 1 as any); declare function toHaveBeenCalledWith(...params: E): void; toHaveBeenCalledWith(1 as any); `, + // https://github.com/typescript-eslint/typescript-eslint/issues/2109 + ` +declare function acceptsMap(arg: Map): void; +acceptsMap(new Map()); + `, ], invalid: [ { diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts index b0f8ec612333..f9594fc93481 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts @@ -141,6 +141,8 @@ declare function Foo(props: { a: string }): never; 'const x: unknown = y as any;', 'const x: unknown[] = y as any[];', 'const x: Set = y as Set;', + // https://github.com/typescript-eslint/typescript-eslint/issues/2109 + 'const x: Map = new Map();', ], invalid: [ ...batchedSingleLineTests({ diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts index 5cfd965ab8e1..0f533917d54c 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts @@ -92,6 +92,12 @@ function foo(): Set { return x as Set; } `, + // https://github.com/typescript-eslint/typescript-eslint/issues/2109 + ` + function test(): Map { + return new Map(); + } + `, ], invalid: [ ...batchedSingleLineTests({ diff --git a/packages/eslint-plugin/tests/util/isUnsafeAssignment.test.ts b/packages/eslint-plugin/tests/util/isUnsafeAssignment.test.ts index efe1fe9d1bad..ece61a1c149c 100644 --- a/packages/eslint-plugin/tests/util/isUnsafeAssignment.test.ts +++ b/packages/eslint-plugin/tests/util/isUnsafeAssignment.test.ts @@ -10,7 +10,12 @@ describe('isUnsafeAssignment', () => { function getTypes( code: string, - ): { sender: ts.Type; receiver: ts.Type; checker: ts.TypeChecker } { + ): { + sender: ts.Type; + senderNode: TSESTree.Node; + receiver: ts.Type; + checker: ts.TypeChecker; + } { const { ast, services } = parseForESLint(code, { project: './tsconfig.json', filePath: path.join(rootDir, 'file.ts'), @@ -28,6 +33,7 @@ describe('isUnsafeAssignment', () => { sender: checker.getTypeAtLocation( esTreeNodeToTSNodeMap.get(declarator.init!), ), + senderNode: declarator.init!, checker, }; } @@ -52,7 +58,7 @@ describe('isUnsafeAssignment', () => { ); expectTypesAre( - isUnsafeAssignment(sender, receiver, checker), + isUnsafeAssignment(sender, receiver, checker, null), checker, 'any', 'string', @@ -65,7 +71,7 @@ describe('isUnsafeAssignment', () => { ); expectTypesAre( - isUnsafeAssignment(sender, receiver, checker), + isUnsafeAssignment(sender, receiver, checker, null), checker, 'Set', 'Set', @@ -78,7 +84,7 @@ describe('isUnsafeAssignment', () => { ); expectTypesAre( - isUnsafeAssignment(sender, receiver, checker), + isUnsafeAssignment(sender, receiver, checker, null), checker, 'Map', 'Map', @@ -91,7 +97,7 @@ describe('isUnsafeAssignment', () => { ); expectTypesAre( - isUnsafeAssignment(sender, receiver, checker), + isUnsafeAssignment(sender, receiver, checker, null), checker, 'Set', 'Set', @@ -104,7 +110,7 @@ describe('isUnsafeAssignment', () => { ); expectTypesAre( - isUnsafeAssignment(sender, receiver, checker), + isUnsafeAssignment(sender, receiver, checker, null), checker, 'Set>>', 'Set>>', @@ -118,13 +124,13 @@ describe('isUnsafeAssignment', () => { 'const test: string = "";', ); - expect(isUnsafeAssignment(sender, receiver, checker)).toBeFalsy(); + expect(isUnsafeAssignment(sender, receiver, checker, null)).toBeFalsy(); }); it('non-any to a any', () => { const { sender, receiver, checker } = getTypes('const test: any = "";'); - expect(isUnsafeAssignment(sender, receiver, checker)).toBeFalsy(); + expect(isUnsafeAssignment(sender, receiver, checker, null)).toBeFalsy(); }); it('non-any in a generic position to a non-any', () => { @@ -132,7 +138,7 @@ describe('isUnsafeAssignment', () => { 'const test: Set = new Set();', ); - expect(isUnsafeAssignment(sender, receiver, checker)).toBeFalsy(); + expect(isUnsafeAssignment(sender, receiver, checker, null)).toBeFalsy(); }); it('non-any in a generic position to a non-any (multiple generics)', () => { @@ -140,7 +146,7 @@ describe('isUnsafeAssignment', () => { 'const test: Map = new Map();', ); - expect(isUnsafeAssignment(sender, receiver, checker)).toBeFalsy(); + expect(isUnsafeAssignment(sender, receiver, checker, null)).toBeFalsy(); }); it('non-any[] in a generic position to a non-any[]', () => { @@ -148,7 +154,7 @@ describe('isUnsafeAssignment', () => { 'const test: Set = new Set();', ); - expect(isUnsafeAssignment(sender, receiver, checker)).toBeFalsy(); + expect(isUnsafeAssignment(sender, receiver, checker, null)).toBeFalsy(); }); it('non-any in a generic position to a non-any (nested)', () => { @@ -156,7 +162,7 @@ describe('isUnsafeAssignment', () => { 'const test: Set>> = new Set>>();', ); - expect(isUnsafeAssignment(sender, receiver, checker)).toBeFalsy(); + expect(isUnsafeAssignment(sender, receiver, checker, null)).toBeFalsy(); }); it('non-any in a generic position to a any (nested)', () => { @@ -164,7 +170,7 @@ describe('isUnsafeAssignment', () => { 'const test: Set>> = new Set>>();', ); - expect(isUnsafeAssignment(sender, receiver, checker)).toBeFalsy(); + expect(isUnsafeAssignment(sender, receiver, checker, null)).toBeFalsy(); }); it('any to a unknown', () => { @@ -172,7 +178,7 @@ describe('isUnsafeAssignment', () => { 'const test: unknown = [] as any;', ); - expect(isUnsafeAssignment(sender, receiver, checker)).toBeFalsy(); + expect(isUnsafeAssignment(sender, receiver, checker, null)).toBeFalsy(); }); it('any[] in a generic position to a unknown[]', () => { @@ -180,7 +186,7 @@ describe('isUnsafeAssignment', () => { 'const test: unknown[] = [] as any[]', ); - expect(isUnsafeAssignment(sender, receiver, checker)).toBeFalsy(); + expect(isUnsafeAssignment(sender, receiver, checker, null)).toBeFalsy(); }); it('any in a generic position to a unknown (nested)', () => { @@ -188,7 +194,18 @@ describe('isUnsafeAssignment', () => { 'const test: Set>> = new Set>>();', ); - expect(isUnsafeAssignment(sender, receiver, checker)).toBeFalsy(); + expect(isUnsafeAssignment(sender, receiver, checker, null)).toBeFalsy(); + }); + + // https://github.com/typescript-eslint/typescript-eslint/issues/2109 + it('special cases the empty map constructor with no generics', () => { + const { sender, senderNode, receiver, checker } = getTypes( + 'const test: Map = new Map();', + ); + + expect( + isUnsafeAssignment(sender, receiver, checker, senderNode), + ).toBeFalsy(); }); }); }); From e8ce2bfabd44ca59fd1cb07b4d7448ec4a23ccf1 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 17 May 2021 17:02:37 +0000 Subject: [PATCH 123/473] chore: publish v4.24.0 --- CHANGELOG.md | 17 +++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.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 | 17 +++++++++++++++++ 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 ++-- 24 files changed, 145 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 288eede8e2cd..0d75e605a204 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) + + +### Bug Fixes + +* **eslint-plugin:** [no-shadow] fix static class method generics shadowing class generics ([#3393](https://github.com/typescript-eslint/typescript-eslint/issues/3393)) ([b1e1c8a](https://github.com/typescript-eslint/typescript-eslint/commit/b1e1c8a44695a58d29d19cf32ce35a8267bf506f)), closes [#2592](https://github.com/typescript-eslint/typescript-eslint/issues/2592) +* **eslint-plugin:** [no-unsafe-*] special case handling for the empty map constructor with no generics ([#3394](https://github.com/typescript-eslint/typescript-eslint/issues/3394)) ([cae4f4a](https://github.com/typescript-eslint/typescript-eslint/commit/cae4f4a0f33f8c954b1670d0abcfc8edd6193a06)), closes [#2109](https://github.com/typescript-eslint/typescript-eslint/issues/2109) + + +### Features + +* **eslint-plugin:** [dot-notation] optionally allow square bracket notation where an index signature exists in conjunction with `noPropertyAccessFromIndexSignature` ([#3361](https://github.com/typescript-eslint/typescript-eslint/issues/3361)) ([37ec2c2](https://github.com/typescript-eslint/typescript-eslint/commit/37ec2c2264add3e6ce20ac4e02d48644afda3fa8)) + + + + + # [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) diff --git a/lerna.json b/lerna.json index 222524221fd6..fe0545ff06c8 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.23.0", + "version": "4.24.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index d892d6b7659d..6a94c72622f5 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + # [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 646db4030555..8a78a307a0a9 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.23.0", + "version": "4.24.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index eabb843ecc74..2f066560c29b 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.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 19c94ac2096e..7d8fd97eda0d 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.23.0", + "version": "4.24.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.23.0", + "@typescript-eslint/experimental-utils": "4.24.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 42674a224c72..e3f534c878a6 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.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index b623a32ad7b6..457a287fd445 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.23.0", + "version": "4.24.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.23.0", + "@typescript-eslint/experimental-utils": "4.24.0", "lodash": "^4.17.15" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.23.0" + "@typescript-eslint/parser": "4.24.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 8e6b83868d96..5868295645f2 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) + + +### Bug Fixes + +* **eslint-plugin:** [no-shadow] fix static class method generics shadowing class generics ([#3393](https://github.com/typescript-eslint/typescript-eslint/issues/3393)) ([b1e1c8a](https://github.com/typescript-eslint/typescript-eslint/commit/b1e1c8a44695a58d29d19cf32ce35a8267bf506f)), closes [#2592](https://github.com/typescript-eslint/typescript-eslint/issues/2592) +* **eslint-plugin:** [no-unsafe-*] special case handling for the empty map constructor with no generics ([#3394](https://github.com/typescript-eslint/typescript-eslint/issues/3394)) ([cae4f4a](https://github.com/typescript-eslint/typescript-eslint/commit/cae4f4a0f33f8c954b1670d0abcfc8edd6193a06)), closes [#2109](https://github.com/typescript-eslint/typescript-eslint/issues/2109) + + +### Features + +* **eslint-plugin:** [dot-notation] optionally allow square bracket notation where an index signature exists in conjunction with `noPropertyAccessFromIndexSignature` ([#3361](https://github.com/typescript-eslint/typescript-eslint/issues/3361)) ([37ec2c2](https://github.com/typescript-eslint/typescript-eslint/commit/37ec2c2264add3e6ce20ac4e02d48644afda3fa8)) + + + + + # [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 486d0bb75c1a..3fb68254ed8c 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.23.0", + "version": "4.24.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.23.0", - "@typescript-eslint/scope-manager": "4.23.0", + "@typescript-eslint/experimental-utils": "4.24.0", + "@typescript-eslint/scope-manager": "4.24.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 eeb5bdce9315..da1fdb2f8084 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.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + # [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index b6b957d9fbd4..e0c128610369 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.23.0", + "version": "4.24.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.23.0", - "@typescript-eslint/types": "4.23.0", - "@typescript-eslint/typescript-estree": "4.23.0", + "@typescript-eslint/scope-manager": "4.24.0", + "@typescript-eslint/types": "4.24.0", + "@typescript-eslint/typescript-estree": "4.24.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 24ee584b6616..5a02c2ca7dcc 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.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) diff --git a/packages/parser/package.json b/packages/parser/package.json index 3d1d4e994c68..fbbbe7e66090 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.23.0", + "version": "4.24.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.23.0", - "@typescript-eslint/types": "4.23.0", - "@typescript-eslint/typescript-estree": "4.23.0", + "@typescript-eslint/scope-manager": "4.24.0", + "@typescript-eslint/types": "4.24.0", + "@typescript-eslint/typescript-estree": "4.24.0", "debug": "^4.1.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.23.0", + "@typescript-eslint/experimental-utils": "4.24.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 0ed98170f798..2adcb03afc6c 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.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 0950b9c97ace..b5ea7cf462be 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.23.0", + "version": "4.24.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.23.0", - "@typescript-eslint/visitor-keys": "4.23.0" + "@typescript-eslint/types": "4.24.0", + "@typescript-eslint/visitor-keys": "4.24.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.23.0", + "@typescript-eslint/typescript-estree": "4.24.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 6419ab67f15f..304bc7076760 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.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) **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 a8e0d833683c..ba7b74508813 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.23.0", + "version": "4.24.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 0e43ee7cd8af..78d47dc326fc 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.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) diff --git a/packages/types/package.json b/packages/types/package.json index 46b53fd9fd9d..c8ffa8cbb58e 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.23.0", + "version": "4.24.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 6f3659179752..f9449b5152aa 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.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + # [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 4a3f520faed9..a350c25ef9d3 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.23.0", + "version": "4.24.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.23.0", - "@typescript-eslint/visitor-keys": "4.23.0", + "@typescript-eslint/types": "4.24.0", + "@typescript-eslint/visitor-keys": "4.24.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.23.0", + "@typescript-eslint/shared-fixtures": "4.24.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index ee37f1a8cc19..47b63a6189b4 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.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.23.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.22.1...v4.23.0) (2021-05-10) diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 018dd006a0cb..6c82988fd55e 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.23.0", + "version": "4.24.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.23.0", + "@typescript-eslint/types": "4.24.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 6291f38a9c274ee5211392ad961c88433e68767f Mon Sep 17 00:00:00 2001 From: Raphael Mobis Tacla Date: Tue, 18 May 2021 19:53:55 -0300 Subject: [PATCH 124/473] docs(eslint-plugin): [no-unnecessary-boolean-literal-compare] fix fixer docs (#3397) --- .../docs/rules/no-unnecessary-boolean-literal-compare.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md b/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md index 972b48a3bde0..2532504285f1 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md @@ -124,10 +124,10 @@ if (!(someNullCondition ?? true)) { | Comparison | Fixer Output | Notes | | :----------------------------: | ------------------------------- | ----------------------------------------------------------------------------------- | -| `booleanVar === true` | `booleanLiteral` | | -| `booleanVar !== true` | `!booleanLiteral` | | -| `booleanVar === false` | `!booleanLiteral` | | -| `booleanVar !== false` | `booleanLiteral` | | +| `booleanVar === true` | `booleanVar` | | +| `booleanVar !== true` | `!booleanVar` | | +| `booleanVar === false` | `!booleanVar` | | +| `booleanVar !== false` | `booleanVar` | | | `nullableBooleanVar === true` | `nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` | | `nullableBooleanVar !== true` | `!nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` | | `nullableBooleanVar === false` | `nullableBooleanVar ?? true` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` | From 9c678593bf7ceb804e32b5c844efd53295ecd767 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Wed, 19 May 2021 04:20:03 +0000 Subject: [PATCH 125/473] docs: updated no-delete-expression roadmap equivalent to no-dynamic-delete (#3406) --- packages/eslint-plugin/ROADMAP.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/eslint-plugin/ROADMAP.md b/packages/eslint-plugin/ROADMAP.md index 749ba2bdf829..83d16719c0b1 100644 --- a/packages/eslint-plugin/ROADMAP.md +++ b/packages/eslint-plugin/ROADMAP.md @@ -240,7 +240,7 @@ Relevant plugins: [`chai-expect-keywords`](https://github.com/gavinaiken/eslint- | `no-banned-terms` | 🌟 | [`no-caller`][no-caller] & [`no-eval`][no-eval] | | `no-constant-condition` | 🌟 | [`no-constant-condition`][no-constant-condition] | | `no-control-regex` | 🌟 | [`no-control-regex`][no-control-regex] | -| `no-delete-expression` | 🌓 | [`no-delete-var`][no-delete-var] | +| `no-delete-expression` | ✅ | [`@typescript-eslint/no-dynamic-delete`] | | `no-empty-line-after-opening-brace` | 🌟 | [`padded-blocks`][padded-blocks] [1] or [Prettier] | | `no-for-in` | 🌟 | [`no-restricted-syntax`][no-restricted-syntax] [2] | | `no-function-expression` | 🌟 | [`func-style`][func-style] [3] | @@ -583,7 +583,6 @@ Relevant plugins: [`chai-expect-keywords`](https://github.com/gavinaiken/eslint- [no-invalid-regexp]: https://eslint.org/docs/rules/no-invalid-regexp [no-regex-spaces]: https://eslint.org/docs/rules/no-regex-spaces [no-new-func]: https://eslint.org/docs/rules/no-new-func -[no-delete-var]: https://eslint.org/docs/rules/no-delete-var [padded-blocks]: https://eslint.org/docs/rules/padded-blocks [func-style]: https://eslint.org/docs/rules/func-style [no-multi-str]: https://eslint.org/docs/rules/no-multi-str From c15da67b939b615ed063291cde12c55c0d6d236e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Fri, 21 May 2021 02:37:31 +0200 Subject: [PATCH 126/473] fix(experimental-utils): fix `isAwaitKeyword` predicate in ast-utils (#3290) --- packages/experimental-utils/src/ast-utils/predicates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/experimental-utils/src/ast-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/predicates.ts index a7f722b810c6..3be38cbdf5c5 100644 --- a/packages/experimental-utils/src/ast-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/predicates.ts @@ -206,7 +206,7 @@ function isAwaitExpression( */ function isAwaitKeyword( node: TSESTree.Token | undefined | null, -): node is TSESTree.KeywordToken & { value: 'await' } { +): node is TSESTree.IdentifierToken & { value: 'await' } { return node?.type === AST_TOKEN_TYPES.Identifier && node.value === 'await'; } From 2319b0e1847991b8b8902ff4a3b779f1a27c7a45 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Thu, 20 May 2021 20:39:35 -0400 Subject: [PATCH 127/473] fix: corrected no-unsupported-browser-code in roadmap as unimplemented (#3407) --- packages/eslint-plugin/ROADMAP.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/ROADMAP.md b/packages/eslint-plugin/ROADMAP.md index 83d16719c0b1..67b5676533ed 100644 --- a/packages/eslint-plugin/ROADMAP.md +++ b/packages/eslint-plugin/ROADMAP.md @@ -299,7 +299,7 @@ Relevant plugins: [`chai-expect-keywords`](https://github.com/gavinaiken/eslint- | `no-document-write` | 🌓 | Use [`no-restricted-syntax`][no-restricted-syntax] | | `no-exec-script` | 🌓 | Use [`no-restricted-syntax`][no-restricted-syntax] | | `no-jquery-raw-elements` | 🛑 | N/A | -| `no-unsupported-browser-code` | 🔌 | [`eslint-plugin-compat`][plugin:compat] | +| `no-unsupported-browser-code` | 🛑 | N/A | | `react-this-binding-issue` | 🛑 | N/A | | `react-tsx-curly-spacing` | 🔌 | [`react/jsx-curly-spacing`] | | `react-unused-props-and-state` | 🌓 | [`react/no-unused-state`] | From 76e15ff752c55980b072d7b205c3b6ca322114e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 May 2021 17:40:46 -0700 Subject: [PATCH 128/473] chore: bump @babel/types from 7.14.1 to 7.14.2 (#3398) Bumps [@babel/types](https://github.com/babel/babel/tree/HEAD/packages/babel-types) from 7.14.1 to 7.14.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.2/packages/babel-types) 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 3facce7c4413..4afba47a8101 100644 --- a/yarn.lock +++ b/yarn.lock @@ -292,9 +292,9 @@ lodash "^4.17.19" "@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.14.1" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.1.tgz#095bd12f1c08ab63eff6e8f7745fa7c9cc15a9db" - integrity sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA== + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.2.tgz#4208ae003107ef8a057ea8333e56eb64d2f6a2c3" + integrity sha512-SdjAG/3DikRHpUOjxZgnkbR11xUlyDMUFJdvnIgZEE16mqmY0BINMmc4//JMJglEmn6i7sq6p+mGrFWyZ98EEw== dependencies: "@babel/helper-validator-identifier" "^7.14.0" to-fast-properties "^2.0.0" From 442f33a07eeb09ce83cdffc3f7a419b80c3ad7b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 May 2021 17:40:58 -0700 Subject: [PATCH 129/473] chore: bump @types/node from 15.0.2 to 15.3.0 (#3399) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.0.2 to 15.3.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) 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 4afba47a8101..a6098f8808da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2020,9 +2020,9 @@ form-data "^3.0.0" "@types/node@*", "@types/node@>= 8", "@types/node@^15.0.2": - version "15.0.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.0.2.tgz#51e9c0920d1b45936ea04341aa3e2e58d339fb67" - integrity sha512-p68+a+KoxpoB47015IeYZYRrdqMUcpbK8re/zpFB8Ld46LHC1lPEbp3EXgkEhAYEcPvjJF6ZO+869SQ0aH1dcA== + version "15.3.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.3.0.tgz#d6fed7d6bc6854306da3dea1af9f874b00783e26" + integrity sha512-8/bnjSZD86ZfpBsDlCIkNXIvm+h6wi9g7IqL+kmFkQ+Wvu3JrasgLElfiPgoo8V8vVfnEi0QVS12gbl94h9YsQ== "@types/node@10.17.13": version "10.17.13" From d27c0598f7f493ccde255b717a3a72ed3a65a730 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 May 2021 17:41:47 -0700 Subject: [PATCH 130/473] chore: bump cspell from 5.4.0 to 5.4.1 (#3401) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.4.0 to 5.4.1. - [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.4.0...v5.4.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 101 +++++++++++++++++++++++++++++------------------------- 1 file changed, 55 insertions(+), 46 deletions(-) diff --git a/yarn.lock b/yarn.lock index a6098f8808da..bae1f934ae9f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -460,10 +460,10 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.4.0.tgz#ef241c9cee00e674fd8ac034bd1dacec77d94f5c" - integrity sha512-aZyml0UaJ2BXmqcrjdMJWyKGQVu33FQ1eRsnV2SZ4WkdkRsxPtdQoFDi+lKSSvIEYSfRkis6lffzwvp0CPQOmw== +"@cspell/cspell-bundled-dicts@^5.4.1": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.4.1.tgz#d06a921d518e9705551edaf391369904e721c918" + integrity sha512-EkghG4i5rf2DDDGX2qlRDiBGzYlHhgBcnxIUzOo/DBTRKKPgrvGJ244V83DHw3ttBUPfzcHrEJIBu5nGfYaMfw== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" @@ -497,13 +497,13 @@ "@cspell/dict-ruby" "^1.0.13" "@cspell/dict-rust" "^1.0.22" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.28" + "@cspell/dict-software-terms" "^1.0.29" "@cspell/dict-typescript" "^1.0.17" -"@cspell/cspell-types@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.4.0.tgz#af555d9a9c08a75cdd2b38bac259a5127a59cb31" - integrity sha512-mQM+65u0jbTilhj0Mrnufk3jC7dWRymlWdxVK9phLRqtJsDJsxpa0opumVw1CnoBHfPj6HnW7SBGufmcCQp/PQ== +"@cspell/cspell-types@^5.4.1": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.4.1.tgz#75560fc7873ede01d1e9e8913ce64190fb1c8b38" + integrity sha512-Z+L3aYZTfMePmDetfCjyc/VrxDfbdhS4F8Zvs2aTaEFTiiLefzvBo6yn3KCV2irXeb3wL70PTabrej+1QStKxg== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -665,10 +665,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.28": - version "1.0.28" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.28.tgz#0c26bbfa89546d257b52cd433000ba7fe86a1901" - integrity sha512-N/5H+J68CgToDSZiMMSJl3ws5qU7GJOj1sXZ9oXr1wojvu/qifCp32zDh8hzFWrZF1VUdnStusNVTeW1Wq4Pog== +"@cspell/dict-software-terms@^1.0.29": + version "1.0.29" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.29.tgz#da9218f94ee0209a4867f1129725d78335e7d8f5" + integrity sha512-cW4HTLqV5ckUmdL5JpRuHw7MrybsEtE/941US4qqmrkWpINgodYF6mhPBVzGNH2guL/dAznlCInDho4IDoe3qA== "@cspell/dict-typescript@^1.0.17": version "1.0.17" @@ -3256,62 +3256,62 @@ 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.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.4.0.tgz#13a2948e9e1defc59f25d76a9a95134521057cfe" - integrity sha512-4CwXDdO3Z0VdfZcD7OS7zFM8h5ay2ZHtzoc5oPLmxSs+tNQdRGNeFSPIv6CNt80AqILtZrlO7nVIbA6KtARqYA== +cspell-glob@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.4.1.tgz#c022284adf695f6fccedfab72dd82869795530ce" + integrity sha512-mxyCuzDYjEhgDRcan8KuZtwPw90/Fw6mlIuMHcENwmVUack4uXsmBcwzmax6nBpEdb8Ck+FF4Iav5EOOo8oXJA== dependencies: micromatch "^4.0.4" -cspell-io@^5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.4.0.tgz#b2b74f3cf20db86ca37b4c3a7f648b8db7184f4e" - integrity sha512-VIPb/TmTNK/dG5nrbGhuhvWZQYAFXpYQQJ4hmlmuczhhQ2Qw1YSkRgoEB4Ir0neoRJTeEM2x5tgvSJCOwflSuA== +cspell-io@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.4.1.tgz#0c39e2b4e112282e68c1af4b7e8b25eb4377e18e" + integrity sha512-hf+kErIND/UiMh9qyJ9COJ73mrjrerf+XV4t6M5IkgfGW0qpDXUtORUHA3NNWtB1U7GbKVH7HpInjJ3XGAjcRw== dependencies: iconv-lite "^0.6.2" iterable-to-stream "^1.0.1" -cspell-lib@^5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.4.0.tgz#8e60a2ad7d46e79965bcb95cff9f1d97c37b65f1" - integrity sha512-ja1zvRF+pNi+hioWYZUGpWGXPFfhDujd+qbAoQ08It4xMTVER8cDYQpSo2ll4DPJ2YphPW//2Br6TBvQ5xO50Q== +cspell-lib@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.4.1.tgz#79595fedd4f48449c54ecba220603bb410f8dac3" + integrity sha512-Hj7Gv6wy3lEx3Hb8slILCU5CvxruXDWeCviolSsdYK6M83fRevNH+O0fIWkyW5NPv9AcW2FB+/FaJ5HAxDAtwQ== dependencies: - "@cspell/cspell-bundled-dicts" "^5.4.0" - "@cspell/cspell-types" "^5.4.0" + "@cspell/cspell-bundled-dicts" "^5.4.1" + "@cspell/cspell-types" "^5.4.1" comment-json "^4.1.0" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-glob "^5.4.0" - cspell-io "^5.4.0" - cspell-trie-lib "^5.4.0" - fs-extra "^9.1.0" + cspell-glob "^5.4.1" + cspell-io "^5.4.1" + cspell-trie-lib "^5.4.1" + fs-extra "^10.0.0" gensequence "^3.1.1" resolve-from "^5.0.0" resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.4.0.tgz#bfe721b6a5e5885f3edb73b5861500c142f3b46b" - integrity sha512-IpDFdOoUEdiyzDGEUCIAoAUenIMy0FjOKotmsl9GTbOyq0XPHE6s7Yz5s9pFzX9IHxvsJ7Plhvn627k7QAC6DQ== +cspell-trie-lib@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.4.1.tgz#0210890db497e5c514829afc0a2744921e48c4c2" + integrity sha512-+yla0OQ4mgCtRYRbRRQ9Udg91mSwwXD2RfkuMMMjDUmjnIp/63+08w68TyWW3faolXKF/uR5ya9ItZfee+juCQ== dependencies: - fs-extra "^9.1.0" + fs-extra "^10.0.0" gensequence "^3.1.1" cspell@^5.2.4: - version "5.4.0" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.4.0.tgz#3cafddc67b445deaea52b72af318b8c716891748" - integrity sha512-613oEbxry/xJWrFf/r6RS3jQ88Az0W3LRazGi0s+tcIAlprJn78inTKUn23oQslhoF0dhYADJdFaR6Q4Fd6+zw== + version "5.4.1" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.4.1.tgz#5b92cf2886a4478aa285d14eaa404033437bb98d" + integrity sha512-P4Vgfh8+SbdtbOp6boqFe1z7dVHoJif+Z55S6gQNR/KUrBFzajZEYKYjkDnWAHFV1zG6JcJinMzqDdc/EfiAGQ== dependencies: - "@cspell/cspell-types" "^5.4.0" + "@cspell/cspell-types" "^5.4.1" chalk "^4.1.1" commander "^7.2.0" comment-json "^4.1.0" - cspell-glob "^5.4.0" - cspell-lib "^5.4.0" - fs-extra "^9.1.0" + cspell-glob "^5.4.1" + cspell-lib "^5.4.1" + fs-extra "^10.0.0" get-stdin "^8.0.0" - glob "^7.1.6" + glob "^7.1.7" strip-ansi "^6.0.0" cssom@^0.4.4: @@ -4335,7 +4335,16 @@ fs-extra@8.1.0, fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.0.0, fs-extra@^9.1.0: +fs-extra@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" + integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^9.0.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== @@ -4572,7 +4581,7 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@*, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.6: +glob@*, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, glob@~7.1.6: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== From 4cd7a77376e6534b3633594f89cd4736805c0d8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 May 2021 17:41:57 -0700 Subject: [PATCH 131/473] chore: bump @types/lodash from 4.14.168 to 4.14.169 (#3402) Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.168 to 4.14.169. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) 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 bae1f934ae9f..0a0b28cf40ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1992,9 +1992,9 @@ integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= "@types/lodash@*", "@types/lodash@^4.14.149": - version "4.14.168" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.168.tgz#fe24632e79b7ade3f132891afff86caa5e5ce008" - integrity sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q== + version "4.14.169" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.169.tgz#83c217688f07a4d9ef8f28a3ebd1d318f6ff4cbb" + integrity sha512-DvmZHoHTFJ8zhVYwCLWbQ7uAbYQEk52Ev2/ZiQ7Y7gQGeV9pjBqjnQpECMHfKS1rCYAhMI7LHVxwyZLZinJgdw== "@types/marked@*", "@types/marked@^2.0.0": version "2.0.2" From c035f028739d811942aaf7257adca6931847d146 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 May 2021 19:03:29 -0700 Subject: [PATCH 132/473] chore: bump @commitlint/config-lerna-scopes from 12.1.1 to 12.1.4 (#3409) Bumps [@commitlint/config-lerna-scopes](https://github.com/conventional-changelog/commitlint) from 12.1.1 to 12.1.4. - [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.1.1...v12.1.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 0a0b28cf40ab..9f8cc2021c09 100644 --- a/yarn.lock +++ b/yarn.lock @@ -336,9 +336,9 @@ conventional-changelog-conventionalcommits "^4.3.1" "@commitlint/config-lerna-scopes@^12.0.1": - 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== + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/config-lerna-scopes/-/config-lerna-scopes-12.1.4.tgz#af6786d2a479eb4c90838782368bb3958547327a" + integrity sha512-D/VqvATs8fYi2CFpFdjLYeOHGm/KkxUSehGqwIPJfYXHHua19V5UqmUOeXTNAJaD+bTpiHvoBTK75NcmWpBQSg== dependencies: globby "^11.0.1" import-from "3.0.0" From cae42539dbe746fb58a010e2b085c0c42649b178 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 May 2021 19:04:15 -0700 Subject: [PATCH 133/473] chore: bump @types/semver from 7.3.5 to 7.3.6 (#3412) Bumps [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) from 7.3.5 to 7.3.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver) 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 9f8cc2021c09..e0115acfb0f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2053,9 +2053,9 @@ "@types/node" "*" "@types/semver@*", "@types/semver@^7.3.4": - version "7.3.5" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.5.tgz#74deebbbcb1e86634dbf10a5b5e8798626f5a597" - integrity sha512-iotVxtCCsPLRAvxMFFgxL8HD2l4mAZ2Oin7/VJ2ooWO0VOK4EGOGmZWZn1uCq7RofR3I/1IOSjCHlFT71eVK0Q== + version "7.3.6" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.6.tgz#e9831776f4512a7ba6da53e71c26e5fb67882d63" + integrity sha512-0caWDWmpCp0uifxFh+FaqK3CuZ2SkRR/ZRxAV5+zNdC3QVUi6wyOJnefhPvtNt8NQWXB5OA93BUvZsXpWat2Xw== "@types/stack-utils@^2.0.0": version "2.0.0" From 7b1aabb7bb3e60808be413061804fe44c055336a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 May 2021 19:04:26 -0700 Subject: [PATCH 134/473] chore: bump @commitlint/config-conventional from 12.1.1 to 12.1.4 (#3413) Bumps [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint) from 12.1.1 to 12.1.4. - [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.1.1...v12.1.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 e0115acfb0f1..784e50a89d99 100644 --- a/yarn.lock +++ b/yarn.lock @@ -329,9 +329,9 @@ yargs "^16.2.0" "@commitlint/config-conventional@^12.0.1": - 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== + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-12.1.4.tgz#95bbab622f117a8a3e49f95917b08655040c66a8" + integrity sha512-ZIdzmdy4o4WyqywMEpprRCrehjCSQrHkaRTVZV411GyLigFQHlEBSJITAihLAWe88Qy/8SyoIe5uKvAsV5vRqQ== dependencies: conventional-changelog-conventionalcommits "^4.3.1" From e6b7b3c8f4f5073f305194c80b08974059f08cec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 May 2021 21:12:22 -0700 Subject: [PATCH 135/473] chore: bump @microsoft/api-extractor from 7.15.1 to 7.15.2 (#3415) Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack) from 7.15.1 to 7.15.2. - [Release notes](https://github.com/microsoft/rushstack/releases) - [Commits](https://github.com/microsoft/rushstack/compare/@microsoft/api-extractor_v7.15.1...@microsoft/api-extractor_v7.15.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/yarn.lock b/yarn.lock index 784e50a89d99..b936c6cba46e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1637,24 +1637,24 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@microsoft/api-extractor-model@7.13.1": - version "7.13.1" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.1.tgz#6dd9c4bd49b5d0d32b44c564a94c34b3c3aa2a87" - integrity sha512-PKAjDmAJ6X07tvqCHSN1PRaKq8bZQXF9QI6WGEMnCHNFWwXUoITOAcvFW0Ol3TzwHO5rLbuy/CqWebfhv8eOtw== +"@microsoft/api-extractor-model@7.13.2": + version "7.13.2" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.2.tgz#7e640dbd421cc95a28e03c5a949d8ebcc63c936d" + integrity sha512-gA9Q8q5TPM2YYk7rLinAv9KqcodrmRC13BVmNzLswjtFxpz13lRh0BmrqD01/sddGpGMIuWFYlfUM4VSWxnggA== dependencies: "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.37.0" + "@rushstack/node-core-library" "3.38.0" "@microsoft/api-extractor@^7.13.2": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.15.1.tgz#c3791933367ddded72a2f1d3c437e17fa050eac5" - integrity sha512-PYbGAvxbM5B6HbafXY7tJ4ObYpeUZrZFt9vlN68tpYG/7aeldMLAZSjTyB30VFXaGlArjeEooKZIcs2ZnVAbNg== + version "7.15.2" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.15.2.tgz#7a06b857660e33d1cdc050d576eb6c6c05dc532a" + integrity sha512-/Y/n+QOc1vM6Vg3OAUByT/wXdZciE7jV3ay33+vxl3aKva5cNsuOauL14T7XQWUiLko3ilPwrcnFcEjzXpLsuA== dependencies: - "@microsoft/api-extractor-model" "7.13.1" + "@microsoft/api-extractor-model" "7.13.2" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.37.0" + "@rushstack/node-core-library" "3.38.0" "@rushstack/rig-package" "0.2.12" "@rushstack/ts-command-line" "4.7.10" colors "~1.2.1" @@ -1822,10 +1822,10 @@ dependencies: "@types/node" ">= 8" -"@rushstack/node-core-library@3.37.0": - version "3.37.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.37.0.tgz#6e8ebfdbe2829d380bc827bbb450361fb48e142c" - integrity sha512-b0OGvl20zfepytLBnKsOtemtiadNZAVolXxaSYssV9VjXaLPF97oLvtLfwc58BX05ufIsrKZgXatnRo8YeffNg== +"@rushstack/node-core-library@3.38.0": + version "3.38.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.38.0.tgz#da1cc87f9ad141b06d4ce7c8eafb09b542c10e75" + integrity sha512-cmvl0yQx8sSmbuXwiRYJi8TO+jpTtrLJQ8UmFHhKvgPVJAW8cV8dnpD1Xx/BvTGrJZ2XtRAIkAhBS9okBnap4w== dependencies: "@types/node" "10.17.13" colors "~1.2.1" From d7c1b7b6b8276be8c2be59625c07fa4c91f3baed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 May 2021 21:12:31 -0700 Subject: [PATCH 136/473] chore: bump marked from 2.0.3 to 2.0.4 (#3414) Bumps [marked](https://github.com/markedjs/marked) from 2.0.3 to 2.0.4. - [Release notes](https://github.com/markedjs/marked/releases) - [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js) - [Commits](https://github.com/markedjs/marked/compare/v2.0.3...v2.0.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 b936c6cba46e..b728643d1358 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6363,9 +6363,9 @@ markdownlint@~0.23.1: markdown-it "12.0.4" marked@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.3.tgz#3551c4958c4da36897bda2a16812ef1399c8d6b0" - integrity sha512-5otztIIcJfPc2qGTN8cVtOJEjNJZ0jwa46INMagrYfk0EvqtRuEHLsEe0LrFS0/q+ZRKT0+kXK7P2T1AN5lWRA== + version "2.0.4" + resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.4.tgz#71d54d41f27d91ac2ed308f73c301fe9f0657a94" + integrity sha512-MIL0xKRDQM3DE7dJr/wa6JV0EmK9yZ3cwuTc2bu66FNm/tmEMm9cJCgJZpt9R+K1T+pB2iBNV55wvnwSd345zg== mdurl@^1.0.1: version "1.0.1" From 02acc4f528c92efb4a7023ee3fa26413fd6180bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 May 2021 21:12:39 -0700 Subject: [PATCH 137/473] chore: bump @types/node from 15.3.0 to 15.3.1 (#3410) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.3.0 to 15.3.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) 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 b728643d1358..2d44f73beda8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2020,9 +2020,9 @@ form-data "^3.0.0" "@types/node@*", "@types/node@>= 8", "@types/node@^15.0.2": - version "15.3.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.3.0.tgz#d6fed7d6bc6854306da3dea1af9f874b00783e26" - integrity sha512-8/bnjSZD86ZfpBsDlCIkNXIvm+h6wi9g7IqL+kmFkQ+Wvu3JrasgLElfiPgoo8V8vVfnEi0QVS12gbl94h9YsQ== + version "15.3.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.3.1.tgz#23a06b87eedb524016616e886b116b8fdcb180af" + integrity sha512-weaeiP4UF4XgF++3rpQhpIJWsCTS4QJw5gvBhQu6cFIxTwyxWIe3xbnrY/o2lTCQ0lsdb8YIUDUvLR4Vuz5rbw== "@types/node@10.17.13": version "10.17.13" From 4a20ee5f8be2499c22635f662cd152807a7172ff Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 22 May 2021 12:15:28 -0700 Subject: [PATCH 138/473] chore: update typescript to 4.3-rc (#3426) Ref #3272 --- README.md | 2 +- package.json | 4 ++-- .../eslint-plugin/src/rules/dot-notation.ts | 1 + packages/typescript-estree/package.json | 4 ++-- packages/typescript-estree/src/convert.ts | 2 +- packages/typescript-estree/src/parser.ts | 4 ++-- .../tests/ast-alignment/utils.ts | 4 ++++ .../lib/__snapshots__/convert.test.ts.snap | 7 ------- .../typescript-estree/tests/lib/convert.test.ts | 3 +-- .../jsx/namespace-this-name.src.js.shot | 2 +- .../enum-with-keywords.src.ts.shot | 6 ------ yarn.lock | 17 +++++++++++------ 12 files changed, 26 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index d8abbe324a96..25a1a58f3eda 100644 --- a/README.md +++ b/README.md @@ -233,7 +233,7 @@ The latest version under the `canary` tag **(latest commit to master)** is: ## Supported TypeScript Version -**The version range of TypeScript currently supported by this parser is `>=3.3.1 <4.3.0`.** +**The version range of TypeScript currently supported by this parser is `>=3.3.1 <4.4.0`.** These versions are what we test against. diff --git a/package.json b/package.json index 61fff8533211..ea5995ab64d2 100644 --- a/package.json +++ b/package.json @@ -113,9 +113,9 @@ "ts-jest": "^26.5.1", "ts-node": "^9.0.0", "tslint": "^6.1.3", - "typescript": ">=3.3.1 <4.3.0" + "typescript": ">=3.3.1 <4.4.0 || 4.3.1-rc" }, "resolutions": { - "typescript": "4.2.2" + "typescript": "4.3.1-rc" } } diff --git a/packages/eslint-plugin/src/rules/dot-notation.ts b/packages/eslint-plugin/src/rules/dot-notation.ts index 055b97ecab25..b93dc8d035a7 100644 --- a/packages/eslint-plugin/src/rules/dot-notation.ts +++ b/packages/eslint-plugin/src/rules/dot-notation.ts @@ -77,6 +77,7 @@ export default createRule({ (options.allowIndexSignaturePropertyAccess ?? false) || tsutils.isCompilerOptionEnabled( program.getCompilerOptions(), + // @ts-expect-error - TS is refining the type to never for some reason 'noPropertyAccessFromIndexSignature', ); diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index a350c25ef9d3..15e1ec911bc1 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -51,8 +51,8 @@ }, "devDependencies": { "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.13.11", - "@babel/types": "^7.13.0", + "@babel/parser": "^7.14.3", + "@babel/types": "^7.14.2", "@types/babel__code-frame": "*", "@types/debug": "*", "@types/glob": "*", diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index aad29f9b1467..3f14454384d6 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -500,7 +500,7 @@ export class Converter { Object.entries(node) .filter( ([key]) => - !/^(?:_children|kind|parent|pos|end|flags|modifierFlagsCache|jsDoc|type|typeArguments|typeParameters|decorators)$/.test( + !/^(?:_children|kind|parent|pos|end|flags|modifierFlagsCache|jsDoc|type|typeArguments|typeParameters|decorators|transformFlags)$/.test( key, ), ) diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index 300a73c6f1db..fdbeaa6fa069 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -25,12 +25,12 @@ const log = debug('typescript-eslint:typescript-estree:parser'); * This needs to be kept in sync with the top-level README.md in the * typescript-eslint monorepo */ -const SUPPORTED_TYPESCRIPT_VERSIONS = '>=3.3.1 <4.3.0'; +const SUPPORTED_TYPESCRIPT_VERSIONS = '>=3.3.1 <4.4.0'; /* * The semver package will ignore prerelease ranges, and we don't want to explicitly document every one * List them all separately here, so we can automatically create the full string */ -const SUPPORTED_PRERELEASE_RANGES: string[] = ['4.1.1-rc', '4.1.0-beta']; +const SUPPORTED_PRERELEASE_RANGES: string[] = ['4.3.0-beta', '4.3.1-rc']; const ACTIVE_TYPESCRIPT_VERSION = ts.version; const isRunningSupportedTypeScriptVersion = semver.satisfies( ACTIVE_TYPESCRIPT_VERSION, diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index 99956cb694f0..b0c7c990553d 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -126,6 +126,10 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any { node.params = node.parameters; delete node.parameters; } + if (node.kind) { + // TODO - remove this once we support accessor signatures + delete node.kind; + } }, /** * We want this node to be different diff --git a/packages/typescript-estree/tests/lib/__snapshots__/convert.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/convert.test.ts.snap index 7da28080eb36..ef7abcee4f4a 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/convert.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/convert.test.ts.snap @@ -22,7 +22,6 @@ Object { 12, 12, ], - "transformFlags": 0, "type": "TSEndOfFileToken", }, "externalModuleIndicator": undefined, @@ -170,7 +169,6 @@ Object { }, ], "text": "new foo()", - "transformFlags": 9, "type": "TSSourceFile", "typeReferenceDirectives": Array [], } @@ -210,7 +208,6 @@ Object { 5, 8, ], - "transformFlags": 0, "type": "TSUnparsedPrologue", }, "nextContainer": undefined, @@ -219,7 +216,6 @@ Object { 35, ], "symbol": undefined, - "transformFlags": 1, "type": "TSUnparsedPrologue", "typeAnnotation": null, "typeParameters": null, @@ -322,7 +318,6 @@ Object { 18, ], "symbol": undefined, - "transformFlags": 2305, "type": "TSClassDeclaration", "typeParameters": null, } @@ -363,7 +358,6 @@ Object { 0, 12, ], - "transformFlags": 9, "type": "TSNewExpression", "typeParameters": Object { "loc": Object { @@ -464,7 +458,6 @@ Object { 15, ], "symbol": undefined, - "transformFlags": 257, "type": "TSClassDeclaration", "typeParameters": Object { "loc": Object { diff --git a/packages/typescript-estree/tests/lib/convert.test.ts b/packages/typescript-estree/tests/lib/convert.test.ts index a95916138d76..b26390b7f750 100644 --- a/packages/typescript-estree/tests/lib/convert.test.ts +++ b/packages/typescript-estree/tests/lib/convert.test.ts @@ -19,8 +19,7 @@ describe('convert', () => { function fakeUnknownKind(node: ts.Node): void { ts.forEachChild(node, fakeUnknownKind); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- intentionally writing to a readonly field - // @ts-expect-error + // @ts-expect-error -- intentionally writing to a readonly field node.kind = ts.SyntaxKind.UnparsedPrologue; } diff --git a/packages/typescript-estree/tests/snapshots/jsx/namespace-this-name.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/namespace-this-name.src.js.shot index 58e66b804b7e..46d670895846 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/namespace-this-name.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/namespace-this-name.src.js.shot @@ -163,7 +163,7 @@ Object { 1, 9, ], - "type": "Keyword", + "type": "JSXIdentifier", "value": "this:bar", }, Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/enum-with-keywords.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/enum-with-keywords.src.ts.shot index 2a93eb27f3d4..8eb4625590f3 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/enum-with-keywords.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/enum-with-keywords.src.ts.shot @@ -50,7 +50,6 @@ Object { 7, 14, ], - "transformFlags": 1, "type": "TSPrivateKeyword", }, Object { @@ -68,7 +67,6 @@ Object { 15, 21, ], - "transformFlags": 1, "type": "TSPublicKeyword", }, Object { @@ -86,7 +84,6 @@ Object { 22, 31, ], - "transformFlags": 1, "type": "TSProtectedKeyword", }, Object { @@ -104,7 +101,6 @@ Object { 32, 38, ], - "transformFlags": 256, "type": "TSStaticKeyword", }, Object { @@ -122,7 +118,6 @@ Object { 39, 47, ], - "transformFlags": 1, "type": "TSReadonlyKeyword", }, Object { @@ -157,7 +152,6 @@ Object { 57, 62, ], - "transformFlags": 96, "type": "TSAsyncKeyword", }, ], diff --git a/yarn.lock b/yarn.lock index 2d44f73beda8..281160f5ca14 100644 --- a/yarn.lock +++ b/yarn.lock @@ -171,11 +171,16 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.10", "@babel/parser@^7.13.11": +"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.10": version "7.13.15" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.15.tgz#8e66775fb523599acb6a289e12929fa5ab0954d8" integrity sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ== +"@babel/parser@^7.14.3": + version "7.14.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.3.tgz#9b530eecb071fd0c93519df25c5ff9f14759f298" + integrity sha512-7MpZDIfI7sUC5zWo2+foJ50CSI5lcqDehZ0lVgIhSi4bFEk94fLAKlF3Q0nzSQQ+ca0lm+O6G9ztKVBeu8PMRQ== + "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" @@ -291,7 +296,7 @@ globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3": +"@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.0", "@babel/types@^7.14.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3": version "7.14.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.2.tgz#4208ae003107ef8a057ea8333e56eb64d2f6a2c3" integrity sha512-SdjAG/3DikRHpUOjxZgnkbR11xUlyDMUFJdvnIgZEE16mqmY0BINMmc4//JMJglEmn6i7sq6p+mGrFWyZ98EEw== @@ -8858,10 +8863,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.2.2, "typescript@>=3.3.1 <4.3.0", typescript@^4.1.0-dev.20201026, typescript@~4.2.4: - version "4.2.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.2.tgz#1450f020618f872db0ea17317d16d8da8ddb8c4c" - integrity sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ== +typescript@*, typescript@4.3.1-rc, "typescript@>=3.3.1 <4.4.0 || 4.3.1-rc", typescript@^4.1.0-dev.20201026, typescript@~4.2.4: + version "4.3.1-rc" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.1-rc.tgz#925149c8d8514e20a6bd8d4bd7f42adac67ab59c" + integrity sha512-L3uJ0gcntaRaKni9aV2amYB+pCDVodKe/B5+IREyvtKGsDOF7cYjchHb/B894skqkgD52ykRuWatIZMqEsHIqA== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" From b830b7f4e8a99affc8af8b53cb83371ef81d7032 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 22 May 2021 12:16:12 -0700 Subject: [PATCH 139/473] feat(typescript-estree): add support for getter/setter signatures on types (#3427) * chore: update typescript to 4.3-rc Ref #3272 * feat(typescript-estree): add support for getter/setter signatures on types Ref #3272 --- .eslintrc.js | 4 + .../src/element/TSMethodSignature/spec.ts | 1 + .../types/interface-with-accessors.src.ts | 4 + .../object-literal-type-with-accessors.src.ts | 4 + packages/typescript-estree/src/convert.ts | 108 ++- .../src/ts-estree/estree-to-ts-node-types.ts | 5 +- .../semantic-diagnostics-enabled.test.ts.snap | 4 + .../export-default-interface.src.ts.shot | 1 + ...erface-with-all-property-types.src.ts.shot | 4 + .../basics/interface-with-jsdoc.src.ts.shot | 1 + .../basics/interface-with-method.src.ts.shot | 2 + ...rface-with-optional-properties.src.ts.shot | 1 + .../type-assertion-in-interface.src.ts.shot | 1 + ...ertion-with-guard-in-interface.src.ts.shot | 1 + .../type-guard-in-interface.src.ts.shot | 1 + .../basics/typed-method-signature.src.ts.shot | 2 + .../typescript/basics/typed-this.src.ts.shot | 1 + ...parameters-in-method-signature.src.ts.shot | 1 + .../interface-method-export.src.ts.shot | 1 + .../interface-method-private.src.ts.shot | 1 + .../interface-method-protected.src.ts.shot | 1 + .../interface-method-public.src.ts.shot | 1 + .../interface-method-readonly.src.ts.shot | 1 + .../interface-method-static.src.ts.shot | 1 + .../interface-with-accessors.src.ts.shot | 711 +++++++++++++++++ ...ct-literal-type-with-accessors.src.ts.shot | 747 ++++++++++++++++++ 26 files changed, 1570 insertions(+), 40 deletions(-) create mode 100644 packages/shared-fixtures/fixtures/typescript/types/interface-with-accessors.src.ts create mode 100644 packages/shared-fixtures/fixtures/typescript/types/object-literal-type-with-accessors.src.ts create mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/interface-with-accessors.src.ts.shot create mode 100644 packages/typescript-estree/tests/snapshots/typescript/types/object-literal-type-with-accessors.src.ts.shot diff --git a/.eslintrc.js b/.eslintrc.js index c02abfbd7a8d..1deda3b592ca 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -87,6 +87,10 @@ module.exports = { 'no-mixed-operators': 'error', 'no-console': 'error', 'no-process-exit': 'error', + 'no-fallthrough': [ + 'warn', + { commentPattern: '.*intentional fallthrough.*' }, + ], // // eslint-plugin-eslint-comment diff --git a/packages/ast-spec/src/element/TSMethodSignature/spec.ts b/packages/ast-spec/src/element/TSMethodSignature/spec.ts index 76b2e71ab3ad..5ca7cbead3e0 100644 --- a/packages/ast-spec/src/element/TSMethodSignature/spec.ts +++ b/packages/ast-spec/src/element/TSMethodSignature/spec.ts @@ -22,6 +22,7 @@ interface TSMethodSignatureBase extends BaseNode { accessibility?: Accessibility; export?: boolean; static?: boolean; + kind: 'get' | 'method' | 'set'; } export interface TSMethodSignatureComputedName extends TSMethodSignatureBase { diff --git a/packages/shared-fixtures/fixtures/typescript/types/interface-with-accessors.src.ts b/packages/shared-fixtures/fixtures/typescript/types/interface-with-accessors.src.ts new file mode 100644 index 000000000000..d4eda64b2187 --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/types/interface-with-accessors.src.ts @@ -0,0 +1,4 @@ +interface Thing { + get size(): number; + set size(value: number | string | boolean); +} diff --git a/packages/shared-fixtures/fixtures/typescript/types/object-literal-type-with-accessors.src.ts b/packages/shared-fixtures/fixtures/typescript/types/object-literal-type-with-accessors.src.ts new file mode 100644 index 000000000000..61666608a103 --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/types/object-literal-type-with-accessors.src.ts @@ -0,0 +1,4 @@ +type Thing = { + get size(): number; + set size(value: number | string | boolean); +}; diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 3f14454384d6..595d284237c4 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -593,6 +593,65 @@ export class Converter { return result; } + private convertMethodSignature( + node: + | ts.MethodSignature + | ts.GetAccessorDeclaration + | ts.SetAccessorDeclaration, + ): TSESTree.TSMethodSignature { + const result = this.createNode(node, { + type: AST_NODE_TYPES.TSMethodSignature, + computed: isComputedProperty(node.name), + key: this.convertChild(node.name), + params: this.convertParameters(node.parameters), + kind: ((): 'get' | 'set' | 'method' => { + switch (node.kind) { + case SyntaxKind.GetAccessor: + return 'get'; + + case SyntaxKind.SetAccessor: + return 'set'; + + case SyntaxKind.MethodSignature: + return 'method'; + } + })(), + }); + + if (isOptional(node)) { + result.optional = true; + } + + if (node.type) { + result.returnType = this.convertTypeAnnotation(node.type, node); + } + + if (hasModifier(SyntaxKind.ReadonlyKeyword, node)) { + result.readonly = true; + } + + if (node.typeParameters) { + result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( + node.typeParameters, + ); + } + + const accessibility = getTSNodeAccessibility(node); + if (accessibility) { + result.accessibility = accessibility; + } + + if (hasModifier(SyntaxKind.ExportKeyword, node)) { + result.export = true; + } + + if (hasModifier(SyntaxKind.StaticKeyword, node)) { + result.static = true; + } + + return result; + } + /** * Applies the given TS modifiers to the given result object. * @param result @@ -1069,7 +1128,15 @@ export class Converter { } case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: + case SyntaxKind.SetAccessor: { + if ( + node.parent.kind === SyntaxKind.InterfaceDeclaration || + node.parent.kind === SyntaxKind.TypeLiteral + ) { + return this.convertMethodSignature(node); + } + } + // otherwise, it is a non-type accessor - intentional fallthrough case SyntaxKind.MethodDeclaration: { const method = this.createNode< TSESTree.TSEmptyBodyFunctionExpression | TSESTree.FunctionExpression @@ -2340,44 +2407,7 @@ export class Converter { } case SyntaxKind.MethodSignature: { - const result = this.createNode(node, { - type: AST_NODE_TYPES.TSMethodSignature, - computed: isComputedProperty(node.name), - key: this.convertChild(node.name), - params: this.convertParameters(node.parameters), - }); - - if (isOptional(node)) { - result.optional = true; - } - - if (node.type) { - result.returnType = this.convertTypeAnnotation(node.type, node); - } - - if (hasModifier(SyntaxKind.ReadonlyKeyword, node)) { - result.readonly = true; - } - - if (node.typeParameters) { - result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( - node.typeParameters, - ); - } - - const accessibility = getTSNodeAccessibility(node); - if (accessibility) { - result.accessibility = accessibility; - } - - if (hasModifier(SyntaxKind.ExportKeyword, node)) { - result.export = true; - } - - if (hasModifier(SyntaxKind.StaticKeyword, node)) { - result.static = true; - } - return result; + return this.convertMethodSignature(node); } case SyntaxKind.PropertySignature: { diff --git a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts index 92ef8c42e604..0f74c42ac64f 100644 --- a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts +++ b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts @@ -180,7 +180,10 @@ export interface EstreeToTsNodeTypes { [AST_NODE_TYPES.TSIntersectionType]: ts.IntersectionTypeNode; [AST_NODE_TYPES.TSLiteralType]: ts.LiteralTypeNode; [AST_NODE_TYPES.TSMappedType]: ts.MappedTypeNode; - [AST_NODE_TYPES.TSMethodSignature]: ts.MethodSignature; + [AST_NODE_TYPES.TSMethodSignature]: + | ts.MethodSignature + | ts.GetAccessorDeclaration + | ts.SetAccessorDeclaration; [AST_NODE_TYPES.TSModuleBlock]: ts.ModuleBlock; [AST_NODE_TYPES.TSModuleDeclaration]: ts.ModuleDeclaration; [AST_NODE_TYPES.TSNamedTupleMember]: ts.NamedTupleMember; diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap index 7094769a4ad6..641c388c3ef2 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap @@ -2639,6 +2639,8 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/indexed.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/interface-with-accessors.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/intersection-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/literal-number.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -2661,6 +2663,8 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/nested-types.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/object-literal-type-with-accessors.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/parenthesized-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/reference.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/export-default-interface.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/export-default-interface.src.ts.shot index cfcdd7ad177e..d77785922709 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/export-default-interface.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/export-default-interface.src.ts.shot @@ -27,6 +27,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 18, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-all-property-types.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-all-property-types.src.ts.shot index af58d87e382b..dece748c4b2d 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-all-property-types.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-all-property-types.src.ts.shot @@ -431,6 +431,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 16, @@ -502,6 +503,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 24, @@ -629,6 +631,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 26, @@ -756,6 +759,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 26, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-jsdoc.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-jsdoc.src.ts.shot index c20b0a2d981f..c4299c7644cb 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-jsdoc.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-jsdoc.src.ts.shot @@ -26,6 +26,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 13, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-method.src.ts.shot index 537cc8b236fb..f94e34982985 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-method.src.ts.shot @@ -26,6 +26,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 23, @@ -150,6 +151,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 18, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-optional-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-optional-properties.src.ts.shot index df83385dd287..f0d57792836c 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-optional-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-optional-properties.src.ts.shot @@ -143,6 +143,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 34, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-interface.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-interface.src.ts.shot index 06266e5337e8..8cbbcfed1d51 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-interface.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-interface.src.ts.shot @@ -26,6 +26,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 36, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-interface.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-interface.src.ts.shot index eae142407996..a26782c10731 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-interface.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-interface.src.ts.shot @@ -26,6 +26,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 46, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-interface.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-interface.src.ts.shot index ff60f3be6e95..a7723369960b 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-interface.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-interface.src.ts.shot @@ -26,6 +26,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 38, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-method-signature.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-method-signature.src.ts.shot index eefbf73554f3..a175d632669d 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-method-signature.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-method-signature.src.ts.shot @@ -69,6 +69,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 23, @@ -193,6 +194,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 18, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-this.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-this.src.ts.shot index 10ab794d02d7..bfd4fd36e9e7 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/typed-this.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/typed-this.src.ts.shot @@ -26,6 +26,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 65, diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method-signature.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method-signature.src.ts.shot index 471b29c33cd9..bb110cf05755 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method-signature.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method-signature.src.ts.shot @@ -26,6 +26,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 11, diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-export.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-export.src.ts.shot index 2827b9747e8e..49552e632b94 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-export.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-export.src.ts.shot @@ -27,6 +27,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 32, diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-private.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-private.src.ts.shot index 6c4af2099000..0b2fc02bfd56 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-private.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-private.src.ts.shot @@ -27,6 +27,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 33, diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-protected.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-protected.src.ts.shot index e5159f9940b8..1826aeadf4e4 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-protected.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-protected.src.ts.shot @@ -27,6 +27,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 33, diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-public.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-public.src.ts.shot index 5a2b17449608..114bd1a78112 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-public.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-public.src.ts.shot @@ -27,6 +27,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 32, diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-readonly.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-readonly.src.ts.shot index 521a3a4bcdc4..e1a82d8ecdaa 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-readonly.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-readonly.src.ts.shot @@ -26,6 +26,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 32, diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-static.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-static.src.ts.shot index bdb4baa843a2..8aab33054a95 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-static.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-method-static.src.ts.shot @@ -26,6 +26,7 @@ Object { ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { "column": 30, diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/interface-with-accessors.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/interface-with-accessors.src.ts.shot new file mode 100644 index 000000000000..02601964ea1b --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/types/interface-with-accessors.src.ts.shot @@ -0,0 +1,711 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript types interface-with-accessors.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "name": "size", + "range": Array [ + 24, + 28, + ], + "type": "Identifier", + }, + "kind": "get", + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 20, + 39, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 30, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "TSMethodSignature", + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "name": "size", + "range": Array [ + 46, + 50, + ], + "type": "Identifier", + }, + "kind": "set", + "loc": Object { + "end": Object { + "column": 45, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "name": "value", + "range": Array [ + 51, + 83, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 56, + 83, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 58, + 83, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 58, + 64, + ], + "type": "TSNumberKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 67, + 73, + ], + "type": "TSStringKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 36, + "line": 3, + }, + }, + "range": Array [ + 76, + 83, + ], + "type": "TSBooleanKeyword", + }, + ], + }, + }, + }, + ], + "range": Array [ + 42, + 85, + ], + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 87, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Thing", + "range": Array [ + 10, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 87, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 88, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 15, + ], + "type": "Identifier", + "value": "Thing", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 20, + 23, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 24, + 28, + ], + "type": "Identifier", + "value": "size", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 42, + 45, + ], + "type": "Identifier", + "value": "set", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 46, + 50, + ], + "type": "Identifier", + "value": "size", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 51, + 56, + ], + "type": "Identifier", + "value": "value", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 58, + 64, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 3, + }, + }, + "range": Array [ + 65, + 66, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 67, + 73, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 3, + }, + "start": Object { + "column": 34, + "line": 3, + }, + }, + "range": Array [ + 74, + 75, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 36, + "line": 3, + }, + }, + "range": Array [ + 76, + 83, + ], + "type": "Identifier", + "value": "boolean", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 3, + }, + "start": Object { + "column": 43, + "line": 3, + }, + }, + "range": Array [ + 83, + 84, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 3, + }, + "start": Object { + "column": 44, + "line": 3, + }, + }, + "range": Array [ + 84, + 85, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 86, + 87, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/object-literal-type-with-accessors.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/object-literal-type-with-accessors.src.ts.shot new file mode 100644 index 000000000000..df6ae88ba5d2 --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/types/object-literal-type-with-accessors.src.ts.shot @@ -0,0 +1,747 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript types object-literal-type-with-accessors.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Thing", + "range": Array [ + 5, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 2, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 85, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "name": "size", + "range": Array [ + 21, + 25, + ], + "type": "Identifier", + }, + "kind": "get", + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 17, + 36, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 27, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 29, + 35, + ], + "type": "TSNumberKeyword", + }, + }, + "type": "TSMethodSignature", + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "name": "size", + "range": Array [ + 43, + 47, + ], + "type": "Identifier", + }, + "kind": "set", + "loc": Object { + "end": Object { + "column": 45, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "name": "value", + "range": Array [ + 48, + 80, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 53, + 80, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 55, + 80, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 55, + 61, + ], + "type": "TSNumberKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 64, + 70, + ], + "type": "TSStringKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 36, + "line": 3, + }, + }, + "range": Array [ + 73, + 80, + ], + "type": "TSBooleanKeyword", + }, + ], + }, + }, + }, + ], + "range": Array [ + 39, + 82, + ], + "type": "TSMethodSignature", + }, + ], + "range": Array [ + 13, + 84, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 86, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 10, + ], + "type": "Identifier", + "value": "Thing", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 21, + 25, + ], + "type": "Identifier", + "value": "size", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 29, + 35, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 39, + 42, + ], + "type": "Identifier", + "value": "set", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 43, + 47, + ], + "type": "Identifier", + "value": "size", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 48, + 53, + ], + "type": "Identifier", + "value": "value", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 55, + 61, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 3, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 64, + 70, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 3, + }, + "start": Object { + "column": 34, + "line": 3, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 36, + "line": 3, + }, + }, + "range": Array [ + 73, + 80, + ], + "type": "Identifier", + "value": "boolean", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 3, + }, + "start": Object { + "column": 43, + "line": 3, + }, + }, + "range": Array [ + 80, + 81, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 3, + }, + "start": Object { + "column": 44, + "line": 3, + }, + }, + "range": Array [ + 81, + 82, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 83, + 84, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 4, + }, + "start": Object { + "column": 1, + "line": 4, + }, + }, + "range": Array [ + 84, + 85, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; From c3942c943350240bb55252ca4914ceccd3028d1d Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 22 May 2021 13:16:08 -0700 Subject: [PATCH 140/473] test(typescript-estree): fix alignment tests (#3428) bad merge for some reason... --- packages/typescript-estree/tests/ast-alignment/utils.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index b0c7c990553d..99956cb694f0 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -126,10 +126,6 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any { node.params = node.parameters; delete node.parameters; } - if (node.kind) { - // TODO - remove this once we support accessor signatures - delete node.kind; - } }, /** * We want this node to be different From 21d1b62a0b84b502d2cf12674b3d141994a3ffd4 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 22 May 2021 17:13:28 -0700 Subject: [PATCH 141/473] feat(typescript-estree): [TS4.3] support overrides on class members (#3429) --- .../ast-spec/src/base/ClassPropertyBase.ts | 1 + .../ast-spec/src/base/MethodDefinitionBase.ts | 1 + ...abstract-class-with-override-method.src.ts | 3 + ...stract-class-with-override-property.src.ts | 3 + .../basics/class-with-override-method.src.ts | 5 + .../class-with-override-property.src.ts | 3 + packages/typescript-estree/src/convert.ts | 3 + .../tests/ast-alignment/utils.ts | 14 + .../semantic-diagnostics-enabled.test.ts.snap | 8 + .../__snapshots__/semanticInfo.test.ts.snap | 1 + ...export-default-anonymous-class.src.js.shot | 1 + .../class-accessor-properties.src.js.shot | 2 + .../class-computed-static-method.src.js.shot | 1 + .../class-method-named-prototype.src.js.shot | 1 + .../class-method-named-static.src.js.shot | 1 + .../class-method-named-with-space.src.js.shot | 1 + .../class-one-method-super.src.js.shot | 1 + .../classes/class-one-method.src.js.shot | 1 + ...-static-method-named-prototype.src.js.shot | 1 + ...ass-static-method-named-static.src.js.shot | 1 + .../classes/class-static-method.src.js.shot | 1 + ...ethods-and-accessor-properties.src.js.shot | 3 + ...ss-two-computed-static-methods.src.js.shot | 2 + ...o-methods-computed-constructor.src.js.shot | 2 + .../class-two-methods-semi.src.js.shot | 2 + .../class-two-methods-three-semi.src.js.shot | 2 + .../class-two-methods-two-semi.src.js.shot | 2 + .../classes/class-two-methods.src.js.shot | 2 + ...atic-methods-named-constructor.src.js.shot | 2 + ...ss-with-constructor-parameters.src.js.shot | 1 + ...ss-with-constructor-with-space.src.js.shot | 1 + .../class-with-constructor.src.js.shot | 1 + ...valid-class-setter-declaration.src.js.shot | 1 + .../class-constructor.src.js.shot | 1 + .../defaultParams/class-method.src.js.shot | 1 + ...class-constructor-params-array.src.js.shot | 1 + ...structor-params-defaults-array.src.js.shot | 1 + ...tructor-params-defaults-object.src.js.shot | 1 + ...lass-constructor-params-object.src.js.shot | 1 + .../class-method-params-array.src.js.shot | 1 + ...s-method-params-defaults-array.src.js.shot | 1 + ...-method-params-defaults-object.src.js.shot | 1 + .../class-method-params-object.src.js.shot | 1 + .../directives/directive-in-class.src.js.shot | 4 + .../async-generator-method.src.js.shot | 1 + .../restParams/class-constructor.src.js.shot | 1 + .../restParams/class-method.src.js.shot | 1 + ...lass-with-abstract-constructor.src.ts.shot | 1 + ...act-class-with-abstract-method.src.ts.shot | 1 + ...class-with-abstract-properties.src.ts.shot | 2 + ...ith-abstract-readonly-property.src.ts.shot | 1 + ...th-abstract-static-constructor.src.ts.shot | 1 + ...-class-with-declare-properties.src.ts.shot | 5 + ...act-class-with-optional-method.src.ts.shot | 1 + ...act-class-with-override-method.src.ts.shot | 396 +++++++++++++++++ ...t-class-with-override-property.src.ts.shot | 393 +++++++++++++++++ ...s-with-accessibility-modifiers.src.ts.shot | 4 + ...-with-constructor-and-modifier.src.ts.shot | 2 + ...th-constructor-and-return-type.src.ts.shot | 2 + ...onstructor-and-type-parameters.src.ts.shot | 2 + .../class-with-declare-properties.src.ts.shot | 7 + ...class-with-definite-assignment.src.ts.shot | 1 + ...th-export-parameter-properties.src.ts.shot | 1 + ...ss-with-generic-method-default.src.ts.shot | 1 + .../class-with-generic-method.src.ts.shot | 1 + .../basics/class-with-method.src.ts.shot | 3 + ...-with-optional-computed-method.src.ts.shot | 9 + ...ith-optional-computed-property.src.ts.shot | 1 + .../class-with-optional-methods.src.ts.shot | 3 + ...class-with-optional-properties.src.ts.shot | 9 + ...th-optional-property-undefined.src.ts.shot | 1 + .../class-with-override-method.src.ts.shot | 413 ++++++++++++++++++ .../class-with-override-property.src.ts.shot | 356 +++++++++++++++ ...h-private-parameter-properties.src.ts.shot | 1 + .../class-with-property-function.src.ts.shot | 2 + .../class-with-property-values.src.ts.shot | 5 + ...protected-parameter-properties.src.ts.shot | 1 + ...th-public-parameter-properties.src.ts.shot | 1 + ...-readonly-parameter-properties.src.ts.shot | 1 + .../class-with-readonly-property.src.ts.shot | 1 + ...th-static-parameter-properties.src.ts.shot | 1 + ...o-methods-computed-constructor.src.ts.shot | 2 + ...are-class-with-optional-method.src.ts.shot | 1 + .../basics/keyword-variables.src.ts.shot | 4 + ...object-with-escaped-properties.src.ts.shot | 1 + .../type-assertion-in-method.src.ts.shot | 2 + ...assertion-with-guard-in-method.src.ts.shot | 2 + .../basics/type-guard-in-method.src.ts.shot | 2 + .../type-reference-comments.src.ts.shot | 1 + ...orator-factory-instance-member.src.ts.shot | 1 + ...ecorator-factory-static-member.src.ts.shot | 1 + ...ssor-decorator-instance-member.src.ts.shot | 1 + ...cessor-decorator-static-member.src.ts.shot | 1 + ...orator-factory-instance-member.src.ts.shot | 1 + ...ecorator-factory-static-member.src.ts.shot | 1 + ...thod-decorator-instance-member.src.ts.shot | 1 + ...method-decorator-static-member.src.ts.shot | 1 + ...ameter-array-pattern-decorator.src.ts.shot | 1 + ...arameter-decorator-constructor.src.ts.shot | 1 + ...ator-decorator-instance-member.src.ts.shot | 1 + ...orator-decorator-static-member.src.ts.shot | 1 + ...eter-decorator-instance-member.src.ts.shot | 1 + ...ameter-decorator-static-member.src.ts.shot | 1 + ...meter-object-pattern-decorator.src.ts.shot | 1 + ...rameter-rest-element-decorator.src.ts.shot | 1 + ...orator-factory-instance-member.src.ts.shot | 2 + ...ecorator-factory-static-member.src.ts.shot | 2 + ...erty-decorator-instance-member.src.ts.shot | 2 + ...operty-decorator-static-member.src.ts.shot | 2 + ...type-parameters-in-constructor.src.ts.shot | 1 + ...mpty-type-parameters-in-method.src.ts.shot | 1 + .../module-with-default-exports.src.ts.shot | 1 + .../nested-internal-module.src.ts.shot | 1 + .../types/this-type-expanded.src.ts.shot | 7 + .../typescript/types/this-type.src.ts.shot | 1 + 115 files changed, 1773 insertions(+) create mode 100644 packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-override-method.src.ts create mode 100644 packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-override-property.src.ts create mode 100644 packages/shared-fixtures/fixtures/typescript/basics/class-with-override-method.src.ts create mode 100644 packages/shared-fixtures/fixtures/typescript/basics/class-with-override-property.src.ts create mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-method.src.ts.shot create mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot create mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-method.src.ts.shot create mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-property.src.ts.shot diff --git a/packages/ast-spec/src/base/ClassPropertyBase.ts b/packages/ast-spec/src/base/ClassPropertyBase.ts index 8ac19b05fa55..7717e02c4ca3 100644 --- a/packages/ast-spec/src/base/ClassPropertyBase.ts +++ b/packages/ast-spec/src/base/ClassPropertyBase.ts @@ -21,6 +21,7 @@ interface ClassPropertyBase extends BaseNode { optional?: boolean; definite?: boolean; typeAnnotation?: TSTypeAnnotation; + override?: boolean; } export interface ClassPropertyComputedNameBase extends ClassPropertyBase { diff --git a/packages/ast-spec/src/base/MethodDefinitionBase.ts b/packages/ast-spec/src/base/MethodDefinitionBase.ts index fe8846062106..afdea67bcd7b 100644 --- a/packages/ast-spec/src/base/MethodDefinitionBase.ts +++ b/packages/ast-spec/src/base/MethodDefinitionBase.ts @@ -21,6 +21,7 @@ interface MethodDefinitionBase extends BaseNode { decorators?: Decorator[]; accessibility?: Accessibility; typeParameters?: TSTypeParameterDeclaration; + override?: boolean; } export interface MethodDefinitionComputedNameBase extends MethodDefinitionBase { diff --git a/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-override-method.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-override-method.src.ts new file mode 100644 index 000000000000..e6cecdc5ab8d --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-override-method.src.ts @@ -0,0 +1,3 @@ +abstract class SpecializedComponent extends SomeComponent { + abstract override show(); +} diff --git a/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-override-property.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-override-property.src.ts new file mode 100644 index 000000000000..8839340d7aad --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-override-property.src.ts @@ -0,0 +1,3 @@ +abstract class SpecializedComponent extends SomeComponent { + abstract override foo = 1; +} diff --git a/packages/shared-fixtures/fixtures/typescript/basics/class-with-override-method.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/class-with-override-method.src.ts new file mode 100644 index 000000000000..da3b89239d1f --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/class-with-override-method.src.ts @@ -0,0 +1,5 @@ +class SpecializedComponent extends SomeComponent { + override show() { + // ... + } +} diff --git a/packages/shared-fixtures/fixtures/typescript/basics/class-with-override-property.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/class-with-override-property.src.ts new file mode 100644 index 000000000000..fc5dc8e431ba --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/class-with-override-property.src.ts @@ -0,0 +1,3 @@ +class SpecializedComponent extends SomeComponent { + override foo = 1; +} diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 595d284237c4..5dbce7bd52b8 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1094,6 +1094,7 @@ export class Converter { static: hasModifier(SyntaxKind.StaticKeyword, node), readonly: hasModifier(SyntaxKind.ReadonlyKeyword, node) || undefined, declare: hasModifier(SyntaxKind.DeclareKeyword, node), + override: hasModifier(SyntaxKind.OverrideKeyword, node), }); if (node.type) { @@ -1209,6 +1210,7 @@ export class Converter { computed: isComputedProperty(node.name), static: hasModifier(SyntaxKind.StaticKeyword, node), kind: 'method', + override: hasModifier(SyntaxKind.OverrideKeyword, node), }); if (node.decorators) { @@ -1295,6 +1297,7 @@ export class Converter { computed: false, static: isStatic, kind: isStatic ? 'method' : 'constructor', + override: false, }); const accessibility = getTSNodeAccessibility(node); diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index 99956cb694f0..67a4c2db67a9 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -165,6 +165,13 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any { node.type = AST_NODE_TYPES.TSAbstractMethodDefinition; delete node.abstract; } + /** + * TS 4.3: overrides on class members + * Babel doesn't ever emit a false override flag + */ + if (node.override == null) { + node.override = false; + } }, ClassProperty(node) { /** @@ -183,6 +190,13 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any { if (!node.declare) { node.declare = false; } + /** + * TS 4.3: overrides on class members + * Babel doesn't ever emit a false override flag + */ + if (node.override == null) { + node.override = false; + } }, TSExpressionWithTypeArguments(node, parent: any) { if (parent.type === AST_NODE_TYPES.TSInterfaceDeclaration) { diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap index 641c388c3ef2..b8cf71c020cd 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap @@ -1679,6 +1679,10 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-optional-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-override-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-override-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-interface.src 1`] = ` TSError { "column": 7, @@ -1800,6 +1804,10 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-property-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-override-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-override-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-private-parameter-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-property-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semanticInfo.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semanticInfo.test.ts.snap index c826bde0fbaa..0fe1c5a0c57e 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semanticInfo.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semanticInfo.test.ts.snap @@ -1286,6 +1286,7 @@ Object { "line": 4, }, }, + "override": false, "range": Array [ 39, 56, diff --git a/packages/typescript-estree/tests/snapshots/comments/export-default-anonymous-class.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/export-default-anonymous-class.src.js.shot index bd0189e05aa0..dbeef2b24f98 100644 --- a/packages/typescript-estree/tests/snapshots/comments/export-default-anonymous-class.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/comments/export-default-anonymous-class.src.js.shot @@ -38,6 +38,7 @@ Object { "line": 8, }, }, + "override": false, "range": Array [ 103, 119, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-accessor-properties.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-accessor-properties.src.js.shot index fdacdc91cbdf..62aadc15acb6 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-accessor-properties.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-accessor-properties.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 18, @@ -115,6 +116,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 19, 29, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-computed-static-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-computed-static-method.src.js.shot index 930ca6d8259f..5871d6c60c99 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-computed-static-method.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-computed-static-method.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 23, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-prototype.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-prototype.src.js.shot index 1bea3845235d..c1ee0b82f958 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-prototype.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-prototype.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 22, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-static.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-static.src.js.shot index 3283a8722a75..9b70760930b9 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-static.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-static.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 19, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-with-space.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-with-space.src.js.shot index f13e2fabc216..9e9a41ba3261 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-with-space.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-method-named-with-space.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 24, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method-super.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method-super.src.js.shot index 7c807720ef86..1f39c5579980 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method-super.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method-super.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 41, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method.src.js.shot index 97a6831a8da1..ed28bce4faa2 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-one-method.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 19, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-prototype.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-prototype.src.js.shot index eddc8fae7c6b..4f725a4e5361 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-prototype.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-prototype.src.js.shot @@ -38,6 +38,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 33, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-static.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-static.src.js.shot index a0303a971a1a..b1756b4818dc 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-static.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method-named-static.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 26, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method.src.js.shot index 52fe0b94216f..1cf9872e5897 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-method.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 21, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-methods-and-accessor-properties.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-methods-and-accessor-properties.src.js.shot index ba34c36db88b..0dda0b030892 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-methods-and-accessor-properties.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-static-methods-and-accessor-properties.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 21, @@ -115,6 +116,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 22, 38, @@ -193,6 +195,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 39, 56, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-computed-static-methods.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-computed-static-methods.src.js.shot index 9e09fb35659a..f99bd40eb6ca 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-computed-static-methods.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-computed-static-methods.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 22, @@ -115,6 +116,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 24, 37, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-computed-constructor.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-computed-constructor.src.js.shot index c900a7f0214e..e104bce8c44d 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-computed-constructor.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-computed-constructor.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 26, @@ -116,6 +117,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 27, 46, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-semi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-semi.src.js.shot index fc9e5c7b6fcc..6c78f5741667 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-semi.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-semi.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 14, @@ -115,6 +116,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 15, 20, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-three-semi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-three-semi.src.js.shot index 4d8285256422..5060c0584f90 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-three-semi.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-three-semi.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 10, 15, @@ -115,6 +116,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 16, 21, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-two-semi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-two-semi.src.js.shot index f1d6ca4f90eb..aeb53db18651 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-two-semi.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods-two-semi.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 14, @@ -115,6 +116,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 15, 20, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods.src.js.shot index dadd12488521..b8be5d7f17c7 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-methods.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 14, @@ -115,6 +116,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 14, 19, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-static-methods-named-constructor.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-static-methods-named-constructor.src.js.shot index c6f00a3d4c46..9b9e4330f1b2 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-static-methods-named-constructor.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-two-static-methods-named-constructor.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 31, @@ -115,6 +116,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 32, 54, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-parameters.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-parameters.src.js.shot index af33584684a9..e736c7d3cc94 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-parameters.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-parameters.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 32, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-with-space.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-with-space.src.js.shot index 4193a686d1cc..1356638c8621 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-with-space.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor-with-space.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 25, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor.src.js.shot index b40e348d921e..150efc9e0ac5 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-constructor.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 9, 24, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-setter-declaration.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-setter-declaration.src.js.shot index f064c5f76293..8b505ede6155 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-setter-declaration.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-setter-declaration.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 1, }, }, + "override": false, "range": Array [ 10, 22, diff --git a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-constructor.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-constructor.src.js.shot index 4a29a98df2df..a0f0e8f243e4 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-constructor.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-constructor.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 44, diff --git a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-method.src.js.shot index 04c434424069..e826cfb92f9f 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-method.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/defaultParams/class-method.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 36, diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-array.src.js.shot index 81adc7932099..1ce60cf6afe4 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-array.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-array.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 45, diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-array.src.js.shot index 06c6a6c36ba9..31e9b9c678ee 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-array.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-array.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 49, diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-object.src.js.shot index 37d5fc8f72e7..2fac40a23013 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-object.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-defaults-object.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 49, diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-object.src.js.shot index 058e26e7c075..2ce4b20aef57 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-object.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-constructor-params-object.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 45, diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-array.src.js.shot index a592ad53b5e5..0788bd3e5900 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-array.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-array.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 37, diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-array.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-array.src.js.shot index cb85570c27a5..09a9336e2029 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-array.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-array.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 41, diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-object.src.js.shot index 44a00400bfb8..bc5f1596e9b4 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-object.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-defaults-object.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 41, diff --git a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-object.src.js.shot index 439a20f2583f..3916e2523512 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-object.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/destructuring/class-method-params-object.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 37, diff --git a/packages/typescript-estree/tests/snapshots/javascript/directives/directive-in-class.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/directives/directive-in-class.src.js.shot index 5cd2bc9958d6..65f9143603d5 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/directives/directive-in-class.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/directives/directive-in-class.src.js.shot @@ -74,6 +74,7 @@ Object { "line": 4, }, }, + "override": false, "range": Array [ 31, 75, @@ -190,6 +191,7 @@ Object { "line": 8, }, }, + "override": false, "range": Array [ 81, 121, @@ -306,6 +308,7 @@ Object { "line": 12, }, }, + "override": false, "range": Array [ 127, 172, @@ -441,6 +444,7 @@ Object { "line": 16, }, }, + "override": false, "range": Array [ 178, 217, diff --git a/packages/typescript-estree/tests/snapshots/javascript/generators/async-generator-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/generators/async-generator-method.src.js.shot index 9a90f9b39a69..9789490921d4 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/generators/async-generator-method.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/generators/async-generator-method.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 63, diff --git a/packages/typescript-estree/tests/snapshots/javascript/restParams/class-constructor.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/restParams/class-constructor.src.js.shot index bc5b0a73ebd3..6a702c700653 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/restParams/class-constructor.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/restParams/class-constructor.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 41, diff --git a/packages/typescript-estree/tests/snapshots/javascript/restParams/class-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/restParams/class-method.src.js.shot index d3e04abe08bd..9a269121cc64 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/restParams/class-method.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/restParams/class-method.src.js.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 33, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-constructor.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-constructor.src.ts.shot index 89c324ae0445..8a5a6c7e8c66 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-constructor.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-constructor.src.ts.shot @@ -39,6 +39,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 43, 66, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-method.src.ts.shot index 5852f8937d09..7604195da3ac 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-method.src.ts.shot @@ -39,6 +39,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 43, 84, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot index 866a63383cb9..8c70b312e051 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot @@ -38,6 +38,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 25, 38, @@ -78,6 +79,7 @@ Object { "line": 3, }, }, + "override": false, "range": Array [ 43, 60, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot index d33336454ef4..44ba579e1f77 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot @@ -39,6 +39,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 23, 63, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-static-constructor.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-static-constructor.src.ts.shot index 7e580cca84cd..6b0c9419bdfe 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-static-constructor.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-static-constructor.src.ts.shot @@ -39,6 +39,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 41, 71, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-declare-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-declare-properties.src.ts.shot index 0bdd47c223eb..d6ebb066f30e 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-declare-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-declare-properties.src.ts.shot @@ -38,6 +38,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 37, 59, @@ -112,6 +113,7 @@ Object { "line": 3, }, }, + "override": false, "range": Array [ 62, 93, @@ -187,6 +189,7 @@ Object { "line": 4, }, }, + "override": false, "range": Array [ 96, 134, @@ -261,6 +264,7 @@ Object { "line": 5, }, }, + "override": false, "range": Array [ 137, 177, @@ -336,6 +340,7 @@ Object { "line": 6, }, }, + "override": false, "range": Array [ 180, 227, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-optional-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-optional-method.src.ts.shot index 1cf4f4e8f16f..4c8d959632fe 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-optional-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-optional-method.src.ts.shot @@ -40,6 +40,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 43, 76, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-method.src.ts.shot new file mode 100644 index 000000000000..32e9b1f00281 --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-method.src.ts.shot @@ -0,0 +1,396 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics abstract-class-with-override-method.src 1`] = ` +Object { + "body": Array [ + Object { + "abstract": true, + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "name": "show", + "range": Array [ + 80, + 84, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": true, + "range": Array [ + 62, + 87, + ], + "static": false, + "type": "TSAbstractMethodDefinition", + "value": Object { + "async": false, + "body": null, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 84, + 87, + ], + "type": "TSEmptyBodyFunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 58, + "line": 1, + }, + }, + "range": Array [ + 58, + 89, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "SpecializedComponent", + "range": Array [ + 15, + 35, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 89, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "name": "SomeComponent", + "range": Array [ + 44, + 57, + ], + "type": "Identifier", + }, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 90, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Identifier", + "value": "abstract", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 14, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 35, + ], + "type": "Identifier", + "value": "SpecializedComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 43, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 57, + ], + "type": "Identifier", + "value": "SomeComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 59, + "line": 1, + }, + "start": Object { + "column": 58, + "line": 1, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 62, + 70, + ], + "type": "Identifier", + "value": "abstract", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 71, + 79, + ], + "type": "Identifier", + "value": "override", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 80, + 84, + ], + "type": "Identifier", + "value": "show", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 84, + 85, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 85, + 86, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 86, + 87, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 88, + 89, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot new file mode 100644 index 000000000000..ec1973cbc7ed --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot @@ -0,0 +1,393 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics abstract-class-with-override-property.src 1`] = ` +Object { + "body": Array [ + Object { + "abstract": true, + "body": Object { + "body": Array [ + Object { + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 80, + 83, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": true, + "range": Array [ + 62, + 88, + ], + "readonly": undefined, + "static": false, + "type": "TSAbstractClassProperty", + "value": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 86, + 87, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 58, + "line": 1, + }, + }, + "range": Array [ + 58, + 90, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "SpecializedComponent", + "range": Array [ + 15, + 35, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 90, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "name": "SomeComponent", + "range": Array [ + 44, + 57, + ], + "type": "Identifier", + }, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 91, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Identifier", + "value": "abstract", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 14, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 35, + ], + "type": "Identifier", + "value": "SpecializedComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 43, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 57, + ], + "type": "Identifier", + "value": "SomeComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 59, + "line": 1, + }, + "start": Object { + "column": 58, + "line": 1, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 62, + 70, + ], + "type": "Identifier", + "value": "abstract", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 71, + 79, + ], + "type": "Identifier", + "value": "override", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 80, + 83, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 84, + 85, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 86, + 87, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 87, + 88, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 89, + 90, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-accessibility-modifiers.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-accessibility-modifiers.src.ts.shot index c2e78c3d5fc3..67d8ef501e3b 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-accessibility-modifiers.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-accessibility-modifiers.src.ts.shot @@ -38,6 +38,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 35, @@ -113,6 +114,7 @@ Object { "line": 3, }, }, + "override": false, "range": Array [ 38, 65, @@ -188,6 +190,7 @@ Object { "line": 4, }, }, + "override": false, "range": Array [ 68, 111, @@ -339,6 +342,7 @@ Object { "line": 7, }, }, + "override": false, "range": Array [ 114, 171, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-modifier.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-modifier.src.ts.shot index 73617426afb6..ed6760da000a 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-modifier.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-modifier.src.ts.shot @@ -38,6 +38,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 12, 39, @@ -118,6 +119,7 @@ Object { "line": 4, }, }, + "override": false, "range": Array [ 43, 71, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-return-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-return-type.src.ts.shot index 6039f0b88ca1..c3a17fbe6985 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-return-type.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-return-type.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 12, 37, @@ -150,6 +151,7 @@ Object { "line": 4, }, }, + "override": false, "range": Array [ 41, 70, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-type-parameters.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-type-parameters.src.ts.shot index 41ec91f36db0..56353693fd68 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-type-parameters.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-type-parameters.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 12, 32, @@ -172,6 +173,7 @@ Object { "line": 4, }, }, + "override": false, "range": Array [ 36, 60, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-declare-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-declare-properties.src.ts.shot index 3fc4fa8a2887..5de10062c2d5 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-declare-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-declare-properties.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 20, 42, @@ -112,6 +113,7 @@ Object { "line": 3, }, }, + "override": false, "range": Array [ 45, 74, @@ -186,6 +188,7 @@ Object { "line": 4, }, }, + "override": false, "range": Array [ 77, 106, @@ -260,6 +263,7 @@ Object { "line": 5, }, }, + "override": false, "range": Array [ 109, 140, @@ -335,6 +339,7 @@ Object { "line": 6, }, }, + "override": false, "range": Array [ 143, 181, @@ -410,6 +415,7 @@ Object { "line": 7, }, }, + "override": false, "range": Array [ 184, 220, @@ -485,6 +491,7 @@ Object { "line": 8, }, }, + "override": false, "range": Array [ 223, 268, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-definite-assignment.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-definite-assignment.src.ts.shot index 175efb44864f..00d59df785b5 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-definite-assignment.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-definite-assignment.src.ts.shot @@ -38,6 +38,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 12, 23, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot index c74dc1277b74..57fd7fb7ff7a 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 16, 54, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method-default.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method-default.src.ts.shot index 83f8801a83f7..517d5dd3e62a 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method-default.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method-default.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 34, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method.src.ts.shot index 046a4f06f730..504612e7858d 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-generic-method.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 28, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-method.src.ts.shot index cd01d383d9b4..84f1c8825bcb 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-method.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 12, 29, @@ -149,6 +150,7 @@ Object { "line": 3, }, }, + "override": false, "range": Array [ 32, 44, @@ -283,6 +285,7 @@ Object { "line": 4, }, }, + "override": false, "range": Array [ 47, 55, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-method.src.ts.shot index 7b2f8e4f53c4..1fd54885c280 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-method.src.ts.shot @@ -376,6 +376,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 123, 138, @@ -438,6 +439,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 141, 158, @@ -518,6 +520,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 162, 169, @@ -581,6 +584,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 172, 181, @@ -661,6 +665,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 185, 201, @@ -724,6 +729,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 204, 222, @@ -840,6 +846,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 226, 244, @@ -956,6 +963,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 248, 265, @@ -1037,6 +1045,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 268, 279, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-property.src.ts.shot index 6271f111aee6..31128d9a73bb 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-property.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-property.src.ts.shot @@ -40,6 +40,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 14, 43, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-methods.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-methods.src.ts.shot index d237d0e252e2..5ad7ce5d913b 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-methods.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-methods.src.ts.shot @@ -38,6 +38,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 14, 21, @@ -100,6 +101,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 24, 39, @@ -197,6 +199,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 42, 65, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-properties.src.ts.shot index 17ec5f652f82..3905565b51e0 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-properties.src.ts.shot @@ -186,6 +186,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 65, 70, @@ -227,6 +228,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 73, 87, @@ -303,6 +305,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 90, 112, @@ -378,6 +381,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 115, 127, @@ -420,6 +424,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 130, 143, @@ -462,6 +467,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 146, 151, @@ -503,6 +509,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 154, 175, @@ -579,6 +586,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 178, 200, @@ -655,6 +663,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 203, 216, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-property-undefined.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-property-undefined.src.ts.shot index 2476b7468c66..e3f8ea37bde3 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-property-undefined.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-property-undefined.src.ts.shot @@ -39,6 +39,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 12, 37, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-method.src.ts.shot new file mode 100644 index 000000000000..e600ab918a51 --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-method.src.ts.shot @@ -0,0 +1,413 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics class-with-override-method.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "show", + "range": Array [ + 62, + 66, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": true, + "range": Array [ + 53, + 87, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 69, + 87, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 66, + 87, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 89, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "SpecializedComponent", + "range": Array [ + 6, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 89, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "SomeComponent", + "range": Array [ + 35, + 48, + ], + "type": "Identifier", + }, + "type": "ClassDeclaration", + }, + ], + "comments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 77, + 83, + ], + "type": "Line", + "value": " ...", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 90, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 26, + ], + "type": "Identifier", + "value": "SpecializedComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 34, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 48, + ], + "type": "Identifier", + "value": "SomeComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 53, + 61, + ], + "type": "Identifier", + "value": "override", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 62, + 66, + ], + "type": "Identifier", + "value": "show", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 66, + 67, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 67, + 68, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 86, + 87, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 88, + 89, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-property.src.ts.shot new file mode 100644 index 000000000000..30a584f5f6da --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-property.src.ts.shot @@ -0,0 +1,356 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics class-with-override-property.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 62, + 65, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": true, + "range": Array [ + 53, + 70, + ], + "readonly": undefined, + "static": false, + "type": "ClassProperty", + "value": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 68, + 69, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 72, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "SpecializedComponent", + "range": Array [ + 6, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 72, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "SomeComponent", + "range": Array [ + 35, + 48, + ], + "type": "Identifier", + }, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 73, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 26, + ], + "type": "Identifier", + "value": "SpecializedComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 34, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 48, + ], + "type": "Identifier", + "value": "SomeComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 53, + 61, + ], + "type": "Identifier", + "value": "override", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 62, + 65, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 66, + 67, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot index 7c4a92e3dafc..b4662a489b0b 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 201, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-function.src.ts.shot index 595df343e1d0..fbf79a0e8592 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-function.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-function.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 55, @@ -220,6 +221,7 @@ Object { "line": 3, }, }, + "override": false, "range": Array [ 58, 83, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-values.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-values.src.ts.shot index a8ed19456ca1..e9ca7ddbc2ac 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-values.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-values.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 20, @@ -95,6 +96,7 @@ Object { "line": 3, }, }, + "override": false, "range": Array [ 23, 30, @@ -152,6 +154,7 @@ Object { "line": 4, }, }, + "override": false, "range": Array [ 33, 40, @@ -209,6 +212,7 @@ Object { "line": 5, }, }, + "override": false, "range": Array [ 43, 50, @@ -267,6 +271,7 @@ Object { "line": 6, }, }, + "override": false, "range": Array [ 53, 80, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot index 346ba40bd7ad..0248c45f7818 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 209, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot index 260d52aa88ba..bd27cd8449be 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 197, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot index 7e14ba2d579a..a33a42f2d7d5 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 107, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-property.src.ts.shot index 492e45c6ed15..23d24a88952e 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-property.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-property.src.ts.shot @@ -38,6 +38,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 16, 47, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot index 93e74b00c341..41e85e115fc3 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 16, 54, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-two-methods-computed-constructor.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-two-methods-computed-constructor.src.ts.shot index f8804948fa08..abf1f5816b2e 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-two-methods-computed-constructor.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-two-methods-computed-constructor.src.ts.shot @@ -38,6 +38,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 12, 44, @@ -207,6 +208,7 @@ Object { "line": 5, }, }, + "override": false, "range": Array [ 48, 82, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/declare-class-with-optional-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/declare-class-with-optional-method.src.ts.shot index aae22750797f..134b75cb5fe4 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/declare-class-with-optional-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/declare-class-with-optional-method.src.ts.shot @@ -38,6 +38,7 @@ Object { }, }, "optional": true, + "override": false, "range": Array [ 24, 36, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/keyword-variables.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/keyword-variables.src.ts.shot index 74d752f2a03d..d32cb99e1aab 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/keyword-variables.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/keyword-variables.src.ts.shot @@ -4085,6 +4085,7 @@ Object { "line": 71, }, }, + "override": false, "range": Array [ 987, 1000, @@ -4164,6 +4165,7 @@ Object { "line": 72, }, }, + "override": false, "range": Array [ 1003, 1017, @@ -4243,6 +4245,7 @@ Object { "line": 73, }, }, + "override": false, "range": Array [ 1020, 1033, @@ -4322,6 +4325,7 @@ Object { "line": 74, }, }, + "override": false, "range": Array [ 1036, 1075, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-escaped-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-escaped-properties.src.ts.shot index 1bf761bae134..8ef720aba18d 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-escaped-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-escaped-properties.src.ts.shot @@ -344,6 +344,7 @@ Object { "line": 7, }, }, + "override": false, "range": Array [ 68, 79, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-method.src.ts.shot index c48954cc2b5f..d2ee9293ca2e 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-method.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 21, 60, @@ -187,6 +188,7 @@ Object { "line": 5, }, }, + "override": false, "range": Array [ 63, 108, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-method.src.ts.shot index 64d58b576c30..e9af3cb75909 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-method.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 21, 70, @@ -220,6 +221,7 @@ Object { "line": 5, }, }, + "override": false, "range": Array [ 73, 128, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-method.src.ts.shot index d8cef033d200..f97f275b6905 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-method.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 75, @@ -272,6 +273,7 @@ Object { "line": 5, }, }, + "override": false, "range": Array [ 78, 145, diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-reference-comments.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-reference-comments.src.ts.shot index 80034787fcbe..4e24a2d0e02a 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-reference-comments.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/type-reference-comments.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 26, 75, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts.shot index b077180d0075..805be00cc768 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts.shot @@ -113,6 +113,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 18, 70, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts.shot index a5af5b716047..e977890dec49 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts.shot @@ -171,6 +171,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 18, 80, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts.shot index 915ef296e492..8eb7ac9e21ce 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts.shot @@ -74,6 +74,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 53, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts.shot index 495eb8857caa..604fffa67a52 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts.shot @@ -74,6 +74,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 17, 76, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts.shot index b61cfff3e6df..108b09f249c5 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts.shot @@ -113,6 +113,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 54, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts.shot index 57042fcf265c..c3429eb4f45a 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts.shot @@ -113,6 +113,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 54, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts.shot index 6aeafa9a643e..c73b273260c6 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts.shot @@ -74,6 +74,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 47, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-static-member.src.ts.shot index 1d859f1e6fb8..9afc61f6df0a 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-static-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/method-decorators/method-decorator-static-member.src.ts.shot @@ -74,6 +74,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 47, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-array-pattern-decorator.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-array-pattern-decorator.src.ts.shot index 77cd44fb8b1a..49db6673b5a6 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-array-pattern-decorator.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-array-pattern-decorator.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 49, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts.shot index 33b297d36cb5..400c54bbc485 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 20, 113, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts.shot index 9412305d441b..237d94425218 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 16, 50, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts.shot index eb89d6731f66..6e982f368f31 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 22, 63, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts.shot index 6fb2cba87e84..9e20b12a0952 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 20, 95, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts.shot index 80d5d32e31b8..e12ff3fa8198 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 26, 108, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-object-pattern-decorator.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-object-pattern-decorator.src.ts.shot index f2713ac584ba..69ad340de2a9 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-object-pattern-decorator.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-object-pattern-decorator.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 49, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-rest-element-decorator.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-rest-element-decorator.src.ts.shot index 561cb43be3e7..7f77443e46db 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-rest-element-decorator.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/parameter-decorators/parameter-rest-element-decorator.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 48, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.shot index 1b372fff159b..792ec79028f0 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.shot @@ -93,6 +93,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 26, 40, @@ -189,6 +190,7 @@ Object { "line": 3, }, }, + "override": false, "range": Array [ 45, 86, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.shot index 6b252b1c09d2..616d39ed3670 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.shot @@ -113,6 +113,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 47, @@ -229,6 +230,7 @@ Object { "line": 4, }, }, + "override": false, "range": Array [ 53, 91, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.shot index ba40f39773e9..7ba24aa3ef5d 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.shot @@ -74,6 +74,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 21, @@ -151,6 +152,7 @@ Object { "line": 3, }, }, + "override": false, "range": Array [ 26, 37, diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.shot index 5a73d6a5bb2e..9e4706080cd7 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.shot @@ -74,6 +74,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 28, @@ -151,6 +152,7 @@ Object { "line": 3, }, }, + "override": false, "range": Array [ 33, 51, diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-constructor.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-constructor.src.ts.shot index 772f87aee45b..235dee9fe7c3 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-constructor.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-constructor.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 32, diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method.src.ts.shot index 0a3526674416..3233906e5cc4 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/empty-type-parameters-in-method.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 14, 25, diff --git a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/module-with-default-exports.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/module-with-default-exports.src.ts.shot index ccacf0893b45..70ff82a2ec71 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/module-with-default-exports.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/module-with-default-exports.src.ts.shot @@ -41,6 +41,7 @@ Object { "line": 3, }, }, + "override": false, "range": Array [ 52, 66, diff --git a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot index bd714fb2431e..32b6bf5d3bdf 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot @@ -135,6 +135,7 @@ Object { "line": 5, }, }, + "override": false, "range": Array [ 78, 129, diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/this-type-expanded.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/this-type-expanded.src.ts.shot index 4ae46a1f6155..d936454024a7 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/types/this-type-expanded.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/types/this-type-expanded.src.ts.shot @@ -38,6 +38,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 12, 29, @@ -113,6 +114,7 @@ Object { "line": 4, }, }, + "override": false, "range": Array [ 33, 91, @@ -351,6 +353,7 @@ Object { "line": 8, }, }, + "override": false, "range": Array [ 95, 149, @@ -608,6 +611,7 @@ Object { "line": 12, }, }, + "override": false, "range": Array [ 153, 237, @@ -960,6 +964,7 @@ Object { "line": 17, }, }, + "override": false, "range": Array [ 241, 322, @@ -1330,6 +1335,7 @@ Object { "line": 22, }, }, + "override": false, "range": Array [ 326, 387, @@ -1586,6 +1592,7 @@ Object { "line": 26, }, }, + "override": false, "range": Array [ 391, 449, diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/this-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/this-type.src.ts.shot index 2709ff43b71d..d937da372065 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/types/this-type.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/types/this-type.src.ts.shot @@ -37,6 +37,7 @@ Object { "line": 2, }, }, + "override": false, "range": Array [ 18, 54, From c380f7da8beaf55f5da5e162fe42a3c5548aa12c Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 24 May 2021 17:02:44 +0000 Subject: [PATCH 142/473] chore: publish v4.25.0 --- CHANGELOG.md | 18 ++++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 12 ++++++++++++ packages/ast-spec/package.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 | 11 +++++++++++ packages/eslint-plugin/package.json | 6 +++--- packages/experimental-utils/CHANGELOG.md | 11 +++++++++++ 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 | 12 ++++++++++++ packages/shared-fixtures/package.json | 2 +- packages/types/CHANGELOG.md | 8 ++++++++ packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 12 ++++++++++++ packages/typescript-estree/package.json | 8 ++++---- packages/visitor-keys/CHANGELOG.md | 8 ++++++++ packages/visitor-keys/package.json | 4 ++-- 24 files changed, 155 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d75e605a204..a0c4fe634766 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) + + +### Bug Fixes + +* corrected no-unsupported-browser-code in roadmap as unimplemented ([#3407](https://github.com/typescript-eslint/typescript-eslint/issues/3407)) ([2319b0e](https://github.com/typescript-eslint/typescript-eslint/commit/2319b0e1847991b8b8902ff4a3b779f1a27c7a45)) +* **experimental-utils:** fix `isAwaitKeyword` predicate in ast-utils ([#3290](https://github.com/typescript-eslint/typescript-eslint/issues/3290)) ([c15da67](https://github.com/typescript-eslint/typescript-eslint/commit/c15da67b939b615ed063291cde12c55c0d6d236e)) + + +### Features + +* **typescript-estree:** [TS4.3] support overrides on class members ([#3429](https://github.com/typescript-eslint/typescript-eslint/issues/3429)) ([21d1b62](https://github.com/typescript-eslint/typescript-eslint/commit/21d1b62a0b84b502d2cf12674b3d141994a3ffd4)) +* **typescript-estree:** add support for getter/setter signatures on types ([#3427](https://github.com/typescript-eslint/typescript-eslint/issues/3427)) ([b830b7f](https://github.com/typescript-eslint/typescript-eslint/commit/b830b7f4e8a99affc8af8b53cb83371ef81d7032)), closes [#3272](https://github.com/typescript-eslint/typescript-eslint/issues/3272) [#3272](https://github.com/typescript-eslint/typescript-eslint/issues/3272) + + + + + # [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) diff --git a/lerna.json b/lerna.json index fe0545ff06c8..6fdc5b25fc44 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.24.0", + "version": "4.25.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 6a94c72622f5..6c8d635044cc 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) + + +### Features + +* **typescript-estree:** [TS4.3] support overrides on class members ([#3429](https://github.com/typescript-eslint/typescript-eslint/issues/3429)) ([21d1b62](https://github.com/typescript-eslint/typescript-eslint/commit/21d1b62a0b84b502d2cf12674b3d141994a3ffd4)) +* **typescript-estree:** add support for getter/setter signatures on types ([#3427](https://github.com/typescript-eslint/typescript-eslint/issues/3427)) ([b830b7f](https://github.com/typescript-eslint/typescript-eslint/commit/b830b7f4e8a99affc8af8b53cb83371ef81d7032)), closes [#3272](https://github.com/typescript-eslint/typescript-eslint/issues/3272) [#3272](https://github.com/typescript-eslint/typescript-eslint/issues/3272) + + + + + # [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 8a78a307a0a9..09cf9ec84a09 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.24.0", + "version": "4.25.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 2f066560c29b..852742717c47 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.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) **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 7d8fd97eda0d..59217ed38844 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.24.0", + "version": "4.25.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.24.0", + "@typescript-eslint/experimental-utils": "4.25.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index e3f534c878a6..29a2c1b3b16f 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.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) **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 457a287fd445..4d72a3180baf 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.24.0", + "version": "4.25.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.24.0", + "@typescript-eslint/experimental-utils": "4.25.0", "lodash": "^4.17.15" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.24.0" + "@typescript-eslint/parser": "4.25.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 5868295645f2..142bada67a2d 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) + + +### Bug Fixes + +* corrected no-unsupported-browser-code in roadmap as unimplemented ([#3407](https://github.com/typescript-eslint/typescript-eslint/issues/3407)) ([2319b0e](https://github.com/typescript-eslint/typescript-eslint/commit/2319b0e1847991b8b8902ff4a3b779f1a27c7a45)) + + + + + # [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 3fb68254ed8c..a3554054caad 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.24.0", + "version": "4.25.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.24.0", - "@typescript-eslint/scope-manager": "4.24.0", + "@typescript-eslint/experimental-utils": "4.25.0", + "@typescript-eslint/scope-manager": "4.25.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 da1fdb2f8084..143ae2454360 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) + + +### Bug Fixes + +* **experimental-utils:** fix `isAwaitKeyword` predicate in ast-utils ([#3290](https://github.com/typescript-eslint/typescript-eslint/issues/3290)) ([c15da67](https://github.com/typescript-eslint/typescript-eslint/commit/c15da67b939b615ed063291cde12c55c0d6d236e)) + + + + + # [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) **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 e0c128610369..b0f79040971c 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.24.0", + "version": "4.25.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.24.0", - "@typescript-eslint/types": "4.24.0", - "@typescript-eslint/typescript-estree": "4.24.0", + "@typescript-eslint/scope-manager": "4.25.0", + "@typescript-eslint/types": "4.25.0", + "@typescript-eslint/typescript-estree": "4.25.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 5a02c2ca7dcc..a32e649bbdd4 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.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index fbbbe7e66090..8b83c5ee076d 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.24.0", + "version": "4.25.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.24.0", - "@typescript-eslint/types": "4.24.0", - "@typescript-eslint/typescript-estree": "4.24.0", + "@typescript-eslint/scope-manager": "4.25.0", + "@typescript-eslint/types": "4.25.0", + "@typescript-eslint/typescript-estree": "4.25.0", "debug": "^4.1.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.24.0", + "@typescript-eslint/experimental-utils": "4.25.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 2adcb03afc6c..a74fa227e275 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.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) **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 b5ea7cf462be..fa0f0e3a7ab8 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.24.0", + "version": "4.25.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.24.0", - "@typescript-eslint/visitor-keys": "4.24.0" + "@typescript-eslint/types": "4.25.0", + "@typescript-eslint/visitor-keys": "4.25.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.24.0", + "@typescript-eslint/typescript-estree": "4.25.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 304bc7076760..e6620a31e1c8 100644 --- a/packages/shared-fixtures/CHANGELOG.md +++ b/packages/shared-fixtures/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) + + +### Features + +* **typescript-estree:** [TS4.3] support overrides on class members ([#3429](https://github.com/typescript-eslint/typescript-eslint/issues/3429)) ([21d1b62](https://github.com/typescript-eslint/typescript-eslint/commit/21d1b62a0b84b502d2cf12674b3d141994a3ffd4)) +* **typescript-estree:** add support for getter/setter signatures on types ([#3427](https://github.com/typescript-eslint/typescript-eslint/issues/3427)) ([b830b7f](https://github.com/typescript-eslint/typescript-eslint/commit/b830b7f4e8a99affc8af8b53cb83371ef81d7032)), closes [#3272](https://github.com/typescript-eslint/typescript-eslint/issues/3272) [#3272](https://github.com/typescript-eslint/typescript-eslint/issues/3272) + + + + + # [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) **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 ba7b74508813..64e0df1db659 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.24.0", + "version": "4.25.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 78d47dc326fc..c3c5d08ebddd 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.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index c8ffa8cbb58e..5b779a11da47 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.24.0", + "version": "4.25.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 f9449b5152aa..51ece42c1cc9 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) + + +### Features + +* **typescript-estree:** [TS4.3] support overrides on class members ([#3429](https://github.com/typescript-eslint/typescript-eslint/issues/3429)) ([21d1b62](https://github.com/typescript-eslint/typescript-eslint/commit/21d1b62a0b84b502d2cf12674b3d141994a3ffd4)) +* **typescript-estree:** add support for getter/setter signatures on types ([#3427](https://github.com/typescript-eslint/typescript-eslint/issues/3427)) ([b830b7f](https://github.com/typescript-eslint/typescript-eslint/commit/b830b7f4e8a99affc8af8b53cb83371ef81d7032)), closes [#3272](https://github.com/typescript-eslint/typescript-eslint/issues/3272) [#3272](https://github.com/typescript-eslint/typescript-eslint/issues/3272) + + + + + # [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) **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 15e1ec911bc1..f2dd9d56c43d 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.24.0", + "version": "4.25.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.24.0", - "@typescript-eslint/visitor-keys": "4.24.0", + "@typescript-eslint/types": "4.25.0", + "@typescript-eslint/visitor-keys": "4.25.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.24.0", + "@typescript-eslint/shared-fixtures": "4.25.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 47b63a6189b4..b30f830dc89b 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.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.24.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.23.0...v4.24.0) (2021-05-17) **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 6c82988fd55e..a6fef5057331 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.24.0", + "version": "4.25.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.24.0", + "@typescript-eslint/types": "4.25.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From e97c488e6a50b67c80bd17c8a71b3d938da3259f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 13:53:49 -0700 Subject: [PATCH 143/473] chore: bump ts-node from 9.1.1 to 10.0.0 (#3441) Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 9.1.1 to 10.0.0. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v9.1.1...v10.0.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 32 ++++++++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ea5995ab64d2..a0f872fd64d3 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "prettier": "^2.2.1", "rimraf": "^3.0.2", "ts-jest": "^26.5.1", - "ts-node": "^9.0.0", + "ts-node": "^10.0.0", "tslint": "^6.1.3", "typescript": ">=3.3.1 <4.4.0 || 4.3.1-rc" }, diff --git a/yarn.lock b/yarn.lock index 281160f5ca14..58f9ad75dbcd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1874,6 +1874,26 @@ dependencies: "@sinonjs/commons" "^1.7.0" +"@tsconfig/node10@^1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.7.tgz#1eb1de36c73478a2479cc661ef5af1c16d86d606" + integrity sha512-aBvUmXLQbayM4w3A8TrjwrXs4DZ8iduJnuJLLRGdkWlyakCf1q6uHZJBzXoRA/huAEknG5tcUyQxN3A+In5euQ== + +"@tsconfig/node12@^1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.7.tgz#677bd9117e8164dc319987dd6ff5fc1ba6fbf18b" + integrity sha512-dgasobK/Y0wVMswcipr3k0HpevxFJLijN03A8mYfEPvWvOs14v0ZlYTR4kIgMx8g4+fTyTFv8/jLCIfRqLDJ4A== + +"@tsconfig/node14@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.0.tgz#5bd046e508b1ee90bc091766758838741fdefd6e" + integrity sha512-RKkL8eTdPv6t5EHgFKIVQgsDapugbuOptNd9OOunN/HAkzmmTnZELx1kNCK0rSdUYGmiFMM3rRQMAWiyp023LQ== + +"@tsconfig/node16@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.1.tgz#a6ca6a9a0ff366af433f42f5f0e124794ff6b8f1" + integrity sha512-FTgBI767POY/lKNDNbIzgAX6miIDBs6NTCbdlDb8TrWovHsSvaVIZDlTqym29C6UqhzwcJx4CYr+AlrMywA0cA== + "@types/argparse@1.0.38": version "1.0.38" resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9" @@ -8735,11 +8755,15 @@ ts-jest@^26.5.1: semver "7.x" yargs-parser "20.x" -ts-node@^9.0.0: - version "9.1.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" - integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== +ts-node@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.0.0.tgz#05f10b9a716b0b624129ad44f0ea05dac84ba3be" + integrity sha512-ROWeOIUvfFbPZkoDis0L/55Fk+6gFQNZwwKPLinacRl6tsxstTF1DbAcLKkovwnpKMVvOMHP1TIbnwXwtLg1gg== dependencies: + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.1" arg "^4.1.0" create-require "^1.1.0" diff "^4.0.1" From a1344a52e98f185cfa0936bc14d7ee89bb3d5f11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 13:54:01 -0700 Subject: [PATCH 144/473] chore: bump @commitlint/cli from 12.1.1 to 12.1.4 (#3437) Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint) from 12.1.1 to 12.1.4. - [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.1.1...v12.1.4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 175 +++++++++++++++++++++++++++--------------------------- 1 file changed, 87 insertions(+), 88 deletions(-) diff --git a/yarn.lock b/yarn.lock index 58f9ad75dbcd..6e984ed2d57b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -318,16 +318,15 @@ minimist "^1.2.0" "@commitlint/cli@^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" + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-12.1.4.tgz#af4d9dd3c0122c7b39a61fa1cd2abbad0422dbe0" + integrity sha512-ZR1WjXLvqEffYyBPT0XdnSxtt3Ty1TMoujEtseW5o3vPnkA1UNashAMjQVg/oELqfaiAMnDw8SERPMN0e/0kLg== + dependencies: + "@commitlint/format" "^12.1.4" + "@commitlint/lint" "^12.1.4" + "@commitlint/load" "^12.1.4" + "@commitlint/read" "^12.1.4" + "@commitlint/types" "^12.1.4" lodash "^4.17.19" resolve-from "5.0.0" resolve-global "1.0.0" @@ -350,118 +349,118 @@ resolve-pkg "2.0.0" semver "7.3.5" -"@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== +"@commitlint/ensure@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-12.1.4.tgz#287ae2dcc5ccb086e749705b1bd9bdb99773056f" + integrity sha512-MxHIBuAG9M4xl33qUfIeMSasbv3ktK0W+iygldBxZOL4QSYC2Gn66pZAQMnV9o3V+sVFHoAK2XUKqBAYrgbEqw== dependencies: - "@commitlint/types" "^12.1.1" + "@commitlint/types" "^12.1.4" lodash "^4.17.19" -"@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/execute-rule@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-12.1.4.tgz#9973b02e9779adbf1522ae9ac207a4815ec73de1" + integrity sha512-h2S1j8SXyNeABb27q2Ok2vD1WfxJiXvOttKuRA9Or7LN6OQoC/KtT3844CIhhWNteNMu/wE0gkTqGxDVAnJiHg== -"@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== +"@commitlint/format@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-12.1.4.tgz#db2d46418a6ae57c90e5f7f65dff46f0265d9f24" + integrity sha512-h28ucMaoRjVvvgS6Bdf85fa/+ZZ/iu1aeWGCpURnQV7/rrVjkhNSjZwGlCOUd5kDV1EnZ5XdI7L18SUpRjs26g== dependencies: - "@commitlint/types" "^12.1.1" + "@commitlint/types" "^12.1.4" chalk "^4.0.0" -"@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== +"@commitlint/is-ignored@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-12.1.4.tgz#4c430bc3b361aa9be5cd4ddb252c1559870ea7bc" + integrity sha512-uTu2jQU2SKvtIRVLOzMQo3KxDtO+iJ1p0olmncwrqy4AfPLgwoyCP2CiULq5M7xpR3+dE3hBlZXbZTQbD7ycIw== dependencies: - "@commitlint/types" "^12.1.1" + "@commitlint/types" "^12.1.4" semver "7.3.5" -"@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== +"@commitlint/lint@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-12.1.4.tgz#856b7fd2b2e6367b836cb84a12f1c1b3c0e40d22" + integrity sha512-1kZ8YDp4to47oIPFELUFGLiLumtPNKJigPFDuHt2+f3Q3IKdQ0uk53n3CPl4uoyso/Og/EZvb1mXjFR/Yce4cA== dependencies: - "@commitlint/is-ignored" "^12.1.1" - "@commitlint/parse" "^12.1.1" - "@commitlint/rules" "^12.1.1" - "@commitlint/types" "^12.1.1" + "@commitlint/is-ignored" "^12.1.4" + "@commitlint/parse" "^12.1.4" + "@commitlint/rules" "^12.1.4" + "@commitlint/types" "^12.1.4" -"@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== +"@commitlint/load@>6.1.1", "@commitlint/load@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-12.1.4.tgz#e3c2dbc0e7d8d928f57a6878bd7219909fc0acab" + integrity sha512-Keszi0IOjRzKfxT+qES/n+KZyLrxy79RQz8wWgssCboYjKEp+wC+fLCgbiMCYjI5k31CIzIOq/16J7Ycr0C0EA== dependencies: - "@commitlint/execute-rule" "^12.1.1" - "@commitlint/resolve-extends" "^12.1.1" - "@commitlint/types" "^12.1.1" + "@commitlint/execute-rule" "^12.1.4" + "@commitlint/resolve-extends" "^12.1.4" + "@commitlint/types" "^12.1.4" chalk "^4.0.0" cosmiconfig "^7.0.0" lodash "^4.17.19" resolve-from "^5.0.0" -"@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/message@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-12.1.4.tgz#3895edcc0709deca5945f3d55f5ea95a9f1f446d" + integrity sha512-6QhalEKsKQ/Y16/cTk5NH4iByz26fqws2ub+AinHPtM7Io0jy4e3rym9iE+TkEqiqWZlUigZnTwbPvRJeSUBaA== -"@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== +"@commitlint/parse@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-12.1.4.tgz#ba03d54d24ef84f6fd2ff31c5e9998b22d7d0aa1" + integrity sha512-yqKSAsK2V4X/HaLb/yYdrzs6oD/G48Ilt0EJ2Mp6RJeWYxG14w/Out6JrneWnr/cpzemyN5hExOg6+TB19H/Lw== dependencies: - "@commitlint/types" "^12.1.1" + "@commitlint/types" "^12.1.4" conventional-changelog-angular "^5.0.11" conventional-commits-parser "^3.0.0" -"@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== +"@commitlint/read@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-12.1.4.tgz#552fda42ef185d5b578beb6f626a5f8b282de3a6" + integrity sha512-TnPQSJgD8Aod5Xeo9W4SaYKRZmIahukjcCWJ2s5zb3ZYSmj6C85YD9cR5vlRyrZjj78ItLUV/X4FMWWVIS38Jg== dependencies: - "@commitlint/top-level" "^12.1.1" - "@commitlint/types" "^12.1.1" + "@commitlint/top-level" "^12.1.4" + "@commitlint/types" "^12.1.4" fs-extra "^9.0.0" git-raw-commits "^2.0.0" -"@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== +"@commitlint/resolve-extends@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-12.1.4.tgz#e758ed7dcdf942618b9f603a7c28a640f6a0802a" + integrity sha512-R9CoUtsXLd6KSCfsZly04grsH6JVnWFmVtWgWs1KdDpdV+G3TSs37tColMFqglpkx3dsWu8dsPD56+D9YnJfqg== dependencies: import-fresh "^3.0.0" lodash "^4.17.19" resolve-from "^5.0.0" resolve-global "^1.0.0" -"@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== +"@commitlint/rules@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-12.1.4.tgz#0e141b08caa3d7bdc48aa784baa8baff3efd64db" + integrity sha512-W8m6ZSjg7RuIsIfzQiFHa48X5mcPXeKT9yjBxVmjHvYfS2FDBf1VxCQ7vO0JTVIdV4ohjZ0eKg/wxxUuZHJAZg== dependencies: - "@commitlint/ensure" "^12.1.1" - "@commitlint/message" "^12.1.1" - "@commitlint/to-lines" "^12.1.1" - "@commitlint/types" "^12.1.1" + "@commitlint/ensure" "^12.1.4" + "@commitlint/message" "^12.1.4" + "@commitlint/to-lines" "^12.1.4" + "@commitlint/types" "^12.1.4" -"@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/to-lines@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-12.1.4.tgz#caa582dbf121f377a0588bb64e25c4854843cd25" + integrity sha512-TParumvbi8bdx3EdLXz2MaX+e15ZgoCqNUgqHsRLwyqLUTRbqCVkzrfadG1UcMQk8/d5aMbb327ZKG3Q4BRorw== -"@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== +"@commitlint/top-level@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-12.1.4.tgz#96d5c715bfc1bdf86dfcf11b67fc2cf7658c7a6e" + integrity sha512-d4lTJrOT/dXlpY+NIt4CUl77ciEzYeNVc0VFgUQ6VA+b1rqYD2/VWFjBlWVOrklxtSDeKyuEhs36RGrppEFAvg== dependencies: find-up "^5.0.0" -"@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== +"@commitlint/types@^12.1.4": + version "12.1.4" + resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-12.1.4.tgz#9618a5dc8991fb58e6de6ed89d7bf712fa74ba7e" + integrity sha512-KRIjdnWNUx6ywz+SJvjmNCbQKcKP6KArhjZhY2l+CWKxak0d77SOjggkMwFTiSgLODOwmuLTbarR2ZfWPiPMlw== dependencies: chalk "^4.0.0" @@ -4485,16 +4484,16 @@ get-port@^4.2.0: resolved "https://registry.yarnpkg.com/get-port/-/get-port-4.2.0.tgz#e37368b1e863b7629c43c5a323625f95cf24b119" integrity sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw== -get-stdin@8.0.0, get-stdin@^8.0.0, get-stdin@~8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" - integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== - get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= +get-stdin@^8.0.0, get-stdin@~8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" + integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== + get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" From 10d20e13ddc65ae5531f7d30a75c60ed11b098d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 13:54:18 -0700 Subject: [PATCH 145/473] chore: bump @types/lodash from 4.14.169 to 4.14.170 (#3438) Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.169 to 4.14.170. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) 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 6e984ed2d57b..10d1e87e6cfb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2016,9 +2016,9 @@ integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= "@types/lodash@*", "@types/lodash@^4.14.149": - version "4.14.169" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.169.tgz#83c217688f07a4d9ef8f28a3ebd1d318f6ff4cbb" - integrity sha512-DvmZHoHTFJ8zhVYwCLWbQ7uAbYQEk52Ev2/ZiQ7Y7gQGeV9pjBqjnQpECMHfKS1rCYAhMI7LHVxwyZLZinJgdw== + version "4.14.170" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.170.tgz#0d67711d4bf7f4ca5147e9091b847479b87925d6" + integrity sha512-bpcvu/MKHHeYX+qeEN8GE7DIravODWdACVA1ctevD8CN24RhPZIKMn9ntfAsrvLfSX3cR5RrBKAbYm9bGs0A+Q== "@types/marked@*", "@types/marked@^2.0.0": version "2.0.2" From f04b42d47c403ec77e5e5850b23247297de27377 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 13:54:39 -0700 Subject: [PATCH 146/473] chore: bump @types/node from 15.3.1 to 15.6.0 (#3435) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.3.1 to 15.6.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) 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 10d1e87e6cfb..e3a223ee2163 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2044,9 +2044,9 @@ form-data "^3.0.0" "@types/node@*", "@types/node@>= 8", "@types/node@^15.0.2": - version "15.3.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.3.1.tgz#23a06b87eedb524016616e886b116b8fdcb180af" - integrity sha512-weaeiP4UF4XgF++3rpQhpIJWsCTS4QJw5gvBhQu6cFIxTwyxWIe3xbnrY/o2lTCQ0lsdb8YIUDUvLR4Vuz5rbw== + version "15.6.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.6.0.tgz#f0ddca5a61e52627c9dcb771a6039d44694597bc" + integrity sha512-gCYSfQpy+LYhOFTKAeE8BkyGqaxmlFxe+n4DKM6DR0wzw/HISUE/hAmkC/KT8Sw5PCJblqg062b3z9gucv3k0A== "@types/node@10.17.13": version "10.17.13" From 352ad368104f5bc35209a15490eff7f84fb06c72 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 13:54:49 -0700 Subject: [PATCH 147/473] chore: bump @types/marked from 2.0.2 to 2.0.3 (#3439) Bumps [@types/marked](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/marked) from 2.0.2 to 2.0.3. - [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 e3a223ee2163..af0745cd7c5f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2021,9 +2021,9 @@ integrity sha512-bpcvu/MKHHeYX+qeEN8GE7DIravODWdACVA1ctevD8CN24RhPZIKMn9ntfAsrvLfSX3cR5RrBKAbYm9bGs0A+Q== "@types/marked@*", "@types/marked@^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.2.tgz#33a15106383f6e42cd6bdd38093e6b19904e29e1" - integrity sha512-P4zanhCQKs4tiWPPBGpB7lHflgFCP9DFGNI5YtpW9MALKoy2qs9rHNWJ+z55cegD9uCfnmsKuaosq9FNvbxrOw== + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.3.tgz#c8ea93684e530cc3b667d3e7226556dd0844ad1f" + integrity sha512-lbhSN1rht/tQ+dSWxawCzGgTfxe9DB31iLgiT1ZVT5lshpam/nyOA1m3tKHRoNPctB2ukSL22JZI5Fr+WI/zYg== "@types/minimatch@*": version "3.0.3" From 7961037453f1bf13c4aa62b8194e56bc1228eac1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 18:13:43 -0700 Subject: [PATCH 148/473] chore: bump browserslist from 4.16.3 to 4.16.6 (#3443) Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.16.3 to 4.16.6. - [Release notes](https://github.com/browserslist/browserslist/releases) - [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md) - [Commits](https://github.com/browserslist/browserslist/compare/4.16.3...4.16.6) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/yarn.lock b/yarn.lock index af0745cd7c5f..fe93766c90f9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2600,15 +2600,15 @@ browser-process-hrtime@^1.0.0: integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== browserslist@^4.14.5: - version "4.16.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.3.tgz#340aa46940d7db878748567c5dea24a48ddf3717" - integrity sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw== + version "4.16.6" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" + integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== dependencies: - caniuse-lite "^1.0.30001181" - colorette "^1.2.1" - electron-to-chromium "^1.3.649" + caniuse-lite "^1.0.30001219" + colorette "^1.2.2" + electron-to-chromium "^1.3.723" escalade "^3.1.1" - node-releases "^1.1.70" + node-releases "^1.1.71" bs-logger@0.x: version "0.2.6" @@ -2770,10 +2770,10 @@ camelcase@^6.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -caniuse-lite@^1.0.30001181: - version "1.0.30001191" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001191.tgz#bacb432b6701f690c8c5f7c680166b9a9f0843d9" - integrity sha512-xJJqzyd+7GCJXkcoBiQ1GuxEiOBCLQ0aVW9HMekifZsAVGdj5eJ4mFB9fEhSHipq9IOk/QXFJUiIr9lZT+EsGw== +caniuse-lite@^1.0.30001219: + version "1.0.30001228" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz#bfdc5942cd3326fa51ee0b42fbef4da9d492a7fa" + integrity sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A== capture-exit@^2.0.0: version "2.0.0" @@ -2964,10 +2964,10 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" - integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== +colorette@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" + integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== colors@~1.2.1: version "1.2.5" @@ -3680,10 +3680,10 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -electron-to-chromium@^1.3.649: - version "1.3.672" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.672.tgz#3a6e335016dab4bc584d5292adc4f98f54541f6a" - integrity sha512-gFQe7HBb0lbOMqK2GAS5/1F+B0IMdYiAgB9OT/w1F4M7lgJK2aNOMNOM622aEax+nS1cTMytkiT0uMOkbtFmHw== +electron-to-chromium@^1.3.723: + version "1.3.736" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.736.tgz#f632d900a1f788dab22fec9c62ec5c9c8f0c4052" + integrity sha512-DY8dA7gR51MSo66DqitEQoUMQ0Z+A2DSXFi7tK304bdTVqczCAfUuyQw6Wdg8hIoo5zIxkU1L24RQtUce1Ioig== emittery@^0.7.1: version "0.7.2" @@ -6741,10 +6741,10 @@ node-notifier@^8.0.0: uuid "^8.3.0" which "^2.0.2" -node-releases@^1.1.70: - version "1.1.71" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb" - integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg== +node-releases@^1.1.71: + version "1.1.72" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.72.tgz#14802ab6b1039a79a0c7d662b610a5bbd76eacbe" + integrity sha512-LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw== nopt@^4.0.1: version "4.0.3" From 61e035356ced5186040eb4aeb78bd74c1c1ce4b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 May 2021 18:13:56 -0700 Subject: [PATCH 149/473] chore: bump marked from 2.0.4 to 2.0.5 (#3444) Bumps [marked](https://github.com/markedjs/marked) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/markedjs/marked/releases) - [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js) - [Commits](https://github.com/markedjs/marked/compare/v2.0.4...v2.0.5) 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 fe93766c90f9..47731504552c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6387,9 +6387,9 @@ markdownlint@~0.23.1: markdown-it "12.0.4" marked@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.4.tgz#71d54d41f27d91ac2ed308f73c301fe9f0657a94" - integrity sha512-MIL0xKRDQM3DE7dJr/wa6JV0EmK9yZ3cwuTc2bu66FNm/tmEMm9cJCgJZpt9R+K1T+pB2iBNV55wvnwSd345zg== + version "2.0.5" + resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.5.tgz#2d15c759b9497b0e7b5b57f4c2edabe1002ef9e7" + integrity sha512-yfCEUXmKhBPLOzEC7c+tc4XZdIeTdGoRCZakFMkCxodr7wDXqoapIME4wjcpBPJLNyUnKJ3e8rb8wlAgnLnaDw== mdurl@^1.0.1: version "1.0.1" From 5af8db6db3dbad62ff44d75a52c591e206f81b00 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sat, 29 May 2021 07:35:03 +0900 Subject: [PATCH 150/473] test(typescript-estree): remove transform for TSTypePredicate (#3457) --- packages/typescript-estree/package.json | 2 +- packages/typescript-estree/tests/ast-alignment/utils.ts | 5 ----- yarn.lock | 8 ++++---- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index f2dd9d56c43d..41454c608fa0 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -51,7 +51,7 @@ }, "devDependencies": { "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.14.3", + "@babel/parser": "^7.14.4", "@babel/types": "^7.14.2", "@types/babel__code-frame": "*", "@types/debug": "*", diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index 67a4c2db67a9..09540e749598 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -151,11 +151,6 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any { }; } }, - TSTypePredicate(node) { - if (!node.typeAnnotation) { - node.typeAnnotation = null; - } - }, MethodDefinition(node) { /** * Babel: MethodDefinition + abstract: true diff --git a/yarn.lock b/yarn.lock index 47731504552c..c9fc0ec3e137 100644 --- a/yarn.lock +++ b/yarn.lock @@ -176,10 +176,10 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.15.tgz#8e66775fb523599acb6a289e12929fa5ab0954d8" integrity sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ== -"@babel/parser@^7.14.3": - version "7.14.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.3.tgz#9b530eecb071fd0c93519df25c5ff9f14759f298" - integrity sha512-7MpZDIfI7sUC5zWo2+foJ50CSI5lcqDehZ0lVgIhSi4bFEk94fLAKlF3Q0nzSQQ+ca0lm+O6G9ztKVBeu8PMRQ== +"@babel/parser@^7.14.4": + version "7.14.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.4.tgz#a5c560d6db6cd8e6ed342368dea8039232cbab18" + integrity sha512-ArliyUsWDUqEGfWcmzpGUzNfLxTdTp6WU4IuP6QFSp9gGfWS6boxFCkJSJ/L4+RG8z/FnIU3WxCk6hPL9SSWeA== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" From 9524424a4bce09dafb7eb0d6c322f07f2a0003da Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Fri, 28 May 2021 18:55:43 -0400 Subject: [PATCH 151/473] chore: enable no-unsafe-assignment internally (#3280) * chore: enable no-unsafe-assignment internally * Remove unnecessary disable * Properly fix in generate-contributors * Update packages/eslint-plugin-tslint/src/rules/config.ts Co-authored-by: Brad Zacher * Update packages/scope-manager/tests/util/serializers/baseSerializer.ts Co-authored-by: Brad Zacher * Update from the Twitch stream :sparkles: * Long delayed cleanups * Cleaned up a final few lint complaints * fix: TSESTree import * fix: moving around disables Co-authored-by: Brad Zacher --- .eslintrc.js | 2 +- .../eslint-plugin-internal/src/util/createRule.ts | 3 ++- packages/eslint-plugin-tslint/src/rules/config.ts | 7 ++++--- .../src/rules/indent-new-do-not-use/TokenInfo.ts | 4 ++-- .../src/rules/indent-new-do-not-use/index.ts | 8 +++----- packages/eslint-plugin/src/rules/indent.ts | 4 ++-- packages/eslint-plugin/src/rules/naming-convention.ts | 6 +++--- packages/eslint-plugin/src/rules/no-extra-parens.ts | 2 +- .../eslint-plugin/src/rules/unified-signatures.ts | 4 ++-- packages/eslint-plugin/src/util/createRule.ts | 3 ++- .../src/ast-utils/eslint-utils/ReferenceTracker.ts | 3 ++- .../src/eslint-utils/applyDefault.ts | 8 ++++---- .../experimental-utils/src/ts-eslint-scope/index.ts | 2 ++ packages/experimental-utils/typings/eslint-scope.d.ts | 5 ++--- packages/experimental-utils/typings/eslint-utils.d.ts | 6 +++--- packages/parser/src/index.ts | 1 + packages/scope-manager/src/scope/GlobalScope.ts | 2 +- .../tests/util/serializers/baseSerializer.ts | 4 +++- packages/typescript-estree/src/ast-converter.ts | 4 +--- packages/typescript-estree/src/convert.ts | 2 +- packages/typescript-estree/src/index.ts | 1 + .../typescript-estree/tests/ast-alignment/parse.ts | 11 +++++++---- .../typescript-estree/tests/ast-alignment/utils.ts | 2 +- packages/typescript-estree/typings/typescript.d.ts | 1 + tests/integration/utils/generate-package-json.js | 2 ++ tools/generate-contributors.ts | 4 ++-- 26 files changed, 56 insertions(+), 45 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 1deda3b592ca..4dbde1fb20cf 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -64,7 +64,6 @@ module.exports = { ], // TODO - enable these new recommended rules - '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/restrict-template-expressions': 'off', @@ -172,6 +171,7 @@ module.exports = { 'jest/globals': true, }, rules: { + '@typescript-eslint/no-unsafe-assignment': 'off', 'eslint-plugin/no-identical-tests': 'error', 'jest/no-disabled-tests': 'warn', 'jest/no-focused-tests': 'error', diff --git a/packages/eslint-plugin-internal/src/util/createRule.ts b/packages/eslint-plugin-internal/src/util/createRule.ts index 24c630d52450..2ac52d199fc8 100644 --- a/packages/eslint-plugin-internal/src/util/createRule.ts +++ b/packages/eslint-plugin-internal/src/util/createRule.ts @@ -1,7 +1,8 @@ import { ESLintUtils } from '@typescript-eslint/experimental-utils'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder -const version = require('../../package.json').version; +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment +const version: string = require('../../package.json'); const createRule = ESLintUtils.RuleCreator( name => diff --git a/packages/eslint-plugin-tslint/src/rules/config.ts b/packages/eslint-plugin-tslint/src/rules/config.ts index b6da50bbf50e..41326a8959c1 100644 --- a/packages/eslint-plugin-tslint/src/rules/config.ts +++ b/packages/eslint-plugin-tslint/src/rules/config.ts @@ -4,7 +4,8 @@ import { Configuration, RuleSeverity } from 'tslint'; import { CustomLinter } from '../custom-linter'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder -const version = require('../../package.json').version; +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment +const version: string = require('../../package.json'); const createRule = ESLintUtils.RuleCreator( () => @@ -62,8 +63,8 @@ export default createRule({ docs: { description: 'Wraps a TSLint configuration and lints the whole source using TSLint', - // one off special category for this plugin - category: 'TSLint' as any, // eslint-disable-line @typescript-eslint/no-explicit-any + // @ts-expect-error - We know this is a one off special category for this plugin + category: 'TSLint', recommended: false, }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/indent-new-do-not-use/TokenInfo.ts b/packages/eslint-plugin/src/rules/indent-new-do-not-use/TokenInfo.ts index 16d15c4ae5f1..13859cde1e8d 100644 --- a/packages/eslint-plugin/src/rules/indent-new-do-not-use/TokenInfo.ts +++ b/packages/eslint-plugin/src/rules/indent-new-do-not-use/TokenInfo.ts @@ -9,7 +9,7 @@ import { TokenOrComment } from './BinarySearchTree'; */ export class TokenInfo { private readonly sourceCode: TSESLint.SourceCode; - public firstTokensByLineNumber: Map; + public readonly firstTokensByLineNumber: Map; constructor(sourceCode: TSESLint.SourceCode) { this.sourceCode = sourceCode; @@ -28,7 +28,7 @@ export class TokenInfo { } return map; }, - new Map(), + new Map(), ); } diff --git a/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts b/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts index 7b6bf6d35b99..fca573e2c32b 100644 --- a/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts +++ b/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts @@ -1664,12 +1664,10 @@ export default createRule({ return commentMap.set( comment, - commentMap.has(tokenOrCommentBefore) - ? commentMap.get(tokenOrCommentBefore) - : tokenOrCommentBefore, + commentMap.get(tokenOrCommentBefore) ?? tokenOrCommentBefore, ); }, - new WeakMap(), + new WeakMap(), ); sourceCode.lines.forEach((_, lineIndex) => { @@ -1700,7 +1698,7 @@ export default createRule({ } if (isCommentToken(firstTokenOfLine)) { - const tokenBefore = precedingTokens.get(firstTokenOfLine); + const tokenBefore = precedingTokens.get(firstTokenOfLine)!; const tokenAfter = tokenBefore ? sourceCode.getTokenAfter(tokenBefore)! : sourceCode.ast.tokens[0]; diff --git a/packages/eslint-plugin/src/rules/indent.ts b/packages/eslint-plugin/src/rules/indent.ts index 9ac6a1593d9c..a000cc0d4657 100644 --- a/packages/eslint-plugin/src/rules/indent.ts +++ b/packages/eslint-plugin/src/rules/indent.ts @@ -3,7 +3,7 @@ * This is due to some really funky type conversions between different node types. * This is done intentionally based on the internal implementation of the base indent rule. */ -/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment */ import { TSESTree, @@ -396,7 +396,7 @@ export default util.createRule({ computed: false, method: false, shorthand: false, - } as any, + }, ], // location data diff --git a/packages/eslint-plugin/src/rules/naming-convention.ts b/packages/eslint-plugin/src/rules/naming-convention.ts index 16e31b62ef8a..6b4b55309cf6 100644 --- a/packages/eslint-plugin/src/rules/naming-convention.ts +++ b/packages/eslint-plugin/src/rules/naming-convention.ts @@ -81,17 +81,17 @@ export default util.createRule({ }, defaultOptions: defaultCamelCaseAllTheThingsConfig, create(contextWithoutDefaults) { - const context: Context = + const context = contextWithoutDefaults.options && contextWithoutDefaults.options.length > 0 ? contextWithoutDefaults : // only apply the defaults when the user provides no config - Object.setPrototypeOf( + (Object.setPrototypeOf( { options: defaultCamelCaseAllTheThingsConfig, }, contextWithoutDefaults, - ); + ) as Context); const validators = parseOptions(context); diff --git a/packages/eslint-plugin/src/rules/no-extra-parens.ts b/packages/eslint-plugin/src/rules/no-extra-parens.ts index 948f12ad8546..774fb44b389a 100644 --- a/packages/eslint-plugin/src/rules/no-extra-parens.ts +++ b/packages/eslint-plugin/src/rules/no-extra-parens.ts @@ -1,5 +1,5 @@ // any is required to work around manipulating the AST in weird ways -/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment */ import { AST_NODE_TYPES, diff --git a/packages/eslint-plugin/src/rules/unified-signatures.ts b/packages/eslint-plugin/src/rules/unified-signatures.ts index e90490427c6c..dced203f1756 100644 --- a/packages/eslint-plugin/src/rules/unified-signatures.ts +++ b/packages/eslint-plugin/src/rules/unified-signatures.ts @@ -471,7 +471,7 @@ export default util.createRule({ const scopes: Scope[] = []; let currentScope: Scope = { - overloads: new Map(), + overloads: new Map(), }; function createScope( @@ -480,7 +480,7 @@ export default util.createRule({ ): void { currentScope && scopes.push(currentScope); currentScope = { - overloads: new Map(), + overloads: new Map(), parent, typeParameters, }; diff --git a/packages/eslint-plugin/src/util/createRule.ts b/packages/eslint-plugin/src/util/createRule.ts index 5982f04c3d5c..d6684de5d0d0 100644 --- a/packages/eslint-plugin/src/util/createRule.ts +++ b/packages/eslint-plugin/src/util/createRule.ts @@ -1,7 +1,8 @@ import { ESLintUtils } from '@typescript-eslint/experimental-utils'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder -const version = require('../../package.json').version; +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment +const version: string = require('../../package.json'); export const createRule = ESLintUtils.RuleCreator( name => diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts index 2298ac1fb1b2..ddd24e1c029e 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts @@ -1,13 +1,14 @@ /* eslint-disable @typescript-eslint/no-namespace */ - import * as eslintUtils from 'eslint-utils'; import { TSESTree } from '../../ts-estree'; import * as TSESLint from '../../ts-eslint'; +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ const ReferenceTrackerREAD: unique symbol = eslintUtils.ReferenceTracker.READ; const ReferenceTrackerCALL: unique symbol = eslintUtils.ReferenceTracker.CALL; const ReferenceTrackerCONSTRUCT: unique symbol = eslintUtils.ReferenceTracker.CONSTRUCT; +/* eslint-enable @typescript-eslint/no-unsafe-assignment */ interface ReferenceTracker { /** diff --git a/packages/experimental-utils/src/eslint-utils/applyDefault.ts b/packages/experimental-utils/src/eslint-utils/applyDefault.ts index a9984b563a17..6b3282080a82 100644 --- a/packages/experimental-utils/src/eslint-utils/applyDefault.ts +++ b/packages/experimental-utils/src/eslint-utils/applyDefault.ts @@ -8,13 +8,13 @@ import { deepMerge, isObjectNotArray } from './deepMerge'; * @returns the options with defaults */ function applyDefault( - defaultOptions: TDefault, - userOptions: TUser | null, + defaultOptions: Readonly, + userOptions: Readonly | null, ): TDefault { // clone defaults - const options: AsMutable = JSON.parse( + const options = JSON.parse( JSON.stringify(defaultOptions), - ); + ) as AsMutable; if (userOptions === null || userOptions === undefined) { return options; diff --git a/packages/experimental-utils/src/ts-eslint-scope/index.ts b/packages/experimental-utils/src/ts-eslint-scope/index.ts index d713845f9f46..7cd1bed4021c 100644 --- a/packages/experimental-utils/src/ts-eslint-scope/index.ts +++ b/packages/experimental-utils/src/ts-eslint-scope/index.ts @@ -9,4 +9,6 @@ export * from './Referencer'; export * from './Scope'; export * from './ScopeManager'; export * from './Variable'; + +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment export const version: string = ESLintVersion; diff --git a/packages/experimental-utils/typings/eslint-scope.d.ts b/packages/experimental-utils/typings/eslint-scope.d.ts index 7b4d0bc1b2e9..e9af4b350f6f 100644 --- a/packages/experimental-utils/typings/eslint-scope.d.ts +++ b/packages/experimental-utils/typings/eslint-scope.d.ts @@ -57,7 +57,6 @@ declare module 'eslint-scope/lib/scope-manager' { export = ScopeManager; } declare module 'eslint-scope' { - const version: string; - const analyze: unknown; - export { analyze, version }; + export const version: string; + export const analyze: unknown; } diff --git a/packages/experimental-utils/typings/eslint-utils.d.ts b/packages/experimental-utils/typings/eslint-utils.d.ts index f12326c0b4ac..f99a3e840db8 100644 --- a/packages/experimental-utils/typings/eslint-utils.d.ts +++ b/packages/experimental-utils/typings/eslint-utils.d.ts @@ -32,9 +32,9 @@ declare module 'eslint-utils' { export const isSemicolonToken: unknown; export const PatternMatcher: unknown; export const ReferenceTracker: { - READ: never; - CALL: never; - CONSTRUCT: never; + readonly READ: never; + readonly CALL: never; + readonly CONSTRUCT: never; new (): never; }; } diff --git a/packages/parser/src/index.ts b/packages/parser/src/index.ts index 02b7568a692d..451f263d62b6 100644 --- a/packages/parser/src/index.ts +++ b/packages/parser/src/index.ts @@ -5,4 +5,5 @@ export { } from '@typescript-eslint/typescript-estree'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment export const version: string = require('../package.json').version; diff --git a/packages/scope-manager/src/scope/GlobalScope.ts b/packages/scope-manager/src/scope/GlobalScope.ts index 3da909c1cee5..58701eaa0676 100644 --- a/packages/scope-manager/src/scope/GlobalScope.ts +++ b/packages/scope-manager/src/scope/GlobalScope.ts @@ -34,7 +34,7 @@ class GlobalScope extends ScopeBase< constructor(scopeManager: ScopeManager, block: GlobalScope['block']) { super(scopeManager, ScopeType.global, null, block, false); this.implicit = { - set: new Map(), + set: new Map(), variables: [], leftToBeResolved: [], }; diff --git a/packages/scope-manager/tests/util/serializers/baseSerializer.ts b/packages/scope-manager/tests/util/serializers/baseSerializer.ts index d30ba31b1380..7d5718030677 100644 --- a/packages/scope-manager/tests/util/serializers/baseSerializer.ts +++ b/packages/scope-manager/tests/util/serializers/baseSerializer.ts @@ -33,7 +33,9 @@ function createSerializer( ): string { const id = thing.$id != null ? `$${thing.$id}` : ''; // If `type` is a base class, we should print out the name of the subclass - const constructorName = Object.getPrototypeOf(thing).constructor.name; + // eslint-disable-next-line @typescript-eslint/ban-types + const constructorName = (Object.getPrototypeOf(thing) as Object) + .constructor.name; if (constructorName === 'ImplicitLibVariable' && thing.name === 'const') { return 'ImplicitGlobalConstTypeVariable'; diff --git a/packages/typescript-estree/src/ast-converter.ts b/packages/typescript-estree/src/ast-converter.ts index e42f722ff66d..33c8f9fbc5e5 100644 --- a/packages/typescript-estree/src/ast-converter.ts +++ b/packages/typescript-estree/src/ast-converter.ts @@ -15,9 +15,7 @@ export function astConverter( * The TypeScript compiler produced fundamental parse errors when parsing the * source. */ - // internal typescript api... - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const parseDiagnostics = (ast as any).parseDiagnostics; + const { parseDiagnostics } = ast; if (parseDiagnostics.length) { throw convertError(parseDiagnostics[0]); } diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 5dbce7bd52b8..b29a722d1716 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1,5 +1,5 @@ // There's lots of funny stuff due to the typing of ts.Node -/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-call */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call */ import * as ts from 'typescript'; import { canContainDirective, diff --git a/packages/typescript-estree/src/index.ts b/packages/typescript-estree/src/index.ts index a619e48f679f..81f3d69446b6 100644 --- a/packages/typescript-estree/src/index.ts +++ b/packages/typescript-estree/src/index.ts @@ -8,4 +8,5 @@ export { clearCaches } from './create-program/createWatchProgram'; export { visitorKeys } from '@typescript-eslint/visitor-keys'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment export const version: string = require('../package.json').version; diff --git a/packages/typescript-estree/tests/ast-alignment/parse.ts b/packages/typescript-estree/tests/ast-alignment/parse.ts index 6a17b4096b26..0a643827f3e3 100644 --- a/packages/typescript-estree/tests/ast-alignment/parse.ts +++ b/packages/typescript-estree/tests/ast-alignment/parse.ts @@ -1,9 +1,11 @@ -/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/restrict-plus-operands */ +/* eslint-disable @typescript-eslint/no-explicit-any */ import type babelParser from '@babel/parser'; import { ParserPlugin } from '@babel/parser'; import { codeFrameColumns } from '@babel/code-frame'; +import type { File } from '@babel/types'; import * as parser from '../../src/parser'; +import { TSESTree } from '@typescript-eslint/types'; function createError( message: string, @@ -19,8 +21,8 @@ function createError( return error; } -function parseWithBabelParser(text: string, jsx = true): any { - const babel: typeof babelParser = require('@babel/parser'); +function parseWithBabelParser(text: string, jsx = true): File { + const babel = require('@babel/parser') as typeof babelParser; const plugins: ParserPlugin[] = [ 'classProperties', 'decorators-legacy', @@ -96,7 +98,7 @@ export function parse( ); } } catch (error) { - const loc = error.loc; + const loc = error.loc as TSESTree.LineAndColumnData | undefined; if (loc) { error.codeFrame = codeFrameColumns( text, @@ -112,6 +114,7 @@ export function parse( ); error.message += `\n${error.codeFrame}`; } + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment result.parseError = error; } diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index 09540e749598..34b318898c11 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -1,5 +1,5 @@ // babel types are something we don't really care about -/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/restrict-plus-operands */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/restrict-plus-operands */ import { AST_NODE_TYPES, TSESTree } from '../../src/ts-estree'; import { deeplyCopy, omitDeep } from '../../tools/test-utils'; import * as BabelTypes from '@babel/types'; diff --git a/packages/typescript-estree/typings/typescript.d.ts b/packages/typescript-estree/typings/typescript.d.ts index 5034447253b4..73268ec90529 100644 --- a/packages/typescript-estree/typings/typescript.d.ts +++ b/packages/typescript-estree/typings/typescript.d.ts @@ -4,5 +4,6 @@ declare module 'typescript' { interface SourceFile { // this is marked as internal to typescript externalModuleIndicator?: Node; + parseDiagnostics: DiagnosticWithLocation[]; } } diff --git a/tests/integration/utils/generate-package-json.js b/tests/integration/utils/generate-package-json.js index 1f6af28df63e..d627cc889b8a 100644 --- a/tests/integration/utils/generate-package-json.js +++ b/tests/integration/utils/generate-package-json.js @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ + const fs = require('fs'); // eslint-disable-next-line import/no-absolute-path const rootPackageJSON = require('/usr/root-package.json'); diff --git a/tools/generate-contributors.ts b/tools/generate-contributors.ts index 343263b88dee..07d59c394f00 100644 --- a/tools/generate-contributors.ts +++ b/tools/generate-contributors.ts @@ -42,9 +42,9 @@ async function* fetchUsers(page = 1): AsyncIterableIterator { const response = await fetch(`${contributorsApiUrl}&page=${page}`, { method: 'GET', }); - const contributors: + const contributors = (await response.json()) as | Contributor[] - | { message: string } = await response.json(); + | { message: string }; if (!Array.isArray(contributors)) { throw new Error(contributors.message); From d134b1fa2540dec7094728f3dec1bbb8c644fe58 Mon Sep 17 00:00:00 2001 From: Florian Adonis Date: Sat, 29 May 2021 02:00:36 +0300 Subject: [PATCH 152/473] feat(eslint-plugin): [member-ordering] add callback as an ordering type of node (#3354) * feat(eslint-plugin): add callback as a filtering type of node * fix(eslint-plugin): change callback type to call-signature --- .../src/rules/member-ordering.ts | 16 +- .../tests/rules/member-ordering.test.ts | 140 ++++++++++++++---- 2 files changed, 125 insertions(+), 31 deletions(-) diff --git a/packages/eslint-plugin/src/rules/member-ordering.ts b/packages/eslint-plugin/src/rules/member-ordering.ts index de5b971f5339..a6b1b74c20e8 100644 --- a/packages/eslint-plugin/src/rules/member-ordering.ts +++ b/packages/eslint-plugin/src/rules/member-ordering.ts @@ -55,6 +55,7 @@ const objectConfig = (memberTypes: string[]): JSONSchema.JSONSchema4 => ({ export const defaultOrder = [ // Index signature 'signature', + 'call-signature', // Fields 'public-static-field', @@ -122,9 +123,13 @@ export const defaultOrder = [ 'method', ]; -const allMemberTypes = ['signature', 'field', 'method', 'constructor'].reduce< - string[] ->((all, type) => { +const allMemberTypes = [ + 'signature', + 'field', + 'method', + 'call-signature', + 'constructor', +].reduce((all, type) => { all.push(type); ['public', 'protected', 'private'].forEach(accessibility => { @@ -170,13 +175,14 @@ const functionExpressions = [ * @param node the node to be evaluated. */ function getNodeType(node: Member): string | null { - // TODO: add missing TSCallSignatureDeclaration switch (node.type) { case AST_NODE_TYPES.TSAbstractMethodDefinition: case AST_NODE_TYPES.MethodDefinition: return node.kind; case AST_NODE_TYPES.TSMethodSignature: return 'method'; + case AST_NODE_TYPES.TSCallSignatureDeclaration: + return 'call-signature'; case AST_NODE_TYPES.TSConstructSignatureDeclaration: return 'constructor'; case AST_NODE_TYPES.TSAbstractClassProperty: @@ -216,6 +222,8 @@ function getMemberName( : util.getNameFromMember(node, sourceCode); case AST_NODE_TYPES.TSConstructSignatureDeclaration: return 'new'; + case AST_NODE_TYPES.TSCallSignatureDeclaration: + return 'call'; case AST_NODE_TYPES.TSIndexSignature: return util.getNameFromIndexSignature(node); default: diff --git a/packages/eslint-plugin/tests/rules/member-ordering.test.ts b/packages/eslint-plugin/tests/rules/member-ordering.test.ts index 5134d591ffa8..c17aa57b90e7 100644 --- a/packages/eslint-plugin/tests/rules/member-ordering.test.ts +++ b/packages/eslint-plugin/tests/rules/member-ordering.test.ts @@ -75,7 +75,16 @@ interface Foo { `, options: [{ default: ['signature', 'field', 'constructor', 'method'] }], }, - + { + code: ` +interface X { + (): void; + a: unknown; + b(): void; +} + `, + options: [{ default: ['call-signature', 'field', 'method'] }], + }, { code: ` // no accessibility === public @@ -1448,6 +1457,27 @@ interface Foo { }, { code: ` +interface X { + a: unknown; + (): void; + b(): void; +} + `, + options: [{ default: ['call-signature', 'field', 'method'] }], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'call', + rank: 'field', + }, + line: 4, + column: 3, + }, + ], + }, + { + code: ` // no accessibility === public interface Foo { A: string; @@ -3811,8 +3841,8 @@ const sortedWithoutGroupingDefaultOption: TSESLint.RunTests< { code: ` interface Foo { - a(): Foo; (): Foo; + a(): Foo; b(): Foo; } `, @@ -3850,8 +3880,8 @@ type Foo = { a : b; [a: string] : number; b() : void; - new () : Bar; () : Baz; + new () : Bar; } `, options: [{ default: { memberTypes: 'never', order: 'alphabetically' } }], @@ -3990,6 +4020,13 @@ interface Foo { beforeMember: 'b', }, }, + { + messageId: 'incorrectOrder', + data: { + member: 'call', + beforeMember: 'new', + }, + }, ], }, @@ -4041,6 +4078,13 @@ type Foo = { beforeMember: 'b', }, }, + { + messageId: 'incorrectOrder', + data: { + member: 'call', + beforeMember: 'new', + }, + }, ], }, @@ -4190,10 +4234,10 @@ const sortedWithoutGroupingClassesOption: TSESLint.RunTests< code: ` interface Foo { [a: string] : number; + () : Baz; c : b; new () : Bar; b() : void; - () : Baz; } `, options: [{ classes: { memberTypes: 'never', order: 'alphabetically' } }], @@ -4226,10 +4270,10 @@ interface Foo { code: ` type Foo = { [a: string] : number; + () : Baz; c : b; new () : Bar; b() : void; - () : Baz; } `, options: [{ classes: { memberTypes: 'never', order: 'alphabetically' } }], @@ -4400,10 +4444,10 @@ const sortedWithoutGroupingClassExpressionsOption: TSESLint.RunTests< code: ` interface Foo { [a: string] : number; + () : Baz; c : b; new () : Bar; b() : void; - () : Baz; } `, options: [ @@ -4442,10 +4486,10 @@ interface Foo { code: ` type Foo = { [a: string] : number; + () : Baz; c : b; new () : Bar; b() : void; - () : Baz; } `, options: [ @@ -4639,8 +4683,8 @@ interface Foo { [a: string] : number; a : b; b() : void; - new () : Bar; () : Baz; + new () : Bar; } `, options: [ @@ -4679,10 +4723,10 @@ interface Foo { code: ` type Foo = { [a: string] : number; + () : Baz; c : b; new () : Bar; b() : void; - () : Baz; } `, options: [ @@ -4827,6 +4871,13 @@ interface Foo { beforeMember: 'b', }, }, + { + messageId: 'incorrectOrder', + data: { + member: 'call', + beforeMember: 'new', + }, + }, ], }, @@ -4872,10 +4923,10 @@ const sortedWithoutGroupingTypeLiteralsOption: TSESLint.RunTests< code: ` interface Foo { [a: string] : number; + () : Baz; c : b; new () : Bar; b() : void; - () : Baz; } `, options: [ @@ -4916,8 +4967,8 @@ type Foo = { [a: string] : number; a : b; b() : void; - new () : Bar; () : Baz; + new () : Bar; } `, options: [ @@ -5062,6 +5113,13 @@ type Foo = { beforeMember: 'b', }, }, + { + messageId: 'incorrectOrder', + data: { + member: 'call', + beforeMember: 'new', + }, + }, ], }, @@ -5108,6 +5166,8 @@ const sortedWithGroupingDefaultOption: TSESLint.RunTests< interface Foo { [a: string] : number; + () : Baz; + a : x; b : x; c : x; @@ -5117,8 +5177,6 @@ interface Foo { a() : void; b() : void; c() : void; - - () : Baz; } `, options: [ @@ -5160,6 +5218,8 @@ interface Foo { type Foo = { [a: string] : number; + () : Baz; + a : x; b : x; c : x; @@ -5169,8 +5229,6 @@ type Foo = { a() : void; b() : void; c() : void; - - () : Baz; } `, options: [ @@ -5344,6 +5402,13 @@ interface Foo { { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, ], errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'call', + rank: 'field', + }, + }, { messageId: 'incorrectGroupOrder', data: { @@ -5377,6 +5442,13 @@ type Foo = { { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, ], errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'call', + rank: 'field', + }, + }, { messageId: 'incorrectGroupOrder', data: { @@ -5503,6 +5575,8 @@ const sortedWithGroupingClassesOption: TSESLint.RunTests< interface Foo { [a: string] : number; + () : Baz; + c : x; b : x; a : x; @@ -5512,8 +5586,6 @@ interface Foo { c() : void; b() : void; a() : void; - - () : Baz; } `, options: [{ classes: { order: 'alphabetically' } }], @@ -5525,6 +5597,8 @@ interface Foo { type Foo = { [a: string] : number; + () : Baz; + c : x; b : x; a : x; @@ -5534,8 +5608,6 @@ type Foo = { c() : void; b() : void; a() : void; - - () : Baz; } `, options: [{ classes: { order: 'alphabetically' } }], @@ -5645,6 +5717,8 @@ const sortedWithGroupingClassExpressionsOption: TSESLint.RunTests< interface Foo { [a: string] : number; + () : Baz; + c : x; b : x; a : x; @@ -5654,8 +5728,6 @@ interface Foo { c() : void; b() : void; a() : void; - - () : Baz; } `, options: [{ classExpressions: { order: 'alphabetically' } }], @@ -5667,6 +5739,8 @@ interface Foo { type Foo = { [a: string] : number; + () : Baz; + c : x; b : x; a : x; @@ -5676,8 +5750,6 @@ type Foo = { c() : void; b() : void; a() : void; - - () : Baz; } `, options: [{ classExpressions: { order: 'alphabetically' } }], @@ -5849,6 +5921,8 @@ interface Foo { type Foo = { [a: string] : number; + () : Baz; + c : x; b : x; a : x; @@ -5858,8 +5932,6 @@ type Foo = { c() : void; b() : void; a() : void; - - () : Baz; } `, options: [{ interfaces: { order: 'alphabetically' } }], @@ -5925,6 +5997,13 @@ interface Foo { { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, ], errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'call', + rank: 'field', + }, + }, { messageId: 'incorrectGroupOrder', data: { @@ -5948,6 +6027,8 @@ const sortedWithGroupingTypeLiteralsOption: TSESLint.RunTests< interface Foo { [a: string] : number; + () : Baz; + c : x; b : x; a : x; @@ -5957,8 +6038,6 @@ interface Foo { c() : void; b() : void; a() : void; - - () : Baz; } `, options: [{ typeLiterals: { order: 'alphabetically' } }], @@ -6081,6 +6160,13 @@ type Foo = { { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, ], errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'call', + rank: 'field', + }, + }, { messageId: 'incorrectGroupOrder', data: { From cd0de65ab61574db96828d98ce2a1ac12ca56368 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sat, 29 May 2021 08:04:12 +0900 Subject: [PATCH 153/473] chore: update to typescript 4.3 (#3459) --- package.json | 4 ++-- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index a0f872fd64d3..80b0163aeb21 100644 --- a/package.json +++ b/package.json @@ -113,9 +113,9 @@ "ts-jest": "^26.5.1", "ts-node": "^10.0.0", "tslint": "^6.1.3", - "typescript": ">=3.3.1 <4.4.0 || 4.3.1-rc" + "typescript": ">=3.3.1 <4.4.0" }, "resolutions": { - "typescript": "4.3.1-rc" + "typescript": "4.3.2" } } diff --git a/yarn.lock b/yarn.lock index c9fc0ec3e137..96c7f557417f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8886,10 +8886,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.3.1-rc, "typescript@>=3.3.1 <4.4.0 || 4.3.1-rc", typescript@^4.1.0-dev.20201026, typescript@~4.2.4: - version "4.3.1-rc" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.1-rc.tgz#925149c8d8514e20a6bd8d4bd7f42adac67ab59c" - integrity sha512-L3uJ0gcntaRaKni9aV2amYB+pCDVodKe/B5+IREyvtKGsDOF7cYjchHb/B894skqkgD52ykRuWatIZMqEsHIqA== +typescript@*, typescript@4.3.2, "typescript@>=3.3.1 <4.4.0", typescript@^4.1.0-dev.20201026, typescript@~4.2.4: + version "4.3.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" + integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" From 3d2932390cc335ab2cf80ae7a7fad066fd2eb22b Mon Sep 17 00:00:00 2001 From: doumart Date: Fri, 28 May 2021 19:13:23 -0400 Subject: [PATCH 154/473] feat(eslint-plugin): [space-infix-ops] Add support for Union and intersection of type declarations (#3360) * feat(space-infix-ops): Add support for Union and intersection of type declarations * Simplify rules and refactor for more readability --- .../src/rules/space-infix-ops.ts | 104 ++-- .../tests/rules/space-infix-ops.test.ts | 541 ++++++++++++++++++ 2 files changed, 613 insertions(+), 32 deletions(-) diff --git a/packages/eslint-plugin/src/rules/space-infix-ops.ts b/packages/eslint-plugin/src/rules/space-infix-ops.ts index e81d8ef25bb7..3a0a79ff1a32 100644 --- a/packages/eslint-plugin/src/rules/space-infix-ops.ts +++ b/packages/eslint-plugin/src/rules/space-infix-ops.ts @@ -8,6 +8,8 @@ import * as util from '../util'; export type Options = util.InferOptionsTypeFromRule; export type MessageIds = util.InferMessageIdsTypeFromRule; +const UNIONS = ['|', '&']; + export default util.createRule({ name: 'space-infix-ops', meta: { @@ -34,6 +36,41 @@ export default util.createRule({ const rules = baseRule.create(context); const sourceCode = context.getSourceCode(); + const report = ( + node: TSESTree.Node | TSESTree.Token, + operator: TSESTree.Token, + ): void => { + context.report({ + node: node, + loc: operator.loc, + messageId: 'missingSpace', + data: { + operator: operator.value, + }, + fix(fixer) { + const previousToken = sourceCode.getTokenBefore(operator); + const afterToken = sourceCode.getTokenAfter(operator); + let fixString = ''; + + if (operator.range[0] - previousToken!.range[1] === 0) { + fixString = ' '; + } + + fixString += operator.value; + + if (afterToken!.range[0] - operator.range[1] === 0) { + fixString += ' '; + } + + return fixer.replaceText(operator, fixString); + }, + }); + }; + + function isSpaceChar(token: TSESTree.Token): boolean { + return token.type === AST_TOKEN_TYPES.Punctuator && token.value === '='; + } + function checkAndReportAssignmentSpace( node: TSESTree.Node, leftNode: TSESTree.Token, @@ -46,42 +83,17 @@ export default util.createRule({ const operator = sourceCode.getFirstTokenBetween( leftNode, rightNode, - token => - token.type === AST_TOKEN_TYPES.Punctuator && token.value === '=', + isSpaceChar, ); + const prev = sourceCode.getTokenBefore(operator!); const next = sourceCode.getTokenAfter(operator!); if ( - operator && - (!sourceCode.isSpaceBetweenTokens(prev!, operator) || - !sourceCode.isSpaceBetweenTokens(operator, next!)) + !sourceCode.isSpaceBetween!(prev!, operator!) || + !sourceCode.isSpaceBetween!(operator!, next!) ) { - context.report({ - node: node, - loc: operator.loc, - messageId: 'missingSpace', - data: { - operator: operator.value, - }, - fix(fixer) { - const previousToken = sourceCode.getTokenBefore(operator); - const afterToken = sourceCode.getTokenAfter(operator); - let fixString = ''; - - if (operator.range[0] - previousToken!.range[1] === 0) { - fixString = ' '; - } - - fixString += operator.value; - - if (afterToken!.range[0] - operator.range[1] === 0) { - fixString += ' '; - } - - return fixer.replaceText(operator, fixString); - }, - }); + report(node, operator!); } } @@ -119,11 +131,37 @@ export default util.createRule({ checkAndReportAssignmentSpace(node, leftNode, rightNode); } + /** + * Check if it is missing spaces between type annotations chaining + * @param typeAnnotation TypeAnnotations list + */ + function checkForTypeAnnotationSpace( + typeAnnotation: TSESTree.TSIntersectionType | TSESTree.TSUnionType, + ): void { + const types = typeAnnotation.types; + + types.forEach(type => { + const operator = sourceCode.getTokenBefore(type); + + if (operator != null && UNIONS.includes(operator.value)) { + const prev = sourceCode.getTokenBefore(operator); + const next = sourceCode.getTokenAfter(operator); + + if ( + !sourceCode.isSpaceBetween!(prev!, operator) || + !sourceCode.isSpaceBetween!(operator, next!) + ) { + report(typeAnnotation, operator); + } + } + }); + } + /** * Check if it has an assignment char and report if it's faulty * @param node The node to report */ - function checkForTypeAliasAssignmentSpace( + function checkForTypeAliasAssignment( node: TSESTree.TSTypeAliasDeclaration, ): void { const leftNode = sourceCode.getTokenByRangeStart(node.id.range[0])!; @@ -138,7 +176,9 @@ export default util.createRule({ ...rules, TSEnumMember: checkForEnumAssignmentSpace, ClassProperty: checkForClassPropertyAssignmentSpace, - TSTypeAliasDeclaration: checkForTypeAliasAssignmentSpace, + TSTypeAliasDeclaration: checkForTypeAliasAssignment, + TSUnionType: checkForTypeAnnotationSpace, + TSIntersectionType: checkForTypeAnnotationSpace, }; }, }); diff --git a/packages/eslint-plugin/tests/rules/space-infix-ops.test.ts b/packages/eslint-plugin/tests/rules/space-infix-ops.test.ts index 6beb4ae06fac..5ad92555d88e 100644 --- a/packages/eslint-plugin/tests/rules/space-infix-ops.test.ts +++ b/packages/eslint-plugin/tests/rules/space-infix-ops.test.ts @@ -54,11 +54,110 @@ ruleTester.run('space-infix-ops', rule, { } `, }, + { + code: ` + type Test = string; + `, + }, { code: ` type Test = string | boolean; `, }, + { + code: ` + type Test = string & boolean; + `, + }, + { + code: ` + class Test { + private value:number | string = 1; + } + `, + }, + { + code: ` + class Test { + private value:number & string = 1; + } + `, + }, + { + code: ` + type Test = + | string + | boolean; + `, + }, + { + code: ` + type Test = + & string + & boolean; + `, + }, + { + code: ` + interface Test { + prop: + & string + & boolean; + } + `, + }, + { + code: ` + interface Test { + prop: + | string + | boolean; + } + `, + }, + { + code: ` + interface Test { + props: string; + } + `, + }, + { + code: ` + interface Test { + props: string | boolean; + } + `, + }, + { + code: ` + interface Test { + props: string & boolean; + } + `, + }, + { + code: ` + const x: string & number; + `, + }, + { + code: ` + class Test { + value: string & number; + } + `, + }, + { + code: ` + function foo() {} + `, + }, + { + code: ` + function bar(): string & number {} + `, + }, ], invalid: [ { @@ -192,5 +291,447 @@ ruleTester.run('space-infix-ops', rule, { }, ], }, + { + code: ` + type Test = string| number; + `, + output: ` + type Test = string | number; + `, + errors: [ + { + messageId: 'missingSpace', + column: 27, + line: 2, + }, + ], + }, + { + code: ` + type Test = string |number; + `, + output: ` + type Test = string | number; + `, + errors: [ + { + messageId: 'missingSpace', + column: 28, + line: 2, + }, + ], + }, + { + code: ` + type Test = string &number; + `, + output: ` + type Test = string & number; + `, + errors: [ + { + messageId: 'missingSpace', + column: 28, + line: 2, + }, + ], + }, + { + code: ` + type Test = string& number; + `, + output: ` + type Test = string & number; + `, + errors: [ + { + messageId: 'missingSpace', + column: 27, + line: 2, + }, + ], + }, + { + code: ` + type Test = + |string + | number; + `, + output: ` + type Test = + | string + | number; + `, + errors: [ + { + messageId: 'missingSpace', + column: 9, + line: 3, + }, + ], + }, + { + code: ` + type Test = + &string + & number; + `, + output: ` + type Test = + & string + & number; + `, + errors: [ + { + messageId: 'missingSpace', + column: 9, + line: 3, + }, + ], + }, + { + code: ` + interface Test { + prop: string| number; + } + `, + output: ` + interface Test { + prop: string | number; + } + `, + errors: [ + { + messageId: 'missingSpace', + column: 23, + line: 3, + }, + ], + }, + { + code: ` + interface Test { + prop: string |number; + } + `, + output: ` + interface Test { + prop: string | number; + } + `, + errors: [ + { + messageId: 'missingSpace', + column: 24, + line: 3, + }, + ], + }, + { + code: ` + interface Test { + prop: string &number; + } + `, + output: ` + interface Test { + prop: string & number; + } + `, + errors: [ + { + messageId: 'missingSpace', + column: 24, + line: 3, + }, + ], + }, + { + code: ` + interface Test { + prop: string& number; + } + `, + output: ` + interface Test { + prop: string & number; + } + `, + errors: [ + { + messageId: 'missingSpace', + column: 23, + line: 3, + }, + ], + }, + { + code: ` + interface Test { + prop: + |string + | number; + } + `, + output: ` + interface Test { + prop: + | string + | number; + } + `, + errors: [ + { + messageId: 'missingSpace', + column: 13, + line: 4, + }, + ], + }, + { + code: ` + interface Test { + prop: + &string + & number; + } + `, + output: ` + interface Test { + prop: + & string + & number; + } + `, + errors: [ + { + messageId: 'missingSpace', + column: 13, + line: 4, + }, + ], + }, + { + code: ` + const x: string &number; + `, + output: ` + const x: string & number; + `, + errors: [ + { + messageId: 'missingSpace', + column: 25, + line: 2, + }, + ], + }, + { + code: ` + const x: string& number; + `, + output: ` + const x: string & number; + `, + errors: [ + { + messageId: 'missingSpace', + column: 24, + line: 2, + }, + ], + }, + { + code: ` + const x: string| number; + `, + output: ` + const x: string | number; + `, + errors: [ + { + messageId: 'missingSpace', + column: 24, + line: 2, + }, + ], + }, + { + code: ` + class Test { + value: string |number; + } + `, + output: ` + class Test { + value: string | number; + } + `, + errors: [ + { + messageId: 'missingSpace', + column: 25, + line: 3, + }, + ], + }, + { + code: ` + class Test { + value: string& number; + } + `, + output: ` + class Test { + value: string & number; + } + `, + errors: [ + { + messageId: 'missingSpace', + column: 24, + line: 3, + }, + ], + }, + { + code: ` + class Test { + value: string| number; + } + `, + output: ` + class Test { + value: string | number; + } + `, + errors: [ + { + messageId: 'missingSpace', + column: 24, + line: 3, + }, + ], + }, + { + code: ` + function foo() {} + `, + output: ` + function foo() {} + `, + errors: [ + { + messageId: 'missingSpace', + column: 39, + line: 2, + }, + ], + }, + { + code: ` + function foo() {} + `, + output: ` + function foo() {} + `, + errors: [ + { + messageId: 'missingSpace', + column: 38, + line: 2, + }, + ], + }, + { + code: ` + function foo() {} + `, + output: ` + function foo() {} + `, + errors: [ + { + messageId: 'missingSpace', + column: 39, + line: 2, + }, + ], + }, + { + code: ` + function foo() {} + `, + output: ` + function foo() {} + `, + errors: [ + { + messageId: 'missingSpace', + column: 38, + line: 2, + }, + ], + }, + { + code: ` + function bar(): string &number {} + `, + output: ` + function bar(): string & number {} + `, + errors: [ + { + messageId: 'missingSpace', + column: 32, + line: 2, + }, + ], + }, + { + code: ` + function bar(): string& number {} + `, + output: ` + function bar(): string & number {} + `, + errors: [ + { + messageId: 'missingSpace', + column: 31, + line: 2, + }, + ], + }, + { + code: ` + function bar(): string |number {} + `, + output: ` + function bar(): string | number {} + `, + errors: [ + { + messageId: 'missingSpace', + column: 32, + line: 2, + }, + ], + }, + { + code: ` + function bar(): string| number {} + `, + output: ` + function bar(): string | number {} + `, + errors: [ + { + messageId: 'missingSpace', + column: 31, + line: 2, + }, + ], + }, ], }); From 25c45e277501a67a0e18a99b62154365f65aeba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sat, 29 May 2021 01:15:15 +0200 Subject: [PATCH 155/473] chore(experimental-utils): remove useless union types in `ast-utils` (#3419) --- .../src/ast-utils/eslint-utils/predicates.ts | 50 +++++++++---------- .../experimental-utils/src/ast-utils/misc.ts | 4 +- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts index cbf8377127c6..55d20a3e40b0 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts @@ -2,82 +2,80 @@ import * as eslintUtils from 'eslint-utils'; import { TSESTree } from '../../ts-estree'; const isArrowToken = eslintUtils.isArrowToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: '=>' }; const isNotArrowToken = eslintUtils.isNotArrowToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => boolean; const isClosingBraceToken = eslintUtils.isClosingBraceToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: '}' }; const isNotClosingBraceToken = eslintUtils.isNotClosingBraceToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => boolean; const isClosingBracketToken = eslintUtils.isClosingBracketToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: ']' }; const isNotClosingBracketToken = eslintUtils.isNotClosingBracketToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => boolean; const isClosingParenToken = eslintUtils.isClosingParenToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: ')' }; const isNotClosingParenToken = eslintUtils.isNotClosingParenToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => boolean; const isColonToken = eslintUtils.isColonToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: ':' }; const isNotColonToken = eslintUtils.isNotColonToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => boolean; const isCommaToken = eslintUtils.isCommaToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: ',' }; const isNotCommaToken = eslintUtils.isNotCommaToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => boolean; const isCommentToken = eslintUtils.isCommentToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => token is TSESTree.Comment; -const isNotCommentToken = eslintUtils.isNotCommentToken as < - T extends TSESTree.Token | TSESTree.Comment ->( - token: T, -) => token is Exclude; +const isNotCommentToken = eslintUtils.isNotCommentToken as ( + token: TSESTree.Token, +) => token is Exclude; const isOpeningBraceToken = eslintUtils.isOpeningBraceToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: '{' }; const isNotOpeningBraceToken = eslintUtils.isNotOpeningBraceToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => boolean; const isOpeningBracketToken = eslintUtils.isOpeningBracketToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: '[' }; const isNotOpeningBracketToken = eslintUtils.isNotOpeningBracketToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => boolean; const isOpeningParenToken = eslintUtils.isOpeningParenToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: '(' }; const isNotOpeningParenToken = eslintUtils.isNotOpeningParenToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => boolean; const isSemicolonToken = eslintUtils.isSemicolonToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: ';' }; const isNotSemicolonToken = eslintUtils.isNotSemicolonToken as ( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ) => boolean; export { diff --git a/packages/experimental-utils/src/ast-utils/misc.ts b/packages/experimental-utils/src/ast-utils/misc.ts index cf20f99a4cc4..923424d9f928 100644 --- a/packages/experimental-utils/src/ast-utils/misc.ts +++ b/packages/experimental-utils/src/ast-utils/misc.ts @@ -6,8 +6,8 @@ const LINEBREAK_MATCHER = /\r\n|[\r\n\u2028\u2029]/; * Determines whether two adjacent tokens are on the same line */ function isTokenOnSameLine( - left: TSESTree.Token | TSESTree.Comment, - right: TSESTree.Token | TSESTree.Comment, + left: TSESTree.Token, + right: TSESTree.Token, ): boolean { return left.loc.end.line === right.loc.start.line; } From a6eacf0a45d0b17ddf2478fe5c0f0d55b48a045c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sat, 29 May 2021 01:16:10 +0200 Subject: [PATCH 156/473] chore(experimental-utils): remove useless union types in `ts-eslint` (#3420) --- .../experimental-utils/src/ts-eslint/Rule.ts | 2 +- .../src/ts-eslint/SourceCode.ts | 44 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index 19f457201ef1..702351af385c 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -148,7 +148,7 @@ interface ReportDescriptorNodeOptionalLoc { /** * The Node or AST Token which the report is being attached to */ - readonly node: TSESTree.Node | TSESTree.Comment | TSESTree.Token; + readonly node: TSESTree.Node | TSESTree.Token; /** * An override of the location of the report */ diff --git a/packages/experimental-utils/src/ts-eslint/SourceCode.ts b/packages/experimental-utils/src/ts-eslint/SourceCode.ts index 888892d825fa..5f392acbf2a1 100644 --- a/packages/experimental-utils/src/ts-eslint/SourceCode.ts +++ b/packages/experimental-utils/src/ts-eslint/SourceCode.ts @@ -55,8 +55,8 @@ declare class TokenStore { * @returns An object representing the token. */ getFirstTokenBetween( - left: TSESTree.Node | TSESTree.Token | TSESTree.Comment, - right: TSESTree.Node | TSESTree.Token | TSESTree.Comment, + left: TSESTree.Node | TSESTree.Token, + right: TSESTree.Node | TSESTree.Token, options?: T, ): SourceCode.ReturnTypeFromOptions | null; /** @@ -77,8 +77,8 @@ declare class TokenStore { * @returns Tokens between left and right. */ getFirstTokensBetween( - left: TSESTree.Node | TSESTree.Token | TSESTree.Comment, - right: TSESTree.Node | TSESTree.Token | TSESTree.Comment, + left: TSESTree.Node | TSESTree.Token, + right: TSESTree.Node | TSESTree.Token, options?: T, ): SourceCode.ReturnTypeFromOptions[]; /** @@ -99,8 +99,8 @@ declare class TokenStore { * @returns An object representing the token. */ getLastTokenBetween( - left: TSESTree.Node | TSESTree.Token | TSESTree.Comment, - right: TSESTree.Node | TSESTree.Token | TSESTree.Comment, + left: TSESTree.Node | TSESTree.Token, + right: TSESTree.Node | TSESTree.Token, options?: T, ): SourceCode.ReturnTypeFromOptions | null; /** @@ -121,8 +121,8 @@ declare class TokenStore { * @returns Tokens between left and right. */ getLastTokensBetween( - left: TSESTree.Node | TSESTree.Token | TSESTree.Comment, - right: TSESTree.Node | TSESTree.Token | TSESTree.Comment, + left: TSESTree.Node | TSESTree.Token, + right: TSESTree.Node | TSESTree.Token, options?: T, ): SourceCode.ReturnTypeFromOptions[]; /** @@ -132,7 +132,7 @@ declare class TokenStore { * @returns An object representing the token. */ getTokenAfter( - node: TSESTree.Node | TSESTree.Token | TSESTree.Comment, + node: TSESTree.Node | TSESTree.Token, options?: T, ): SourceCode.ReturnTypeFromOptions | null; /** @@ -142,7 +142,7 @@ declare class TokenStore { * @returns An object representing the token. */ getTokenBefore( - node: TSESTree.Node | TSESTree.Token | TSESTree.Comment, + node: TSESTree.Node | TSESTree.Token, options?: T, ): SourceCode.ReturnTypeFromOptions | null; /** @@ -184,7 +184,7 @@ declare class TokenStore { * @returns Tokens. */ getTokensAfter( - node: TSESTree.Node | TSESTree.Token | TSESTree.Comment, + node: TSESTree.Node | TSESTree.Token, options?: T, ): SourceCode.ReturnTypeFromOptions[]; /** @@ -194,7 +194,7 @@ declare class TokenStore { * @returns Tokens. */ getTokensBefore( - node: TSESTree.Node | TSESTree.Token | TSESTree.Comment, + node: TSESTree.Node | TSESTree.Token, options?: T, ): SourceCode.ReturnTypeFromOptions[]; /** @@ -205,8 +205,8 @@ declare class TokenStore { * @returns Tokens between left and right. */ getTokensBetween( - left: TSESTree.Node | TSESTree.Token | TSESTree.Comment, - right: TSESTree.Node | TSESTree.Token | TSESTree.Comment, + left: TSESTree.Node | TSESTree.Token, + right: TSESTree.Node | TSESTree.Token, padding?: T, ): SourceCode.ReturnTypeFromOptions[]; /** @@ -217,8 +217,8 @@ declare class TokenStore { * @returns Tokens between left and right. */ getTokensBetween( - left: TSESTree.Node | TSESTree.Token | TSESTree.Comment, - right: TSESTree.Node | TSESTree.Token | TSESTree.Comment, + left: TSESTree.Node | TSESTree.Token, + right: TSESTree.Node | TSESTree.Token, padding?: number, ): SourceCode.ReturnTypeFromOptions[]; } @@ -303,8 +303,8 @@ declare class SourceCodeBase extends TokenStore { * @returns True if there is a whitespace character between any of the tokens found between the two given nodes or tokens. */ isSpaceBetween?( - first: TSESTree.Token | TSESTree.Comment | TSESTree.Node, - second: TSESTree.Token | TSESTree.Comment | TSESTree.Node, + first: TSESTree.Token | TSESTree.Node, + second: TSESTree.Token | TSESTree.Node, ): boolean; /** * Determines if two nodes or tokens have at least one whitespace character @@ -342,8 +342,10 @@ declare class SourceCodeBase extends TokenStore { text: string; /** * All of the tokens and comments in the AST. + * + * TODO: rename to 'tokens' */ - tokensAndComments: (TSESTree.Comment | TSESTree.Token)[]; + tokensAndComments: TSESTree.Token[]; /** * The visitor keys to traverse AST. */ @@ -394,9 +396,7 @@ namespace SourceCode { [nodeType: string]: string[]; } - export type FilterPredicate = ( - tokenOrComment: TSESTree.Token | TSESTree.Comment, - ) => boolean; + export type FilterPredicate = (token: TSESTree.Token) => boolean; export type ReturnTypeFromOptions = T extends { includeComments: true } ? TSESTree.Token From 936b3c3b14b3108c9b09a96a1f894a6ca4f505d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sat, 29 May 2021 01:18:09 +0200 Subject: [PATCH 157/473] chore(ast-spec): remove useless union type from `LeftHandSideExpression` (#3423) --- packages/ast-spec/src/unions/LeftHandSideExpression.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/ast-spec/src/unions/LeftHandSideExpression.ts b/packages/ast-spec/src/unions/LeftHandSideExpression.ts index a8a24bb08d2d..5d6922ed42d4 100644 --- a/packages/ast-spec/src/unions/LeftHandSideExpression.ts +++ b/packages/ast-spec/src/unions/LeftHandSideExpression.ts @@ -11,7 +11,6 @@ import type { MetaProperty } from '../expression/MetaProperty/spec'; import type { ObjectExpression } from '../expression/ObjectExpression/spec'; import type { Super } from '../expression/Super/spec'; import type { TaggedTemplateExpression } from '../expression/TaggedTemplateExpression/spec'; -import type { TemplateLiteral } from '../expression/TemplateLiteral/spec'; import type { ThisExpression } from '../expression/ThisExpression/spec'; import type { TSAsExpression } from '../expression/TSAsExpression/spec'; import type { TSNonNullExpression } from '../expression/TSNonNullExpression/spec'; @@ -37,7 +36,6 @@ export type LeftHandSideExpression = | ObjectPattern | Super | TaggedTemplateExpression - | TemplateLiteral | ThisExpression | TSAsExpression | TSNonNullExpression From e20dd39d3f446bba17f056bb4eb0c5abd003b176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sat, 29 May 2021 01:18:34 +0200 Subject: [PATCH 158/473] chore(ast-spec): remove useless union type from `AwaitExpression`'s `argument` (#3424) --- packages/ast-spec/src/expression/AwaitExpression/spec.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/ast-spec/src/expression/AwaitExpression/spec.ts b/packages/ast-spec/src/expression/AwaitExpression/spec.ts index 248e371e871b..0017ff6b868f 100644 --- a/packages/ast-spec/src/expression/AwaitExpression/spec.ts +++ b/packages/ast-spec/src/expression/AwaitExpression/spec.ts @@ -1,7 +1,6 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; import type { LeftHandSideExpression } from '../../unions/LeftHandSideExpression'; -import type { TSTypeAssertion } from '../TSTypeAssertion/spec'; import type { UnaryExpression } from '../UnaryExpression/spec'; import type { UpdateExpression } from '../UpdateExpression/spec'; @@ -10,7 +9,6 @@ export interface AwaitExpression extends BaseNode { argument: | AwaitExpression | LeftHandSideExpression - | TSTypeAssertion | UnaryExpression | UpdateExpression; } From f4c437887fa8f6976b524e1fa8f6f04a29fa5f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sat, 29 May 2021 01:18:56 +0200 Subject: [PATCH 159/473] chore(ast-spec): remove useless union type from `TSUnaryExpression` (#3425) --- packages/ast-spec/src/unions/TSUnaryExpression.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/ast-spec/src/unions/TSUnaryExpression.ts b/packages/ast-spec/src/unions/TSUnaryExpression.ts index b4dd05627bf6..14bde5deec14 100644 --- a/packages/ast-spec/src/unions/TSUnaryExpression.ts +++ b/packages/ast-spec/src/unions/TSUnaryExpression.ts @@ -1,5 +1,4 @@ import type { AwaitExpression } from '../expression/AwaitExpression/spec'; -import type { TSTypeAssertion } from '../expression/TSTypeAssertion/spec'; import type { UnaryExpression } from '../expression/UnaryExpression/spec'; import type { UpdateExpression } from '../expression/UpdateExpression/spec'; import type { LeftHandSideExpression } from './LeftHandSideExpression'; @@ -8,6 +7,5 @@ import type { LeftHandSideExpression } from './LeftHandSideExpression'; export type TSUnaryExpression = | AwaitExpression | LeftHandSideExpression - | TSTypeAssertion | UnaryExpression | UpdateExpression; From 59821b040c086cd3104daf3ff974f641b263d05c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sat, 29 May 2021 01:19:54 +0200 Subject: [PATCH 160/473] chore: prettify codebase (#3422) --- tests/integration/fixtures/vue-jsx/Jsx.vue | 28 ++++---- .../integration/fixtures/vue-jsx/test.js.snap | 36 +++++----- tests/integration/fixtures/vue-sfc/Hello.vue | 51 +++++++------- tests/integration/fixtures/vue-sfc/World.vue | 42 ++++++------ .../integration/fixtures/vue-sfc/test.js.snap | 67 ++++++++++--------- tests/performance/docker-compose.yml | 2 +- 6 files changed, 119 insertions(+), 107 deletions(-) diff --git a/tests/integration/fixtures/vue-jsx/Jsx.vue b/tests/integration/fixtures/vue-jsx/Jsx.vue index c08599249c39..a0dd889a6d8a 100644 --- a/tests/integration/fixtures/vue-jsx/Jsx.vue +++ b/tests/integration/fixtures/vue-jsx/Jsx.vue @@ -1,36 +1,38 @@ diff --git a/tests/integration/fixtures/vue-jsx/test.js.snap b/tests/integration/fixtures/vue-jsx/test.js.snap index 23764ebfea91..3f0b716085b2 100644 --- a/tests/integration/fixtures/vue-jsx/test.js.snap +++ b/tests/integration/fixtures/vue-jsx/test.js.snap @@ -23,8 +23,8 @@ Array [ "desc": "Use \`unknown\` instead, this will force you to explicitly, and safely assert the type is correct.", "fix": Object { "range": Array [ - 390, - 393, + 394, + 397, ], "text": "unknown", }, @@ -34,8 +34,8 @@ Array [ "desc": "Use \`never\` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.", "fix": Object { "range": Array [ - 390, - 393, + 394, + 397, ], "text": "never", }, @@ -45,38 +45,40 @@ Array [ }, ], "source": " diff --git a/tests/integration/fixtures/vue-sfc/Hello.vue b/tests/integration/fixtures/vue-sfc/Hello.vue index 1f5c59ed2dc0..1ee0282919b5 100644 --- a/tests/integration/fixtures/vue-sfc/Hello.vue +++ b/tests/integration/fixtures/vue-sfc/Hello.vue @@ -1,36 +1,39 @@ diff --git a/tests/integration/fixtures/vue-sfc/World.vue b/tests/integration/fixtures/vue-sfc/World.vue index ade2b409a3b6..12e63ca82ff7 100644 --- a/tests/integration/fixtures/vue-sfc/World.vue +++ b/tests/integration/fixtures/vue-sfc/World.vue @@ -1,30 +1,32 @@ diff --git a/tests/integration/fixtures/vue-sfc/test.js.snap b/tests/integration/fixtures/vue-sfc/test.js.snap index 8f7fc2c48e69..ac5804574daf 100644 --- a/tests/integration/fixtures/vue-sfc/test.js.snap +++ b/tests/integration/fixtures/vue-sfc/test.js.snap @@ -9,10 +9,10 @@ Array [ "fixableWarningCount": 0, "messages": Array [ Object { - "column": 29, - "endColumn": 32, - "endLine": 31, - "line": 31, + "column": 25, + "endColumn": 28, + "endLine": 33, + "line": 33, "message": "Unexpected any. Specify a different type.", "messageId": "unexpectedAny", "nodeType": "TSAnyKeyword", @@ -23,8 +23,8 @@ Array [ "desc": "Use \`unknown\` instead, this will force you to explicitly, and safely assert the type is correct.", "fix": Object { "range": Array [ - 708, - 711, + 648, + 651, ], "text": "unknown", }, @@ -34,8 +34,8 @@ Array [ "desc": "Use \`never\` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.", "fix": Object { "range": Array [ - 708, - 711, + 648, + 651, ], "text": "never", }, @@ -46,38 +46,41 @@ Array [ ], "source": " ", diff --git a/tests/performance/docker-compose.yml b/tests/performance/docker-compose.yml index e47eb9581b7b..bf737b239a35 100644 --- a/tests/performance/docker-compose.yml +++ b/tests/performance/docker-compose.yml @@ -3,7 +3,7 @@ version: '3' services: lint-real-repo: build: ./fixtures/lint-real-repo - container_name: "lint-real-repo" + container_name: 'lint-real-repo' volumes: # Runtime link to the relevant built @typescript-eslint packages and test utils, # but apply an empty volume for the package tests, we don't need those. From ed4776afa1374279027b9b7d82aa4b453b334998 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Fri, 28 May 2021 16:20:35 -0700 Subject: [PATCH 161/473] fix: generate library types for TypeScript v4.3 (#3460) Fixes #3449 --- .../scope-manager/src/lib/dom.iterable.ts | 6 - packages/scope-manager/src/lib/dom.ts | 222 +++--------------- packages/scope-manager/src/lib/es2021.full.ts | 18 ++ .../scope-manager/src/lib/es2021.promise.ts | 26 ++ .../scope-manager/src/lib/es2021.string.ts | 14 ++ packages/scope-manager/src/lib/es2021.ts | 16 ++ .../scope-manager/src/lib/es2021.weakref.ts | 32 +++ packages/scope-manager/src/lib/esnext.ts | 10 +- packages/scope-manager/src/lib/index.ts | 10 + packages/scope-manager/src/lib/webworker.ts | 18 -- packages/types/src/lib.ts | 5 + packages/typescript-estree/src/node-utils.ts | 2 +- 12 files changed, 163 insertions(+), 216 deletions(-) create mode 100644 packages/scope-manager/src/lib/es2021.full.ts create mode 100644 packages/scope-manager/src/lib/es2021.promise.ts create mode 100644 packages/scope-manager/src/lib/es2021.string.ts create mode 100644 packages/scope-manager/src/lib/es2021.ts create mode 100644 packages/scope-manager/src/lib/es2021.weakref.ts diff --git a/packages/scope-manager/src/lib/dom.iterable.ts b/packages/scope-manager/src/lib/dom.iterable.ts index 582f11704e2b..ada654336257 100644 --- a/packages/scope-manager/src/lib/dom.iterable.ts +++ b/packages/scope-manager/src/lib/dom.iterable.ts @@ -293,12 +293,6 @@ export const dom_iterable = { isValueVariable: false, name: 'WEBGL_draw_buffers', }, - WebAuthentication: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebAuthentication', - }, WebGL2RenderingContextBase: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, diff --git a/packages/scope-manager/src/lib/dom.ts b/packages/scope-manager/src/lib/dom.ts index 9fc4c5106841..fb6977b71175 100644 --- a/packages/scope-manager/src/lib/dom.ts +++ b/packages/scope-manager/src/lib/dom.ts @@ -5,17 +5,17 @@ import { ImplicitLibVariableOptions } from '../variable'; export const dom = { - Account: { + AddEventListenerOptions: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, isValueVariable: false, - name: 'Account', + name: 'AddEventListenerOptions', }, - AddEventListenerOptions: { + AddressErrors: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, isValueVariable: false, - name: 'AddEventListenerOptions', + name: 'AddressErrors', }, AesCbcParams: { eslintImplicitGlobalSetting: 'readonly', @@ -77,12 +77,6 @@ export const dom = { isValueVariable: false, name: 'AnimationPlaybackEventInit', }, - AssertionOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AssertionOptions', - }, AssignedNodesOptions: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -203,12 +197,6 @@ export const dom = { isValueVariable: false, name: 'ChannelSplitterOptions', }, - ClientData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ClientData', - }, ClientQueryOptions: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -353,12 +341,6 @@ export const dom = { isValueVariable: false, name: 'DelayOptions', }, - DeviceLightEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DeviceLightEventInit', - }, DeviceMotionEventAccelerationInit: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -875,6 +857,12 @@ export const dom = { isValueVariable: false, name: 'PannerOptions', }, + PayerErrors: { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, + name: 'PayerErrors', + }, PaymentCurrencyAmount: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -911,6 +899,12 @@ export const dom = { isValueVariable: false, name: 'PaymentItem', }, + PaymentMethodChangeEventInit: { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, + name: 'PaymentMethodChangeEventInit', + }, PaymentMethodData: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -935,6 +929,12 @@ export const dom = { isValueVariable: false, name: 'PaymentShippingOption', }, + PaymentValidationErrors: { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, + name: 'PaymentValidationErrors', + }, Pbkdf2Params: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -1205,17 +1205,17 @@ export const dom = { isValueVariable: false, name: 'RTCInboundRTPStreamStats', }, - RTCMediaStreamTrackStats: { + RTCLocalSessionDescriptionInit: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, isValueVariable: false, - name: 'RTCMediaStreamTrackStats', + name: 'RTCLocalSessionDescriptionInit', }, - RTCOAuthCredential: { + RTCMediaStreamTrackStats: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, isValueVariable: false, - name: 'RTCOAuthCredential', + name: 'RTCMediaStreamTrackStats', }, RTCOfferAnswerOptions: { eslintImplicitGlobalSetting: 'readonly', @@ -1295,12 +1295,6 @@ export const dom = { isValueVariable: false, name: 'RTCRtpContributingSource', }, - RTCRtpDecodingParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpDecodingParameters', - }, RTCRtpEncodingParameters: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -1403,12 +1397,6 @@ export const dom = { isValueVariable: false, name: 'RTCStats', }, - RTCStatsEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCStatsEventInit', - }, RTCStatsReport: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -1523,24 +1511,6 @@ export const dom = { isValueVariable: false, name: 'SVGBoundingBoxOptions', }, - ScopedCredentialDescriptor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ScopedCredentialDescriptor', - }, - ScopedCredentialOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ScopedCredentialOptions', - }, - ScopedCredentialParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ScopedCredentialParameters', - }, ScrollIntoViewOptions: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -1565,12 +1535,6 @@ export const dom = { isValueVariable: false, name: 'SecurityPolicyViolationEventInit', }, - ServiceWorkerMessageEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ServiceWorkerMessageEventInit', - }, ShadowRootInit: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -1745,12 +1709,6 @@ export const dom = { isValueVariable: false, name: 'WaveShaperOptions', }, - WebAuthnExtensions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebAuthnExtensions', - }, WebGLContextAttributes: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -2465,12 +2423,6 @@ export const dom = { isValueVariable: true, name: 'DOMImplementation', }, - DOML2DeprecatedColorProperty: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOML2DeprecatedColorProperty', - }, DOMMatrix: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -2615,12 +2567,6 @@ export const dom = { isValueVariable: true, name: 'DeviceAcceleration', }, - DeviceLightEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DeviceLightEvent', - }, DeviceMotionEvent: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -3005,12 +2951,6 @@ export const dom = { isValueVariable: true, name: 'HTMLBaseElement', }, - HTMLBaseFontElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLBaseFontElement', - }, HTMLBodyElementEventMap: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -3737,12 +3677,6 @@ export const dom = { isValueVariable: true, name: 'MSGesture', }, - MSGestureEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSGestureEvent', - }, MSGraphicsTrust: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -3767,18 +3701,6 @@ export const dom = { isValueVariable: true, name: 'MSMediaKeyError', }, - MSMediaKeyMessageEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSMediaKeyMessageEvent', - }, - MSMediaKeyNeededEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSMediaKeyNeededEvent', - }, MSMediaKeySession: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -3797,12 +3719,6 @@ export const dom = { isValueVariable: false, name: 'MSNavigatorDoNotTrack', }, - MSPointerEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSPointerEvent', - }, MSStream: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -4295,6 +4211,12 @@ export const dom = { isValueVariable: true, name: 'PaymentAddress', }, + PaymentMethodChangeEvent: { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: true, + name: 'PaymentMethodChangeEvent', + }, PaymentRequestEventMap: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -4313,6 +4235,12 @@ export const dom = { isValueVariable: true, name: 'PaymentRequestUpdateEvent', }, + PaymentResponseEventMap: { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, + name: 'PaymentResponseEventMap', + }, PaymentResponse: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -4709,12 +4637,6 @@ export const dom = { isValueVariable: true, name: 'RTCSsrcConflictEvent', }, - RTCStatsEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCStatsEvent', - }, RTCStatsProvider: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -5540,7 +5462,7 @@ export const dom = { SVGZoomAndPan: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, - isValueVariable: true, + isValueVariable: false, name: 'SVGZoomAndPan', }, SVGZoomEvent: { @@ -5549,18 +5471,6 @@ export const dom = { isValueVariable: true, name: 'SVGZoomEvent', }, - ScopedCredential: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ScopedCredential', - }, - ScopedCredentialInfo: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ScopedCredentialInfo', - }, Screen: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -5633,12 +5543,6 @@ export const dom = { isValueVariable: true, name: 'ServiceWorkerContainer', }, - ServiceWorkerMessageEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ServiceWorkerMessageEvent', - }, ServiceWorkerRegistrationEventMap: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -6161,18 +6065,6 @@ export const dom = { isValueVariable: true, name: 'WaveShaperNode', }, - WebAuthentication: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebAuthentication', - }, - WebAuthnAssertion: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebAuthnAssertion', - }, WebGL2RenderingContext: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -6215,12 +6107,6 @@ export const dom = { isValueVariable: true, name: 'WebGLFramebuffer', }, - WebGLObject: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLObject', - }, WebGLProgram: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -7601,12 +7487,6 @@ export const dom = { isValueVariable: false, name: 'RTCDataChannelState', }, - RTCDegradationPreference: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDegradationPreference', - }, RTCDtlsRole: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -7619,12 +7499,6 @@ export const dom = { isValueVariable: false, name: 'RTCDtlsTransportState', }, - RTCDtxStatus: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDtxStatus', - }, RTCErrorDetailType: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -7709,12 +7583,6 @@ export const dom = { isValueVariable: false, name: 'RTCPeerConnectionState', }, - RTCPriorityType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCPriorityType', - }, RTCRtcpMuxPolicy: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -7829,12 +7697,6 @@ export const dom = { isValueVariable: false, name: 'ResponseType', }, - ScopedCredentialType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ScopedCredentialType', - }, ScrollBehavior: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -7913,12 +7775,6 @@ export const dom = { isValueVariable: false, name: 'TouchType', }, - Transport: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Transport', - }, UserVerificationRequirement: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, diff --git a/packages/scope-manager/src/lib/es2021.full.ts b/packages/scope-manager/src/lib/es2021.full.ts new file mode 100644 index 000000000000..f2f88f226be0 --- /dev/null +++ b/packages/scope-manager/src/lib/es2021.full.ts @@ -0,0 +1,18 @@ +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// YOU CAN REGENERATE IT USING yarn generate:lib + +import { ImplicitLibVariableOptions } from '../variable'; +import { es2021 } from './es2021'; +import { dom } from './dom'; +import { webworker_importscripts } from './webworker.importscripts'; +import { scripthost } from './scripthost'; +import { dom_iterable } from './dom.iterable'; + +export const es2021_full = { + ...es2021, + ...dom, + ...webworker_importscripts, + ...scripthost, + ...dom_iterable, +} as Record; diff --git a/packages/scope-manager/src/lib/es2021.promise.ts b/packages/scope-manager/src/lib/es2021.promise.ts new file mode 100644 index 000000000000..76c197a1dc1b --- /dev/null +++ b/packages/scope-manager/src/lib/es2021.promise.ts @@ -0,0 +1,26 @@ +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// YOU CAN REGENERATE IT USING yarn generate:lib + +import { ImplicitLibVariableOptions } from '../variable'; + +export const es2021_promise = { + AggregateError: { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: true, + name: 'AggregateError', + }, + AggregateErrorConstructor: { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, + name: 'AggregateErrorConstructor', + }, + PromiseConstructor: { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, + name: 'PromiseConstructor', + }, +} as Record; diff --git a/packages/scope-manager/src/lib/es2021.string.ts b/packages/scope-manager/src/lib/es2021.string.ts new file mode 100644 index 000000000000..16d42e4428e8 --- /dev/null +++ b/packages/scope-manager/src/lib/es2021.string.ts @@ -0,0 +1,14 @@ +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// YOU CAN REGENERATE IT USING yarn generate:lib + +import { ImplicitLibVariableOptions } from '../variable'; + +export const es2021_string = { + String: { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, + name: 'String', + }, +} as Record; diff --git a/packages/scope-manager/src/lib/es2021.ts b/packages/scope-manager/src/lib/es2021.ts new file mode 100644 index 000000000000..027a2d6142da --- /dev/null +++ b/packages/scope-manager/src/lib/es2021.ts @@ -0,0 +1,16 @@ +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// YOU CAN REGENERATE IT USING yarn generate:lib + +import { ImplicitLibVariableOptions } from '../variable'; +import { es2020 } from './es2020'; +import { es2021_promise } from './es2021.promise'; +import { es2021_string } from './es2021.string'; +import { es2021_weakref } from './es2021.weakref'; + +export const es2021 = { + ...es2020, + ...es2021_promise, + ...es2021_string, + ...es2021_weakref, +} as Record; diff --git a/packages/scope-manager/src/lib/es2021.weakref.ts b/packages/scope-manager/src/lib/es2021.weakref.ts new file mode 100644 index 000000000000..a86173a9358c --- /dev/null +++ b/packages/scope-manager/src/lib/es2021.weakref.ts @@ -0,0 +1,32 @@ +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// YOU CAN REGENERATE IT USING yarn generate:lib + +import { ImplicitLibVariableOptions } from '../variable'; + +export const es2021_weakref = { + WeakRef: { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: true, + name: 'WeakRef', + }, + WeakRefConstructor: { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, + name: 'WeakRefConstructor', + }, + FinalizationRegistry: { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: true, + name: 'FinalizationRegistry', + }, + FinalizationRegistryConstructor: { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, + name: 'FinalizationRegistryConstructor', + }, +} as Record; diff --git a/packages/scope-manager/src/lib/esnext.ts b/packages/scope-manager/src/lib/esnext.ts index 347f63158c6e..fcb4fab6cfea 100644 --- a/packages/scope-manager/src/lib/esnext.ts +++ b/packages/scope-manager/src/lib/esnext.ts @@ -3,16 +3,10 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; -import { es2020 } from './es2020'; +import { es2021 } from './es2021'; import { esnext_intl } from './esnext.intl'; -import { esnext_string } from './esnext.string'; -import { esnext_promise } from './esnext.promise'; -import { esnext_weakref } from './esnext.weakref'; export const esnext = { - ...es2020, + ...es2021, ...esnext_intl, - ...esnext_string, - ...esnext_promise, - ...esnext_weakref, } as Record; diff --git a/packages/scope-manager/src/lib/index.ts b/packages/scope-manager/src/lib/index.ts index dfae31e07962..7ad94cf41a6d 100644 --- a/packages/scope-manager/src/lib/index.ts +++ b/packages/scope-manager/src/lib/index.ts @@ -11,6 +11,7 @@ import { es2017 } from './es2017'; import { es2018 } from './es2018'; import { es2019 } from './es2019'; import { es2020 } from './es2020'; +import { es2021 } from './es2021'; import { esnext } from './esnext'; import { dom } from './dom'; import { dom_iterable } from './dom.iterable'; @@ -48,6 +49,9 @@ import { es2020_sharedmemory } from './es2020.sharedmemory'; import { es2020_string } from './es2020.string'; import { es2020_symbol_wellknown } from './es2020.symbol.wellknown'; import { es2020_intl } from './es2020.intl'; +import { es2021_promise } from './es2021.promise'; +import { es2021_string } from './es2021.string'; +import { es2021_weakref } from './es2021.weakref'; import { esnext_array } from './esnext.array'; import { esnext_symbol } from './esnext.symbol'; import { esnext_asynciterable } from './esnext.asynciterable'; @@ -61,6 +65,7 @@ import { es2017_full } from './es2017.full'; import { es2018_full } from './es2018.full'; import { es2019_full } from './es2019.full'; import { es2020_full } from './es2020.full'; +import { es2021_full } from './es2021.full'; import { esnext_full } from './esnext.full'; import { lib as libBase } from './lib'; @@ -74,6 +79,7 @@ const lib = { es2018, es2019, es2020, + es2021, esnext, dom, 'dom.iterable': dom_iterable, @@ -111,6 +117,9 @@ const lib = { 'es2020.string': es2020_string, 'es2020.symbol.wellknown': es2020_symbol_wellknown, 'es2020.intl': es2020_intl, + 'es2021.promise': es2021_promise, + 'es2021.string': es2021_string, + 'es2021.weakref': es2021_weakref, 'esnext.array': esnext_array, 'esnext.symbol': esnext_symbol, 'esnext.asynciterable': esnext_asynciterable, @@ -124,6 +133,7 @@ const lib = { 'es2018.full': es2018_full, 'es2019.full': es2019_full, 'es2020.full': es2020_full, + 'es2021.full': es2021_full, 'esnext.full': esnext_full, lib: libBase, } as const; diff --git a/packages/scope-manager/src/lib/webworker.ts b/packages/scope-manager/src/lib/webworker.ts index 3f76351c98f4..8dca7959b25a 100644 --- a/packages/scope-manager/src/lib/webworker.ts +++ b/packages/scope-manager/src/lib/webworker.ts @@ -371,12 +371,6 @@ export const webworker = { isValueVariable: false, name: 'PushPermissionDescriptor', }, - PushSubscriptionChangeEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PushSubscriptionChangeEventInit', - }, PushSubscriptionJSON: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -1373,12 +1367,6 @@ export const webworker = { isValueVariable: true, name: 'PushSubscription', }, - PushSubscriptionChangeEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PushSubscriptionChangeEvent', - }, PushSubscriptionOptions: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, @@ -1673,12 +1661,6 @@ export const webworker = { isValueVariable: true, name: 'WebGLFramebuffer', }, - WebGLObject: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLObject', - }, WebGLProgram: { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, diff --git a/packages/types/src/lib.ts b/packages/types/src/lib.ts index 5f173893b589..06e8eaf2103c 100644 --- a/packages/types/src/lib.ts +++ b/packages/types/src/lib.ts @@ -12,6 +12,7 @@ type Lib = | 'es2018' | 'es2019' | 'es2020' + | 'es2021' | 'esnext' | 'dom' | 'dom.iterable' @@ -49,6 +50,9 @@ type Lib = | 'es2020.string' | 'es2020.symbol.wellknown' | 'es2020.intl' + | 'es2021.promise' + | 'es2021.string' + | 'es2021.weakref' | 'esnext.array' | 'esnext.symbol' | 'esnext.asynciterable' @@ -62,6 +66,7 @@ type Lib = | 'es2018.full' | 'es2019.full' | 'es2020.full' + | 'es2021.full' | 'esnext.full' | 'lib'; diff --git a/packages/typescript-estree/src/node-utils.ts b/packages/typescript-estree/src/node-utils.ts index eb88660fdfa3..9afe27669265 100644 --- a/packages/typescript-estree/src/node-utils.ts +++ b/packages/typescript-estree/src/node-utils.ts @@ -558,7 +558,7 @@ export function getTokenType( case SyntaxKind.GetKeyword: case SyntaxKind.SetKeyword: - // falls through + // intentional fallthrough default: } From ce4ef1ea965999bbb59af8c88bc808ec01222434 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 May 2021 16:41:52 -0700 Subject: [PATCH 162/473] chore: bump ws from 7.4.3 to 7.4.6 (#3458) Bumps [ws](https://github.com/websockets/ws) from 7.4.3 to 7.4.6. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/7.4.3...7.4.6) 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 96c7f557417f..762af4b878c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9269,9 +9269,9 @@ write-pkg@^3.1.0: write-json-file "^2.2.0" ws@^7.2.3: - version "7.4.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.3.tgz#1f9643de34a543b8edb124bdcbc457ae55a6e5cd" - integrity sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA== + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== xdg-basedir@^4.0.0: version "4.0.0" From 99aab0673bb40562ca6a04156e9856dd3ef561b7 Mon Sep 17 00:00:00 2001 From: JounQin Date: Sat, 29 May 2021 07:46:29 +0800 Subject: [PATCH 163/473] docs(eslint-plugin): [no-this-alias] `allowDestructuring` is `true` by default (#3446) --- packages/eslint-plugin/docs/rules/no-this-alias.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/no-this-alias.md b/packages/eslint-plugin/docs/rules/no-this-alias.md index 324929e52c2b..ffb0db1e21ba 100644 --- a/packages/eslint-plugin/docs/rules/no-this-alias.md +++ b/packages/eslint-plugin/docs/rules/no-this-alias.md @@ -44,7 +44,7 @@ You can pass an object option: "@typescript-eslint/no-this-alias": [ "error", { - "allowDestructuring": true, // Allow `const { props, state } = this`; false by default + "allowDestructuring": false, // Disallow `const { props, state } = this`; true by default "allowedNames": ["self"] // Allow `const self = this`; `[]` by default } ] From a760946e59a69dda971a337f9dbe898b9b564ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sat, 29 May 2021 01:50:39 +0200 Subject: [PATCH 164/473] chore(eslint-plugin): remove useless union types (#3421) --- .../eslint-plugin/src/rules/comma-spacing.ts | 4 +-- .../src/rules/consistent-type-imports.ts | 4 +-- .../indent-new-do-not-use/BinarySearchTree.ts | 3 +- .../indent-new-do-not-use/OffsetStorage.ts | 28 ++++++++----------- .../rules/indent-new-do-not-use/TokenInfo.ts | 9 +++--- .../src/rules/indent-new-do-not-use/index.ts | 13 ++++----- .../src/rules/object-curly-spacing.ts | 4 +-- 7 files changed, 29 insertions(+), 36 deletions(-) diff --git a/packages/eslint-plugin/src/rules/comma-spacing.ts b/packages/eslint-plugin/src/rules/comma-spacing.ts index e0b206221162..019a82a2e76e 100644 --- a/packages/eslint-plugin/src/rules/comma-spacing.ts +++ b/packages/eslint-plugin/src/rules/comma-spacing.ts @@ -108,8 +108,8 @@ export default createRule({ */ function validateCommaSpacing( commaToken: TSESTree.PunctuatorToken, - prevToken: TSESTree.Token | TSESTree.Comment | null, - nextToken: TSESTree.Token | TSESTree.Comment | null, + prevToken: TSESTree.Token | null, + nextToken: TSESTree.Token | null, ): void { if ( prevToken && diff --git a/packages/eslint-plugin/src/rules/consistent-type-imports.ts b/packages/eslint-plugin/src/rules/consistent-type-imports.ts index 6a3067270a45..f15a27a75308 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-imports.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-imports.ts @@ -31,13 +31,13 @@ interface ReportValueImport { } function isImportToken( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ): token is TSESTree.KeywordToken & { value: 'import' } { return token.type === AST_TOKEN_TYPES.Keyword && token.value === 'import'; } function isTypeToken( - token: TSESTree.Token | TSESTree.Comment, + token: TSESTree.Token, ): token is TSESTree.IdentifierToken & { value: 'type' } { return token.type === AST_TOKEN_TYPES.Identifier && token.value === 'type'; } diff --git a/packages/eslint-plugin/src/rules/indent-new-do-not-use/BinarySearchTree.ts b/packages/eslint-plugin/src/rules/indent-new-do-not-use/BinarySearchTree.ts index 0010750ebfd8..7c4b78f5b7b5 100644 --- a/packages/eslint-plugin/src/rules/indent-new-do-not-use/BinarySearchTree.ts +++ b/packages/eslint-plugin/src/rules/indent-new-do-not-use/BinarySearchTree.ts @@ -4,10 +4,9 @@ import { TSESTree } from '@typescript-eslint/experimental-utils'; import createTree from 'functional-red-black-tree'; -export type TokenOrComment = TSESTree.Token | TSESTree.Comment; export interface TreeValue { offset: number; - from: TokenOrComment | null; + from: TSESTree.Token | null; force: boolean; } diff --git a/packages/eslint-plugin/src/rules/indent-new-do-not-use/OffsetStorage.ts b/packages/eslint-plugin/src/rules/indent-new-do-not-use/OffsetStorage.ts index d19334672630..c673a7d5af4b 100644 --- a/packages/eslint-plugin/src/rules/indent-new-do-not-use/OffsetStorage.ts +++ b/packages/eslint-plugin/src/rules/indent-new-do-not-use/OffsetStorage.ts @@ -2,11 +2,7 @@ // License: https://github.com/eslint/eslint/blob/48700fc8408f394887cdedd071b22b757700fdcb/LICENSE import { TSESTree } from '@typescript-eslint/experimental-utils'; -import { - BinarySearchTree, - TokenOrComment, - TreeValue, -} from './BinarySearchTree'; +import { BinarySearchTree, TreeValue } from './BinarySearchTree'; import { TokenInfo } from './TokenInfo'; /** @@ -17,9 +13,9 @@ export class OffsetStorage { private readonly indentSize: number; private readonly indentType: string; private readonly tree: BinarySearchTree; - private readonly lockedFirstTokens: WeakMap; - private readonly desiredIndentCache: WeakMap; - private readonly ignoredTokens: WeakSet; + private readonly lockedFirstTokens: WeakMap; + private readonly desiredIndentCache: WeakMap; + private readonly ignoredTokens: WeakSet; /** * @param tokenInfo a TokenInfo instance * @param indentSize The desired size of each indentation level @@ -38,7 +34,7 @@ export class OffsetStorage { this.ignoredTokens = new WeakSet(); } - private getOffsetDescriptor(token: TokenOrComment): TreeValue { + private getOffsetDescriptor(token: TSESTree.Token): TreeValue { return this.tree.findLe(token.range[0]).value; } @@ -50,8 +46,8 @@ export class OffsetStorage { * @param offsetToken The second token, whose offset should be matched to the first token */ public matchOffsetOf( - baseToken: TokenOrComment, - offsetToken: TokenOrComment, + baseToken: TSESTree.Token, + offsetToken: TSESTree.Token, ): void { /* * lockedFirstTokens is a map from a token whose indentation is controlled by the "first" option to @@ -120,8 +116,8 @@ export class OffsetStorage { * @param offset The desired indent level */ public setDesiredOffset( - token: TokenOrComment, - fromToken: TokenOrComment | null, + token: TSESTree.Token, + fromToken: TSESTree.Token | null, offset: number, ): void { this.setDesiredOffsets(token.range, fromToken, offset); @@ -154,7 +150,7 @@ export class OffsetStorage { */ public setDesiredOffsets( range: [number, number], - fromToken: TokenOrComment | null, + fromToken: TSESTree.Token | null, offset = 0, force = false, ): void { @@ -212,7 +208,7 @@ export class OffsetStorage { * Gets the desired indent of a token * @returns The desired indent of the token */ - public getDesiredIndent(token: TokenOrComment): string { + public getDesiredIndent(token: TSESTree.Token): string { if (!this.desiredIndentCache.has(token)) { if (this.ignoredTokens.has(token)) { /* @@ -263,7 +259,7 @@ export class OffsetStorage { /** * Ignores a token, preventing it from being reported. */ - ignoreToken(token: TokenOrComment): void { + ignoreToken(token: TSESTree.Token): void { if (this.tokenInfo.isFirstTokenOfLine(token)) { this.ignoredTokens.add(token); } diff --git a/packages/eslint-plugin/src/rules/indent-new-do-not-use/TokenInfo.ts b/packages/eslint-plugin/src/rules/indent-new-do-not-use/TokenInfo.ts index 13859cde1e8d..7dd27346560b 100644 --- a/packages/eslint-plugin/src/rules/indent-new-do-not-use/TokenInfo.ts +++ b/packages/eslint-plugin/src/rules/indent-new-do-not-use/TokenInfo.ts @@ -2,7 +2,6 @@ // License: https://github.com/eslint/eslint/blob/48700fc8408f394887cdedd071b22b757700fdcb/LICENSE import { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; -import { TokenOrComment } from './BinarySearchTree'; /** * A helper class to get token-based info related to indentation @@ -37,8 +36,8 @@ export class TokenInfo { * @returns The first token on the given line */ public getFirstTokenOfLine( - token: TokenOrComment | TSESTree.Node, - ): TokenOrComment { + token: TSESTree.Token | TSESTree.Node, + ): TSESTree.Token { return this.firstTokensByLineNumber.get(token.loc.start.line)!; } @@ -46,7 +45,7 @@ export class TokenInfo { * Determines whether a token is the first token in its line * @returns `true` if the token is the first on its line */ - public isFirstTokenOfLine(token: TokenOrComment): boolean { + public isFirstTokenOfLine(token: TSESTree.Token): boolean { return this.getFirstTokenOfLine(token) === token; } @@ -55,7 +54,7 @@ export class TokenInfo { * @param token Token to examine. This should be the first token on its line. * @returns The indentation characters that precede the token */ - public getTokenIndent(token: TokenOrComment): string { + public getTokenIndent(token: TSESTree.Token): string { return this.sourceCode.text.slice( token.range[0] - token.loc.start.column, token.range[0], diff --git a/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts b/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts index fca573e2c32b..352fcd17256a 100644 --- a/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts +++ b/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts @@ -9,7 +9,6 @@ import { TSESTree, } from '@typescript-eslint/experimental-utils'; -import { TokenOrComment } from './BinarySearchTree'; import { OffsetStorage } from './OffsetStorage'; import { TokenInfo } from './TokenInfo'; import { @@ -474,7 +473,7 @@ export default createRule({ * @param token Token violating the indent rule * @param neededIndent Expected indentation string */ - function report(token: TokenOrComment, neededIndent: string): void { + function report(token: TSESTree.Token, neededIndent: string): void { const actualIndent = Array.from(tokenInfo.getTokenIndent(token)); const numSpaces = actualIndent.filter(char => char === ' ').length; const numTabs = actualIndent.filter(char => char === '\t').length; @@ -503,7 +502,7 @@ export default createRule({ * @returns `true` if the token's indentation is correct */ function validateTokenIndent( - token: TokenOrComment, + token: TSESTree.Token, desiredIndent: string, ): boolean { const indentation = tokenInfo.getTokenIndent(token); @@ -1653,21 +1652,21 @@ export default createRule({ addParensIndent(sourceCode.ast.tokens); /* - * Create a Map from (tokenOrComment) => (precedingToken). + * Create a Map from (token) => (precedingToken). * This is necessary because sourceCode.getTokenBefore does not handle a comment as an argument correctly. */ const precedingTokens = sourceCode.ast.comments.reduce( (commentMap, comment) => { - const tokenOrCommentBefore = sourceCode.getTokenBefore(comment, { + const tokenBefore = sourceCode.getTokenBefore(comment, { includeComments: true, })!; return commentMap.set( comment, - commentMap.get(tokenOrCommentBefore) ?? tokenOrCommentBefore, + commentMap.get(tokenBefore) ?? tokenBefore, ); }, - new WeakMap(), + new WeakMap(), ); sourceCode.lines.forEach((_, lineIndex) => { diff --git a/packages/eslint-plugin/src/rules/object-curly-spacing.ts b/packages/eslint-plugin/src/rules/object-curly-spacing.ts index 74161246a31a..256057c4fdfa 100644 --- a/packages/eslint-plugin/src/rules/object-curly-spacing.ts +++ b/packages/eslint-plugin/src/rules/object-curly-spacing.ts @@ -164,8 +164,8 @@ export default createRule({ function validateBraceSpacing( node: TSESTree.TSMappedType | TSESTree.TSTypeLiteral, first: TSESTree.Token, - second: TSESTree.Token | TSESTree.Comment, - penultimate: TSESTree.Token | TSESTree.Comment, + second: TSESTree.Token, + penultimate: TSESTree.Token, last: TSESTree.Token, ): void { if (isTokenOnSameLine(first, second)) { From d4f077473afb04f7c4d377dd87318749632b4404 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Fri, 28 May 2021 19:51:01 -0400 Subject: [PATCH 165/473] fix(eslint-plugin): [no-type-alias] consider type imports as alias types (#3433) --- .../eslint-plugin/src/rules/no-type-alias.ts | 1 + .../tests/rules/no-type-alias.test.ts | 45 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/packages/eslint-plugin/src/rules/no-type-alias.ts b/packages/eslint-plugin/src/rules/no-type-alias.ts index 9b80efdd9d64..3e93a995e64d 100644 --- a/packages/eslint-plugin/src/rules/no-type-alias.ts +++ b/packages/eslint-plugin/src/rules/no-type-alias.ts @@ -122,6 +122,7 @@ export default util.createRule({ ]; const aliasTypes = new Set([ AST_NODE_TYPES.TSArrayType, + AST_NODE_TYPES.TSImportType, AST_NODE_TYPES.TSTypeReference, AST_NODE_TYPES.TSLiteralType, AST_NODE_TYPES.TSTypeQuery, diff --git a/packages/eslint-plugin/tests/rules/no-type-alias.test.ts b/packages/eslint-plugin/tests/rules/no-type-alias.test.ts index b48acae7e17f..ab4e3dd49191 100644 --- a/packages/eslint-plugin/tests/rules/no-type-alias.test.ts +++ b/packages/eslint-plugin/tests/rules/no-type-alias.test.ts @@ -394,6 +394,10 @@ export type ClassValue = code: 'type Foo = typeof bar;', options: [{ allowAliases: 'always' }], }, + { + code: "type Foo = typeof import('foo');", + options: [{ allowAliases: 'always' }], + }, { code: ` const WithAKey = { AKey: true }; @@ -405,6 +409,10 @@ type KeyNames = keyof typeof SCALARS; code: 'type Foo = typeof bar | typeof baz;', options: [{ allowAliases: 'in-unions' }], }, + { + code: "type Foo = typeof bar | typeof import('foo');", + options: [{ allowAliases: 'in-unions' }], + }, { code: 'type Foo = keyof [string];', options: [{ allowTupleTypes: 'always' }], @@ -505,6 +513,20 @@ type KeyNames = keyof typeof SCALARS; }, ], }, + { + code: "type Foo = typeof import('foo');", + options: [{ allowAliases: 'never' }], + errors: [ + { + messageId: 'noTypeAlias', + data: { + alias: 'aliases', + }, + line: 1, + column: 12, + }, + ], + }, { code: "type Foo = 'a' | 'b';", errors: [ @@ -528,6 +550,29 @@ type KeyNames = keyof typeof SCALARS; }, ], }, + { + code: "type Foo = 'a' | typeof import('foo');", + errors: [ + { + messageId: 'noCompositionAlias', + data: { + typeName: 'Aliases', + compositionType: 'union', + }, + line: 1, + column: 12, + }, + { + messageId: 'noCompositionAlias', + data: { + typeName: 'Aliases', + compositionType: 'union', + }, + line: 1, + column: 18, + }, + ], + }, { code: "type Foo = 'a' | 'b';", options: [{ allowLiterals: 'in-unions' }], From 258116ba7b0dd4ac7a1cc3876fab12f2556bda74 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sun, 30 May 2021 12:55:23 -0700 Subject: [PATCH 166/473] feat(scope-manager): reduce generated lib file size (#3468) --- packages/scope-manager/src/lib/base-config.ts | 19 + .../scope-manager/src/lib/dom.iterable.ts | 365 +- packages/scope-manager/src/lib/dom.ts | 9115 +++-------------- .../src/lib/es2015.collection.ts | 71 +- packages/scope-manager/src/lib/es2015.core.ts | 85 +- .../scope-manager/src/lib/es2015.generator.ts | 22 +- .../scope-manager/src/lib/es2015.iterable.ts | 295 +- .../scope-manager/src/lib/es2015.promise.ts | 8 +- .../scope-manager/src/lib/es2015.proxy.ts | 15 +- .../scope-manager/src/lib/es2015.reflect.ts | 8 +- .../scope-manager/src/lib/es2015.symbol.ts | 8 +- .../src/lib/es2015.symbol.wellknown.ts | 225 +- .../src/lib/es2016.array.include.ts | 78 +- packages/scope-manager/src/lib/es2017.intl.ts | 8 +- .../scope-manager/src/lib/es2017.object.ts | 8 +- .../src/lib/es2017.sharedmemory.ts | 29 +- .../scope-manager/src/lib/es2017.string.ts | 8 +- .../src/lib/es2017.typedarrays.ts | 64 +- .../src/lib/es2018.asyncgenerator.ts | 22 +- .../src/lib/es2018.asynciterable.ts | 29 +- packages/scope-manager/src/lib/es2018.intl.ts | 8 +- .../scope-manager/src/lib/es2018.promise.ts | 8 +- .../scope-manager/src/lib/es2018.regexp.ts | 22 +- .../scope-manager/src/lib/es2019.array.ts | 22 +- .../scope-manager/src/lib/es2019.object.ts | 8 +- .../scope-manager/src/lib/es2019.string.ts | 8 +- .../scope-manager/src/lib/es2019.symbol.ts | 8 +- .../scope-manager/src/lib/es2020.bigint.ts | 64 +- packages/scope-manager/src/lib/es2020.intl.ts | 8 +- .../scope-manager/src/lib/es2020.promise.ts | 29 +- .../src/lib/es2020.sharedmemory.ts | 8 +- .../scope-manager/src/lib/es2020.string.ts | 8 +- .../src/lib/es2020.symbol.wellknown.ts | 15 +- .../scope-manager/src/lib/es2021.promise.ts | 22 +- .../scope-manager/src/lib/es2021.string.ts | 8 +- .../scope-manager/src/lib/es2021.weakref.ts | 29 +- packages/scope-manager/src/lib/es5.ts | 701 +- .../scope-manager/src/lib/esnext.array.ts | 22 +- .../src/lib/esnext.asynciterable.ts | 29 +- .../scope-manager/src/lib/esnext.bigint.ts | 64 +- packages/scope-manager/src/lib/esnext.intl.ts | 8 +- .../scope-manager/src/lib/esnext.promise.ts | 22 +- .../scope-manager/src/lib/esnext.string.ts | 8 +- .../scope-manager/src/lib/esnext.symbol.ts | 8 +- .../scope-manager/src/lib/esnext.weakref.ts | 29 +- packages/scope-manager/src/lib/scripthost.ts | 92 +- .../src/lib/webworker.iterable.ts | 99 +- packages/scope-manager/src/lib/webworker.ts | 2871 +----- .../src/referencer/Referencer.ts | 7 +- .../scope-manager/src/scope/GlobalScope.ts | 7 +- .../src/variable/ImplicitLibVariable.ts | 3 +- packages/scope-manager/tools/generate-lib.ts | 82 +- 52 files changed, 2237 insertions(+), 12572 deletions(-) create mode 100644 packages/scope-manager/src/lib/base-config.ts diff --git a/packages/scope-manager/src/lib/base-config.ts b/packages/scope-manager/src/lib/base-config.ts new file mode 100644 index 000000000000..8a704c371018 --- /dev/null +++ b/packages/scope-manager/src/lib/base-config.ts @@ -0,0 +1,19 @@ +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// YOU CAN REGENERATE IT USING yarn generate:lib + +export const TYPE = Object.freeze({ + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, +}); +export const VALUE = Object.freeze({ + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: false, + isValueVariable: true, +}); +export const TYPE_VALUE = Object.freeze({ + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: true, +}); diff --git a/packages/scope-manager/src/lib/dom.iterable.ts b/packages/scope-manager/src/lib/dom.iterable.ts index ada654336257..fcd9388b5620 100644 --- a/packages/scope-manager/src/lib/dom.iterable.ts +++ b/packages/scope-manager/src/lib/dom.iterable.ts @@ -3,318 +3,59 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const dom_iterable = { - AudioParam: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioParam', - }, - AudioParamMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioParamMap', - }, - BaseAudioContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BaseAudioContext', - }, - CSSRuleList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CSSRuleList', - }, - CSSStyleDeclaration: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CSSStyleDeclaration', - }, - Cache: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Cache', - }, - CanvasPathDrawingStyles: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasPathDrawingStyles', - }, - ClientRectList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ClientRectList', - }, - DOMRectList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMRectList', - }, - DOMStringList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMStringList', - }, - DOMTokenList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMTokenList', - }, - DataTransferItemList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DataTransferItemList', - }, - FileList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FileList', - }, - FormData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FormData', - }, - HTMLAllCollection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLAllCollection', - }, - HTMLCollectionBase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLCollectionBase', - }, - HTMLCollectionOf: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLCollectionOf', - }, - HTMLFormElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLFormElement', - }, - HTMLSelectElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLSelectElement', - }, - Headers: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Headers', - }, - IDBDatabase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBDatabase', - }, - IDBObjectStore: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBObjectStore', - }, - MediaKeyStatusMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaKeyStatusMap', - }, - MediaList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaList', - }, - MimeTypeArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MimeTypeArray', - }, - NamedNodeMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NamedNodeMap', - }, - Navigator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Navigator', - }, - NodeList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NodeList', - }, - NodeListOf: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NodeListOf', - }, - Plugin: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Plugin', - }, - PluginArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PluginArray', - }, - RTCRtpTransceiver: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpTransceiver', - }, - RTCStatsReport: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCStatsReport', - }, - SVGLengthList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGLengthList', - }, - SVGNumberList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGNumberList', - }, - SVGPointList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGPointList', - }, - SVGStringList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGStringList', - }, - SourceBufferList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SourceBufferList', - }, - SpeechGrammarList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SpeechGrammarList', - }, - SpeechRecognitionResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SpeechRecognitionResult', - }, - SpeechRecognitionResultList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SpeechRecognitionResultList', - }, - StyleSheetList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'StyleSheetList', - }, - TextTrackCueList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextTrackCueList', - }, - TextTrackList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextTrackList', - }, - TouchList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TouchList', - }, - URLSearchParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'URLSearchParams', - }, - VRDisplay: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VRDisplay', - }, - WEBGL_draw_buffers: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_draw_buffers', - }, - WebGL2RenderingContextBase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGL2RenderingContextBase', - }, - WebGL2RenderingContextOverloads: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGL2RenderingContextOverloads', - }, - WebGLRenderingContextBase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLRenderingContextBase', - }, - WebGLRenderingContextOverloads: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLRenderingContextOverloads', - }, + AudioParam: TYPE, + AudioParamMap: TYPE, + BaseAudioContext: TYPE, + CSSRuleList: TYPE, + CSSStyleDeclaration: TYPE, + Cache: TYPE, + CanvasPathDrawingStyles: TYPE, + ClientRectList: TYPE, + DOMRectList: TYPE, + DOMStringList: TYPE, + DOMTokenList: TYPE, + DataTransferItemList: TYPE, + FileList: TYPE, + FormData: TYPE, + HTMLAllCollection: TYPE, + HTMLCollectionBase: TYPE, + HTMLCollectionOf: TYPE, + HTMLFormElement: TYPE, + HTMLSelectElement: TYPE, + Headers: TYPE, + IDBDatabase: TYPE, + IDBObjectStore: TYPE, + MediaKeyStatusMap: TYPE, + MediaList: TYPE, + MimeTypeArray: TYPE, + NamedNodeMap: TYPE, + Navigator: TYPE, + NodeList: TYPE, + NodeListOf: TYPE, + Plugin: TYPE, + PluginArray: TYPE, + RTCRtpTransceiver: TYPE, + RTCStatsReport: TYPE, + SVGLengthList: TYPE, + SVGNumberList: TYPE, + SVGPointList: TYPE, + SVGStringList: TYPE, + SourceBufferList: TYPE, + SpeechGrammarList: TYPE, + SpeechRecognitionResult: TYPE, + SpeechRecognitionResultList: TYPE, + StyleSheetList: TYPE, + TextTrackCueList: TYPE, + TextTrackList: TYPE, + TouchList: TYPE, + URLSearchParams: TYPE, + VRDisplay: TYPE, + WEBGL_draw_buffers: TYPE, + WebGL2RenderingContextBase: TYPE, + WebGL2RenderingContextOverloads: TYPE, + WebGLRenderingContextBase: TYPE, + WebGLRenderingContextOverloads: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/dom.ts b/packages/scope-manager/src/lib/dom.ts index fb6977b71175..ca9edfe21919 100644 --- a/packages/scope-manager/src/lib/dom.ts +++ b/packages/scope-manager/src/lib/dom.ts @@ -3,7818 +3,1309 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE, TYPE_VALUE } from './base-config'; export const dom = { - AddEventListenerOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AddEventListenerOptions', - }, - AddressErrors: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AddressErrors', - }, - AesCbcParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesCbcParams', - }, - AesCtrParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesCtrParams', - }, - AesDerivedKeyParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesDerivedKeyParams', - }, - AesGcmParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesGcmParams', - }, - AesKeyAlgorithm: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesKeyAlgorithm', - }, - AesKeyGenParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesKeyGenParams', - }, - Algorithm: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Algorithm', - }, - AnalyserOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AnalyserOptions', - }, - AnimationEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AnimationEventInit', - }, - AnimationPlaybackEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AnimationPlaybackEventInit', - }, - AssignedNodesOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AssignedNodesOptions', - }, - AudioBufferOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioBufferOptions', - }, - AudioBufferSourceOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioBufferSourceOptions', - }, - AudioContextInfo: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioContextInfo', - }, - AudioContextOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioContextOptions', - }, - AudioNodeOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioNodeOptions', - }, - AudioParamDescriptor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioParamDescriptor', - }, - AudioProcessingEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioProcessingEventInit', - }, - AudioTimestamp: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioTimestamp', - }, - AudioWorkletNodeOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioWorkletNodeOptions', - }, - AuthenticationExtensionsClientInputs: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AuthenticationExtensionsClientInputs', - }, - AuthenticationExtensionsClientOutputs: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AuthenticationExtensionsClientOutputs', - }, - AuthenticatorSelectionCriteria: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AuthenticatorSelectionCriteria', - }, - BiquadFilterOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BiquadFilterOptions', - }, - BlobPropertyBag: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BlobPropertyBag', - }, - ByteLengthChunk: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ByteLengthChunk', - }, - CacheQueryOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CacheQueryOptions', - }, - CanvasRenderingContext2DSettings: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasRenderingContext2DSettings', - }, - ChannelMergerOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ChannelMergerOptions', - }, - ChannelSplitterOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ChannelSplitterOptions', - }, - ClientQueryOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ClientQueryOptions', - }, - ClipboardEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ClipboardEventInit', - }, - CloseEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CloseEventInit', - }, - CompositionEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CompositionEventInit', - }, - ComputedEffectTiming: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ComputedEffectTiming', - }, - ComputedKeyframe: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ComputedKeyframe', - }, - ConfirmSiteSpecificExceptionsInformation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConfirmSiteSpecificExceptionsInformation', - }, - ConstantSourceOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConstantSourceOptions', - }, - ConstrainBooleanParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConstrainBooleanParameters', - }, - ConstrainDOMStringParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConstrainDOMStringParameters', - }, - ConstrainDoubleRange: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConstrainDoubleRange', - }, - ConstrainULongRange: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConstrainULongRange', - }, - ConstrainVideoFacingModeParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConstrainVideoFacingModeParameters', - }, - ConvolverOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConvolverOptions', - }, - CredentialCreationOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CredentialCreationOptions', - }, - CredentialPropertiesOutput: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CredentialPropertiesOutput', - }, - CredentialRequestOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CredentialRequestOptions', - }, - CustomEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CustomEventInit', - }, - DOMMatrix2DInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMMatrix2DInit', - }, - DOMMatrixInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMMatrixInit', - }, - DOMPointInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMPointInit', - }, - DOMQuadInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMQuadInit', - }, - DOMRectInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMRectInit', - }, - DelayOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DelayOptions', - }, - DeviceMotionEventAccelerationInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DeviceMotionEventAccelerationInit', - }, - DeviceMotionEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DeviceMotionEventInit', - }, - DeviceMotionEventRotationRateInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DeviceMotionEventRotationRateInit', - }, - DeviceOrientationEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DeviceOrientationEventInit', - }, - DevicePermissionDescriptor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DevicePermissionDescriptor', - }, - DocumentTimelineOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DocumentTimelineOptions', - }, - DoubleRange: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DoubleRange', - }, - DragEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DragEventInit', - }, - DynamicsCompressorOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DynamicsCompressorOptions', - }, - EcKeyAlgorithm: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EcKeyAlgorithm', - }, - EcKeyGenParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EcKeyGenParams', - }, - EcKeyImportParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EcKeyImportParams', - }, - EcdhKeyDeriveParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EcdhKeyDeriveParams', - }, - EcdsaParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EcdsaParams', - }, - EffectTiming: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EffectTiming', - }, - ElementCreationOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ElementCreationOptions', - }, - ElementDefinitionOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ElementDefinitionOptions', - }, - ErrorEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ErrorEventInit', - }, - EventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventInit', - }, - EventListenerOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventListenerOptions', - }, - EventModifierInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventModifierInit', - }, - EventSourceInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventSourceInit', - }, - ExceptionInformation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ExceptionInformation', - }, - FilePropertyBag: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FilePropertyBag', - }, - FocusEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FocusEventInit', - }, - FocusNavigationEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FocusNavigationEventInit', - }, - FocusNavigationOrigin: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FocusNavigationOrigin', - }, - FocusOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FocusOptions', - }, - FullscreenOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FullscreenOptions', - }, - GainOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GainOptions', - }, - GamepadEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GamepadEventInit', - }, - GetNotificationOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GetNotificationOptions', - }, - GetRootNodeOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GetRootNodeOptions', - }, - HashChangeEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HashChangeEventInit', - }, - HkdfParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HkdfParams', - }, - HmacImportParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HmacImportParams', - }, - HmacKeyAlgorithm: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HmacKeyAlgorithm', - }, - HmacKeyGenParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HmacKeyGenParams', - }, - IDBIndexParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBIndexParameters', - }, - IDBObjectStoreParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBObjectStoreParameters', - }, - IDBVersionChangeEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBVersionChangeEventInit', - }, - IIRFilterOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IIRFilterOptions', - }, - ImageBitmapOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImageBitmapOptions', - }, - ImageBitmapRenderingContextSettings: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImageBitmapRenderingContextSettings', - }, - ImageEncodeOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImageEncodeOptions', - }, - ImportMeta: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImportMeta', - }, - InputEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'InputEventInit', - }, - IntersectionObserverEntryInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IntersectionObserverEntryInit', - }, - IntersectionObserverInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IntersectionObserverInit', - }, - JsonWebKey: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'JsonWebKey', - }, - KeyAlgorithm: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'KeyAlgorithm', - }, - KeyboardEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'KeyboardEventInit', - }, - Keyframe: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Keyframe', - }, - KeyframeAnimationOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'KeyframeAnimationOptions', - }, - KeyframeEffectOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'KeyframeEffectOptions', - }, - MediaElementAudioSourceOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaElementAudioSourceOptions', - }, - MediaEncryptedEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaEncryptedEventInit', - }, - MediaKeyMessageEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaKeyMessageEventInit', - }, - MediaKeySystemConfiguration: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaKeySystemConfiguration', - }, - MediaKeySystemMediaCapability: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaKeySystemMediaCapability', - }, - MediaQueryListEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaQueryListEventInit', - }, - MediaStreamAudioSourceOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaStreamAudioSourceOptions', - }, - MediaStreamConstraints: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaStreamConstraints', - }, - MediaStreamErrorEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaStreamErrorEventInit', - }, - MediaStreamEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaStreamEventInit', - }, - MediaStreamTrackAudioSourceOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaStreamTrackAudioSourceOptions', - }, - MediaStreamTrackEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaStreamTrackEventInit', - }, - MediaTrackCapabilities: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaTrackCapabilities', - }, - MediaTrackConstraintSet: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaTrackConstraintSet', - }, - MediaTrackConstraints: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaTrackConstraints', - }, - MediaTrackSettings: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaTrackSettings', - }, - MediaTrackSupportedConstraints: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaTrackSupportedConstraints', - }, - MessageEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MessageEventInit', - }, - MidiPermissionDescriptor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MidiPermissionDescriptor', - }, - MouseEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MouseEventInit', - }, - MultiCacheQueryOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MultiCacheQueryOptions', - }, - MutationObserverInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MutationObserverInit', - }, - NavigationPreloadState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigationPreloadState', - }, - NotificationAction: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NotificationAction', - }, - NotificationOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NotificationOptions', - }, - OfflineAudioCompletionEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OfflineAudioCompletionEventInit', - }, - OfflineAudioContextOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OfflineAudioContextOptions', - }, - OptionalEffectTiming: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OptionalEffectTiming', - }, - OscillatorOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OscillatorOptions', - }, - PageTransitionEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PageTransitionEventInit', - }, - PannerOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PannerOptions', - }, - PayerErrors: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PayerErrors', - }, - PaymentCurrencyAmount: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentCurrencyAmount', - }, - PaymentDetailsBase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentDetailsBase', - }, - PaymentDetailsInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentDetailsInit', - }, - PaymentDetailsModifier: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentDetailsModifier', - }, - PaymentDetailsUpdate: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentDetailsUpdate', - }, - PaymentItem: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentItem', - }, - PaymentMethodChangeEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentMethodChangeEventInit', - }, - PaymentMethodData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentMethodData', - }, - PaymentOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentOptions', - }, - PaymentRequestUpdateEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentRequestUpdateEventInit', - }, - PaymentShippingOption: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentShippingOption', - }, - PaymentValidationErrors: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentValidationErrors', - }, - Pbkdf2Params: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Pbkdf2Params', - }, - PerformanceObserverInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PerformanceObserverInit', - }, - PeriodicWaveConstraints: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PeriodicWaveConstraints', - }, - PeriodicWaveOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PeriodicWaveOptions', - }, - PermissionDescriptor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PermissionDescriptor', - }, - PointerEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PointerEventInit', - }, - PopStateEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PopStateEventInit', - }, - PositionOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PositionOptions', - }, - PostMessageOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PostMessageOptions', - }, - ProgressEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ProgressEventInit', - }, - PromiseRejectionEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PromiseRejectionEventInit', - }, - PropertyIndexedKeyframes: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PropertyIndexedKeyframes', - }, - PublicKeyCredentialCreationOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PublicKeyCredentialCreationOptions', - }, - PublicKeyCredentialDescriptor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PublicKeyCredentialDescriptor', - }, - PublicKeyCredentialEntity: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PublicKeyCredentialEntity', - }, - PublicKeyCredentialParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PublicKeyCredentialParameters', - }, - PublicKeyCredentialRequestOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PublicKeyCredentialRequestOptions', - }, - PublicKeyCredentialRpEntity: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PublicKeyCredentialRpEntity', - }, - PublicKeyCredentialUserEntity: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PublicKeyCredentialUserEntity', - }, - PushPermissionDescriptor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PushPermissionDescriptor', - }, - PushSubscriptionJSON: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PushSubscriptionJSON', - }, - PushSubscriptionOptionsInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PushSubscriptionOptionsInit', - }, - QueuingStrategy: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'QueuingStrategy', - }, - QueuingStrategyInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'QueuingStrategyInit', - }, - RTCAnswerOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCAnswerOptions', - }, - RTCCertificateExpiration: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCCertificateExpiration', - }, - RTCConfiguration: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCConfiguration', - }, - RTCDTMFToneChangeEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDTMFToneChangeEventInit', - }, - RTCDataChannelEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDataChannelEventInit', - }, - RTCDataChannelInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDataChannelInit', - }, - RTCDtlsFingerprint: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDtlsFingerprint', - }, - RTCDtlsParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDtlsParameters', - }, - RTCErrorEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCErrorEventInit', - }, - RTCErrorInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCErrorInit', - }, - RTCIceCandidateAttributes: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceCandidateAttributes', - }, - RTCIceCandidateComplete: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceCandidateComplete', - }, - RTCIceCandidateDictionary: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceCandidateDictionary', - }, - RTCIceCandidateInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceCandidateInit', - }, - RTCIceCandidatePair: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceCandidatePair', - }, - RTCIceCandidatePairStats: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceCandidatePairStats', - }, - RTCIceGatherOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceGatherOptions', - }, - RTCIceParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceParameters', - }, - RTCIceServer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceServer', - }, - RTCIdentityProviderOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIdentityProviderOptions', - }, - RTCInboundRTPStreamStats: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCInboundRTPStreamStats', - }, - RTCLocalSessionDescriptionInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCLocalSessionDescriptionInit', - }, - RTCMediaStreamTrackStats: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCMediaStreamTrackStats', - }, - RTCOfferAnswerOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCOfferAnswerOptions', - }, - RTCOfferOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCOfferOptions', - }, - RTCOutboundRTPStreamStats: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCOutboundRTPStreamStats', - }, - RTCPeerConnectionIceErrorEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCPeerConnectionIceErrorEventInit', - }, - RTCPeerConnectionIceEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCPeerConnectionIceEventInit', - }, - RTCRTPStreamStats: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRTPStreamStats', - }, - RTCRtcpFeedback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtcpFeedback', - }, - RTCRtcpParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtcpParameters', - }, - RTCRtpCapabilities: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpCapabilities', - }, - RTCRtpCodecCapability: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpCodecCapability', - }, - RTCRtpCodecParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpCodecParameters', - }, - RTCRtpCodingParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpCodingParameters', - }, - RTCRtpContributingSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpContributingSource', - }, - RTCRtpEncodingParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpEncodingParameters', - }, - RTCRtpFecParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpFecParameters', - }, - RTCRtpHeaderExtension: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpHeaderExtension', - }, - RTCRtpHeaderExtensionCapability: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpHeaderExtensionCapability', - }, - RTCRtpHeaderExtensionParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpHeaderExtensionParameters', - }, - RTCRtpParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpParameters', - }, - RTCRtpReceiveParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpReceiveParameters', - }, - RTCRtpRtxParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpRtxParameters', - }, - RTCRtpSendParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpSendParameters', - }, - RTCRtpSynchronizationSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpSynchronizationSource', - }, - RTCRtpTransceiverInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpTransceiverInit', - }, - RTCRtpUnhandled: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpUnhandled', - }, - RTCSessionDescriptionInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCSessionDescriptionInit', - }, - RTCSrtpKeyParam: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCSrtpKeyParam', - }, - RTCSrtpSdesParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCSrtpSdesParameters', - }, - RTCSsrcRange: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCSsrcRange', - }, - RTCStats: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCStats', - }, - RTCStatsReport: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCStatsReport', - }, - RTCTrackEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCTrackEventInit', - }, - RTCTransportStats: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCTransportStats', - }, - ReadableStreamDefaultReadDoneResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableStreamDefaultReadDoneResult', - }, - ReadableStreamDefaultReadValueResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableStreamDefaultReadValueResult', - }, - ReadableWritablePair: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableWritablePair', - }, - RegistrationOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RegistrationOptions', - }, - RequestInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestInit', - }, - ResizeObserverOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ResizeObserverOptions', - }, - ResponseInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ResponseInit', - }, - RsaHashedImportParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaHashedImportParams', - }, - RsaHashedKeyAlgorithm: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaHashedKeyAlgorithm', - }, - RsaHashedKeyGenParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaHashedKeyGenParams', - }, - RsaKeyAlgorithm: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaKeyAlgorithm', - }, - RsaKeyGenParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaKeyGenParams', - }, - RsaOaepParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaOaepParams', - }, - RsaOtherPrimesInfo: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaOtherPrimesInfo', - }, - RsaPssParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaPssParams', - }, - SVGBoundingBoxOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGBoundingBoxOptions', - }, - ScrollIntoViewOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ScrollIntoViewOptions', - }, - ScrollOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ScrollOptions', - }, - ScrollToOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ScrollToOptions', - }, - SecurityPolicyViolationEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SecurityPolicyViolationEventInit', - }, - ShadowRootInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ShadowRootInit', - }, - ShareData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ShareData', - }, - SpeechRecognitionErrorEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SpeechRecognitionErrorEventInit', - }, - SpeechRecognitionEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SpeechRecognitionEventInit', - }, - SpeechSynthesisErrorEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SpeechSynthesisErrorEventInit', - }, - SpeechSynthesisEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SpeechSynthesisEventInit', - }, - StaticRangeInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'StaticRangeInit', - }, - StereoPannerOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'StereoPannerOptions', - }, - StorageEstimate: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'StorageEstimate', - }, - StorageEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'StorageEventInit', - }, - StoreExceptionsInformation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'StoreExceptionsInformation', - }, - StoreSiteSpecificExceptionsInformation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'StoreSiteSpecificExceptionsInformation', - }, - StreamPipeOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'StreamPipeOptions', - }, - TextDecodeOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextDecodeOptions', - }, - TextDecoderOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextDecoderOptions', - }, - TextEncoderEncodeIntoResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextEncoderEncodeIntoResult', - }, - TouchEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TouchEventInit', - }, - TouchInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TouchInit', - }, - TrackEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TrackEventInit', - }, - Transformer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Transformer', - }, - TransitionEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TransitionEventInit', - }, - UIEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UIEventInit', - }, - ULongRange: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ULongRange', - }, - UnderlyingSink: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSink', - }, - UnderlyingSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSource', - }, - VRDisplayEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VRDisplayEventInit', - }, - VRLayer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VRLayer', - }, - VRStageParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VRStageParameters', - }, - WaveShaperOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WaveShaperOptions', - }, - WebGLContextAttributes: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLContextAttributes', - }, - WebGLContextEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLContextEventInit', - }, - WheelEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WheelEventInit', - }, - WorkerOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WorkerOptions', - }, - WorkletOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WorkletOptions', - }, - EventListener: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventListener', - }, - XPathNSResolver: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'XPathNSResolver', - }, - ANGLE_instanced_arrays: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ANGLE_instanced_arrays', - }, - AbortController: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AbortController', - }, - AbortSignalEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AbortSignalEventMap', - }, - AbortSignal: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AbortSignal', - }, - AbstractRange: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AbstractRange', - }, - AbstractWorkerEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AbstractWorkerEventMap', - }, - AbstractWorker: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AbstractWorker', - }, - AesCfbParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesCfbParams', - }, - AesCmacParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesCmacParams', - }, - AnalyserNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AnalyserNode', - }, - Animatable: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Animatable', - }, - AnimationEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AnimationEventMap', - }, - Animation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Animation', - }, - AnimationEffect: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AnimationEffect', - }, - AnimationEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AnimationEvent', - }, - AnimationFrameProvider: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AnimationFrameProvider', - }, - AnimationPlaybackEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AnimationPlaybackEvent', - }, - AnimationTimeline: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AnimationTimeline', - }, - ApplicationCacheEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ApplicationCacheEventMap', - }, - ApplicationCache: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ApplicationCache', - }, - Attr: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Attr', - }, - AudioBuffer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AudioBuffer', - }, - AudioBufferSourceNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AudioBufferSourceNode', - }, - AudioContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AudioContext', - }, - AudioDestinationNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AudioDestinationNode', - }, - AudioListener: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AudioListener', - }, - AudioNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AudioNode', - }, - AudioParam: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AudioParam', - }, - AudioParamMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AudioParamMap', - }, - AudioProcessingEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AudioProcessingEvent', - }, - AudioScheduledSourceNodeEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioScheduledSourceNodeEventMap', - }, - AudioScheduledSourceNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AudioScheduledSourceNode', - }, - AudioWorklet: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AudioWorklet', - }, - AudioWorkletNodeEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioWorkletNodeEventMap', - }, - AudioWorkletNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AudioWorkletNode', - }, - AuthenticatorAssertionResponse: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AuthenticatorAssertionResponse', - }, - AuthenticatorAttestationResponse: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AuthenticatorAttestationResponse', - }, - AuthenticatorResponse: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AuthenticatorResponse', - }, - BarProp: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'BarProp', - }, - BaseAudioContextEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BaseAudioContextEventMap', - }, - BaseAudioContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'BaseAudioContext', - }, - BeforeUnloadEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'BeforeUnloadEvent', - }, - BhxBrowser: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'BhxBrowser', - }, - BiquadFilterNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'BiquadFilterNode', - }, - Blob: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Blob', - }, - Body: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Body', - }, - BroadcastChannelEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BroadcastChannelEventMap', - }, - BroadcastChannel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'BroadcastChannel', - }, - ByteLengthQueuingStrategy: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ByteLengthQueuingStrategy', - }, - CDATASection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CDATASection', - }, - CSSConditionRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSConditionRule', - }, - CSSFontFaceRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSFontFaceRule', - }, - CSSGroupingRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSGroupingRule', - }, - CSSImportRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSImportRule', - }, - CSSKeyframeRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSKeyframeRule', - }, - CSSKeyframesRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSKeyframesRule', - }, - CSSMediaRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSMediaRule', - }, - CSSNamespaceRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSNamespaceRule', - }, - CSSPageRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSPageRule', - }, - CSSRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSRule', - }, - CSSRuleList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSRuleList', - }, - CSSStyleDeclaration: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSStyleDeclaration', - }, - CSSStyleRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSStyleRule', - }, - CSSStyleSheet: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSStyleSheet', - }, - CSSSupportsRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSSSupportsRule', - }, - Cache: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Cache', - }, - CacheStorage: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CacheStorage', - }, - CanvasCompositing: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasCompositing', - }, - CanvasDrawImage: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasDrawImage', - }, - CanvasDrawPath: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasDrawPath', - }, - CanvasFillStrokeStyles: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasFillStrokeStyles', - }, - CanvasFilters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasFilters', - }, - CanvasGradient: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CanvasGradient', - }, - CanvasImageData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasImageData', - }, - CanvasImageSmoothing: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasImageSmoothing', - }, - CanvasPath: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasPath', - }, - CanvasPathDrawingStyles: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasPathDrawingStyles', - }, - CanvasPattern: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CanvasPattern', - }, - CanvasRect: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasRect', - }, - CanvasRenderingContext2D: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CanvasRenderingContext2D', - }, - CanvasShadowStyles: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasShadowStyles', - }, - CanvasState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasState', - }, - CanvasText: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasText', - }, - CanvasTextDrawingStyles: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasTextDrawingStyles', - }, - CanvasTransform: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasTransform', - }, - CanvasUserInterface: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasUserInterface', - }, - CaretPosition: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CaretPosition', - }, - ChannelMergerNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ChannelMergerNode', - }, - ChannelSplitterNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ChannelSplitterNode', - }, - CharacterData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CharacterData', - }, - ChildNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ChildNode', - }, - ClientRect: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ClientRect', - }, - ClientRectList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ClientRectList', - }, - Clipboard: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Clipboard', - }, - ClipboardEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ClipboardEvent', - }, - CloseEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CloseEvent', - }, - Comment: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Comment', - }, - CompositionEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CompositionEvent', - }, - ConcatParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConcatParams', - }, - ConstantSourceNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ConstantSourceNode', - }, - ConvolverNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ConvolverNode', - }, - CountQueuingStrategy: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CountQueuingStrategy', - }, - Credential: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Credential', - }, - CredentialsContainer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CredentialsContainer', - }, - Crypto: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Crypto', - }, - CryptoKey: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CryptoKey', - }, - CryptoKeyPair: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CryptoKeyPair', - }, - CustomElementRegistry: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CustomElementRegistry', - }, - CustomEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CustomEvent', - }, - DOMError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMError', - }, - DOMException: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMException', - }, - DOMImplementation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMImplementation', - }, - DOMMatrix: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMMatrix', - }, - SVGMatrix: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGMatrix', - }, - WebKitCSSMatrix: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebKitCSSMatrix', - }, - DOMMatrixReadOnly: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMMatrixReadOnly', - }, - DOMParser: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMParser', - }, - DOMPoint: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMPoint', - }, - SVGPoint: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPoint', - }, - DOMPointReadOnly: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMPointReadOnly', - }, - DOMQuad: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMQuad', - }, - DOMRect: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMRect', - }, - SVGRect: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGRect', - }, - DOMRectList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMRectList', - }, - DOMRectReadOnly: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMRectReadOnly', - }, - DOMSettableTokenList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMSettableTokenList', - }, - DOMStringList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMStringList', - }, - DOMStringMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMStringMap', - }, - DOMTokenList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMTokenList', - }, - DataCue: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DataCue', - }, - DataTransfer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DataTransfer', - }, - DataTransferItem: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DataTransferItem', - }, - DataTransferItemList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DataTransferItemList', - }, - DeferredPermissionRequest: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DeferredPermissionRequest', - }, - DelayNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DelayNode', - }, - DeviceAcceleration: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DeviceAcceleration', - }, - DeviceMotionEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DeviceMotionEvent', - }, - DeviceMotionEventAcceleration: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DeviceMotionEventAcceleration', - }, - DeviceMotionEventRotationRate: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DeviceMotionEventRotationRate', - }, - DeviceOrientationEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DeviceOrientationEvent', - }, - DeviceRotationRate: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DeviceRotationRate', - }, - DhImportKeyParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DhImportKeyParams', - }, - DhKeyAlgorithm: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DhKeyAlgorithm', - }, - DhKeyDeriveParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DhKeyDeriveParams', - }, - DhKeyGenParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DhKeyGenParams', - }, - DocumentEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DocumentEventMap', - }, - Document: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Document', - }, - DocumentAndElementEventHandlersEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DocumentAndElementEventHandlersEventMap', - }, - DocumentAndElementEventHandlers: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DocumentAndElementEventHandlers', - }, - DocumentEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DocumentEvent', - }, - DocumentFragment: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DocumentFragment', - }, - DocumentOrShadowRoot: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DocumentOrShadowRoot', - }, - DocumentTimeline: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DocumentTimeline', - }, - DocumentType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DocumentType', - }, - DragEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DragEvent', - }, - DynamicsCompressorNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DynamicsCompressorNode', - }, - EXT_blend_minmax: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EXT_blend_minmax', - }, - EXT_frag_depth: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EXT_frag_depth', - }, - EXT_sRGB: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EXT_sRGB', - }, - EXT_shader_texture_lod: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EXT_shader_texture_lod', - }, - EXT_texture_filter_anisotropic: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EXT_texture_filter_anisotropic', - }, - ElementEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ElementEventMap', - }, - Element: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Element', - }, - ElementCSSInlineStyle: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ElementCSSInlineStyle', - }, - ElementContentEditable: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ElementContentEditable', - }, - ErrorEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ErrorEvent', - }, - Event: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Event', - }, - EventListenerObject: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventListenerObject', - }, - EventSourceEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventSourceEventMap', - }, - EventSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'EventSource', - }, - EventTarget: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'EventTarget', - }, - ExtensionScriptApis: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ExtensionScriptApis', - }, - External: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'External', - }, - File: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'File', - }, - FileList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'FileList', - }, - FileReaderEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FileReaderEventMap', - }, - FileReader: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'FileReader', - }, - FocusEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'FocusEvent', - }, - FocusNavigationEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'FocusNavigationEvent', - }, - FormData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'FormData', - }, - GainNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'GainNode', - }, - Gamepad: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Gamepad', - }, - GamepadButton: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'GamepadButton', - }, - GamepadEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'GamepadEvent', - }, - GamepadHapticActuator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'GamepadHapticActuator', - }, - GamepadPose: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'GamepadPose', - }, - GenericTransformStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GenericTransformStream', - }, - Geolocation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Geolocation', - }, - GeolocationCoordinates: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'GeolocationCoordinates', - }, - GeolocationPosition: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'GeolocationPosition', - }, - GeolocationPositionError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'GeolocationPositionError', - }, - GlobalEventHandlersEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GlobalEventHandlersEventMap', - }, - GlobalEventHandlers: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GlobalEventHandlers', - }, - HTMLAllCollection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLAllCollection', - }, - HTMLAnchorElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLAnchorElement', - }, - HTMLAppletElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLAppletElement', - }, - HTMLAreaElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLAreaElement', - }, - HTMLAudioElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLAudioElement', - }, - HTMLBRElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLBRElement', - }, - HTMLBaseElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLBaseElement', - }, - HTMLBodyElementEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLBodyElementEventMap', - }, - HTMLBodyElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLBodyElement', - }, - HTMLButtonElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLButtonElement', - }, - HTMLCanvasElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLCanvasElement', - }, - HTMLCollectionBase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLCollectionBase', - }, - HTMLCollection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLCollection', - }, - HTMLCollectionOf: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLCollectionOf', - }, - HTMLDListElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLDListElement', - }, - HTMLDataElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLDataElement', - }, - HTMLDataListElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLDataListElement', - }, - HTMLDetailsElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLDetailsElement', - }, - HTMLDialogElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLDialogElement', - }, - HTMLDirectoryElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLDirectoryElement', - }, - HTMLDivElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLDivElement', - }, - HTMLDocument: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLDocument', - }, - HTMLElementEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLElementEventMap', - }, - HTMLElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLElement', - }, - HTMLEmbedElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLEmbedElement', - }, - HTMLFieldSetElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLFieldSetElement', - }, - HTMLFontElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLFontElement', - }, - HTMLFormControlsCollection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLFormControlsCollection', - }, - HTMLFormElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLFormElement', - }, - HTMLFrameElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLFrameElement', - }, - HTMLFrameSetElementEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLFrameSetElementEventMap', - }, - HTMLFrameSetElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLFrameSetElement', - }, - HTMLHRElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLHRElement', - }, - HTMLHeadElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLHeadElement', - }, - HTMLHeadingElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLHeadingElement', - }, - HTMLHtmlElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLHtmlElement', - }, - HTMLHyperlinkElementUtils: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLHyperlinkElementUtils', - }, - HTMLIFrameElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLIFrameElement', - }, - HTMLImageElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLImageElement', - }, - HTMLInputElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLInputElement', - }, - HTMLLIElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLLIElement', - }, - HTMLLabelElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLLabelElement', - }, - HTMLLegendElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLLegendElement', - }, - HTMLLinkElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLLinkElement', - }, - HTMLMapElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLMapElement', - }, - HTMLMarqueeElementEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLMarqueeElementEventMap', - }, - HTMLMarqueeElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLMarqueeElement', - }, - HTMLMediaElementEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLMediaElementEventMap', - }, - HTMLMediaElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLMediaElement', - }, - HTMLMenuElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLMenuElement', - }, - HTMLMetaElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLMetaElement', - }, - HTMLMeterElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLMeterElement', - }, - HTMLModElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLModElement', - }, - HTMLOListElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLOListElement', - }, - HTMLObjectElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLObjectElement', - }, - HTMLOptGroupElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLOptGroupElement', - }, - HTMLOptionElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLOptionElement', - }, - HTMLOptionsCollection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLOptionsCollection', - }, - HTMLOrSVGElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLOrSVGElement', - }, - HTMLOutputElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLOutputElement', - }, - HTMLParagraphElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLParagraphElement', - }, - HTMLParamElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLParamElement', - }, - HTMLPictureElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLPictureElement', - }, - HTMLPreElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLPreElement', - }, - HTMLProgressElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLProgressElement', - }, - HTMLQuoteElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLQuoteElement', - }, - HTMLScriptElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLScriptElement', - }, - HTMLSelectElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLSelectElement', - }, - HTMLSlotElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLSlotElement', - }, - HTMLSourceElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLSourceElement', - }, - HTMLSpanElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLSpanElement', - }, - HTMLStyleElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLStyleElement', - }, - HTMLTableCaptionElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLTableCaptionElement', - }, - HTMLTableCellElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLTableCellElement', - }, - HTMLTableColElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLTableColElement', - }, - HTMLTableDataCellElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLTableDataCellElement', - }, - HTMLTableElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLTableElement', - }, - HTMLTableHeaderCellElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLTableHeaderCellElement', - }, - HTMLTableRowElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLTableRowElement', - }, - HTMLTableSectionElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLTableSectionElement', - }, - HTMLTemplateElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLTemplateElement', - }, - HTMLTextAreaElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLTextAreaElement', - }, - HTMLTimeElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLTimeElement', - }, - HTMLTitleElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLTitleElement', - }, - HTMLTrackElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLTrackElement', - }, - HTMLUListElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLUListElement', - }, - HTMLUnknownElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLUnknownElement', - }, - HTMLVideoElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HTMLVideoElement', - }, - HashChangeEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'HashChangeEvent', - }, - Headers: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Headers', - }, - History: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'History', - }, - IDBArrayKey: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBArrayKey', - }, - IDBCursor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBCursor', - }, - IDBCursorWithValue: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBCursorWithValue', - }, - IDBDatabaseEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBDatabaseEventMap', - }, - IDBDatabase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBDatabase', - }, - IDBFactory: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBFactory', - }, - IDBIndex: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBIndex', - }, - IDBKeyRange: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBKeyRange', - }, - IDBObjectStore: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBObjectStore', - }, - IDBOpenDBRequestEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBOpenDBRequestEventMap', - }, - IDBOpenDBRequest: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBOpenDBRequest', - }, - IDBRequestEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBRequestEventMap', - }, - IDBRequest: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBRequest', - }, - IDBTransactionEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBTransactionEventMap', - }, - IDBTransaction: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBTransaction', - }, - IDBVersionChangeEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBVersionChangeEvent', - }, - IIRFilterNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IIRFilterNode', - }, - ImageBitmap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ImageBitmap', - }, - ImageBitmapRenderingContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ImageBitmapRenderingContext', - }, - ImageData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ImageData', - }, - InnerHTML: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'InnerHTML', - }, - InputDeviceInfo: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'InputDeviceInfo', - }, - InputEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'InputEvent', - }, - IntersectionObserver: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IntersectionObserver', - }, - IntersectionObserverEntry: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IntersectionObserverEntry', - }, - KeyboardEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'KeyboardEvent', - }, - KeyframeEffect: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'KeyframeEffect', - }, - LinkStyle: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'LinkStyle', - }, - ListeningStateChangedEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ListeningStateChangedEvent', - }, - Location: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Location', - }, - MSAssertion: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSAssertion', - }, - MSBlobBuilder: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSBlobBuilder', - }, - MSFIDOCredentialAssertion: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSFIDOCredentialAssertion', - }, - MSFIDOSignature: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSFIDOSignature', - }, - MSFIDOSignatureAssertion: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSFIDOSignatureAssertion', - }, - MSFileSaver: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MSFileSaver', - }, - MSGesture: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSGesture', - }, - MSGraphicsTrust: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSGraphicsTrust', - }, - MSInputMethodContextEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MSInputMethodContextEventMap', - }, - MSInputMethodContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSInputMethodContext', - }, - MSMediaKeyError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSMediaKeyError', - }, - MSMediaKeySession: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSMediaKeySession', - }, - MSMediaKeys: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSMediaKeys', - }, - MSNavigatorDoNotTrack: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MSNavigatorDoNotTrack', - }, - MSStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MSStream', - }, - MediaDeviceInfo: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaDeviceInfo', - }, - MediaDevicesEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaDevicesEventMap', - }, - MediaDevices: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaDevices', - }, - MediaElementAudioSourceNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaElementAudioSourceNode', - }, - MediaEncryptedEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaEncryptedEvent', - }, - MediaError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaError', - }, - MediaKeyMessageEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaKeyMessageEvent', - }, - MediaKeySessionEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaKeySessionEventMap', - }, - MediaKeySession: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaKeySession', - }, - MediaKeyStatusMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaKeyStatusMap', - }, - MediaKeySystemAccess: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaKeySystemAccess', - }, - MediaKeys: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaKeys', - }, - MediaList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaList', - }, - MediaQueryListEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaQueryListEventMap', - }, - MediaQueryList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaQueryList', - }, - MediaQueryListEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaQueryListEvent', - }, - MediaSourceEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaSourceEventMap', - }, - MediaSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaSource', - }, - MediaStreamEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaStreamEventMap', - }, - MediaStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaStream', - }, - MediaStreamAudioDestinationNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaStreamAudioDestinationNode', - }, - MediaStreamAudioSourceNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaStreamAudioSourceNode', - }, - MediaStreamError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaStreamError', - }, - MediaStreamErrorEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaStreamErrorEvent', - }, - MediaStreamEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaStreamEvent', - }, - MediaStreamTrackEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaStreamTrackEventMap', - }, - MediaStreamTrack: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaStreamTrack', - }, - MediaStreamTrackAudioSourceNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaStreamTrackAudioSourceNode', - }, - MediaStreamTrackEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MediaStreamTrackEvent', - }, - MessageChannel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MessageChannel', - }, - MessageEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MessageEvent', - }, - MessagePortEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MessagePortEventMap', - }, - MessagePort: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MessagePort', - }, - MimeType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MimeType', - }, - MimeTypeArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MimeTypeArray', - }, - MouseEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MouseEvent', - }, - MutationEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MutationEvent', - }, - MutationObserver: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MutationObserver', - }, - MutationRecord: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MutationRecord', - }, - NamedNodeMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'NamedNodeMap', - }, - NavigationPreloadManager: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'NavigationPreloadManager', - }, - Navigator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Navigator', - }, - NavigatorAutomationInformation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorAutomationInformation', - }, - NavigatorBeacon: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorBeacon', - }, - NavigatorConcurrentHardware: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorConcurrentHardware', - }, - NavigatorContentUtils: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorContentUtils', - }, - NavigatorCookies: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorCookies', - }, - NavigatorID: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorID', - }, - NavigatorLanguage: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorLanguage', - }, - NavigatorOnLine: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorOnLine', - }, - NavigatorPlugins: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorPlugins', - }, - NavigatorStorage: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorStorage', - }, - Node: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Node', - }, - NodeFilter: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'NodeFilter', - }, - NodeIterator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'NodeIterator', - }, - NodeList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'NodeList', - }, - NodeListOf: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NodeListOf', - }, - NonDocumentTypeChildNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NonDocumentTypeChildNode', - }, - NonElementParentNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NonElementParentNode', - }, - NotificationEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NotificationEventMap', - }, - Notification: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Notification', - }, - OES_element_index_uint: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_element_index_uint', - }, - OES_standard_derivatives: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_standard_derivatives', - }, - OES_texture_float: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_texture_float', - }, - OES_texture_float_linear: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_texture_float_linear', - }, - OES_texture_half_float: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_texture_half_float', - }, - OES_texture_half_float_linear: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_texture_half_float_linear', - }, - OES_vertex_array_object: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_vertex_array_object', - }, - OfflineAudioCompletionEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'OfflineAudioCompletionEvent', - }, - OfflineAudioContextEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OfflineAudioContextEventMap', - }, - OfflineAudioContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'OfflineAudioContext', - }, - OffscreenCanvas: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'OffscreenCanvas', - }, - OffscreenCanvasRenderingContext2D: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'OffscreenCanvasRenderingContext2D', - }, - OscillatorNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'OscillatorNode', - }, - OverconstrainedError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'OverconstrainedError', - }, - OverflowEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'OverflowEvent', - }, - PageTransitionEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PageTransitionEvent', - }, - PannerNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PannerNode', - }, - ParentNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ParentNode', - }, - Path2D: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Path2D', - }, - PaymentAddress: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PaymentAddress', - }, - PaymentMethodChangeEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PaymentMethodChangeEvent', - }, - PaymentRequestEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentRequestEventMap', - }, - PaymentRequest: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PaymentRequest', - }, - PaymentRequestUpdateEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PaymentRequestUpdateEvent', - }, - PaymentResponseEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentResponseEventMap', - }, - PaymentResponse: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PaymentResponse', - }, - PerfWidgetExternal: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerfWidgetExternal', - }, - PerformanceEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PerformanceEventMap', - }, - Performance: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Performance', - }, - PerformanceEntry: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceEntry', - }, - PerformanceMark: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceMark', - }, - PerformanceMeasure: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceMeasure', - }, - PerformanceNavigation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceNavigation', - }, - PerformanceNavigationTiming: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceNavigationTiming', - }, - PerformanceObserver: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceObserver', - }, - PerformanceObserverEntryList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceObserverEntryList', - }, - PerformanceResourceTiming: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceResourceTiming', - }, - PerformanceTiming: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceTiming', - }, - PeriodicWave: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PeriodicWave', - }, - PermissionRequest: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PermissionRequest', - }, - PermissionRequestedEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PermissionRequestedEvent', - }, - PermissionStatusEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PermissionStatusEventMap', - }, - PermissionStatus: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PermissionStatus', - }, - Permissions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Permissions', - }, - Plugin: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Plugin', - }, - PluginArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PluginArray', - }, - PointerEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PointerEvent', - }, - PopStateEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PopStateEvent', - }, - ProcessingInstruction: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ProcessingInstruction', - }, - ProgressEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ProgressEvent', - }, - PromiseRejectionEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PromiseRejectionEvent', - }, - PublicKeyCredential: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PublicKeyCredential', - }, - PushManager: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PushManager', - }, - PushSubscription: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PushSubscription', - }, - PushSubscriptionOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PushSubscriptionOptions', - }, - RTCCertificate: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCCertificate', - }, - RTCDTMFSenderEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDTMFSenderEventMap', - }, - RTCDTMFSender: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCDTMFSender', - }, - RTCDTMFToneChangeEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCDTMFToneChangeEvent', - }, - RTCDataChannelEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDataChannelEventMap', - }, - RTCDataChannel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCDataChannel', - }, - RTCDataChannelEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCDataChannelEvent', - }, - RTCDtlsTransportEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDtlsTransportEventMap', - }, - RTCDtlsTransport: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCDtlsTransport', - }, - RTCDtlsTransportStateChangedEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCDtlsTransportStateChangedEvent', - }, - RTCDtmfSenderEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDtmfSenderEventMap', - }, - RTCDtmfSender: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCDtmfSender', - }, - RTCError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCError', - }, - RTCErrorEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCErrorEvent', - }, - RTCIceCandidate: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCIceCandidate', - }, - RTCIceCandidatePairChangedEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCIceCandidatePairChangedEvent', - }, - RTCIceGathererEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceGathererEventMap', - }, - RTCIceGatherer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCIceGatherer', - }, - RTCIceGathererEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCIceGathererEvent', - }, - RTCIceTransportEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceTransportEventMap', - }, - RTCIceTransport: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCIceTransport', - }, - RTCIceTransportStateChangedEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCIceTransportStateChangedEvent', - }, - RTCIdentityAssertion: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCIdentityAssertion', - }, - RTCPeerConnectionEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCPeerConnectionEventMap', - }, - RTCPeerConnection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCPeerConnection', - }, - RTCPeerConnectionIceErrorEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCPeerConnectionIceErrorEvent', - }, - RTCPeerConnectionIceEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCPeerConnectionIceEvent', - }, - RTCRtpReceiver: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCRtpReceiver', - }, - RTCRtpSender: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCRtpSender', - }, - RTCRtpTransceiver: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCRtpTransceiver', - }, - RTCSctpTransportEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCSctpTransportEventMap', - }, - RTCSctpTransport: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCSctpTransport', - }, - RTCSessionDescription: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCSessionDescription', - }, - RTCSrtpSdesTransportEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCSrtpSdesTransportEventMap', - }, - RTCSrtpSdesTransport: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCSrtpSdesTransport', - }, - RTCSsrcConflictEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCSsrcConflictEvent', - }, - RTCStatsProvider: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCStatsProvider', - }, - RTCTrackEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RTCTrackEvent', - }, - RadioNodeList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RadioNodeList', - }, - RandomSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RandomSource', - }, - Range: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Range', - }, - ReadableStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ReadableStream', - }, - ReadableStreamDefaultController: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ReadableStreamDefaultController', - }, - ReadableStreamDefaultReader: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ReadableStreamDefaultReader', - }, - ReadableStreamGenericReader: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableStreamGenericReader', - }, - Request: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Request', - }, - ResizeObserver: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ResizeObserver', - }, - ResizeObserverEntry: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ResizeObserverEntry', - }, - ResizeObserverSize: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ResizeObserverSize', - }, - Response: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Response', - }, - SVGAElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAElement', - }, - SVGAngle: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAngle', - }, - SVGAnimateElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimateElement', - }, - SVGAnimateMotionElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimateMotionElement', - }, - SVGAnimateTransformElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimateTransformElement', - }, - SVGAnimatedAngle: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimatedAngle', - }, - SVGAnimatedBoolean: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimatedBoolean', - }, - SVGAnimatedEnumeration: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimatedEnumeration', - }, - SVGAnimatedInteger: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimatedInteger', - }, - SVGAnimatedLength: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimatedLength', - }, - SVGAnimatedLengthList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimatedLengthList', - }, - SVGAnimatedNumber: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimatedNumber', - }, - SVGAnimatedNumberList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimatedNumberList', - }, - SVGAnimatedPoints: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGAnimatedPoints', - }, - SVGAnimatedPreserveAspectRatio: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimatedPreserveAspectRatio', - }, - SVGAnimatedRect: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimatedRect', - }, - SVGAnimatedString: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimatedString', - }, - SVGAnimatedTransformList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimatedTransformList', - }, - SVGAnimationElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGAnimationElement', - }, - SVGCircleElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGCircleElement', - }, - SVGClipPathElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGClipPathElement', - }, - SVGComponentTransferFunctionElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGComponentTransferFunctionElement', - }, - SVGCursorElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGCursorElement', - }, - SVGDefsElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGDefsElement', - }, - SVGDescElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGDescElement', - }, - SVGElementEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGElementEventMap', - }, - SVGElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGElement', - }, - SVGElementInstance: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGElementInstance', - }, - SVGElementInstanceList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGElementInstanceList', - }, - SVGEllipseElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGEllipseElement', - }, - SVGFEBlendElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEBlendElement', - }, - SVGFEColorMatrixElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEColorMatrixElement', - }, - SVGFEComponentTransferElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEComponentTransferElement', - }, - SVGFECompositeElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFECompositeElement', - }, - SVGFEConvolveMatrixElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEConvolveMatrixElement', - }, - SVGFEDiffuseLightingElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEDiffuseLightingElement', - }, - SVGFEDisplacementMapElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEDisplacementMapElement', - }, - SVGFEDistantLightElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEDistantLightElement', - }, - SVGFEDropShadowElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEDropShadowElement', - }, - SVGFEFloodElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEFloodElement', - }, - SVGFEFuncAElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEFuncAElement', - }, - SVGFEFuncBElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEFuncBElement', - }, - SVGFEFuncGElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEFuncGElement', - }, - SVGFEFuncRElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEFuncRElement', - }, - SVGFEGaussianBlurElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEGaussianBlurElement', - }, - SVGFEImageElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEImageElement', - }, - SVGFEMergeElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEMergeElement', - }, - SVGFEMergeNodeElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEMergeNodeElement', - }, - SVGFEMorphologyElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEMorphologyElement', - }, - SVGFEOffsetElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEOffsetElement', - }, - SVGFEPointLightElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFEPointLightElement', - }, - SVGFESpecularLightingElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFESpecularLightingElement', - }, - SVGFESpotLightElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFESpotLightElement', - }, - SVGFETileElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFETileElement', - }, - SVGFETurbulenceElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFETurbulenceElement', - }, - SVGFilterElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGFilterElement', - }, - SVGFilterPrimitiveStandardAttributes: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGFilterPrimitiveStandardAttributes', - }, - SVGFitToViewBox: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGFitToViewBox', - }, - SVGForeignObjectElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGForeignObjectElement', - }, - SVGGElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGGElement', - }, - SVGGeometryElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGGeometryElement', - }, - SVGGradientElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGGradientElement', - }, - SVGGraphicsElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGGraphicsElement', - }, - SVGImageElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGImageElement', - }, - SVGLength: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGLength', - }, - SVGLengthList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGLengthList', - }, - SVGLineElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGLineElement', - }, - SVGLinearGradientElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGLinearGradientElement', - }, - SVGMarkerElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGMarkerElement', - }, - SVGMaskElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGMaskElement', - }, - SVGMetadataElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGMetadataElement', - }, - SVGNumber: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGNumber', - }, - SVGNumberList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGNumberList', - }, - SVGPathElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathElement', - }, - SVGPathSeg: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSeg', - }, - SVGPathSegArcAbs: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegArcAbs', - }, - SVGPathSegArcRel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegArcRel', - }, - SVGPathSegClosePath: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegClosePath', - }, - SVGPathSegCurvetoCubicAbs: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegCurvetoCubicAbs', - }, - SVGPathSegCurvetoCubicRel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegCurvetoCubicRel', - }, - SVGPathSegCurvetoCubicSmoothAbs: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegCurvetoCubicSmoothAbs', - }, - SVGPathSegCurvetoCubicSmoothRel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegCurvetoCubicSmoothRel', - }, - SVGPathSegCurvetoQuadraticAbs: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegCurvetoQuadraticAbs', - }, - SVGPathSegCurvetoQuadraticRel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegCurvetoQuadraticRel', - }, - SVGPathSegCurvetoQuadraticSmoothAbs: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegCurvetoQuadraticSmoothAbs', - }, - SVGPathSegCurvetoQuadraticSmoothRel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegCurvetoQuadraticSmoothRel', - }, - SVGPathSegLinetoAbs: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegLinetoAbs', - }, - SVGPathSegLinetoHorizontalAbs: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegLinetoHorizontalAbs', - }, - SVGPathSegLinetoHorizontalRel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegLinetoHorizontalRel', - }, - SVGPathSegLinetoRel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegLinetoRel', - }, - SVGPathSegLinetoVerticalAbs: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegLinetoVerticalAbs', - }, - SVGPathSegLinetoVerticalRel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegLinetoVerticalRel', - }, - SVGPathSegList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegList', - }, - SVGPathSegMovetoAbs: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegMovetoAbs', - }, - SVGPathSegMovetoRel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPathSegMovetoRel', - }, - SVGPatternElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPatternElement', - }, - SVGPointList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPointList', - }, - SVGPolygonElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPolygonElement', - }, - SVGPolylineElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPolylineElement', - }, - SVGPreserveAspectRatio: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGPreserveAspectRatio', - }, - SVGRadialGradientElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGRadialGradientElement', - }, - SVGRectElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGRectElement', - }, - SVGSVGElementEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGSVGElementEventMap', - }, - SVGSVGElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGSVGElement', - }, - SVGScriptElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGScriptElement', - }, - SVGStopElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGStopElement', - }, - SVGStringList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGStringList', - }, - SVGStyleElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGStyleElement', - }, - SVGSwitchElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGSwitchElement', - }, - SVGSymbolElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGSymbolElement', - }, - SVGTSpanElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGTSpanElement', - }, - SVGTests: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGTests', - }, - SVGTextContentElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGTextContentElement', - }, - SVGTextElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGTextElement', - }, - SVGTextPathElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGTextPathElement', - }, - SVGTextPositioningElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGTextPositioningElement', - }, - SVGTitleElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGTitleElement', - }, - SVGTransform: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGTransform', - }, - SVGTransformList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGTransformList', - }, - SVGURIReference: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGURIReference', - }, - SVGUnitTypes: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGUnitTypes', - }, - SVGUseElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGUseElement', - }, - SVGViewElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGViewElement', - }, - SVGZoomAndPan: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGZoomAndPan', - }, - SVGZoomEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SVGZoomEvent', - }, - Screen: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Screen', - }, - ScreenOrientationEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ScreenOrientationEventMap', - }, - ScreenOrientation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ScreenOrientation', - }, - ScriptProcessorNodeEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ScriptProcessorNodeEventMap', - }, - ScriptProcessorNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ScriptProcessorNode', - }, - SecurityPolicyViolationEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SecurityPolicyViolationEvent', - }, - Selection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Selection', - }, - ServiceUIFrameContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ServiceUIFrameContext', - }, - ServiceWorkerEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ServiceWorkerEventMap', - }, - ServiceWorker: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ServiceWorker', - }, - ServiceWorkerContainerEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ServiceWorkerContainerEventMap', - }, - ServiceWorkerContainer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ServiceWorkerContainer', - }, - ServiceWorkerRegistrationEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ServiceWorkerRegistrationEventMap', - }, - ServiceWorkerRegistration: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ServiceWorkerRegistration', - }, - ShadowRoot: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ShadowRoot', - }, - SharedWorker: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SharedWorker', - }, - Slottable: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Slottable', - }, - SourceBufferEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SourceBufferEventMap', - }, - SourceBuffer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SourceBuffer', - }, - SourceBufferListEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SourceBufferListEventMap', - }, - SourceBufferList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SourceBufferList', - }, - SpeechGrammar: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SpeechGrammar', - }, - SpeechGrammarList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SpeechGrammarList', - }, - SpeechRecognitionEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SpeechRecognitionEventMap', - }, - SpeechRecognition: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SpeechRecognition', - }, - SpeechRecognitionAlternative: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SpeechRecognitionAlternative', - }, - SpeechRecognitionErrorEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SpeechRecognitionErrorEvent', - }, - SpeechRecognitionEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SpeechRecognitionEvent', - }, - SpeechRecognitionResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SpeechRecognitionResult', - }, - SpeechRecognitionResultList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SpeechRecognitionResultList', - }, - SpeechSynthesisEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SpeechSynthesisEventMap', - }, - SpeechSynthesis: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SpeechSynthesis', - }, - SpeechSynthesisErrorEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SpeechSynthesisErrorEvent', - }, - SpeechSynthesisEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SpeechSynthesisEvent', - }, - SpeechSynthesisUtteranceEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SpeechSynthesisUtteranceEventMap', - }, - SpeechSynthesisUtterance: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SpeechSynthesisUtterance', - }, - SpeechSynthesisVoice: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SpeechSynthesisVoice', - }, - StaticRange: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'StaticRange', - }, - StereoPannerNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'StereoPannerNode', - }, - Storage: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Storage', - }, - StorageEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'StorageEvent', - }, - StorageManager: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'StorageManager', - }, - StyleMedia: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'StyleMedia', - }, - StyleSheet: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'StyleSheet', - }, - StyleSheetList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'StyleSheetList', - }, - SubtleCrypto: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SubtleCrypto', - }, - SyncManager: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SyncManager', - }, - Text: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Text', - }, - TextDecoder: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextDecoder', - }, - TextDecoderCommon: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextDecoderCommon', - }, - TextDecoderStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextDecoderStream', - }, - TextEncoder: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextEncoder', - }, - TextEncoderCommon: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextEncoderCommon', - }, - TextEncoderStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextEncoderStream', - }, - TextEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextEvent', - }, - TextMetrics: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextMetrics', - }, - TextTrackEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextTrackEventMap', - }, - TextTrack: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextTrack', - }, - TextTrackCueEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextTrackCueEventMap', - }, - TextTrackCue: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextTrackCue', - }, - TextTrackCueList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextTrackCueList', - }, - TextTrackListEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextTrackListEventMap', - }, - TextTrackList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextTrackList', - }, - TimeRanges: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TimeRanges', - }, - Touch: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Touch', - }, - TouchEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TouchEvent', - }, - TouchList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TouchList', - }, - TrackEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TrackEvent', - }, - TransformStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TransformStream', - }, - TransformStreamDefaultController: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TransformStreamDefaultController', - }, - TransitionEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TransitionEvent', - }, - TreeWalker: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TreeWalker', - }, - UIEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'UIEvent', - }, - URL: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'URL', - }, - webkitURL: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'webkitURL', - }, - URLSearchParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'URLSearchParams', - }, - VRDisplay: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'VRDisplay', - }, - VRDisplayCapabilities: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'VRDisplayCapabilities', - }, - VRDisplayEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'VRDisplayEvent', - }, - VREyeParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'VREyeParameters', - }, - VRFieldOfView: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'VRFieldOfView', - }, - VRFrameData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'VRFrameData', - }, - VRPose: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'VRPose', - }, - VTTCue: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'VTTCue', - }, - VTTRegion: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'VTTRegion', - }, - ValidityState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ValidityState', - }, - VideoPlaybackQuality: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'VideoPlaybackQuality', - }, - VisualViewportEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VisualViewportEventMap', - }, - VisualViewport: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'VisualViewport', - }, - WEBGL_color_buffer_float: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_color_buffer_float', - }, - WEBGL_compressed_texture_astc: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_compressed_texture_astc', - }, - WEBGL_compressed_texture_s3tc: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_compressed_texture_s3tc', - }, - WEBGL_compressed_texture_s3tc_srgb: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_compressed_texture_s3tc_srgb', - }, - WEBGL_debug_renderer_info: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_debug_renderer_info', - }, - WEBGL_debug_shaders: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_debug_shaders', - }, - WEBGL_depth_texture: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_depth_texture', - }, - WEBGL_draw_buffers: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_draw_buffers', - }, - WEBGL_lose_context: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_lose_context', - }, - WaveShaperNode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WaveShaperNode', - }, - WebGL2RenderingContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGL2RenderingContext', - }, - WebGL2RenderingContextBase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGL2RenderingContextBase', - }, - WebGL2RenderingContextOverloads: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGL2RenderingContextOverloads', - }, - WebGLActiveInfo: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLActiveInfo', - }, - WebGLBuffer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLBuffer', - }, - WebGLContextEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLContextEvent', - }, - WebGLFramebuffer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLFramebuffer', - }, - WebGLProgram: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLProgram', - }, - WebGLQuery: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLQuery', - }, - WebGLRenderbuffer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLRenderbuffer', - }, - WebGLRenderingContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLRenderingContext', - }, - WebGLRenderingContextBase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLRenderingContextBase', - }, - WebGLRenderingContextOverloads: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLRenderingContextOverloads', - }, - WebGLSampler: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLSampler', - }, - WebGLShader: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLShader', - }, - WebGLShaderPrecisionFormat: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLShaderPrecisionFormat', - }, - WebGLSync: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLSync', - }, - WebGLTexture: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLTexture', - }, - WebGLTransformFeedback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLTransformFeedback', - }, - WebGLUniformLocation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLUniformLocation', - }, - WebGLVertexArrayObject: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLVertexArrayObject', - }, - WebGLVertexArrayObjectOES: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLVertexArrayObjectOES', - }, - WebKitPoint: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebKitPoint', - }, - WebSocketEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebSocketEventMap', - }, - WebSocket: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebSocket', - }, - WheelEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WheelEvent', - }, - WindowEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WindowEventMap', - }, - Window: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Window', - }, - WindowEventHandlersEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WindowEventHandlersEventMap', - }, - WindowEventHandlers: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WindowEventHandlers', - }, - WindowLocalStorage: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WindowLocalStorage', - }, - WindowOrWorkerGlobalScope: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WindowOrWorkerGlobalScope', - }, - WindowSessionStorage: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WindowSessionStorage', - }, - WorkerEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WorkerEventMap', - }, - Worker: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Worker', - }, - Worklet: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Worklet', - }, - WritableStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WritableStream', - }, - WritableStreamDefaultController: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WritableStreamDefaultController', - }, - WritableStreamDefaultWriter: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WritableStreamDefaultWriter', - }, - XMLDocument: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'XMLDocument', - }, - XMLHttpRequestEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'XMLHttpRequestEventMap', - }, - XMLHttpRequest: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'XMLHttpRequest', - }, - XMLHttpRequestEventTargetEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'XMLHttpRequestEventTargetEventMap', - }, - XMLHttpRequestEventTarget: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'XMLHttpRequestEventTarget', - }, - XMLHttpRequestUpload: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'XMLHttpRequestUpload', - }, - XMLSerializer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'XMLSerializer', - }, - XPathEvaluator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'XPathEvaluator', - }, - XPathEvaluatorBase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'XPathEvaluatorBase', - }, - XPathExpression: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'XPathExpression', - }, - XPathResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'XPathResult', - }, - XSLTProcessor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'XSLTProcessor', - }, - webkitRTCPeerConnection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'webkitRTCPeerConnection', - }, - EventListenerOrEventListenerObject: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventListenerOrEventListenerObject', - }, - Console: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Console', - }, - CSS: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CSS', - }, - WebAssembly: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebAssembly', - }, - BlobCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BlobCallback', - }, - CustomElementConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CustomElementConstructor', - }, - DecodeErrorCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DecodeErrorCallback', - }, - DecodeSuccessCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DecodeSuccessCallback', - }, - EventHandlerNonNull: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventHandlerNonNull', - }, - ForEachCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ForEachCallback', - }, - FrameRequestCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FrameRequestCallback', - }, - FunctionStringCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FunctionStringCallback', - }, - IntersectionObserverCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IntersectionObserverCallback', - }, - MSLaunchUriCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MSLaunchUriCallback', - }, - MutationCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MutationCallback', - }, - NavigatorUserMediaErrorCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorUserMediaErrorCallback', - }, - NavigatorUserMediaSuccessCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorUserMediaSuccessCallback', - }, - NotificationPermissionCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NotificationPermissionCallback', - }, - OnBeforeUnloadEventHandlerNonNull: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OnBeforeUnloadEventHandlerNonNull', - }, - OnErrorEventHandlerNonNull: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OnErrorEventHandlerNonNull', - }, - PerformanceObserverCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PerformanceObserverCallback', - }, - PositionCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PositionCallback', - }, - PositionErrorCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PositionErrorCallback', - }, - QueuingStrategySize: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'QueuingStrategySize', - }, - RTCPeerConnectionErrorCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCPeerConnectionErrorCallback', - }, - RTCSessionDescriptionCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCSessionDescriptionCallback', - }, - RTCStatsCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCStatsCallback', - }, - ResizeObserverCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ResizeObserverCallback', - }, - TransformerFlushCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TransformerFlushCallback', - }, - TransformerStartCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TransformerStartCallback', - }, - TransformerTransformCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TransformerTransformCallback', - }, - UnderlyingSinkAbortCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSinkAbortCallback', - }, - UnderlyingSinkCloseCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSinkCloseCallback', - }, - UnderlyingSinkStartCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSinkStartCallback', - }, - UnderlyingSinkWriteCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSinkWriteCallback', - }, - UnderlyingSourceCancelCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSourceCancelCallback', - }, - UnderlyingSourcePullCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSourcePullCallback', - }, - UnderlyingSourceStartCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSourceStartCallback', - }, - VoidFunction: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VoidFunction', - }, - HTMLElementTagNameMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLElementTagNameMap', - }, - HTMLElementDeprecatedTagNameMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLElementDeprecatedTagNameMap', - }, - SVGElementTagNameMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SVGElementTagNameMap', - }, - ElementTagNameMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ElementTagNameMap', - }, - HeadersInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HeadersInit', - }, - BodyInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BodyInit', - }, - RequestInfo: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestInfo', - }, - BlobPart: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BlobPart', - }, - DOMHighResTimeStamp: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMHighResTimeStamp', - }, - RenderingContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RenderingContext', - }, - HTMLOrSVGImageElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLOrSVGImageElement', - }, - CanvasImageSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasImageSource', - }, - OffscreenRenderingContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OffscreenRenderingContext', - }, - MessageEventSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MessageEventSource', - }, - HTMLOrSVGScriptElement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HTMLOrSVGScriptElement', - }, - ImageBitmapSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImageBitmapSource', - }, - MediaProvider: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaProvider', - }, - OnErrorEventHandler: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OnErrorEventHandler', - }, - OnBeforeUnloadEventHandler: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OnBeforeUnloadEventHandler', - }, - TimerHandler: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TimerHandler', - }, - ConstrainULong: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConstrainULong', - }, - ConstrainDouble: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConstrainDouble', - }, - ConstrainBoolean: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConstrainBoolean', - }, - ConstrainDOMString: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConstrainDOMString', - }, - PerformanceEntryList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PerformanceEntryList', - }, - ReadableStreamReader: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableStreamReader', - }, - ReadableStreamController: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableStreamController', - }, - VibratePattern: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VibratePattern', - }, - COSEAlgorithmIdentifier: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'COSEAlgorithmIdentifier', - }, - UvmEntry: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UvmEntry', - }, - UvmEntries: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UvmEntries', - }, - AlgorithmIdentifier: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AlgorithmIdentifier', - }, - HashAlgorithmIdentifier: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HashAlgorithmIdentifier', - }, - BigInteger: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BigInteger', - }, - NamedCurve: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NamedCurve', - }, - GLenum: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLenum', - }, - GLboolean: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLboolean', - }, - GLbitfield: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLbitfield', - }, - GLint: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLint', - }, - GLsizei: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLsizei', - }, - GLintptr: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLintptr', - }, - GLsizeiptr: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLsizeiptr', - }, - GLuint: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLuint', - }, - GLfloat: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLfloat', - }, - GLclampf: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLclampf', - }, - TexImageSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TexImageSource', - }, - Float32List: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float32List', - }, - Int32List: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int32List', - }, - GLint64: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLint64', - }, - GLuint64: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLuint64', - }, - Uint32List: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint32List', - }, - BufferSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BufferSource', - }, - DOMTimeStamp: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMTimeStamp', - }, - LineAndPositionSetting: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'LineAndPositionSetting', - }, - FormDataEntryValue: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FormDataEntryValue', - }, - InsertPosition: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'InsertPosition', - }, - IDBValidKey: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBValidKey', - }, - MutationRecordType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MutationRecordType', - }, - IDBKeyPath: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBKeyPath', - }, - Transferable: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Transferable', - }, - RTCIceGatherCandidate: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceGatherCandidate', - }, - RTCTransport: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCTransport', - }, - MouseWheelEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MouseWheelEvent', - }, - WindowProxy: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WindowProxy', - }, - ReadableStreamDefaultReadResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableStreamDefaultReadResult', - }, - AlignSetting: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AlignSetting', - }, - AnimationPlayState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AnimationPlayState', - }, - AppendMode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AppendMode', - }, - AttestationConveyancePreference: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AttestationConveyancePreference', - }, - AudioContextLatencyCategory: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioContextLatencyCategory', - }, - AudioContextState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AudioContextState', - }, - AuthenticatorAttachment: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AuthenticatorAttachment', - }, - AuthenticatorTransport: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AuthenticatorTransport', - }, - AutoKeyword: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AutoKeyword', - }, - AutomationRate: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AutomationRate', - }, - BinaryType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BinaryType', - }, - BiquadFilterType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BiquadFilterType', - }, - CanPlayTypeResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanPlayTypeResult', - }, - CanvasDirection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasDirection', - }, - CanvasFillRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasFillRule', - }, - CanvasLineCap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasLineCap', - }, - CanvasLineJoin: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasLineJoin', - }, - CanvasTextAlign: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasTextAlign', - }, - CanvasTextBaseline: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasTextBaseline', - }, - ChannelCountMode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ChannelCountMode', - }, - ChannelInterpretation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ChannelInterpretation', - }, - ClientTypes: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ClientTypes', - }, - ColorSpaceConversion: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ColorSpaceConversion', - }, - CompositeOperation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CompositeOperation', - }, - CompositeOperationOrAuto: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CompositeOperationOrAuto', - }, - CredentialMediationRequirement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CredentialMediationRequirement', - }, - DOMParserSupportedType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMParserSupportedType', - }, - DirectionSetting: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DirectionSetting', - }, - DisplayCaptureSurfaceType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DisplayCaptureSurfaceType', - }, - DistanceModelType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DistanceModelType', - }, - DocumentReadyState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DocumentReadyState', - }, - EndOfStreamError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EndOfStreamError', - }, - EndingType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EndingType', - }, - FillMode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FillMode', - }, - FullscreenNavigationUI: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FullscreenNavigationUI', - }, - GamepadHand: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GamepadHand', - }, - GamepadHapticActuatorType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GamepadHapticActuatorType', - }, - GamepadMappingType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GamepadMappingType', - }, - IDBCursorDirection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBCursorDirection', - }, - IDBRequestReadyState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBRequestReadyState', - }, - IDBTransactionMode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBTransactionMode', - }, - ImageOrientation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImageOrientation', - }, - ImageSmoothingQuality: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImageSmoothingQuality', - }, - IterationCompositeOperation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IterationCompositeOperation', - }, - KeyFormat: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'KeyFormat', - }, - KeyType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'KeyType', - }, - KeyUsage: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'KeyUsage', - }, - LineAlignSetting: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'LineAlignSetting', - }, - ListeningState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ListeningState', - }, - MSCredentialType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MSCredentialType', - }, - MSTransportType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MSTransportType', - }, - MSWebViewPermissionState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MSWebViewPermissionState', - }, - MSWebViewPermissionType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MSWebViewPermissionType', - }, - MediaDeviceKind: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaDeviceKind', - }, - MediaKeyMessageType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaKeyMessageType', - }, - MediaKeySessionType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaKeySessionType', - }, - MediaKeyStatus: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaKeyStatus', - }, - MediaKeysRequirement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaKeysRequirement', - }, - MediaStreamTrackState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MediaStreamTrackState', - }, - NavigationReason: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigationReason', - }, - NavigationType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigationType', - }, - NotificationDirection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NotificationDirection', - }, - NotificationPermission: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NotificationPermission', - }, - OffscreenRenderingContextId: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OffscreenRenderingContextId', - }, - OrientationLockType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OrientationLockType', - }, - OrientationType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OrientationType', - }, - OscillatorType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OscillatorType', - }, - OverSampleType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OverSampleType', - }, - PanningModelType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PanningModelType', - }, - PaymentComplete: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentComplete', - }, - PaymentShippingType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PaymentShippingType', - }, - PermissionName: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PermissionName', - }, - PermissionState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PermissionState', - }, - PlaybackDirection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PlaybackDirection', - }, - PositionAlignSetting: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PositionAlignSetting', - }, - PremultiplyAlpha: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PremultiplyAlpha', - }, - PublicKeyCredentialType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PublicKeyCredentialType', - }, - PushEncryptionKeyName: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PushEncryptionKeyName', - }, - PushPermissionState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PushPermissionState', - }, - RTCBundlePolicy: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCBundlePolicy', - }, - RTCDataChannelState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDataChannelState', - }, - RTCDtlsRole: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDtlsRole', - }, - RTCDtlsTransportState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCDtlsTransportState', - }, - RTCErrorDetailType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCErrorDetailType', - }, - RTCIceCandidateType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceCandidateType', - }, - RTCIceComponent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceComponent', - }, - RTCIceConnectionState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceConnectionState', - }, - RTCIceCredentialType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceCredentialType', - }, - RTCIceGatherPolicy: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceGatherPolicy', - }, - RTCIceGathererState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceGathererState', - }, - RTCIceGatheringState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceGatheringState', - }, - RTCIceProtocol: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceProtocol', - }, - RTCIceRole: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceRole', - }, - RTCIceTcpCandidateType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceTcpCandidateType', - }, - RTCIceTransportPolicy: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceTransportPolicy', - }, - RTCIceTransportState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCIceTransportState', - }, - RTCPeerConnectionState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCPeerConnectionState', - }, - RTCRtcpMuxPolicy: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtcpMuxPolicy', - }, - RTCRtpTransceiverDirection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCRtpTransceiverDirection', - }, - RTCSctpTransportState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCSctpTransportState', - }, - RTCSdpType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCSdpType', - }, - RTCSignalingState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCSignalingState', - }, - RTCStatsIceCandidatePairState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCStatsIceCandidatePairState', - }, - RTCStatsIceCandidateType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCStatsIceCandidateType', - }, - RTCStatsType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RTCStatsType', - }, - ReadyState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadyState', - }, - ReferrerPolicy: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReferrerPolicy', - }, - RequestCache: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestCache', - }, - RequestCredentials: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestCredentials', - }, - RequestDestination: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestDestination', - }, - RequestMode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestMode', - }, - RequestRedirect: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestRedirect', - }, - ResidentKeyRequirement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ResidentKeyRequirement', - }, - ResizeObserverBoxOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ResizeObserverBoxOptions', - }, - ResizeQuality: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ResizeQuality', - }, - ResponseType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ResponseType', - }, - ScrollBehavior: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ScrollBehavior', - }, - ScrollLogicalPosition: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ScrollLogicalPosition', - }, - ScrollRestoration: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ScrollRestoration', - }, - ScrollSetting: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ScrollSetting', - }, - SelectionMode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SelectionMode', - }, - ServiceWorkerState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ServiceWorkerState', - }, - ServiceWorkerUpdateViaCache: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ServiceWorkerUpdateViaCache', - }, - ShadowRootMode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ShadowRootMode', - }, - SpeechRecognitionErrorCode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SpeechRecognitionErrorCode', - }, - SpeechSynthesisErrorCode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SpeechSynthesisErrorCode', - }, - TextTrackKind: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextTrackKind', - }, - TextTrackMode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextTrackMode', - }, - TouchType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TouchType', - }, - UserVerificationRequirement: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UserVerificationRequirement', - }, - VRDisplayEventReason: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VRDisplayEventReason', - }, - VideoFacingModeEnum: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VideoFacingModeEnum', - }, - VisibilityState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VisibilityState', - }, - WebGLPowerPreference: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLPowerPreference', - }, - WorkerType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WorkerType', - }, - XMLHttpRequestResponseType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'XMLHttpRequestResponseType', - }, + AddEventListenerOptions: TYPE, + AddressErrors: TYPE, + AesCbcParams: TYPE, + AesCtrParams: TYPE, + AesDerivedKeyParams: TYPE, + AesGcmParams: TYPE, + AesKeyAlgorithm: TYPE, + AesKeyGenParams: TYPE, + Algorithm: TYPE, + AnalyserOptions: TYPE, + AnimationEventInit: TYPE, + AnimationPlaybackEventInit: TYPE, + AssignedNodesOptions: TYPE, + AudioBufferOptions: TYPE, + AudioBufferSourceOptions: TYPE, + AudioContextInfo: TYPE, + AudioContextOptions: TYPE, + AudioNodeOptions: TYPE, + AudioParamDescriptor: TYPE, + AudioProcessingEventInit: TYPE, + AudioTimestamp: TYPE, + AudioWorkletNodeOptions: TYPE, + AuthenticationExtensionsClientInputs: TYPE, + AuthenticationExtensionsClientOutputs: TYPE, + AuthenticatorSelectionCriteria: TYPE, + BiquadFilterOptions: TYPE, + BlobPropertyBag: TYPE, + ByteLengthChunk: TYPE, + CacheQueryOptions: TYPE, + CanvasRenderingContext2DSettings: TYPE, + ChannelMergerOptions: TYPE, + ChannelSplitterOptions: TYPE, + ClientQueryOptions: TYPE, + ClipboardEventInit: TYPE, + CloseEventInit: TYPE, + CompositionEventInit: TYPE, + ComputedEffectTiming: TYPE, + ComputedKeyframe: TYPE, + ConfirmSiteSpecificExceptionsInformation: TYPE, + ConstantSourceOptions: TYPE, + ConstrainBooleanParameters: TYPE, + ConstrainDOMStringParameters: TYPE, + ConstrainDoubleRange: TYPE, + ConstrainULongRange: TYPE, + ConstrainVideoFacingModeParameters: TYPE, + ConvolverOptions: TYPE, + CredentialCreationOptions: TYPE, + CredentialPropertiesOutput: TYPE, + CredentialRequestOptions: TYPE, + CustomEventInit: TYPE, + DOMMatrix2DInit: TYPE, + DOMMatrixInit: TYPE, + DOMPointInit: TYPE, + DOMQuadInit: TYPE, + DOMRectInit: TYPE, + DelayOptions: TYPE, + DeviceMotionEventAccelerationInit: TYPE, + DeviceMotionEventInit: TYPE, + DeviceMotionEventRotationRateInit: TYPE, + DeviceOrientationEventInit: TYPE, + DevicePermissionDescriptor: TYPE, + DocumentTimelineOptions: TYPE, + DoubleRange: TYPE, + DragEventInit: TYPE, + DynamicsCompressorOptions: TYPE, + EcKeyAlgorithm: TYPE, + EcKeyGenParams: TYPE, + EcKeyImportParams: TYPE, + EcdhKeyDeriveParams: TYPE, + EcdsaParams: TYPE, + EffectTiming: TYPE, + ElementCreationOptions: TYPE, + ElementDefinitionOptions: TYPE, + ErrorEventInit: TYPE, + EventInit: TYPE, + EventListenerOptions: TYPE, + EventModifierInit: TYPE, + EventSourceInit: TYPE, + ExceptionInformation: TYPE, + FilePropertyBag: TYPE, + FocusEventInit: TYPE, + FocusNavigationEventInit: TYPE, + FocusNavigationOrigin: TYPE, + FocusOptions: TYPE, + FullscreenOptions: TYPE, + GainOptions: TYPE, + GamepadEventInit: TYPE, + GetNotificationOptions: TYPE, + GetRootNodeOptions: TYPE, + HashChangeEventInit: TYPE, + HkdfParams: TYPE, + HmacImportParams: TYPE, + HmacKeyAlgorithm: TYPE, + HmacKeyGenParams: TYPE, + IDBIndexParameters: TYPE, + IDBObjectStoreParameters: TYPE, + IDBVersionChangeEventInit: TYPE, + IIRFilterOptions: TYPE, + ImageBitmapOptions: TYPE, + ImageBitmapRenderingContextSettings: TYPE, + ImageEncodeOptions: TYPE, + ImportMeta: TYPE, + InputEventInit: TYPE, + IntersectionObserverEntryInit: TYPE, + IntersectionObserverInit: TYPE, + JsonWebKey: TYPE, + KeyAlgorithm: TYPE, + KeyboardEventInit: TYPE, + Keyframe: TYPE, + KeyframeAnimationOptions: TYPE, + KeyframeEffectOptions: TYPE, + MediaElementAudioSourceOptions: TYPE, + MediaEncryptedEventInit: TYPE, + MediaKeyMessageEventInit: TYPE, + MediaKeySystemConfiguration: TYPE, + MediaKeySystemMediaCapability: TYPE, + MediaQueryListEventInit: TYPE, + MediaStreamAudioSourceOptions: TYPE, + MediaStreamConstraints: TYPE, + MediaStreamErrorEventInit: TYPE, + MediaStreamEventInit: TYPE, + MediaStreamTrackAudioSourceOptions: TYPE, + MediaStreamTrackEventInit: TYPE, + MediaTrackCapabilities: TYPE, + MediaTrackConstraintSet: TYPE, + MediaTrackConstraints: TYPE, + MediaTrackSettings: TYPE, + MediaTrackSupportedConstraints: TYPE, + MessageEventInit: TYPE, + MidiPermissionDescriptor: TYPE, + MouseEventInit: TYPE, + MultiCacheQueryOptions: TYPE, + MutationObserverInit: TYPE, + NavigationPreloadState: TYPE, + NotificationAction: TYPE, + NotificationOptions: TYPE, + OfflineAudioCompletionEventInit: TYPE, + OfflineAudioContextOptions: TYPE, + OptionalEffectTiming: TYPE, + OscillatorOptions: TYPE, + PageTransitionEventInit: TYPE, + PannerOptions: TYPE, + PayerErrors: TYPE, + PaymentCurrencyAmount: TYPE, + PaymentDetailsBase: TYPE, + PaymentDetailsInit: TYPE, + PaymentDetailsModifier: TYPE, + PaymentDetailsUpdate: TYPE, + PaymentItem: TYPE, + PaymentMethodChangeEventInit: TYPE, + PaymentMethodData: TYPE, + PaymentOptions: TYPE, + PaymentRequestUpdateEventInit: TYPE, + PaymentShippingOption: TYPE, + PaymentValidationErrors: TYPE, + Pbkdf2Params: TYPE, + PerformanceObserverInit: TYPE, + PeriodicWaveConstraints: TYPE, + PeriodicWaveOptions: TYPE, + PermissionDescriptor: TYPE, + PointerEventInit: TYPE, + PopStateEventInit: TYPE, + PositionOptions: TYPE, + PostMessageOptions: TYPE, + ProgressEventInit: TYPE, + PromiseRejectionEventInit: TYPE, + PropertyIndexedKeyframes: TYPE, + PublicKeyCredentialCreationOptions: TYPE, + PublicKeyCredentialDescriptor: TYPE, + PublicKeyCredentialEntity: TYPE, + PublicKeyCredentialParameters: TYPE, + PublicKeyCredentialRequestOptions: TYPE, + PublicKeyCredentialRpEntity: TYPE, + PublicKeyCredentialUserEntity: TYPE, + PushPermissionDescriptor: TYPE, + PushSubscriptionJSON: TYPE, + PushSubscriptionOptionsInit: TYPE, + QueuingStrategy: TYPE, + QueuingStrategyInit: TYPE, + RTCAnswerOptions: TYPE, + RTCCertificateExpiration: TYPE, + RTCConfiguration: TYPE, + RTCDTMFToneChangeEventInit: TYPE, + RTCDataChannelEventInit: TYPE, + RTCDataChannelInit: TYPE, + RTCDtlsFingerprint: TYPE, + RTCDtlsParameters: TYPE, + RTCErrorEventInit: TYPE, + RTCErrorInit: TYPE, + RTCIceCandidateAttributes: TYPE, + RTCIceCandidateComplete: TYPE, + RTCIceCandidateDictionary: TYPE, + RTCIceCandidateInit: TYPE, + RTCIceCandidatePair: TYPE, + RTCIceCandidatePairStats: TYPE, + RTCIceGatherOptions: TYPE, + RTCIceParameters: TYPE, + RTCIceServer: TYPE, + RTCIdentityProviderOptions: TYPE, + RTCInboundRTPStreamStats: TYPE, + RTCLocalSessionDescriptionInit: TYPE, + RTCMediaStreamTrackStats: TYPE, + RTCOfferAnswerOptions: TYPE, + RTCOfferOptions: TYPE, + RTCOutboundRTPStreamStats: TYPE, + RTCPeerConnectionIceErrorEventInit: TYPE, + RTCPeerConnectionIceEventInit: TYPE, + RTCRTPStreamStats: TYPE, + RTCRtcpFeedback: TYPE, + RTCRtcpParameters: TYPE, + RTCRtpCapabilities: TYPE, + RTCRtpCodecCapability: TYPE, + RTCRtpCodecParameters: TYPE, + RTCRtpCodingParameters: TYPE, + RTCRtpContributingSource: TYPE, + RTCRtpEncodingParameters: TYPE, + RTCRtpFecParameters: TYPE, + RTCRtpHeaderExtension: TYPE, + RTCRtpHeaderExtensionCapability: TYPE, + RTCRtpHeaderExtensionParameters: TYPE, + RTCRtpParameters: TYPE, + RTCRtpReceiveParameters: TYPE, + RTCRtpRtxParameters: TYPE, + RTCRtpSendParameters: TYPE, + RTCRtpSynchronizationSource: TYPE, + RTCRtpTransceiverInit: TYPE, + RTCRtpUnhandled: TYPE, + RTCSessionDescriptionInit: TYPE, + RTCSrtpKeyParam: TYPE, + RTCSrtpSdesParameters: TYPE, + RTCSsrcRange: TYPE, + RTCStats: TYPE, + RTCStatsReport: TYPE_VALUE, + RTCTrackEventInit: TYPE, + RTCTransportStats: TYPE, + ReadableStreamDefaultReadDoneResult: TYPE, + ReadableStreamDefaultReadValueResult: TYPE, + ReadableWritablePair: TYPE, + RegistrationOptions: TYPE, + RequestInit: TYPE, + ResizeObserverOptions: TYPE, + ResponseInit: TYPE, + RsaHashedImportParams: TYPE, + RsaHashedKeyAlgorithm: TYPE, + RsaHashedKeyGenParams: TYPE, + RsaKeyAlgorithm: TYPE, + RsaKeyGenParams: TYPE, + RsaOaepParams: TYPE, + RsaOtherPrimesInfo: TYPE, + RsaPssParams: TYPE, + SVGBoundingBoxOptions: TYPE, + ScrollIntoViewOptions: TYPE, + ScrollOptions: TYPE, + ScrollToOptions: TYPE, + SecurityPolicyViolationEventInit: TYPE, + ShadowRootInit: TYPE, + ShareData: TYPE, + SpeechRecognitionErrorEventInit: TYPE, + SpeechRecognitionEventInit: TYPE, + SpeechSynthesisErrorEventInit: TYPE, + SpeechSynthesisEventInit: TYPE, + StaticRangeInit: TYPE, + StereoPannerOptions: TYPE, + StorageEstimate: TYPE, + StorageEventInit: TYPE, + StoreExceptionsInformation: TYPE, + StoreSiteSpecificExceptionsInformation: TYPE, + StreamPipeOptions: TYPE, + TextDecodeOptions: TYPE, + TextDecoderOptions: TYPE, + TextEncoderEncodeIntoResult: TYPE, + TouchEventInit: TYPE, + TouchInit: TYPE, + TrackEventInit: TYPE, + Transformer: TYPE, + TransitionEventInit: TYPE, + UIEventInit: TYPE, + ULongRange: TYPE, + UnderlyingSink: TYPE, + UnderlyingSource: TYPE, + VRDisplayEventInit: TYPE, + VRLayer: TYPE, + VRStageParameters: TYPE, + WaveShaperOptions: TYPE, + WebGLContextAttributes: TYPE, + WebGLContextEventInit: TYPE, + WheelEventInit: TYPE, + WorkerOptions: TYPE, + WorkletOptions: TYPE, + EventListener: TYPE, + XPathNSResolver: TYPE, + ANGLE_instanced_arrays: TYPE, + AbortController: TYPE_VALUE, + AbortSignalEventMap: TYPE, + AbortSignal: TYPE_VALUE, + AbstractRange: TYPE_VALUE, + AbstractWorkerEventMap: TYPE, + AbstractWorker: TYPE, + AesCfbParams: TYPE, + AesCmacParams: TYPE, + AnalyserNode: TYPE_VALUE, + Animatable: TYPE, + AnimationEventMap: TYPE, + Animation: TYPE_VALUE, + AnimationEffect: TYPE_VALUE, + AnimationEvent: TYPE_VALUE, + AnimationFrameProvider: TYPE, + AnimationPlaybackEvent: TYPE_VALUE, + AnimationTimeline: TYPE_VALUE, + ApplicationCacheEventMap: TYPE, + ApplicationCache: TYPE_VALUE, + Attr: TYPE_VALUE, + AudioBuffer: TYPE_VALUE, + AudioBufferSourceNode: TYPE_VALUE, + AudioContext: TYPE_VALUE, + AudioDestinationNode: TYPE_VALUE, + AudioListener: TYPE_VALUE, + AudioNode: TYPE_VALUE, + AudioParam: TYPE_VALUE, + AudioParamMap: TYPE_VALUE, + AudioProcessingEvent: TYPE_VALUE, + AudioScheduledSourceNodeEventMap: TYPE, + AudioScheduledSourceNode: TYPE_VALUE, + AudioWorklet: TYPE_VALUE, + AudioWorkletNodeEventMap: TYPE, + AudioWorkletNode: TYPE_VALUE, + AuthenticatorAssertionResponse: TYPE_VALUE, + AuthenticatorAttestationResponse: TYPE_VALUE, + AuthenticatorResponse: TYPE_VALUE, + BarProp: TYPE_VALUE, + BaseAudioContextEventMap: TYPE, + BaseAudioContext: TYPE_VALUE, + BeforeUnloadEvent: TYPE_VALUE, + BhxBrowser: TYPE_VALUE, + BiquadFilterNode: TYPE_VALUE, + Blob: TYPE_VALUE, + Body: TYPE, + BroadcastChannelEventMap: TYPE, + BroadcastChannel: TYPE_VALUE, + ByteLengthQueuingStrategy: TYPE_VALUE, + CDATASection: TYPE_VALUE, + CSSConditionRule: TYPE_VALUE, + CSSFontFaceRule: TYPE_VALUE, + CSSGroupingRule: TYPE_VALUE, + CSSImportRule: TYPE_VALUE, + CSSKeyframeRule: TYPE_VALUE, + CSSKeyframesRule: TYPE_VALUE, + CSSMediaRule: TYPE_VALUE, + CSSNamespaceRule: TYPE_VALUE, + CSSPageRule: TYPE_VALUE, + CSSRule: TYPE_VALUE, + CSSRuleList: TYPE_VALUE, + CSSStyleDeclaration: TYPE_VALUE, + CSSStyleRule: TYPE_VALUE, + CSSStyleSheet: TYPE_VALUE, + CSSSupportsRule: TYPE_VALUE, + Cache: TYPE_VALUE, + CacheStorage: TYPE_VALUE, + CanvasCompositing: TYPE, + CanvasDrawImage: TYPE, + CanvasDrawPath: TYPE, + CanvasFillStrokeStyles: TYPE, + CanvasFilters: TYPE, + CanvasGradient: TYPE_VALUE, + CanvasImageData: TYPE, + CanvasImageSmoothing: TYPE, + CanvasPath: TYPE, + CanvasPathDrawingStyles: TYPE, + CanvasPattern: TYPE_VALUE, + CanvasRect: TYPE, + CanvasRenderingContext2D: TYPE_VALUE, + CanvasShadowStyles: TYPE, + CanvasState: TYPE, + CanvasText: TYPE, + CanvasTextDrawingStyles: TYPE, + CanvasTransform: TYPE, + CanvasUserInterface: TYPE, + CaretPosition: TYPE_VALUE, + ChannelMergerNode: TYPE_VALUE, + ChannelSplitterNode: TYPE_VALUE, + CharacterData: TYPE_VALUE, + ChildNode: TYPE, + ClientRect: TYPE_VALUE, + ClientRectList: TYPE_VALUE, + Clipboard: TYPE_VALUE, + ClipboardEvent: TYPE_VALUE, + CloseEvent: TYPE_VALUE, + Comment: TYPE_VALUE, + CompositionEvent: TYPE_VALUE, + ConcatParams: TYPE, + ConstantSourceNode: TYPE_VALUE, + ConvolverNode: TYPE_VALUE, + CountQueuingStrategy: TYPE_VALUE, + Credential: TYPE_VALUE, + CredentialsContainer: TYPE_VALUE, + Crypto: TYPE_VALUE, + CryptoKey: TYPE_VALUE, + CryptoKeyPair: TYPE_VALUE, + CustomElementRegistry: TYPE_VALUE, + CustomEvent: TYPE_VALUE, + DOMError: TYPE_VALUE, + DOMException: TYPE_VALUE, + DOMImplementation: TYPE_VALUE, + DOMMatrix: TYPE_VALUE, + SVGMatrix: TYPE_VALUE, + WebKitCSSMatrix: TYPE_VALUE, + DOMMatrixReadOnly: TYPE_VALUE, + DOMParser: TYPE_VALUE, + DOMPoint: TYPE_VALUE, + SVGPoint: TYPE_VALUE, + DOMPointReadOnly: TYPE_VALUE, + DOMQuad: TYPE_VALUE, + DOMRect: TYPE_VALUE, + SVGRect: TYPE_VALUE, + DOMRectList: TYPE_VALUE, + DOMRectReadOnly: TYPE_VALUE, + DOMSettableTokenList: TYPE_VALUE, + DOMStringList: TYPE_VALUE, + DOMStringMap: TYPE_VALUE, + DOMTokenList: TYPE_VALUE, + DataCue: TYPE_VALUE, + DataTransfer: TYPE_VALUE, + DataTransferItem: TYPE_VALUE, + DataTransferItemList: TYPE_VALUE, + DeferredPermissionRequest: TYPE_VALUE, + DelayNode: TYPE_VALUE, + DeviceAcceleration: TYPE_VALUE, + DeviceMotionEvent: TYPE_VALUE, + DeviceMotionEventAcceleration: TYPE, + DeviceMotionEventRotationRate: TYPE, + DeviceOrientationEvent: TYPE_VALUE, + DeviceRotationRate: TYPE_VALUE, + DhImportKeyParams: TYPE, + DhKeyAlgorithm: TYPE, + DhKeyDeriveParams: TYPE, + DhKeyGenParams: TYPE, + DocumentEventMap: TYPE, + Document: TYPE_VALUE, + DocumentAndElementEventHandlersEventMap: TYPE, + DocumentAndElementEventHandlers: TYPE, + DocumentEvent: TYPE, + DocumentFragment: TYPE_VALUE, + DocumentOrShadowRoot: TYPE, + DocumentTimeline: TYPE_VALUE, + DocumentType: TYPE_VALUE, + DragEvent: TYPE_VALUE, + DynamicsCompressorNode: TYPE_VALUE, + EXT_blend_minmax: TYPE, + EXT_frag_depth: TYPE, + EXT_sRGB: TYPE, + EXT_shader_texture_lod: TYPE, + EXT_texture_filter_anisotropic: TYPE, + ElementEventMap: TYPE, + Element: TYPE_VALUE, + ElementCSSInlineStyle: TYPE, + ElementContentEditable: TYPE, + ErrorEvent: TYPE_VALUE, + Event: TYPE_VALUE, + EventListenerObject: TYPE, + EventSourceEventMap: TYPE, + EventSource: TYPE_VALUE, + EventTarget: TYPE_VALUE, + ExtensionScriptApis: TYPE_VALUE, + External: TYPE_VALUE, + File: TYPE_VALUE, + FileList: TYPE_VALUE, + FileReaderEventMap: TYPE, + FileReader: TYPE_VALUE, + FocusEvent: TYPE_VALUE, + FocusNavigationEvent: TYPE_VALUE, + FormData: TYPE_VALUE, + GainNode: TYPE_VALUE, + Gamepad: TYPE_VALUE, + GamepadButton: TYPE_VALUE, + GamepadEvent: TYPE_VALUE, + GamepadHapticActuator: TYPE_VALUE, + GamepadPose: TYPE_VALUE, + GenericTransformStream: TYPE, + Geolocation: TYPE_VALUE, + GeolocationCoordinates: TYPE_VALUE, + GeolocationPosition: TYPE_VALUE, + GeolocationPositionError: TYPE_VALUE, + GlobalEventHandlersEventMap: TYPE, + GlobalEventHandlers: TYPE, + HTMLAllCollection: TYPE_VALUE, + HTMLAnchorElement: TYPE_VALUE, + HTMLAppletElement: TYPE_VALUE, + HTMLAreaElement: TYPE_VALUE, + HTMLAudioElement: TYPE_VALUE, + HTMLBRElement: TYPE_VALUE, + HTMLBaseElement: TYPE_VALUE, + HTMLBodyElementEventMap: TYPE, + HTMLBodyElement: TYPE_VALUE, + HTMLButtonElement: TYPE_VALUE, + HTMLCanvasElement: TYPE_VALUE, + HTMLCollectionBase: TYPE, + HTMLCollection: TYPE_VALUE, + HTMLCollectionOf: TYPE, + HTMLDListElement: TYPE_VALUE, + HTMLDataElement: TYPE_VALUE, + HTMLDataListElement: TYPE_VALUE, + HTMLDetailsElement: TYPE_VALUE, + HTMLDialogElement: TYPE_VALUE, + HTMLDirectoryElement: TYPE_VALUE, + HTMLDivElement: TYPE_VALUE, + HTMLDocument: TYPE_VALUE, + HTMLElementEventMap: TYPE, + HTMLElement: TYPE_VALUE, + HTMLEmbedElement: TYPE_VALUE, + HTMLFieldSetElement: TYPE_VALUE, + HTMLFontElement: TYPE_VALUE, + HTMLFormControlsCollection: TYPE_VALUE, + HTMLFormElement: TYPE_VALUE, + HTMLFrameElement: TYPE_VALUE, + HTMLFrameSetElementEventMap: TYPE, + HTMLFrameSetElement: TYPE_VALUE, + HTMLHRElement: TYPE_VALUE, + HTMLHeadElement: TYPE_VALUE, + HTMLHeadingElement: TYPE_VALUE, + HTMLHtmlElement: TYPE_VALUE, + HTMLHyperlinkElementUtils: TYPE, + HTMLIFrameElement: TYPE_VALUE, + HTMLImageElement: TYPE_VALUE, + HTMLInputElement: TYPE_VALUE, + HTMLLIElement: TYPE_VALUE, + HTMLLabelElement: TYPE_VALUE, + HTMLLegendElement: TYPE_VALUE, + HTMLLinkElement: TYPE_VALUE, + HTMLMapElement: TYPE_VALUE, + HTMLMarqueeElementEventMap: TYPE, + HTMLMarqueeElement: TYPE_VALUE, + HTMLMediaElementEventMap: TYPE, + HTMLMediaElement: TYPE_VALUE, + HTMLMenuElement: TYPE_VALUE, + HTMLMetaElement: TYPE_VALUE, + HTMLMeterElement: TYPE_VALUE, + HTMLModElement: TYPE_VALUE, + HTMLOListElement: TYPE_VALUE, + HTMLObjectElement: TYPE_VALUE, + HTMLOptGroupElement: TYPE_VALUE, + HTMLOptionElement: TYPE_VALUE, + HTMLOptionsCollection: TYPE_VALUE, + HTMLOrSVGElement: TYPE, + HTMLOutputElement: TYPE_VALUE, + HTMLParagraphElement: TYPE_VALUE, + HTMLParamElement: TYPE_VALUE, + HTMLPictureElement: TYPE_VALUE, + HTMLPreElement: TYPE_VALUE, + HTMLProgressElement: TYPE_VALUE, + HTMLQuoteElement: TYPE_VALUE, + HTMLScriptElement: TYPE_VALUE, + HTMLSelectElement: TYPE_VALUE, + HTMLSlotElement: TYPE_VALUE, + HTMLSourceElement: TYPE_VALUE, + HTMLSpanElement: TYPE_VALUE, + HTMLStyleElement: TYPE_VALUE, + HTMLTableCaptionElement: TYPE_VALUE, + HTMLTableCellElement: TYPE_VALUE, + HTMLTableColElement: TYPE_VALUE, + HTMLTableDataCellElement: TYPE_VALUE, + HTMLTableElement: TYPE_VALUE, + HTMLTableHeaderCellElement: TYPE_VALUE, + HTMLTableRowElement: TYPE_VALUE, + HTMLTableSectionElement: TYPE_VALUE, + HTMLTemplateElement: TYPE_VALUE, + HTMLTextAreaElement: TYPE_VALUE, + HTMLTimeElement: TYPE_VALUE, + HTMLTitleElement: TYPE_VALUE, + HTMLTrackElement: TYPE_VALUE, + HTMLUListElement: TYPE_VALUE, + HTMLUnknownElement: TYPE_VALUE, + HTMLVideoElement: TYPE_VALUE, + HashChangeEvent: TYPE_VALUE, + Headers: TYPE_VALUE, + History: TYPE_VALUE, + IDBArrayKey: TYPE, + IDBCursor: TYPE_VALUE, + IDBCursorWithValue: TYPE_VALUE, + IDBDatabaseEventMap: TYPE, + IDBDatabase: TYPE_VALUE, + IDBFactory: TYPE_VALUE, + IDBIndex: TYPE_VALUE, + IDBKeyRange: TYPE_VALUE, + IDBObjectStore: TYPE_VALUE, + IDBOpenDBRequestEventMap: TYPE, + IDBOpenDBRequest: TYPE_VALUE, + IDBRequestEventMap: TYPE, + IDBRequest: TYPE_VALUE, + IDBTransactionEventMap: TYPE, + IDBTransaction: TYPE_VALUE, + IDBVersionChangeEvent: TYPE_VALUE, + IIRFilterNode: TYPE_VALUE, + ImageBitmap: TYPE_VALUE, + ImageBitmapRenderingContext: TYPE_VALUE, + ImageData: TYPE_VALUE, + InnerHTML: TYPE, + InputDeviceInfo: TYPE_VALUE, + InputEvent: TYPE_VALUE, + IntersectionObserver: TYPE_VALUE, + IntersectionObserverEntry: TYPE_VALUE, + KeyboardEvent: TYPE_VALUE, + KeyframeEffect: TYPE_VALUE, + LinkStyle: TYPE, + ListeningStateChangedEvent: TYPE_VALUE, + Location: TYPE_VALUE, + MSAssertion: TYPE_VALUE, + MSBlobBuilder: TYPE_VALUE, + MSFIDOCredentialAssertion: TYPE_VALUE, + MSFIDOSignature: TYPE_VALUE, + MSFIDOSignatureAssertion: TYPE_VALUE, + MSFileSaver: TYPE, + MSGesture: TYPE_VALUE, + MSGraphicsTrust: TYPE_VALUE, + MSInputMethodContextEventMap: TYPE, + MSInputMethodContext: TYPE_VALUE, + MSMediaKeyError: TYPE_VALUE, + MSMediaKeySession: TYPE_VALUE, + MSMediaKeys: TYPE_VALUE, + MSNavigatorDoNotTrack: TYPE, + MSStream: TYPE_VALUE, + MediaDeviceInfo: TYPE_VALUE, + MediaDevicesEventMap: TYPE, + MediaDevices: TYPE_VALUE, + MediaElementAudioSourceNode: TYPE_VALUE, + MediaEncryptedEvent: TYPE_VALUE, + MediaError: TYPE_VALUE, + MediaKeyMessageEvent: TYPE_VALUE, + MediaKeySessionEventMap: TYPE, + MediaKeySession: TYPE_VALUE, + MediaKeyStatusMap: TYPE_VALUE, + MediaKeySystemAccess: TYPE_VALUE, + MediaKeys: TYPE_VALUE, + MediaList: TYPE_VALUE, + MediaQueryListEventMap: TYPE, + MediaQueryList: TYPE_VALUE, + MediaQueryListEvent: TYPE_VALUE, + MediaSourceEventMap: TYPE, + MediaSource: TYPE_VALUE, + MediaStreamEventMap: TYPE, + MediaStream: TYPE_VALUE, + MediaStreamAudioDestinationNode: TYPE_VALUE, + MediaStreamAudioSourceNode: TYPE_VALUE, + MediaStreamError: TYPE_VALUE, + MediaStreamErrorEvent: TYPE_VALUE, + MediaStreamEvent: TYPE_VALUE, + MediaStreamTrackEventMap: TYPE, + MediaStreamTrack: TYPE_VALUE, + MediaStreamTrackAudioSourceNode: TYPE_VALUE, + MediaStreamTrackEvent: TYPE_VALUE, + MessageChannel: TYPE_VALUE, + MessageEvent: TYPE_VALUE, + MessagePortEventMap: TYPE, + MessagePort: TYPE_VALUE, + MimeType: TYPE_VALUE, + MimeTypeArray: TYPE_VALUE, + MouseEvent: TYPE_VALUE, + MutationEvent: TYPE_VALUE, + MutationObserver: TYPE_VALUE, + MutationRecord: TYPE_VALUE, + NamedNodeMap: TYPE_VALUE, + NavigationPreloadManager: TYPE_VALUE, + Navigator: TYPE_VALUE, + NavigatorAutomationInformation: TYPE, + NavigatorBeacon: TYPE, + NavigatorConcurrentHardware: TYPE, + NavigatorContentUtils: TYPE, + NavigatorCookies: TYPE, + NavigatorID: TYPE, + NavigatorLanguage: TYPE, + NavigatorOnLine: TYPE, + NavigatorPlugins: TYPE, + NavigatorStorage: TYPE, + Node: TYPE_VALUE, + NodeFilter: TYPE_VALUE, + NodeIterator: TYPE_VALUE, + NodeList: TYPE_VALUE, + NodeListOf: TYPE, + NonDocumentTypeChildNode: TYPE, + NonElementParentNode: TYPE, + NotificationEventMap: TYPE, + Notification: TYPE_VALUE, + OES_element_index_uint: TYPE, + OES_standard_derivatives: TYPE, + OES_texture_float: TYPE, + OES_texture_float_linear: TYPE, + OES_texture_half_float: TYPE, + OES_texture_half_float_linear: TYPE, + OES_vertex_array_object: TYPE, + OfflineAudioCompletionEvent: TYPE_VALUE, + OfflineAudioContextEventMap: TYPE, + OfflineAudioContext: TYPE_VALUE, + OffscreenCanvas: TYPE_VALUE, + OffscreenCanvasRenderingContext2D: TYPE_VALUE, + OscillatorNode: TYPE_VALUE, + OverconstrainedError: TYPE_VALUE, + OverflowEvent: TYPE_VALUE, + PageTransitionEvent: TYPE_VALUE, + PannerNode: TYPE_VALUE, + ParentNode: TYPE, + Path2D: TYPE_VALUE, + PaymentAddress: TYPE_VALUE, + PaymentMethodChangeEvent: TYPE_VALUE, + PaymentRequestEventMap: TYPE, + PaymentRequest: TYPE_VALUE, + PaymentRequestUpdateEvent: TYPE_VALUE, + PaymentResponseEventMap: TYPE, + PaymentResponse: TYPE_VALUE, + PerfWidgetExternal: TYPE_VALUE, + PerformanceEventMap: TYPE, + Performance: TYPE_VALUE, + PerformanceEntry: TYPE_VALUE, + PerformanceMark: TYPE_VALUE, + PerformanceMeasure: TYPE_VALUE, + PerformanceNavigation: TYPE_VALUE, + PerformanceNavigationTiming: TYPE_VALUE, + PerformanceObserver: TYPE_VALUE, + PerformanceObserverEntryList: TYPE_VALUE, + PerformanceResourceTiming: TYPE_VALUE, + PerformanceTiming: TYPE_VALUE, + PeriodicWave: TYPE_VALUE, + PermissionRequest: TYPE_VALUE, + PermissionRequestedEvent: TYPE_VALUE, + PermissionStatusEventMap: TYPE, + PermissionStatus: TYPE_VALUE, + Permissions: TYPE_VALUE, + Plugin: TYPE_VALUE, + PluginArray: TYPE_VALUE, + PointerEvent: TYPE_VALUE, + PopStateEvent: TYPE_VALUE, + ProcessingInstruction: TYPE_VALUE, + ProgressEvent: TYPE_VALUE, + PromiseRejectionEvent: TYPE_VALUE, + PublicKeyCredential: TYPE_VALUE, + PushManager: TYPE_VALUE, + PushSubscription: TYPE_VALUE, + PushSubscriptionOptions: TYPE_VALUE, + RTCCertificate: TYPE_VALUE, + RTCDTMFSenderEventMap: TYPE, + RTCDTMFSender: TYPE_VALUE, + RTCDTMFToneChangeEvent: TYPE_VALUE, + RTCDataChannelEventMap: TYPE, + RTCDataChannel: TYPE_VALUE, + RTCDataChannelEvent: TYPE_VALUE, + RTCDtlsTransportEventMap: TYPE, + RTCDtlsTransport: TYPE_VALUE, + RTCDtlsTransportStateChangedEvent: TYPE_VALUE, + RTCDtmfSenderEventMap: TYPE, + RTCDtmfSender: TYPE_VALUE, + RTCError: TYPE_VALUE, + RTCErrorEvent: TYPE_VALUE, + RTCIceCandidate: TYPE_VALUE, + RTCIceCandidatePairChangedEvent: TYPE_VALUE, + RTCIceGathererEventMap: TYPE, + RTCIceGatherer: TYPE_VALUE, + RTCIceGathererEvent: TYPE_VALUE, + RTCIceTransportEventMap: TYPE, + RTCIceTransport: TYPE_VALUE, + RTCIceTransportStateChangedEvent: TYPE_VALUE, + RTCIdentityAssertion: TYPE_VALUE, + RTCPeerConnectionEventMap: TYPE, + RTCPeerConnection: TYPE_VALUE, + RTCPeerConnectionIceErrorEvent: TYPE_VALUE, + RTCPeerConnectionIceEvent: TYPE_VALUE, + RTCRtpReceiver: TYPE_VALUE, + RTCRtpSender: TYPE_VALUE, + RTCRtpTransceiver: TYPE_VALUE, + RTCSctpTransportEventMap: TYPE, + RTCSctpTransport: TYPE_VALUE, + RTCSessionDescription: TYPE_VALUE, + RTCSrtpSdesTransportEventMap: TYPE, + RTCSrtpSdesTransport: TYPE_VALUE, + RTCSsrcConflictEvent: TYPE_VALUE, + RTCStatsProvider: TYPE_VALUE, + RTCTrackEvent: TYPE_VALUE, + RadioNodeList: TYPE_VALUE, + RandomSource: TYPE_VALUE, + Range: TYPE_VALUE, + ReadableStream: TYPE_VALUE, + ReadableStreamDefaultController: TYPE_VALUE, + ReadableStreamDefaultReader: TYPE_VALUE, + ReadableStreamGenericReader: TYPE, + Request: TYPE_VALUE, + ResizeObserver: TYPE_VALUE, + ResizeObserverEntry: TYPE_VALUE, + ResizeObserverSize: TYPE_VALUE, + Response: TYPE_VALUE, + SVGAElement: TYPE_VALUE, + SVGAngle: TYPE_VALUE, + SVGAnimateElement: TYPE_VALUE, + SVGAnimateMotionElement: TYPE_VALUE, + SVGAnimateTransformElement: TYPE_VALUE, + SVGAnimatedAngle: TYPE_VALUE, + SVGAnimatedBoolean: TYPE_VALUE, + SVGAnimatedEnumeration: TYPE_VALUE, + SVGAnimatedInteger: TYPE_VALUE, + SVGAnimatedLength: TYPE_VALUE, + SVGAnimatedLengthList: TYPE_VALUE, + SVGAnimatedNumber: TYPE_VALUE, + SVGAnimatedNumberList: TYPE_VALUE, + SVGAnimatedPoints: TYPE, + SVGAnimatedPreserveAspectRatio: TYPE_VALUE, + SVGAnimatedRect: TYPE_VALUE, + SVGAnimatedString: TYPE_VALUE, + SVGAnimatedTransformList: TYPE_VALUE, + SVGAnimationElement: TYPE_VALUE, + SVGCircleElement: TYPE_VALUE, + SVGClipPathElement: TYPE_VALUE, + SVGComponentTransferFunctionElement: TYPE_VALUE, + SVGCursorElement: TYPE_VALUE, + SVGDefsElement: TYPE_VALUE, + SVGDescElement: TYPE_VALUE, + SVGElementEventMap: TYPE, + SVGElement: TYPE_VALUE, + SVGElementInstance: TYPE_VALUE, + SVGElementInstanceList: TYPE_VALUE, + SVGEllipseElement: TYPE_VALUE, + SVGFEBlendElement: TYPE_VALUE, + SVGFEColorMatrixElement: TYPE_VALUE, + SVGFEComponentTransferElement: TYPE_VALUE, + SVGFECompositeElement: TYPE_VALUE, + SVGFEConvolveMatrixElement: TYPE_VALUE, + SVGFEDiffuseLightingElement: TYPE_VALUE, + SVGFEDisplacementMapElement: TYPE_VALUE, + SVGFEDistantLightElement: TYPE_VALUE, + SVGFEDropShadowElement: TYPE_VALUE, + SVGFEFloodElement: TYPE_VALUE, + SVGFEFuncAElement: TYPE_VALUE, + SVGFEFuncBElement: TYPE_VALUE, + SVGFEFuncGElement: TYPE_VALUE, + SVGFEFuncRElement: TYPE_VALUE, + SVGFEGaussianBlurElement: TYPE_VALUE, + SVGFEImageElement: TYPE_VALUE, + SVGFEMergeElement: TYPE_VALUE, + SVGFEMergeNodeElement: TYPE_VALUE, + SVGFEMorphologyElement: TYPE_VALUE, + SVGFEOffsetElement: TYPE_VALUE, + SVGFEPointLightElement: TYPE_VALUE, + SVGFESpecularLightingElement: TYPE_VALUE, + SVGFESpotLightElement: TYPE_VALUE, + SVGFETileElement: TYPE_VALUE, + SVGFETurbulenceElement: TYPE_VALUE, + SVGFilterElement: TYPE_VALUE, + SVGFilterPrimitiveStandardAttributes: TYPE, + SVGFitToViewBox: TYPE, + SVGForeignObjectElement: TYPE_VALUE, + SVGGElement: TYPE_VALUE, + SVGGeometryElement: TYPE_VALUE, + SVGGradientElement: TYPE_VALUE, + SVGGraphicsElement: TYPE_VALUE, + SVGImageElement: TYPE_VALUE, + SVGLength: TYPE_VALUE, + SVGLengthList: TYPE_VALUE, + SVGLineElement: TYPE_VALUE, + SVGLinearGradientElement: TYPE_VALUE, + SVGMarkerElement: TYPE_VALUE, + SVGMaskElement: TYPE_VALUE, + SVGMetadataElement: TYPE_VALUE, + SVGNumber: TYPE_VALUE, + SVGNumberList: TYPE_VALUE, + SVGPathElement: TYPE_VALUE, + SVGPathSeg: TYPE_VALUE, + SVGPathSegArcAbs: TYPE_VALUE, + SVGPathSegArcRel: TYPE_VALUE, + SVGPathSegClosePath: TYPE_VALUE, + SVGPathSegCurvetoCubicAbs: TYPE_VALUE, + SVGPathSegCurvetoCubicRel: TYPE_VALUE, + SVGPathSegCurvetoCubicSmoothAbs: TYPE_VALUE, + SVGPathSegCurvetoCubicSmoothRel: TYPE_VALUE, + SVGPathSegCurvetoQuadraticAbs: TYPE_VALUE, + SVGPathSegCurvetoQuadraticRel: TYPE_VALUE, + SVGPathSegCurvetoQuadraticSmoothAbs: TYPE_VALUE, + SVGPathSegCurvetoQuadraticSmoothRel: TYPE_VALUE, + SVGPathSegLinetoAbs: TYPE_VALUE, + SVGPathSegLinetoHorizontalAbs: TYPE_VALUE, + SVGPathSegLinetoHorizontalRel: TYPE_VALUE, + SVGPathSegLinetoRel: TYPE_VALUE, + SVGPathSegLinetoVerticalAbs: TYPE_VALUE, + SVGPathSegLinetoVerticalRel: TYPE_VALUE, + SVGPathSegList: TYPE_VALUE, + SVGPathSegMovetoAbs: TYPE_VALUE, + SVGPathSegMovetoRel: TYPE_VALUE, + SVGPatternElement: TYPE_VALUE, + SVGPointList: TYPE_VALUE, + SVGPolygonElement: TYPE_VALUE, + SVGPolylineElement: TYPE_VALUE, + SVGPreserveAspectRatio: TYPE_VALUE, + SVGRadialGradientElement: TYPE_VALUE, + SVGRectElement: TYPE_VALUE, + SVGSVGElementEventMap: TYPE, + SVGSVGElement: TYPE_VALUE, + SVGScriptElement: TYPE_VALUE, + SVGStopElement: TYPE_VALUE, + SVGStringList: TYPE_VALUE, + SVGStyleElement: TYPE_VALUE, + SVGSwitchElement: TYPE_VALUE, + SVGSymbolElement: TYPE_VALUE, + SVGTSpanElement: TYPE_VALUE, + SVGTests: TYPE, + SVGTextContentElement: TYPE_VALUE, + SVGTextElement: TYPE_VALUE, + SVGTextPathElement: TYPE_VALUE, + SVGTextPositioningElement: TYPE_VALUE, + SVGTitleElement: TYPE_VALUE, + SVGTransform: TYPE_VALUE, + SVGTransformList: TYPE_VALUE, + SVGURIReference: TYPE, + SVGUnitTypes: TYPE_VALUE, + SVGUseElement: TYPE_VALUE, + SVGViewElement: TYPE_VALUE, + SVGZoomAndPan: TYPE, + SVGZoomEvent: TYPE_VALUE, + Screen: TYPE_VALUE, + ScreenOrientationEventMap: TYPE, + ScreenOrientation: TYPE_VALUE, + ScriptProcessorNodeEventMap: TYPE, + ScriptProcessorNode: TYPE_VALUE, + SecurityPolicyViolationEvent: TYPE_VALUE, + Selection: TYPE_VALUE, + ServiceUIFrameContext: TYPE_VALUE, + ServiceWorkerEventMap: TYPE, + ServiceWorker: TYPE_VALUE, + ServiceWorkerContainerEventMap: TYPE, + ServiceWorkerContainer: TYPE_VALUE, + ServiceWorkerRegistrationEventMap: TYPE, + ServiceWorkerRegistration: TYPE_VALUE, + ShadowRoot: TYPE_VALUE, + SharedWorker: TYPE_VALUE, + Slottable: TYPE, + SourceBufferEventMap: TYPE, + SourceBuffer: TYPE_VALUE, + SourceBufferListEventMap: TYPE, + SourceBufferList: TYPE_VALUE, + SpeechGrammar: TYPE_VALUE, + SpeechGrammarList: TYPE_VALUE, + SpeechRecognitionEventMap: TYPE, + SpeechRecognition: TYPE_VALUE, + SpeechRecognitionAlternative: TYPE_VALUE, + SpeechRecognitionErrorEvent: TYPE_VALUE, + SpeechRecognitionEvent: TYPE_VALUE, + SpeechRecognitionResult: TYPE_VALUE, + SpeechRecognitionResultList: TYPE_VALUE, + SpeechSynthesisEventMap: TYPE, + SpeechSynthesis: TYPE_VALUE, + SpeechSynthesisErrorEvent: TYPE_VALUE, + SpeechSynthesisEvent: TYPE_VALUE, + SpeechSynthesisUtteranceEventMap: TYPE, + SpeechSynthesisUtterance: TYPE_VALUE, + SpeechSynthesisVoice: TYPE_VALUE, + StaticRange: TYPE_VALUE, + StereoPannerNode: TYPE_VALUE, + Storage: TYPE_VALUE, + StorageEvent: TYPE_VALUE, + StorageManager: TYPE_VALUE, + StyleMedia: TYPE_VALUE, + StyleSheet: TYPE_VALUE, + StyleSheetList: TYPE_VALUE, + SubtleCrypto: TYPE_VALUE, + SyncManager: TYPE_VALUE, + Text: TYPE_VALUE, + TextDecoder: TYPE_VALUE, + TextDecoderCommon: TYPE, + TextDecoderStream: TYPE_VALUE, + TextEncoder: TYPE_VALUE, + TextEncoderCommon: TYPE, + TextEncoderStream: TYPE_VALUE, + TextEvent: TYPE_VALUE, + TextMetrics: TYPE_VALUE, + TextTrackEventMap: TYPE, + TextTrack: TYPE_VALUE, + TextTrackCueEventMap: TYPE, + TextTrackCue: TYPE_VALUE, + TextTrackCueList: TYPE_VALUE, + TextTrackListEventMap: TYPE, + TextTrackList: TYPE_VALUE, + TimeRanges: TYPE_VALUE, + Touch: TYPE_VALUE, + TouchEvent: TYPE_VALUE, + TouchList: TYPE_VALUE, + TrackEvent: TYPE_VALUE, + TransformStream: TYPE_VALUE, + TransformStreamDefaultController: TYPE_VALUE, + TransitionEvent: TYPE_VALUE, + TreeWalker: TYPE_VALUE, + UIEvent: TYPE_VALUE, + URL: TYPE_VALUE, + webkitURL: TYPE_VALUE, + URLSearchParams: TYPE_VALUE, + VRDisplay: TYPE_VALUE, + VRDisplayCapabilities: TYPE_VALUE, + VRDisplayEvent: TYPE_VALUE, + VREyeParameters: TYPE_VALUE, + VRFieldOfView: TYPE_VALUE, + VRFrameData: TYPE_VALUE, + VRPose: TYPE_VALUE, + VTTCue: TYPE_VALUE, + VTTRegion: TYPE_VALUE, + ValidityState: TYPE_VALUE, + VideoPlaybackQuality: TYPE_VALUE, + VisualViewportEventMap: TYPE, + VisualViewport: TYPE_VALUE, + WEBGL_color_buffer_float: TYPE, + WEBGL_compressed_texture_astc: TYPE, + WEBGL_compressed_texture_s3tc: TYPE, + WEBGL_compressed_texture_s3tc_srgb: TYPE, + WEBGL_debug_renderer_info: TYPE, + WEBGL_debug_shaders: TYPE, + WEBGL_depth_texture: TYPE, + WEBGL_draw_buffers: TYPE, + WEBGL_lose_context: TYPE, + WaveShaperNode: TYPE_VALUE, + WebGL2RenderingContext: TYPE_VALUE, + WebGL2RenderingContextBase: TYPE, + WebGL2RenderingContextOverloads: TYPE, + WebGLActiveInfo: TYPE_VALUE, + WebGLBuffer: TYPE_VALUE, + WebGLContextEvent: TYPE_VALUE, + WebGLFramebuffer: TYPE_VALUE, + WebGLProgram: TYPE_VALUE, + WebGLQuery: TYPE_VALUE, + WebGLRenderbuffer: TYPE_VALUE, + WebGLRenderingContext: TYPE_VALUE, + WebGLRenderingContextBase: TYPE, + WebGLRenderingContextOverloads: TYPE, + WebGLSampler: TYPE_VALUE, + WebGLShader: TYPE_VALUE, + WebGLShaderPrecisionFormat: TYPE_VALUE, + WebGLSync: TYPE_VALUE, + WebGLTexture: TYPE_VALUE, + WebGLTransformFeedback: TYPE_VALUE, + WebGLUniformLocation: TYPE_VALUE, + WebGLVertexArrayObject: TYPE_VALUE, + WebGLVertexArrayObjectOES: TYPE, + WebKitPoint: TYPE_VALUE, + WebSocketEventMap: TYPE, + WebSocket: TYPE_VALUE, + WheelEvent: TYPE_VALUE, + WindowEventMap: TYPE, + Window: TYPE_VALUE, + WindowEventHandlersEventMap: TYPE, + WindowEventHandlers: TYPE, + WindowLocalStorage: TYPE, + WindowOrWorkerGlobalScope: TYPE, + WindowSessionStorage: TYPE, + WorkerEventMap: TYPE, + Worker: TYPE_VALUE, + Worklet: TYPE_VALUE, + WritableStream: TYPE_VALUE, + WritableStreamDefaultController: TYPE_VALUE, + WritableStreamDefaultWriter: TYPE_VALUE, + XMLDocument: TYPE_VALUE, + XMLHttpRequestEventMap: TYPE, + XMLHttpRequest: TYPE_VALUE, + XMLHttpRequestEventTargetEventMap: TYPE, + XMLHttpRequestEventTarget: TYPE_VALUE, + XMLHttpRequestUpload: TYPE_VALUE, + XMLSerializer: TYPE_VALUE, + XPathEvaluator: TYPE_VALUE, + XPathEvaluatorBase: TYPE, + XPathExpression: TYPE_VALUE, + XPathResult: TYPE_VALUE, + XSLTProcessor: TYPE_VALUE, + webkitRTCPeerConnection: TYPE_VALUE, + EventListenerOrEventListenerObject: TYPE, + Console: TYPE, + CSS: TYPE_VALUE, + WebAssembly: TYPE_VALUE, + BlobCallback: TYPE, + CustomElementConstructor: TYPE, + DecodeErrorCallback: TYPE, + DecodeSuccessCallback: TYPE, + EventHandlerNonNull: TYPE, + ForEachCallback: TYPE, + FrameRequestCallback: TYPE, + FunctionStringCallback: TYPE, + IntersectionObserverCallback: TYPE, + MSLaunchUriCallback: TYPE, + MutationCallback: TYPE, + NavigatorUserMediaErrorCallback: TYPE, + NavigatorUserMediaSuccessCallback: TYPE, + NotificationPermissionCallback: TYPE, + OnBeforeUnloadEventHandlerNonNull: TYPE, + OnErrorEventHandlerNonNull: TYPE, + PerformanceObserverCallback: TYPE, + PositionCallback: TYPE, + PositionErrorCallback: TYPE, + QueuingStrategySize: TYPE, + RTCPeerConnectionErrorCallback: TYPE, + RTCSessionDescriptionCallback: TYPE, + RTCStatsCallback: TYPE, + ResizeObserverCallback: TYPE, + TransformerFlushCallback: TYPE, + TransformerStartCallback: TYPE, + TransformerTransformCallback: TYPE, + UnderlyingSinkAbortCallback: TYPE, + UnderlyingSinkCloseCallback: TYPE, + UnderlyingSinkStartCallback: TYPE, + UnderlyingSinkWriteCallback: TYPE, + UnderlyingSourceCancelCallback: TYPE, + UnderlyingSourcePullCallback: TYPE, + UnderlyingSourceStartCallback: TYPE, + VoidFunction: TYPE, + HTMLElementTagNameMap: TYPE, + HTMLElementDeprecatedTagNameMap: TYPE, + SVGElementTagNameMap: TYPE, + ElementTagNameMap: TYPE, + HeadersInit: TYPE, + BodyInit: TYPE, + RequestInfo: TYPE, + BlobPart: TYPE, + DOMHighResTimeStamp: TYPE, + RenderingContext: TYPE, + HTMLOrSVGImageElement: TYPE, + CanvasImageSource: TYPE, + OffscreenRenderingContext: TYPE, + MessageEventSource: TYPE, + HTMLOrSVGScriptElement: TYPE, + ImageBitmapSource: TYPE, + MediaProvider: TYPE, + OnErrorEventHandler: TYPE, + OnBeforeUnloadEventHandler: TYPE, + TimerHandler: TYPE, + ConstrainULong: TYPE, + ConstrainDouble: TYPE, + ConstrainBoolean: TYPE, + ConstrainDOMString: TYPE, + PerformanceEntryList: TYPE, + ReadableStreamReader: TYPE, + ReadableStreamController: TYPE, + VibratePattern: TYPE, + COSEAlgorithmIdentifier: TYPE, + UvmEntry: TYPE, + UvmEntries: TYPE, + AlgorithmIdentifier: TYPE, + HashAlgorithmIdentifier: TYPE, + BigInteger: TYPE, + NamedCurve: TYPE, + GLenum: TYPE, + GLboolean: TYPE, + GLbitfield: TYPE, + GLint: TYPE, + GLsizei: TYPE, + GLintptr: TYPE, + GLsizeiptr: TYPE, + GLuint: TYPE, + GLfloat: TYPE, + GLclampf: TYPE, + TexImageSource: TYPE, + Float32List: TYPE, + Int32List: TYPE, + GLint64: TYPE, + GLuint64: TYPE, + Uint32List: TYPE, + BufferSource: TYPE, + DOMTimeStamp: TYPE, + LineAndPositionSetting: TYPE, + FormDataEntryValue: TYPE, + InsertPosition: TYPE, + IDBValidKey: TYPE, + MutationRecordType: TYPE, + IDBKeyPath: TYPE, + Transferable: TYPE, + RTCIceGatherCandidate: TYPE, + RTCTransport: TYPE, + MouseWheelEvent: TYPE, + WindowProxy: TYPE, + ReadableStreamDefaultReadResult: TYPE, + AlignSetting: TYPE, + AnimationPlayState: TYPE, + AppendMode: TYPE, + AttestationConveyancePreference: TYPE, + AudioContextLatencyCategory: TYPE, + AudioContextState: TYPE, + AuthenticatorAttachment: TYPE, + AuthenticatorTransport: TYPE, + AutoKeyword: TYPE, + AutomationRate: TYPE, + BinaryType: TYPE, + BiquadFilterType: TYPE, + CanPlayTypeResult: TYPE, + CanvasDirection: TYPE, + CanvasFillRule: TYPE, + CanvasLineCap: TYPE, + CanvasLineJoin: TYPE, + CanvasTextAlign: TYPE, + CanvasTextBaseline: TYPE, + ChannelCountMode: TYPE, + ChannelInterpretation: TYPE, + ClientTypes: TYPE, + ColorSpaceConversion: TYPE, + CompositeOperation: TYPE, + CompositeOperationOrAuto: TYPE, + CredentialMediationRequirement: TYPE, + DOMParserSupportedType: TYPE, + DirectionSetting: TYPE, + DisplayCaptureSurfaceType: TYPE, + DistanceModelType: TYPE, + DocumentReadyState: TYPE, + EndOfStreamError: TYPE, + EndingType: TYPE, + FillMode: TYPE, + FullscreenNavigationUI: TYPE, + GamepadHand: TYPE, + GamepadHapticActuatorType: TYPE, + GamepadMappingType: TYPE, + IDBCursorDirection: TYPE, + IDBRequestReadyState: TYPE, + IDBTransactionMode: TYPE, + ImageOrientation: TYPE, + ImageSmoothingQuality: TYPE, + IterationCompositeOperation: TYPE, + KeyFormat: TYPE, + KeyType: TYPE, + KeyUsage: TYPE, + LineAlignSetting: TYPE, + ListeningState: TYPE, + MSCredentialType: TYPE, + MSTransportType: TYPE, + MSWebViewPermissionState: TYPE, + MSWebViewPermissionType: TYPE, + MediaDeviceKind: TYPE, + MediaKeyMessageType: TYPE, + MediaKeySessionType: TYPE, + MediaKeyStatus: TYPE, + MediaKeysRequirement: TYPE, + MediaStreamTrackState: TYPE, + NavigationReason: TYPE, + NavigationType: TYPE, + NotificationDirection: TYPE, + NotificationPermission: TYPE, + OffscreenRenderingContextId: TYPE, + OrientationLockType: TYPE, + OrientationType: TYPE, + OscillatorType: TYPE, + OverSampleType: TYPE, + PanningModelType: TYPE, + PaymentComplete: TYPE, + PaymentShippingType: TYPE, + PermissionName: TYPE, + PermissionState: TYPE, + PlaybackDirection: TYPE, + PositionAlignSetting: TYPE, + PremultiplyAlpha: TYPE, + PublicKeyCredentialType: TYPE, + PushEncryptionKeyName: TYPE, + PushPermissionState: TYPE, + RTCBundlePolicy: TYPE, + RTCDataChannelState: TYPE, + RTCDtlsRole: TYPE, + RTCDtlsTransportState: TYPE, + RTCErrorDetailType: TYPE, + RTCIceCandidateType: TYPE, + RTCIceComponent: TYPE, + RTCIceConnectionState: TYPE, + RTCIceCredentialType: TYPE, + RTCIceGatherPolicy: TYPE, + RTCIceGathererState: TYPE, + RTCIceGatheringState: TYPE, + RTCIceProtocol: TYPE, + RTCIceRole: TYPE, + RTCIceTcpCandidateType: TYPE, + RTCIceTransportPolicy: TYPE, + RTCIceTransportState: TYPE, + RTCPeerConnectionState: TYPE, + RTCRtcpMuxPolicy: TYPE, + RTCRtpTransceiverDirection: TYPE, + RTCSctpTransportState: TYPE, + RTCSdpType: TYPE, + RTCSignalingState: TYPE, + RTCStatsIceCandidatePairState: TYPE, + RTCStatsIceCandidateType: TYPE, + RTCStatsType: TYPE, + ReadyState: TYPE, + ReferrerPolicy: TYPE, + RequestCache: TYPE, + RequestCredentials: TYPE, + RequestDestination: TYPE, + RequestMode: TYPE, + RequestRedirect: TYPE, + ResidentKeyRequirement: TYPE, + ResizeObserverBoxOptions: TYPE, + ResizeQuality: TYPE, + ResponseType: TYPE, + ScrollBehavior: TYPE, + ScrollLogicalPosition: TYPE, + ScrollRestoration: TYPE, + ScrollSetting: TYPE, + SelectionMode: TYPE, + ServiceWorkerState: TYPE, + ServiceWorkerUpdateViaCache: TYPE, + ShadowRootMode: TYPE, + SpeechRecognitionErrorCode: TYPE, + SpeechSynthesisErrorCode: TYPE, + TextTrackKind: TYPE, + TextTrackMode: TYPE, + TouchType: TYPE, + UserVerificationRequirement: TYPE, + VRDisplayEventReason: TYPE, + VideoFacingModeEnum: TYPE, + VisibilityState: TYPE, + WebGLPowerPreference: TYPE, + WorkerType: TYPE, + XMLHttpRequestResponseType: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2015.collection.ts b/packages/scope-manager/src/lib/es2015.collection.ts index bfe4b1671646..05c04cb013a0 100644 --- a/packages/scope-manager/src/lib/es2015.collection.ts +++ b/packages/scope-manager/src/lib/es2015.collection.ts @@ -3,66 +3,17 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE, TYPE } from './base-config'; export const es2015_collection = { - Map: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Map', - }, - MapConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MapConstructor', - }, - ReadonlyMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadonlyMap', - }, - WeakMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WeakMap', - }, - WeakMapConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WeakMapConstructor', - }, - Set: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Set', - }, - SetConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SetConstructor', - }, - ReadonlySet: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadonlySet', - }, - WeakSet: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WeakSet', - }, - WeakSetConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WeakSetConstructor', - }, + Map: TYPE_VALUE, + MapConstructor: TYPE, + ReadonlyMap: TYPE, + WeakMap: TYPE_VALUE, + WeakMapConstructor: TYPE, + Set: TYPE_VALUE, + SetConstructor: TYPE, + ReadonlySet: TYPE, + WeakSet: TYPE_VALUE, + WeakSetConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2015.core.ts b/packages/scope-manager/src/lib/es2015.core.ts index 1e55eac0ed10..586432018ca0 100644 --- a/packages/scope-manager/src/lib/es2015.core.ts +++ b/packages/scope-manager/src/lib/es2015.core.ts @@ -3,78 +3,19 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2015_core = { - Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Array', - }, - ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ArrayConstructor', - }, - DateConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DateConstructor', - }, - Function: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Function', - }, - Math: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Math', - }, - NumberConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NumberConstructor', - }, - ObjectConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ObjectConstructor', - }, - ReadonlyArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadonlyArray', - }, - RegExp: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RegExp', - }, - RegExpConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RegExpConstructor', - }, - String: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'String', - }, - StringConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'StringConstructor', - }, + Array: TYPE, + ArrayConstructor: TYPE, + DateConstructor: TYPE, + Function: TYPE, + Math: TYPE, + NumberConstructor: TYPE, + ObjectConstructor: TYPE, + ReadonlyArray: TYPE, + RegExp: TYPE, + RegExpConstructor: TYPE, + String: TYPE, + StringConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2015.generator.ts b/packages/scope-manager/src/lib/es2015.generator.ts index 20ba0c067b66..4e4e3bc161e6 100644 --- a/packages/scope-manager/src/lib/es2015.generator.ts +++ b/packages/scope-manager/src/lib/es2015.generator.ts @@ -4,25 +4,11 @@ import { ImplicitLibVariableOptions } from '../variable'; import { es2015_iterable } from './es2015.iterable'; +import { TYPE } from './base-config'; export const es2015_generator = { ...es2015_iterable, - Generator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Generator', - }, - GeneratorFunction: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GeneratorFunction', - }, - GeneratorFunctionConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GeneratorFunctionConstructor', - }, + Generator: TYPE, + GeneratorFunction: TYPE, + GeneratorFunctionConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2015.iterable.ts b/packages/scope-manager/src/lib/es2015.iterable.ts index 200317477303..2a3ee5b082be 100644 --- a/packages/scope-manager/src/lib/es2015.iterable.ts +++ b/packages/scope-manager/src/lib/es2015.iterable.ts @@ -4,259 +4,50 @@ import { ImplicitLibVariableOptions } from '../variable'; import { es2015_symbol } from './es2015.symbol'; +import { TYPE } from './base-config'; export const es2015_iterable = { ...es2015_symbol, - SymbolConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SymbolConstructor', - }, - IteratorYieldResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IteratorYieldResult', - }, - IteratorReturnResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IteratorReturnResult', - }, - IteratorResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IteratorResult', - }, - Iterator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Iterator', - }, - Iterable: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Iterable', - }, - IterableIterator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IterableIterator', - }, - Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Array', - }, - ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ArrayConstructor', - }, - ReadonlyArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadonlyArray', - }, - IArguments: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IArguments', - }, - Map: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Map', - }, - ReadonlyMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadonlyMap', - }, - MapConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MapConstructor', - }, - WeakMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WeakMap', - }, - WeakMapConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WeakMapConstructor', - }, - Set: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Set', - }, - ReadonlySet: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadonlySet', - }, - SetConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SetConstructor', - }, - WeakSet: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WeakSet', - }, - WeakSetConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WeakSetConstructor', - }, - Promise: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Promise', - }, - PromiseConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PromiseConstructor', - }, - String: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'String', - }, - Int8Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int8Array', - }, - Int8ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int8ArrayConstructor', - }, - Uint8Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint8Array', - }, - Uint8ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint8ArrayConstructor', - }, - Uint8ClampedArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint8ClampedArray', - }, - Uint8ClampedArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint8ClampedArrayConstructor', - }, - Int16Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int16Array', - }, - Int16ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int16ArrayConstructor', - }, - Uint16Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint16Array', - }, - Uint16ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint16ArrayConstructor', - }, - Int32Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int32Array', - }, - Int32ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int32ArrayConstructor', - }, - Uint32Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint32Array', - }, - Uint32ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint32ArrayConstructor', - }, - Float32Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float32Array', - }, - Float32ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float32ArrayConstructor', - }, - Float64Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float64Array', - }, - Float64ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float64ArrayConstructor', - }, + SymbolConstructor: TYPE, + IteratorYieldResult: TYPE, + IteratorReturnResult: TYPE, + IteratorResult: TYPE, + Iterator: TYPE, + Iterable: TYPE, + IterableIterator: TYPE, + Array: TYPE, + ArrayConstructor: TYPE, + ReadonlyArray: TYPE, + IArguments: TYPE, + Map: TYPE, + ReadonlyMap: TYPE, + MapConstructor: TYPE, + WeakMap: TYPE, + WeakMapConstructor: TYPE, + Set: TYPE, + ReadonlySet: TYPE, + SetConstructor: TYPE, + WeakSet: TYPE, + WeakSetConstructor: TYPE, + Promise: TYPE, + PromiseConstructor: TYPE, + String: TYPE, + Int8Array: TYPE, + Int8ArrayConstructor: TYPE, + Uint8Array: TYPE, + Uint8ArrayConstructor: TYPE, + Uint8ClampedArray: TYPE, + Uint8ClampedArrayConstructor: TYPE, + Int16Array: TYPE, + Int16ArrayConstructor: TYPE, + Uint16Array: TYPE, + Uint16ArrayConstructor: TYPE, + Int32Array: TYPE, + Int32ArrayConstructor: TYPE, + Uint32Array: TYPE, + Uint32ArrayConstructor: TYPE, + Float32Array: TYPE, + Float32ArrayConstructor: TYPE, + Float64Array: TYPE, + Float64ArrayConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2015.promise.ts b/packages/scope-manager/src/lib/es2015.promise.ts index 79c90f23b77d..fc5f298b1abf 100644 --- a/packages/scope-manager/src/lib/es2015.promise.ts +++ b/packages/scope-manager/src/lib/es2015.promise.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2015_promise = { - PromiseConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PromiseConstructor', - }, + PromiseConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2015.proxy.ts b/packages/scope-manager/src/lib/es2015.proxy.ts index a57efe0b2b6a..226fa3953613 100644 --- a/packages/scope-manager/src/lib/es2015.proxy.ts +++ b/packages/scope-manager/src/lib/es2015.proxy.ts @@ -3,18 +3,9 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2015_proxy = { - ProxyHandler: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ProxyHandler', - }, - ProxyConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ProxyConstructor', - }, + ProxyHandler: TYPE, + ProxyConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2015.reflect.ts b/packages/scope-manager/src/lib/es2015.reflect.ts index 796c3fb78973..d9437942210c 100644 --- a/packages/scope-manager/src/lib/es2015.reflect.ts +++ b/packages/scope-manager/src/lib/es2015.reflect.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE } from './base-config'; export const es2015_reflect = { - Reflect: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Reflect', - }, + Reflect: TYPE_VALUE, } as Record; diff --git a/packages/scope-manager/src/lib/es2015.symbol.ts b/packages/scope-manager/src/lib/es2015.symbol.ts index 7f5a8acf7334..d0907293ca51 100644 --- a/packages/scope-manager/src/lib/es2015.symbol.ts +++ b/packages/scope-manager/src/lib/es2015.symbol.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2015_symbol = { - SymbolConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SymbolConstructor', - }, + SymbolConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2015.symbol.wellknown.ts b/packages/scope-manager/src/lib/es2015.symbol.wellknown.ts index ba99a6855f80..880535d8d905 100644 --- a/packages/scope-manager/src/lib/es2015.symbol.wellknown.ts +++ b/packages/scope-manager/src/lib/es2015.symbol.wellknown.ts @@ -4,199 +4,40 @@ import { ImplicitLibVariableOptions } from '../variable'; import { es2015_symbol } from './es2015.symbol'; +import { TYPE } from './base-config'; export const es2015_symbol_wellknown = { ...es2015_symbol, - SymbolConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SymbolConstructor', - }, - Symbol: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Symbol', - }, - Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Array', - }, - Date: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Date', - }, - Map: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Map', - }, - WeakMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WeakMap', - }, - Set: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Set', - }, - WeakSet: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WeakSet', - }, - JSON: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'JSON', - }, - Function: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Function', - }, - GeneratorFunction: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GeneratorFunction', - }, - Math: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Math', - }, - Promise: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Promise', - }, - PromiseConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PromiseConstructor', - }, - RegExp: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RegExp', - }, - RegExpConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RegExpConstructor', - }, - String: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'String', - }, - ArrayBuffer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ArrayBuffer', - }, - DataView: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DataView', - }, - Int8Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int8Array', - }, - Uint8Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint8Array', - }, - Uint8ClampedArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint8ClampedArray', - }, - Int16Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int16Array', - }, - Uint16Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint16Array', - }, - Int32Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int32Array', - }, - Uint32Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint32Array', - }, - Float32Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float32Array', - }, - Float64Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float64Array', - }, - ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ArrayConstructor', - }, - MapConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MapConstructor', - }, - SetConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SetConstructor', - }, - ArrayBufferConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ArrayBufferConstructor', - }, + SymbolConstructor: TYPE, + Symbol: TYPE, + Array: TYPE, + Date: TYPE, + Map: TYPE, + WeakMap: TYPE, + Set: TYPE, + WeakSet: TYPE, + JSON: TYPE, + Function: TYPE, + GeneratorFunction: TYPE, + Math: TYPE, + Promise: TYPE, + PromiseConstructor: TYPE, + RegExp: TYPE, + RegExpConstructor: TYPE, + String: TYPE, + ArrayBuffer: TYPE, + DataView: TYPE, + Int8Array: TYPE, + Uint8Array: TYPE, + Uint8ClampedArray: TYPE, + Int16Array: TYPE, + Uint16Array: TYPE, + Int32Array: TYPE, + Uint32Array: TYPE, + Float32Array: TYPE, + Float64Array: TYPE, + ArrayConstructor: TYPE, + MapConstructor: TYPE, + SetConstructor: TYPE, + ArrayBufferConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2016.array.include.ts b/packages/scope-manager/src/lib/es2016.array.include.ts index 7a082df25f90..2058367f104f 100644 --- a/packages/scope-manager/src/lib/es2016.array.include.ts +++ b/packages/scope-manager/src/lib/es2016.array.include.ts @@ -3,72 +3,18 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2016_array_include = { - Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Array', - }, - ReadonlyArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadonlyArray', - }, - Int8Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int8Array', - }, - Uint8Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint8Array', - }, - Uint8ClampedArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint8ClampedArray', - }, - Int16Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int16Array', - }, - Uint16Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint16Array', - }, - Int32Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int32Array', - }, - Uint32Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint32Array', - }, - Float32Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float32Array', - }, - Float64Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float64Array', - }, + Array: TYPE, + ReadonlyArray: TYPE, + Int8Array: TYPE, + Uint8Array: TYPE, + Uint8ClampedArray: TYPE, + Int16Array: TYPE, + Uint16Array: TYPE, + Int32Array: TYPE, + Uint32Array: TYPE, + Float32Array: TYPE, + Float64Array: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2017.intl.ts b/packages/scope-manager/src/lib/es2017.intl.ts index de836bee889e..1c66c843bd9c 100644 --- a/packages/scope-manager/src/lib/es2017.intl.ts +++ b/packages/scope-manager/src/lib/es2017.intl.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE } from './base-config'; export const es2017_intl = { - Intl: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Intl', - }, + Intl: TYPE_VALUE, } as Record; diff --git a/packages/scope-manager/src/lib/es2017.object.ts b/packages/scope-manager/src/lib/es2017.object.ts index cc6dadcb5c4b..7a5f5fe50d76 100644 --- a/packages/scope-manager/src/lib/es2017.object.ts +++ b/packages/scope-manager/src/lib/es2017.object.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2017_object = { - ObjectConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ObjectConstructor', - }, + ObjectConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2017.sharedmemory.ts b/packages/scope-manager/src/lib/es2017.sharedmemory.ts index 316d52424b99..57fa84fa86b0 100644 --- a/packages/scope-manager/src/lib/es2017.sharedmemory.ts +++ b/packages/scope-manager/src/lib/es2017.sharedmemory.ts @@ -5,32 +5,13 @@ import { ImplicitLibVariableOptions } from '../variable'; import { es2015_symbol } from './es2015.symbol'; import { es2015_symbol_wellknown } from './es2015.symbol.wellknown'; +import { TYPE_VALUE, TYPE } from './base-config'; export const es2017_sharedmemory = { ...es2015_symbol, ...es2015_symbol_wellknown, - SharedArrayBuffer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SharedArrayBuffer', - }, - SharedArrayBufferConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SharedArrayBufferConstructor', - }, - ArrayBufferTypes: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ArrayBufferTypes', - }, - Atomics: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Atomics', - }, + SharedArrayBuffer: TYPE_VALUE, + SharedArrayBufferConstructor: TYPE, + ArrayBufferTypes: TYPE, + Atomics: TYPE_VALUE, } as Record; diff --git a/packages/scope-manager/src/lib/es2017.string.ts b/packages/scope-manager/src/lib/es2017.string.ts index 5b3ef5e7e264..ea0488e98328 100644 --- a/packages/scope-manager/src/lib/es2017.string.ts +++ b/packages/scope-manager/src/lib/es2017.string.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2017_string = { - String: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'String', - }, + String: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2017.typedarrays.ts b/packages/scope-manager/src/lib/es2017.typedarrays.ts index dbe5dedfac36..4a59ace22c8c 100644 --- a/packages/scope-manager/src/lib/es2017.typedarrays.ts +++ b/packages/scope-manager/src/lib/es2017.typedarrays.ts @@ -3,60 +3,16 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2017_typedarrays = { - Int8ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int8ArrayConstructor', - }, - Uint8ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint8ArrayConstructor', - }, - Uint8ClampedArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint8ClampedArrayConstructor', - }, - Int16ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int16ArrayConstructor', - }, - Uint16ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint16ArrayConstructor', - }, - Int32ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int32ArrayConstructor', - }, - Uint32ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint32ArrayConstructor', - }, - Float32ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float32ArrayConstructor', - }, - Float64ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float64ArrayConstructor', - }, + Int8ArrayConstructor: TYPE, + Uint8ArrayConstructor: TYPE, + Uint8ClampedArrayConstructor: TYPE, + Int16ArrayConstructor: TYPE, + Uint16ArrayConstructor: TYPE, + Int32ArrayConstructor: TYPE, + Uint32ArrayConstructor: TYPE, + Float32ArrayConstructor: TYPE, + Float64ArrayConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2018.asyncgenerator.ts b/packages/scope-manager/src/lib/es2018.asyncgenerator.ts index 80752c2dca22..e319278df7ee 100644 --- a/packages/scope-manager/src/lib/es2018.asyncgenerator.ts +++ b/packages/scope-manager/src/lib/es2018.asyncgenerator.ts @@ -4,25 +4,11 @@ import { ImplicitLibVariableOptions } from '../variable'; import { es2018_asynciterable } from './es2018.asynciterable'; +import { TYPE } from './base-config'; export const es2018_asyncgenerator = { ...es2018_asynciterable, - AsyncGenerator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AsyncGenerator', - }, - AsyncGeneratorFunction: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AsyncGeneratorFunction', - }, - AsyncGeneratorFunctionConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AsyncGeneratorFunctionConstructor', - }, + AsyncGenerator: TYPE, + AsyncGeneratorFunction: TYPE, + AsyncGeneratorFunctionConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2018.asynciterable.ts b/packages/scope-manager/src/lib/es2018.asynciterable.ts index fca209905022..0a22137e5981 100644 --- a/packages/scope-manager/src/lib/es2018.asynciterable.ts +++ b/packages/scope-manager/src/lib/es2018.asynciterable.ts @@ -5,32 +5,13 @@ import { ImplicitLibVariableOptions } from '../variable'; import { es2015_symbol } from './es2015.symbol'; import { es2015_iterable } from './es2015.iterable'; +import { TYPE } from './base-config'; export const es2018_asynciterable = { ...es2015_symbol, ...es2015_iterable, - SymbolConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SymbolConstructor', - }, - AsyncIterator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AsyncIterator', - }, - AsyncIterable: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AsyncIterable', - }, - AsyncIterableIterator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AsyncIterableIterator', - }, + SymbolConstructor: TYPE, + AsyncIterator: TYPE, + AsyncIterable: TYPE, + AsyncIterableIterator: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2018.intl.ts b/packages/scope-manager/src/lib/es2018.intl.ts index 7bc68a428ff9..ce40891f1567 100644 --- a/packages/scope-manager/src/lib/es2018.intl.ts +++ b/packages/scope-manager/src/lib/es2018.intl.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE } from './base-config'; export const es2018_intl = { - Intl: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Intl', - }, + Intl: TYPE_VALUE, } as Record; diff --git a/packages/scope-manager/src/lib/es2018.promise.ts b/packages/scope-manager/src/lib/es2018.promise.ts index 908e47e2f53e..429661973479 100644 --- a/packages/scope-manager/src/lib/es2018.promise.ts +++ b/packages/scope-manager/src/lib/es2018.promise.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2018_promise = { - Promise: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Promise', - }, + Promise: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2018.regexp.ts b/packages/scope-manager/src/lib/es2018.regexp.ts index e59e4849f2b3..39a8b4d7a079 100644 --- a/packages/scope-manager/src/lib/es2018.regexp.ts +++ b/packages/scope-manager/src/lib/es2018.regexp.ts @@ -3,24 +3,10 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2018_regexp = { - RegExpMatchArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RegExpMatchArray', - }, - RegExpExecArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RegExpExecArray', - }, - RegExp: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RegExp', - }, + RegExpMatchArray: TYPE, + RegExpExecArray: TYPE, + RegExp: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2019.array.ts b/packages/scope-manager/src/lib/es2019.array.ts index e3fb2ff62beb..73a459a5367f 100644 --- a/packages/scope-manager/src/lib/es2019.array.ts +++ b/packages/scope-manager/src/lib/es2019.array.ts @@ -3,24 +3,10 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2019_array = { - FlatArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FlatArray', - }, - ReadonlyArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadonlyArray', - }, - Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Array', - }, + FlatArray: TYPE, + ReadonlyArray: TYPE, + Array: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2019.object.ts b/packages/scope-manager/src/lib/es2019.object.ts index 3db91f3f1d6c..70c12d3af78e 100644 --- a/packages/scope-manager/src/lib/es2019.object.ts +++ b/packages/scope-manager/src/lib/es2019.object.ts @@ -4,13 +4,9 @@ import { ImplicitLibVariableOptions } from '../variable'; import { es2015_iterable } from './es2015.iterable'; +import { TYPE } from './base-config'; export const es2019_object = { ...es2015_iterable, - ObjectConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ObjectConstructor', - }, + ObjectConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2019.string.ts b/packages/scope-manager/src/lib/es2019.string.ts index 113a34775587..4211425a6595 100644 --- a/packages/scope-manager/src/lib/es2019.string.ts +++ b/packages/scope-manager/src/lib/es2019.string.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2019_string = { - String: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'String', - }, + String: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2019.symbol.ts b/packages/scope-manager/src/lib/es2019.symbol.ts index 36888f887cef..81e789e4d165 100644 --- a/packages/scope-manager/src/lib/es2019.symbol.ts +++ b/packages/scope-manager/src/lib/es2019.symbol.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2019_symbol = { - Symbol: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Symbol', - }, + Symbol: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2020.bigint.ts b/packages/scope-manager/src/lib/es2020.bigint.ts index b31042e8d3ae..40dca31af844 100644 --- a/packages/scope-manager/src/lib/es2020.bigint.ts +++ b/packages/scope-manager/src/lib/es2020.bigint.ts @@ -3,60 +3,16 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE, TYPE_VALUE } from './base-config'; export const es2020_bigint = { - BigIntToLocaleStringOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BigIntToLocaleStringOptions', - }, - BigInt: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'BigInt', - }, - BigIntConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BigIntConstructor', - }, - BigInt64Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'BigInt64Array', - }, - BigInt64ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BigInt64ArrayConstructor', - }, - BigUint64Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'BigUint64Array', - }, - BigUint64ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BigUint64ArrayConstructor', - }, - DataView: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DataView', - }, - Intl: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Intl', - }, + BigIntToLocaleStringOptions: TYPE, + BigInt: TYPE_VALUE, + BigIntConstructor: TYPE, + BigInt64Array: TYPE_VALUE, + BigInt64ArrayConstructor: TYPE, + BigUint64Array: TYPE_VALUE, + BigUint64ArrayConstructor: TYPE, + DataView: TYPE, + Intl: TYPE_VALUE, } as Record; diff --git a/packages/scope-manager/src/lib/es2020.intl.ts b/packages/scope-manager/src/lib/es2020.intl.ts index d97db5a6aea2..d6ed5dd467b5 100644 --- a/packages/scope-manager/src/lib/es2020.intl.ts +++ b/packages/scope-manager/src/lib/es2020.intl.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE } from './base-config'; export const es2020_intl = { - Intl: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Intl', - }, + Intl: TYPE_VALUE, } as Record; diff --git a/packages/scope-manager/src/lib/es2020.promise.ts b/packages/scope-manager/src/lib/es2020.promise.ts index 4a3743f0e7e1..02f54152e185 100644 --- a/packages/scope-manager/src/lib/es2020.promise.ts +++ b/packages/scope-manager/src/lib/es2020.promise.ts @@ -3,30 +3,11 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2020_promise = { - PromiseFulfilledResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PromiseFulfilledResult', - }, - PromiseRejectedResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PromiseRejectedResult', - }, - PromiseSettledResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PromiseSettledResult', - }, - PromiseConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PromiseConstructor', - }, + PromiseFulfilledResult: TYPE, + PromiseRejectedResult: TYPE, + PromiseSettledResult: TYPE, + PromiseConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2020.sharedmemory.ts b/packages/scope-manager/src/lib/es2020.sharedmemory.ts index 83569efc09f3..0f666b766127 100644 --- a/packages/scope-manager/src/lib/es2020.sharedmemory.ts +++ b/packages/scope-manager/src/lib/es2020.sharedmemory.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2020_sharedmemory = { - Atomics: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Atomics', - }, + Atomics: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2020.string.ts b/packages/scope-manager/src/lib/es2020.string.ts index 2f173d3fb5b8..2f9363cc56da 100644 --- a/packages/scope-manager/src/lib/es2020.string.ts +++ b/packages/scope-manager/src/lib/es2020.string.ts @@ -4,13 +4,9 @@ import { ImplicitLibVariableOptions } from '../variable'; import { es2015_iterable } from './es2015.iterable'; +import { TYPE } from './base-config'; export const es2020_string = { ...es2015_iterable, - String: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'String', - }, + String: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2020.symbol.wellknown.ts b/packages/scope-manager/src/lib/es2020.symbol.wellknown.ts index 9c452ca68979..e817c9d88d92 100644 --- a/packages/scope-manager/src/lib/es2020.symbol.wellknown.ts +++ b/packages/scope-manager/src/lib/es2020.symbol.wellknown.ts @@ -5,20 +5,11 @@ import { ImplicitLibVariableOptions } from '../variable'; import { es2015_iterable } from './es2015.iterable'; import { es2015_symbol } from './es2015.symbol'; +import { TYPE } from './base-config'; export const es2020_symbol_wellknown = { ...es2015_iterable, ...es2015_symbol, - SymbolConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SymbolConstructor', - }, - RegExp: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RegExp', - }, + SymbolConstructor: TYPE, + RegExp: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2021.promise.ts b/packages/scope-manager/src/lib/es2021.promise.ts index 76c197a1dc1b..5ab523683127 100644 --- a/packages/scope-manager/src/lib/es2021.promise.ts +++ b/packages/scope-manager/src/lib/es2021.promise.ts @@ -3,24 +3,10 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE, TYPE } from './base-config'; export const es2021_promise = { - AggregateError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AggregateError', - }, - AggregateErrorConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AggregateErrorConstructor', - }, - PromiseConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PromiseConstructor', - }, + AggregateError: TYPE_VALUE, + AggregateErrorConstructor: TYPE, + PromiseConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2021.string.ts b/packages/scope-manager/src/lib/es2021.string.ts index 16d42e4428e8..efe7173f859e 100644 --- a/packages/scope-manager/src/lib/es2021.string.ts +++ b/packages/scope-manager/src/lib/es2021.string.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const es2021_string = { - String: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'String', - }, + String: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2021.weakref.ts b/packages/scope-manager/src/lib/es2021.weakref.ts index a86173a9358c..2ab59cf10108 100644 --- a/packages/scope-manager/src/lib/es2021.weakref.ts +++ b/packages/scope-manager/src/lib/es2021.weakref.ts @@ -3,30 +3,11 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE, TYPE } from './base-config'; export const es2021_weakref = { - WeakRef: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WeakRef', - }, - WeakRefConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WeakRefConstructor', - }, - FinalizationRegistry: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'FinalizationRegistry', - }, - FinalizationRegistryConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FinalizationRegistryConstructor', - }, + WeakRef: TYPE_VALUE, + WeakRefConstructor: TYPE, + FinalizationRegistry: TYPE_VALUE, + FinalizationRegistryConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es5.ts b/packages/scope-manager/src/lib/es5.ts index 2141fc6ceee1..0fa14cdfccf2 100644 --- a/packages/scope-manager/src/lib/es5.ts +++ b/packages/scope-manager/src/lib/es5.ts @@ -3,606 +3,107 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE, TYPE_VALUE } from './base-config'; export const es5 = { - Symbol: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Symbol', - }, - PropertyKey: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PropertyKey', - }, - PropertyDescriptor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PropertyDescriptor', - }, - PropertyDescriptorMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PropertyDescriptorMap', - }, - Object: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Object', - }, - ObjectConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ObjectConstructor', - }, - Function: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Function', - }, - FunctionConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FunctionConstructor', - }, - ThisParameterType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ThisParameterType', - }, - OmitThisParameter: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OmitThisParameter', - }, - CallableFunction: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CallableFunction', - }, - NewableFunction: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NewableFunction', - }, - IArguments: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IArguments', - }, - String: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'String', - }, - StringConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'StringConstructor', - }, - Boolean: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Boolean', - }, - BooleanConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BooleanConstructor', - }, - Number: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Number', - }, - NumberConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NumberConstructor', - }, - TemplateStringsArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TemplateStringsArray', - }, - ImportMeta: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImportMeta', - }, - Math: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Math', - }, - Date: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Date', - }, - DateConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DateConstructor', - }, - RegExpMatchArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RegExpMatchArray', - }, - RegExpExecArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RegExpExecArray', - }, - RegExp: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RegExp', - }, - RegExpConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RegExpConstructor', - }, - Error: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Error', - }, - ErrorConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ErrorConstructor', - }, - EvalError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'EvalError', - }, - EvalErrorConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EvalErrorConstructor', - }, - RangeError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'RangeError', - }, - RangeErrorConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RangeErrorConstructor', - }, - ReferenceError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ReferenceError', - }, - ReferenceErrorConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReferenceErrorConstructor', - }, - SyntaxError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SyntaxError', - }, - SyntaxErrorConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SyntaxErrorConstructor', - }, - TypeError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TypeError', - }, - TypeErrorConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TypeErrorConstructor', - }, - URIError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'URIError', - }, - URIErrorConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'URIErrorConstructor', - }, - JSON: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'JSON', - }, - ReadonlyArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadonlyArray', - }, - ConcatArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConcatArray', - }, - Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Array', - }, - ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ArrayConstructor', - }, - TypedPropertyDescriptor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TypedPropertyDescriptor', - }, - ClassDecorator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ClassDecorator', - }, - PropertyDecorator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PropertyDecorator', - }, - MethodDecorator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MethodDecorator', - }, - ParameterDecorator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ParameterDecorator', - }, - PromiseConstructorLike: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PromiseConstructorLike', - }, - PromiseLike: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PromiseLike', - }, - Promise: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Promise', - }, - ArrayLike: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ArrayLike', - }, - Partial: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Partial', - }, - Required: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Required', - }, - Readonly: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Readonly', - }, - Pick: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Pick', - }, - Record: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Record', - }, - Exclude: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Exclude', - }, - Extract: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Extract', - }, - Omit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Omit', - }, - NonNullable: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NonNullable', - }, - Parameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Parameters', - }, - ConstructorParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConstructorParameters', - }, - ReturnType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReturnType', - }, - InstanceType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'InstanceType', - }, - Uppercase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uppercase', - }, - Lowercase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Lowercase', - }, - Capitalize: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Capitalize', - }, - Uncapitalize: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uncapitalize', - }, - ThisType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ThisType', - }, - ArrayBuffer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ArrayBuffer', - }, - ArrayBufferTypes: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ArrayBufferTypes', - }, - ArrayBufferLike: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ArrayBufferLike', - }, - ArrayBufferConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ArrayBufferConstructor', - }, - ArrayBufferView: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ArrayBufferView', - }, - DataView: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DataView', - }, - DataViewConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DataViewConstructor', - }, - Int8Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Int8Array', - }, - Int8ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int8ArrayConstructor', - }, - Uint8Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Uint8Array', - }, - Uint8ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint8ArrayConstructor', - }, - Uint8ClampedArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Uint8ClampedArray', - }, - Uint8ClampedArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint8ClampedArrayConstructor', - }, - Int16Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Int16Array', - }, - Int16ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int16ArrayConstructor', - }, - Uint16Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Uint16Array', - }, - Uint16ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint16ArrayConstructor', - }, - Int32Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Int32Array', - }, - Int32ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int32ArrayConstructor', - }, - Uint32Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Uint32Array', - }, - Uint32ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint32ArrayConstructor', - }, - Float32Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Float32Array', - }, - Float32ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float32ArrayConstructor', - }, - Float64Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Float64Array', - }, - Float64ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float64ArrayConstructor', - }, - Intl: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Intl', - }, + Symbol: TYPE, + PropertyKey: TYPE, + PropertyDescriptor: TYPE, + PropertyDescriptorMap: TYPE, + Object: TYPE_VALUE, + ObjectConstructor: TYPE, + Function: TYPE_VALUE, + FunctionConstructor: TYPE, + ThisParameterType: TYPE, + OmitThisParameter: TYPE, + CallableFunction: TYPE, + NewableFunction: TYPE, + IArguments: TYPE, + String: TYPE_VALUE, + StringConstructor: TYPE, + Boolean: TYPE_VALUE, + BooleanConstructor: TYPE, + Number: TYPE_VALUE, + NumberConstructor: TYPE, + TemplateStringsArray: TYPE, + ImportMeta: TYPE, + Math: TYPE_VALUE, + Date: TYPE_VALUE, + DateConstructor: TYPE, + RegExpMatchArray: TYPE, + RegExpExecArray: TYPE, + RegExp: TYPE_VALUE, + RegExpConstructor: TYPE, + Error: TYPE_VALUE, + ErrorConstructor: TYPE, + EvalError: TYPE_VALUE, + EvalErrorConstructor: TYPE, + RangeError: TYPE_VALUE, + RangeErrorConstructor: TYPE, + ReferenceError: TYPE_VALUE, + ReferenceErrorConstructor: TYPE, + SyntaxError: TYPE_VALUE, + SyntaxErrorConstructor: TYPE, + TypeError: TYPE_VALUE, + TypeErrorConstructor: TYPE, + URIError: TYPE_VALUE, + URIErrorConstructor: TYPE, + JSON: TYPE_VALUE, + ReadonlyArray: TYPE, + ConcatArray: TYPE, + Array: TYPE_VALUE, + ArrayConstructor: TYPE, + TypedPropertyDescriptor: TYPE, + ClassDecorator: TYPE, + PropertyDecorator: TYPE, + MethodDecorator: TYPE, + ParameterDecorator: TYPE, + PromiseConstructorLike: TYPE, + PromiseLike: TYPE, + Promise: TYPE, + ArrayLike: TYPE, + Partial: TYPE, + Required: TYPE, + Readonly: TYPE, + Pick: TYPE, + Record: TYPE, + Exclude: TYPE, + Extract: TYPE, + Omit: TYPE, + NonNullable: TYPE, + Parameters: TYPE, + ConstructorParameters: TYPE, + ReturnType: TYPE, + InstanceType: TYPE, + Uppercase: TYPE, + Lowercase: TYPE, + Capitalize: TYPE, + Uncapitalize: TYPE, + ThisType: TYPE, + ArrayBuffer: TYPE_VALUE, + ArrayBufferTypes: TYPE, + ArrayBufferLike: TYPE, + ArrayBufferConstructor: TYPE, + ArrayBufferView: TYPE, + DataView: TYPE_VALUE, + DataViewConstructor: TYPE, + Int8Array: TYPE_VALUE, + Int8ArrayConstructor: TYPE, + Uint8Array: TYPE_VALUE, + Uint8ArrayConstructor: TYPE, + Uint8ClampedArray: TYPE_VALUE, + Uint8ClampedArrayConstructor: TYPE, + Int16Array: TYPE_VALUE, + Int16ArrayConstructor: TYPE, + Uint16Array: TYPE_VALUE, + Uint16ArrayConstructor: TYPE, + Int32Array: TYPE_VALUE, + Int32ArrayConstructor: TYPE, + Uint32Array: TYPE_VALUE, + Uint32ArrayConstructor: TYPE, + Float32Array: TYPE_VALUE, + Float32ArrayConstructor: TYPE, + Float64Array: TYPE_VALUE, + Float64ArrayConstructor: TYPE, + Intl: TYPE_VALUE, } as Record; diff --git a/packages/scope-manager/src/lib/esnext.array.ts b/packages/scope-manager/src/lib/esnext.array.ts index b349f206e184..28e862220cf2 100644 --- a/packages/scope-manager/src/lib/esnext.array.ts +++ b/packages/scope-manager/src/lib/esnext.array.ts @@ -3,24 +3,10 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const esnext_array = { - FlatArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FlatArray', - }, - ReadonlyArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadonlyArray', - }, - Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Array', - }, + FlatArray: TYPE, + ReadonlyArray: TYPE, + Array: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/esnext.asynciterable.ts b/packages/scope-manager/src/lib/esnext.asynciterable.ts index c78a7dc71fc4..98501212a957 100644 --- a/packages/scope-manager/src/lib/esnext.asynciterable.ts +++ b/packages/scope-manager/src/lib/esnext.asynciterable.ts @@ -5,32 +5,13 @@ import { ImplicitLibVariableOptions } from '../variable'; import { es2015_symbol } from './es2015.symbol'; import { es2015_iterable } from './es2015.iterable'; +import { TYPE } from './base-config'; export const esnext_asynciterable = { ...es2015_symbol, ...es2015_iterable, - SymbolConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SymbolConstructor', - }, - AsyncIterator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AsyncIterator', - }, - AsyncIterable: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AsyncIterable', - }, - AsyncIterableIterator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AsyncIterableIterator', - }, + SymbolConstructor: TYPE, + AsyncIterator: TYPE, + AsyncIterable: TYPE, + AsyncIterableIterator: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/esnext.bigint.ts b/packages/scope-manager/src/lib/esnext.bigint.ts index 18985a9df06c..209b5e731d3b 100644 --- a/packages/scope-manager/src/lib/esnext.bigint.ts +++ b/packages/scope-manager/src/lib/esnext.bigint.ts @@ -3,60 +3,16 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE, TYPE_VALUE } from './base-config'; export const esnext_bigint = { - BigIntToLocaleStringOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BigIntToLocaleStringOptions', - }, - BigInt: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'BigInt', - }, - BigIntConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BigIntConstructor', - }, - BigInt64Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'BigInt64Array', - }, - BigInt64ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BigInt64ArrayConstructor', - }, - BigUint64Array: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'BigUint64Array', - }, - BigUint64ArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BigUint64ArrayConstructor', - }, - DataView: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DataView', - }, - Intl: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Intl', - }, + BigIntToLocaleStringOptions: TYPE, + BigInt: TYPE_VALUE, + BigIntConstructor: TYPE, + BigInt64Array: TYPE_VALUE, + BigInt64ArrayConstructor: TYPE, + BigUint64Array: TYPE_VALUE, + BigUint64ArrayConstructor: TYPE, + DataView: TYPE, + Intl: TYPE_VALUE, } as Record; diff --git a/packages/scope-manager/src/lib/esnext.intl.ts b/packages/scope-manager/src/lib/esnext.intl.ts index e6a3fa9997ed..cf71e6878bf9 100644 --- a/packages/scope-manager/src/lib/esnext.intl.ts +++ b/packages/scope-manager/src/lib/esnext.intl.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE } from './base-config'; export const esnext_intl = { - Intl: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Intl', - }, + Intl: TYPE_VALUE, } as Record; diff --git a/packages/scope-manager/src/lib/esnext.promise.ts b/packages/scope-manager/src/lib/esnext.promise.ts index 53240da659eb..9aa6a130d2f8 100644 --- a/packages/scope-manager/src/lib/esnext.promise.ts +++ b/packages/scope-manager/src/lib/esnext.promise.ts @@ -3,24 +3,10 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE, TYPE } from './base-config'; export const esnext_promise = { - AggregateError: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AggregateError', - }, - AggregateErrorConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AggregateErrorConstructor', - }, - PromiseConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PromiseConstructor', - }, + AggregateError: TYPE_VALUE, + AggregateErrorConstructor: TYPE, + PromiseConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/esnext.string.ts b/packages/scope-manager/src/lib/esnext.string.ts index e1c3ab61f59a..429469351992 100644 --- a/packages/scope-manager/src/lib/esnext.string.ts +++ b/packages/scope-manager/src/lib/esnext.string.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const esnext_string = { - String: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'String', - }, + String: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/esnext.symbol.ts b/packages/scope-manager/src/lib/esnext.symbol.ts index a7e3f7a15f21..39d7ed7be416 100644 --- a/packages/scope-manager/src/lib/esnext.symbol.ts +++ b/packages/scope-manager/src/lib/esnext.symbol.ts @@ -3,12 +3,8 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const esnext_symbol = { - Symbol: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Symbol', - }, + Symbol: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/esnext.weakref.ts b/packages/scope-manager/src/lib/esnext.weakref.ts index 2ae60fb7230b..679fba61e9be 100644 --- a/packages/scope-manager/src/lib/esnext.weakref.ts +++ b/packages/scope-manager/src/lib/esnext.weakref.ts @@ -3,30 +3,11 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE, TYPE } from './base-config'; export const esnext_weakref = { - WeakRef: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WeakRef', - }, - WeakRefConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WeakRefConstructor', - }, - FinalizationRegistry: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'FinalizationRegistry', - }, - FinalizationRegistryConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FinalizationRegistryConstructor', - }, + WeakRef: TYPE_VALUE, + WeakRefConstructor: TYPE, + FinalizationRegistry: TYPE_VALUE, + FinalizationRegistryConstructor: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/scripthost.ts b/packages/scope-manager/src/lib/scripthost.ts index 1ae99dcacac2..f582e52a5aae 100644 --- a/packages/scope-manager/src/lib/scripthost.ts +++ b/packages/scope-manager/src/lib/scripthost.ts @@ -3,84 +3,20 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE_VALUE, TYPE } from './base-config'; export const scripthost = { - ActiveXObject: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ActiveXObject', - }, - ITextWriter: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ITextWriter', - }, - TextStreamBase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextStreamBase', - }, - TextStreamWriter: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextStreamWriter', - }, - TextStreamReader: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextStreamReader', - }, - SafeArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SafeArray', - }, - Enumerator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Enumerator', - }, - EnumeratorConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EnumeratorConstructor', - }, - VBArray: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'VBArray', - }, - VBArrayConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VBArrayConstructor', - }, - VarDate: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'VarDate', - }, - DateConstructor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DateConstructor', - }, - Date: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Date', - }, + ActiveXObject: TYPE_VALUE, + ITextWriter: TYPE, + TextStreamBase: TYPE, + TextStreamWriter: TYPE, + TextStreamReader: TYPE, + SafeArray: TYPE_VALUE, + Enumerator: TYPE_VALUE, + EnumeratorConstructor: TYPE, + VBArray: TYPE_VALUE, + VBArrayConstructor: TYPE, + VarDate: TYPE_VALUE, + DateConstructor: TYPE, + Date: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/webworker.iterable.ts b/packages/scope-manager/src/lib/webworker.iterable.ts index e7f5e11cbe9e..11efc7c746fa 100644 --- a/packages/scope-manager/src/lib/webworker.iterable.ts +++ b/packages/scope-manager/src/lib/webworker.iterable.ts @@ -3,90 +3,21 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; export const webworker_iterable = { - Cache: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Cache', - }, - CanvasPathDrawingStyles: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasPathDrawingStyles', - }, - DOMStringList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMStringList', - }, - FileList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FileList', - }, - FormData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FormData', - }, - Headers: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Headers', - }, - IDBDatabase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBDatabase', - }, - IDBObjectStore: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBObjectStore', - }, - URLSearchParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'URLSearchParams', - }, - WEBGL_draw_buffers: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_draw_buffers', - }, - WebGL2RenderingContextBase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGL2RenderingContextBase', - }, - WebGL2RenderingContextOverloads: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGL2RenderingContextOverloads', - }, - WebGLRenderingContextBase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLRenderingContextBase', - }, - WebGLRenderingContextOverloads: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLRenderingContextOverloads', - }, + Cache: TYPE, + CanvasPathDrawingStyles: TYPE, + DOMStringList: TYPE, + FileList: TYPE, + FormData: TYPE, + Headers: TYPE, + IDBDatabase: TYPE, + IDBObjectStore: TYPE, + URLSearchParams: TYPE, + WEBGL_draw_buffers: TYPE, + WebGL2RenderingContextBase: TYPE, + WebGL2RenderingContextOverloads: TYPE, + WebGLRenderingContextBase: TYPE, + WebGLRenderingContextOverloads: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/webworker.ts b/packages/scope-manager/src/lib/webworker.ts index 8dca7959b25a..569e5ef31ccd 100644 --- a/packages/scope-manager/src/lib/webworker.ts +++ b/packages/scope-manager/src/lib/webworker.ts @@ -3,2466 +3,417 @@ // YOU CAN REGENERATE IT USING yarn generate:lib import { ImplicitLibVariableOptions } from '../variable'; +import { TYPE, TYPE_VALUE } from './base-config'; export const webworker = { - AddEventListenerOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AddEventListenerOptions', - }, - AesCbcParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesCbcParams', - }, - AesCtrParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesCtrParams', - }, - AesDerivedKeyParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesDerivedKeyParams', - }, - AesGcmParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesGcmParams', - }, - AesKeyAlgorithm: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesKeyAlgorithm', - }, - AesKeyGenParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesKeyGenParams', - }, - Algorithm: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Algorithm', - }, - BlobPropertyBag: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BlobPropertyBag', - }, - CacheQueryOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CacheQueryOptions', - }, - CanvasRenderingContext2DSettings: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasRenderingContext2DSettings', - }, - ClientQueryOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ClientQueryOptions', - }, - CloseEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CloseEventInit', - }, - CryptoKeyPair: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CryptoKeyPair', - }, - CustomEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CustomEventInit', - }, - DOMMatrix2DInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMMatrix2DInit', - }, - DOMMatrixInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMMatrixInit', - }, - DOMPointInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMPointInit', - }, - DOMQuadInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMQuadInit', - }, - DOMRectInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMRectInit', - }, - DevicePermissionDescriptor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DevicePermissionDescriptor', - }, - EcKeyGenParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EcKeyGenParams', - }, - EcKeyImportParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EcKeyImportParams', - }, - EcdhKeyDeriveParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EcdhKeyDeriveParams', - }, - EcdsaParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EcdsaParams', - }, - ErrorEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ErrorEventInit', - }, - EventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventInit', - }, - EventListenerOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventListenerOptions', - }, - EventSourceInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventSourceInit', - }, - ExtendableEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ExtendableEventInit', - }, - ExtendableMessageEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ExtendableMessageEventInit', - }, - FetchEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FetchEventInit', - }, - FilePropertyBag: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FilePropertyBag', - }, - GetNotificationOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GetNotificationOptions', - }, - HkdfParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HkdfParams', - }, - HmacImportParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HmacImportParams', - }, - HmacKeyGenParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HmacKeyGenParams', - }, - IDBIndexParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBIndexParameters', - }, - IDBObjectStoreParameters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBObjectStoreParameters', - }, - IDBVersionChangeEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBVersionChangeEventInit', - }, - ImageBitmapOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImageBitmapOptions', - }, - ImageBitmapRenderingContextSettings: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImageBitmapRenderingContextSettings', - }, - ImageEncodeOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImageEncodeOptions', - }, - ImportMeta: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImportMeta', - }, - JsonWebKey: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'JsonWebKey', - }, - KeyAlgorithm: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'KeyAlgorithm', - }, - MessageEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MessageEventInit', - }, - MidiPermissionDescriptor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MidiPermissionDescriptor', - }, - MultiCacheQueryOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MultiCacheQueryOptions', - }, - NavigationPreloadState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigationPreloadState', - }, - NotificationAction: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NotificationAction', - }, - NotificationEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NotificationEventInit', - }, - NotificationOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NotificationOptions', - }, - Pbkdf2Params: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Pbkdf2Params', - }, - PerformanceObserverInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PerformanceObserverInit', - }, - PermissionDescriptor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PermissionDescriptor', - }, - PostMessageOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PostMessageOptions', - }, - ProgressEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ProgressEventInit', - }, - PromiseRejectionEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PromiseRejectionEventInit', - }, - PushEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PushEventInit', - }, - PushPermissionDescriptor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PushPermissionDescriptor', - }, - PushSubscriptionJSON: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PushSubscriptionJSON', - }, - PushSubscriptionOptionsInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PushSubscriptionOptionsInit', - }, - QueuingStrategy: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'QueuingStrategy', - }, - QueuingStrategyInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'QueuingStrategyInit', - }, - ReadableStreamDefaultReadDoneResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableStreamDefaultReadDoneResult', - }, - ReadableStreamDefaultReadValueResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableStreamDefaultReadValueResult', - }, - ReadableWritablePair: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableWritablePair', - }, - RegistrationOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RegistrationOptions', - }, - RequestInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestInit', - }, - ResponseInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ResponseInit', - }, - RsaHashedImportParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaHashedImportParams', - }, - RsaHashedKeyGenParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaHashedKeyGenParams', - }, - RsaKeyGenParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaKeyGenParams', - }, - RsaOaepParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaOaepParams', - }, - RsaOtherPrimesInfo: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaOtherPrimesInfo', - }, - RsaPssParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RsaPssParams', - }, - StorageEstimate: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'StorageEstimate', - }, - StreamPipeOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'StreamPipeOptions', - }, - SyncEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SyncEventInit', - }, - TextDecodeOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextDecodeOptions', - }, - TextDecoderOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextDecoderOptions', - }, - TextEncoderEncodeIntoResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextEncoderEncodeIntoResult', - }, - Transformer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Transformer', - }, - UnderlyingSink: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSink', - }, - UnderlyingSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSource', - }, - WebGLContextAttributes: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLContextAttributes', - }, - WebGLContextEventInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLContextEventInit', - }, - WorkerOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WorkerOptions', - }, - EventListener: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventListener', - }, - ANGLE_instanced_arrays: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ANGLE_instanced_arrays', - }, - AbortController: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AbortController', - }, - AbortSignalEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AbortSignalEventMap', - }, - AbortSignal: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'AbortSignal', - }, - AbstractWorkerEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AbstractWorkerEventMap', - }, - AbstractWorker: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AbstractWorker', - }, - AesCfbParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesCfbParams', - }, - AesCmacParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AesCmacParams', - }, - AnimationFrameProvider: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AnimationFrameProvider', - }, - Blob: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Blob', - }, - Body: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Body', - }, - BroadcastChannelEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BroadcastChannelEventMap', - }, - BroadcastChannel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'BroadcastChannel', - }, - ByteLengthQueuingStrategy: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ByteLengthQueuingStrategy', - }, - Cache: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Cache', - }, - CacheStorage: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CacheStorage', - }, - CanvasCompositing: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasCompositing', - }, - CanvasDrawImage: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasDrawImage', - }, - CanvasDrawPath: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasDrawPath', - }, - CanvasFillStrokeStyles: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasFillStrokeStyles', - }, - CanvasFilters: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasFilters', - }, - CanvasGradient: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CanvasGradient', - }, - CanvasImageData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasImageData', - }, - CanvasImageSmoothing: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasImageSmoothing', - }, - CanvasPath: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasPath', - }, - CanvasPathDrawingStyles: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasPathDrawingStyles', - }, - CanvasPattern: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CanvasPattern', - }, - CanvasRect: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasRect', - }, - CanvasShadowStyles: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasShadowStyles', - }, - CanvasState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasState', - }, - CanvasText: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasText', - }, - CanvasTextDrawingStyles: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasTextDrawingStyles', - }, - CanvasTransform: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasTransform', - }, - Client: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Client', - }, - Clients: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Clients', - }, - CloseEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CloseEvent', - }, - ConcatParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ConcatParams', - }, - CountQueuingStrategy: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CountQueuingStrategy', - }, - Crypto: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Crypto', - }, - CryptoKey: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CryptoKey', - }, - CustomEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'CustomEvent', - }, - DOMException: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMException', - }, - DOMMatrix: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMMatrix', - }, - DOMMatrixReadOnly: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMMatrixReadOnly', - }, - DOMPoint: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMPoint', - }, - DOMPointReadOnly: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMPointReadOnly', - }, - DOMQuad: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMQuad', - }, - DOMRect: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMRect', - }, - DOMRectReadOnly: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMRectReadOnly', - }, - DOMStringList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DOMStringList', - }, - DedicatedWorkerGlobalScopeEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DedicatedWorkerGlobalScopeEventMap', - }, - DedicatedWorkerGlobalScope: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'DedicatedWorkerGlobalScope', - }, - DhImportKeyParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DhImportKeyParams', - }, - DhKeyAlgorithm: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DhKeyAlgorithm', - }, - DhKeyDeriveParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DhKeyDeriveParams', - }, - DhKeyGenParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DhKeyGenParams', - }, - EXT_blend_minmax: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EXT_blend_minmax', - }, - EXT_frag_depth: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EXT_frag_depth', - }, - EXT_sRGB: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EXT_sRGB', - }, - EXT_shader_texture_lod: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EXT_shader_texture_lod', - }, - EXT_texture_filter_anisotropic: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EXT_texture_filter_anisotropic', - }, - ErrorEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ErrorEvent', - }, - Event: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Event', - }, - EventListenerObject: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventListenerObject', - }, - EventSourceEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventSourceEventMap', - }, - EventSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'EventSource', - }, - EventTarget: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'EventTarget', - }, - ExtendableEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ExtendableEvent', - }, - ExtendableMessageEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ExtendableMessageEvent', - }, - FetchEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'FetchEvent', - }, - File: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'File', - }, - FileList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'FileList', - }, - FileReaderEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FileReaderEventMap', - }, - FileReader: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'FileReader', - }, - FileReaderSync: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'FileReaderSync', - }, - FormData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'FormData', - }, - GenericTransformStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GenericTransformStream', - }, - Headers: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Headers', - }, - IDBArrayKey: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBArrayKey', - }, - IDBCursor: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBCursor', - }, - IDBCursorWithValue: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBCursorWithValue', - }, - IDBDatabaseEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBDatabaseEventMap', - }, - IDBDatabase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBDatabase', - }, - IDBFactory: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBFactory', - }, - IDBIndex: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBIndex', - }, - IDBKeyRange: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBKeyRange', - }, - IDBObjectStore: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBObjectStore', - }, - IDBOpenDBRequestEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBOpenDBRequestEventMap', - }, - IDBOpenDBRequest: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBOpenDBRequest', - }, - IDBRequestEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBRequestEventMap', - }, - IDBRequest: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBRequest', - }, - IDBTransactionEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBTransactionEventMap', - }, - IDBTransaction: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBTransaction', - }, - IDBVersionChangeEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'IDBVersionChangeEvent', - }, - ImageBitmap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ImageBitmap', - }, - ImageBitmapRenderingContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ImageBitmapRenderingContext', - }, - ImageData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ImageData', - }, - MessageChannel: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MessageChannel', - }, - MessageEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MessageEvent', - }, - MessagePortEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MessagePortEventMap', - }, - MessagePort: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'MessagePort', - }, - NavigationPreloadManager: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'NavigationPreloadManager', - }, - NavigatorConcurrentHardware: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorConcurrentHardware', - }, - NavigatorID: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorID', - }, - NavigatorLanguage: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorLanguage', - }, - NavigatorOnLine: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorOnLine', - }, - NavigatorStorage: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NavigatorStorage', - }, - NotificationEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NotificationEventMap', - }, - Notification: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Notification', - }, - NotificationEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'NotificationEvent', - }, - OES_element_index_uint: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_element_index_uint', - }, - OES_standard_derivatives: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_standard_derivatives', - }, - OES_texture_float: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_texture_float', - }, - OES_texture_float_linear: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_texture_float_linear', - }, - OES_texture_half_float: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_texture_half_float', - }, - OES_texture_half_float_linear: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_texture_half_float_linear', - }, - OES_vertex_array_object: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OES_vertex_array_object', - }, - OffscreenCanvas: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'OffscreenCanvas', - }, - OffscreenCanvasRenderingContext2D: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'OffscreenCanvasRenderingContext2D', - }, - Path2D: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Path2D', - }, - PerformanceEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PerformanceEventMap', - }, - Performance: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Performance', - }, - PerformanceEntry: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceEntry', - }, - PerformanceMark: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceMark', - }, - PerformanceMeasure: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceMeasure', - }, - PerformanceObserver: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceObserver', - }, - PerformanceObserverEntryList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceObserverEntryList', - }, - PerformanceResourceTiming: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PerformanceResourceTiming', - }, - PermissionStatusEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PermissionStatusEventMap', - }, - PermissionStatus: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PermissionStatus', - }, - Permissions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Permissions', - }, - ProgressEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ProgressEvent', - }, - PromiseRejectionEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PromiseRejectionEvent', - }, - PushEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PushEvent', - }, - PushManager: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PushManager', - }, - PushMessageData: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PushMessageData', - }, - PushSubscription: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PushSubscription', - }, - PushSubscriptionOptions: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'PushSubscriptionOptions', - }, - ReadableStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ReadableStream', - }, - ReadableStreamDefaultController: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ReadableStreamDefaultController', - }, - ReadableStreamDefaultReader: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ReadableStreamDefaultReader', - }, - ReadableStreamGenericReader: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableStreamGenericReader', - }, - Request: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Request', - }, - Response: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Response', - }, - ServiceWorkerEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ServiceWorkerEventMap', - }, - ServiceWorker: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ServiceWorker', - }, - ServiceWorkerContainerEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ServiceWorkerContainerEventMap', - }, - ServiceWorkerContainer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ServiceWorkerContainer', - }, - ServiceWorkerGlobalScopeEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ServiceWorkerGlobalScopeEventMap', - }, - ServiceWorkerGlobalScope: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ServiceWorkerGlobalScope', - }, - ServiceWorkerRegistrationEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ServiceWorkerRegistrationEventMap', - }, - ServiceWorkerRegistration: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'ServiceWorkerRegistration', - }, - SharedWorker: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SharedWorker', - }, - SharedWorkerGlobalScopeEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'SharedWorkerGlobalScopeEventMap', - }, - SharedWorkerGlobalScope: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SharedWorkerGlobalScope', - }, - StorageManager: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'StorageManager', - }, - SubtleCrypto: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SubtleCrypto', - }, - SyncEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SyncEvent', - }, - SyncManager: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'SyncManager', - }, - TextDecoder: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextDecoder', - }, - TextDecoderCommon: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextDecoderCommon', - }, - TextDecoderStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextDecoderStream', - }, - TextEncoder: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextEncoder', - }, - TextEncoderCommon: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TextEncoderCommon', - }, - TextEncoderStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextEncoderStream', - }, - TextMetrics: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TextMetrics', - }, - TransformStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TransformStream', - }, - TransformStreamDefaultController: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'TransformStreamDefaultController', - }, - URL: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'URL', - }, - URLSearchParams: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'URLSearchParams', - }, - WEBGL_color_buffer_float: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_color_buffer_float', - }, - WEBGL_compressed_texture_astc: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_compressed_texture_astc', - }, - WEBGL_compressed_texture_s3tc: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_compressed_texture_s3tc', - }, - WEBGL_compressed_texture_s3tc_srgb: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_compressed_texture_s3tc_srgb', - }, - WEBGL_debug_renderer_info: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_debug_renderer_info', - }, - WEBGL_debug_shaders: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_debug_shaders', - }, - WEBGL_depth_texture: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_depth_texture', - }, - WEBGL_draw_buffers: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_draw_buffers', - }, - WEBGL_lose_context: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WEBGL_lose_context', - }, - WebGL2RenderingContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGL2RenderingContext', - }, - WebGL2RenderingContextBase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGL2RenderingContextBase', - }, - WebGL2RenderingContextOverloads: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGL2RenderingContextOverloads', - }, - WebGLActiveInfo: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLActiveInfo', - }, - WebGLBuffer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLBuffer', - }, - WebGLContextEvent: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLContextEvent', - }, - WebGLFramebuffer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLFramebuffer', - }, - WebGLProgram: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLProgram', - }, - WebGLQuery: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLQuery', - }, - WebGLRenderbuffer: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLRenderbuffer', - }, - WebGLRenderingContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLRenderingContext', - }, - WebGLRenderingContextBase: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLRenderingContextBase', - }, - WebGLRenderingContextOverloads: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLRenderingContextOverloads', - }, - WebGLSampler: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLSampler', - }, - WebGLShader: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLShader', - }, - WebGLShaderPrecisionFormat: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLShaderPrecisionFormat', - }, - WebGLSync: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLSync', - }, - WebGLTexture: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLTexture', - }, - WebGLTransformFeedback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLTransformFeedback', - }, - WebGLUniformLocation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLUniformLocation', - }, - WebGLVertexArrayObject: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebGLVertexArrayObject', - }, - WebGLVertexArrayObjectOES: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLVertexArrayObjectOES', - }, - WebSocketEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebSocketEventMap', - }, - WebSocket: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebSocket', - }, - WindowClient: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WindowClient', - }, - WindowOrWorkerGlobalScope: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WindowOrWorkerGlobalScope', - }, - WorkerEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WorkerEventMap', - }, - Worker: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'Worker', - }, - WorkerGlobalScopeEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WorkerGlobalScopeEventMap', - }, - WorkerGlobalScope: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WorkerGlobalScope', - }, - WorkerLocation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WorkerLocation', - }, - WorkerNavigator: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WorkerNavigator', - }, - WritableStream: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WritableStream', - }, - WritableStreamDefaultController: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WritableStreamDefaultController', - }, - WritableStreamDefaultWriter: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WritableStreamDefaultWriter', - }, - XMLHttpRequestEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'XMLHttpRequestEventMap', - }, - XMLHttpRequest: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'XMLHttpRequest', - }, - XMLHttpRequestEventTargetEventMap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'XMLHttpRequestEventTargetEventMap', - }, - XMLHttpRequestEventTarget: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'XMLHttpRequestEventTarget', - }, - XMLHttpRequestUpload: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'XMLHttpRequestUpload', - }, - EventListenerOrEventListenerObject: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EventListenerOrEventListenerObject', - }, - Console: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Console', - }, - WebAssembly: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: true, - name: 'WebAssembly', - }, - FrameRequestCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FrameRequestCallback', - }, - OnErrorEventHandlerNonNull: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OnErrorEventHandlerNonNull', - }, - PerformanceObserverCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PerformanceObserverCallback', - }, - QueuingStrategySize: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'QueuingStrategySize', - }, - TransformerFlushCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TransformerFlushCallback', - }, - TransformerStartCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TransformerStartCallback', - }, - TransformerTransformCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TransformerTransformCallback', - }, - UnderlyingSinkAbortCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSinkAbortCallback', - }, - UnderlyingSinkCloseCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSinkCloseCallback', - }, - UnderlyingSinkStartCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSinkStartCallback', - }, - UnderlyingSinkWriteCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSinkWriteCallback', - }, - UnderlyingSourceCancelCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSourceCancelCallback', - }, - UnderlyingSourcePullCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSourcePullCallback', - }, - UnderlyingSourceStartCallback: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'UnderlyingSourceStartCallback', - }, - VoidFunction: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VoidFunction', - }, - HeadersInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HeadersInit', - }, - BodyInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BodyInit', - }, - RequestInfo: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestInfo', - }, - BlobPart: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BlobPart', - }, - DOMHighResTimeStamp: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMHighResTimeStamp', - }, - CanvasImageSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasImageSource', - }, - OffscreenRenderingContext: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OffscreenRenderingContext', - }, - MessageEventSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'MessageEventSource', - }, - ImageBitmapSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImageBitmapSource', - }, - OnErrorEventHandler: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OnErrorEventHandler', - }, - TimerHandler: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TimerHandler', - }, - PerformanceEntryList: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PerformanceEntryList', - }, - PushMessageDataInit: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PushMessageDataInit', - }, - ReadableStreamReader: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableStreamReader', - }, - ReadableStreamController: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableStreamController', - }, - VibratePattern: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VibratePattern', - }, - AlgorithmIdentifier: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'AlgorithmIdentifier', - }, - HashAlgorithmIdentifier: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'HashAlgorithmIdentifier', - }, - BigInteger: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BigInteger', - }, - NamedCurve: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NamedCurve', - }, - GLenum: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLenum', - }, - GLboolean: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLboolean', - }, - GLbitfield: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLbitfield', - }, - GLint: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLint', - }, - GLsizei: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLsizei', - }, - GLintptr: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLintptr', - }, - GLsizeiptr: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLsizeiptr', - }, - GLuint: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLuint', - }, - GLfloat: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLfloat', - }, - GLclampf: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLclampf', - }, - TexImageSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'TexImageSource', - }, - Float32List: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Float32List', - }, - Int32List: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Int32List', - }, - GLint64: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLint64', - }, - GLuint64: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'GLuint64', - }, - Uint32List: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Uint32List', - }, - BufferSource: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BufferSource', - }, - DOMTimeStamp: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'DOMTimeStamp', - }, - FormDataEntryValue: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FormDataEntryValue', - }, - IDBValidKey: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBValidKey', - }, - Transferable: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'Transferable', - }, - ReadableStreamDefaultReadResult: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReadableStreamDefaultReadResult', - }, - BinaryType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'BinaryType', - }, - CanvasDirection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasDirection', - }, - CanvasFillRule: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasFillRule', - }, - CanvasLineCap: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasLineCap', - }, - CanvasLineJoin: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasLineJoin', - }, - CanvasTextAlign: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasTextAlign', - }, - CanvasTextBaseline: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'CanvasTextBaseline', - }, - ClientTypes: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ClientTypes', - }, - ColorSpaceConversion: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ColorSpaceConversion', - }, - EndingType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'EndingType', - }, - FrameType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'FrameType', - }, - IDBCursorDirection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBCursorDirection', - }, - IDBRequestReadyState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBRequestReadyState', - }, - IDBTransactionMode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'IDBTransactionMode', - }, - ImageOrientation: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImageOrientation', - }, - ImageSmoothingQuality: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ImageSmoothingQuality', - }, - KeyFormat: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'KeyFormat', - }, - KeyType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'KeyType', - }, - KeyUsage: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'KeyUsage', - }, - NotificationDirection: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NotificationDirection', - }, - NotificationPermission: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'NotificationPermission', - }, - OffscreenRenderingContextId: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'OffscreenRenderingContextId', - }, - PermissionName: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PermissionName', - }, - PermissionState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PermissionState', - }, - PremultiplyAlpha: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PremultiplyAlpha', - }, - PushEncryptionKeyName: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PushEncryptionKeyName', - }, - PushPermissionState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'PushPermissionState', - }, - ReferrerPolicy: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ReferrerPolicy', - }, - RequestCache: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestCache', - }, - RequestCredentials: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestCredentials', - }, - RequestDestination: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestDestination', - }, - RequestMode: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestMode', - }, - RequestRedirect: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'RequestRedirect', - }, - ResizeQuality: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ResizeQuality', - }, - ResponseType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ResponseType', - }, - ServiceWorkerState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ServiceWorkerState', - }, - ServiceWorkerUpdateViaCache: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'ServiceWorkerUpdateViaCache', - }, - VisibilityState: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'VisibilityState', - }, - WebGLPowerPreference: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WebGLPowerPreference', - }, - WorkerType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'WorkerType', - }, - XMLHttpRequestResponseType: { - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: true, - isValueVariable: false, - name: 'XMLHttpRequestResponseType', - }, + AddEventListenerOptions: TYPE, + AesCbcParams: TYPE, + AesCtrParams: TYPE, + AesDerivedKeyParams: TYPE, + AesGcmParams: TYPE, + AesKeyAlgorithm: TYPE, + AesKeyGenParams: TYPE, + Algorithm: TYPE, + BlobPropertyBag: TYPE, + CacheQueryOptions: TYPE, + CanvasRenderingContext2DSettings: TYPE, + ClientQueryOptions: TYPE, + CloseEventInit: TYPE, + CryptoKeyPair: TYPE, + CustomEventInit: TYPE, + DOMMatrix2DInit: TYPE, + DOMMatrixInit: TYPE, + DOMPointInit: TYPE, + DOMQuadInit: TYPE, + DOMRectInit: TYPE, + DevicePermissionDescriptor: TYPE, + EcKeyGenParams: TYPE, + EcKeyImportParams: TYPE, + EcdhKeyDeriveParams: TYPE, + EcdsaParams: TYPE, + ErrorEventInit: TYPE, + EventInit: TYPE, + EventListenerOptions: TYPE, + EventSourceInit: TYPE, + ExtendableEventInit: TYPE, + ExtendableMessageEventInit: TYPE, + FetchEventInit: TYPE, + FilePropertyBag: TYPE, + GetNotificationOptions: TYPE, + HkdfParams: TYPE, + HmacImportParams: TYPE, + HmacKeyGenParams: TYPE, + IDBIndexParameters: TYPE, + IDBObjectStoreParameters: TYPE, + IDBVersionChangeEventInit: TYPE, + ImageBitmapOptions: TYPE, + ImageBitmapRenderingContextSettings: TYPE, + ImageEncodeOptions: TYPE, + ImportMeta: TYPE, + JsonWebKey: TYPE, + KeyAlgorithm: TYPE, + MessageEventInit: TYPE, + MidiPermissionDescriptor: TYPE, + MultiCacheQueryOptions: TYPE, + NavigationPreloadState: TYPE, + NotificationAction: TYPE, + NotificationEventInit: TYPE, + NotificationOptions: TYPE, + Pbkdf2Params: TYPE, + PerformanceObserverInit: TYPE, + PermissionDescriptor: TYPE, + PostMessageOptions: TYPE, + ProgressEventInit: TYPE, + PromiseRejectionEventInit: TYPE, + PushEventInit: TYPE, + PushPermissionDescriptor: TYPE, + PushSubscriptionJSON: TYPE, + PushSubscriptionOptionsInit: TYPE, + QueuingStrategy: TYPE, + QueuingStrategyInit: TYPE, + ReadableStreamDefaultReadDoneResult: TYPE, + ReadableStreamDefaultReadValueResult: TYPE, + ReadableWritablePair: TYPE, + RegistrationOptions: TYPE, + RequestInit: TYPE, + ResponseInit: TYPE, + RsaHashedImportParams: TYPE, + RsaHashedKeyGenParams: TYPE, + RsaKeyGenParams: TYPE, + RsaOaepParams: TYPE, + RsaOtherPrimesInfo: TYPE, + RsaPssParams: TYPE, + StorageEstimate: TYPE, + StreamPipeOptions: TYPE, + SyncEventInit: TYPE, + TextDecodeOptions: TYPE, + TextDecoderOptions: TYPE, + TextEncoderEncodeIntoResult: TYPE, + Transformer: TYPE, + UnderlyingSink: TYPE, + UnderlyingSource: TYPE, + WebGLContextAttributes: TYPE, + WebGLContextEventInit: TYPE, + WorkerOptions: TYPE, + EventListener: TYPE, + ANGLE_instanced_arrays: TYPE, + AbortController: TYPE_VALUE, + AbortSignalEventMap: TYPE, + AbortSignal: TYPE_VALUE, + AbstractWorkerEventMap: TYPE, + AbstractWorker: TYPE, + AesCfbParams: TYPE, + AesCmacParams: TYPE, + AnimationFrameProvider: TYPE, + Blob: TYPE_VALUE, + Body: TYPE, + BroadcastChannelEventMap: TYPE, + BroadcastChannel: TYPE_VALUE, + ByteLengthQueuingStrategy: TYPE_VALUE, + Cache: TYPE_VALUE, + CacheStorage: TYPE_VALUE, + CanvasCompositing: TYPE, + CanvasDrawImage: TYPE, + CanvasDrawPath: TYPE, + CanvasFillStrokeStyles: TYPE, + CanvasFilters: TYPE, + CanvasGradient: TYPE_VALUE, + CanvasImageData: TYPE, + CanvasImageSmoothing: TYPE, + CanvasPath: TYPE, + CanvasPathDrawingStyles: TYPE, + CanvasPattern: TYPE_VALUE, + CanvasRect: TYPE, + CanvasShadowStyles: TYPE, + CanvasState: TYPE, + CanvasText: TYPE, + CanvasTextDrawingStyles: TYPE, + CanvasTransform: TYPE, + Client: TYPE_VALUE, + Clients: TYPE_VALUE, + CloseEvent: TYPE_VALUE, + ConcatParams: TYPE, + CountQueuingStrategy: TYPE_VALUE, + Crypto: TYPE_VALUE, + CryptoKey: TYPE_VALUE, + CustomEvent: TYPE_VALUE, + DOMException: TYPE_VALUE, + DOMMatrix: TYPE_VALUE, + DOMMatrixReadOnly: TYPE_VALUE, + DOMPoint: TYPE_VALUE, + DOMPointReadOnly: TYPE_VALUE, + DOMQuad: TYPE_VALUE, + DOMRect: TYPE_VALUE, + DOMRectReadOnly: TYPE_VALUE, + DOMStringList: TYPE_VALUE, + DedicatedWorkerGlobalScopeEventMap: TYPE, + DedicatedWorkerGlobalScope: TYPE_VALUE, + DhImportKeyParams: TYPE, + DhKeyAlgorithm: TYPE, + DhKeyDeriveParams: TYPE, + DhKeyGenParams: TYPE, + EXT_blend_minmax: TYPE, + EXT_frag_depth: TYPE, + EXT_sRGB: TYPE, + EXT_shader_texture_lod: TYPE, + EXT_texture_filter_anisotropic: TYPE, + ErrorEvent: TYPE_VALUE, + Event: TYPE_VALUE, + EventListenerObject: TYPE, + EventSourceEventMap: TYPE, + EventSource: TYPE_VALUE, + EventTarget: TYPE_VALUE, + ExtendableEvent: TYPE_VALUE, + ExtendableMessageEvent: TYPE_VALUE, + FetchEvent: TYPE_VALUE, + File: TYPE_VALUE, + FileList: TYPE_VALUE, + FileReaderEventMap: TYPE, + FileReader: TYPE_VALUE, + FileReaderSync: TYPE_VALUE, + FormData: TYPE_VALUE, + GenericTransformStream: TYPE, + Headers: TYPE_VALUE, + IDBArrayKey: TYPE, + IDBCursor: TYPE_VALUE, + IDBCursorWithValue: TYPE_VALUE, + IDBDatabaseEventMap: TYPE, + IDBDatabase: TYPE_VALUE, + IDBFactory: TYPE_VALUE, + IDBIndex: TYPE_VALUE, + IDBKeyRange: TYPE_VALUE, + IDBObjectStore: TYPE_VALUE, + IDBOpenDBRequestEventMap: TYPE, + IDBOpenDBRequest: TYPE_VALUE, + IDBRequestEventMap: TYPE, + IDBRequest: TYPE_VALUE, + IDBTransactionEventMap: TYPE, + IDBTransaction: TYPE_VALUE, + IDBVersionChangeEvent: TYPE_VALUE, + ImageBitmap: TYPE_VALUE, + ImageBitmapRenderingContext: TYPE_VALUE, + ImageData: TYPE_VALUE, + MessageChannel: TYPE_VALUE, + MessageEvent: TYPE_VALUE, + MessagePortEventMap: TYPE, + MessagePort: TYPE_VALUE, + NavigationPreloadManager: TYPE_VALUE, + NavigatorConcurrentHardware: TYPE, + NavigatorID: TYPE, + NavigatorLanguage: TYPE, + NavigatorOnLine: TYPE, + NavigatorStorage: TYPE, + NotificationEventMap: TYPE, + Notification: TYPE_VALUE, + NotificationEvent: TYPE_VALUE, + OES_element_index_uint: TYPE, + OES_standard_derivatives: TYPE, + OES_texture_float: TYPE, + OES_texture_float_linear: TYPE, + OES_texture_half_float: TYPE, + OES_texture_half_float_linear: TYPE, + OES_vertex_array_object: TYPE, + OffscreenCanvas: TYPE_VALUE, + OffscreenCanvasRenderingContext2D: TYPE_VALUE, + Path2D: TYPE_VALUE, + PerformanceEventMap: TYPE, + Performance: TYPE_VALUE, + PerformanceEntry: TYPE_VALUE, + PerformanceMark: TYPE_VALUE, + PerformanceMeasure: TYPE_VALUE, + PerformanceObserver: TYPE_VALUE, + PerformanceObserverEntryList: TYPE_VALUE, + PerformanceResourceTiming: TYPE_VALUE, + PermissionStatusEventMap: TYPE, + PermissionStatus: TYPE_VALUE, + Permissions: TYPE_VALUE, + ProgressEvent: TYPE_VALUE, + PromiseRejectionEvent: TYPE_VALUE, + PushEvent: TYPE_VALUE, + PushManager: TYPE_VALUE, + PushMessageData: TYPE_VALUE, + PushSubscription: TYPE_VALUE, + PushSubscriptionOptions: TYPE_VALUE, + ReadableStream: TYPE_VALUE, + ReadableStreamDefaultController: TYPE_VALUE, + ReadableStreamDefaultReader: TYPE_VALUE, + ReadableStreamGenericReader: TYPE, + Request: TYPE_VALUE, + Response: TYPE_VALUE, + ServiceWorkerEventMap: TYPE, + ServiceWorker: TYPE_VALUE, + ServiceWorkerContainerEventMap: TYPE, + ServiceWorkerContainer: TYPE_VALUE, + ServiceWorkerGlobalScopeEventMap: TYPE, + ServiceWorkerGlobalScope: TYPE_VALUE, + ServiceWorkerRegistrationEventMap: TYPE, + ServiceWorkerRegistration: TYPE_VALUE, + SharedWorker: TYPE_VALUE, + SharedWorkerGlobalScopeEventMap: TYPE, + SharedWorkerGlobalScope: TYPE_VALUE, + StorageManager: TYPE_VALUE, + SubtleCrypto: TYPE_VALUE, + SyncEvent: TYPE_VALUE, + SyncManager: TYPE_VALUE, + TextDecoder: TYPE_VALUE, + TextDecoderCommon: TYPE, + TextDecoderStream: TYPE_VALUE, + TextEncoder: TYPE_VALUE, + TextEncoderCommon: TYPE, + TextEncoderStream: TYPE_VALUE, + TextMetrics: TYPE_VALUE, + TransformStream: TYPE_VALUE, + TransformStreamDefaultController: TYPE_VALUE, + URL: TYPE_VALUE, + URLSearchParams: TYPE_VALUE, + WEBGL_color_buffer_float: TYPE, + WEBGL_compressed_texture_astc: TYPE, + WEBGL_compressed_texture_s3tc: TYPE, + WEBGL_compressed_texture_s3tc_srgb: TYPE, + WEBGL_debug_renderer_info: TYPE, + WEBGL_debug_shaders: TYPE, + WEBGL_depth_texture: TYPE, + WEBGL_draw_buffers: TYPE, + WEBGL_lose_context: TYPE, + WebGL2RenderingContext: TYPE_VALUE, + WebGL2RenderingContextBase: TYPE, + WebGL2RenderingContextOverloads: TYPE, + WebGLActiveInfo: TYPE_VALUE, + WebGLBuffer: TYPE_VALUE, + WebGLContextEvent: TYPE_VALUE, + WebGLFramebuffer: TYPE_VALUE, + WebGLProgram: TYPE_VALUE, + WebGLQuery: TYPE_VALUE, + WebGLRenderbuffer: TYPE_VALUE, + WebGLRenderingContext: TYPE_VALUE, + WebGLRenderingContextBase: TYPE, + WebGLRenderingContextOverloads: TYPE, + WebGLSampler: TYPE_VALUE, + WebGLShader: TYPE_VALUE, + WebGLShaderPrecisionFormat: TYPE_VALUE, + WebGLSync: TYPE_VALUE, + WebGLTexture: TYPE_VALUE, + WebGLTransformFeedback: TYPE_VALUE, + WebGLUniformLocation: TYPE_VALUE, + WebGLVertexArrayObject: TYPE_VALUE, + WebGLVertexArrayObjectOES: TYPE, + WebSocketEventMap: TYPE, + WebSocket: TYPE_VALUE, + WindowClient: TYPE_VALUE, + WindowOrWorkerGlobalScope: TYPE, + WorkerEventMap: TYPE, + Worker: TYPE_VALUE, + WorkerGlobalScopeEventMap: TYPE, + WorkerGlobalScope: TYPE_VALUE, + WorkerLocation: TYPE_VALUE, + WorkerNavigator: TYPE_VALUE, + WritableStream: TYPE_VALUE, + WritableStreamDefaultController: TYPE_VALUE, + WritableStreamDefaultWriter: TYPE_VALUE, + XMLHttpRequestEventMap: TYPE, + XMLHttpRequest: TYPE_VALUE, + XMLHttpRequestEventTargetEventMap: TYPE, + XMLHttpRequestEventTarget: TYPE_VALUE, + XMLHttpRequestUpload: TYPE_VALUE, + EventListenerOrEventListenerObject: TYPE, + Console: TYPE, + WebAssembly: TYPE_VALUE, + FrameRequestCallback: TYPE, + OnErrorEventHandlerNonNull: TYPE, + PerformanceObserverCallback: TYPE, + QueuingStrategySize: TYPE, + TransformerFlushCallback: TYPE, + TransformerStartCallback: TYPE, + TransformerTransformCallback: TYPE, + UnderlyingSinkAbortCallback: TYPE, + UnderlyingSinkCloseCallback: TYPE, + UnderlyingSinkStartCallback: TYPE, + UnderlyingSinkWriteCallback: TYPE, + UnderlyingSourceCancelCallback: TYPE, + UnderlyingSourcePullCallback: TYPE, + UnderlyingSourceStartCallback: TYPE, + VoidFunction: TYPE, + HeadersInit: TYPE, + BodyInit: TYPE, + RequestInfo: TYPE, + BlobPart: TYPE, + DOMHighResTimeStamp: TYPE, + CanvasImageSource: TYPE, + OffscreenRenderingContext: TYPE, + MessageEventSource: TYPE, + ImageBitmapSource: TYPE, + OnErrorEventHandler: TYPE, + TimerHandler: TYPE, + PerformanceEntryList: TYPE, + PushMessageDataInit: TYPE, + ReadableStreamReader: TYPE, + ReadableStreamController: TYPE, + VibratePattern: TYPE, + AlgorithmIdentifier: TYPE, + HashAlgorithmIdentifier: TYPE, + BigInteger: TYPE, + NamedCurve: TYPE, + GLenum: TYPE, + GLboolean: TYPE, + GLbitfield: TYPE, + GLint: TYPE, + GLsizei: TYPE, + GLintptr: TYPE, + GLsizeiptr: TYPE, + GLuint: TYPE, + GLfloat: TYPE, + GLclampf: TYPE, + TexImageSource: TYPE, + Float32List: TYPE, + Int32List: TYPE, + GLint64: TYPE, + GLuint64: TYPE, + Uint32List: TYPE, + BufferSource: TYPE, + DOMTimeStamp: TYPE, + FormDataEntryValue: TYPE, + IDBValidKey: TYPE, + Transferable: TYPE, + ReadableStreamDefaultReadResult: TYPE, + BinaryType: TYPE, + CanvasDirection: TYPE, + CanvasFillRule: TYPE, + CanvasLineCap: TYPE, + CanvasLineJoin: TYPE, + CanvasTextAlign: TYPE, + CanvasTextBaseline: TYPE, + ClientTypes: TYPE, + ColorSpaceConversion: TYPE, + EndingType: TYPE, + FrameType: TYPE, + IDBCursorDirection: TYPE, + IDBRequestReadyState: TYPE, + IDBTransactionMode: TYPE, + ImageOrientation: TYPE, + ImageSmoothingQuality: TYPE, + KeyFormat: TYPE, + KeyType: TYPE, + KeyUsage: TYPE, + NotificationDirection: TYPE, + NotificationPermission: TYPE, + OffscreenRenderingContextId: TYPE, + PermissionName: TYPE, + PermissionState: TYPE, + PremultiplyAlpha: TYPE, + PushEncryptionKeyName: TYPE, + PushPermissionState: TYPE, + ReferrerPolicy: TYPE, + RequestCache: TYPE, + RequestCredentials: TYPE, + RequestDestination: TYPE, + RequestMode: TYPE, + RequestRedirect: TYPE, + ResizeQuality: TYPE, + ResponseType: TYPE, + ServiceWorkerState: TYPE, + ServiceWorkerUpdateViaCache: TYPE, + VisibilityState: TYPE, + WebGLPowerPreference: TYPE, + WorkerType: TYPE, + XMLHttpRequestResponseType: TYPE, } as Record; diff --git a/packages/scope-manager/src/referencer/Referencer.ts b/packages/scope-manager/src/referencer/Referencer.ts index ef8bb513822f..f35830e6acda 100644 --- a/packages/scope-manager/src/referencer/Referencer.ts +++ b/packages/scope-manager/src/referencer/Referencer.ts @@ -87,14 +87,13 @@ class Referencer extends Visitor { /* istanbul ignore if */ if (!variables) { throw new Error(`Invalid value for lib provided: ${lib}`); } - for (const variable of Object.values(variables)) { - globalScope.defineImplicitVariable(variable); + for (const [name, variable] of Object.entries(variables)) { + globalScope.defineImplicitVariable(name, variable); } } // for const assertions (`{} as const` / `{}`) - globalScope.defineImplicitVariable({ - name: 'const', + globalScope.defineImplicitVariable('const', { eslintImplicitGlobalSetting: 'readonly', isTypeVariable: true, isValueVariable: false, diff --git a/packages/scope-manager/src/scope/GlobalScope.ts b/packages/scope-manager/src/scope/GlobalScope.ts index 58701eaa0676..9dfb1e30284e 100644 --- a/packages/scope-manager/src/scope/GlobalScope.ts +++ b/packages/scope-manager/src/scope/GlobalScope.ts @@ -40,9 +40,12 @@ class GlobalScope extends ScopeBase< }; } - public defineImplicitVariable(options: ImplicitLibVariableOptions): void { + public defineImplicitVariable( + name: string, + options: ImplicitLibVariableOptions, + ): void { this.defineVariable( - new ImplicitLibVariable(this, options), + new ImplicitLibVariable(this, name, options), this.set, this.variables, null, diff --git a/packages/scope-manager/src/variable/ImplicitLibVariable.ts b/packages/scope-manager/src/variable/ImplicitLibVariable.ts index ee3d69995d7a..898ee4a6fb7a 100644 --- a/packages/scope-manager/src/variable/ImplicitLibVariable.ts +++ b/packages/scope-manager/src/variable/ImplicitLibVariable.ts @@ -6,7 +6,6 @@ interface ImplicitLibVariableOptions { readonly eslintImplicitGlobalSetting?: ESLintScopeVariable['eslintImplicitGlobalSetting']; readonly isTypeVariable?: boolean; readonly isValueVariable?: boolean; - readonly name: string; readonly writeable?: boolean; } @@ -26,10 +25,10 @@ class ImplicitLibVariable extends ESLintScopeVariable implements Variable { public constructor( scope: Scope, + name: string, { isTypeVariable, isValueVariable, - name, writeable, eslintImplicitGlobalSetting, }: ImplicitLibVariableOptions, diff --git a/packages/scope-manager/tools/generate-lib.ts b/packages/scope-manager/tools/generate-lib.ts index e1b33689f63c..eaa6faa85e63 100644 --- a/packages/scope-manager/tools/generate-lib.ts +++ b/packages/scope-manager/tools/generate-lib.ts @@ -51,6 +51,17 @@ const TYPES_FILE = path.resolve( 'lib.ts', ); +const BASE_CONFIG_MODULE_NAME = 'base-config'; +const SHARED_CONFIG_MODULE = path.resolve( + OUTPUT_FOLDER, + `${BASE_CONFIG_MODULE_NAME}.ts`, +); +enum BASE_CONFIG_EXPORT_NAMES { + TYPE = 'TYPE', + VALUE = 'VALUE', + TYPE_AND_VALUE = 'TYPE_VALUE', +} + function formatCode(code: string[]): string { return format(addAutoGeneratedComment(code), { parser: 'typescript', @@ -108,6 +119,35 @@ function main(): void { // ignored } + // the shared + fs.writeFileSync( + SHARED_CONFIG_MODULE, + formatCode([ + `export const ${ + BASE_CONFIG_EXPORT_NAMES.TYPE + } = Object.freeze(${JSON.stringify({ + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, + })});`, + `export const ${ + BASE_CONFIG_EXPORT_NAMES.VALUE + } = Object.freeze(${JSON.stringify({ + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: false, + isValueVariable: true, + })});`, + `export const ${ + BASE_CONFIG_EXPORT_NAMES.TYPE_AND_VALUE + } = Object.freeze(${JSON.stringify({ + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: true, + })});`, + '', + ]), + ); + for (const [libName, filename] of libMap) { const libPath = path.join(TS_LIB_FOLDER, filename); const { ast, scopeManager } = parseAndAnalyze( @@ -142,24 +182,42 @@ function main(): void { code.push(`...${name},`); } - if (imports.length > 0) { - code.unshift(...imports, ''); - } + const requiredBaseImports = new Set(); - // mark all of the variables + // add a declaration for each variable const variables = getVariablesFromScope(scopeManager); for (const variable of variables) { - code.push( - `'${variable.name}': ${JSON.stringify({ - eslintImplicitGlobalSetting: 'readonly', - isTypeVariable: variable.isTypeVariable, - isValueVariable: variable.isValueVariable, - name: variable.name, - })},`, - ); + const importName = ((): BASE_CONFIG_EXPORT_NAMES => { + if (variable.isTypeVariable && variable.isValueVariable) { + return BASE_CONFIG_EXPORT_NAMES.TYPE_AND_VALUE; + } else if (variable.isTypeVariable) { + return BASE_CONFIG_EXPORT_NAMES.TYPE; + } else if (variable.isValueVariable) { + return BASE_CONFIG_EXPORT_NAMES.VALUE; + } + // shouldn't happen + throw new Error( + "Unexpected variable that's is not a type or value variable", + ); + })(); + requiredBaseImports.add(importName); + + code.push(`'${variable.name}': ${importName},`); } code.push('} as Record;'); + if (requiredBaseImports.size > 0) { + imports.push( + `import {${Array.from(requiredBaseImports).join( + ',', + )}} from './${BASE_CONFIG_MODULE_NAME}';`, + ); + } + + if (imports.length > 0) { + code.unshift(...imports, ''); + } + const formattedCode = formatCode(code); fs.writeFileSync(path.join(OUTPUT_FOLDER, `${libName}.ts`), formattedCode); From b1d44497ddf8ef4615c727fe4241e54f7f1aba65 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sun, 30 May 2021 13:56:26 -0700 Subject: [PATCH 167/473] chore: update dependencies (#3467) * chore: update dependencies I bumped all of the version numbers to the latest, and unbroke the build due to prettier changes. * chore: deduplicate packages * chore: fix lint --- package.json | 45 +- packages/ast-spec/package.json | 2 +- .../src/rules/no-poorly-typed-ts-props.ts | 5 +- .../src/rules/plugin-test-formatting.ts | 6 +- packages/eslint-plugin-tslint/package.json | 2 +- packages/eslint-plugin/package.json | 14 +- .../eslint-plugin/src/rules/ban-ts-comment.ts | 6 +- .../src/rules/ban-tslint-comment.ts | 3 +- .../eslint-plugin/src/rules/brace-style.ts | 21 +- .../src/rules/consistent-type-imports.ts | 34 +- .../eslint-plugin/src/rules/dot-notation.ts | 4 +- .../rules/explicit-member-accessibility.ts | 5 +- .../src/rules/indent-new-do-not-use/index.ts | 15 +- packages/eslint-plugin/src/rules/indent.ts | 7 +- .../src/rules/method-signature-style.ts | 13 +- .../src/rules/no-extra-non-null-assertion.ts | 6 +- .../src/rules/no-inferrable-types.ts | 14 +- .../src/rules/no-magic-numbers.ts | 5 +- .../eslint-plugin/src/rules/no-redeclare.ts | 9 +- .../src/rules/no-unnecessary-condition.ts | 6 +- .../src/rules/no-unnecessary-qualifier.ts | 12 +- .../src/rules/no-unsafe-argument.ts | 5 +- .../src/rules/no-unsafe-member-access.ts | 3 +- .../src/rules/no-use-before-define.ts | 3 +- .../src/rules/object-curly-spacing.ts | 5 +- .../src/rules/prefer-includes.ts | 9 +- .../src/rules/prefer-optional-chain.ts | 10 +- .../src/rules/prefer-readonly.ts | 5 +- packages/eslint-plugin/src/rules/semi.ts | 3 +- .../src/rules/triple-slash-reference.ts | 3 +- .../src/util/collectUnusedVariables.ts | 6 +- packages/eslint-plugin/src/util/index.ts | 13 +- packages/eslint-plugin/src/util/misc.ts | 4 +- packages/eslint-plugin/tests/docs.test.ts | 7 +- .../tests/rules/ban-ts-comment.test.ts | 9 +- .../tests/rules/brace-style.test.ts | 15 +- .../explicit-function-return-type.test.ts | 6 +- .../explicit-module-boundary-types.test.ts | 20 +- .../tests/rules/indent/indent-eslint.test.ts | 3 +- .../tests/rules/member-ordering.test.ts | 516 ++-- .../tests/rules/naming-convention.test.ts | 6 +- .../tests/rules/no-explicit-any.test.ts | 1411 +++++------ .../tests/rules/no-inferrable-types.test.ts | 50 +- .../tests/rules/no-invalid-void-type.test.ts | 6 +- .../tests/rules/no-loss-of-precision.test.ts | 3 +- .../tests/rules/no-type-alias.test.ts | 9 +- .../rules/no-unused-vars-experimental.test.ts | 2 +- .../no-unused-vars/no-unused-vars.test.ts | 7 +- .../tests/rules/object-curly-spacing.test.ts | 6 +- .../tests/rules/prefer-optional-chain.test.ts | 18 +- .../tests/rules/prefer-regexp-exec.test.ts | 9 +- .../prefer-string-starts-ends-with.test.ts | 4 +- .../eslint-plugin/tests/rules/quotes.test.ts | 9 +- .../tests/rules/require-await.test.ts | 4 +- .../tests/util/isUnsafeAssignment.test.ts | 4 +- .../eslint-plugin/tools/generate-configs.ts | 6 +- packages/experimental-utils/package.json | 6 +- .../src/eslint-utils/RuleCreator.ts | 2 +- .../eslint-utils/batchedSingleLineTests.ts | 4 +- .../src/eslint-utils/getParserServices.ts | 2 +- .../experimental-utils/src/json-schema.ts | 3 +- .../src/ts-eslint-scope/Definition.ts | 17 +- .../src/ts-eslint-scope/Scope.ts | 5 +- .../src/ts-eslint/CLIEngine.ts | 2 +- .../experimental-utils/src/ts-eslint/Rule.ts | 18 +- .../src/ts-eslint/RuleTester.ts | 4 +- .../experimental-utils/src/ts-eslint/Scope.ts | 6 +- .../src/ts-eslint/SourceCode.ts | 7 +- packages/parser/package.json | 2 +- packages/scope-manager/package.json | 2 +- .../src/definition/DefinitionBase.ts | 2 +- packages/scope-manager/src/scope/ScopeBase.ts | 4 +- .../eslint-scope/map-ecma-version.test.ts | 2 +- .../tests/util/getSpecificNode.ts | 6 +- packages/typescript-estree/package.json | 14 +- packages/typescript-estree/src/convert.ts | 86 +- .../src/create-program/createWatchProgram.ts | 5 +- .../typescript-estree/src/parser-options.ts | 2 +- .../typescript-estree/tests/lib/parse.test.ts | 59 +- .../tests/lib/semanticInfo.test.ts | 47 +- yarn.lock | 2224 +++++++++-------- 81 files changed, 2476 insertions(+), 2488 deletions(-) diff --git a/package.json b/package.json index 80b0163aeb21..7d4bc600bec3 100644 --- a/package.json +++ b/package.json @@ -71,51 +71,58 @@ "node": "^10.12.0 || >=12.0.0" }, "devDependencies": { - "@commitlint/cli": "^12.0.1", - "@commitlint/config-conventional": "^12.0.1", - "@commitlint/config-lerna-scopes": "^12.0.1", + "@babel/code-frame": "^7.12.13", + "@babel/parser": "^7.14.4", + "@babel/types": "^7.14.4", + "@commitlint/cli": "^12.1.4", + "@commitlint/config-conventional": "^12.1.4", + "@commitlint/config-lerna-scopes": "^12.1.4", "@types/babel__code-frame": "^7.0.2", "@types/debug": "^4.1.5", "@types/eslint-visitor-keys": "^1.0.0", "@types/glob": "^7.1.3", "@types/is-glob": "^4.0.1", - "@types/jest": "^26.0.20", + "@types/jest": "^26.0.23", "@types/jest-specific-snapshot": "^0.5.5", - "@types/lodash": "^4.14.149", - "@types/marked": "^2.0.0", - "@types/node": "^15.0.2", + "@types/lodash": "^4.14.170", + "@types/marked": "^2.0.3", + "@types/node": "^15.6.1", "@types/node-fetch": "^2.5.10", - "@types/prettier": "^2.2.1", + "@types/prettier": "^2.2.3", "@types/rimraf": "^3.0.0", - "@types/semver": "^7.3.4", + "@types/semver": "^7.3.6", "@types/tmp": "^0.2.0", "all-contributors-cli": "^6.20.0", - "cspell": "^5.2.4", + "cspell": "^5.5.2", "cz-conventional-changelog": "^3.3.0", "downlevel-dts": "^0.7.0", - "eslint": "^7.20.0", + "eslint": "^7.27.0", "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-eslint-plugin": "^3.0.0", - "eslint-plugin-import": "^2.22.0", - "eslint-plugin-jest": "^24.1.3", + "eslint-plugin-eslint-plugin": "^3.0.3", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-jest": "^24.3.6", "eslint-plugin-simple-import-sort": "^7.0.0", - "glob": "^7.1.6", + "glob": "^7.1.7", "husky": "^5.0.9", - "jest": "^26.6.3", - "jest-specific-snapshot": "^4.0.0", + "jest": "^27.0.3", + "jest-specific-snapshot": "^5.0.0", "lerna": "^3.22.1", "lint-staged": "^11.0.0", "make-dir": "^3.1.0", "markdownlint-cli": "^0.27.1", "node-fetch": "^2.6.1", - "prettier": "^2.2.1", + "prettier": "^2.3.0", + "pretty-format": "^27.0.2", "rimraf": "^3.0.2", - "ts-jest": "^26.5.1", + "ts-jest": "^27.0.1", "ts-node": "^10.0.0", "tslint": "^6.1.3", "typescript": ">=3.3.1 <4.4.0" }, "resolutions": { + "@types/node": "^15.6.1", + "jest-diff": "^27.0.0", + "pretty-format": "^27.0.0", "typescript": "4.3.2" } } diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 09cf9ec84a09..50efaf77ee1e 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -41,6 +41,6 @@ "url": "https://opencollective.com/typescript-eslint" }, "devDependencies": { - "@microsoft/api-extractor": "^7.13.2" + "@microsoft/api-extractor": "^7.15.2" } } diff --git a/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts b/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts index 1fa447080ba7..d5554ec57d54 100644 --- a/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts +++ b/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts @@ -53,9 +53,8 @@ export default createRule({ }, defaultOptions: [], create(context) { - const { program, esTreeNodeToTSNodeMap } = ESLintUtils.getParserServices( - context, - ); + const { program, esTreeNodeToTSNodeMap } = + ESLintUtils.getParserServices(context); const checker = program.getTypeChecker(); return { diff --git a/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts b/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts index 64fefc08f8ef..ed03e0fe1caf 100644 --- a/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts +++ b/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts @@ -490,7 +490,8 @@ export default createRule({ return { // valid - 'CallExpression > ObjectExpression > Property[key.name = "valid"] > ArrayExpression': checkValidTest, + 'CallExpression > ObjectExpression > Property[key.name = "valid"] > ArrayExpression': + checkValidTest, // invalid - errors [invalidTestsSelectorPath.join(' > ')]: checkInvalidTest, // invalid - suggestions @@ -504,7 +505,8 @@ export default createRule({ AST_NODE_TYPES.ObjectExpression, ].join(' > ')]: checkInvalidTest, // special case for our batchedSingleLineTests utility - 'CallExpression[callee.name = "batchedSingleLineTests"] > ObjectExpression': checkInvalidTest, + 'CallExpression[callee.name = "batchedSingleLineTests"] > ObjectExpression': + checkInvalidTest, }; }, }); diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 4d72a3180baf..726b5836cb7a 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -39,7 +39,7 @@ }, "dependencies": { "@typescript-eslint/experimental-utils": "4.25.0", - "lodash": "^4.17.15" + "lodash": "^4.17.21" }, "peerDependencies": { "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0", diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index a3554054caad..754d6efec15e 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -46,19 +46,19 @@ "dependencies": { "@typescript-eslint/experimental-utils": "4.25.0", "@typescript-eslint/scope-manager": "4.25.0", - "debug": "^4.1.1", + "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", - "lodash": "^4.17.15", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "lodash": "^4.17.21", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" }, "devDependencies": { "@types/debug": "*", "@types/marked": "*", "@types/prettier": "*", - "chalk": "^4.0.0", - "marked": "^2.0.0", + "chalk": "^4.1.1", + "marked": "^2.0.6", "prettier": "*", "typescript": "*" }, diff --git a/packages/eslint-plugin/src/rules/ban-ts-comment.ts b/packages/eslint-plugin/src/rules/ban-ts-comment.ts index 7c2f237cd4cf..4bf17c25d95b 100644 --- a/packages/eslint-plugin/src/rules/ban-ts-comment.ts +++ b/packages/eslint-plugin/src/rules/ban-ts-comment.ts @@ -102,8 +102,10 @@ export default util.createRule<[Options], MessageIds>({ The regex used are taken from the ones used in the official TypeScript repo - https://github.com/microsoft/TypeScript/blob/master/src/compiler/scanner.ts#L281-L289 */ - const commentDirectiveRegExSingleLine = /^\/*\s*@ts-(expect-error|ignore|check|nocheck)(.*)/; - const commentDirectiveRegExMultiLine = /^\s*(?:\/|\*)*\s*@ts-(expect-error|ignore|check|nocheck)(.*)/; + const commentDirectiveRegExSingleLine = + /^\/*\s*@ts-(expect-error|ignore|check|nocheck)(.*)/; + const commentDirectiveRegExMultiLine = + /^\s*(?:\/|\*)*\s*@ts-(expect-error|ignore|check|nocheck)(.*)/; const sourceCode = context.getSourceCode(); return { diff --git a/packages/eslint-plugin/src/rules/ban-tslint-comment.ts b/packages/eslint-plugin/src/rules/ban-tslint-comment.ts index 4521fcb13c36..37dfefd380e5 100644 --- a/packages/eslint-plugin/src/rules/ban-tslint-comment.ts +++ b/packages/eslint-plugin/src/rules/ban-tslint-comment.ts @@ -3,7 +3,8 @@ import * as util from '../util'; // tslint regex // https://github.com/palantir/tslint/blob/95d9d958833fd9dc0002d18cbe34db20d0fbf437/src/enableDisableRules.ts#L32 -const ENABLE_DISABLE_REGEX = /^\s*tslint:(enable|disable)(?:-(line|next-line))?(:|\s|$)/; +const ENABLE_DISABLE_REGEX = + /^\s*tslint:(enable|disable)(?:-(line|next-line))?(:|\s|$)/; const toText = ( text: string, diff --git a/packages/eslint-plugin/src/rules/brace-style.ts b/packages/eslint-plugin/src/rules/brace-style.ts index 7107bdf4d1ba..4d981763cf48 100644 --- a/packages/eslint-plugin/src/rules/brace-style.ts +++ b/packages/eslint-plugin/src/rules/brace-style.ts @@ -26,10 +26,8 @@ export default createRule({ }, defaultOptions: ['1tbs'], create(context) { - const [ - style, - { allowSingleLine } = { allowSingleLine: false }, - ] = context.options; + const [style, { allowSingleLine } = { allowSingleLine: false }] = + context.options; const isAllmanStyle = style === 'allman'; const sourceCode = context.getSourceCode(); @@ -49,15 +47,12 @@ export default createRule({ return; } - const tokenBeforeOpeningCurly = sourceCode.getTokenBefore( - openingCurlyToken, - )!; - const tokenBeforeClosingCurly = sourceCode.getTokenBefore( - closingCurlyToken, - )!; - const tokenAfterOpeningCurly = sourceCode.getTokenAfter( - openingCurlyToken, - )!; + const tokenBeforeOpeningCurly = + sourceCode.getTokenBefore(openingCurlyToken)!; + const tokenBeforeClosingCurly = + sourceCode.getTokenBefore(closingCurlyToken)!; + const tokenAfterOpeningCurly = + sourceCode.getTokenAfter(openingCurlyToken)!; if ( !isAllmanStyle && diff --git a/packages/eslint-plugin/src/rules/consistent-type-imports.ts b/packages/eslint-plugin/src/rules/consistent-type-imports.ts index f15a27a75308..795014507d06 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-imports.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-imports.ts @@ -254,9 +254,10 @@ export default util.createRule({ const isTypeImport = report.node.importKind === 'type'; // we have a mixed type/value import, so we need to split them out into multiple exports - const importNames = (isTypeImport - ? report.valueSpecifiers - : report.typeSpecifiers + const importNames = ( + isTypeImport + ? report.valueSpecifiers + : report.typeSpecifiers ).map(specifier => `"${specifier.local.name}"`); const message = ((): { @@ -342,9 +343,7 @@ export default util.createRule({ : {}), }; - function classifySpecifier( - node: TSESTree.ImportDeclaration, - ): { + function classifySpecifier(node: TSESTree.ImportDeclaration): { defaultSpecifier: TSESTree.ImportDefaultSpecifier | null; namespaceSpecifier: TSESTree.ImportNamespaceSpecifier | null; namedSpecifiers: TSESTree.ImportSpecifier[]; @@ -358,10 +357,11 @@ export default util.createRule({ (specifier): specifier is TSESTree.ImportNamespaceSpecifier => specifier.type === AST_NODE_TYPES.ImportNamespaceSpecifier, ) ?? null; - const namedSpecifiers: TSESTree.ImportSpecifier[] = node.specifiers.filter( - (specifier): specifier is TSESTree.ImportSpecifier => - specifier.type === AST_NODE_TYPES.ImportSpecifier, - ); + const namedSpecifiers: TSESTree.ImportSpecifier[] = + node.specifiers.filter( + (specifier): specifier is TSESTree.ImportSpecifier => + specifier.type === AST_NODE_TYPES.ImportSpecifier, + ); return { defaultSpecifier, namespaceSpecifier, @@ -526,11 +526,8 @@ export default util.createRule({ ): IterableIterator { const { node } = report; - const { - defaultSpecifier, - namespaceSpecifier, - namedSpecifiers, - } = classifySpecifier(node); + const { defaultSpecifier, namespaceSpecifier, namedSpecifiers } = + classifySpecifier(node); if (namespaceSpecifier && !defaultSpecifier) { // e.g. @@ -737,11 +734,8 @@ export default util.createRule({ ): IterableIterator { const { node } = report; - const { - defaultSpecifier, - namespaceSpecifier, - namedSpecifiers, - } = classifySpecifier(node); + const { defaultSpecifier, namespaceSpecifier, namedSpecifiers } = + classifySpecifier(node); if (namespaceSpecifier) { // e.g. diff --git a/packages/eslint-plugin/src/rules/dot-notation.ts b/packages/eslint-plugin/src/rules/dot-notation.ts index b93dc8d035a7..d0757f55a084 100644 --- a/packages/eslint-plugin/src/rules/dot-notation.ts +++ b/packages/eslint-plugin/src/rules/dot-notation.ts @@ -93,8 +93,8 @@ export default createRule({ const propertySymbol = typeChecker.getSymbolAtLocation( esTreeNodeToTSNodeMap.get(node.property), ); - const modifierKind = propertySymbol?.getDeclarations()?.[0] - ?.modifiers?.[0].kind; + const modifierKind = + propertySymbol?.getDeclarations()?.[0]?.modifiers?.[0].kind; if ( (allowPrivateClassPropertyAccess && modifierKind == ts.SyntaxKind.PrivateKeyword) || diff --git a/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts b/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts index 23ac95814c06..ece09d8bc71f 100644 --- a/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts +++ b/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts @@ -175,9 +175,8 @@ export default util.createRule({ token.type === AST_TOKEN_TYPES.Keyword && token.value === 'public' ) { - const commensAfterPublicKeyword = sourceCode.getCommentsAfter( - token, - ); + const commensAfterPublicKeyword = + sourceCode.getCommentsAfter(token); if (commensAfterPublicKeyword.length) { // public /* Hi there! */ static foo() // ^^^^^^^ diff --git a/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts b/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts index 352fcd17256a..68edfe18dbb7 100644 --- a/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts +++ b/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts @@ -1015,9 +1015,8 @@ export default createRule({ token.type === AST_TOKEN_TYPES.Punctuator && token.value === ':', )!; - const firstConsequentToken = sourceCode.getTokenAfter( - questionMarkToken, - )!; + const firstConsequentToken = + sourceCode.getTokenAfter(questionMarkToken)!; const lastConsequentToken = sourceCode.getTokenBefore(colonToken)!; const firstAlternateToken = sourceCode.getTokenAfter(colonToken)!; @@ -1207,9 +1206,8 @@ export default createRule({ node.property, isNotClosingParenToken, )!; - const secondNonObjectToken = sourceCode.getTokenAfter( - firstNonObjectToken, - )!; + const secondNonObjectToken = + sourceCode.getTokenAfter(firstNonObjectToken)!; const objectParenCount = sourceCode.getTokensBetween( object, @@ -1677,9 +1675,8 @@ export default createRule({ return; } - const firstTokenOfLine = tokenInfo.firstTokensByLineNumber.get( - lineNumber, - )!; + const firstTokenOfLine = + tokenInfo.firstTokensByLineNumber.get(lineNumber)!; if (firstTokenOfLine.loc.start.line !== lineNumber) { // Don't check the indentation of multi-line tokens (e.g. template literals or block comments) twice. diff --git a/packages/eslint-plugin/src/rules/indent.ts b/packages/eslint-plugin/src/rules/indent.ts index a000cc0d4657..b25586a0e8b6 100644 --- a/packages/eslint-plugin/src/rules/indent.ts +++ b/packages/eslint-plugin/src/rules/indent.ts @@ -241,10 +241,9 @@ export default util.createRule({ // transform it to an ObjectExpression return rules['ObjectExpression, ObjectPattern']({ type: AST_NODE_TYPES.ObjectExpression, - properties: (node.members as ( - | TSESTree.TSEnumMember - | TSESTree.TypeElement - )[]).map( + properties: ( + node.members as (TSESTree.TSEnumMember | TSESTree.TypeElement)[] + ).map( member => TSPropertySignatureToProperty(member) as TSESTree.Property, ), diff --git a/packages/eslint-plugin/src/rules/method-signature-style.ts b/packages/eslint-plugin/src/rules/method-signature-style.ts index 54e68b2c671f..4775a1fec718 100644 --- a/packages/eslint-plugin/src/rules/method-signature-style.ts +++ b/packages/eslint-plugin/src/rules/method-signature-style.ts @@ -130,12 +130,13 @@ export default util.createRule({ ? parent.members : []; - const duplicatedKeyMethodNodes: TSESTree.TSMethodSignature[] = members.filter( - (element): element is TSESTree.TSMethodSignature => - element.type === AST_NODE_TYPES.TSMethodSignature && - element !== methodNode && - getMethodKey(element) === getMethodKey(methodNode), - ); + const duplicatedKeyMethodNodes: TSESTree.TSMethodSignature[] = + members.filter( + (element): element is TSESTree.TSMethodSignature => + element.type === AST_NODE_TYPES.TSMethodSignature && + element !== methodNode && + getMethodKey(element) === getMethodKey(methodNode), + ); const isParentModule = isNodeParentModuleDeclaration(methodNode); if (duplicatedKeyMethodNodes.length > 0) { diff --git a/packages/eslint-plugin/src/rules/no-extra-non-null-assertion.ts b/packages/eslint-plugin/src/rules/no-extra-non-null-assertion.ts index b58edd99ed6a..f507f37218f0 100644 --- a/packages/eslint-plugin/src/rules/no-extra-non-null-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-extra-non-null-assertion.ts @@ -32,8 +32,10 @@ export default util.createRule({ return { 'TSNonNullExpression > TSNonNullExpression': checkExtraNonNullAssertion, - 'MemberExpression[optional = true] > TSNonNullExpression.object': checkExtraNonNullAssertion, - 'CallExpression[optional = true] > TSNonNullExpression.callee': checkExtraNonNullAssertion, + 'MemberExpression[optional = true] > TSNonNullExpression.object': + checkExtraNonNullAssertion, + 'CallExpression[optional = true] > TSNonNullExpression.callee': + checkExtraNonNullAssertion, }; }, }); diff --git a/packages/eslint-plugin/src/rules/no-inferrable-types.ts b/packages/eslint-plugin/src/rules/no-inferrable-types.ts index d6b6538a95d4..110bda41aea6 100644 --- a/packages/eslint-plugin/src/rules/no-inferrable-types.ts +++ b/packages/eslint-plugin/src/rules/no-inferrable-types.ts @@ -242,12 +242,14 @@ export default util.createRule({ if (ignoreParameters || !node.params) { return; } - (node.params.filter( - param => - param.type === AST_NODE_TYPES.AssignmentPattern && - param.left && - param.right, - ) as TSESTree.AssignmentPattern[]).forEach(param => { + ( + node.params.filter( + param => + param.type === AST_NODE_TYPES.AssignmentPattern && + param.left && + param.right, + ) as TSESTree.AssignmentPattern[] + ).forEach(param => { reportInferrableType(param, param.left.typeAnnotation, param.right); }); } diff --git a/packages/eslint-plugin/src/rules/no-magic-numbers.ts b/packages/eslint-plugin/src/rules/no-magic-numbers.ts index 0cb41337c1bb..1f45a489d357 100644 --- a/packages/eslint-plugin/src/rules/no-magic-numbers.ts +++ b/packages/eslint-plugin/src/rules/no-magic-numbers.ts @@ -84,9 +84,8 @@ export default util.createRule({ return; } - let fullNumberNode: - | TSESTree.Literal - | TSESTree.UnaryExpression = node; + let fullNumberNode: TSESTree.Literal | TSESTree.UnaryExpression = + node; let raw = node.raw; if ( diff --git a/packages/eslint-plugin/src/rules/no-redeclare.ts b/packages/eslint-plugin/src/rules/no-redeclare.ts index fa67859f5096..399966b16d2c 100644 --- a/packages/eslint-plugin/src/rules/no-redeclare.ts +++ b/packages/eslint-plugin/src/rules/no-redeclare.ts @@ -64,9 +64,7 @@ export default util.createRule({ AST_NODE_TYPES.FunctionDeclaration, ]); - function* iterateDeclarations( - variable: TSESLint.Scope.Variable, - ): Generator< + function* iterateDeclarations(variable: TSESLint.Scope.Variable): Generator< { type: 'builtin' | 'syntax' | 'comment'; node?: TSESTree.Identifier | TSESTree.Comment; @@ -181,9 +179,8 @@ export default util.createRule({ function findVariablesInScope(scope: TSESLint.Scope.Scope): void { for (const variable of scope.variables) { - const [declaration, ...extraDeclarations] = iterateDeclarations( - variable, - ); + const [declaration, ...extraDeclarations] = + iterateDeclarations(variable); if (extraDeclarations.length === 0) { continue; diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts index f5ca89e88d60..9079769c216e 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts @@ -443,9 +443,9 @@ export default createRule({ // (Value to complexity ratio is dubious however) } // Otherwise just do type analysis on the function as a whole. - const returnTypes = getCallSignaturesOfType( - getNodeType(callback), - ).map(sig => sig.getReturnType()); + const returnTypes = getCallSignaturesOfType(getNodeType(callback)).map( + sig => sig.getReturnType(), + ); /* istanbul ignore if */ if (returnTypes.length === 0) { // Not a callable function return; diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-qualifier.ts b/packages/eslint-plugin/src/rules/no-unnecessary-qualifier.ts index 395bbfdc4f32..014b2c220e41 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-qualifier.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-qualifier.ts @@ -170,12 +170,16 @@ export default util.createRule({ return { TSModuleDeclaration: enterDeclaration, TSEnumDeclaration: enterDeclaration, - 'ExportNamedDeclaration[declaration.type="TSModuleDeclaration"]': enterDeclaration, - 'ExportNamedDeclaration[declaration.type="TSEnumDeclaration"]': enterDeclaration, + 'ExportNamedDeclaration[declaration.type="TSModuleDeclaration"]': + enterDeclaration, + 'ExportNamedDeclaration[declaration.type="TSEnumDeclaration"]': + enterDeclaration, 'TSModuleDeclaration:exit': exitDeclaration, 'TSEnumDeclaration:exit': exitDeclaration, - 'ExportNamedDeclaration[declaration.type="TSModuleDeclaration"]:exit': exitDeclaration, - 'ExportNamedDeclaration[declaration.type="TSEnumDeclaration"]:exit': exitDeclaration, + 'ExportNamedDeclaration[declaration.type="TSModuleDeclaration"]:exit': + exitDeclaration, + 'ExportNamedDeclaration[declaration.type="TSEnumDeclaration"]:exit': + exitDeclaration, TSQualifiedName(node: TSESTree.TSQualifiedName): void { visitNamespaceAccess(node, node.left, node.right); }, diff --git a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts index 84887bd8d658..aef8f927bea9 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts @@ -207,9 +207,8 @@ export default util.createRule<[], MessageIds>({ }); } else if (checker.isTupleType(spreadArgType)) { // foo(...[tuple1, tuple2]) - const spreadTypeArguments = checker.getTypeArguments( - spreadArgType, - ); + const spreadTypeArguments = + checker.getTypeArguments(spreadArgType); for (let j = 0; j < spreadTypeArguments.length; j += 1) { const tupleType = spreadTypeArguments[j]; const parameterType = signature.getNextParameterType(); diff --git a/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts b/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts index 13fd7bf0821b..121e826053e2 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts @@ -104,7 +104,8 @@ export default util.createRule({ return { // ignore MemberExpression if it's parent is TSClassImplements or TSInterfaceHeritage - ':not(TSClassImplements, TSInterfaceHeritage) > MemberExpression': checkMemberExpression, + ':not(TSClassImplements, TSInterfaceHeritage) > MemberExpression': + checkMemberExpression, 'MemberExpression[computed = true] > *.property'( node: TSESTree.Expression, ): void { diff --git a/packages/eslint-plugin/src/rules/no-use-before-define.ts b/packages/eslint-plugin/src/rules/no-use-before-define.ts index 2b0bb32ccb57..59680863c9bc 100644 --- a/packages/eslint-plugin/src/rules/no-use-before-define.ts +++ b/packages/eslint-plugin/src/rules/no-use-before-define.ts @@ -5,7 +5,8 @@ import { } from '@typescript-eslint/experimental-utils'; import * as util from '../util'; -const SENTINEL_TYPE = /^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/; +const SENTINEL_TYPE = + /^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/; /** * Parses a given value as options. diff --git a/packages/eslint-plugin/src/rules/object-curly-spacing.ts b/packages/eslint-plugin/src/rules/object-curly-spacing.ts index 256057c4fdfa..00c73820fd7c 100644 --- a/packages/eslint-plugin/src/rules/object-curly-spacing.ts +++ b/packages/eslint-plugin/src/rules/object-curly-spacing.ts @@ -170,8 +170,9 @@ export default createRule({ ): void { if (isTokenOnSameLine(first, second)) { const firstSpaced = sourceCode.isSpaceBetween!(first, second); - const secondType = sourceCode.getNodeByRangeIndex(second.range[0])! - .type; + const secondType = sourceCode.getNodeByRangeIndex( + second.range[0], + )!.type; const openingCurlyBraceMustBeSpaced = options.arraysInObjectsException && diff --git a/packages/eslint-plugin/src/rules/prefer-includes.ts b/packages/eslint-plugin/src/rules/prefer-includes.ts index f49b5385a0c8..d21b088d4aa2 100644 --- a/packages/eslint-plugin/src/rules/prefer-includes.ts +++ b/packages/eslint-plugin/src/rules/prefer-includes.ts @@ -134,10 +134,11 @@ export default createRule({ ].join(', ')](node: TSESTree.MemberExpression): void { // Check if the comparison is equivalent to `includes()`. const callNode = node.parent as TSESTree.CallExpression; - const compareNode = (callNode.parent?.type === - AST_NODE_TYPES.ChainExpression - ? callNode.parent.parent - : callNode.parent) as TSESTree.BinaryExpression; + const compareNode = ( + callNode.parent?.type === AST_NODE_TYPES.ChainExpression + ? callNode.parent.parent + : callNode.parent + ) as TSESTree.BinaryExpression; const negative = isNegativeCheck(compareNode); if (!negative && !isPositiveCheck(compareNode)) { return; diff --git a/packages/eslint-plugin/src/rules/prefer-optional-chain.ts b/packages/eslint-plugin/src/rules/prefer-optional-chain.ts index cd886a9d9974..0e15bf8f9794 100644 --- a/packages/eslint-plugin/src/rules/prefer-optional-chain.ts +++ b/packages/eslint-plugin/src/rules/prefer-optional-chain.ts @@ -65,10 +65,12 @@ export default util.createRule({ | TSESTree.MemberExpression, ): void { // selector guarantees this cast - const initialExpression = (initialIdentifierOrNotEqualsExpr.parent - ?.type === AST_NODE_TYPES.ChainExpression - ? initialIdentifierOrNotEqualsExpr.parent.parent - : initialIdentifierOrNotEqualsExpr.parent) as TSESTree.LogicalExpression; + const initialExpression = ( + initialIdentifierOrNotEqualsExpr.parent?.type === + AST_NODE_TYPES.ChainExpression + ? initialIdentifierOrNotEqualsExpr.parent.parent + : initialIdentifierOrNotEqualsExpr.parent + ) as TSESTree.LogicalExpression; if (initialExpression.left !== initialIdentifierOrNotEqualsExpr) { // the node(identifier or member expression) is not the deepest left node diff --git a/packages/eslint-plugin/src/rules/prefer-readonly.ts b/packages/eslint-plugin/src/rules/prefer-readonly.ts index 27eb7dca97cc..56ab8265a9a0 100644 --- a/packages/eslint-plugin/src/rules/prefer-readonly.ts +++ b/packages/eslint-plugin/src/rules/prefer-readonly.ts @@ -200,9 +200,8 @@ export default util.createRule({ const sourceCode = context.getSourceCode(); for (const violatingNode of finalizedClassScope.finalizeUnmodifiedPrivateNonReadonlys()) { - const { esNode, nameNode } = getEsNodesFromViolatingNode( - violatingNode, - ); + const { esNode, nameNode } = + getEsNodesFromViolatingNode(violatingNode); context.report({ data: { name: sourceCode.getText(nameNode), diff --git a/packages/eslint-plugin/src/rules/semi.ts b/packages/eslint-plugin/src/rules/semi.ts index 9c18d0e36712..eccc264e4613 100644 --- a/packages/eslint-plugin/src/rules/semi.ts +++ b/packages/eslint-plugin/src/rules/semi.ts @@ -36,7 +36,8 @@ export default util.createRule({ ], create(context) { const rules = baseRule.create(context); - const checkForSemicolon = rules.ExpressionStatement as TSESLint.RuleFunction; + const checkForSemicolon = + rules.ExpressionStatement as TSESLint.RuleFunction; /* The following nodes are handled by the member-delimiter-style rule diff --git a/packages/eslint-plugin/src/rules/triple-slash-reference.ts b/packages/eslint-plugin/src/rules/triple-slash-reference.ts index 08c3ad6291b2..525febe2be3c 100644 --- a/packages/eslint-plugin/src/rules/triple-slash-reference.ts +++ b/packages/eslint-plugin/src/rules/triple-slash-reference.ts @@ -94,7 +94,8 @@ export default util.createRule({ return; } programNode = node; - const referenceRegExp = /^\/\s* { diff --git a/packages/eslint-plugin/src/util/collectUnusedVariables.ts b/packages/eslint-plugin/src/util/collectUnusedVariables.ts index 19aaf33565ff..b36d07e818cd 100644 --- a/packages/eslint-plugin/src/util/collectUnusedVariables.ts +++ b/packages/eslint-plugin/src/util/collectUnusedVariables.ts @@ -9,7 +9,7 @@ import * as util from '.'; class UnusedVarsVisitor< TMessageIds extends string, - TOptions extends readonly unknown[] + TOptions extends readonly unknown[], > extends Visitor { private static readonly RESULTS_CACHE = new WeakMap< TSESTree.Program, @@ -32,7 +32,7 @@ class UnusedVarsVisitor< public static collectUnusedVariables< TMessageIds extends string, - TOptions extends readonly unknown[] + TOptions extends readonly unknown[], >( context: TSESLint.RuleContext, ): ReadonlySet { @@ -747,7 +747,7 @@ function isUsedVariable(variable: TSESLint.Scope.Variable): boolean { */ function collectUnusedVariables< TMessageIds extends string, - TOptions extends readonly unknown[] + TOptions extends readonly unknown[], >( context: Readonly>, ): ReadonlySet { diff --git a/packages/eslint-plugin/src/util/index.ts b/packages/eslint-plugin/src/util/index.ts index 79e142b15fd4..4c0284895235 100644 --- a/packages/eslint-plugin/src/util/index.ts +++ b/packages/eslint-plugin/src/util/index.ts @@ -15,15 +15,10 @@ export * from './requiresQuoting'; export * from './types'; // this is done for convenience - saves migrating all of the old rules -const { - applyDefault, - deepMerge, - isObjectNotArray, - getParserServices, -} = ESLintUtils; -type InferMessageIdsTypeFromRule< - T -> = ESLintUtils.InferMessageIdsTypeFromRule; +const { applyDefault, deepMerge, isObjectNotArray, getParserServices } = + ESLintUtils; +type InferMessageIdsTypeFromRule = + ESLintUtils.InferMessageIdsTypeFromRule; type InferOptionsTypeFromRule = ESLintUtils.InferOptionsTypeFromRule; export { diff --git a/packages/eslint-plugin/src/util/misc.ts b/packages/eslint-plugin/src/util/misc.ts index 2e6c4711cb0d..e7e0991ba6a0 100644 --- a/packages/eslint-plugin/src/util/misc.ts +++ b/packages/eslint-plugin/src/util/misc.ts @@ -91,11 +91,11 @@ function getNameFromMember( type ExcludeKeys< TObj extends Record, - TKeys extends keyof TObj + TKeys extends keyof TObj, > = { [k in Exclude]: TObj[k] }; type RequireKeys< TObj extends Record, - TKeys extends keyof TObj + TKeys extends keyof TObj, > = ExcludeKeys & { [k in TKeys]-?: Exclude }; function getEnumNames(myEnum: Record): T[] { diff --git a/packages/eslint-plugin/tests/docs.test.ts b/packages/eslint-plugin/tests/docs.test.ts index 7223df50b90e..ceaf83d6680a 100644 --- a/packages/eslint-plugin/tests/docs.test.ts +++ b/packages/eslint-plugin/tests/docs.test.ts @@ -137,9 +137,10 @@ describe('Validating README.md', () => { for (const [ruleName, rule] of notDeprecated) { describe(`Checking rule ${ruleName}`, () => { - const ruleRow: string[] | undefined = (rule.meta.docs?.extendsBaseRule - ? rulesTables.extension.cells - : rulesTables.base.cells + const ruleRow: string[] | undefined = ( + rule.meta.docs?.extendsBaseRule + ? rulesTables.extension.cells + : rulesTables.base.cells ).find(row => row[0].includes(`/${ruleName}.md`)); if (!ruleRow) { // rule is in the wrong table, the first two tests will catch this, so no point in creating noise; diff --git a/packages/eslint-plugin/tests/rules/ban-ts-comment.test.ts b/packages/eslint-plugin/tests/rules/ban-ts-comment.test.ts index 994da016d5f7..b9d10b005b6f 100644 --- a/packages/eslint-plugin/tests/rules/ban-ts-comment.test.ts +++ b/packages/eslint-plugin/tests/rules/ban-ts-comment.test.ts @@ -173,8 +173,7 @@ ruleTester.run('ts-ignore', rule, { options: [{ 'ts-ignore': false }], }, { - code: - '// @ts-ignore I think that I am exempted from any need to follow the rules!', + code: '// @ts-ignore I think that I am exempted from any need to follow the rules!', options: [{ 'ts-ignore': 'allow-with-description' }], }, { @@ -340,8 +339,7 @@ ruleTester.run('ts-nocheck', rule, { options: [{ 'ts-nocheck': false }], }, { - code: - '// @ts-nocheck no doubt, people will put nonsense here from time to time just to get the rule to stop reporting, perhaps even long messages with other nonsense in them like other // @ts-nocheck or // @ts-ignore things', + code: '// @ts-nocheck no doubt, people will put nonsense here from time to time just to get the rule to stop reporting, perhaps even long messages with other nonsense in them like other // @ts-nocheck or // @ts-ignore things', options: [{ 'ts-nocheck': 'allow-with-description' }], }, { @@ -488,8 +486,7 @@ ruleTester.run('ts-check', rule, { options: [{ 'ts-check': false }], }, { - code: - '// @ts-check with a description and also with a no-op // @ts-ignore', + code: '// @ts-check with a description and also with a no-op // @ts-ignore', options: [ { 'ts-check': 'allow-with-description', minimumDescriptionLength: 3 }, ], diff --git a/packages/eslint-plugin/tests/rules/brace-style.test.ts b/packages/eslint-plugin/tests/rules/brace-style.test.ts index 28b9413795db..35bc5afe9967 100644 --- a/packages/eslint-plugin/tests/rules/brace-style.test.ts +++ b/packages/eslint-plugin/tests/rules/brace-style.test.ts @@ -721,16 +721,14 @@ if (f) { errors: [{ messageId: 'sameLineClose' }], }, { - code: - 'if (foo) {\nbaz();\n} else if (bar) {\nbaz();\n}\nelse {\nqux();\n}', + code: 'if (foo) {\nbaz();\n} else if (bar) {\nbaz();\n}\nelse {\nqux();\n}', output: 'if (foo) {\nbaz();\n}\n else if (bar) {\nbaz();\n}\nelse {\nqux();\n}', options: ['stroustrup'], errors: [{ messageId: 'sameLineClose' }], }, { - code: - 'if (foo) {\npoop();\n} \nelse if (bar) {\nbaz();\n} else if (thing) {\nboom();\n}\nelse {\nqux();\n}', + code: 'if (foo) {\npoop();\n} \nelse if (bar) {\nbaz();\n} else if (thing) {\nboom();\n}\nelse {\nqux();\n}', output: 'if (foo) {\npoop();\n} \nelse if (bar) {\nbaz();\n}\n else if (thing) {\nboom();\n}\nelse {\nqux();\n}', options: ['stroustrup'], @@ -767,8 +765,7 @@ if (f) { ], }, { - code: - 'if (foo) {\nbaz();\n} else if (bar) {\nbaz();\n}\nelse {\nqux();\n}', + code: 'if (foo) {\nbaz();\n} else if (bar) {\nbaz();\n}\nelse {\nqux();\n}', output: 'if (foo) \n{\nbaz();\n}\n else if (bar) \n{\nbaz();\n}\nelse \n{\nqux();\n}', options: ['allman'], @@ -780,8 +777,7 @@ if (f) { ], }, { - code: - 'if (foo)\n{ poop();\n} \nelse if (bar) {\nbaz();\n} else if (thing) {\nboom();\n}\nelse {\nqux();\n}', + code: 'if (foo)\n{ poop();\n} \nelse if (bar) {\nbaz();\n} else if (thing) {\nboom();\n}\nelse {\nqux();\n}', output: 'if (foo)\n{\n poop();\n} \nelse if (bar) \n{\nbaz();\n}\n else if (thing) \n{\nboom();\n}\nelse \n{\nqux();\n}', options: ['allman'], @@ -946,8 +942,7 @@ if (f) { errors: [{ messageId: 'sameLineClose' }], }, { - code: - 'if (foo)\n{ poop();\n} \nelse if (bar) {\nbaz();\n} else if (thing) {\nboom();\n}\nelse {\nqux();\n}', + code: 'if (foo)\n{ poop();\n} \nelse if (bar) {\nbaz();\n} else if (thing) {\nboom();\n}\nelse {\nqux();\n}', output: 'if (foo)\n{\n poop();\n} \nelse if (bar) \n{\nbaz();\n}\n else if (thing) \n{\nboom();\n}\nelse \n{\nqux();\n}', options: ['allman', { allowSingleLine: true }], diff --git a/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts b/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts index 4faf3fa18b70..ab98b4be27c5 100644 --- a/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts +++ b/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts @@ -271,7 +271,8 @@ function FunctionDeclaration() { // ArrowFunctionExpression_Within_FunctionExpression return () => // ArrowFunctionExpression_Within_ArrowFunctionExpression - (): number => 1; // ArrowFunctionExpression_Within_ArrowFunctionExpression_WithNoBody + (): number => + 1; // ArrowFunctionExpression_Within_ArrowFunctionExpression_WithNoBody }; }; }; @@ -836,7 +837,8 @@ function FunctionDeclaration() { // ArrowFunctionExpression_Within_FunctionExpression return () => // ArrowFunctionExpression_Within_ArrowFunctionExpression - () => 1; // ArrowFunctionExpression_Within_ArrowFunctionExpression_WithNoBody + () => + 1; // ArrowFunctionExpression_Within_ArrowFunctionExpression_WithNoBody }; }; }; diff --git a/packages/eslint-plugin/tests/rules/explicit-module-boundary-types.test.ts b/packages/eslint-plugin/tests/rules/explicit-module-boundary-types.test.ts index e05f4f09230d..ba80da5b588d 100644 --- a/packages/eslint-plugin/tests/rules/explicit-module-boundary-types.test.ts +++ b/packages/eslint-plugin/tests/rules/explicit-module-boundary-types.test.ts @@ -287,7 +287,8 @@ export function FunctionDeclaration() { // ArrowFunctionExpression_Within_FunctionExpression return () => // ArrowFunctionExpression_Within_ArrowFunctionExpression - (): number => 1; // ArrowFunctionExpression_Within_ArrowFunctionExpression_WithNoBody + (): number => + 1; // ArrowFunctionExpression_Within_ArrowFunctionExpression_WithNoBody }; }; }; @@ -1081,7 +1082,8 @@ export function FunctionDeclaration() { // ArrowFunctionExpression_Within_FunctionExpression return () => // ArrowFunctionExpression_Within_ArrowFunctionExpression - () => 1; // ArrowFunctionExpression_Within_ArrowFunctionExpression_WithNoBody + () => + 1; // ArrowFunctionExpression_Within_ArrowFunctionExpression_WithNoBody }; }; }; @@ -1632,18 +1634,20 @@ export { test }; }, { code: ` -export const foo = () => (a: string): ((n: number) => string) => { - return function (n) { - return String(n); +export const foo = + () => + (a: string): ((n: number) => string) => { + return function (n) { + return String(n); + }; }; -}; `, options: [{ allowHigherOrderFunctions: false }], errors: [ { messageId: 'missingReturnType', - line: 2, - column: 20, + line: 3, + column: 3, }, ], }, diff --git a/packages/eslint-plugin/tests/rules/indent/indent-eslint.test.ts b/packages/eslint-plugin/tests/rules/indent/indent-eslint.test.ts index a9dfda6b127b..d03ee3ea9dc8 100644 --- a/packages/eslint-plugin/tests/rules/indent/indent-eslint.test.ts +++ b/packages/eslint-plugin/tests/rules/indent/indent-eslint.test.ts @@ -846,8 +846,7 @@ ruleTester.run('indent', rule, { options: [2, { SwitchCase: 1 }], }, { - code: - 'var geometry, box, face1, face2, colorT, colorB, sprite, padding, maxWidth;', + code: 'var geometry, box, face1, face2, colorT, colorB, sprite, padding, maxWidth;', options: [2, { SwitchCase: 1 }], }, { diff --git a/packages/eslint-plugin/tests/rules/member-ordering.test.ts b/packages/eslint-plugin/tests/rules/member-ordering.test.ts index c17aa57b90e7..b53143866b20 100644 --- a/packages/eslint-plugin/tests/rules/member-ordering.test.ts +++ b/packages/eslint-plugin/tests/rules/member-ordering.test.ts @@ -5155,14 +5155,12 @@ type Foo = { ], }; -const sortedWithGroupingDefaultOption: TSESLint.RunTests< - MessageIds, - Options -> = { - valid: [ - // default option + interface + default order + alphabetically - { - code: ` +const sortedWithGroupingDefaultOption: TSESLint.RunTests = + { + valid: [ + // default option + interface + default order + alphabetically + { + code: ` interface Foo { [a: string] : number; @@ -5179,14 +5177,14 @@ interface Foo { c() : void; } `, - options: [ - { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, - ], - }, + options: [ + { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, + ], + }, - // default option + interface + custom order + alphabetically - { - code: ` + // default option + interface + custom order + alphabetically + { + code: ` interface Foo { new () : Bar; @@ -5202,19 +5200,19 @@ interface Foo { () : Baz; } `, - options: [ - { - default: { - memberTypes: ['constructor', 'method', 'field'], - order: 'alphabetically', + options: [ + { + default: { + memberTypes: ['constructor', 'method', 'field'], + order: 'alphabetically', + }, }, - }, - ], - }, + ], + }, - // default option + type literal + default order + alphabetically - { - code: ` + // default option + type literal + default order + alphabetically + { + code: ` type Foo = { [a: string] : number; @@ -5231,14 +5229,14 @@ type Foo = { c() : void; } `, - options: [ - { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, - ], - }, + options: [ + { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, + ], + }, - // default option + type literal + custom order + alphabetically - { - code: ` + // default option + type literal + custom order + alphabetically + { + code: ` type Foo = { [a: string] : number; @@ -5255,19 +5253,19 @@ type Foo = { () : Baz; } `, - options: [ - { - default: { - memberTypes: ['constructor', 'method', 'field'], - order: 'alphabetically', + options: [ + { + default: { + memberTypes: ['constructor', 'method', 'field'], + order: 'alphabetically', + }, }, - }, - ], - }, + ], + }, - // default option + class + default order + alphabetically - { - code: ` + // default option + class + default order + alphabetically + { + code: ` class Foo { public static a: string; protected static b: string = ""; @@ -5280,13 +5278,13 @@ class Foo { constructor() {} } `, - options: [ - { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, - ], - }, - // default option + class + decorators + default order + alphabetically - { - code: ` + options: [ + { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, + ], + }, + // default option + class + decorators + default order + alphabetically + { + code: ` class Foo { public static a: string; protected static b: string = ""; @@ -5303,14 +5301,14 @@ class Foo { constructor() {} } `, - options: [ - { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, - ], - }, + options: [ + { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, + ], + }, - // default option + class + custom order + alphabetically - { - code: ` + // default option + class + custom order + alphabetically + { + code: ` class Foo { constructor() {} @@ -5323,19 +5321,19 @@ class Foo { private static c: string = ""; } `, - options: [ - { - default: { - memberTypes: ['constructor', 'instance-field', 'static-field'], - order: 'alphabetically', + options: [ + { + default: { + memberTypes: ['constructor', 'instance-field', 'static-field'], + order: 'alphabetically', + }, }, - }, - ], - }, + ], + }, - // default option + class expression + default order + alphabetically - { - code: ` + // default option + class expression + default order + alphabetically + { + code: ` const foo = class Foo { public static a: string; protected static b: string = ""; @@ -5348,14 +5346,14 @@ const foo = class Foo { constructor() {} } `, - options: [ - { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, - ], - }, + options: [ + { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, + ], + }, - // default option + class expression + custom order + alphabetically - { - code: ` + // default option + class expression + custom order + alphabetically + { + code: ` const foo = class Foo { constructor() {} @@ -5368,20 +5366,20 @@ const foo = class Foo { private static c: string = ""; } `, - options: [ - { - default: { - memberTypes: ['constructor', 'instance-field', 'static-field'], - order: 'alphabetically', - }, - }, - ], - }, - ], - invalid: [ - // default option + interface + wrong order within group and wrong group order + alphabetically - { - code: ` + options: [ + { + default: { + memberTypes: ['constructor', 'instance-field', 'static-field'], + order: 'alphabetically', + }, + }, + ], + }, + ], + invalid: [ + // default option + interface + wrong order within group and wrong group order + alphabetically + { + code: ` interface Foo { [a: string] : number; @@ -5398,30 +5396,30 @@ interface Foo { new () : Bar; } `, - options: [ - { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, - ], - errors: [ - { - messageId: 'incorrectGroupOrder', - data: { - name: 'call', - rank: 'field', - }, - }, - { - messageId: 'incorrectGroupOrder', - data: { - name: 'new', - rank: 'method', - }, - }, - ], - }, - - // default option + type literal + wrong order within group and wrong group order + alphabetically - { - code: ` + options: [ + { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, + ], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'call', + rank: 'field', + }, + }, + { + messageId: 'incorrectGroupOrder', + data: { + name: 'new', + rank: 'method', + }, + }, + ], + }, + + // default option + type literal + wrong order within group and wrong group order + alphabetically + { + code: ` type Foo = { [a: string] : number; @@ -5438,30 +5436,30 @@ type Foo = { new () : Bar; } `, - options: [ - { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, - ], - errors: [ - { - messageId: 'incorrectGroupOrder', - data: { - name: 'call', - rank: 'field', - }, - }, - { - messageId: 'incorrectGroupOrder', - data: { - name: 'new', - rank: 'method', - }, - }, - ], - }, - - // default option + class + wrong order within group and wrong group order + alphabetically - { - code: ` + options: [ + { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, + ], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'call', + rank: 'field', + }, + }, + { + messageId: 'incorrectGroupOrder', + data: { + name: 'new', + rank: 'method', + }, + }, + ], + }, + + // default option + class + wrong order within group and wrong group order + alphabetically + { + code: ` class Foo { public static c: string = ""; public static b: string = ""; @@ -5472,23 +5470,23 @@ class Foo { public d: string = ""; } `, - options: [ - { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, - ], - errors: [ - { - messageId: 'incorrectGroupOrder', - data: { - name: 'd', - rank: 'public constructor', + options: [ + { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, + ], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'd', + rank: 'public constructor', + }, }, - }, - ], - }, + ], + }, - // default option + class expression + wrong order within group and wrong group order + alphabetically - { - code: ` + // default option + class expression + wrong order within group and wrong group order + alphabetically + { + code: ` const foo = class Foo { public static c: string = ""; public static b: string = ""; @@ -5499,22 +5497,22 @@ const foo = class Foo { public d: string = ""; } `, - options: [ - { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, - ], - errors: [ - { - messageId: 'incorrectGroupOrder', - data: { - name: 'd', - rank: 'public constructor', - }, - }, - ], - }, - // default option + class + decorators + custom order + wrong order within group and wrong group order + alphabetically - { - code: ` + options: [ + { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, + ], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'd', + rank: 'public constructor', + }, + }, + ], + }, + // default option + class + decorators + custom order + wrong order within group and wrong group order + alphabetically + { + code: ` class Foo { @Dec() a1: string; @Dec() @@ -5531,47 +5529,45 @@ class Foo { @Dec() d(): void } `, - options: [ - { - default: { - memberTypes: [ - 'decorated-field', - 'field', - 'constructor', - 'decorated-method', - ], - order: 'alphabetically', - }, - }, - ], - errors: [ - { - messageId: 'incorrectGroupOrder', - data: { - name: 'b1', - rank: 'constructor', - }, - }, - { - messageId: 'incorrectGroupOrder', - data: { - name: 'b2', - rank: 'constructor', - }, - }, - ], - }, - ], -}; - -const sortedWithGroupingClassesOption: TSESLint.RunTests< - MessageIds, - Options -> = { - valid: [ - // classes option + interface + alphabetically --> Default order applies - { - code: ` + options: [ + { + default: { + memberTypes: [ + 'decorated-field', + 'field', + 'constructor', + 'decorated-method', + ], + order: 'alphabetically', + }, + }, + ], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'b1', + rank: 'constructor', + }, + }, + { + messageId: 'incorrectGroupOrder', + data: { + name: 'b2', + rank: 'constructor', + }, + }, + ], + }, + ], + }; + +const sortedWithGroupingClassesOption: TSESLint.RunTests = + { + valid: [ + // classes option + interface + alphabetically --> Default order applies + { + code: ` interface Foo { [a: string] : number; @@ -5588,12 +5584,12 @@ interface Foo { a() : void; } `, - options: [{ classes: { order: 'alphabetically' } }], - }, + options: [{ classes: { order: 'alphabetically' } }], + }, - // classes option + type literal + alphabetically --> Default order applies - { - code: ` + // classes option + type literal + alphabetically --> Default order applies + { + code: ` type Foo = { [a: string] : number; @@ -5610,12 +5606,12 @@ type Foo = { a() : void; } `, - options: [{ classes: { order: 'alphabetically' } }], - }, + options: [{ classes: { order: 'alphabetically' } }], + }, - // classes option + class + default order + alphabetically - { - code: ` + // classes option + class + default order + alphabetically + { + code: ` class Foo { public static a: string; protected static b: string = ""; @@ -5628,14 +5624,14 @@ class Foo { constructor() {} } `, - options: [ - { classes: { memberTypes: defaultOrder, order: 'alphabetically' } }, - ], - }, + options: [ + { classes: { memberTypes: defaultOrder, order: 'alphabetically' } }, + ], + }, - // classes option + class + custom order + alphabetically - { - code: ` + // classes option + class + custom order + alphabetically + { + code: ` class Foo { constructor() {} @@ -5648,19 +5644,19 @@ class Foo { private static c: string = ""; } `, - options: [ - { - classes: { - memberTypes: ['constructor', 'instance-field', 'static-field'], - order: 'alphabetically', + options: [ + { + classes: { + memberTypes: ['constructor', 'instance-field', 'static-field'], + order: 'alphabetically', + }, }, - }, - ], - }, + ], + }, - // classes option + class expression + alphabetically --> Default order applies - { - code: ` + // classes option + class expression + alphabetically --> Default order applies + { + code: ` const foo = class Foo { public static a: string; protected static b: string = ""; @@ -5673,13 +5669,13 @@ const foo = class Foo { constructor() {} } `, - options: [{ classes: { order: 'alphabetically' } }], - }, - ], - invalid: [ - // default option + class + wrong order within group and wrong group order + alphabetically - { - code: ` + options: [{ classes: { order: 'alphabetically' } }], + }, + ], + invalid: [ + // default option + class + wrong order within group and wrong group order + alphabetically + { + code: ` class Foo { public static c: string = ""; public static b: string = ""; @@ -5690,21 +5686,21 @@ class Foo { public d: string = ""; } `, - options: [ - { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, - ], - errors: [ - { - messageId: 'incorrectGroupOrder', - data: { - name: 'd', - rank: 'public constructor', - }, - }, - ], - }, - ], -}; + options: [ + { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, + ], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'd', + rank: 'public constructor', + }, + }, + ], + }, + ], + }; const sortedWithGroupingClassExpressionsOption: TSESLint.RunTests< MessageIds, diff --git a/packages/eslint-plugin/tests/rules/naming-convention.test.ts b/packages/eslint-plugin/tests/rules/naming-convention.test.ts index f4ed42e3c3e3..5aa1606eaff9 100644 --- a/packages/eslint-plugin/tests/rules/naming-convention.test.ts +++ b/packages/eslint-plugin/tests/rules/naming-convention.test.ts @@ -1314,7 +1314,7 @@ ruleTester.run('naming-convention', rule, { interface UnusedInterface {} type UnusedType< // this line is intentionally broken out - UnusedTypeParam + UnusedTypeParam, > = {}; export const used_var = 1; @@ -1328,7 +1328,7 @@ ruleTester.run('naming-convention', rule, { export interface used_interface {} export type used_type< // this line is intentionally broken out - used_typeparam + used_typeparam, > = used_typeparam; `, options: [ @@ -2157,7 +2157,7 @@ ruleTester.run('naming-convention', rule, { interface UnusedInterface {} type UnusedType< // this line is intentionally broken out - UnusedTypeParam + UnusedTypeParam, > = {}; `, options: [ diff --git a/packages/eslint-plugin/tests/rules/no-explicit-any.test.ts b/packages/eslint-plugin/tests/rules/no-explicit-any.test.ts index 2694fdbf1042..cb99564c943d 100644 --- a/packages/eslint-plugin/tests/rules/no-explicit-any.test.ts +++ b/packages/eslint-plugin/tests/rules/no-explicit-any.test.ts @@ -235,8 +235,7 @@ interface Qux4 { options: [{ ignoreRestArgs: true }], }, { - code: - 'function quux4(fn: (...args: ReadonlyArray) => void): void {}', + code: 'function quux4(fn: (...args: ReadonlyArray) => void): void {}', options: [{ ignoreRestArgs: true }], }, { @@ -368,831 +367,835 @@ interface Garply4 { options: [{ ignoreRestArgs: true }], }, ], - invalid: ([ - { - code: 'const number: any = 1', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 15, - }, - ], - }, - { - code: 'function generic(): any {}', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 21, - }, - ], - }, - { - code: 'function generic(): Array {}', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 27, - }, - ], - }, - { - code: 'function generic(): any[] {}', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 21, - }, - ], - }, - { - code: 'function generic(param: Array): number {}', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 31, - }, - ], - }, - { - code: 'function generic(param: any[]): number {}', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 25, - }, - ], - }, - { - code: 'function generic(param: Array): Array {}', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 31, - suggestions: [ - { - messageId: 'suggestUnknown', - output: 'function generic(param: Array): Array {}', - }, - { - messageId: 'suggestNever', - output: 'function generic(param: Array): Array {}', - }, - ], - }, - { - messageId: 'unexpectedAny', - line: 1, - column: 44, - suggestions: [ - { - messageId: 'suggestUnknown', - output: 'function generic(param: Array): Array {}', - }, - { - messageId: 'suggestNever', - output: 'function generic(param: Array): Array {}', - }, - ], - }, - ], - }, - { - code: 'function generic(): Array> {}', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 33, - }, - ], - }, - { - code: 'function generic(): Array {}', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 27, - }, - ], - }, - { - code: ` + invalid: ( + [ + { + code: 'const number: any = 1', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 15, + }, + ], + }, + { + code: 'function generic(): any {}', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 21, + }, + ], + }, + { + code: 'function generic(): Array {}', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 27, + }, + ], + }, + { + code: 'function generic(): any[] {}', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 21, + }, + ], + }, + { + code: 'function generic(param: Array): number {}', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 31, + }, + ], + }, + { + code: 'function generic(param: any[]): number {}', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 25, + }, + ], + }, + { + code: 'function generic(param: Array): Array {}', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 31, + suggestions: [ + { + messageId: 'suggestUnknown', + output: + 'function generic(param: Array): Array {}', + }, + { + messageId: 'suggestNever', + output: 'function generic(param: Array): Array {}', + }, + ], + }, + { + messageId: 'unexpectedAny', + line: 1, + column: 44, + suggestions: [ + { + messageId: 'suggestUnknown', + output: + 'function generic(param: Array): Array {}', + }, + { + messageId: 'suggestNever', + output: 'function generic(param: Array): Array {}', + }, + ], + }, + ], + }, + { + code: 'function generic(): Array> {}', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 33, + }, + ], + }, + { + code: 'function generic(): Array {}', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 27, + }, + ], + }, + { + code: ` class Greeter { constructor(param: Array) {} } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 30, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 30, + }, + ], + }, + { + code: ` class Greeter { message: any; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 14, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 14, + }, + ], + }, + { + code: ` class Greeter { message: Array; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 20, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 20, + }, + ], + }, + { + code: ` class Greeter { message: any[]; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 14, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 14, + }, + ], + }, + { + code: ` class Greeter { message: Array>; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 26, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 26, + }, + ], + }, + { + code: ` class Greeter { message: Array; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 20, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 20, + }, + ], + }, + { + code: ` interface Greeter { message: any; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 14, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 14, + }, + ], + }, + { + code: ` interface Greeter { message: Array; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 20, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 20, + }, + ], + }, + { + code: ` interface Greeter { message: any[]; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 14, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 14, + }, + ], + }, + { + code: ` interface Greeter { message: Array>; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 26, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 26, + }, + ], + }, + { + code: ` interface Greeter { message: Array; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 20, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 20, + }, + ], + }, + { + code: ` type obj = { message: any; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 14, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 14, + }, + ], + }, + { + code: ` type obj = { message: Array; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 20, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 20, + }, + ], + }, + { + code: ` type obj = { message: any[]; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 14, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 14, + }, + ], + }, + { + code: ` type obj = { message: Array>; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 26, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 26, + }, + ], + }, + { + code: ` type obj = { message: Array; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 20, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 20, + }, + ], + }, + { + code: ` type obj = { message: string | any; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 23, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 23, + }, + ], + }, + { + code: ` type obj = { message: string | Array; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 29, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 29, + }, + ], + }, + { + code: ` type obj = { message: string | any[]; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 23, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 23, + }, + ], + }, + { + code: ` type obj = { message: string | Array>; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 35, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 35, + }, + ], + }, + { + code: ` type obj = { message: string | Array; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 29, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 29, + }, + ], + }, + { + code: ` type obj = { message: string & any; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 23, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 23, + }, + ], + }, + { + code: ` type obj = { message: string & Array; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 29, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 29, + }, + ], + }, + { + code: ` type obj = { message: string & any[]; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 23, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 23, + }, + ], + }, + { + code: ` type obj = { message: string & Array>; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 35, - }, - ], - }, - { - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 35, + }, + ], + }, + { + code: ` type obj = { message: string & Array; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 3, - column: 29, - }, - ], - }, - { - code: 'class Foo extends Bar {}', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 15, - suggestions: [ - { - messageId: 'suggestUnknown', - output: 'class Foo extends Bar {}', - }, - { - messageId: 'suggestNever', - output: 'class Foo extends Bar {}', - }, - ], - }, - { - messageId: 'unexpectedAny', - line: 1, - column: 32, - suggestions: [ - { - messageId: 'suggestUnknown', - output: 'class Foo extends Bar {}', - }, - { - messageId: 'suggestNever', - output: 'class Foo extends Bar {}', - }, - ], - }, - ], - }, - { - code: 'abstract class Foo extends Bar {}', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 24, - suggestions: [ - { - messageId: 'suggestUnknown', - output: 'abstract class Foo extends Bar {}', - }, - { - messageId: 'suggestNever', - output: 'abstract class Foo extends Bar {}', - }, - ], - }, - { - messageId: 'unexpectedAny', - line: 1, - column: 41, - suggestions: [ - { - messageId: 'suggestUnknown', - output: 'abstract class Foo extends Bar {}', - }, - { - messageId: 'suggestNever', - output: 'abstract class Foo extends Bar {}', - }, - ], - }, - ], - }, - { - code: 'abstract class Foo implements Bar, Baz {}', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 24, - suggestions: [ - { - messageId: 'suggestUnknown', - output: - 'abstract class Foo implements Bar, Baz {}', - }, - { - messageId: 'suggestNever', - output: - 'abstract class Foo implements Bar, Baz {}', - }, - ], - }, - { - messageId: 'unexpectedAny', - line: 1, - column: 44, - suggestions: [ - { - messageId: 'suggestUnknown', - output: - 'abstract class Foo implements Bar, Baz {}', - }, - { - messageId: 'suggestNever', - output: - 'abstract class Foo implements Bar, Baz {}', - }, - ], - }, - { - messageId: 'unexpectedAny', - line: 1, - column: 54, - suggestions: [ - { - messageId: 'suggestUnknown', - output: - 'abstract class Foo implements Bar, Baz {}', - }, - { - messageId: 'suggestNever', - output: - 'abstract class Foo implements Bar, Baz {}', - }, - ], - }, - ], - }, - { - code: 'new Foo()', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 9, - }, - ], - }, - { - code: 'Foo()', - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 5, - }, - ], - }, - { - // https://github.com/typescript-eslint/typescript-eslint/issues/64 - code: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 3, + column: 29, + }, + ], + }, + { + code: 'class Foo extends Bar {}', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 15, + suggestions: [ + { + messageId: 'suggestUnknown', + output: 'class Foo extends Bar {}', + }, + { + messageId: 'suggestNever', + output: 'class Foo extends Bar {}', + }, + ], + }, + { + messageId: 'unexpectedAny', + line: 1, + column: 32, + suggestions: [ + { + messageId: 'suggestUnknown', + output: 'class Foo extends Bar {}', + }, + { + messageId: 'suggestNever', + output: 'class Foo extends Bar {}', + }, + ], + }, + ], + }, + { + code: 'abstract class Foo extends Bar {}', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 24, + suggestions: [ + { + messageId: 'suggestUnknown', + output: 'abstract class Foo extends Bar {}', + }, + { + messageId: 'suggestNever', + output: 'abstract class Foo extends Bar {}', + }, + ], + }, + { + messageId: 'unexpectedAny', + line: 1, + column: 41, + suggestions: [ + { + messageId: 'suggestUnknown', + output: 'abstract class Foo extends Bar {}', + }, + { + messageId: 'suggestNever', + output: 'abstract class Foo extends Bar {}', + }, + ], + }, + ], + }, + { + code: 'abstract class Foo implements Bar, Baz {}', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 24, + suggestions: [ + { + messageId: 'suggestUnknown', + output: + 'abstract class Foo implements Bar, Baz {}', + }, + { + messageId: 'suggestNever', + output: + 'abstract class Foo implements Bar, Baz {}', + }, + ], + }, + { + messageId: 'unexpectedAny', + line: 1, + column: 44, + suggestions: [ + { + messageId: 'suggestUnknown', + output: + 'abstract class Foo implements Bar, Baz {}', + }, + { + messageId: 'suggestNever', + output: + 'abstract class Foo implements Bar, Baz {}', + }, + ], + }, + { + messageId: 'unexpectedAny', + line: 1, + column: 54, + suggestions: [ + { + messageId: 'suggestUnknown', + output: + 'abstract class Foo implements Bar, Baz {}', + }, + { + messageId: 'suggestNever', + output: + 'abstract class Foo implements Bar, Baz {}', + }, + ], + }, + ], + }, + { + code: 'new Foo()', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 9, + }, + ], + }, + { + code: 'Foo()', + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 5, + }, + ], + }, + { + // https://github.com/typescript-eslint/typescript-eslint/issues/64 + code: ` function test>() {} const test = >() => {}; `.trimRight(), - errors: [ - { - messageId: 'unexpectedAny', - line: 2, - column: 33, - suggestions: [ - { - messageId: 'suggestUnknown', - output: ` + errors: [ + { + messageId: 'unexpectedAny', + line: 2, + column: 33, + suggestions: [ + { + messageId: 'suggestUnknown', + output: ` function test>() {} const test = >() => {}; `.trimRight(), - }, - { - messageId: 'suggestNever', - output: ` + }, + { + messageId: 'suggestNever', + output: ` function test>() {} const test = >() => {}; `.trimRight(), - }, - ], - }, - { - messageId: 'unexpectedAny', - line: 3, - column: 33, - suggestions: [ - { - messageId: 'suggestUnknown', - output: ` + }, + ], + }, + { + messageId: 'unexpectedAny', + line: 3, + column: 33, + suggestions: [ + { + messageId: 'suggestUnknown', + output: ` function test>() {} const test = >() => {}; `.trimRight(), - }, - { - messageId: 'suggestNever', - output: ` + }, + { + messageId: 'suggestNever', + output: ` function test>() {} const test = >() => {}; `.trimRight(), - }, - ], - }, - ], - }, - { - // https://github.com/eslint/typescript-eslint-parser/issues/397 - code: ` + }, + ], + }, + ], + }, + { + // https://github.com/eslint/typescript-eslint-parser/issues/397 + code: ` function foo(a: number, ...rest: any[]): void { return; } `, - errors: [ - { - messageId: 'unexpectedAny', - line: 2, - column: 42, - }, - ], - }, - { - code: 'type Any = any;', - options: [{ ignoreRestArgs: true }], - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 12, - }, - ], - }, - { - code: 'function foo5(...args: any) {}', - options: [{ ignoreRestArgs: true }], - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 24, - }, - ], - }, - { - code: 'const bar5 = function (...args: any) {}', - options: [{ ignoreRestArgs: true }], - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 33, - }, - ], - }, - { - code: 'const baz5 = (...args: any) => {}', - options: [{ ignoreRestArgs: true }], - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 24, - }, - ], - }, - { - code: 'interface Qux5 { (...args: any): void; }', - options: [{ ignoreRestArgs: true }], - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 28, - }, - ], - }, - { - code: 'function quux5(fn: (...args: any) => void): void {}', - options: [{ ignoreRestArgs: true }], - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 30, - }, - ], - }, - { - code: 'function quuz5(): ((...args: any) => void) {}', - options: [{ ignoreRestArgs: true }], - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 30, - }, - ], - }, - { - code: 'type Fred5 = (...args: any) => void;', - options: [{ ignoreRestArgs: true }], - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 24, - }, - ], - }, - { - code: 'type Corge5 = new (...args: any) => void;', - options: [{ ignoreRestArgs: true }], - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 29, - }, - ], - }, - { - code: 'interface Grault5 { new (...args: any): void; }', - options: [{ ignoreRestArgs: true }], - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 35, - }, - ], - }, - { - code: 'interface Garply5 { f(...args: any): void; }', - options: [{ ignoreRestArgs: true }], - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 32, - }, - ], - }, - { - code: 'declare function waldo5(...args: any): void;', - options: [{ ignoreRestArgs: true }], - errors: [ - { - messageId: 'unexpectedAny', - line: 1, - column: 34, - }, - ], - }, - ] as InvalidTestCase[]).reduce((acc, testCase) => { + errors: [ + { + messageId: 'unexpectedAny', + line: 2, + column: 42, + }, + ], + }, + { + code: 'type Any = any;', + options: [{ ignoreRestArgs: true }], + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 12, + }, + ], + }, + { + code: 'function foo5(...args: any) {}', + options: [{ ignoreRestArgs: true }], + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 24, + }, + ], + }, + { + code: 'const bar5 = function (...args: any) {}', + options: [{ ignoreRestArgs: true }], + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 33, + }, + ], + }, + { + code: 'const baz5 = (...args: any) => {}', + options: [{ ignoreRestArgs: true }], + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 24, + }, + ], + }, + { + code: 'interface Qux5 { (...args: any): void; }', + options: [{ ignoreRestArgs: true }], + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 28, + }, + ], + }, + { + code: 'function quux5(fn: (...args: any) => void): void {}', + options: [{ ignoreRestArgs: true }], + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 30, + }, + ], + }, + { + code: 'function quuz5(): ((...args: any) => void) {}', + options: [{ ignoreRestArgs: true }], + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 30, + }, + ], + }, + { + code: 'type Fred5 = (...args: any) => void;', + options: [{ ignoreRestArgs: true }], + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 24, + }, + ], + }, + { + code: 'type Corge5 = new (...args: any) => void;', + options: [{ ignoreRestArgs: true }], + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 29, + }, + ], + }, + { + code: 'interface Grault5 { new (...args: any): void; }', + options: [{ ignoreRestArgs: true }], + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 35, + }, + ], + }, + { + code: 'interface Garply5 { f(...args: any): void; }', + options: [{ ignoreRestArgs: true }], + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 32, + }, + ], + }, + { + code: 'declare function waldo5(...args: any): void;', + options: [{ ignoreRestArgs: true }], + errors: [ + { + messageId: 'unexpectedAny', + line: 1, + column: 34, + }, + ], + }, + ] as InvalidTestCase[] + ).reduce((acc, testCase) => { const suggestions = (code: string): SuggestionOutput[] => [ { messageId: 'suggestUnknown', diff --git a/packages/eslint-plugin/tests/rules/no-inferrable-types.test.ts b/packages/eslint-plugin/tests/rules/no-inferrable-types.test.ts index 0f7bb141f1b6..fc216c6c4764 100644 --- a/packages/eslint-plugin/tests/rules/no-inferrable-types.test.ts +++ b/packages/eslint-plugin/tests/rules/no-inferrable-types.test.ts @@ -72,27 +72,25 @@ const testCases = [ const validTestCases = flatten( testCases.map(c => c.code.map(code => `const a = ${code}`)), ); -const invalidTestCases: TSESLint.InvalidTestCase< - MessageIds, - Options ->[] = flatten( - testCases.map(cas => - cas.code.map(code => ({ - code: `const a: ${cas.type} = ${code}`, - output: `const a = ${code}`, - errors: [ - { - messageId: 'noInferrableType', - data: { - type: cas.type, +const invalidTestCases: TSESLint.InvalidTestCase[] = + flatten( + testCases.map(cas => + cas.code.map(code => ({ + code: `const a: ${cas.type} = ${code}`, + output: `const a = ${code}`, + errors: [ + { + messageId: 'noInferrableType', + data: { + type: cas.type, + }, + line: 1, + column: 7, }, - line: 1, - column: 7, - }, - ], - })), - ), -); + ], + })), + ), + ); const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', @@ -124,18 +122,15 @@ class Foo { "const fn = function (a: any = 5, b: any = true, c: any = 'foo') {};", { - code: - "const fn = (a: number = 5, b: boolean = true, c: string = 'foo') => {};", + code: "const fn = (a: number = 5, b: boolean = true, c: string = 'foo') => {};", options: [{ ignoreParameters: true }], }, { - code: - "function fn(a: number = 5, b: boolean = true, c: string = 'foo') {}", + code: "function fn(a: number = 5, b: boolean = true, c: string = 'foo') {}", options: [{ ignoreParameters: true }], }, { - code: - "const fn = function (a: number = 5, b: boolean = true, c: string = 'foo') {};", + code: "const fn = function (a: number = 5, b: boolean = true, c: string = 'foo') {};", options: [{ ignoreParameters: true }], }, { @@ -163,8 +158,7 @@ class Foo { ...invalidTestCases, { - code: - "const fn = (a: number = 5, b: boolean = true, c: string = 'foo') => {};", + code: "const fn = (a: number = 5, b: boolean = true, c: string = 'foo') => {};", output: "const fn = (a = 5, b = true, c = 'foo') => {};", options: [ { diff --git a/packages/eslint-plugin/tests/rules/no-invalid-void-type.test.ts b/packages/eslint-plugin/tests/rules/no-invalid-void-type.test.ts index 56df4f47ab6f..0141da093b50 100644 --- a/packages/eslint-plugin/tests/rules/no-invalid-void-type.test.ts +++ b/packages/eslint-plugin/tests/rules/no-invalid-void-type.test.ts @@ -202,8 +202,7 @@ ruleTester.run('allowInGenericTypeArguments: true', rule, { ], }, { - code: - 'declare function functionDeclaration(arg: T): void;', + code: 'declare function functionDeclaration(arg: T): void;', errors: [ { messageId: 'invalidVoidNotReturnOrGeneric', @@ -223,8 +222,7 @@ ruleTester.run('allowInGenericTypeArguments: true', rule, { ], }, { - code: - 'declare function functionDeclaration2(arg: T): void;', + code: 'declare function functionDeclaration2(arg: T): void;', errors: [ { messageId: 'invalidVoidNotReturnOrGeneric', diff --git a/packages/eslint-plugin/tests/rules/no-loss-of-precision.test.ts b/packages/eslint-plugin/tests/rules/no-loss-of-precision.test.ts index f2405bacdb6b..cd783915b4dc 100644 --- a/packages/eslint-plugin/tests/rules/no-loss-of-precision.test.ts +++ b/packages/eslint-plugin/tests/rules/no-loss-of-precision.test.ts @@ -28,8 +28,7 @@ ruleTester.run('no-loss-of-precision', rule, { errors: [{ messageId: 'noLossOfPrecision' }], }, { - code: - 'const x = 0b100_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_001;', + code: 'const x = 0b100_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_001;', errors: [{ messageId: 'noLossOfPrecision' }], }, ], diff --git a/packages/eslint-plugin/tests/rules/no-type-alias.test.ts b/packages/eslint-plugin/tests/rules/no-type-alias.test.ts index ab4e3dd49191..1f44675a8515 100644 --- a/packages/eslint-plugin/tests/rules/no-type-alias.test.ts +++ b/packages/eslint-plugin/tests/rules/no-type-alias.test.ts @@ -430,8 +430,7 @@ type KeyNames = keyof typeof SCALARS; options: [{ allowTupleTypes: 'in-intersections' }], }, { - code: - 'type Foo = ([string] & [number, number]) | [number, number, number];', + code: 'type Foo = ([string] & [number, number]) | [number, number, number];', options: [{ allowTupleTypes: 'in-unions-and-intersections' }], }, { @@ -451,8 +450,7 @@ type KeyNames = keyof typeof SCALARS; options: [{ allowTupleTypes: 'in-intersections' }], }, { - code: - 'type Foo = ([string] & [number, number]) | readonly [number, number, number];', + code: 'type Foo = ([string] & [number, number]) | readonly [number, number, number];', options: [{ allowTupleTypes: 'in-unions-and-intersections' }], }, { @@ -472,8 +470,7 @@ type KeyNames = keyof typeof SCALARS; options: [{ allowTupleTypes: 'in-intersections' }], }, { - code: - 'type Foo = ([string] & [number, number]) | keyof [number, number, number];', + code: 'type Foo = ([string] & [number, number]) | keyof [number, number, number];', options: [{ allowTupleTypes: 'in-unions-and-intersections' }], }, { diff --git a/packages/eslint-plugin/tests/rules/no-unused-vars-experimental.test.ts b/packages/eslint-plugin/tests/rules/no-unused-vars-experimental.test.ts index c093498200cf..67b9d22c86f5 100644 --- a/packages/eslint-plugin/tests/rules/no-unused-vars-experimental.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unused-vars-experimental.test.ts @@ -21,7 +21,7 @@ const ruleTester = new RuleTester({ const hasExport = /^export/m; // const hasImport = /^import .+? from ['"]/m; function makeExternalModule< - T extends ValidTestCase | InvalidTestCase + T extends ValidTestCase | InvalidTestCase, >(tests: T[]): T[] { return tests.map(t => { if (!hasExport.test(t.code)) { diff --git a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts index c5b5ef1887f2..e13dfc6f8496 100644 --- a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts @@ -559,11 +559,8 @@ export interface IFoo { ` import * as fastify from 'fastify'; import { Server, IncomingMessage, ServerResponse } from 'http'; -const server: fastify.FastifyInstance< - Server, - IncomingMessage, - ServerResponse -> = fastify({}); +const server: fastify.FastifyInstance = + fastify({}); server.get('/ping'); `, // https://github.com/typescript-eslint/typescript-eslint/issues/61 diff --git a/packages/eslint-plugin/tests/rules/object-curly-spacing.test.ts b/packages/eslint-plugin/tests/rules/object-curly-spacing.test.ts index ecde35b775ff..7b917a673086 100644 --- a/packages/eslint-plugin/tests/rules/object-curly-spacing.test.ts +++ b/packages/eslint-plugin/tests/rules/object-curly-spacing.test.ts @@ -581,8 +581,7 @@ ruleTester.run('object-curly-spacing', rule, { code: "const x:{// line-comment\n[k in 'union']: number\n}", }, { - code: - "const x:{/* inline-comment */[k in 'union']: number/* inline-comment */}", + code: "const x:{/* inline-comment */[k in 'union']: number/* inline-comment */}", }, { code: "const x:{\n[k in 'union']: number\n}", @@ -687,8 +686,7 @@ ruleTester.run('object-curly-spacing', rule, { options: ['always'], }, { - code: - "const x:{ /* inline-comment */ [k in 'union']: number /* inline-comment */ }", + code: "const x:{ /* inline-comment */ [k in 'union']: number /* inline-comment */ }", options: ['always'], }, { diff --git a/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts b/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts index 80340828a748..feb7f9bd524d 100644 --- a/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts @@ -70,8 +70,7 @@ const baseCases = [ output: 'foo?.bar?.baz?.buzz()', }, { - code: - 'foo && foo.bar && foo.bar.baz && foo.bar.baz.buzz && foo.bar.baz.buzz()', + code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz.buzz && foo.bar.baz.buzz()', output: 'foo?.bar?.baz?.buzz?.()', }, { @@ -94,8 +93,7 @@ const baseCases = [ }, { // case with a call expr inside the chain for some inefficient reason - code: - 'foo && foo.bar() && foo.bar().baz && foo.bar().baz.buzz && foo.bar().baz.buzz()', + code: 'foo && foo.bar() && foo.bar().baz && foo.bar().baz.buzz && foo.bar().baz.buzz()', output: 'foo?.bar()?.baz?.buzz?.()', }, // chained calls with element access @@ -104,14 +102,12 @@ const baseCases = [ output: 'foo?.bar?.baz?.[buzz]()', }, { - code: - 'foo && foo.bar && foo.bar.baz && foo.bar.baz[buzz] && foo.bar.baz[buzz]()', + code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz[buzz] && foo.bar.baz[buzz]()', output: 'foo?.bar?.baz?.[buzz]?.()', }, // (partially) pre-optional chained { - code: - 'foo && foo?.bar && foo?.bar.baz && foo?.bar.baz[buzz] && foo?.bar.baz[buzz]()', + code: 'foo && foo?.bar && foo?.bar.baz && foo?.bar.baz[buzz] && foo?.bar.baz[buzz]()', output: 'foo?.bar?.baz?.[buzz]?.()', }, { @@ -254,8 +250,7 @@ ruleTester.run('prefer-optional-chain', rule, { }, // case with inconsistent checks { - code: - 'foo && foo.bar != null && foo.bar.baz !== undefined && foo.bar.baz.buzz;', + code: 'foo && foo.bar != null && foo.bar.baz !== undefined && foo.bar.baz.buzz;', output: null, errors: [ { @@ -468,8 +463,7 @@ foo?.bar(/* comment */a, }, // using suggestion instead of autofix { - code: - 'foo && foo.bar != null && foo.bar.baz !== undefined && foo.bar.baz.buzz;', + code: 'foo && foo.bar != null && foo.bar.baz !== undefined && foo.bar.baz.buzz;', output: null, errors: [ { 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 243c4e065b98..95cb567d78bd 100644 --- a/packages/eslint-plugin/tests/rules/prefer-regexp-exec.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-regexp-exec.test.ts @@ -126,8 +126,7 @@ RegExp(search).exec(text); ], }, { - code: - "'Infinity contains -Infinity and +Infinity in JavaScript.'.match(Infinity);", + code: "'Infinity contains -Infinity and +Infinity in JavaScript.'.match(Infinity);", errors: [ { messageId: 'regExpExecOverStringMatch', @@ -137,8 +136,7 @@ RegExp(search).exec(text); ], }, { - code: - "'Infinity contains -Infinity and +Infinity in JavaScript.'.match(+Infinity);", + code: "'Infinity contains -Infinity and +Infinity in JavaScript.'.match(+Infinity);", errors: [ { messageId: 'regExpExecOverStringMatch', @@ -148,8 +146,7 @@ RegExp(search).exec(text); ], }, { - code: - "'Infinity contains -Infinity and +Infinity in JavaScript.'.match(-Infinity);", + code: "'Infinity contains -Infinity and +Infinity in JavaScript.'.match(-Infinity);", errors: [ { messageId: 'regExpExecOverStringMatch', diff --git a/packages/eslint-plugin/tests/rules/prefer-string-starts-ends-with.test.ts b/packages/eslint-plugin/tests/rules/prefer-string-starts-ends-with.test.ts index 0cef89740d56..aefb7cd8d2d9 100644 --- a/packages/eslint-plugin/tests/rules/prefer-string-starts-ends-with.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-string-starts-ends-with.test.ts @@ -1069,13 +1069,13 @@ function addOptional>( ): TSESLint.ValidTestCase[]; function addOptional< TMessageIds extends string, - TOptions extends Readonly + TOptions extends Readonly, >( cases: TSESLint.InvalidTestCase[], ): TSESLint.InvalidTestCase[]; function addOptional< TMessageIds extends string, - TOptions extends Readonly + TOptions extends Readonly, >( cases: (Case | string)[], ): Case[] { diff --git a/packages/eslint-plugin/tests/rules/quotes.test.ts b/packages/eslint-plugin/tests/rules/quotes.test.ts index 847e27e81f52..ec757dda3e54 100644 --- a/packages/eslint-plugin/tests/rules/quotes.test.ts +++ b/packages/eslint-plugin/tests/rules/quotes.test.ts @@ -290,18 +290,15 @@ ruleTester.run('quotes', rule, { options: ['backtick'], }, { - code: - 'function foo() { "use strict"; "use strong"; "use asm"; var foo = `backtick`; }', + code: 'function foo() { "use strict"; "use strong"; "use asm"; var foo = `backtick`; }', options: ['backtick'], }, { - code: - "(function() { 'use strict'; 'use strong'; 'use asm'; var foo = `backtick`; })();", + code: "(function() { 'use strict'; 'use strong'; 'use asm'; var foo = `backtick`; })();", options: ['backtick'], }, { - code: - '(() => { "use strict"; "use strong"; "use asm"; var foo = `backtick`; })();', + code: '(() => { "use strict"; "use strong"; "use asm"; var foo = `backtick`; })();', options: ['backtick'], }, diff --git a/packages/eslint-plugin/tests/rules/require-await.test.ts b/packages/eslint-plugin/tests/rules/require-await.test.ts index 045558d2eb10..248888b429f0 100644 --- a/packages/eslint-plugin/tests/rules/require-await.test.ts +++ b/packages/eslint-plugin/tests/rules/require-await.test.ts @@ -197,7 +197,7 @@ const numberOne = async function (): Promise { { messageId: 'missingAwait', data: { - name: 'Async function', + name: "Async function 'numberOne'", }, }, ], @@ -272,7 +272,7 @@ const foo = async function* () { { messageId: 'missingAwait', data: { - name: 'Async generator function', + name: "Async generator function 'foo'", }, }, ], diff --git a/packages/eslint-plugin/tests/util/isUnsafeAssignment.test.ts b/packages/eslint-plugin/tests/util/isUnsafeAssignment.test.ts index ece61a1c149c..1d4946a964de 100644 --- a/packages/eslint-plugin/tests/util/isUnsafeAssignment.test.ts +++ b/packages/eslint-plugin/tests/util/isUnsafeAssignment.test.ts @@ -8,9 +8,7 @@ import { isUnsafeAssignment } from '../../src/util/types'; describe('isUnsafeAssignment', () => { const rootDir = getFixturesRootDir(); - function getTypes( - code: string, - ): { + function getTypes(code: string): { sender: ts.Type; senderNode: TSESTree.Node; receiver: ts.Type; diff --git a/packages/eslint-plugin/tools/generate-configs.ts b/packages/eslint-plugin/tools/generate-configs.ts index e78808aa4b1d..ed84f286496b 100644 --- a/packages/eslint-plugin/tools/generate-configs.ts +++ b/packages/eslint-plugin/tools/generate-configs.ts @@ -49,10 +49,8 @@ const BASE_RULES_TO_BE_OVERRIDDEN = new Map( ); const EXTENDS = ['./configs/base', './configs/eslint-recommended']; -const ruleEntries: [ - string, - TSESLint.RuleModule, -][] = Object.entries(rules).sort((a, b) => a[0].localeCompare(b[0])); +const ruleEntries: [string, TSESLint.RuleModule][] = + Object.entries(rules).sort((a, b) => a[0].localeCompare(b[0])); /** * Helper function reduces records to key - value pairs. diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index b0f79040971c..7649dc27d7c5 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@types/json-schema": "^7.0.3", + "@types/json-schema": "^7.0.7", "@typescript-eslint/scope-manager": "4.25.0", "@typescript-eslint/types": "4.25.0", "@typescript-eslint/typescript-estree": "4.25.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" }, "peerDependencies": { "eslint": "*" diff --git a/packages/experimental-utils/src/eslint-utils/RuleCreator.ts b/packages/experimental-utils/src/eslint-utils/RuleCreator.ts index ca1cfb3302e2..f02b7589862a 100644 --- a/packages/experimental-utils/src/eslint-utils/RuleCreator.ts +++ b/packages/experimental-utils/src/eslint-utils/RuleCreator.ts @@ -19,7 +19,7 @@ function RuleCreator(urlCreator: (ruleName: string) => string) { return function createRule< TOptions extends readonly unknown[], TMessageIds extends string, - TRuleListener extends RuleListener = RuleListener + TRuleListener extends RuleListener = RuleListener, >({ name, meta, diff --git a/packages/experimental-utils/src/eslint-utils/batchedSingleLineTests.ts b/packages/experimental-utils/src/eslint-utils/batchedSingleLineTests.ts index 6ed25e4a8ac4..29a56671a351 100644 --- a/packages/experimental-utils/src/eslint-utils/batchedSingleLineTests.ts +++ b/packages/experimental-utils/src/eslint-utils/batchedSingleLineTests.ts @@ -24,13 +24,13 @@ function batchedSingleLineTests>( */ function batchedSingleLineTests< TMessageIds extends string, - TOptions extends Readonly + TOptions extends Readonly, >( test: InvalidTestCase, ): InvalidTestCase[]; function batchedSingleLineTests< TMessageIds extends string, - TOptions extends Readonly + TOptions extends Readonly, >( options: ValidTestCase | InvalidTestCase, ): (ValidTestCase | InvalidTestCase)[] { diff --git a/packages/experimental-utils/src/eslint-utils/getParserServices.ts b/packages/experimental-utils/src/eslint-utils/getParserServices.ts index 925d49761522..27ad579272b9 100644 --- a/packages/experimental-utils/src/eslint-utils/getParserServices.ts +++ b/packages/experimental-utils/src/eslint-utils/getParserServices.ts @@ -9,7 +9,7 @@ const ERROR_MESSAGE = */ function getParserServices< TMessageIds extends string, - TOptions extends readonly unknown[] + TOptions extends readonly unknown[], >( context: Readonly>, allowWithoutFullTypeInformation = false, diff --git a/packages/experimental-utils/src/json-schema.ts b/packages/experimental-utils/src/json-schema.ts index 4b2b1abfe33d..8e11b8b3caa2 100644 --- a/packages/experimental-utils/src/json-schema.ts +++ b/packages/experimental-utils/src/json-schema.ts @@ -2,6 +2,7 @@ // If we do export *, then it will also export these function declarations. // This will cause typescript to not scrub the require from the build, breaking anyone who doesn't have it as a dependency +// eslint-disable-next-line import/no-extraneous-dependencies export { JSONSchema4, JSONSchema4Type, @@ -20,4 +21,4 @@ export { JSONSchema7Version, ValidationError, ValidationResult, -} from 'json-schema'; // eslint-disable-line import/no-extraneous-dependencies +} from 'json-schema'; diff --git a/packages/experimental-utils/src/ts-eslint-scope/Definition.ts b/packages/experimental-utils/src/ts-eslint-scope/Definition.ts index 15c69bbf86c3..1999c4f4863e 100644 --- a/packages/experimental-utils/src/ts-eslint-scope/Definition.ts +++ b/packages/experimental-utils/src/ts-eslint-scope/Definition.ts @@ -27,13 +27,14 @@ const Definition = ESLintDefinition as DefinitionConstructor; // eslint-disable-next-line @typescript-eslint/no-empty-interface interface ParameterDefinition extends Definition {} -const ParameterDefinition = ESLintParameterDefinition as DefinitionConstructor & { - new ( - name: TSESTree.Node, - node: TSESTree.Node, - index?: number | null, - rest?: boolean, - ): ParameterDefinition; -}; +const ParameterDefinition = + ESLintParameterDefinition as DefinitionConstructor & { + new ( + name: TSESTree.Node, + node: TSESTree.Node, + index?: number | null, + rest?: boolean, + ): ParameterDefinition; + }; export { Definition, ParameterDefinition }; diff --git a/packages/experimental-utils/src/ts-eslint-scope/Scope.ts b/packages/experimental-utils/src/ts-eslint-scope/Scope.ts index 49f1e11c7955..9b2c711d2dc2 100644 --- a/packages/experimental-utils/src/ts-eslint-scope/Scope.ts +++ b/packages/experimental-utils/src/ts-eslint-scope/Scope.ts @@ -142,8 +142,9 @@ const ModuleScope = ESLintModuleScope as ScopeConstructor & ScopeChildConstructorWithUpperScope; interface FunctionExpressionNameScope extends Scope {} -const FunctionExpressionNameScope = ESLintFunctionExpressionNameScope as ScopeConstructor & - ScopeChildConstructorWithUpperScope; +const FunctionExpressionNameScope = + ESLintFunctionExpressionNameScope as ScopeConstructor & + ScopeChildConstructorWithUpperScope; interface CatchScope extends Scope {} const CatchScope = ESLintCatchScope as ScopeConstructor & diff --git a/packages/experimental-utils/src/ts-eslint/CLIEngine.ts b/packages/experimental-utils/src/ts-eslint/CLIEngine.ts index fec56c17b410..dfcc2347a5e8 100644 --- a/packages/experimental-utils/src/ts-eslint/CLIEngine.ts +++ b/packages/experimental-utils/src/ts-eslint/CLIEngine.ts @@ -71,7 +71,7 @@ declare class CLIEngineBase { TMessageIds extends string = string, TOptions extends readonly unknown[] = unknown[], // for extending base rules - TRuleListener extends RuleListener = RuleListener + TRuleListener extends RuleListener = RuleListener, >(): Map>; //////////////////// diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index 702351af385c..098ae411bc4e 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -115,9 +115,8 @@ interface RuleFixer { type ReportFixFunction = ( fixer: RuleFixer, ) => null | RuleFix | RuleFix[] | IterableIterator; -type ReportSuggestionArray< - TMessageIds extends string -> = ReportDescriptorBase[]; +type ReportSuggestionArray = + ReportDescriptorBase[]; interface ReportDescriptorBase { /** @@ -162,14 +161,13 @@ interface ReportDescriptorLocOnly { */ loc: Readonly | Readonly; } -type ReportDescriptor< - TMessageIds extends string -> = ReportDescriptorWithSuggestion & - (ReportDescriptorNodeOptionalLoc | ReportDescriptorLocOnly); +type ReportDescriptor = + ReportDescriptorWithSuggestion & + (ReportDescriptorNodeOptionalLoc | ReportDescriptorLocOnly); interface RuleContext< TMessageIds extends string, - TOptions extends readonly unknown[] + TOptions extends readonly unknown[], > { /** * The rule ID. @@ -420,7 +418,7 @@ interface RuleModule< TMessageIds extends string, TOptions extends readonly unknown[], // for extending base rules - TRuleListener extends RuleListener = RuleListener + TRuleListener extends RuleListener = RuleListener, > { /** * Metadata about the rule @@ -438,7 +436,7 @@ type RuleCreateFunction< TMessageIds extends string = never, TOptions extends readonly unknown[] = unknown[], // for extending base rules - TRuleListener extends RuleListener = RuleListener + TRuleListener extends RuleListener = RuleListener, > = (context: Readonly>) => TRuleListener; export { diff --git a/packages/experimental-utils/src/ts-eslint/RuleTester.ts b/packages/experimental-utils/src/ts-eslint/RuleTester.ts index 652567f6b9fd..e237586d151c 100644 --- a/packages/experimental-utils/src/ts-eslint/RuleTester.ts +++ b/packages/experimental-utils/src/ts-eslint/RuleTester.ts @@ -59,7 +59,7 @@ interface SuggestionOutput { interface InvalidTestCase< TMessageIds extends string, - TOptions extends Readonly + TOptions extends Readonly, > extends ValidTestCase { /** * Expected errors. @@ -111,7 +111,7 @@ interface TestCaseError { interface RunTests< TMessageIds extends string, - TOptions extends Readonly + TOptions extends Readonly, > { // RuleTester.run also accepts strings for valid cases readonly valid: readonly (ValidTestCase | string)[]; diff --git a/packages/experimental-utils/src/ts-eslint/Scope.ts b/packages/experimental-utils/src/ts-eslint/Scope.ts index 6907e2290fd9..bc3db012216c 100644 --- a/packages/experimental-utils/src/ts-eslint/Scope.ts +++ b/packages/experimental-utils/src/ts-eslint/Scope.ts @@ -19,7 +19,8 @@ namespace Scope { export type CatchClauseDefinition = scopeManager.CatchClauseDefinition; export type ClassNameDefinition = scopeManager.ClassNameDefinition; export type FunctionNameDefinition = scopeManager.FunctionNameDefinition; - export type ImplicitGlobalVariableDefinition = scopeManager.ImplicitGlobalVariableDefinition; + export type ImplicitGlobalVariableDefinition = + scopeManager.ImplicitGlobalVariableDefinition; export type ImportBindingDefinition = scopeManager.ImportBindingDefinition; export type ParameterDefinition = scopeManager.ParameterDefinition; export type TSEnumMemberDefinition = scopeManager.TSEnumMemberDefinition; @@ -34,7 +35,8 @@ namespace Scope { export type ClassScope = scopeManager.ClassScope; export type ConditionalTypeScope = scopeManager.ConditionalTypeScope; export type ForScope = scopeManager.ForScope; - export type FunctionExpressionNameScope = scopeManager.FunctionExpressionNameScope; + export type FunctionExpressionNameScope = + scopeManager.FunctionExpressionNameScope; export type FunctionScope = scopeManager.FunctionScope; export type FunctionTypeScope = scopeManager.FunctionTypeScope; export type GlobalScope = scopeManager.GlobalScope; diff --git a/packages/experimental-utils/src/ts-eslint/SourceCode.ts b/packages/experimental-utils/src/ts-eslint/SourceCode.ts index 5f392acbf2a1..582f643311ad 100644 --- a/packages/experimental-utils/src/ts-eslint/SourceCode.ts +++ b/packages/experimental-utils/src/ts-eslint/SourceCode.ts @@ -250,9 +250,10 @@ declare class SourceCodeBase extends TokenStore { * @param node The AST node to get the comments for. * @returns An object containing a leading and trailing array of comments indexed by their position. */ - getComments( - node: TSESTree.Node, - ): { leading: TSESTree.Comment[]; trailing: TSESTree.Comment[] }; + getComments(node: TSESTree.Node): { + leading: TSESTree.Comment[]; + trailing: TSESTree.Comment[]; + }; /** * Converts a (line, column) pair into a range index. * @param loc A line/column location diff --git a/packages/parser/package.json b/packages/parser/package.json index 8b83c5ee076d..ea7e7c53b839 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -47,7 +47,7 @@ "@typescript-eslint/scope-manager": "4.25.0", "@typescript-eslint/types": "4.25.0", "@typescript-eslint/typescript-estree": "4.25.0", - "debug": "^4.1.1" + "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index fa0f0e3a7ab8..a6ab55c7dffc 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -49,7 +49,7 @@ "jest-specific-snapshot": "*", "make-dir": "*", "prettier": "*", - "pretty-format": "^26.4.2", + "pretty-format": "*", "rimraf": "*", "typescript": "*" }, diff --git a/packages/scope-manager/src/definition/DefinitionBase.ts b/packages/scope-manager/src/definition/DefinitionBase.ts index ed25a72293d1..7147ebc60edc 100644 --- a/packages/scope-manager/src/definition/DefinitionBase.ts +++ b/packages/scope-manager/src/definition/DefinitionBase.ts @@ -8,7 +8,7 @@ abstract class DefinitionBase< TType extends DefinitionType, TNode extends TSESTree.Node, TParent extends TSESTree.Node | null, - TName extends TSESTree.Node = TSESTree.BindingName + TName extends TSESTree.Node = TSESTree.BindingName, > { /** * A unique ID for this instance - primarily used to help debugging and testing diff --git a/packages/scope-manager/src/scope/ScopeBase.ts b/packages/scope-manager/src/scope/ScopeBase.ts index 602dd81a206a..c06a7002c48b 100644 --- a/packages/scope-manager/src/scope/ScopeBase.ts +++ b/packages/scope-manager/src/scope/ScopeBase.ts @@ -135,7 +135,7 @@ type AnyScope = ScopeBase; abstract class ScopeBase< TType extends ScopeType, TBlock extends TSESTree.Node, - TUpper extends Scope | null + TUpper extends Scope | null, > { /** * A unique ID for this instance - primarily used to help debugging and testing @@ -387,7 +387,7 @@ abstract class ScopeBase< } protected delegateToUpperScope(ref: Reference): void { - const upper = (this.upper as Scope) as AnyScope; + const upper = this.upper as Scope as AnyScope; if (upper?.leftToResolve) { upper.leftToResolve.push(ref); } diff --git a/packages/scope-manager/tests/eslint-scope/map-ecma-version.test.ts b/packages/scope-manager/tests/eslint-scope/map-ecma-version.test.ts index 3a5957b7003a..d8646fbb3539 100644 --- a/packages/scope-manager/tests/eslint-scope/map-ecma-version.test.ts +++ b/packages/scope-manager/tests/eslint-scope/map-ecma-version.test.ts @@ -33,7 +33,7 @@ describe('ecma version mapping', () => { }); }); -const fakeNode = ({} as unknown) as TSESTree.Node; +const fakeNode = {} as unknown as TSESTree.Node; function expectMapping(ecmaVersion: number | undefined, lib: Lib): void { (Referencer as jest.Mock).mockClear(); diff --git a/packages/scope-manager/tests/util/getSpecificNode.ts b/packages/scope-manager/tests/util/getSpecificNode.ts index d20ab14ff580..8f04f4a88b49 100644 --- a/packages/scope-manager/tests/util/getSpecificNode.ts +++ b/packages/scope-manager/tests/util/getSpecificNode.ts @@ -3,11 +3,11 @@ import { simpleTraverse } from '@typescript-eslint/typescript-estree'; function getSpecificNode< TSelector extends AST_NODE_TYPES, - TNode extends Extract + TNode extends Extract, >(ast: TSESTree.Node, selector: TSelector): TNode; function getSpecificNode< TSelector extends AST_NODE_TYPES, - TNode extends Extract + TNode extends Extract, >( ast: TSESTree.Node, selector: TSelector, @@ -16,7 +16,7 @@ function getSpecificNode< function getSpecificNode< TSelector extends AST_NODE_TYPES, TNode extends Extract, - TReturnType extends TSESTree.Node + TReturnType extends TSESTree.Node, >( ast: TSESTree.Node, selector: TSelector, diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 41454c608fa0..318e46472412 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -43,16 +43,16 @@ "dependencies": { "@typescript-eslint/types": "4.25.0", "@typescript-eslint/visitor-keys": "4.25.0", - "debug": "^4.1.1", - "globby": "^11.0.1", + "debug": "^4.3.1", + "globby": "^11.0.3", "is-glob": "^4.0.1", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "semver": "^7.3.5", + "tsutils": "^3.21.0" }, "devDependencies": { - "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.14.4", - "@babel/types": "^7.14.2", + "@babel/code-frame": "*", + "@babel/parser": "*", + "@babel/types": "*", "@types/babel__code-frame": "*", "@types/debug": "*", "@types/glob": "*", diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index b29a722d1716..2a0c8ff4b2eb 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -631,9 +631,10 @@ export class Converter { } if (node.typeParameters) { - result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( - node.typeParameters, - ); + result.typeParameters = + this.convertTSTypeParametersToTypeParametersDeclaration( + node.typeParameters, + ); } const accessibility = getTSNodeAccessibility(node); @@ -927,9 +928,10 @@ export class Converter { // Process typeParameters if (node.typeParameters) { - result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( - node.typeParameters, - ); + result.typeParameters = + this.convertTSTypeParametersToTypeParametersDeclaration( + node.typeParameters, + ); } // check for exports @@ -1160,9 +1162,10 @@ export class Converter { // Process typeParameters if (node.typeParameters) { - method.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( - node.typeParameters, - ); + method.typeParameters = + this.convertTSTypeParametersToTypeParametersDeclaration( + node.typeParameters, + ); this.fixParentLocation(method, method.typeParameters.range); } @@ -1268,9 +1271,10 @@ export class Converter { // Process typeParameters if (node.typeParameters) { - constructor.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( - node.typeParameters, - ); + constructor.typeParameters = + this.convertTSTypeParametersToTypeParametersDeclaration( + node.typeParameters, + ); this.fixParentLocation(constructor, constructor.typeParameters.range); } @@ -1326,9 +1330,10 @@ export class Converter { // Process typeParameters if (node.typeParameters) { - result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( - node.typeParameters, - ); + result.typeParameters = + this.convertTSTypeParametersToTypeParametersDeclaration( + node.typeParameters, + ); } return result; } @@ -1424,9 +1429,10 @@ export class Converter { // Process typeParameters if (node.typeParameters) { - result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( - node.typeParameters, - ); + result.typeParameters = + this.convertTSTypeParametersToTypeParametersDeclaration( + node.typeParameters, + ); } return result; } @@ -1628,17 +1634,19 @@ export class Converter { } if (superClass.types[0]?.typeArguments) { - result.superTypeParameters = this.convertTypeArgumentsToTypeParameters( - superClass.types[0].typeArguments, - superClass.types[0], - ); + result.superTypeParameters = + this.convertTypeArgumentsToTypeParameters( + superClass.types[0].typeArguments, + superClass.types[0], + ); } } if (node.typeParameters) { - result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( - node.typeParameters, - ); + result.typeParameters = + this.convertTSTypeParametersToTypeParametersDeclaration( + node.typeParameters, + ); } if (implementsClause) { @@ -2400,9 +2408,10 @@ export class Converter { // Process typeParameters if (node.typeParameters) { - result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( - node.typeParameters, - ); + result.typeParameters = + this.convertTSTypeParametersToTypeParametersDeclaration( + node.typeParameters, + ); } // check for exports @@ -2474,9 +2483,10 @@ export class Converter { result.returnType = this.convertTypeAnnotation(node.type, node); } if (node.typeParameters) { - result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( - node.typeParameters, - ); + result.typeParameters = + this.convertTSTypeParametersToTypeParametersDeclaration( + node.typeParameters, + ); } return result; } @@ -2503,9 +2513,10 @@ export class Converter { } if (node.typeParameters) { - result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( - node.typeParameters, - ); + result.typeParameters = + this.convertTSTypeParametersToTypeParametersDeclaration( + node.typeParameters, + ); } return result; } @@ -2543,9 +2554,10 @@ export class Converter { }); if (node.typeParameters) { - result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( - node.typeParameters, - ); + result.typeParameters = + this.convertTSTypeParametersToTypeParametersDeclaration( + node.typeParameters, + ); } if (interfaceHeritageClauses.length > 0) { diff --git a/packages/typescript-estree/src/create-program/createWatchProgram.ts b/packages/typescript-estree/src/create-program/createWatchProgram.ts index e00663a114ed..e2bf060050c2 100644 --- a/packages/typescript-estree/src/create-program/createWatchProgram.ts +++ b/packages/typescript-estree/src/create-program/createWatchProgram.ts @@ -388,9 +388,8 @@ function createWatchProgram( function hasTSConfigChanged(tsconfigPath: CanonicalPath): boolean { const stat = fs.statSync(tsconfigPath); const lastModifiedAt = stat.mtimeMs; - const cachedLastModifiedAt = tsconfigLastModifiedTimestampCache.get( - tsconfigPath, - ); + const cachedLastModifiedAt = + tsconfigLastModifiedTimestampCache.get(tsconfigPath); tsconfigLastModifiedTimestampCache.set(tsconfigPath, lastModifiedAt); diff --git a/packages/typescript-estree/src/parser-options.ts b/packages/typescript-estree/src/parser-options.ts index 36ca3f80cca3..a3758fffb794 100644 --- a/packages/typescript-estree/src/parser-options.ts +++ b/packages/typescript-estree/src/parser-options.ts @@ -191,7 +191,7 @@ export interface ParserWeakMap { } export interface ParserWeakMapESTreeToTSNode< - TKey extends TSESTree.Node = TSESTree.Node + TKey extends TSESTree.Node = TSESTree.Node, > { get(key: TKeyBase): TSESTreeToTSNode; has(key: unknown): boolean; diff --git a/packages/typescript-estree/tests/lib/parse.test.ts b/packages/typescript-estree/tests/lib/parse.test.ts index d9057c653b7b..3e3129737009 100644 --- a/packages/typescript-estree/tests/lib/parse.test.ts +++ b/packages/typescript-estree/tests/lib/parse.test.ts @@ -90,7 +90,7 @@ describe('parseWithNodeMaps()', () => { describe('non string code', () => { // testing a non string code.. // eslint-disable-next-line @typescript-eslint/no-explicit-any - const code = (12345 as any) as string; + const code = 12345 as any as string; const config: TSESTreeOptions = { comment: true, tokens: true, @@ -492,24 +492,23 @@ describe('parseAndGenerateServices', () => { tsconfigRootDir: PROJECT_DIR, project: './tsconfig.json', }; - const testParse = ( - filePath: string, - extraFileExtensions: string[] = ['.vue'], - ) => (): void => { - try { - parser.parseAndGenerateServices(code, { - ...config, - extraFileExtensions, - filePath: join(PROJECT_DIR, filePath), - }); - } catch (error) { - /** - * Aligns paths between environments, node for windows uses `\`, for linux and mac uses `/` - */ - error.message = (error as Error).message.replace(/\\(?!["])/gm, '/'); - throw error; - } - }; + const testParse = + (filePath: string, extraFileExtensions: string[] = ['.vue']) => + (): void => { + try { + parser.parseAndGenerateServices(code, { + ...config, + extraFileExtensions, + filePath: join(PROJECT_DIR, filePath), + }); + } catch (error) { + /** + * Aligns paths between environments, node for windows uses `\`, for linux and mac uses `/` + */ + error.message = (error as Error).message.replace(/\\(?!["])/gm, '/'); + throw error; + } + }; describe('project includes', () => { it("doesn't error for matched files", () => { @@ -647,16 +646,18 @@ describe('parseAndGenerateServices', () => { project: './**/tsconfig.json', }; - const testParse = ( - filePath: 'ignoreme' | 'includeme', - projectFolderIgnoreList?: TSESTreeOptions['projectFolderIgnoreList'], - ) => (): void => { - parser.parseAndGenerateServices(code, { - ...config, - projectFolderIgnoreList, - filePath: join(PROJECT_DIR, filePath, './file.ts'), - }); - }; + const testParse = + ( + filePath: 'ignoreme' | 'includeme', + projectFolderIgnoreList?: TSESTreeOptions['projectFolderIgnoreList'], + ) => + (): void => { + parser.parseAndGenerateServices(code, { + ...config, + projectFolderIgnoreList, + filePath: join(PROJECT_DIR, filePath, './file.ts'), + }); + }; it('ignores nothing when given nothing', () => { expect(testParse('ignoreme')).not.toThrow(); diff --git a/packages/typescript-estree/tests/lib/semanticInfo.test.ts b/packages/typescript-estree/tests/lib/semanticInfo.test.ts index 36726ac1d528..3d8cb41bd25d 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo.test.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo.test.ts @@ -149,19 +149,19 @@ describe('semanticInfo', () => { ); expect(parseResult).toHaveProperty('services.esTreeNodeToTSNodeMap'); - const binaryExpression = (parseResult.ast - .body[0] as TSESTree.VariableDeclaration).declarations[0].init!; - const tsBinaryExpression = parseResult.services.esTreeNodeToTSNodeMap.get( - binaryExpression, - ); + const binaryExpression = ( + parseResult.ast.body[0] as TSESTree.VariableDeclaration + ).declarations[0].init!; + const tsBinaryExpression = + parseResult.services.esTreeNodeToTSNodeMap.get(binaryExpression); expect(tsBinaryExpression.kind).toEqual(ts.SyntaxKind.BinaryExpression); - const computedPropertyString = ((parseResult.ast - .body[1] as TSESTree.ClassDeclaration).body - .body[0] as TSESTree.ClassProperty).key; - const tsComputedPropertyString = parseResult.services.esTreeNodeToTSNodeMap.get( - computedPropertyString, - ); + const computedPropertyString = ( + (parseResult.ast.body[1] as TSESTree.ClassDeclaration).body + .body[0] as TSESTree.ClassProperty + ).key; + const tsComputedPropertyString = + parseResult.services.esTreeNodeToTSNodeMap.get(computedPropertyString); expect(tsComputedPropertyString.kind).toEqual(ts.SyntaxKind.StringLiteral); }); @@ -178,16 +178,17 @@ describe('semanticInfo', () => { // get array node (ast shape validated by snapshot) // node is defined in other file than the parsed one - const arrayBoundName = (((parseResult.ast - .body[1] as TSESTree.ExpressionStatement) - .expression as TSESTree.CallExpression) - .callee as TSESTree.MemberExpression).object as TSESTree.Identifier; + const arrayBoundName = ( + ( + (parseResult.ast.body[1] as TSESTree.ExpressionStatement) + .expression as TSESTree.CallExpression + ).callee as TSESTree.MemberExpression + ).object as TSESTree.Identifier; expect(arrayBoundName.name).toBe('arr'); expect(parseResult).toHaveProperty('services.esTreeNodeToTSNodeMap'); - const tsArrayBoundName = parseResult.services.esTreeNodeToTSNodeMap.get( - arrayBoundName, - ); + const tsArrayBoundName = + parseResult.services.esTreeNodeToTSNodeMap.get(arrayBoundName); expect(tsArrayBoundName).toBeDefined(); checkNumberArrayType(checker, tsArrayBoundName); @@ -213,9 +214,8 @@ describe('semanticInfo', () => { .declarations[0].id as TSESTree.Identifier; expect(boundName.name).toBe('x'); - const tsBoundName = parseResult.services.esTreeNodeToTSNodeMap.get( - boundName, - ); + const tsBoundName = + parseResult.services.esTreeNodeToTSNodeMap.get(boundName); expect(tsBoundName).toBeDefined(); expect(parseResult.services.tsNodeToESTreeNodeMap.get(tsBoundName)).toBe( @@ -296,9 +296,8 @@ function testIsolatedFile( expect(parseResult).toHaveProperty('services.esTreeNodeToTSNodeMap'); // get corresponding TS node - const tsArrayMember = parseResult.services.esTreeNodeToTSNodeMap.get( - arrayMember, - ); + const tsArrayMember = + parseResult.services.esTreeNodeToTSNodeMap.get(arrayMember); expect(tsArrayMember).toBeDefined(); expect(tsArrayMember.kind).toBe(ts.SyntaxKind.NumericLiteral); expect((tsArrayMember as ts.NumericLiteral).text).toBe('3'); diff --git a/yarn.lock b/yarn.lock index 762af4b878c4..fde7283b0603 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,13 @@ # yarn lockfile v1 +"@babel/code-frame@*", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" + integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== + dependencies: + "@babel/highlight" "^7.12.13" + "@babel/code-frame@7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" @@ -9,67 +16,59 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" - integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== - dependencies: - "@babel/highlight" "^7.12.13" - -"@babel/compat-data@^7.13.8": - version "7.13.11" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.11.tgz#9c8fe523c206979c9a81b1e12fe50c1254f1aa35" - integrity sha512-BwKEkO+2a67DcFeS3RLl0Z3Gs2OvdXewuWjc1Hfokhb5eQWP9YRYH1/+VrVZvql2CfjOiNGqSAFOYt4lsqTHzg== +"@babel/compat-data@^7.14.4": + version "7.14.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.4.tgz#45720fe0cecf3fd42019e1d12cc3d27fadc98d58" + integrity sha512-i2wXrWQNkH6JplJQGn3Rd2I4Pij8GdHkXwHMxm+zV5YG/Jci+bCNrWZEWC4o+umiDkRrRs4dVzH3X4GP7vyjQQ== -"@babel/core@^7.1.0", "@babel/core@^7.7.5": - version "7.13.10" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.10.tgz#07de050bbd8193fcd8a3c27918c0890613a94559" - integrity sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw== +"@babel/core@^7.1.0", "@babel/core@^7.7.2", "@babel/core@^7.7.5": + version "7.14.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.3.tgz#5395e30405f0776067fbd9cf0884f15bfb770a38" + integrity sha512-jB5AmTKOCSJIZ72sd78ECEhuPiDMKlQdDI/4QRI6lzYATx5SSogS1oQA2AoPecRCknm30gHi2l+QVvNUu3wZAg== dependencies: "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.13.9" - "@babel/helper-compilation-targets" "^7.13.10" - "@babel/helper-module-transforms" "^7.13.0" - "@babel/helpers" "^7.13.10" - "@babel/parser" "^7.13.10" + "@babel/generator" "^7.14.3" + "@babel/helper-compilation-targets" "^7.13.16" + "@babel/helper-module-transforms" "^7.14.2" + "@babel/helpers" "^7.14.0" + "@babel/parser" "^7.14.3" "@babel/template" "^7.12.13" - "@babel/traverse" "^7.13.0" - "@babel/types" "^7.13.0" + "@babel/traverse" "^7.14.2" + "@babel/types" "^7.14.2" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.1.2" - lodash "^4.17.19" semver "^6.3.0" source-map "^0.5.0" -"@babel/generator@^7.13.0", "@babel/generator@^7.13.9": - version "7.13.9" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.9.tgz#3a7aa96f9efb8e2be42d38d80e2ceb4c64d8de39" - integrity sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw== +"@babel/generator@^7.14.2", "@babel/generator@^7.14.3", "@babel/generator@^7.7.2": + version "7.14.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.3.tgz#0c2652d91f7bddab7cccc6ba8157e4f40dcedb91" + integrity sha512-bn0S6flG/j0xtQdz3hsjJ624h3W0r3llttBMfyHX3YrZ/KtLYr15bjA0FXkgW7FpvrDuTuElXeVjiKlYRpnOFA== dependencies: - "@babel/types" "^7.13.0" + "@babel/types" "^7.14.2" jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-compilation-targets@^7.13.10": - version "7.13.10" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.10.tgz#1310a1678cb8427c07a753750da4f8ce442bdd0c" - integrity sha512-/Xju7Qg1GQO4mHZ/Kcs6Au7gfafgZnwm+a7sy/ow/tV1sHeraRUHbjdat8/UvDor4Tez+siGKDk6zIKtCPKVJA== +"@babel/helper-compilation-targets@^7.13.16": + version "7.14.4" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.4.tgz#33ebd0ffc34248051ee2089350a929ab02f2a516" + integrity sha512-JgdzOYZ/qGaKTVkn5qEDV/SXAh8KcyUVkCoSWGN8T3bwrgd6m+/dJa2kVGi6RJYJgEYPBdZ84BZp9dUjNWkBaA== dependencies: - "@babel/compat-data" "^7.13.8" + "@babel/compat-data" "^7.14.4" "@babel/helper-validator-option" "^7.12.17" - browserslist "^4.14.5" + browserslist "^4.16.6" semver "^6.3.0" -"@babel/helper-function-name@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz#93ad656db3c3c2232559fd7b2c3dbdcbe0eb377a" - integrity sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA== +"@babel/helper-function-name@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.14.2.tgz#397688b590760b6ef7725b5f0860c82427ebaac2" + integrity sha512-NYZlkZRydxw+YT56IlhIcS8PAhb+FEUiOzuhFTfqDyPmzAhRge6ua0dQYT/Uh0t/EDHq05/i+e5M2d4XvjgarQ== dependencies: "@babel/helper-get-function-arity" "^7.12.13" "@babel/template" "^7.12.13" - "@babel/types" "^7.12.13" + "@babel/types" "^7.14.2" "@babel/helper-get-function-arity@^7.12.13": version "7.12.13" @@ -78,34 +77,33 @@ dependencies: "@babel/types" "^7.12.13" -"@babel/helper-member-expression-to-functions@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.0.tgz#6aa4bb678e0f8c22f58cdb79451d30494461b091" - integrity sha512-yvRf8Ivk62JwisqV1rFRMxiSMDGnN6KH1/mDMmIrij4jztpQNRoHqqMG3U6apYbGRPJpgPalhva9Yd06HlUxJQ== +"@babel/helper-member-expression-to-functions@^7.13.12": + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz#dfe368f26d426a07299d8d6513821768216e6d72" + integrity sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw== dependencies: - "@babel/types" "^7.13.0" + "@babel/types" "^7.13.12" -"@babel/helper-module-imports@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz#ec67e4404f41750463e455cc3203f6a32e93fcb0" - integrity sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g== +"@babel/helper-module-imports@^7.13.12": + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz#c6a369a6f3621cb25da014078684da9196b61977" + integrity sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA== dependencies: - "@babel/types" "^7.12.13" + "@babel/types" "^7.13.12" -"@babel/helper-module-transforms@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.13.0.tgz#42eb4bd8eea68bab46751212c357bfed8b40f6f1" - integrity sha512-Ls8/VBwH577+pw7Ku1QkUWIyRRNHpYlts7+qSqBBFCW3I8QteB9DxfcZ5YJpOwH6Ihe/wn8ch7fMGOP1OhEIvw== +"@babel/helper-module-transforms@^7.14.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.14.2.tgz#ac1cc30ee47b945e3e0c4db12fa0c5389509dfe5" + integrity sha512-OznJUda/soKXv0XhpvzGWDnml4Qnwp16GN+D/kZIdLsWoHj05kyu8Rm5kXmMef+rVJZ0+4pSGLkeixdqNUATDA== dependencies: - "@babel/helper-module-imports" "^7.12.13" - "@babel/helper-replace-supers" "^7.13.0" - "@babel/helper-simple-access" "^7.12.13" + "@babel/helper-module-imports" "^7.13.12" + "@babel/helper-replace-supers" "^7.13.12" + "@babel/helper-simple-access" "^7.13.12" "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/helper-validator-identifier" "^7.12.11" + "@babel/helper-validator-identifier" "^7.14.0" "@babel/template" "^7.12.13" - "@babel/traverse" "^7.13.0" - "@babel/types" "^7.13.0" - lodash "^4.17.19" + "@babel/traverse" "^7.14.2" + "@babel/types" "^7.14.2" "@babel/helper-optimise-call-expression@^7.12.13": version "7.12.13" @@ -119,22 +117,22 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz#806526ce125aed03373bc416a828321e3a6a33af" integrity sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ== -"@babel/helper-replace-supers@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.13.0.tgz#6034b7b51943094cb41627848cb219cb02be1d24" - integrity sha512-Segd5me1+Pz+rmN/NFBOplMbZG3SqRJOBlY+mA0SxAv6rjj7zJqr1AVr3SfzUVTLCv7ZLU5FycOM/SBGuLPbZw== +"@babel/helper-replace-supers@^7.13.12": + version "7.14.4" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.14.4.tgz#b2ab16875deecfff3ddfcd539bc315f72998d836" + integrity sha512-zZ7uHCWlxfEAAOVDYQpEf/uyi1dmeC7fX4nCf2iz9drnCwi1zvwXL3HwWWNXUQEJ1k23yVn3VbddiI9iJEXaTQ== dependencies: - "@babel/helper-member-expression-to-functions" "^7.13.0" + "@babel/helper-member-expression-to-functions" "^7.13.12" "@babel/helper-optimise-call-expression" "^7.12.13" - "@babel/traverse" "^7.13.0" - "@babel/types" "^7.13.0" + "@babel/traverse" "^7.14.2" + "@babel/types" "^7.14.4" -"@babel/helper-simple-access@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz#8478bcc5cacf6aa1672b251c1d2dde5ccd61a6c4" - integrity sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA== +"@babel/helper-simple-access@^7.13.12": + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz#dd6c538afb61819d205a012c31792a39c7a5eaf6" + integrity sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA== dependencies: - "@babel/types" "^7.12.13" + "@babel/types" "^7.13.12" "@babel/helper-split-export-declaration@^7.12.13": version "7.12.13" @@ -153,14 +151,14 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz#d1fbf012e1a79b7eebbfdc6d270baaf8d9eb9831" integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== -"@babel/helpers@^7.13.10": - version "7.13.10" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.13.10.tgz#fd8e2ba7488533cdeac45cc158e9ebca5e3c7df8" - integrity sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ== +"@babel/helpers@^7.14.0": + version "7.14.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.0.tgz#ea9b6be9478a13d6f961dbb5f36bf75e2f3b8f62" + integrity sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg== dependencies: "@babel/template" "^7.12.13" - "@babel/traverse" "^7.13.0" - "@babel/types" "^7.13.0" + "@babel/traverse" "^7.14.0" + "@babel/types" "^7.14.0" "@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": version "7.13.10" @@ -171,12 +169,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.10": - version "7.13.15" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.15.tgz#8e66775fb523599acb6a289e12929fa5ab0954d8" - integrity sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ== - -"@babel/parser@^7.14.4": +"@babel/parser@*", "@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.14.2", "@babel/parser@^7.14.3", "@babel/parser@^7.14.4", "@babel/parser@^7.7.2": version "7.14.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.4.tgz#a5c560d6db6cd8e6ed342368dea8039232cbab18" integrity sha512-ArliyUsWDUqEGfWcmzpGUzNfLxTdTp6WU4IuP6QFSp9gGfWS6boxFCkJSJ/L4+RG8z/FnIU3WxCk6hPL9SSWeA== @@ -265,6 +258,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.12.13" +"@babel/plugin-syntax-typescript@^7.7.2": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.13.tgz#9dff111ca64154cef0f4dc52cf843d9f12ce4474" + integrity sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + "@babel/runtime@^7.11.0", "@babel/runtime@^7.7.6": version "7.13.10" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.10.tgz#47d42a57b6095f4468da440388fdbad8bebf0d7d" @@ -281,25 +281,24 @@ "@babel/parser" "^7.12.13" "@babel/types" "^7.12.13" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.0.tgz#6d95752475f86ee7ded06536de309a65fc8966cc" - integrity sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.14.0", "@babel/traverse@^7.14.2", "@babel/traverse@^7.7.2": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.2.tgz#9201a8d912723a831c2679c7ebbf2fe1416d765b" + integrity sha512-TsdRgvBFHMyHOOzcP9S6QU0QQtjxlRpEYOy3mcCO5RgmC305ki42aSAmfZEMSSYBla2oZ9BMqYlncBaKmD/7iA== dependencies: "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.13.0" - "@babel/helper-function-name" "^7.12.13" + "@babel/generator" "^7.14.2" + "@babel/helper-function-name" "^7.14.2" "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/parser" "^7.13.0" - "@babel/types" "^7.13.0" + "@babel/parser" "^7.14.2" + "@babel/types" "^7.14.2" debug "^4.1.0" globals "^11.1.0" - lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.0", "@babel/types@^7.14.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.2.tgz#4208ae003107ef8a057ea8333e56eb64d2f6a2c3" - integrity sha512-SdjAG/3DikRHpUOjxZgnkbR11xUlyDMUFJdvnIgZEE16mqmY0BINMmc4//JMJglEmn6i7sq6p+mGrFWyZ98EEw== +"@babel/types@*", "@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.12", "@babel/types@^7.14.0", "@babel/types@^7.14.2", "@babel/types@^7.14.4", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.14.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.4.tgz#bfd6980108168593b38b3eb48a24aa026b919bc0" + integrity sha512-lCj4aIs0xUefJFQnwwQv2Bxg7Omd6bgquZ6LGC+gGMh6/s5qDVfjuCMlDmYQ15SLsWHd9n+X3E75lKIhl5Lkiw== dependencies: "@babel/helper-validator-identifier" "^7.14.0" to-fast-properties "^2.0.0" @@ -309,15 +308,7 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@cnakazawa/watch@^1.0.3": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" - integrity sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ== - dependencies: - exec-sh "^0.3.2" - minimist "^1.2.0" - -"@commitlint/cli@^12.0.1": +"@commitlint/cli@^12.1.4": version "12.1.4" resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-12.1.4.tgz#af4d9dd3c0122c7b39a61fa1cd2abbad0422dbe0" integrity sha512-ZR1WjXLvqEffYyBPT0XdnSxtt3Ty1TMoujEtseW5o3vPnkA1UNashAMjQVg/oELqfaiAMnDw8SERPMN0e/0kLg== @@ -332,14 +323,14 @@ resolve-global "1.0.0" yargs "^16.2.0" -"@commitlint/config-conventional@^12.0.1": +"@commitlint/config-conventional@^12.1.4": version "12.1.4" resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-12.1.4.tgz#95bbab622f117a8a3e49f95917b08655040c66a8" integrity sha512-ZIdzmdy4o4WyqywMEpprRCrehjCSQrHkaRTVZV411GyLigFQHlEBSJITAihLAWe88Qy/8SyoIe5uKvAsV5vRqQ== dependencies: conventional-changelog-conventionalcommits "^4.3.1" -"@commitlint/config-lerna-scopes@^12.0.1": +"@commitlint/config-lerna-scopes@^12.1.4": version "12.1.4" resolved "https://registry.yarnpkg.com/@commitlint/config-lerna-scopes/-/config-lerna-scopes-12.1.4.tgz#af6786d2a479eb4c90838782368bb3958547327a" integrity sha512-D/VqvATs8fYi2CFpFdjLYeOHGm/KkxUSehGqwIPJfYXHHua19V5UqmUOeXTNAJaD+bTpiHvoBTK75NcmWpBQSg== @@ -464,50 +455,50 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.4.1": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.4.1.tgz#d06a921d518e9705551edaf391369904e721c918" - integrity sha512-EkghG4i5rf2DDDGX2qlRDiBGzYlHhgBcnxIUzOo/DBTRKKPgrvGJ244V83DHw3ttBUPfzcHrEJIBu5nGfYaMfw== +"@cspell/cspell-bundled-dicts@^5.5.2": + version "5.5.2" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.5.2.tgz#ee7f299e2bfccf73c38f8fc877317929d468d328" + integrity sha512-6erGPW9IFln/DWT754rjoOoE+QqatZJMFXu9ghcemooNbqbXrSG4ByXNVaEi3CfLjK48GHc8uJIkHoX4lbFArA== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" "@cspell/dict-bash" "^1.0.12" - "@cspell/dict-companies" "^1.0.37" - "@cspell/dict-cpp" "^1.1.38" + "@cspell/dict-companies" "^1.0.38" + "@cspell/dict-cpp" "^1.1.39" "@cspell/dict-cryptocurrencies" "^1.0.10" "@cspell/dict-csharp" "^1.0.11" "@cspell/dict-css" "^1.0.11" "@cspell/dict-django" "^1.0.26" "@cspell/dict-dotnet" "^1.0.25" "@cspell/dict-elixir" "^1.0.24" - "@cspell/dict-en-gb" "^1.1.28" - "@cspell/dict-en_us" "^1.2.40" + "@cspell/dict-en-gb" "^1.1.29" + "@cspell/dict-en_us" "^1.2.42" "@cspell/dict-filetypes" "^1.1.5" "@cspell/dict-fonts" "^1.0.14" - "@cspell/dict-fullstack" "^1.0.37" + "@cspell/dict-fullstack" "^1.0.38" "@cspell/dict-golang" "^1.1.24" "@cspell/dict-haskell" "^1.0.13" - "@cspell/dict-html" "^1.1.6" + "@cspell/dict-html" "^1.1.7" "@cspell/dict-html-symbol-entities" "^1.0.23" "@cspell/dict-java" "^1.0.22" "@cspell/dict-latex" "^1.0.25" "@cspell/dict-lorem-ipsum" "^1.0.22" "@cspell/dict-lua" "^1.0.16" - "@cspell/dict-node" "^1.0.11" - "@cspell/dict-npm" "^1.0.11" - "@cspell/dict-php" "^1.0.23" - "@cspell/dict-powershell" "^1.0.14" - "@cspell/dict-python" "^1.0.34" - "@cspell/dict-ruby" "^1.0.13" + "@cspell/dict-node" "^1.0.12" + "@cspell/dict-npm" "^1.0.12" + "@cspell/dict-php" "^1.0.24" + "@cspell/dict-powershell" "^1.0.15" + "@cspell/dict-python" "^1.0.35" + "@cspell/dict-ruby" "^1.0.14" "@cspell/dict-rust" "^1.0.22" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.29" - "@cspell/dict-typescript" "^1.0.17" + "@cspell/dict-software-terms" "^1.0.32" + "@cspell/dict-typescript" "^1.0.19" -"@cspell/cspell-types@^5.4.1": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.4.1.tgz#75560fc7873ede01d1e9e8913ce64190fb1c8b38" - integrity sha512-Z+L3aYZTfMePmDetfCjyc/VrxDfbdhS4F8Zvs2aTaEFTiiLefzvBo6yn3KCV2irXeb3wL70PTabrej+1QStKxg== +"@cspell/cspell-types@^5.5.2": + version "5.5.2" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.5.2.tgz#46cd362cd07be2f31167823fbfef580b01017053" + integrity sha512-/SEI6b51gYI2UQXQci++oraYvWJmSfKkV+rw3vk1qycZwLcmrqxZonLyHEH25+npUHE2ae1jE1g202w493icYg== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -524,15 +515,15 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-1.0.12.tgz#fdf828c520dfd274f1cee6a4a90a0f6d86a703ac" integrity sha512-BOMHVW/m281mqUSJkZ3oiJiUUItLd7QdzpMjm428V9yBYFwIdbds1CeatS7C6kgpI2eBE4RXmy1Hjk/lR63Jew== -"@cspell/dict-companies@^1.0.37": - version "1.0.37" - resolved "https://registry.yarnpkg.com/@cspell/dict-companies/-/dict-companies-1.0.37.tgz#eaaf51c5356e6949071f78f6bc8a32c0dda7ef80" - integrity sha512-7DuwT64u88v0qvvuhHK23zn8zyX7S3lIYj0ntAoMvErr1+O0SuUopZrw4Y1pm1pgcVAv6+ny80RDDhSD1h565w== +"@cspell/dict-companies@^1.0.38": + version "1.0.38" + resolved "https://registry.yarnpkg.com/@cspell/dict-companies/-/dict-companies-1.0.38.tgz#f915ae1e83de7554875350c19e53e91e948679f2" + integrity sha512-5GzatV4gOAvRW8Hz9T90XMN/svRhmzQecE4C7EcSibZkHZC1o3frTFNuzN2eKzvWb0f9xKuhOBcw9+jm8T9BzQ== -"@cspell/dict-cpp@^1.1.38": - version "1.1.38" - resolved "https://registry.yarnpkg.com/@cspell/dict-cpp/-/dict-cpp-1.1.38.tgz#a5723f0827be36463894c12dcf42bd1ff1e27003" - integrity sha512-QqVMxVNYX9XtxzflpJ/888GSyjPU5VeotltsHql1BeEPxhyV27ud9bRKDrBGzCijCK/+MvCxiMZGDpYZqHTjXw== +"@cspell/dict-cpp@^1.1.39": + version "1.1.39" + resolved "https://registry.yarnpkg.com/@cspell/dict-cpp/-/dict-cpp-1.1.39.tgz#7e119e2c009f9200127733cbca3435180c405c70" + integrity sha512-zrQjzMaT5YqAa4PMEaLfOWnfyh4uJjW53kwtuTo9nfJPaga2+FfrqdeWD8XYMxvTGCtzjivXhAn4FDIMh+66YQ== "@cspell/dict-cryptocurrencies@^1.0.10": version "1.0.10" @@ -564,15 +555,15 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-elixir/-/dict-elixir-1.0.24.tgz#fc5c15b9f66b8aa5e25c98f54103c796fec70aba" integrity sha512-pEX6GYlEx4Teusw/m+XmqoXzcHOqpcn1ZX4H33ONqR81XdPwbaKorBr1IG23Ic76IhwrFlOqs48tcnxrHYpFnA== -"@cspell/dict-en-gb@^1.1.28": - version "1.1.28" - resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.28.tgz#7abe6498aea15a87c502eefbf6f1850ccc1f54a2" - integrity sha512-noOH+iv4xFpPxu1agiQgp5LhY/KA0Ir28y1xnC2QTtLvlIid7vIvgixBOz4Zi0P7lo/mPmMjQY+x7//2EKFDgQ== +"@cspell/dict-en-gb@^1.1.29": + version "1.1.29" + resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.29.tgz#12f0225f79598f7a1cdd08e2a2e2656189fc0747" + integrity sha512-rAgrN77RsKnmfkl0GyrEr5swFnqHpfPPPLscEgO+ShEL1Z9fyrcoPNW7X7EmsrITYmVy1iiemDAP2OGKvyj4Hw== -"@cspell/dict-en_us@^1.2.40": - version "1.2.40" - resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.40.tgz#03e7c7458f9685e09a19fc23f964a9d3dbe52ecd" - integrity sha512-e8leCvGAWPWQIw0SoozgEAiMt2YM12rafOuW4aQwgTJD++vp32a9RrnVL8olBfWaA57rRWWndbMSmPTrsO9mpg== +"@cspell/dict-en_us@^1.2.42": + version "1.2.42" + resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.42.tgz#ed9e28a2d4734d87681aa4421f33b23a2327bbb1" + integrity sha512-5iegemAMT+5WQzPViy67EBH1z3sR53ZXCVQ1RmZJ++ZHkQ0BZ78EgZdrHFBW7tm3D43yf3V8vYSeTse5f1YPCw== "@cspell/dict-filetypes@^1.1.5": version "1.1.5" @@ -584,10 +575,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-fonts/-/dict-fonts-1.0.14.tgz#7b18129910d30bd23cd9187d0c0009dfc3fef4ba" integrity sha512-VhIX+FVYAnqQrOuoFEtya6+H72J82cIicz9QddgknsTqZQ3dvgp6lmVnsQXPM3EnzA8n1peTGpLDwHzT7ociLA== -"@cspell/dict-fullstack@^1.0.37": - version "1.0.37" - resolved "https://registry.yarnpkg.com/@cspell/dict-fullstack/-/dict-fullstack-1.0.37.tgz#0d3bf8fff97a320037cc9823942b056d194a45a2" - integrity sha512-ljVzUdIlBENMiyHUV06007hz2FPRt+BQmC9Jgn6iGIEQeAQp37Q6oIDmxv2lD65ScEIbysxXuaUgJ5x0j4a48A== +"@cspell/dict-fullstack@^1.0.38": + version "1.0.38" + resolved "https://registry.yarnpkg.com/@cspell/dict-fullstack/-/dict-fullstack-1.0.38.tgz#a26d9db5fdc51e8743f57e51b0fa44a1d4791cf6" + integrity sha512-4reajWiUxwWrSyZaWm9e15kaWzjYcZbzlB+CVcxE1+0NqdIoqlEESDhbnrAjKPSq+jspKtes7nQ1CdZEOj1gCA== "@cspell/dict-golang@^1.1.24": version "1.1.24" @@ -604,10 +595,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-1.0.23.tgz#0efbdbc7712c9fbe545e14acac637226ac948f2d" integrity sha512-PV0UBgcBFbBLf/m1wfkVMM8w96kvfHoiCGLWO6BR3Q9v70IXoE4ae0+T+f0CkxcEkacMqEQk/I7vuE9MzrjaNw== -"@cspell/dict-html@^1.1.6": - version "1.1.6" - resolved "https://registry.yarnpkg.com/@cspell/dict-html/-/dict-html-1.1.6.tgz#29c40c0ebc51de4cfe2d6041206ba39d74b28b67" - integrity sha512-RsZXIrmsnLcUpXfyZdNg7OtO2+e4p7m/qILg03kM6vhSUMY6ryCQNPWKrHqsl8+LBKd54EgFM+O5zcgq6IIsCw== +"@cspell/dict-html@^1.1.7": + version "1.1.7" + resolved "https://registry.yarnpkg.com/@cspell/dict-html/-/dict-html-1.1.7.tgz#723d2c0ef37401d59478685add875d2fa2ae2bad" + integrity sha512-5pea/5fA4iy1s5ko+JvCzNsCO5FGdjT006feVmCIxpUsPdgrV/7ONdm6508XOftot3opRlhEqWq/kB8H+GNdrQ== "@cspell/dict-java@^1.0.22": version "1.0.22" @@ -629,35 +620,35 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-lua/-/dict-lua-1.0.16.tgz#c0ca43628f8927fc10731fd27cd9ee0af651bf6a" integrity sha512-YiHDt8kmHJ8nSBy0tHzaxiuitYp+oJ66ffCYuFWTNB3//Y0SI4OGHU3omLsQVeXIfCeVrO4DrVvRDoCls9B5zQ== -"@cspell/dict-node@^1.0.11": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@cspell/dict-node/-/dict-node-1.0.11.tgz#c5a9dbb6dd096850910a5d7bd5c1e78d81df63af" - integrity sha512-q66zAqtNmuvZGKt4stRwQPFLsbOjZGGZOZ1HEbqpOkicxvF0BWhR0Di/JBq27PDxeqQP3S5sLeogQTSNQBuTww== +"@cspell/dict-node@^1.0.12": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@cspell/dict-node/-/dict-node-1.0.12.tgz#a7236be30340ff8fe365f62c8d13121fdbe7f51c" + integrity sha512-RPNn/7CSkflAWk0sbSoOkg0ORrgBARUjOW3QjB11KwV1gSu8f5W/ij/S50uIXtlrfoBLqd4OyE04jyON+g/Xfg== -"@cspell/dict-npm@^1.0.11": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@cspell/dict-npm/-/dict-npm-1.0.11.tgz#e19f746c76a657be96297d0c68fb4dcc62ad162c" - integrity sha512-mokmv9/Yk1yliDz97drWyuDWv7eKGEcFhdM43YSPK7GuMLh6i2ULOmORPFhUcjxQjPf0uySMDA2JguiQ4m5Lmg== +"@cspell/dict-npm@^1.0.12": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@cspell/dict-npm/-/dict-npm-1.0.12.tgz#2d30e4580855f67e407d096ba73656e3e05b5617" + integrity sha512-UaC3SzuAHtpKl/iwhQse52Mji/2/Zn8XpOwLpYcLElURa325/1oyhO8bsgX/SWXmo7RJ1xOYv0BQkQpvMx9TOg== -"@cspell/dict-php@^1.0.23": - version "1.0.23" - resolved "https://registry.yarnpkg.com/@cspell/dict-php/-/dict-php-1.0.23.tgz#8ee85fec8416a88b71edb2a53e26a79f280c9fa7" - integrity sha512-rRLf/09rXDrzs0DJuNXNmFVTw2b2zLmZKNF4LIPrFHYHvdfsMvwVqxkr/SAyhF8C6zi5sW0XYC/J0S/3IE927w== +"@cspell/dict-php@^1.0.24": + version "1.0.24" + resolved "https://registry.yarnpkg.com/@cspell/dict-php/-/dict-php-1.0.24.tgz#40c15a4c5e1e2deba28841e2b498595b13f0ff88" + integrity sha512-vHCqETX1idT9tN1plkxUFnXMIHjbbrNOINZh1PYSvVlBrOdahSaL/g6dOJZC5QTaaidoU4WXUlgnNb/7JN4Plg== -"@cspell/dict-powershell@^1.0.14": - version "1.0.14" - resolved "https://registry.yarnpkg.com/@cspell/dict-powershell/-/dict-powershell-1.0.14.tgz#f8998f2f413b3b94e69a512117de89552cfa1834" - integrity sha512-hisOXXi5PBXB5YKtrJQIis2FIRHgSW1U0/sd4yI36lzb3ZMEvGJwdAdyhXN3IGiqRUNxMzJiXAeXfhnia4xPtQ== +"@cspell/dict-powershell@^1.0.15": + version "1.0.15" + resolved "https://registry.yarnpkg.com/@cspell/dict-powershell/-/dict-powershell-1.0.15.tgz#340b5a2a316cdadf670fe4d0fb1df01f3266cf1e" + integrity sha512-7s1s+iMnf1Sm6+LICfeFMJ79k2Ygy6dG5pRefa2iq7DxOnf4n2ZlXFBDDxKH9NcUFD2uRLqQzN48lon4roCYfw== -"@cspell/dict-python@^1.0.34": - version "1.0.34" - resolved "https://registry.yarnpkg.com/@cspell/dict-python/-/dict-python-1.0.34.tgz#26601cbc78e937b6f5c45110722c720cde4ca7c3" - integrity sha512-1VvyvvEv3ToVdlFIPzD6sOh+bFVrYMHoAL6VnJYfFMnCxw/YftHIc7INg9LEUWcolovVFoUHFOhBN8saXw8bzA== +"@cspell/dict-python@^1.0.35": + version "1.0.35" + resolved "https://registry.yarnpkg.com/@cspell/dict-python/-/dict-python-1.0.35.tgz#0f9880626a1422cdd2be39b18086ae0cd59b4c3f" + integrity sha512-vVlx01SG8VjNHAQGaE/OGSShX1CoiXmdmCBsPX2sip6JmBluengGPtRPhpVLQOMxnXvTKg96eGtcnVRrYkVzag== -"@cspell/dict-ruby@^1.0.13": - version "1.0.13" - resolved "https://registry.yarnpkg.com/@cspell/dict-ruby/-/dict-ruby-1.0.13.tgz#2cb63b575376de3bd85ec9b862bc31cdabb287b9" - integrity sha512-YeN1acY38dgMYlEJ6iWPH+8qXB6seLKHm9BszXxaKT/IzGA9Y9XUWPGobeJFD5E/tC6HjvcqRKxEs8vnvakoLQ== +"@cspell/dict-ruby@^1.0.14": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@cspell/dict-ruby/-/dict-ruby-1.0.14.tgz#6ecbda6e0a01e4692abd4a14b64ff8f61d86e161" + integrity sha512-XHBGN4U1y9rjRuqrCA+3yIm2TCdhwwHXpOEcWkNeyXm8K03yPnIrKFS+kap8GTTrLpfNDuFsrmkkQTa7ssXLRA== "@cspell/dict-rust@^1.0.22": version "1.0.22" @@ -669,20 +660,20 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.29": - version "1.0.29" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.29.tgz#da9218f94ee0209a4867f1129725d78335e7d8f5" - integrity sha512-cW4HTLqV5ckUmdL5JpRuHw7MrybsEtE/941US4qqmrkWpINgodYF6mhPBVzGNH2guL/dAznlCInDho4IDoe3qA== +"@cspell/dict-software-terms@^1.0.32": + version "1.0.32" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.32.tgz#21d5bdb6c21fcef423cc226857ca9dab176954da" + integrity sha512-RA2rRiw0cODQOfUJZ2817n9iu+CThpo09D5Li3+632TCDA4IjkfNYGpTegE5N3eQCPFzLJN7Oghdc7YGNut+Qg== -"@cspell/dict-typescript@^1.0.17": - version "1.0.17" - resolved "https://registry.yarnpkg.com/@cspell/dict-typescript/-/dict-typescript-1.0.17.tgz#56ae757bdbf785e90846e62297fe1295c58468f4" - integrity sha512-CXCuXcrgAc56P3kL9I6gW6bZwTs6t3duyAtHerHg5YAYbPs6/4nXgniQgLgu8kjFHFy07XrqaaBdLU9V2DmMtQ== +"@cspell/dict-typescript@^1.0.19": + version "1.0.19" + resolved "https://registry.yarnpkg.com/@cspell/dict-typescript/-/dict-typescript-1.0.19.tgz#44f3ad1c93ffc89ebf98fa6964e1634e6612fc30" + integrity sha512-qmJApzoVskDeJnLZzZMaafEDGbEg5Elt4c3Mpg49SWzIHm1N4VXCp5CcFfHsOinJ30dGrs3ARAJGJZIw56kK6A== -"@eslint/eslintrc@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.3.0.tgz#d736d6963d7003b6514e6324bec9c602ac340318" - integrity sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg== +"@eslint/eslintrc@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.1.tgz#442763b88cecbe3ee0ec7ca6d6dd6168550cbf14" + integrity sha512-5v7TDE9plVhvxQeWLXDTvFvJBdH6pEsdnl2g/dAptmuFEPedQ4Erq5rsDsX+mvAM610IhNaO2W5V1dOOnDKxkQ== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -691,7 +682,6 @@ ignore "^4.0.6" import-fresh "^3.2.1" js-yaml "^3.13.1" - lodash "^4.17.20" minimatch "^3.0.4" strip-json-comments "^3.1.1" @@ -785,93 +775,94 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.2.tgz#4e04bc464014358b03ab4937805ee36a0aeb98f2" - integrity sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g== +"@jest/console@^27.0.2": + version "27.0.2" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.0.2.tgz#b8eeff8f21ac51d224c851e1729d2630c18631e6" + integrity sha512-/zYigssuHLImGeMAACkjI4VLAiiJznHgAl3xnFT19iWyct2LhrH3KXOjHRmxBGTkiPLZKKAJAgaPpiU9EZ9K+w== dependencies: - "@jest/types" "^26.6.2" + "@jest/types" "^27.0.2" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^26.6.2" - jest-util "^26.6.2" + jest-message-util "^27.0.2" + jest-util "^27.0.2" slash "^3.0.0" -"@jest/core@^26.6.3": - version "26.6.3" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.3.tgz#7639fcb3833d748a4656ada54bde193051e45fad" - integrity sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw== +"@jest/core@^27.0.3": + version "27.0.3" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.3.tgz#b5a38675fa0466450a7fd465f4b226762cb592a2" + integrity sha512-rN8lr/OJ8iApcQUh4khnMaOCVX4oRnLwy2tPW3Vh70y62K8Da8fhkxMUq0xX9VPa4+yWUm0tGc/jUSJi+Jzuwg== dependencies: - "@jest/console" "^26.6.2" - "@jest/reporters" "^26.6.2" - "@jest/test-result" "^26.6.2" - "@jest/transform" "^26.6.2" - "@jest/types" "^26.6.2" + "@jest/console" "^27.0.2" + "@jest/reporters" "^27.0.2" + "@jest/test-result" "^27.0.2" + "@jest/transform" "^27.0.2" + "@jest/types" "^27.0.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" + emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^26.6.2" - jest-config "^26.6.3" - jest-haste-map "^26.6.2" - jest-message-util "^26.6.2" - jest-regex-util "^26.0.0" - jest-resolve "^26.6.2" - jest-resolve-dependencies "^26.6.3" - jest-runner "^26.6.3" - jest-runtime "^26.6.3" - jest-snapshot "^26.6.2" - jest-util "^26.6.2" - jest-validate "^26.6.2" - jest-watcher "^26.6.2" - micromatch "^4.0.2" + jest-changed-files "^27.0.2" + jest-config "^27.0.3" + jest-haste-map "^27.0.2" + jest-message-util "^27.0.2" + jest-regex-util "^27.0.1" + jest-resolve "^27.0.2" + jest-resolve-dependencies "^27.0.3" + jest-runner "^27.0.3" + jest-runtime "^27.0.3" + jest-snapshot "^27.0.2" + jest-util "^27.0.2" + jest-validate "^27.0.2" + jest-watcher "^27.0.2" + micromatch "^4.0.4" p-each-series "^2.1.0" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.2.tgz#ba364cc72e221e79cc8f0a99555bf5d7577cf92c" - integrity sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA== +"@jest/environment@^27.0.3": + version "27.0.3" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.0.3.tgz#68769b1dfdd213e3456169d64fbe9bd63a5fda92" + integrity sha512-pN9m7fbKsop5vc3FOfH8NF7CKKdRbEZzcxfIo1n2TT6ucKWLFq0P6gCJH0GpnQp036++yY9utHOxpeT1WnkWTA== dependencies: - "@jest/fake-timers" "^26.6.2" - "@jest/types" "^26.6.2" + "@jest/fake-timers" "^27.0.3" + "@jest/types" "^27.0.2" "@types/node" "*" - jest-mock "^26.6.2" + jest-mock "^27.0.3" -"@jest/fake-timers@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.6.2.tgz#459c329bcf70cee4af4d7e3f3e67848123535aad" - integrity sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA== +"@jest/fake-timers@^27.0.3": + version "27.0.3" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.0.3.tgz#9899ba6304cc636734c74478df502e18136461dd" + integrity sha512-fQ+UCKRIYKvTCEOyKPnaPnomLATIhMnHC/xPZ7yT1Uldp7yMgMxoYIFidDbpSTgB79+/U+FgfoD30c6wg3IUjA== dependencies: - "@jest/types" "^26.6.2" - "@sinonjs/fake-timers" "^6.0.1" + "@jest/types" "^27.0.2" + "@sinonjs/fake-timers" "^7.0.2" "@types/node" "*" - jest-message-util "^26.6.2" - jest-mock "^26.6.2" - jest-util "^26.6.2" + jest-message-util "^27.0.2" + jest-mock "^27.0.3" + jest-util "^27.0.2" -"@jest/globals@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.6.2.tgz#5b613b78a1aa2655ae908eba638cc96a20df720a" - integrity sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA== +"@jest/globals@^27.0.3": + version "27.0.3" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.0.3.tgz#1cf8933b7791bba0b99305cbf39fd4d2e3fe4060" + integrity sha512-OzsIuf7uf+QalqAGbjClyezzEcLQkdZ+7PejUrZgDs+okdAK8GwRCGcYCirHvhMBBQh60Jr3NlIGbn/KBPQLEQ== dependencies: - "@jest/environment" "^26.6.2" - "@jest/types" "^26.6.2" - expect "^26.6.2" + "@jest/environment" "^27.0.3" + "@jest/types" "^27.0.2" + expect "^27.0.2" -"@jest/reporters@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.6.2.tgz#1f518b99637a5f18307bd3ecf9275f6882a667f6" - integrity sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw== +"@jest/reporters@^27.0.2": + version "27.0.2" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.2.tgz#ad73835d1cd54da08b0998a70b14446405e8e0d9" + integrity sha512-SVQjew/kafNxSN1my4praGQP+VPVGHsU8zqiEDppLvq6j1lryIjdNb9P+bZSsKeifU4bIoaPnf9Ui0tK9WOpFA== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^26.6.2" - "@jest/test-result" "^26.6.2" - "@jest/transform" "^26.6.2" - "@jest/types" "^26.6.2" + "@jest/console" "^27.0.2" + "@jest/test-result" "^27.0.2" + "@jest/transform" "^27.0.2" + "@jest/types" "^27.0.2" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -882,78 +873,75 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^26.6.2" - jest-resolve "^26.6.2" - jest-util "^26.6.2" - jest-worker "^26.6.2" + jest-haste-map "^27.0.2" + jest-resolve "^27.0.2" + jest-util "^27.0.2" + jest-worker "^27.0.2" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" terminal-link "^2.0.0" v8-to-istanbul "^7.0.0" - optionalDependencies: - node-notifier "^8.0.0" -"@jest/source-map@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.6.2.tgz#29af5e1e2e324cafccc936f218309f54ab69d535" - integrity sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA== +"@jest/source-map@^27.0.1": + version "27.0.1" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.0.1.tgz#2afbf73ddbaddcb920a8e62d0238a0a9e0a8d3e4" + integrity sha512-yMgkF0f+6WJtDMdDYNavmqvbHtiSpwRN2U/W+6uztgfqgkq/PXdKPqjBTUF1RD/feth4rH5N3NW0T5+wIuln1A== dependencies: callsites "^3.0.0" graceful-fs "^4.2.4" source-map "^0.6.0" -"@jest/test-result@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.2.tgz#55da58b62df134576cc95476efa5f7949e3f5f18" - integrity sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ== +"@jest/test-result@^27.0.2": + version "27.0.2" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.0.2.tgz#0451049e32ceb609b636004ccc27c8fa22263f10" + integrity sha512-gcdWwL3yP5VaIadzwQtbZyZMgpmes8ryBAJp70tuxghiA8qL4imJyZex+i+USQH2H4jeLVVszhwntgdQ97fccA== dependencies: - "@jest/console" "^26.6.2" - "@jest/types" "^26.6.2" + "@jest/console" "^27.0.2" + "@jest/types" "^27.0.2" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^26.6.3": - version "26.6.3" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz#98e8a45100863886d074205e8ffdc5a7eb582b17" - integrity sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw== +"@jest/test-sequencer@^27.0.3": + version "27.0.3" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.3.tgz#2a8632b86a9a6f8900e514917cdab6a062e71049" + integrity sha512-DcLTzraZ8xLr5fcIl+CF14vKeBBpBrn55wFxI9Ju+dhEBdjRdJQ/Z/pLkMehkPZWIQ+rR23J8e+wFDkfjree0Q== dependencies: - "@jest/test-result" "^26.6.2" + "@jest/test-result" "^27.0.2" graceful-fs "^4.2.4" - jest-haste-map "^26.6.2" - jest-runner "^26.6.3" - jest-runtime "^26.6.3" + jest-haste-map "^27.0.2" + jest-runtime "^27.0.3" -"@jest/transform@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.2.tgz#5ac57c5fa1ad17b2aae83e73e45813894dcf2e4b" - integrity sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA== +"@jest/transform@^27.0.2": + version "27.0.2" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.0.2.tgz#b073b7c589e3f4b842102468875def2bb722d6b5" + integrity sha512-H8sqKlgtDfVog/s9I4GG2XMbi4Ar7RBxjsKQDUhn2XHAi3NG+GoQwWMER+YfantzExbjNqQvqBHzo/G2pfTiPw== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^26.6.2" + "@jest/types" "^27.0.2" babel-plugin-istanbul "^6.0.0" chalk "^4.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.4" - jest-haste-map "^26.6.2" - jest-regex-util "^26.0.0" - jest-util "^26.6.2" - micromatch "^4.0.2" + jest-haste-map "^27.0.2" + jest-regex-util "^27.0.1" + jest-util "^27.0.2" + micromatch "^4.0.4" pirates "^4.0.1" slash "^3.0.0" source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" - integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== +"@jest/types@^27.0.2": + version "27.0.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.0.2.tgz#e153d6c46bda0f2589f0702b071f9898c7bbd37e" + integrity sha512-XpjCtJ/99HB4PmyJ2vgmN7vT+JLP7RW1FBT9RgnMFS4Dt7cvIyBee8O3/j98aUZ34ZpenPZFqmaaObWSeL65dg== dependencies: "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" - "@types/yargs" "^15.0.0" + "@types/yargs" "^16.0.0" chalk "^4.0.0" "@lerna/add@3.21.0": @@ -1650,7 +1638,7 @@ "@microsoft/tsdoc-config" "~0.15.2" "@rushstack/node-core-library" "3.38.0" -"@microsoft/api-extractor@^7.13.2": +"@microsoft/api-extractor@^7.15.2": version "7.15.2" resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.15.2.tgz#7a06b857660e33d1cdc050d576eb6c6c05dc532a" integrity sha512-/Y/n+QOc1vM6Vg3OAUByT/wXdZciE7jV3ay33+vxl3aKva5cNsuOauL14T7XQWUiLko3ilPwrcnFcEjzXpLsuA== @@ -1866,13 +1854,18 @@ dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz#293674fccb3262ac782c7aadfdeca86b10c75c40" - integrity sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA== +"@sinonjs/fake-timers@^7.0.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz#2524eae70c4910edccf99b2f4e6efc5894aff7b5" + integrity sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg== dependencies: "@sinonjs/commons" "^1.7.0" +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + "@tsconfig/node10@^1.0.7": version "1.0.7" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.7.tgz#1eb1de36c73478a2479cc661ef5af1c16d86d606" @@ -1903,10 +1896,10 @@ resolved "https://registry.yarnpkg.com/@types/babel__code-frame/-/babel__code-frame-7.0.2.tgz#e0c0f1648cbc09a9d4e5b4ed2ae9a6f7c8f5aeb0" integrity sha512-imO+jT/yjOKOAS5GQZ8SDtwiIloAGGr6OaZDKB0V5JVaSfGZLat5K5/ZRtyKW6R60XHV3RHYPTFfhYb+wDKyKg== -"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": - version "7.1.12" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.12.tgz#4d8e9e51eb265552a7e4f1ff2219ab6133bdfb2d" - integrity sha512-wMTHiiTiBAAPebqaPiPDLFA4LYPKr6Ph0Xq/6rq1Ur3v66HXyG+clfR9CNETkD7MQS8ZHvpQOtA53DLws5WAEQ== +"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": + version "7.1.14" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.14.tgz#faaeefc4185ec71c389f4501ee5ec84b170cc402" + integrity sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" @@ -1997,7 +1990,7 @@ dependencies: "@types/jest" "*" -"@types/jest@*", "@types/jest@^26.0.20": +"@types/jest@*", "@types/jest@^26.0.23": version "26.0.23" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.23.tgz#a1b7eab3c503b80451d019efb588ec63522ee4e7" integrity sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA== @@ -2005,7 +1998,7 @@ jest-diff "^26.0.0" pretty-format "^26.0.0" -"@types/json-schema@^7.0.3": +"@types/json-schema@^7.0.7": version "7.0.7" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== @@ -2015,20 +2008,20 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= -"@types/lodash@*", "@types/lodash@^4.14.149": +"@types/lodash@*", "@types/lodash@^4.14.170": version "4.14.170" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.170.tgz#0d67711d4bf7f4ca5147e9091b847479b87925d6" integrity sha512-bpcvu/MKHHeYX+qeEN8GE7DIravODWdACVA1ctevD8CN24RhPZIKMn9ntfAsrvLfSX3cR5RrBKAbYm9bGs0A+Q== -"@types/marked@*", "@types/marked@^2.0.0": +"@types/marked@*", "@types/marked@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.3.tgz#c8ea93684e530cc3b667d3e7226556dd0844ad1f" integrity sha512-lbhSN1rht/tQ+dSWxawCzGgTfxe9DB31iLgiT1ZVT5lshpam/nyOA1m3tKHRoNPctB2ukSL22JZI5Fr+WI/zYg== "@types/minimatch@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.4.tgz#f0ec25dbf2f0e4b18647313ac031134ca5b24b21" + integrity sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA== "@types/minimist@^1.2.0": version "1.2.0" @@ -2043,15 +2036,10 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@>= 8", "@types/node@^15.0.2": - version "15.6.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.6.0.tgz#f0ddca5a61e52627c9dcb771a6039d44694597bc" - integrity sha512-gCYSfQpy+LYhOFTKAeE8BkyGqaxmlFxe+n4DKM6DR0wzw/HISUE/hAmkC/KT8Sw5PCJblqg062b3z9gucv3k0A== - -"@types/node@10.17.13": - version "10.17.13" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" - integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== +"@types/node@*", "@types/node@10.17.13", "@types/node@>= 8", "@types/node@^15.6.1": + version "15.6.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.6.1.tgz#32d43390d5c62c5b6ec486a9bc9c59544de39a08" + integrity sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -2063,7 +2051,7 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/prettier@*", "@types/prettier@^2.0.0", "@types/prettier@^2.2.1": +"@types/prettier@*", "@types/prettier@^2.1.5", "@types/prettier@^2.2.3": version "2.2.3" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.3.tgz#ef65165aea2924c9359205bf748865b8881753c0" integrity sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA== @@ -2076,7 +2064,7 @@ "@types/glob" "*" "@types/node" "*" -"@types/semver@*", "@types/semver@^7.3.4": +"@types/semver@*", "@types/semver@^7.3.6": version "7.3.6" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.6.tgz#e9831776f4512a7ba6da53e71c26e5fb67882d63" integrity sha512-0caWDWmpCp0uifxFh+FaqK3CuZ2SkRR/ZRxAV5+zNdC3QVUi6wyOJnefhPvtNt8NQWXB5OA93BUvZsXpWat2Xw== @@ -2092,14 +2080,14 @@ integrity sha512-flgpHJjntpBAdJD43ShRosQvNC0ME97DCfGvZEDlAThQmnerRXrLbX6YgzRBQCZTthET9eAWFAMaYP0m0Y4HzQ== "@types/yargs-parser@*": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" - integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== + version "20.2.0" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" + integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA== -"@types/yargs@^15.0.0": - version "15.0.5" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.5.tgz#947e9a6561483bdee9adffc983e91a6902af8b79" - integrity sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w== +"@types/yargs@^16.0.0": + version "16.0.3" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.3.tgz#4b6d35bb8e680510a7dc2308518a80ee1ef27e01" + integrity sha512-YlFfTGS+zqCgXuXNV26rOIeETOkXnGQXP/pjjL9P0gO/EP9jTmc7pUBhx+jVEIxpq41RX33GQ7N3DzOSfZoglQ== dependencies: "@types/yargs-parser" "*" @@ -2120,7 +2108,7 @@ JSONStream@^1.0.4, JSONStream@^1.3.4: jsonparse "^1.2.0" through ">=2.2.7 <3" -abab@^2.0.3: +abab@^2.0.3, abab@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== @@ -2153,6 +2141,11 @@ acorn@^7.1.1, acorn@^7.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== +acorn@^8.2.4: + version "8.2.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.4.tgz#caba24b08185c3b56e3168e97d15ed17f4d31fd0" + integrity sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg== + agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" @@ -2160,6 +2153,13 @@ agent-base@4, agent-base@^4.3.0: dependencies: es6-promisify "^5.0.0" +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + agent-base@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" @@ -2192,10 +2192,10 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@~6.12.6: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^7.0.2: - version "7.1.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-7.1.0.tgz#f982ea7933dc7f1012eae9eec5a86687d805421b" - integrity sha512-svS9uILze/cXbH0z2myCK2Brqprx/+JJYK5pHicT/GQiBfzzhUVAIT6MwqJg8y4xV/zoGsUeuPuwtoiKSGE15g== +ajv@^8.0.1: + version "8.5.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.5.0.tgz#695528274bcb5afc865446aa275484049a18ae4b" + integrity sha512-Y2l399Tt1AguU3BPRP9Fn4eN+Or+StUGWCUpbnFyXSo8NZ9S4uj+AG2pjs5apK+ZMOwYOz1+a+VKvKH7CudXgQ== dependencies: fast-deep-equal "^3.1.1" json-schema-traverse "^1.0.0" @@ -2270,19 +2270,16 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: "@types/color-name" "^1.1.1" color-convert "^2.0.1" +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + any-promise@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - anymatch@^3.0.3: version "3.1.1" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" @@ -2356,13 +2353,15 @@ array-ify@^1.0.0: resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= -array-includes@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" - integrity sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ== +array-includes@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a" + integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A== dependencies: + call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.17.0" + es-abstract "^1.18.0-next.2" + get-intrinsic "^1.1.1" is-string "^1.0.5" array-timsort@^1.0.3: @@ -2392,13 +2391,14 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= -array.prototype.flat@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz#0de82b426b0318dbfdb940089e38b043d37f6c7b" - integrity sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ== +array.prototype.flat@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123" + integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" + es-abstract "^1.18.0-next.1" arrify@^1.0.1: version "1.0.1" @@ -2467,16 +2467,16 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== -babel-jest@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056" - integrity sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA== +babel-jest@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.2.tgz#7dc18adb01322acce62c2af76ea2c7cd186ade37" + integrity sha512-9OThPl3/IQbo4Yul2vMz4FYwILPQak8XelX4YGowygfHaOl5R5gfjm4iVx4d8aUugkW683t8aq0A74E7b5DU1Q== dependencies: - "@jest/transform" "^26.6.2" - "@jest/types" "^26.6.2" - "@types/babel__core" "^7.1.7" + "@jest/transform" "^27.0.2" + "@jest/types" "^27.0.2" + "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^26.6.2" + babel-preset-jest "^27.0.1" chalk "^4.0.0" graceful-fs "^4.2.4" slash "^3.0.0" @@ -2492,10 +2492,10 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz#8185bd030348d254c6d7dd974355e6a28b21e62d" - integrity sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw== +babel-plugin-jest-hoist@^27.0.1: + version "27.0.1" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.1.tgz#a6d10e484c93abff0f4e95f437dad26e5736ea11" + integrity sha512-sqBF0owAcCDBVEDtxqfYr2F36eSHdx7lAVGyYuOBRnKdD6gzcy0I0XrAYCZgOA3CRrLhmR+Uae9nogPzmAtOfQ== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" @@ -2520,12 +2520,12 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz#747872b1171df032252426586881d62d31798fee" - integrity sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ== +babel-preset-jest@^27.0.1: + version "27.0.1" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.0.1.tgz#7a50c75d16647c23a2cf5158d5bb9eb206b10e20" + integrity sha512-nIBIqCEpuiyhvjQs2mVNwTxQQa2xk70p9Dd/0obQGBf8FBzbnI8QhQKzLsWMN2i6q+5B0OcWDtrboBX5gmOLyA== dependencies: - babel-plugin-jest-hoist "^26.6.2" + babel-plugin-jest-hoist "^27.0.1" babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: @@ -2599,7 +2599,7 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browserslist@^4.14.5: +browserslist@^4.16.6: version "4.16.6" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== @@ -2695,6 +2695,14 @@ cachedir@2.2.0: resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-2.2.0.tgz#19afa4305e05d79e417566882e0c8f960f62ff0e" integrity sha512-VvxA0xhNqIIfg0V9AmJkDg91DaJwryutH5rVEZAhcNi4iJFj9f+QxmAjgK1LT9I8OgToX27fypX6/MeCXVbBjQ== +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -2765,7 +2773,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0: +camelcase@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== @@ -2775,13 +2783,6 @@ caniuse-lite@^1.0.30001219: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz#bfdc5942cd3326fa51ee0b42fbef4da9d492a7fa" integrity sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A== -capture-exit@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" - integrity sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g== - dependencies: - rsvp "^4.8.4" - caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -2824,10 +2825,15 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -cjs-module-lexer@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz#4186fcca0eae175970aee870b9fe2d6cf8d5655f" - integrity sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw== +ci-info@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.2.0.tgz#2876cb948a498797b5236f0095bc057d0dca38b6" + integrity sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A== + +cjs-module-lexer@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.1.tgz#2fd46d9906a126965aa541345c499aaa18e8cd73" + integrity sha512-jVamGdJPDeuQilKhvVn1h3knuMOZzr8QDnpk+M9aMlCaMkTDd6fBWPhiDqFvFZ07pL0liqabAiuy8SY4jGHeaw== class-utils@^0.3.5: version "0.3.6" @@ -3098,11 +3104,6 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= -contains-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" - integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= - conventional-changelog-angular@^5.0.11, conventional-changelog-angular@^5.0.3: version "5.0.12" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" @@ -3266,7 +3267,7 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -3280,59 +3281,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.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.4.1.tgz#c022284adf695f6fccedfab72dd82869795530ce" - integrity sha512-mxyCuzDYjEhgDRcan8KuZtwPw90/Fw6mlIuMHcENwmVUack4uXsmBcwzmax6nBpEdb8Ck+FF4Iav5EOOo8oXJA== +cspell-glob@^5.5.2: + version "5.5.2" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.5.2.tgz#b2445789239f15e541bacf787336dc5234c03421" + integrity sha512-sr8je4895+I84kSCMCqWumRyrnaun5FQT7tmsNtWHebSB3dsmJ6lli7DodBsnM+mojGg9egdeunAHWhSwjHGVQ== dependencies: micromatch "^4.0.4" -cspell-io@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.4.1.tgz#0c39e2b4e112282e68c1af4b7e8b25eb4377e18e" - integrity sha512-hf+kErIND/UiMh9qyJ9COJ73mrjrerf+XV4t6M5IkgfGW0qpDXUtORUHA3NNWtB1U7GbKVH7HpInjJ3XGAjcRw== +cspell-io@^5.5.2: + version "5.5.2" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.5.2.tgz#293026318e7881e801c5b4484cc0a1409506a901" + integrity sha512-aeT9RGgRoWRXPkYtRN2swNokjEqo0+dXTs6brOEmM6oOOzA/xsksnDncHJeCt/EwXs/ri/eXpjLG9ObTMt1tug== dependencies: - iconv-lite "^0.6.2" - iterable-to-stream "^1.0.1" + iconv-lite "^0.6.3" + iterable-to-stream "^2.0.0" -cspell-lib@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.4.1.tgz#79595fedd4f48449c54ecba220603bb410f8dac3" - integrity sha512-Hj7Gv6wy3lEx3Hb8slILCU5CvxruXDWeCviolSsdYK6M83fRevNH+O0fIWkyW5NPv9AcW2FB+/FaJ5HAxDAtwQ== +cspell-lib@^5.5.2: + version "5.5.2" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.5.2.tgz#3e699b2a563d8560136a8916d307bea9922be15b" + integrity sha512-xAC/4l7QqsTowmVguzGJMhVXzb+uQcHACDpZcKcujYRnwgGOqonNfrN8kq8xmInVo36P621Frx8aKKgaP6A4Ew== dependencies: - "@cspell/cspell-bundled-dicts" "^5.4.1" - "@cspell/cspell-types" "^5.4.1" + "@cspell/cspell-bundled-dicts" "^5.5.2" + "@cspell/cspell-types" "^5.5.2" comment-json "^4.1.0" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-glob "^5.4.1" - cspell-io "^5.4.1" - cspell-trie-lib "^5.4.1" + cspell-glob "^5.5.2" + cspell-io "^5.5.2" + cspell-trie-lib "^5.5.2" fs-extra "^10.0.0" gensequence "^3.1.1" resolve-from "^5.0.0" resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.4.1.tgz#0210890db497e5c514829afc0a2744921e48c4c2" - integrity sha512-+yla0OQ4mgCtRYRbRRQ9Udg91mSwwXD2RfkuMMMjDUmjnIp/63+08w68TyWW3faolXKF/uR5ya9ItZfee+juCQ== +cspell-trie-lib@^5.5.2: + version "5.5.2" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.5.2.tgz#54f88663332213afd15be98a16007d249b4bdb3d" + integrity sha512-xLXOaoCHUPTxWnYel8zjKRxRlRQd/S8jjg7kXHZt8XOkWNRGCjeF/Itgb77+zNDoknlH9OphmwBjYwxXAWC14Q== dependencies: fs-extra "^10.0.0" gensequence "^3.1.1" -cspell@^5.2.4: - version "5.4.1" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.4.1.tgz#5b92cf2886a4478aa285d14eaa404033437bb98d" - integrity sha512-P4Vgfh8+SbdtbOp6boqFe1z7dVHoJif+Z55S6gQNR/KUrBFzajZEYKYjkDnWAHFV1zG6JcJinMzqDdc/EfiAGQ== +cspell@^5.5.2: + version "5.5.2" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.5.2.tgz#a778efb24006e2a552aab2c52ce23c753d64ac68" + integrity sha512-iklHcVuV+hfzeOtDcoAVBtrujhIMMLJaZRlaNTxsawNNnD/BuYljicy1CkHH1TfD4Bygj3eAIPsVtPmShyLSoA== dependencies: - "@cspell/cspell-types" "^5.4.1" + "@cspell/cspell-types" "^5.5.2" chalk "^4.1.1" commander "^7.2.0" comment-json "^4.1.0" - cspell-glob "^5.4.1" - cspell-lib "^5.4.1" + cspell-glob "^5.5.2" + cspell-lib "^5.5.2" fs-extra "^10.0.0" get-stdin "^8.0.0" glob "^7.1.7" @@ -3348,7 +3349,7 @@ cssom@~0.3.6: resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== -cssstyle@^2.2.0: +cssstyle@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== @@ -3435,6 +3436,13 @@ debug@3.1.0: dependencies: ms "2.0.0" +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -3442,20 +3450,13 @@ debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: dependencies: ms "2.0.0" -debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== +debug@^3.1.0, debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: ms "^2.1.1" -debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -3474,7 +3475,7 @@ decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decimal.js@^10.2.0: +decimal.js@^10.2.1: version "10.2.1" resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.1.tgz#238ae7b0f0c793d3e3cea410108b35a2c01426a3" integrity sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw== @@ -3511,7 +3512,7 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" -define-properties@^1.1.2, define-properties@^1.1.3: +define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== @@ -3588,10 +3589,10 @@ didyoumean@^1.2.1: resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.1.tgz#e92edfdada6537d484d73c0172fd1eba0c4976ff" integrity sha1-6S7f2tplN9SE1zwBcv0eugxJdv8= -diff-sequences@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" - integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== +diff-sequences@^27.0.1: + version "27.0.1" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.1.tgz#9c9801d52ed5f576ff0a20e3022a13ee6e297e7c" + integrity sha512-XPLijkfJUh/PIBnfkcSHgvD6tlYixmcMAn3osTk6jt+H0v/mgURto1XUiD9DKuGX5NDoVS6dSlA23gd9FUaCFg== diff@^4.0.1: version "4.0.2" @@ -3612,13 +3613,12 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -doctrine@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" - integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== dependencies: esutils "^2.0.2" - isarray "^1.0.0" doctrine@^3.0.0: version "3.0.0" @@ -3685,10 +3685,10 @@ electron-to-chromium@^1.3.723: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.736.tgz#f632d900a1f788dab22fec9c62ec5c9c8f0c4052" integrity sha512-DY8dA7gR51MSo66DqitEQoUMQ0Z+A2DSXFi7tK304bdTVqczCAfUuyQw6Wdg8hIoo5zIxkU1L24RQtUce1Ioig== -emittery@^0.7.1: - version "0.7.2" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.7.2.tgz#25595908e13af0f5674ab419396e2fb394cdfa82" - integrity sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ== +emittery@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" + integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== emoji-regex@^7.0.1: version "7.0.3" @@ -3748,22 +3748,27 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: - version "1.17.6" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a" - integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw== +es-abstract@^1.17.0-next.1, es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: + version "1.18.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.3.tgz#25c4c3380a27aa203c44b2b685bba94da31b63e0" + integrity sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw== dependencies: + call-bind "^1.0.2" es-to-primitive "^1.2.1" function-bind "^1.1.1" + get-intrinsic "^1.1.1" has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.0" - is-regex "^1.1.0" - object-inspect "^1.7.0" + has-symbols "^1.0.2" + is-callable "^1.2.3" + is-negative-zero "^2.0.1" + is-regex "^1.1.3" + is-string "^1.0.6" + object-inspect "^1.10.3" object-keys "^1.1.1" - object.assign "^4.1.0" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" es-to-primitive@^1.2.1: version "1.2.1" @@ -3801,13 +3806,18 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -escodegen@^1.14.1: - version "1.14.3" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" - integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escodegen@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" + integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== dependencies: esprima "^4.0.1" - estraverse "^4.2.0" + estraverse "^5.2.0" esutils "^2.0.2" optionator "^0.8.1" optionalDependencies: @@ -3821,12 +3831,12 @@ eslint-import-resolver-node@^0.3.4: debug "^2.6.9" resolve "^1.13.1" -eslint-module-utils@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz#579ebd094f56af7797d19c9866c9c9486629bfa6" - integrity sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA== +eslint-module-utils@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz#b51be1e473dd0de1c5ea638e22429c2490ea8233" + integrity sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A== dependencies: - debug "^2.6.9" + debug "^3.2.7" pkg-dir "^2.0.0" eslint-plugin-eslint-comments@^3.2.0: @@ -3837,33 +3847,35 @@ eslint-plugin-eslint-comments@^3.2.0: escape-string-regexp "^1.0.5" ignore "^5.0.5" -eslint-plugin-eslint-plugin@^3.0.0: +eslint-plugin-eslint-plugin@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.0.3.tgz#3356adec58bd4904f98001779f61eff5b7006ec8" integrity sha512-vVNx9qexy0iQwqtOzzJPFAfC6j6i4L6QE//JqwJOnAC5aUHJA4yFQy56kX9JOJ2rx3iKlpTt3h/adErgbqU/SA== dependencies: eslint-utils "^2.1.0" -eslint-plugin-import@^2.22.0: - version "2.22.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" - integrity sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw== +eslint-plugin-import@^2.23.4: + version "2.23.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz#8dceb1ed6b73e46e50ec9a5bb2411b645e7d3d97" + integrity sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ== dependencies: - array-includes "^3.1.1" - array.prototype.flat "^1.2.3" - contains-path "^0.1.0" + array-includes "^3.1.3" + array.prototype.flat "^1.2.4" debug "^2.6.9" - doctrine "1.5.0" + doctrine "^2.1.0" eslint-import-resolver-node "^0.3.4" - eslint-module-utils "^2.6.0" + eslint-module-utils "^2.6.1" + find-up "^2.0.0" has "^1.0.3" + is-core-module "^2.4.0" minimatch "^3.0.4" - object.values "^1.1.1" - read-pkg-up "^2.0.0" - resolve "^1.17.0" + object.values "^1.1.3" + pkg-up "^2.0.0" + read-pkg-up "^3.0.0" + resolve "^1.20.0" tsconfig-paths "^3.9.0" -eslint-plugin-jest@^24.1.3: +eslint-plugin-jest@^24.3.6: version "24.3.6" resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.6.tgz#5f0ca019183c3188c5ad3af8e80b41de6c8e9173" integrity sha512-WOVH4TIaBLIeCX576rLcOgjNXqP+jNlCiEmRgFTfQtJ52DpwnIQKAVGlGPAN7CZ33bW6eNfHD6s8ZbEUTQubJg== @@ -3875,7 +3887,7 @@ eslint-plugin-simple-import-sort@^7.0.0: resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-7.0.0.tgz#a1dad262f46d2184a90095a60c66fef74727f0f8" integrity sha512-U3vEDB5zhYPNfxT5TYR7u01dboFZp+HNpnGhkDB2g/2E4wZ/g1Q9Ton8UwCLfRV9yAKyYqDh62oHOamvkFxsvw== -eslint-scope@^5.0.0, eslint-scope@^5.1.1: +eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -3883,13 +3895,20 @@ eslint-scope@^5.0.0, eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-utils@^2.0.0, eslint-utils@^2.1.0: +eslint-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== dependencies: eslint-visitor-keys "^1.1.0" +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" @@ -3900,29 +3919,31 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@^7.20.0: - version "7.20.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.20.0.tgz#db07c4ca4eda2e2316e7aa57ac7fc91ec550bdc7" - integrity sha512-qGi0CTcOGP2OtCQBgWZlQjcTuP0XkIpYFj25XtRTQSHC+umNnp7UMshr2G8SLsRFYDdAPFeHOsiteadmMH02Yw== +eslint@^7.27.0: + version "7.27.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.27.0.tgz#665a1506d8f95655c9274d84bd78f7166b07e9c7" + integrity sha512-JZuR6La2ZF0UD384lcbnd0Cgg6QJjiCwhMD6eU4h/VGPcVGwawNNzKU41tgokGXnfjOOyI6QIffthhJTPzzuRA== dependencies: "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.3.0" + "@eslint/eslintrc" "^0.4.1" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.0.1" doctrine "^3.0.0" enquirer "^2.3.5" + escape-string-regexp "^4.0.0" eslint-scope "^5.1.1" eslint-utils "^2.1.0" eslint-visitor-keys "^2.0.0" espree "^7.3.1" esquery "^1.4.0" esutils "^2.0.2" - file-entry-cache "^6.0.0" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" glob-parent "^5.0.0" - globals "^12.1.0" + globals "^13.6.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" @@ -3930,7 +3951,7 @@ eslint@^7.20.0: js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" - lodash "^4.17.20" + lodash.merge "^4.6.2" minimatch "^3.0.4" natural-compare "^1.4.0" optionator "^0.9.1" @@ -3939,7 +3960,7 @@ eslint@^7.20.0: semver "^7.2.1" strip-ansi "^6.0.0" strip-json-comments "^3.1.0" - table "^6.0.4" + table "^6.0.9" text-table "^0.2.0" v8-compile-cache "^2.0.3" @@ -3971,7 +3992,7 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.1.1: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== @@ -3991,11 +4012,6 @@ eventemitter3@^3.1.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== -exec-sh@^0.3.2: - version "0.3.4" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" - integrity sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A== - execa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" @@ -4009,21 +4025,6 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" - integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== - dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - human-signals "^1.1.1" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.0" - onetime "^5.1.0" - signal-exit "^3.0.2" - strip-final-newline "^2.0.0" - execa@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" @@ -4064,17 +4065,17 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.2.tgz#c6b996bf26bf3fe18b67b2d0f51fc981ba934417" - integrity sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA== +expect@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/expect/-/expect-27.0.2.tgz#e66ca3a4c9592f1c019fa1d46459a9d2084f3422" + integrity sha512-YJFNJe2+P2DqH+ZrXy+ydRQYO87oxRUonZImpDodR1G7qo3NYd3pL+NQ9Keqpez3cehczYwZDBC3A7xk3n7M/w== dependencies: - "@jest/types" "^26.6.2" - ansi-styles "^4.0.0" - jest-get-type "^26.3.0" - jest-matcher-utils "^26.6.2" - jest-message-util "^26.6.2" - jest-regex-util "^26.0.0" + "@jest/types" "^27.0.2" + ansi-styles "^5.0.0" + jest-get-type "^27.0.1" + jest-matcher-utils "^27.0.2" + jest-message-util "^27.0.2" + jest-regex-util "^27.0.1" extend-shallow@^2.0.1: version "2.0.1" @@ -4129,7 +4130,7 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -4201,10 +4202,10 @@ figures@^3.0.0, figures@^3.2.0: dependencies: escape-string-regexp "^1.0.5" -file-entry-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.0.tgz#7921a89c391c6d93efec2169ac6bf300c527ea0a" - integrity sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA== +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== dependencies: flat-cache "^3.0.4" @@ -4409,10 +4410,10 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== +fsevents@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== function-bind@^1.1.1: version "1.1.1" @@ -4458,6 +4459,15 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-own-enumerable-property-symbols@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" @@ -4501,13 +4511,6 @@ get-stream@^4.0.0, get-stream@^4.1.0: dependencies: pump "^3.0.0" -get-stream@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - get-stream@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" @@ -4605,7 +4608,7 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@*, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, glob@~7.1.6: +glob@*, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.7, glob@~7.1.6: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== @@ -4668,7 +4671,14 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" -globby@^11.0.1: +globals@^13.6.0: + version "13.9.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.9.0.tgz#4bf2bf635b334a173fb1daf7c5e6b218ecdc06cb" + integrity sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA== + dependencies: + type-fest "^0.20.2" + +globby@^11.0.1, globby@^11.0.3: version "11.0.3" resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== @@ -4699,11 +4709,6 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== -growly@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" - integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= - handlebars@^4.7.6: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" @@ -4734,6 +4739,11 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== +has-bigints@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -4749,10 +4759,10 @@ has-own-prop@^2.0.0: resolved "https://registry.yarnpkg.com/has-own-prop/-/has-own-prop-2.0.0.tgz#f0f95d58f65804f5d218db32563bb85b8e0417af" integrity sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ== -has-symbols@^1.0.0, has-symbols@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" - integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== +has-symbols@^1.0.1, has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== has-unicode@^2.0.0, has-unicode@^2.0.1: version "2.0.1" @@ -4834,6 +4844,15 @@ http-proxy-agent@^2.1.0: agent-base "4" debug "3.1.0" +http-proxy-agent@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -4851,10 +4870,13 @@ https-proxy-agent@^2.2.3: agent-base "^4.3.0" debug "^3.1.0" -human-signals@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" - integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== +https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + dependencies: + agent-base "6" + debug "4" human-signals@^2.1.0: version "2.1.0" @@ -4880,10 +4902,10 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01" - integrity sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ== +iconv-lite@^0.6.2, iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== dependencies: safer-buffer ">= 2.1.2 < 3.0.0" @@ -5055,11 +5077,6 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== -ip-regex@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" - integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= - ip@1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" @@ -5084,15 +5101,27 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-bigint@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" + integrity sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA== + +is-boolean-object@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.1.tgz#3c0878f035cb821228d350d2e1e36719716a3de8" + integrity sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng== + dependencies: + call-bind "^1.0.2" + is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-callable@^1.1.4, is-callable@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb" - integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== +is-callable@^1.1.4, is-callable@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" + integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== is-ci@^2.0.0: version "2.0.0" @@ -5101,10 +5130,17 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" - integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== +is-ci@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.0.tgz#c7e7be3c9d8eef7d0fa144390bd1e4b88dc4c994" + integrity sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ== + dependencies: + ci-info "^3.1.1" + +is-core-module@^2.1.0, is-core-module@^2.2.0, is-core-module@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" + integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A== dependencies: has "^1.0.3" @@ -5150,11 +5186,6 @@ is-directory@^0.3.1: resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= -is-docker@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.1.1.tgz#4125a88e44e450d384e09047ede71adc2d144156" - integrity sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw== - is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -5213,6 +5244,16 @@ is-glob@^4.0.0, is-glob@^4.0.1: dependencies: is-extglob "^2.1.1" +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + +is-number-object@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.5.tgz#6edfaeed7950cff19afedce9fbfca9ee6dd289eb" + integrity sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw== + is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -5252,17 +5293,18 @@ is-plain-object@^4.0.0: resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-4.1.1.tgz#1a14d6452cbd50790edc7fdaa0aed5a40a35ebb5" integrity sha512-5Aw8LLVsDlZsETVMhoMXzqsXwQqr/0vlnBYzIXJbYo2F4yYlhLHs+Ez7Bod7IIQKWkJbJfxrWD7pA1Dw1TKrwA== -is-potential-custom-element-name@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397" - integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c= +is-potential-custom-element-name@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== -is-regex@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== +is-regex@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f" + integrity sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ== dependencies: - has-symbols "^1.0.1" + call-bind "^1.0.2" + has-symbols "^1.0.2" is-regexp@^1.0.0: version "1.0.0" @@ -5286,17 +5328,17 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== -is-string@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" - integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== +is-string@^1.0.5, is-string@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" + integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== -is-symbol@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== dependencies: - has-symbols "^1.0.1" + has-symbols "^1.0.2" is-text-path@^1.0.1: version "1.0.1" @@ -5325,14 +5367,7 @@ is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== -is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= @@ -5400,205 +5435,231 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -iterable-to-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/iterable-to-stream/-/iterable-to-stream-1.0.1.tgz#37e86baacf6b1a0e9233dad4eb526d0423d08bf3" - integrity sha512-O62gD5ADMUGtJoOoM9U6LQ7i4byPXUNoHJ6mqsmkQJcom331ZJGDApWgDESWyBMEHEJRjtHozgIiTzYo9RU4UA== - -jest-changed-files@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.2.tgz#f6198479e1cc66f22f9ae1e22acaa0b429c042d0" - integrity sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ== - dependencies: - "@jest/types" "^26.6.2" - execa "^4.0.0" - throat "^5.0.0" - -jest-cli@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.3.tgz#43117cfef24bc4cd691a174a8796a532e135e92a" - integrity sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg== - dependencies: - "@jest/core" "^26.6.3" - "@jest/test-result" "^26.6.2" - "@jest/types" "^26.6.2" +iterable-to-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/iterable-to-stream/-/iterable-to-stream-2.0.0.tgz#8cc654ab9b1011dc138e681fee2c0f0bb3cc7e3c" + integrity sha512-efkLePxXjJk92hvN+2rS3tGJTRn8/tqXjmZvPI6LQ29xCj2sUF4zW8hkMsVe3jpTkxtMZ89xsKnz9FaRqNWM6g== + +jest-changed-files@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.0.2.tgz#997253042b4a032950fc5f56abf3c5d1f8560801" + integrity sha512-eMeb1Pn7w7x3wue5/vF73LPCJ7DKQuC9wQUR5ebP9hDPpk5hzcT/3Hmz3Q5BOFpR3tgbmaWhJcMTVgC8Z1NuMw== + dependencies: + "@jest/types" "^27.0.2" + execa "^5.0.0" + throat "^6.0.1" + +jest-circus@^27.0.3: + version "27.0.3" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.3.tgz#32006967de484e03589da944064d72e172ce3261" + integrity sha512-tdMfzs7SgD5l7jRcI1iB3vtQi5fHwCgo4RlO8bzZnYc05PZ+tlAOMZeS8eGYkZ2tPaRY/aRLMFWQp/8zXBrolQ== + dependencies: + "@jest/environment" "^27.0.3" + "@jest/test-result" "^27.0.2" + "@jest/types" "^27.0.2" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + dedent "^0.7.0" + expect "^27.0.2" + is-generator-fn "^2.0.0" + jest-each "^27.0.2" + jest-matcher-utils "^27.0.2" + jest-message-util "^27.0.2" + jest-runtime "^27.0.3" + jest-snapshot "^27.0.2" + jest-util "^27.0.2" + pretty-format "^27.0.2" + slash "^3.0.0" + stack-utils "^2.0.3" + throat "^6.0.1" + +jest-cli@^27.0.3: + version "27.0.3" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.3.tgz#b733871acb526054a0f8c971d0466595c5f8316d" + integrity sha512-7bt9Sgv4nWH5pUnyJfdLf8CHWfo4+7lSPxeBwQx4r0vBj9jweJam/piE2U91SXtQI+ckm+TIN97OVnqIYpVhSg== + dependencies: + "@jest/core" "^27.0.3" + "@jest/test-result" "^27.0.2" + "@jest/types" "^27.0.2" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - is-ci "^2.0.0" - jest-config "^26.6.3" - jest-util "^26.6.2" - jest-validate "^26.6.2" + jest-config "^27.0.3" + jest-util "^27.0.2" + jest-validate "^27.0.2" prompts "^2.0.1" - yargs "^15.4.1" + yargs "^16.0.3" -jest-config@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.3.tgz#64f41444eef9eb03dc51d5c53b75c8c71f645349" - integrity sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg== +jest-config@^27.0.3: + version "27.0.3" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.3.tgz#31871583573c6d669dcdb5bb2d1a8738f3b91c20" + integrity sha512-zgtI2YQo+ekKsmYNyDlXFY/7w7WWBSJFoj/WRe173WB88CDUrEYWr0sLdbLOQe+sRu6l1Y2S0MCS6BOJm5jkoA== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^26.6.3" - "@jest/types" "^26.6.2" - babel-jest "^26.6.3" + "@jest/test-sequencer" "^27.0.3" + "@jest/types" "^27.0.2" + babel-jest "^27.0.2" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" - jest-environment-jsdom "^26.6.2" - jest-environment-node "^26.6.2" - jest-get-type "^26.3.0" - jest-jasmine2 "^26.6.3" - jest-regex-util "^26.0.0" - jest-resolve "^26.6.2" - jest-util "^26.6.2" - jest-validate "^26.6.2" - micromatch "^4.0.2" - pretty-format "^26.6.2" + is-ci "^3.0.0" + jest-circus "^27.0.3" + jest-environment-jsdom "^27.0.3" + jest-environment-node "^27.0.3" + jest-get-type "^27.0.1" + jest-jasmine2 "^27.0.3" + jest-regex-util "^27.0.1" + jest-resolve "^27.0.2" + jest-runner "^27.0.3" + jest-util "^27.0.2" + jest-validate "^27.0.2" + micromatch "^4.0.4" + pretty-format "^27.0.2" -jest-diff@^26.0.0, jest-diff@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394" - integrity sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA== +jest-diff@^26.0.0, jest-diff@^27.0.0, jest-diff@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.2.tgz#f315b87cee5dc134cf42c2708ab27375cc3f5a7e" + integrity sha512-BFIdRb0LqfV1hBt8crQmw6gGQHVDhM87SpMIZ45FPYKReZYG5er1+5pIn2zKqvrJp6WNox0ylR8571Iwk2Dmgw== dependencies: chalk "^4.0.0" - diff-sequences "^26.6.2" - jest-get-type "^26.3.0" - pretty-format "^26.6.2" + diff-sequences "^27.0.1" + jest-get-type "^27.0.1" + pretty-format "^27.0.2" -jest-docblock@^26.0.0: - version "26.0.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-26.0.0.tgz#3e2fa20899fc928cb13bd0ff68bd3711a36889b5" - integrity sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w== +jest-docblock@^27.0.1: + version "27.0.1" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.0.1.tgz#bd9752819b49fa4fab1a50b73eb58c653b962e8b" + integrity sha512-TA4+21s3oebURc7VgFV4r7ltdIJ5rtBH1E3Tbovcg7AV+oLfD5DcJ2V2vJ5zFA9sL5CFd/d2D6IpsAeSheEdrA== dependencies: detect-newline "^3.0.0" -jest-each@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.6.2.tgz#02526438a77a67401c8a6382dfe5999952c167cb" - integrity sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A== +jest-each@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.0.2.tgz#865ddb4367476ced752167926b656fa0dcecd8c7" + integrity sha512-OLMBZBZ6JkoXgUenDtseFRWA43wVl2BwmZYIWQws7eS7pqsIvePqj/jJmEnfq91ALk3LNphgwNK/PRFBYi7ITQ== dependencies: - "@jest/types" "^26.6.2" + "@jest/types" "^27.0.2" chalk "^4.0.0" - jest-get-type "^26.3.0" - jest-util "^26.6.2" - pretty-format "^26.6.2" - -jest-environment-jsdom@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz#78d09fe9cf019a357009b9b7e1f101d23bd1da3e" - integrity sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q== - dependencies: - "@jest/environment" "^26.6.2" - "@jest/fake-timers" "^26.6.2" - "@jest/types" "^26.6.2" + jest-get-type "^27.0.1" + jest-util "^27.0.2" + pretty-format "^27.0.2" + +jest-environment-jsdom@^27.0.3: + version "27.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.0.3.tgz#ed73e913ddc03864eb9f934b5cbabf1b63504e2e" + integrity sha512-5KLmgv1bhiimpSA8oGTnZYk6g4fsNyZiA/6gI2tAZUgrufd7heRUSVh4gRokzZVEj8zlwAQYT0Zs6tuJSW/ECA== + dependencies: + "@jest/environment" "^27.0.3" + "@jest/fake-timers" "^27.0.3" + "@jest/types" "^27.0.2" "@types/node" "*" - jest-mock "^26.6.2" - jest-util "^26.6.2" - jsdom "^16.4.0" - -jest-environment-node@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.6.2.tgz#824e4c7fb4944646356f11ac75b229b0035f2b0c" - integrity sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag== - dependencies: - "@jest/environment" "^26.6.2" - "@jest/fake-timers" "^26.6.2" - "@jest/types" "^26.6.2" + jest-mock "^27.0.3" + jest-util "^27.0.2" + jsdom "^16.6.0" + +jest-environment-node@^27.0.3: + version "27.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.0.3.tgz#b4acb3679d2552a4215732cab8b0ca7ec4398ee0" + integrity sha512-co2/IVnIFL3cItpFULCvXFg9us4gvWXgs7mutAMPCbFhcqh56QAOdKhNzC2+RycsC/k4mbMj1VF+9F/NzA0ROg== + dependencies: + "@jest/environment" "^27.0.3" + "@jest/fake-timers" "^27.0.3" + "@jest/types" "^27.0.2" "@types/node" "*" - jest-mock "^26.6.2" - jest-util "^26.6.2" + jest-mock "^27.0.3" + jest-util "^27.0.2" -jest-get-type@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" - integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== +jest-get-type@^27.0.1: + version "27.0.1" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.1.tgz#34951e2b08c8801eb28559d7eb732b04bbcf7815" + integrity sha512-9Tggo9zZbu0sHKebiAijyt1NM77Z0uO4tuWOxUCujAiSeXv30Vb5D4xVF4UR4YWNapcftj+PbByU54lKD7/xMg== -jest-haste-map@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" - integrity sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w== +jest-haste-map@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.0.2.tgz#3f1819400c671237e48b4d4b76a80a0dbed7577f" + integrity sha512-37gYfrYjjhEfk37C4bCMWAC0oPBxDpG0qpl8lYg8BT//wf353YT/fzgA7+Dq0EtM7rPFS3JEcMsxdtDwNMi2cA== dependencies: - "@jest/types" "^26.6.2" + "@jest/types" "^27.0.2" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.4" - jest-regex-util "^26.0.0" - jest-serializer "^26.6.2" - jest-util "^26.6.2" - jest-worker "^26.6.2" - micromatch "^4.0.2" - sane "^4.0.3" + jest-regex-util "^27.0.1" + jest-serializer "^27.0.1" + jest-util "^27.0.2" + jest-worker "^27.0.2" + micromatch "^4.0.4" walker "^1.0.7" optionalDependencies: - fsevents "^2.1.2" + fsevents "^2.3.2" -jest-jasmine2@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz#adc3cf915deacb5212c93b9f3547cd12958f2edd" - integrity sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg== +jest-jasmine2@^27.0.3: + version "27.0.3" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.3.tgz#fa6f6499566ea1b01b68b3ad13f49d1592b02c85" + integrity sha512-odJ2ia8P5c+IsqOcWJPmku4AqbXIfTVLRjYTKHri3TEvbmTdLw0ghy13OAPIl/0v7cVH0TURK7+xFOHKDLvKIA== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^26.6.2" - "@jest/source-map" "^26.6.2" - "@jest/test-result" "^26.6.2" - "@jest/types" "^26.6.2" + "@jest/environment" "^27.0.3" + "@jest/source-map" "^27.0.1" + "@jest/test-result" "^27.0.2" + "@jest/types" "^27.0.2" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^26.6.2" + expect "^27.0.2" is-generator-fn "^2.0.0" - jest-each "^26.6.2" - jest-matcher-utils "^26.6.2" - jest-message-util "^26.6.2" - jest-runtime "^26.6.3" - jest-snapshot "^26.6.2" - jest-util "^26.6.2" - pretty-format "^26.6.2" - throat "^5.0.0" - -jest-leak-detector@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz#7717cf118b92238f2eba65054c8a0c9c653a91af" - integrity sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg== - dependencies: - jest-get-type "^26.3.0" - pretty-format "^26.6.2" - -jest-matcher-utils@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz#8e6fd6e863c8b2d31ac6472eeb237bc595e53e7a" - integrity sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw== + jest-each "^27.0.2" + jest-matcher-utils "^27.0.2" + jest-message-util "^27.0.2" + jest-runtime "^27.0.3" + jest-snapshot "^27.0.2" + jest-util "^27.0.2" + pretty-format "^27.0.2" + throat "^6.0.1" + +jest-leak-detector@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.0.2.tgz#ce19aa9dbcf7a72a9d58907a970427506f624e69" + integrity sha512-TZA3DmCOfe8YZFIMD1GxFqXUkQnIoOGQyy4hFCA2mlHtnAaf+FeOMxi0fZmfB41ZL+QbFG6BVaZF5IeFIVy53Q== + dependencies: + jest-get-type "^27.0.1" + pretty-format "^27.0.2" + +jest-matcher-utils@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.0.2.tgz#f14c060605a95a466cdc759acc546c6f4cbfc4f0" + integrity sha512-Qczi5xnTNjkhcIB0Yy75Txt+Ez51xdhOxsukN7awzq2auZQGPHcQrJ623PZj0ECDEMOk2soxWx05EXdXGd1CbA== dependencies: chalk "^4.0.0" - jest-diff "^26.6.2" - jest-get-type "^26.3.0" - pretty-format "^26.6.2" + jest-diff "^27.0.2" + jest-get-type "^27.0.1" + pretty-format "^27.0.2" -jest-message-util@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.2.tgz#58173744ad6fc0506b5d21150b9be56ef001ca07" - integrity sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA== +jest-message-util@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.0.2.tgz#181c9b67dff504d8f4ad15cba10d8b80f272048c" + integrity sha512-rTqWUX42ec2LdMkoUPOzrEd1Tcm+R1KfLOmFK+OVNo4MnLsEaxO5zPDb2BbdSmthdM/IfXxOZU60P/WbWF8BTw== dependencies: - "@babel/code-frame" "^7.0.0" - "@jest/types" "^26.6.2" + "@babel/code-frame" "^7.12.13" + "@jest/types" "^27.0.2" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" - micromatch "^4.0.2" - pretty-format "^26.6.2" + micromatch "^4.0.4" + pretty-format "^27.0.2" slash "^3.0.0" - stack-utils "^2.0.2" + stack-utils "^2.0.3" -jest-mock@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.2.tgz#d6cb712b041ed47fe0d9b6fc3474bc6543feb302" - integrity sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew== +jest-mock@^27.0.3: + version "27.0.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.0.3.tgz#5591844f9192b3335c0dca38e8e45ed297d4d23d" + integrity sha512-O5FZn5XDzEp+Xg28mUz4ovVcdwBBPfAhW9+zJLO0Efn2qNbYcDaJvSlRiQ6BCZUCVOJjALicuJQI9mRFjv1o9Q== dependencies: - "@jest/types" "^26.6.2" + "@jest/types" "^27.0.2" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -5606,184 +5667,192 @@ jest-pnp-resolver@^1.2.2: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== -jest-regex-util@^26.0.0: - version "26.0.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" - integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== +jest-regex-util@^27.0.1: + version "27.0.1" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.1.tgz#69d4b1bf5b690faa3490113c47486ed85dd45b68" + integrity sha512-6nY6QVcpTgEKQy1L41P4pr3aOddneK17kn3HJw6SdwGiKfgCGTvH02hVXL0GU8GEKtPH83eD2DIDgxHXOxVohQ== -jest-resolve-dependencies@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz#6680859ee5d22ee5dcd961fe4871f59f4c784fb6" - integrity sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg== +jest-resolve-dependencies@^27.0.3: + version "27.0.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.3.tgz#7e258f7d0458bb910855f8a50f5c1e9d92c319dc" + integrity sha512-HdjWOvFAgT5CYChF2eiBN2rRKicjaTCCtA3EtH47REIdGzEHGUhYrWYgLahXsiOovvWN6edhcHL5WCa3gbc04A== dependencies: - "@jest/types" "^26.6.2" - jest-regex-util "^26.0.0" - jest-snapshot "^26.6.2" + "@jest/types" "^27.0.2" + jest-regex-util "^27.0.1" + jest-snapshot "^27.0.2" -jest-resolve@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.2.tgz#a3ab1517217f469b504f1b56603c5bb541fbb507" - integrity sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ== +jest-resolve@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.0.2.tgz#087a3ed17182722a3415f92bfacc99c49cf8a965" + integrity sha512-rmfLGyZhwAUR5z3EwPAW7LQTorWAuCYCcsQJoQxT2it+BOgX3zKxa67r1pfpK3ihy2k9TjYD3/lMp5rPm/CL1Q== dependencies: - "@jest/types" "^26.6.2" + "@jest/types" "^27.0.2" chalk "^4.0.0" + escalade "^3.1.1" graceful-fs "^4.2.4" jest-pnp-resolver "^1.2.2" - jest-util "^26.6.2" - read-pkg-up "^7.0.1" - resolve "^1.18.1" + jest-util "^27.0.2" + jest-validate "^27.0.2" + resolve "^1.20.0" slash "^3.0.0" -jest-runner@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.3.tgz#2d1fed3d46e10f233fd1dbd3bfaa3fe8924be159" - integrity sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ== +jest-runner@^27.0.3: + version "27.0.3" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.3.tgz#d9747af3bee5a6ffaeb9e10b653263b780258b54" + integrity sha512-zH23uIIh1ro1JCD7XX1bQ0bQwXEsBzLX2UJVE/AVLsk4YJRmTfyXIzzRzBWRdnMHHg1NWkJ4fGs7eFP15IqZpQ== dependencies: - "@jest/console" "^26.6.2" - "@jest/environment" "^26.6.2" - "@jest/test-result" "^26.6.2" - "@jest/types" "^26.6.2" + "@jest/console" "^27.0.2" + "@jest/environment" "^27.0.3" + "@jest/test-result" "^27.0.2" + "@jest/transform" "^27.0.2" + "@jest/types" "^27.0.2" "@types/node" "*" chalk "^4.0.0" - emittery "^0.7.1" + emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-config "^26.6.3" - jest-docblock "^26.0.0" - jest-haste-map "^26.6.2" - jest-leak-detector "^26.6.2" - jest-message-util "^26.6.2" - jest-resolve "^26.6.2" - jest-runtime "^26.6.3" - jest-util "^26.6.2" - jest-worker "^26.6.2" + jest-docblock "^27.0.1" + jest-haste-map "^27.0.2" + jest-leak-detector "^27.0.2" + jest-message-util "^27.0.2" + jest-resolve "^27.0.2" + jest-runtime "^27.0.3" + jest-util "^27.0.2" + jest-worker "^27.0.2" source-map-support "^0.5.6" - throat "^5.0.0" - -jest-runtime@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.3.tgz#4f64efbcfac398331b74b4b3c82d27d401b8fa2b" - integrity sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw== - dependencies: - "@jest/console" "^26.6.2" - "@jest/environment" "^26.6.2" - "@jest/fake-timers" "^26.6.2" - "@jest/globals" "^26.6.2" - "@jest/source-map" "^26.6.2" - "@jest/test-result" "^26.6.2" - "@jest/transform" "^26.6.2" - "@jest/types" "^26.6.2" - "@types/yargs" "^15.0.0" + throat "^6.0.1" + +jest-runtime@^27.0.3: + version "27.0.3" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.3.tgz#32499c1047e5d953cfbb67fe790ab0167a614d28" + integrity sha512-k1Hl2pWWHBkSXdCggX2lyLRuDnnnmMlnJd+DPLb8LmmAeHW87WgGC6TplD377VxY3KQu73sklkhGUIdwFgsRVQ== + dependencies: + "@jest/console" "^27.0.2" + "@jest/environment" "^27.0.3" + "@jest/fake-timers" "^27.0.3" + "@jest/globals" "^27.0.3" + "@jest/source-map" "^27.0.1" + "@jest/test-result" "^27.0.2" + "@jest/transform" "^27.0.2" + "@jest/types" "^27.0.2" + "@types/yargs" "^16.0.0" chalk "^4.0.0" - cjs-module-lexer "^0.6.0" + cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-config "^26.6.3" - jest-haste-map "^26.6.2" - jest-message-util "^26.6.2" - jest-mock "^26.6.2" - jest-regex-util "^26.0.0" - jest-resolve "^26.6.2" - jest-snapshot "^26.6.2" - jest-util "^26.6.2" - jest-validate "^26.6.2" + jest-haste-map "^27.0.2" + jest-message-util "^27.0.2" + jest-mock "^27.0.3" + jest-regex-util "^27.0.1" + jest-resolve "^27.0.2" + jest-snapshot "^27.0.2" + jest-util "^27.0.2" + jest-validate "^27.0.2" slash "^3.0.0" strip-bom "^4.0.0" - yargs "^15.4.1" + yargs "^16.0.3" -jest-serializer@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.6.2.tgz#d139aafd46957d3a448f3a6cdabe2919ba0742d1" - integrity sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g== +jest-serializer@^27.0.1: + version "27.0.1" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.0.1.tgz#2464d04dcc33fb71dc80b7c82e3c5e8a08cb1020" + integrity sha512-svy//5IH6bfQvAbkAEg1s7xhhgHTtXu0li0I2fdKHDsLP2P2MOiscPQIENQep8oU2g2B3jqLyxKKzotZOz4CwQ== dependencies: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^26.3.0, jest-snapshot@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.2.tgz#f3b0af1acb223316850bd14e1beea9837fb39c84" - integrity sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og== +jest-snapshot@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.2.tgz#40c48dc6afd3cbc5d3d07c061f20fc10d94ca0cd" + integrity sha512-4RcgvZbPrrbEE/hT6XQ4hr+NVVLNrmsgUnYSnZRT6UAvW9Q2yzGMS+tfJh+xlQJAapnnkNJzsMn6vUa+yfiVHA== dependencies: + "@babel/core" "^7.7.2" + "@babel/generator" "^7.7.2" + "@babel/parser" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/traverse" "^7.7.2" "@babel/types" "^7.0.0" - "@jest/types" "^26.6.2" + "@jest/transform" "^27.0.2" + "@jest/types" "^27.0.2" "@types/babel__traverse" "^7.0.4" - "@types/prettier" "^2.0.0" + "@types/prettier" "^2.1.5" + babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^26.6.2" + expect "^27.0.2" graceful-fs "^4.2.4" - jest-diff "^26.6.2" - jest-get-type "^26.3.0" - jest-haste-map "^26.6.2" - jest-matcher-utils "^26.6.2" - jest-message-util "^26.6.2" - jest-resolve "^26.6.2" + jest-diff "^27.0.2" + jest-get-type "^27.0.1" + jest-haste-map "^27.0.2" + jest-matcher-utils "^27.0.2" + jest-message-util "^27.0.2" + jest-resolve "^27.0.2" + jest-util "^27.0.2" natural-compare "^1.4.0" - pretty-format "^26.6.2" + pretty-format "^27.0.2" semver "^7.3.2" -jest-specific-snapshot@*, jest-specific-snapshot@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jest-specific-snapshot/-/jest-specific-snapshot-4.0.0.tgz#a52a2e223e7576e610dbeaf341207c557ac20554" - integrity sha512-YdW5P/MVwOizWR0MJwURxdrjdXvdG2MMpXKVGr7dZ2YrBmE6E6Ab74UL3DOYmGmzaCnNAW1CL02pY5MTHE3ulQ== +jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/jest-specific-snapshot/-/jest-specific-snapshot-5.0.0.tgz#48f72d5613af7f3e30df75b6b3534db6bab32ea0" + integrity sha512-V65vuPxZQExD3tGbv+Du5tbG1E3H3Dq/HFbsCEkPJP27w5vr/nATQJl61Dx5doBfu54OrJak0JaeYVSeZubDKg== dependencies: - jest-snapshot "^26.3.0" + jest-snapshot "^27.0.2" -jest-util@^26.1.0, jest-util@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" - integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== +jest-util@^27.0.0, jest-util@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.0.2.tgz#fc2c7ace3c75ae561cf1e5fdb643bf685a5be7c7" + integrity sha512-1d9uH3a00OFGGWSibpNYr+jojZ6AckOMCXV2Z4K3YXDnzpkAaXQyIpY14FOJPiUmil7CD+A6Qs+lnnh6ctRbIA== dependencies: - "@jest/types" "^26.6.2" + "@jest/types" "^27.0.2" "@types/node" "*" chalk "^4.0.0" graceful-fs "^4.2.4" - is-ci "^2.0.0" - micromatch "^4.0.2" + is-ci "^3.0.0" + picomatch "^2.2.3" -jest-validate@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.2.tgz#23d380971587150467342911c3d7b4ac57ab20ec" - integrity sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ== +jest-validate@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.0.2.tgz#7fe2c100089449cd5cbb47a5b0b6cb7cda5beee5" + integrity sha512-UgBF6/oVu1ofd1XbaSotXKihi8nZhg0Prm8twQ9uCuAfo59vlxCXMPI/RKmrZEVgi3Nd9dS0I8A0wzWU48pOvg== dependencies: - "@jest/types" "^26.6.2" - camelcase "^6.0.0" + "@jest/types" "^27.0.2" + camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^26.3.0" + jest-get-type "^27.0.1" leven "^3.1.0" - pretty-format "^26.6.2" + pretty-format "^27.0.2" -jest-watcher@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.2.tgz#a5b683b8f9d68dbcb1d7dae32172d2cca0592975" - integrity sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ== +jest-watcher@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.0.2.tgz#dab5f9443e2d7f52597186480731a8c6335c5deb" + integrity sha512-8nuf0PGuTxWj/Ytfw5fyvNn/R80iXY8QhIT0ofyImUvdnoaBdT6kob0GmhXR+wO+ALYVnh8bQxN4Tjfez0JgkA== dependencies: - "@jest/test-result" "^26.6.2" - "@jest/types" "^26.6.2" + "@jest/test-result" "^27.0.2" + "@jest/types" "^27.0.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^26.6.2" + jest-util "^27.0.2" string-length "^4.0.1" -jest-worker@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" - integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== +jest-worker@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.2.tgz#4ebeb56cef48b3e7514552f80d0d80c0129f0b05" + integrity sha512-EoBdilOTTyOgmHXtw/cPc+ZrCA0KJMrkXzkrPGNwLmnvvlN1nj7MPrxpT7m+otSv2e1TLaVffzDnE/LB14zJMg== dependencies: "@types/node" "*" merge-stream "^2.0.0" - supports-color "^7.0.0" + supports-color "^8.0.0" -jest@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.3.tgz#40e8fdbe48f00dfa1f0ce8121ca74b88ac9148ef" - integrity sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q== +jest@^27.0.3: + version "27.0.3" + resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.3.tgz#0b4ac738c93612f778d58250aee026220487e5a4" + integrity sha512-0G9+QqXFIZWgf5rs3yllpaA+13ZawVHfyuhuCV1EnoFbX++rVMRrYWCAnk+dfhwyv9/VTQvn+XG969u8aPRsBg== dependencies: - "@jest/core" "^26.6.3" + "@jest/core" "^27.0.3" import-local "^3.0.2" - jest-cli "^26.6.3" + jest-cli "^27.0.3" jju@~1.4.0: version "1.4.0" @@ -5815,36 +5884,37 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsdom@^16.4.0: - version "16.4.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.4.0.tgz#36005bde2d136f73eee1a830c6d45e55408edddb" - integrity sha512-lYMm3wYdgPhrl7pDcRmvzPhhrGVBeVhPIqeHjzeiHN3DFmD1RBpbExbi8vU7BJdH8VAZYovR8DMt0PNNDM7k8w== +jsdom@^16.6.0: + version "16.6.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.6.0.tgz#f79b3786682065492a3da6a60a4695da983805ac" + integrity sha512-Ty1vmF4NHJkolaEmdjtxTfSfkdb8Ywarwf63f+F8/mDD1uLSSWDxDuMiZxiPhwunLrn9LOSVItWj4bLYsLN3Dg== dependencies: - abab "^2.0.3" - acorn "^7.1.1" + abab "^2.0.5" + acorn "^8.2.4" acorn-globals "^6.0.0" cssom "^0.4.4" - cssstyle "^2.2.0" + cssstyle "^2.3.0" data-urls "^2.0.0" - decimal.js "^10.2.0" + decimal.js "^10.2.1" domexception "^2.0.1" - escodegen "^1.14.1" + escodegen "^2.0.0" + form-data "^3.0.0" html-encoding-sniffer "^2.0.1" - is-potential-custom-element-name "^1.0.0" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-potential-custom-element-name "^1.0.1" nwsapi "^2.2.0" - parse5 "5.1.1" - request "^2.88.2" - request-promise-native "^1.0.8" - saxes "^5.0.0" + parse5 "6.0.1" + saxes "^5.0.1" symbol-tree "^3.2.4" - tough-cookie "^3.0.1" + tough-cookie "^4.0.0" w3c-hr-time "^1.0.2" w3c-xmlserializer "^2.0.0" webidl-conversions "^6.1.0" whatwg-encoding "^1.0.5" whatwg-mimetype "^2.3.0" - whatwg-url "^8.0.0" - ws "^7.2.3" + whatwg-url "^8.5.0" + ws "^7.4.5" xml-name-validator "^3.0.0" jsesc@^2.5.1: @@ -6079,16 +6149,6 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -load-json-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" - integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - strip-bom "^3.0.0" - load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -6180,6 +6240,11 @@ lodash.map@^4.5.1: resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM= +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + lodash.set@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" @@ -6205,12 +6270,17 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "^3.0.0" +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@4.x, lodash@^4.11.2, lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.2.1, lodash@~4.17.15: +lodash@4.x, lodash@^4.11.2, lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.2.1, lodash@^4.7.0, lodash@~4.17.15: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -6386,10 +6456,10 @@ markdownlint@~0.23.1: dependencies: markdown-it "12.0.4" -marked@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.5.tgz#2d15c759b9497b0e7b5b57f4c2edabe1002ef9e7" - integrity sha512-yfCEUXmKhBPLOzEC7c+tc4XZdIeTdGoRCZakFMkCxodr7wDXqoapIME4wjcpBPJLNyUnKJ3e8rb8wlAgnLnaDw== +marked@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.6.tgz#c3ab1403b9b70f26acd92590fc272eb1718e778c" + integrity sha512-S2mYj0FzTQa0dLddssqwRVW4EOJOVJ355Xm2Vcbm+LU7GQRGWvwbO5K87OaPSOux2AwTSgtPPaXmc8sDPrhn2A== mdurl@^1.0.1: version "1.0.1" @@ -6459,7 +6529,7 @@ merge@^1.2.1: resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== -micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.0.4, micromatch@^3.1.10: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -6537,7 +6607,7 @@ minimist-options@^3.0.1: arrify "^1.0.1" is-plain-obj "^1.1.0" -minimist@1.2.5, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.5: +minimist@1.2.5, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -6729,18 +6799,6 @@ node-modules-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= -node-notifier@^8.0.0: - version "8.0.1" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.1.tgz#f86e89bbc925f2b068784b31f382afdc6ca56be1" - integrity sha512-BvEXF+UmsnAfYfoapKM9nGxnP+Wn7P91YfXmrKnfcYCx6VBeoN5Ez5Ogck6I8Bi5k4RlpqRYaw75pAwzX9OphA== - dependencies: - growly "^1.3.0" - is-wsl "^2.2.0" - semver "^7.3.2" - shellwords "^0.1.1" - uuid "^8.3.0" - which "^2.0.2" - node-releases@^1.1.71: version "1.1.72" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.72.tgz#14802ab6b1039a79a0c7d662b610a5bbd76eacbe" @@ -6764,13 +6822,6 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package- semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - normalize-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -6842,7 +6893,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npm-run-path@^4.0.0, npm-run-path@^4.0.1: +npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== @@ -6888,12 +6939,12 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" - integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== +object-inspect@^1.10.3: + version "1.10.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" + integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: +object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== @@ -6905,15 +6956,15 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== +object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" object.getownpropertydescriptors@^2.0.3: version "2.1.0" @@ -6930,15 +6981,14 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" - integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== +object.values@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.4.tgz#0d273762833e816b693a637d30073e7051535b30" + integrity sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg== dependencies: + call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - function-bind "^1.1.1" - has "^1.0.3" + es-abstract "^1.18.2" octokit-pagination-methods@^1.1.0: version "1.1.0" @@ -7197,10 +7247,10 @@ parse-url@^5.0.0: parse-path "^4.0.0" protocols "^1.4.0" -parse5@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" - integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== +parse5@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== pascalcase@^0.1.1: version "0.1.1" @@ -7258,13 +7308,6 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= - dependencies: - pify "^2.0.0" - path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -7287,12 +7330,7 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - -picomatch@^2.2.3: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.3.tgz#465547f359ccc206d3c48e46a1bcb89bf7ee619d" integrity sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg== @@ -7357,6 +7395,13 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" + integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= + dependencies: + find-up "^2.1.0" + please-upgrade-node@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" @@ -7379,19 +7424,19 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prettier@*, prettier@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" - integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== +prettier@*, prettier@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" + integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w== -pretty-format@^26.0.0, pretty-format@^26.4.2, pretty-format@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" - integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg== +pretty-format@*, pretty-format@^26.0.0, pretty-format@^27.0.0, pretty-format@^27.0.2: + version "27.0.2" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.2.tgz#9283ff8c4f581b186b2d4da461617143dca478a4" + integrity sha512-mXKbbBPnYTG7Yra9qFBtqj+IXcsvxsvOBco3QHxtxTl+hHKq6QdzMZ+q0CtL4ORHZgwGImRr2XZUX2EWzORxig== dependencies: - "@jest/types" "^26.6.2" + "@jest/types" "^27.0.2" ansi-regex "^5.0.0" - ansi-styles "^4.0.0" + ansi-styles "^5.0.0" react-is "^17.0.1" process-nextick-args@~2.0.0: @@ -7449,7 +7494,7 @@ protoduck@^5.0.1: dependencies: genfun "^5.0.0" -psl@^1.1.28: +psl@^1.1.28, psl@^1.1.33: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== @@ -7553,14 +7598,6 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" -read-pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" - integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= - dependencies: - find-up "^2.0.0" - read-pkg "^2.0.0" - read-pkg-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" @@ -7587,15 +7624,6 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -read-pkg@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" - integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= - dependencies: - load-json-file "^2.0.0" - normalize-package-data "^2.3.2" - path-type "^2.0.0" - read-pkg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" @@ -7698,16 +7726,11 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpp@^3.0.0, regexpp@^3.1.0: +regexpp@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - repeat-element@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" @@ -7725,23 +7748,7 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request-promise-core@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" - integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== - dependencies: - lodash "^4.17.19" - -request-promise-native@^1.0.8: - version "1.0.9" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" - integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== - dependencies: - request-promise-core "1.1.4" - stealthy-require "^1.1.1" - tough-cookie "^2.3.3" - -request@^2.88.0, request@^2.88.2: +request@^2.88.0: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -7838,12 +7845,12 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.3.2, resolve@~1.19.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" - integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.20.0, resolve@^1.3.2: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== dependencies: - is-core-module "^2.1.0" + is-core-module "^2.2.0" path-parse "^1.0.6" resolve@~1.17.0: @@ -7853,6 +7860,14 @@ resolve@~1.17.0: dependencies: path-parse "^1.0.6" +resolve@~1.19.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== + dependencies: + is-core-module "^2.1.0" + path-parse "^1.0.6" + restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -7898,11 +7913,6 @@ rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: dependencies: glob "^7.1.3" -rsvp@^4.8.4: - version "4.8.5" - resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" - integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== - run-async@^2.2.0, run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" @@ -7920,14 +7930,7 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@^6.4.0, rxjs@^6.6.0: - version "6.6.3" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" - integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== - dependencies: - tslib "^1.9.0" - -rxjs@^6.6.7: +rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.7: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== @@ -7956,22 +7959,7 @@ safe-regex@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sane@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/sane/-/sane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded" - integrity sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA== - dependencies: - "@cnakazawa/watch" "^1.0.3" - anymatch "^2.0.0" - capture-exit "^2.0.0" - exec-sh "^0.3.2" - execa "^1.0.0" - fb-watchman "^2.0.0" - micromatch "^3.1.4" - minimist "^1.1.1" - walker "~1.0.5" - -saxes@^5.0.0: +saxes@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== @@ -7988,7 +7976,7 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.3.5, semver@7.x, semver@^7.2.1, semver@^7.3.2, semver@~7.3.0: +semver@7.3.5, semver@7.x, semver@^7.2.1, semver@^7.3.2, semver@^7.3.5, semver@~7.3.0: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -8055,11 +8043,6 @@ shelljs@^0.8.3: interpret "^1.0.0" rechoir "^0.6.2" -shellwords@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" - integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== - signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" @@ -8274,10 +8257,10 @@ ssri@^6.0.0, ssri@^6.0.1: dependencies: figgy-pudding "^3.5.1" -stack-utils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.2.tgz#5cf48b4557becb4638d0bc4f21d23f5d19586593" - integrity sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg== +stack-utils@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277" + integrity sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw== dependencies: escape-string-regexp "^2.0.0" @@ -8289,11 +8272,6 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -stealthy-require@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= - stream-each@^1.1.0: version "1.2.3" resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" @@ -8355,21 +8333,21 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" -string.prototype.trimend@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" - integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== +string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== dependencies: + call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.17.5" -string.prototype.trimstart@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" - integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== +string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== dependencies: + call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.17.5" string_decoder@^1.1.1: version "1.3.0" @@ -8506,6 +8484,13 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-hyperlinks@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz#f663df252af5f37c5d49bbd7eeefa9e0b9e59e47" @@ -8519,15 +8504,17 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -table@^6.0.4: - version "6.0.7" - resolved "https://registry.yarnpkg.com/table/-/table-6.0.7.tgz#e45897ffbcc1bcf9e8a87bf420f2c9e5a7a52a34" - integrity sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g== +table@^6.0.9: + version "6.7.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" + integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== dependencies: - ajv "^7.0.2" - lodash "^4.17.20" + ajv "^8.0.1" + lodash.clonedeep "^4.5.0" + lodash.truncate "^4.4.2" slice-ansi "^4.0.0" string-width "^4.2.0" + strip-ansi "^6.0.0" tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.13" @@ -8600,10 +8587,10 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" -throat@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" - integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== +throat@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375" + integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== through2@^2.0.0, through2@^2.0.2: version "2.0.5" @@ -8687,20 +8674,20 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -tough-cookie@^2.3.3, tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== +tough-cookie@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" + integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== dependencies: - psl "^1.1.28" + psl "^1.1.33" punycode "^2.1.1" + universalify "^0.1.2" -tough-cookie@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-3.0.1.tgz#9df4f57e739c26930a018184887f4adb7dca73b2" - integrity sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg== +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== dependencies: - ip-regex "^2.1.0" psl "^1.1.28" punycode "^2.1.1" @@ -8738,15 +8725,15 @@ trim-off-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= -ts-jest@^26.5.1: - version "26.5.6" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.6.tgz#c32e0746425274e1dfe333f43cd3c800e014ec35" - integrity sha512-rua+rCP8DxpA8b4DQD/6X2HQS8Zy/xzViVYfEs2OQu68tkCuKLV0Md8pmX55+W24uRIyAsf/BajRfxOs+R2MKA== +ts-jest@^27.0.1: + version "27.0.1" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.1.tgz#3cd174561c4bb311e0187a5837543fb858c60d16" + integrity sha512-03qAt77QjhxyM5Bt2KrrT1WbdumiwLz989sD3IUznSp3GIFQrx76kQqSMLF7ynnxrF3/1ipzABnHxMlU8PD4Vw== dependencies: bs-logger "0.x" buffer-from "1.x" fast-json-stable-stringify "2.x" - jest-util "^26.1.0" + jest-util "^27.0.0" json5 "2.x" lodash "4.x" make-error "1.x" @@ -8811,7 +8798,7 @@ tsutils@^2.29.0: dependencies: tslib "^1.8.1" -tsutils@^3.17.1: +tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== @@ -8859,6 +8846,11 @@ type-fest@^0.13.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + type-fest@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" @@ -8911,6 +8903,16 @@ umask@^1.1.0: resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0= +unbox-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.1" + has-symbols "^1.0.2" + which-boxed-primitive "^1.0.2" + union-value@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -8954,7 +8956,7 @@ universal-user-agent@^6.0.0: resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== -universalify@^0.1.0: +universalify@^0.1.0, universalify@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== @@ -9016,11 +9018,6 @@ uuid@^3.0.1, uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.3.0: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - v8-compile-cache@^2.0.3: version "2.2.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz#9471efa3ef9128d2f7c6a7ca39c4dd6b5055b132" @@ -9083,7 +9080,7 @@ w3c-xmlserializer@^2.0.0: dependencies: xml-name-validator "^3.0.0" -walker@^1.0.7, walker@~1.0.5: +walker@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= @@ -9133,15 +9130,26 @@ whatwg-url@^7.0.0: tr46 "^1.0.1" webidl-conversions "^4.0.2" -whatwg-url@^8.0.0: - version "8.4.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.4.0.tgz#50fb9615b05469591d2b2bd6dfaed2942ed72837" - integrity sha512-vwTUFf6V4zhcPkWp/4CQPr1TW9Ml6SF4lVyaIMBdJw5i6qUUJ1QWM4Z6YYVkfka0OUIzVo/0aNtGVGk256IKWw== +whatwg-url@^8.0.0, whatwg-url@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.5.0.tgz#7752b8464fc0903fec89aa9846fc9efe07351fd3" + integrity sha512-fy+R77xWv0AiqfLl4nuGUlQ3/6b5uNfQ4WAbGQVMYshCTCCPK9psC1nWh3XHuxGVCtlcDDQPQW1csmmIQo+fwg== dependencies: - lodash.sortby "^4.7.0" + lodash "^4.7.0" tr46 "^2.0.2" webidl-conversions "^6.1.0" +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -9154,7 +9162,7 @@ which@^1.2.14, which@^1.2.9, which@^1.3.1: dependencies: isexe "^2.0.0" -which@^2.0.1, which@^2.0.2: +which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -9268,7 +9276,7 @@ write-pkg@^3.1.0: sort-keys "^2.0.0" write-json-file "^2.2.0" -ws@^7.2.3: +ws@^7.4.5: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== @@ -9356,7 +9364,7 @@ yargs@^14.2.2: y18n "^4.0.0" yargs-parser "^15.0.1" -yargs@^15.0.1, yargs@^15.4.1: +yargs@^15.0.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== @@ -9373,7 +9381,7 @@ yargs@^15.0.1, yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^16.2.0: +yargs@^16.0.3, yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== From b814e635c1f34139c89e0176727480935dd45cac Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 31 May 2021 17:03:06 +0000 Subject: [PATCH 168/473] chore: publish v4.26.0 --- CHANGELOG.md | 19 +++++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.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 | 17 +++++++++++++++++ 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 | 16 ++++++++++++++++ packages/scope-manager/package.json | 8 ++++---- packages/shared-fixtures/CHANGELOG.md | 8 ++++++++ packages/shared-fixtures/package.json | 2 +- packages/types/CHANGELOG.md | 11 +++++++++++ packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 11 +++++++++++ packages/typescript-estree/package.json | 8 ++++---- packages/visitor-keys/CHANGELOG.md | 8 ++++++++ packages/visitor-keys/package.json | 4 ++-- 24 files changed, 161 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0c4fe634766..be14a02b74f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) + + +### Bug Fixes + +* **eslint-plugin:** [no-type-alias] consider type imports as alias types ([#3433](https://github.com/typescript-eslint/typescript-eslint/issues/3433)) ([d4f0774](https://github.com/typescript-eslint/typescript-eslint/commit/d4f077473afb04f7c4d377dd87318749632b4404)) +* generate library types for TypeScript v4.3 ([#3460](https://github.com/typescript-eslint/typescript-eslint/issues/3460)) ([ed4776a](https://github.com/typescript-eslint/typescript-eslint/commit/ed4776afa1374279027b9b7d82aa4b453b334998)), closes [#3449](https://github.com/typescript-eslint/typescript-eslint/issues/3449) + + +### Features + +* **eslint-plugin:** [member-ordering] add callback as an ordering type of node ([#3354](https://github.com/typescript-eslint/typescript-eslint/issues/3354)) ([d134b1f](https://github.com/typescript-eslint/typescript-eslint/commit/d134b1fa2540dec7094728f3dec1bbb8c644fe58)) +* **eslint-plugin:** [space-infix-ops] Add support for Union and intersection of type declarations ([#3360](https://github.com/typescript-eslint/typescript-eslint/issues/3360)) ([3d29323](https://github.com/typescript-eslint/typescript-eslint/commit/3d2932390cc335ab2cf80ae7a7fad066fd2eb22b)) +* **scope-manager:** reduce generated lib file size ([#3468](https://github.com/typescript-eslint/typescript-eslint/issues/3468)) ([258116b](https://github.com/typescript-eslint/typescript-eslint/commit/258116ba7b0dd4ac7a1cc3876fab12f2556bda74)) + + + + + # [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) diff --git a/lerna.json b/lerna.json index 6fdc5b25fc44..78c7916f2406 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.25.0", + "version": "4.26.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 6c8d635044cc..4c75520dcd34 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + # [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 50efaf77ee1e..79c4b45c525c 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.25.0", + "version": "4.26.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 852742717c47..d0ea626917c6 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.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) **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 59217ed38844..3b4cd8b53c1b 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.25.0", + "version": "4.26.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.25.0", + "@typescript-eslint/experimental-utils": "4.26.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 29a2c1b3b16f..c1289a51a619 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.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) **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 726b5836cb7a..889ebde1b9b4 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.25.0", + "version": "4.26.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.25.0", + "@typescript-eslint/experimental-utils": "4.26.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.25.0" + "@typescript-eslint/parser": "4.26.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 142bada67a2d..ec188a44c7a3 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) + + +### Bug Fixes + +* **eslint-plugin:** [no-type-alias] consider type imports as alias types ([#3433](https://github.com/typescript-eslint/typescript-eslint/issues/3433)) ([d4f0774](https://github.com/typescript-eslint/typescript-eslint/commit/d4f077473afb04f7c4d377dd87318749632b4404)) + + +### Features + +* **eslint-plugin:** [member-ordering] add callback as an ordering type of node ([#3354](https://github.com/typescript-eslint/typescript-eslint/issues/3354)) ([d134b1f](https://github.com/typescript-eslint/typescript-eslint/commit/d134b1fa2540dec7094728f3dec1bbb8c644fe58)) +* **eslint-plugin:** [space-infix-ops] Add support for Union and intersection of type declarations ([#3360](https://github.com/typescript-eslint/typescript-eslint/issues/3360)) ([3d29323](https://github.com/typescript-eslint/typescript-eslint/commit/3d2932390cc335ab2cf80ae7a7fad066fd2eb22b)) + + + + + # [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 754d6efec15e..4037e73b7e04 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.25.0", + "version": "4.26.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.25.0", - "@typescript-eslint/scope-manager": "4.25.0", + "@typescript-eslint/experimental-utils": "4.26.0", + "@typescript-eslint/scope-manager": "4.26.0", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.21", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 143ae2454360..541e3a78879a 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.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + # [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 7649dc27d7c5..67c30299380b 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.25.0", + "version": "4.26.0", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.25.0", - "@typescript-eslint/types": "4.25.0", - "@typescript-eslint/typescript-estree": "4.25.0", + "@typescript-eslint/scope-manager": "4.26.0", + "@typescript-eslint/types": "4.26.0", + "@typescript-eslint/typescript-estree": "4.26.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index a32e649bbdd4..8d8892572251 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.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index ea7e7c53b839..6ead2ad64141 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.25.0", + "version": "4.26.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.25.0", - "@typescript-eslint/types": "4.25.0", - "@typescript-eslint/typescript-estree": "4.25.0", + "@typescript-eslint/scope-manager": "4.26.0", + "@typescript-eslint/types": "4.26.0", + "@typescript-eslint/typescript-estree": "4.26.0", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.25.0", + "@typescript-eslint/experimental-utils": "4.26.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index a74fa227e275..e7a671269aed 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/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.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) + + +### Bug Fixes + +* generate library types for TypeScript v4.3 ([#3460](https://github.com/typescript-eslint/typescript-eslint/issues/3460)) ([ed4776a](https://github.com/typescript-eslint/typescript-eslint/commit/ed4776afa1374279027b9b7d82aa4b453b334998)), closes [#3449](https://github.com/typescript-eslint/typescript-eslint/issues/3449) + + +### Features + +* **scope-manager:** reduce generated lib file size ([#3468](https://github.com/typescript-eslint/typescript-eslint/issues/3468)) ([258116b](https://github.com/typescript-eslint/typescript-eslint/commit/258116ba7b0dd4ac7a1cc3876fab12f2556bda74)) + + + + + # [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) **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 a6ab55c7dffc..df8278c3aae8 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.25.0", + "version": "4.26.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.25.0", - "@typescript-eslint/visitor-keys": "4.25.0" + "@typescript-eslint/types": "4.26.0", + "@typescript-eslint/visitor-keys": "4.26.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.25.0", + "@typescript-eslint/typescript-estree": "4.26.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index e6620a31e1c8..63b0edc2015e 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.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) diff --git a/packages/shared-fixtures/package.json b/packages/shared-fixtures/package.json index 64e0df1db659..3db082050a13 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.25.0", + "version": "4.26.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index c3c5d08ebddd..ccfe38368535 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) + + +### Bug Fixes + +* generate library types for TypeScript v4.3 ([#3460](https://github.com/typescript-eslint/typescript-eslint/issues/3460)) ([ed4776a](https://github.com/typescript-eslint/typescript-eslint/commit/ed4776afa1374279027b9b7d82aa4b453b334998)), closes [#3449](https://github.com/typescript-eslint/typescript-eslint/issues/3449) + + + + + # [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 5b779a11da47..7024d906f318 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.25.0", + "version": "4.26.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 51ece42c1cc9..67b5be54903f 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) + + +### Bug Fixes + +* generate library types for TypeScript v4.3 ([#3460](https://github.com/typescript-eslint/typescript-eslint/issues/3460)) ([ed4776a](https://github.com/typescript-eslint/typescript-eslint/commit/ed4776afa1374279027b9b7d82aa4b453b334998)), closes [#3449](https://github.com/typescript-eslint/typescript-eslint/issues/3449) + + + + + # [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 318e46472412..377fee66555b 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.25.0", + "version": "4.26.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.25.0", - "@typescript-eslint/visitor-keys": "4.25.0", + "@typescript-eslint/types": "4.26.0", + "@typescript-eslint/visitor-keys": "4.26.0", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.25.0", + "@typescript-eslint/shared-fixtures": "4.26.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index b30f830dc89b..efa21c5364be 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.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.25.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.24.0...v4.25.0) (2021-05-24) **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 a6fef5057331..cbfa88c67eb6 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.25.0", + "version": "4.26.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.25.0", + "@typescript-eslint/types": "4.26.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From fc5f171b1ade2b45a1a4268b6d22926d420282a6 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Tue, 1 Jun 2021 15:33:09 -0700 Subject: [PATCH 169/473] fix(eslint-plugin): fix doc url generation (#3475) Fixes #3473 --- packages/eslint-plugin/src/util/createRule.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/src/util/createRule.ts b/packages/eslint-plugin/src/util/createRule.ts index d6684de5d0d0..d56fe6d2a7d7 100644 --- a/packages/eslint-plugin/src/util/createRule.ts +++ b/packages/eslint-plugin/src/util/createRule.ts @@ -2,7 +2,7 @@ import { ESLintUtils } from '@typescript-eslint/experimental-utils'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -const version: string = require('../../package.json'); +const version: string = require('../../package.json').version; export const createRule = ESLintUtils.RuleCreator( name => From d596985387bd8c6bfaa109e68a02ecaf3b20a657 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Jun 2021 12:04:26 -0700 Subject: [PATCH 170/473] chore: bump ts-jest from 27.0.1 to 27.0.2 (#3469) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 27.0.1 to 27.0.2. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v27.0.1...v27.0.2) 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 fde7283b0603..f6cf41a28f74 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8726,9 +8726,9 @@ trim-off-newlines@^1.0.0: integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= ts-jest@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.1.tgz#3cd174561c4bb311e0187a5837543fb858c60d16" - integrity sha512-03qAt77QjhxyM5Bt2KrrT1WbdumiwLz989sD3IUznSp3GIFQrx76kQqSMLF7ynnxrF3/1ipzABnHxMlU8PD4Vw== + version "27.0.2" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.2.tgz#acc1525d5fd25c107c777c3b80a11365db579aa1" + integrity sha512-pozjHOOfm+sbv9kXCvTFVyDntWvuJztzkNFql/akD75hSMZ2jsbidVauOhBRImAopXohqcLtPK/NTTIS8Y49Ug== dependencies: bs-logger "0.x" buffer-from "1.x" From bf0cddbe5291bbc03e2d79aa680f93680222b67f Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 6 Jun 2021 15:45:11 -0400 Subject: [PATCH 171/473] fix(eslint-plugin): [prefer-includes] ignore option chaining before indexOfs (#3432) --- .../docs/rules/prefer-includes.md | 2 + .../src/rules/prefer-includes.ts | 113 ++++---- .../tests/rules/prefer-includes.test.ts | 253 ++++++++++-------- 3 files changed, 200 insertions(+), 168 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/prefer-includes.md b/packages/eslint-plugin/docs/rules/prefer-includes.md index 07cc9ea44e12..018780a657d2 100644 --- a/packages/eslint-plugin/docs/rules/prefer-includes.md +++ b/packages/eslint-plugin/docs/rules/prefer-includes.md @@ -22,6 +22,7 @@ let str: string; let array: any[]; let readonlyArray: ReadonlyArray; let typedArray: UInt8Array; +let maybe: string; let userDefined: { indexOf(x: any): number; includes(x: any): boolean; @@ -31,6 +32,7 @@ str.indexOf(value) !== -1; array.indexOf(value) !== -1; readonlyArray.indexOf(value) === -1; typedArray.indexOf(value) > -1; +maybe?.indexOf('') !== -1; userDefined.indexOf(value) >= 0; // simple RegExp test diff --git a/packages/eslint-plugin/src/rules/prefer-includes.ts b/packages/eslint-plugin/src/rules/prefer-includes.ts index d21b088d4aa2..13a6021c8069 100644 --- a/packages/eslint-plugin/src/rules/prefer-includes.ts +++ b/packages/eslint-plugin/src/rules/prefer-includes.ts @@ -1,5 +1,6 @@ import { AST_NODE_TYPES, + TSESLint, TSESTree, } from '@typescript-eslint/experimental-utils'; import { AST as RegExpAST, parseRegExpLiteral } from 'regexpp'; @@ -125,67 +126,81 @@ export default createRule({ ); } - return { - [[ - // a.indexOf(b) !== 1 - "BinaryExpression > CallExpression.left > MemberExpression.callee[property.name='indexOf'][computed=false]", - // a?.indexOf(b) !== 1 - "BinaryExpression > ChainExpression.left > CallExpression > MemberExpression.callee[property.name='indexOf'][computed=false]", - ].join(', ')](node: TSESTree.MemberExpression): void { - // Check if the comparison is equivalent to `includes()`. - const callNode = node.parent as TSESTree.CallExpression; - const compareNode = ( - callNode.parent?.type === AST_NODE_TYPES.ChainExpression - ? callNode.parent.parent - : callNode.parent - ) as TSESTree.BinaryExpression; - const negative = isNegativeCheck(compareNode); - if (!negative && !isPositiveCheck(compareNode)) { - return; - } + function checkArrayIndexOf( + node: TSESTree.MemberExpression, + allowFixing: boolean, + ): void { + // Check if the comparison is equivalent to `includes()`. + const callNode = node.parent as TSESTree.CallExpression; + const compareNode = ( + callNode.parent?.type === AST_NODE_TYPES.ChainExpression + ? callNode.parent.parent + : callNode.parent + ) as TSESTree.BinaryExpression; + const negative = isNegativeCheck(compareNode); + if (!negative && !isPositiveCheck(compareNode)) { + return; + } - // Get the symbol of `indexOf` method. - const tsNode = services.esTreeNodeToTSNodeMap.get(node.property); - const indexofMethodDeclarations = types - .getSymbolAtLocation(tsNode) + // Get the symbol of `indexOf` method. + const tsNode = services.esTreeNodeToTSNodeMap.get(node.property); + const indexofMethodDeclarations = types + .getSymbolAtLocation(tsNode) + ?.getDeclarations(); + if ( + indexofMethodDeclarations == null || + indexofMethodDeclarations.length === 0 + ) { + return; + } + + // Check if every declaration of `indexOf` method has `includes` method + // and the two methods have the same parameters. + for (const instanceofMethodDecl of indexofMethodDeclarations) { + const typeDecl = instanceofMethodDecl.parent; + const type = types.getTypeAtLocation(typeDecl); + const includesMethodDecl = type + .getProperty('includes') ?.getDeclarations(); if ( - indexofMethodDeclarations == null || - indexofMethodDeclarations.length === 0 + includesMethodDecl == null || + !includesMethodDecl.some(includesMethodDecl => + hasSameParameters(includesMethodDecl, instanceofMethodDecl), + ) ) { return; } + } - // Check if every declaration of `indexOf` method has `includes` method - // and the two methods have the same parameters. - for (const instanceofMethodDecl of indexofMethodDeclarations) { - const typeDecl = instanceofMethodDecl.parent; - const type = types.getTypeAtLocation(typeDecl); - const includesMethodDecl = type - .getProperty('includes') - ?.getDeclarations(); - if ( - includesMethodDecl == null || - !includesMethodDecl.some(includesMethodDecl => - hasSameParameters(includesMethodDecl, instanceofMethodDecl), - ) - ) { - return; - } - } - - // Report it. - context.report({ - node: compareNode, - messageId: 'preferIncludes', - *fix(fixer) { + // Report it. + context.report({ + node: compareNode, + messageId: 'preferIncludes', + ...(allowFixing && { + *fix(fixer): Generator { if (negative) { yield fixer.insertTextBefore(callNode, '!'); } yield fixer.replaceText(node.property, 'includes'); yield fixer.removeRange([callNode.range[1], compareNode.range[1]]); }, - }); + }), + }); + } + + return { + // a.indexOf(b) !== 1 + "BinaryExpression > CallExpression.left > MemberExpression.callee[property.name='indexOf'][computed=false]"( + node: TSESTree.MemberExpression, + ): void { + checkArrayIndexOf(node, /* allowFixing */ true); + }, + + // a?.indexOf(b) !== 1 + "BinaryExpression > ChainExpression.left > CallExpression > MemberExpression.callee[property.name='indexOf'][computed=false]"( + node: TSESTree.MemberExpression, + ): void { + checkArrayIndexOf(node, /* allowFixing */ false); }, // /bar/.test(foo) @@ -230,7 +245,7 @@ export default createRule({ } yield fixer.insertTextAfter( argNode, - `${node.optional ? '?.' : '.'}includes(${JSON.stringify(text)}`, + `${node.optional ? '?.' : '.'}includes('${text}'`, ); }, }); diff --git a/packages/eslint-plugin/tests/rules/prefer-includes.test.ts b/packages/eslint-plugin/tests/rules/prefer-includes.test.ts index c72488a49372..ceda607df494 100644 --- a/packages/eslint-plugin/tests/rules/prefer-includes.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-includes.test.ts @@ -1,6 +1,4 @@ -import { TSESLint } from '@typescript-eslint/experimental-utils'; import rule from '../../src/rules/prefer-includes'; -import * as util from '../../src/util'; import { RuleTester, getFixturesRootDir } from '../RuleTester'; const rootPath = getFixturesRootDir(); @@ -13,126 +11,101 @@ const ruleTester = new RuleTester({ }, }); -type MessageIds = util.InferMessageIdsTypeFromRule; - -type InvalidTestCase = TSESLint.InvalidTestCase; -type ValidTestCase = TSESLint.ValidTestCase | string; -function addOptional(cases: ValidTestCase[]): ValidTestCase[]; -function addOptional(cases: InvalidTestCase[]): InvalidTestCase[]; -function addOptional( - cases: (ValidTestCase | InvalidTestCase)[], -): (ValidTestCase | InvalidTestCase)[] { - return cases.reduce<(ValidTestCase | InvalidTestCase)[]>((acc, c) => { - acc.push(c); - if (typeof c === 'string') { - acc.push(c.replace('.', '?.')); - } else { - acc.push({ - ...c, - code: c.code.replace('.', '?.'), - output: 'output' in c ? c.output?.replace('.', '?.') : null, - }); - } - - return acc; - }, []); -} - ruleTester.run('prefer-includes', rule, { - valid: addOptional([ + valid: [ ` function f(a: string): void { - a.indexOf(b) + a.indexOf(b); } `, ` function f(a: string): void { - a.indexOf(b) + 0 + a.indexOf(b) + 0; } `, ` - function f(a: string | {value: string}): void { - a.indexOf(b) !== -1 + function f(a: string | { value: string }): void { + a.indexOf(b) !== -1; } `, ` type UserDefined = { - indexOf(x: any): number // don't have 'includes' - } + indexOf(x: any): number; // don't have 'includes' + }; function f(a: UserDefined): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, ` type UserDefined = { - indexOf(x: any, fromIndex?: number): number - includes(x: any): boolean // different parameters - } + indexOf(x: any, fromIndex?: number): number; + includes(x: any): boolean; // different parameters + }; function f(a: UserDefined): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, ` type UserDefined = { - indexOf(x: any, fromIndex?: number): number - includes(x: any, fromIndex: number): boolean // different parameters - } + indexOf(x: any, fromIndex?: number): number; + includes(x: any, fromIndex: number): boolean; // different parameters + }; function f(a: UserDefined): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, ` type UserDefined = { - indexOf(x: any, fromIndex?: number): number - includes: boolean // different type - } + indexOf(x: any, fromIndex?: number): number; + includes: boolean; // different type + }; function f(a: UserDefined): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, ` function f(a: string): void { - /bar/i.test(a) + /bar/i.test(a); } `, ` function f(a: string): void { - /ba[rz]/.test(a) + /ba[rz]/.test(a); } `, ` function f(a: string): void { - /foo|bar/.test(a) + /foo|bar/.test(a); } `, ` function f(a: string): void { - /bar/.test() + /bar/.test(); } `, ` function f(a: string): void { - something.test(a) + something.test(a); } `, ` - const pattern = new RegExp("bar") + const pattern = new RegExp('bar'); function f(a) { - return pattern.test(a) + return pattern.test(a); } `, - ]), - invalid: addOptional([ + ], + invalid: [ // positive { code: ` function f(a: string): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` function f(a: string): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -140,12 +113,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: string): void { - a.indexOf(b) != -1 + a.indexOf(b) != -1; } `, output: ` function f(a: string): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -153,12 +126,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: string): void { - a.indexOf(b) > -1 + a.indexOf(b) > -1; } `, output: ` function f(a: string): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -166,12 +139,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: string): void { - a.indexOf(b) >= 0 + a.indexOf(b) >= 0; } `, output: ` function f(a: string): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -181,12 +154,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: string): void { - a.indexOf(b) === -1 + a.indexOf(b) === -1; } `, output: ` function f(a: string): void { - !a.includes(b) + !a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -194,12 +167,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: string): void { - a.indexOf(b) == -1 + a.indexOf(b) == -1; } `, output: ` function f(a: string): void { - !a.includes(b) + !a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -207,12 +180,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: string): void { - a.indexOf(b) <= -1 + a.indexOf(b) <= -1; } `, output: ` function f(a: string): void { - !a.includes(b) + !a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -220,12 +193,28 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: string): void { - a.indexOf(b) < 0 + a.indexOf(b) < 0; } `, output: ` function f(a: string): void { - !a.includes(b) + !a.includes(b); + } + `, + errors: [{ messageId: 'preferIncludes' }], + }, + { + code: ` + function f(a?: string): void { + a?.indexOf(b) === -1; + } + `, + errors: [{ messageId: 'preferIncludes' }], + }, + { + code: ` + function f(a?: string): void { + a?.indexOf(b) !== -1; } `, errors: [{ messageId: 'preferIncludes' }], @@ -235,42 +224,42 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: string): void { - /bar/.test(a) + /bar/.test(a); } `, output: ` function f(a: string): void { - a.includes("bar") + a.includes('bar'); } `, errors: [{ messageId: 'preferStringIncludes' }], }, { code: ` - const pattern = new RegExp("bar") + const pattern = new RegExp('bar'); function f(a: string): void { - pattern.test(a) + pattern.test(a); } `, output: ` - const pattern = new RegExp("bar") + const pattern = new RegExp('bar'); function f(a: string): void { - a.includes("bar") + a.includes('bar'); } `, errors: [{ messageId: 'preferStringIncludes' }], }, { code: ` - const pattern = /bar/ + const pattern = /bar/; function f(a: string, b: string): void { - pattern.test(a + b) + pattern.test(a + b); } `, output: ` - const pattern = /bar/ + const pattern = /bar/; function f(a: string, b: string): void { - (a + b).includes("bar") + (a + b).includes('bar'); } `, errors: [{ messageId: 'preferStringIncludes' }], @@ -280,12 +269,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: any[]): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` function f(a: any[]): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -293,12 +282,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: ReadonlyArray): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` function f(a: ReadonlyArray): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -306,12 +295,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: Int8Array): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` function f(a: Int8Array): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -319,12 +308,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: Int16Array): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` function f(a: Int16Array): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -332,12 +321,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: Int32Array): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` function f(a: Int32Array): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -345,12 +334,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: Uint8Array): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` function f(a: Uint8Array): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -358,12 +347,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: Uint16Array): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` function f(a: Uint16Array): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -371,12 +360,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: Uint32Array): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` function f(a: Uint32Array): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -384,12 +373,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: Float32Array): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` function f(a: Float32Array): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -397,12 +386,12 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: Float64Array): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` function f(a: Float64Array): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -410,25 +399,51 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: T[] | ReadonlyArray): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` function f(a: T[] | ReadonlyArray): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], }, { code: ` - function f | Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array>(a: U): void { - a.indexOf(b) !== -1 + function f< + T, + U extends + | T[] + | ReadonlyArray + | Int8Array + | Uint8Array + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array + | Float32Array + | Float64Array, + >(a: U): void { + a.indexOf(b) !== -1; } `, output: ` - function f | Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array>(a: U): void { - a.includes(b) + function f< + T, + U extends + | T[] + | ReadonlyArray + | Int8Array + | Uint8Array + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array + | Float32Array + | Float64Array, + >(a: U): void { + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -436,20 +451,20 @@ ruleTester.run('prefer-includes', rule, { { code: ` type UserDefined = { - indexOf(x: any): number - includes(x: any): boolean - } + indexOf(x: any): number; + includes(x: any): boolean; + }; function f(a: UserDefined): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` type UserDefined = { - indexOf(x: any): number - includes(x: any): boolean - } + indexOf(x: any): number; + includes(x: any): boolean; + }; function f(a: UserDefined): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], @@ -457,15 +472,15 @@ ruleTester.run('prefer-includes', rule, { { code: ` function f(a: Readonly): void { - a.indexOf(b) !== -1 + a.indexOf(b) !== -1; } `, output: ` function f(a: Readonly): void { - a.includes(b) + a.includes(b); } `, errors: [{ messageId: 'preferIncludes' }], }, - ]), + ], }); From dac8845c6821d51cea5bafdc0be2e9a399cea68c Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 7 Jun 2021 17:02:48 +0000 Subject: [PATCH 172/473] chore: publish v4.26.1 --- CHANGELOG.md | 12 ++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.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 | 12 ++++++++++++ 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 ++-- 24 files changed, 135 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be14a02b74f8..6cace1e04257 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) + + +### Bug Fixes + +* **eslint-plugin:** [prefer-includes] ignore option chaining before indexOfs ([#3432](https://github.com/typescript-eslint/typescript-eslint/issues/3432)) ([bf0cddb](https://github.com/typescript-eslint/typescript-eslint/commit/bf0cddbe5291bbc03e2d79aa680f93680222b67f)) +* **eslint-plugin:** fix doc url generation ([#3475](https://github.com/typescript-eslint/typescript-eslint/issues/3475)) ([fc5f171](https://github.com/typescript-eslint/typescript-eslint/commit/fc5f171b1ade2b45a1a4268b6d22926d420282a6)), closes [#3473](https://github.com/typescript-eslint/typescript-eslint/issues/3473) + + + + + # [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) diff --git a/lerna.json b/lerna.json index 78c7916f2406..757d0fec9038 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.26.0", + "version": "4.26.1", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 4c75520dcd34..f7ea1246c5c2 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + # [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 79c4b45c525c..96ec8a09b7dc 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.26.0", + "version": "4.26.1", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index d0ea626917c6..e0a9ecca5f7b 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.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) **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 3b4cd8b53c1b..432794935bc3 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.26.0", + "version": "4.26.1", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.26.0", + "@typescript-eslint/experimental-utils": "4.26.1", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index c1289a51a619..18539ad609f0 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.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) **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 889ebde1b9b4..5a31ac9fe864 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.26.0", + "version": "4.26.1", "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.26.0", + "@typescript-eslint/experimental-utils": "4.26.1", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.26.0" + "@typescript-eslint/parser": "4.26.1" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index ec188a44c7a3..8b7f427128d3 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) + + +### Bug Fixes + +* **eslint-plugin:** [prefer-includes] ignore option chaining before indexOfs ([#3432](https://github.com/typescript-eslint/typescript-eslint/issues/3432)) ([bf0cddb](https://github.com/typescript-eslint/typescript-eslint/commit/bf0cddbe5291bbc03e2d79aa680f93680222b67f)) +* **eslint-plugin:** fix doc url generation ([#3475](https://github.com/typescript-eslint/typescript-eslint/issues/3475)) ([fc5f171](https://github.com/typescript-eslint/typescript-eslint/commit/fc5f171b1ade2b45a1a4268b6d22926d420282a6)), closes [#3473](https://github.com/typescript-eslint/typescript-eslint/issues/3473) + + + + + # [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 4037e73b7e04..8f23087a053d 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.26.0", + "version": "4.26.1", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.26.0", - "@typescript-eslint/scope-manager": "4.26.0", + "@typescript-eslint/experimental-utils": "4.26.1", + "@typescript-eslint/scope-manager": "4.26.1", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.21", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 541e3a78879a..d6055ce29b9c 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.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + # [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) **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 67c30299380b..d0499b562518 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.26.0", + "version": "4.26.1", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.26.0", - "@typescript-eslint/types": "4.26.0", - "@typescript-eslint/typescript-estree": "4.26.0", + "@typescript-eslint/scope-manager": "4.26.1", + "@typescript-eslint/types": "4.26.1", + "@typescript-eslint/typescript-estree": "4.26.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 8d8892572251..c07db4b495e9 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.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 6ead2ad64141..3ff1f3968e96 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.26.0", + "version": "4.26.1", "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.26.0", - "@typescript-eslint/types": "4.26.0", - "@typescript-eslint/typescript-estree": "4.26.0", + "@typescript-eslint/scope-manager": "4.26.1", + "@typescript-eslint/types": "4.26.1", + "@typescript-eslint/typescript-estree": "4.26.1", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.26.0", + "@typescript-eslint/experimental-utils": "4.26.1", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index e7a671269aed..2ee969b4e090 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.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index df8278c3aae8..b2584b548268 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.26.0", + "version": "4.26.1", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.26.0", - "@typescript-eslint/visitor-keys": "4.26.0" + "@typescript-eslint/types": "4.26.1", + "@typescript-eslint/visitor-keys": "4.26.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.26.0", + "@typescript-eslint/typescript-estree": "4.26.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 63b0edc2015e..55b086a682dd 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.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) **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 3db082050a13..13c290d52509 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.26.0", + "version": "4.26.1", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index ccfe38368535..638d10d83e5a 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.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) diff --git a/packages/types/package.json b/packages/types/package.json index 7024d906f318..e6a4c44ea3ae 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.26.0", + "version": "4.26.1", "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 67b5be54903f..31b10925f0cd 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.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + # [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 377fee66555b..1781b27a7345 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.26.0", + "version": "4.26.1", "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.26.0", - "@typescript-eslint/visitor-keys": "4.26.0", + "@typescript-eslint/types": "4.26.1", + "@typescript-eslint/visitor-keys": "4.26.1", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.26.0", + "@typescript-eslint/shared-fixtures": "4.26.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index efa21c5364be..728f075000f4 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.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.26.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.25.0...v4.26.0) (2021-05-31) **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 cbfa88c67eb6..8028f5e8f628 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.26.0", + "version": "4.26.1", "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.26.0", + "@typescript-eslint/types": "4.26.1", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From cfd7ba8f84d2bd426237c69133a46ec4412033df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jun 2021 22:59:29 -0700 Subject: [PATCH 173/473] chore: bump @microsoft/api-extractor from 7.15.2 to 7.16.1 (#3491) Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack) from 7.15.2 to 7.16.1. - [Release notes](https://github.com/microsoft/rushstack/releases) - [Commits](https://github.com/microsoft/rushstack/compare/@microsoft/api-extractor_v7.15.2...@microsoft/api-extractor_v7.16.1) --- updated-dependencies: - dependency-name: "@microsoft/api-extractor" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/yarn.lock b/yarn.lock index f6cf41a28f74..6243bccd6c4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1629,24 +1629,24 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@microsoft/api-extractor-model@7.13.2": - version "7.13.2" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.2.tgz#7e640dbd421cc95a28e03c5a949d8ebcc63c936d" - integrity sha512-gA9Q8q5TPM2YYk7rLinAv9KqcodrmRC13BVmNzLswjtFxpz13lRh0BmrqD01/sddGpGMIuWFYlfUM4VSWxnggA== +"@microsoft/api-extractor-model@7.13.3": + version "7.13.3" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.3.tgz#ac01c064c5af520d3661c85d7e5ef95e1ca8ab92" + integrity sha512-uXilAhu2GcvyY/0NwVRk3AN7TFYjkPnjHLV2UywTTz9uglS+Af0YjNrCy+aaK8qXtfbFWdBzkH9N2XU8/YBeRQ== dependencies: "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.38.0" + "@rushstack/node-core-library" "3.39.0" "@microsoft/api-extractor@^7.15.2": - version "7.15.2" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.15.2.tgz#7a06b857660e33d1cdc050d576eb6c6c05dc532a" - integrity sha512-/Y/n+QOc1vM6Vg3OAUByT/wXdZciE7jV3ay33+vxl3aKva5cNsuOauL14T7XQWUiLko3ilPwrcnFcEjzXpLsuA== + version "7.16.1" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.16.1.tgz#7d5490a2ce1441ab8bc7bd6866a350cf580de0d0" + integrity sha512-hKFoLdmEUbHMIH48MXzSg8rndiugrXHruMVk+BQvhu14yX3LxH9re1CKwj4vLZb7bVBn+FfaWSZ5d3ltiXvX3w== dependencies: - "@microsoft/api-extractor-model" "7.13.2" + "@microsoft/api-extractor-model" "7.13.3" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.38.0" + "@rushstack/node-core-library" "3.39.0" "@rushstack/rig-package" "0.2.12" "@rushstack/ts-command-line" "4.7.10" colors "~1.2.1" @@ -1654,7 +1654,7 @@ resolve "~1.17.0" semver "~7.3.0" source-map "~0.6.1" - typescript "~4.2.4" + typescript "~4.3.2" "@microsoft/tsdoc-config@~0.15.2": version "0.15.2" @@ -1814,10 +1814,10 @@ dependencies: "@types/node" ">= 8" -"@rushstack/node-core-library@3.38.0": - version "3.38.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.38.0.tgz#da1cc87f9ad141b06d4ce7c8eafb09b542c10e75" - integrity sha512-cmvl0yQx8sSmbuXwiRYJi8TO+jpTtrLJQ8UmFHhKvgPVJAW8cV8dnpD1Xx/BvTGrJZ2XtRAIkAhBS9okBnap4w== +"@rushstack/node-core-library@3.39.0": + version "3.39.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.39.0.tgz#38928946d15ae89b773386cf97433d0d1ec83b93" + integrity sha512-kgu3+7/zOBkZU0+NdJb1rcHcpk3/oTjn5c8cg5nUTn+JDjEw58yG83SoeJEcRNNdl11dGX0lKG2PxPsjCokZOQ== dependencies: "@types/node" "10.17.13" colors "~1.2.1" @@ -8878,7 +8878,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.3.2, "typescript@>=3.3.1 <4.4.0", typescript@^4.1.0-dev.20201026, typescript@~4.2.4: +typescript@*, typescript@4.3.2, "typescript@>=3.3.1 <4.4.0", typescript@^4.1.0-dev.20201026, typescript@~4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw== From f558a9abe644b804467d21f1f8fa34770cd6802f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jun 2021 22:59:43 -0700 Subject: [PATCH 174/473] chore: bump marked from 2.0.6 to 2.0.7 (#3489) Bumps [marked](https://github.com/markedjs/marked) from 2.0.6 to 2.0.7. - [Release notes](https://github.com/markedjs/marked/releases) - [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js) - [Commits](https://github.com/markedjs/marked/compare/v2.0.6...v2.0.7) --- updated-dependencies: - dependency-name: marked dependency-type: direct:development update-type: version-update:semver-patch ... 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 6243bccd6c4e..2cb5fea22b15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6457,9 +6457,9 @@ markdownlint@~0.23.1: markdown-it "12.0.4" marked@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.6.tgz#c3ab1403b9b70f26acd92590fc272eb1718e778c" - integrity sha512-S2mYj0FzTQa0dLddssqwRVW4EOJOVJ355Xm2Vcbm+LU7GQRGWvwbO5K87OaPSOux2AwTSgtPPaXmc8sDPrhn2A== + version "2.0.7" + resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.7.tgz#bc5b857a09071b48ce82a1f7304913a993d4b7d1" + integrity sha512-BJXxkuIfJchcXOJWTT2DOL+yFWifFv2yGYOUzvXg8Qz610QKw+sHCvTMYwA+qWGhlA2uivBezChZ/pBy1tWdkQ== mdurl@^1.0.1: version "1.0.1" From d8614cefaf96bd34674443001daaccf6f778900f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jun 2021 22:59:53 -0700 Subject: [PATCH 175/473] chore: bump cspell from 5.5.2 to 5.6.0 (#3490) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.5.2 to 5.6.0. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/compare/v5.5.2...v5.6.0) --- updated-dependencies: - dependency-name: cspell dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 158 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 92 insertions(+), 66 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2cb5fea22b15..b72521186172 100644 --- a/yarn.lock +++ b/yarn.lock @@ -455,14 +455,14 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.5.2": - version "5.5.2" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.5.2.tgz#ee7f299e2bfccf73c38f8fc877317929d468d328" - integrity sha512-6erGPW9IFln/DWT754rjoOoE+QqatZJMFXu9ghcemooNbqbXrSG4ByXNVaEi3CfLjK48GHc8uJIkHoX4lbFArA== +"@cspell/cspell-bundled-dicts@^5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.6.0.tgz#998410852abad3253dfe19a3786c34ad7a5ad618" + integrity sha512-l9rFp7tNq5bpUlihh54a5Gtby2Ol9slsgTS4dq7VwbZcCye2BrVW0XhjmEWpl+bngOUMHnLLza+GQrDzELgXDA== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" - "@cspell/dict-bash" "^1.0.12" + "@cspell/dict-bash" "^1.0.13" "@cspell/dict-companies" "^1.0.38" "@cspell/dict-cpp" "^1.1.39" "@cspell/dict-cryptocurrencies" "^1.0.10" @@ -471,8 +471,8 @@ "@cspell/dict-django" "^1.0.26" "@cspell/dict-dotnet" "^1.0.25" "@cspell/dict-elixir" "^1.0.24" - "@cspell/dict-en-gb" "^1.1.29" - "@cspell/dict-en_us" "^1.2.42" + "@cspell/dict-en-gb" "^1.1.30" + "@cspell/dict-en_us" "^1.2.43" "@cspell/dict-filetypes" "^1.1.5" "@cspell/dict-fonts" "^1.0.14" "@cspell/dict-fullstack" "^1.0.38" @@ -485,20 +485,20 @@ "@cspell/dict-lorem-ipsum" "^1.0.22" "@cspell/dict-lua" "^1.0.16" "@cspell/dict-node" "^1.0.12" - "@cspell/dict-npm" "^1.0.12" + "@cspell/dict-npm" "^1.0.13" "@cspell/dict-php" "^1.0.24" - "@cspell/dict-powershell" "^1.0.15" + "@cspell/dict-powershell" "^1.0.16" "@cspell/dict-python" "^1.0.35" "@cspell/dict-ruby" "^1.0.14" "@cspell/dict-rust" "^1.0.22" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.32" + "@cspell/dict-software-terms" "^1.0.33" "@cspell/dict-typescript" "^1.0.19" -"@cspell/cspell-types@^5.5.2": - version "5.5.2" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.5.2.tgz#46cd362cd07be2f31167823fbfef580b01017053" - integrity sha512-/SEI6b51gYI2UQXQci++oraYvWJmSfKkV+rw3vk1qycZwLcmrqxZonLyHEH25+npUHE2ae1jE1g202w493icYg== +"@cspell/cspell-types@^5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.6.0.tgz#e7c368545bcfb3313d586dc5c7a4db017016f0e8" + integrity sha512-jbNHEQOmRaa15c5MDmaBOSRxpc3vUpAX9nhhcLrRgUk9eOIJzbIKsRJhMrwPcMd9F6V+mInAxdWGrsBETq9waw== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -510,10 +510,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-aws/-/dict-aws-1.0.14.tgz#beddede1053ce3622400e36c65da9fd2954e939d" integrity sha512-K21CfB4ZpKYwwDQiPfic2zJA/uxkbsd4IQGejEvDAhE3z8wBs6g6BwwqdVO767M9NgZqc021yAVpr79N5pWe3w== -"@cspell/dict-bash@^1.0.12": - version "1.0.12" - resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-1.0.12.tgz#fdf828c520dfd274f1cee6a4a90a0f6d86a703ac" - integrity sha512-BOMHVW/m281mqUSJkZ3oiJiUUItLd7QdzpMjm428V9yBYFwIdbds1CeatS7C6kgpI2eBE4RXmy1Hjk/lR63Jew== +"@cspell/dict-bash@^1.0.13": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-1.0.14.tgz#b519aca2843ea206b034381aabcf37b18b4930b2" + integrity sha512-Q5RKcyJfPzLraFGliKaRVMBFACCtcQZ4wPLRkLLFHKEUN6/hKqKB0owrVq225AByv3aY2CMEPIaPEU7F0QDlTA== "@cspell/dict-companies@^1.0.38": version "1.0.38" @@ -555,15 +555,15 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-elixir/-/dict-elixir-1.0.24.tgz#fc5c15b9f66b8aa5e25c98f54103c796fec70aba" integrity sha512-pEX6GYlEx4Teusw/m+XmqoXzcHOqpcn1ZX4H33ONqR81XdPwbaKorBr1IG23Ic76IhwrFlOqs48tcnxrHYpFnA== -"@cspell/dict-en-gb@^1.1.29": - version "1.1.29" - resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.29.tgz#12f0225f79598f7a1cdd08e2a2e2656189fc0747" - integrity sha512-rAgrN77RsKnmfkl0GyrEr5swFnqHpfPPPLscEgO+ShEL1Z9fyrcoPNW7X7EmsrITYmVy1iiemDAP2OGKvyj4Hw== +"@cspell/dict-en-gb@^1.1.30": + version "1.1.30" + resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.30.tgz#eee3d16b0176f5a44667f966f83097c3d6a7d654" + integrity sha512-xQUXZZ0ODBY9saso9e0BozS5FsX2o2+0fmbrekyITTTOCt/RN7bqByC7Hfj7HziQ3LxuC06EsS8ao8CKk9JTmQ== -"@cspell/dict-en_us@^1.2.42": - version "1.2.42" - resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.42.tgz#ed9e28a2d4734d87681aa4421f33b23a2327bbb1" - integrity sha512-5iegemAMT+5WQzPViy67EBH1z3sR53ZXCVQ1RmZJ++ZHkQ0BZ78EgZdrHFBW7tm3D43yf3V8vYSeTse5f1YPCw== +"@cspell/dict-en_us@^1.2.43": + version "1.2.43" + resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.43.tgz#dae5a5cd1a47408a5d3a13c2f215793ecde5f400" + integrity sha512-WAOtAZr3rNH4zpUXSeuxEo/C65o4Xp4sVdZ9cIqI+FPU7Vrgz0wuQZIL5TwbkuGUdtQtpRfgs2kTPXzns0fjGw== "@cspell/dict-filetypes@^1.1.5": version "1.1.5" @@ -625,20 +625,20 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-node/-/dict-node-1.0.12.tgz#a7236be30340ff8fe365f62c8d13121fdbe7f51c" integrity sha512-RPNn/7CSkflAWk0sbSoOkg0ORrgBARUjOW3QjB11KwV1gSu8f5W/ij/S50uIXtlrfoBLqd4OyE04jyON+g/Xfg== -"@cspell/dict-npm@^1.0.12": - version "1.0.12" - resolved "https://registry.yarnpkg.com/@cspell/dict-npm/-/dict-npm-1.0.12.tgz#2d30e4580855f67e407d096ba73656e3e05b5617" - integrity sha512-UaC3SzuAHtpKl/iwhQse52Mji/2/Zn8XpOwLpYcLElURa325/1oyhO8bsgX/SWXmo7RJ1xOYv0BQkQpvMx9TOg== +"@cspell/dict-npm@^1.0.13": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@cspell/dict-npm/-/dict-npm-1.0.14.tgz#047043a1d44a3dfa56f33cb8070c05867050f84a" + integrity sha512-RPaU6HJR03J9pg0yCgR59X55ozLhBkWvkHR3mD++ko5hKv0IXOfbS53nQwVN9yBAWjhCREJImemWPswoVu31zg== "@cspell/dict-php@^1.0.24": version "1.0.24" resolved "https://registry.yarnpkg.com/@cspell/dict-php/-/dict-php-1.0.24.tgz#40c15a4c5e1e2deba28841e2b498595b13f0ff88" integrity sha512-vHCqETX1idT9tN1plkxUFnXMIHjbbrNOINZh1PYSvVlBrOdahSaL/g6dOJZC5QTaaidoU4WXUlgnNb/7JN4Plg== -"@cspell/dict-powershell@^1.0.15": - version "1.0.15" - resolved "https://registry.yarnpkg.com/@cspell/dict-powershell/-/dict-powershell-1.0.15.tgz#340b5a2a316cdadf670fe4d0fb1df01f3266cf1e" - integrity sha512-7s1s+iMnf1Sm6+LICfeFMJ79k2Ygy6dG5pRefa2iq7DxOnf4n2ZlXFBDDxKH9NcUFD2uRLqQzN48lon4roCYfw== +"@cspell/dict-powershell@^1.0.16": + version "1.0.16" + resolved "https://registry.yarnpkg.com/@cspell/dict-powershell/-/dict-powershell-1.0.16.tgz#06a2966b2dca7a0d97938ff90fcfc74354cfb7ba" + integrity sha512-cbauyYR6H53gfd/J9B3wgly9kg1joLSVxxqbry+y0BqF7FBtkctnXev2WHRbX68o6X9iQPhUz6+3zGKwFW5Stg== "@cspell/dict-python@^1.0.35": version "1.0.35" @@ -660,10 +660,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.32": - version "1.0.32" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.32.tgz#21d5bdb6c21fcef423cc226857ca9dab176954da" - integrity sha512-RA2rRiw0cODQOfUJZ2817n9iu+CThpo09D5Li3+632TCDA4IjkfNYGpTegE5N3eQCPFzLJN7Oghdc7YGNut+Qg== +"@cspell/dict-software-terms@^1.0.33": + version "1.0.35" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.35.tgz#f3d75af834f4e051e41b85fcfc4fd092d993aef1" + integrity sha512-b2q1Ja12WivVYDMkXpix+CY+PTDOHJriEZJpDWt7AG+DhwjqjASufjfBIV7U0t0e/eV7PLzbYCj0oj9lTT5eow== "@cspell/dict-typescript@^1.0.19": version "1.0.19" @@ -2727,7 +2727,7 @@ callsites@^2.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= -callsites@^3.0.0: +callsites@^3.0.0, callsites@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== @@ -2850,6 +2850,14 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +clear-module@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/clear-module/-/clear-module-4.1.1.tgz#bf8ba3b62eb70ee1e0adec90589741425cf32db8" + integrity sha512-ng0E7LeODcT3QkazOckzZqbca+JByQy/Q2Z6qO24YsTp+pLxCfohGz2gJYJqZS0CWTX3LEUiHOqe5KlYeUbEMw== + dependencies: + parent-module "^2.0.0" + resolve-from "^5.0.0" + cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" @@ -3281,59 +3289,62 @@ 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.5.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.5.2.tgz#b2445789239f15e541bacf787336dc5234c03421" - integrity sha512-sr8je4895+I84kSCMCqWumRyrnaun5FQT7tmsNtWHebSB3dsmJ6lli7DodBsnM+mojGg9egdeunAHWhSwjHGVQ== +cspell-glob@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.6.0.tgz#25c459d23ceae071fb845e4affc3b32d88499150" + integrity sha512-2VLuKwm7fJmB/U3Y30GXaQiqy1Zu3Qt5lQNkWYW1i1FTjp7seodTXQUUntkILTOdMGsOgCwsQmEP9WmqVkAKUg== dependencies: micromatch "^4.0.4" -cspell-io@^5.5.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.5.2.tgz#293026318e7881e801c5b4484cc0a1409506a901" - integrity sha512-aeT9RGgRoWRXPkYtRN2swNokjEqo0+dXTs6brOEmM6oOOzA/xsksnDncHJeCt/EwXs/ri/eXpjLG9ObTMt1tug== +cspell-io@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.6.0.tgz#2e6463e6a83aba8c7707d09a54569d62bb95fd9d" + integrity sha512-PIUl7UNLcM3d/BNWD5TphuhxM0Dwpg+MkmahEjuvoYR0S67q6twNj5MOPfmih08KB1hkFecHZJDTkfUS/8a9Hg== dependencies: iconv-lite "^0.6.3" iterable-to-stream "^2.0.0" -cspell-lib@^5.5.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.5.2.tgz#3e699b2a563d8560136a8916d307bea9922be15b" - integrity sha512-xAC/4l7QqsTowmVguzGJMhVXzb+uQcHACDpZcKcujYRnwgGOqonNfrN8kq8xmInVo36P621Frx8aKKgaP6A4Ew== +cspell-lib@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.6.0.tgz#913e5ccdc12f4d333e8611d70eab5cf8f37294a9" + integrity sha512-Knep49uDKH/UWKrkRrwxUzo3EB8gDIL47ikJk9KMcT7EynYW8EJmoeRqDCMbagmBSID8FEHsuDV3SHR9q0FYIw== dependencies: - "@cspell/cspell-bundled-dicts" "^5.5.2" - "@cspell/cspell-types" "^5.5.2" + "@cspell/cspell-bundled-dicts" "^5.6.0" + "@cspell/cspell-types" "^5.6.0" + clear-module "^4.1.1" comment-json "^4.1.0" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-glob "^5.5.2" - cspell-io "^5.5.2" - cspell-trie-lib "^5.5.2" + cspell-glob "^5.6.0" + cspell-io "^5.6.0" + cspell-trie-lib "^5.6.0" + find-up "^5.0.0" fs-extra "^10.0.0" gensequence "^3.1.1" + import-fresh "^3.3.0" resolve-from "^5.0.0" resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.5.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.5.2.tgz#54f88663332213afd15be98a16007d249b4bdb3d" - integrity sha512-xLXOaoCHUPTxWnYel8zjKRxRlRQd/S8jjg7kXHZt8XOkWNRGCjeF/Itgb77+zNDoknlH9OphmwBjYwxXAWC14Q== +cspell-trie-lib@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.6.0.tgz#57199083f715a435d995e02f765d7435d65bc9c9" + integrity sha512-ZnEiKgWQv+D0HWQssSwDReTVRSXK8stl8meyu8To0Tdm/y1gTHx3JWhdBToRMFSmodLARVu4hp7mIArzcAyO1g== dependencies: fs-extra "^10.0.0" gensequence "^3.1.1" cspell@^5.5.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.5.2.tgz#a778efb24006e2a552aab2c52ce23c753d64ac68" - integrity sha512-iklHcVuV+hfzeOtDcoAVBtrujhIMMLJaZRlaNTxsawNNnD/BuYljicy1CkHH1TfD4Bygj3eAIPsVtPmShyLSoA== + version "5.6.0" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.6.0.tgz#5abb52081c9386e846a989b755486a87dbb7019d" + integrity sha512-keruL7u2yKuWAOW28C6NHknyHX3zpY3PtIobaS8bZ2REGVepFi28oES3S5ZquK/fLVy9WdsbUCg9pA/sUMmIAg== dependencies: - "@cspell/cspell-types" "^5.5.2" + "@cspell/cspell-types" "^5.6.0" chalk "^4.1.1" commander "^7.2.0" comment-json "^4.1.0" - cspell-glob "^5.5.2" - cspell-lib "^5.5.2" + cspell-glob "^5.6.0" + cspell-lib "^5.6.0" fs-extra "^10.0.0" get-stdin "^8.0.0" glob "^7.1.7" @@ -4947,6 +4958,14 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" +import-fresh@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + import-from@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966" @@ -7194,6 +7213,13 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parent-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-2.0.0.tgz#fa71f88ff1a50c27e15d8ff74e0e3a9523bf8708" + integrity sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg== + dependencies: + callsites "^3.1.0" + parse-github-repo-url@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50" From 12a9128fc434fc8bdd61a9bb751c004c11ef9741 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jun 2021 23:00:00 -0700 Subject: [PATCH 176/473] chore: bump jest from 27.0.3 to 27.0.4 (#3492) Bumps [jest](https://github.com/facebook/jest) from 27.0.3 to 27.0.4. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/compare/v27.0.3...v27.0.4) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 187 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 117 insertions(+), 70 deletions(-) diff --git a/yarn.lock b/yarn.lock index b72521186172..a396486e4414 100644 --- a/yarn.lock +++ b/yarn.lock @@ -787,13 +787,13 @@ jest-util "^27.0.2" slash "^3.0.0" -"@jest/core@^27.0.3": - version "27.0.3" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.3.tgz#b5a38675fa0466450a7fd465f4b226762cb592a2" - integrity sha512-rN8lr/OJ8iApcQUh4khnMaOCVX4oRnLwy2tPW3Vh70y62K8Da8fhkxMUq0xX9VPa4+yWUm0tGc/jUSJi+Jzuwg== +"@jest/core@^27.0.4": + version "27.0.4" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.4.tgz#679bf9ac07900da2ddbb9667bb1afa8029038f53" + integrity sha512-+dsmV8VUs1h/Szb+rEWk8xBM1fp1I///uFy9nk3wXGvRsF2lBp8EVPmtWc+QFRb3MY2b7u2HbkGF1fzoDzQTLA== dependencies: "@jest/console" "^27.0.2" - "@jest/reporters" "^27.0.2" + "@jest/reporters" "^27.0.4" "@jest/test-result" "^27.0.2" "@jest/transform" "^27.0.2" "@jest/types" "^27.0.2" @@ -804,15 +804,15 @@ exit "^0.1.2" graceful-fs "^4.2.4" jest-changed-files "^27.0.2" - jest-config "^27.0.3" + jest-config "^27.0.4" jest-haste-map "^27.0.2" jest-message-util "^27.0.2" jest-regex-util "^27.0.1" - jest-resolve "^27.0.2" - jest-resolve-dependencies "^27.0.3" - jest-runner "^27.0.3" - jest-runtime "^27.0.3" - jest-snapshot "^27.0.2" + jest-resolve "^27.0.4" + jest-resolve-dependencies "^27.0.4" + jest-runner "^27.0.4" + jest-runtime "^27.0.4" + jest-snapshot "^27.0.4" jest-util "^27.0.2" jest-validate "^27.0.2" jest-watcher "^27.0.2" @@ -853,10 +853,10 @@ "@jest/types" "^27.0.2" expect "^27.0.2" -"@jest/reporters@^27.0.2": - version "27.0.2" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.2.tgz#ad73835d1cd54da08b0998a70b14446405e8e0d9" - integrity sha512-SVQjew/kafNxSN1my4praGQP+VPVGHsU8zqiEDppLvq6j1lryIjdNb9P+bZSsKeifU4bIoaPnf9Ui0tK9WOpFA== +"@jest/reporters@^27.0.4": + version "27.0.4" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.4.tgz#95609b1be97afb80d55d8aa3d7c3179c15810e65" + integrity sha512-Xa90Nm3JnV0xCe4M6A10M9WuN9krb+WFKxV1A98Y4ePCw40n++r7uxFUNU7DT1i9Behj7fjrAIju9oU0t1QtCg== dependencies: "@bcoe/v8-coverage" "^0.2.3" "@jest/console" "^27.0.2" @@ -874,7 +874,7 @@ istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" jest-haste-map "^27.0.2" - jest-resolve "^27.0.2" + jest-resolve "^27.0.4" jest-util "^27.0.2" jest-worker "^27.0.2" slash "^3.0.0" @@ -902,15 +902,15 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^27.0.3": - version "27.0.3" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.3.tgz#2a8632b86a9a6f8900e514917cdab6a062e71049" - integrity sha512-DcLTzraZ8xLr5fcIl+CF14vKeBBpBrn55wFxI9Ju+dhEBdjRdJQ/Z/pLkMehkPZWIQ+rR23J8e+wFDkfjree0Q== +"@jest/test-sequencer@^27.0.4": + version "27.0.4" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.4.tgz#976493b277594d81e589896f0ed21f198308928a" + integrity sha512-6UFEVwdmxYdyNffBxVVZxmXEdBE4riSddXYSnFNH0ELFQFk/bvagizim8WfgJTqF4EKd+j1yFxvhb8BMHfOjSQ== dependencies: "@jest/test-result" "^27.0.2" graceful-fs "^4.2.4" jest-haste-map "^27.0.2" - jest-runtime "^27.0.3" + jest-runtime "^27.0.4" "@jest/transform@^27.0.2": version "27.0.2" @@ -5468,10 +5468,10 @@ jest-changed-files@^27.0.2: execa "^5.0.0" throat "^6.0.1" -jest-circus@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.3.tgz#32006967de484e03589da944064d72e172ce3261" - integrity sha512-tdMfzs7SgD5l7jRcI1iB3vtQi5fHwCgo4RlO8bzZnYc05PZ+tlAOMZeS8eGYkZ2tPaRY/aRLMFWQp/8zXBrolQ== +jest-circus@^27.0.4: + version "27.0.4" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.4.tgz#3b261514ee3b3da33def736a6352c98ff56bb6e6" + integrity sha512-QD+eblDiRphta630WRKewuASLs/oY1Zki2G4bccntRvrTHQ63ljwFR5TLduuK4Zg0ZPzW0+8o6AP7KRd1yKOjw== dependencies: "@jest/environment" "^27.0.3" "@jest/test-result" "^27.0.2" @@ -5485,39 +5485,39 @@ jest-circus@^27.0.3: jest-each "^27.0.2" jest-matcher-utils "^27.0.2" jest-message-util "^27.0.2" - jest-runtime "^27.0.3" - jest-snapshot "^27.0.2" + jest-runtime "^27.0.4" + jest-snapshot "^27.0.4" jest-util "^27.0.2" pretty-format "^27.0.2" slash "^3.0.0" stack-utils "^2.0.3" throat "^6.0.1" -jest-cli@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.3.tgz#b733871acb526054a0f8c971d0466595c5f8316d" - integrity sha512-7bt9Sgv4nWH5pUnyJfdLf8CHWfo4+7lSPxeBwQx4r0vBj9jweJam/piE2U91SXtQI+ckm+TIN97OVnqIYpVhSg== +jest-cli@^27.0.4: + version "27.0.4" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.4.tgz#491b12c754c0d7c6873b13a66f26b3a80a852910" + integrity sha512-E0T+/i2lxsWAzV7LKYd0SB7HUAvePqaeIh5vX43/G5jXLhv1VzjYzJAGEkTfvxV774ll9cyE2ljcL73PVMEOXQ== dependencies: - "@jest/core" "^27.0.3" + "@jest/core" "^27.0.4" "@jest/test-result" "^27.0.2" "@jest/types" "^27.0.2" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.0.3" + jest-config "^27.0.4" jest-util "^27.0.2" jest-validate "^27.0.2" prompts "^2.0.1" yargs "^16.0.3" -jest-config@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.3.tgz#31871583573c6d669dcdb5bb2d1a8738f3b91c20" - integrity sha512-zgtI2YQo+ekKsmYNyDlXFY/7w7WWBSJFoj/WRe173WB88CDUrEYWr0sLdbLOQe+sRu6l1Y2S0MCS6BOJm5jkoA== +jest-config@^27.0.4: + version "27.0.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.4.tgz#c4f41378acf40ca77860fb4e213b12109d87b8cf" + integrity sha512-VkQFAHWnPQefdvHU9A+G3H/Z3NrrTKqWpvxgQz3nkUdkDTWeKJE6e//BL+R7z79dXOMVksYgM/z6ndtN0hfChg== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.0.3" + "@jest/test-sequencer" "^27.0.4" "@jest/types" "^27.0.2" babel-jest "^27.0.2" chalk "^4.0.0" @@ -5525,14 +5525,14 @@ jest-config@^27.0.3: glob "^7.1.1" graceful-fs "^4.2.4" is-ci "^3.0.0" - jest-circus "^27.0.3" + jest-circus "^27.0.4" jest-environment-jsdom "^27.0.3" jest-environment-node "^27.0.3" jest-get-type "^27.0.1" - jest-jasmine2 "^27.0.3" + jest-jasmine2 "^27.0.4" jest-regex-util "^27.0.1" - jest-resolve "^27.0.2" - jest-runner "^27.0.3" + jest-resolve "^27.0.4" + jest-runner "^27.0.4" jest-util "^27.0.2" jest-validate "^27.0.2" micromatch "^4.0.4" @@ -5616,10 +5616,10 @@ jest-haste-map@^27.0.2: optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.3.tgz#fa6f6499566ea1b01b68b3ad13f49d1592b02c85" - integrity sha512-odJ2ia8P5c+IsqOcWJPmku4AqbXIfTVLRjYTKHri3TEvbmTdLw0ghy13OAPIl/0v7cVH0TURK7+xFOHKDLvKIA== +jest-jasmine2@^27.0.4: + version "27.0.4" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.4.tgz#c669519ccf4904a485338555e1e66cad36bb0670" + integrity sha512-yj3WrjjquZwkJw+eA4c9yucHw4/+EHndHWSqgHbHGQfT94ihaaQsa009j1a0puU8CNxPDk0c1oAPeOpdJUElwA== dependencies: "@babel/traverse" "^7.1.0" "@jest/environment" "^27.0.3" @@ -5634,8 +5634,8 @@ jest-jasmine2@^27.0.3: jest-each "^27.0.2" jest-matcher-utils "^27.0.2" jest-message-util "^27.0.2" - jest-runtime "^27.0.3" - jest-snapshot "^27.0.2" + jest-runtime "^27.0.4" + jest-snapshot "^27.0.4" jest-util "^27.0.2" pretty-format "^27.0.2" throat "^6.0.1" @@ -5691,14 +5691,14 @@ jest-regex-util@^27.0.1: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.1.tgz#69d4b1bf5b690faa3490113c47486ed85dd45b68" integrity sha512-6nY6QVcpTgEKQy1L41P4pr3aOddneK17kn3HJw6SdwGiKfgCGTvH02hVXL0GU8GEKtPH83eD2DIDgxHXOxVohQ== -jest-resolve-dependencies@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.3.tgz#7e258f7d0458bb910855f8a50f5c1e9d92c319dc" - integrity sha512-HdjWOvFAgT5CYChF2eiBN2rRKicjaTCCtA3EtH47REIdGzEHGUhYrWYgLahXsiOovvWN6edhcHL5WCa3gbc04A== +jest-resolve-dependencies@^27.0.4: + version "27.0.4" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.4.tgz#a07a242d70d668afd3fcf7f4270755eebb1fe579" + integrity sha512-F33UPfw1YGWCV2uxJl7wD6TvcQn5IC0LtguwY3r4L7R6H4twpLkp5Q2ZfzRx9A2I3G8feiy0O0sqcn/Qoym71A== dependencies: "@jest/types" "^27.0.2" jest-regex-util "^27.0.1" - jest-snapshot "^27.0.2" + jest-snapshot "^27.0.4" jest-resolve@^27.0.2: version "27.0.2" @@ -5715,10 +5715,25 @@ jest-resolve@^27.0.2: resolve "^1.20.0" slash "^3.0.0" -jest-runner@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.3.tgz#d9747af3bee5a6ffaeb9e10b653263b780258b54" - integrity sha512-zH23uIIh1ro1JCD7XX1bQ0bQwXEsBzLX2UJVE/AVLsk4YJRmTfyXIzzRzBWRdnMHHg1NWkJ4fGs7eFP15IqZpQ== +jest-resolve@^27.0.4: + version "27.0.4" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.0.4.tgz#8a27bc3f2f00c8ea28f3bc99bbf6f468300a703d" + integrity sha512-BcfyK2i3cG79PDb/6gB6zFeFQlcqLsQjGBqznFCpA0L/3l1L/oOsltdUjs5eISAWA9HS9qtj8v2PSZr/yWxONQ== + dependencies: + "@jest/types" "^27.0.2" + chalk "^4.0.0" + escalade "^3.1.1" + graceful-fs "^4.2.4" + jest-pnp-resolver "^1.2.2" + jest-util "^27.0.2" + jest-validate "^27.0.2" + resolve "^1.20.0" + slash "^3.0.0" + +jest-runner@^27.0.4: + version "27.0.4" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.4.tgz#2787170a9509b792ae129794f6944d27d5d12a4f" + integrity sha512-NfmvSYLCsCJk2AG8Ar2NAh4PhsJJpO+/r+g4bKR5L/5jFzx/indUpnVBdrfDvuqhGLLAvrKJ9FM/Nt8o1dsqxg== dependencies: "@jest/console" "^27.0.2" "@jest/environment" "^27.0.3" @@ -5731,20 +5746,22 @@ jest-runner@^27.0.3: exit "^0.1.2" graceful-fs "^4.2.4" jest-docblock "^27.0.1" + jest-environment-jsdom "^27.0.3" + jest-environment-node "^27.0.3" jest-haste-map "^27.0.2" jest-leak-detector "^27.0.2" jest-message-util "^27.0.2" - jest-resolve "^27.0.2" - jest-runtime "^27.0.3" + jest-resolve "^27.0.4" + jest-runtime "^27.0.4" jest-util "^27.0.2" jest-worker "^27.0.2" source-map-support "^0.5.6" throat "^6.0.1" -jest-runtime@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.3.tgz#32499c1047e5d953cfbb67fe790ab0167a614d28" - integrity sha512-k1Hl2pWWHBkSXdCggX2lyLRuDnnnmMlnJd+DPLb8LmmAeHW87WgGC6TplD377VxY3KQu73sklkhGUIdwFgsRVQ== +jest-runtime@^27.0.4: + version "27.0.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.4.tgz#2e4a6aa77cac32ac612dfe12768387a8aa15c2f0" + integrity sha512-voJB4xbAjS/qYPboV+e+gmg3jfvHJJY4CagFWBOM9dQKtlaiTjcpD2tWwla84Z7PtXSQPeIpXY0qksA9Dum29A== dependencies: "@jest/console" "^27.0.2" "@jest/environment" "^27.0.3" @@ -5765,8 +5782,8 @@ jest-runtime@^27.0.3: jest-message-util "^27.0.2" jest-mock "^27.0.3" jest-regex-util "^27.0.1" - jest-resolve "^27.0.2" - jest-snapshot "^27.0.2" + jest-resolve "^27.0.4" + jest-snapshot "^27.0.4" jest-util "^27.0.2" jest-validate "^27.0.2" slash "^3.0.0" @@ -5811,6 +5828,36 @@ jest-snapshot@^27.0.2: pretty-format "^27.0.2" semver "^7.3.2" +jest-snapshot@^27.0.4: + version "27.0.4" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.4.tgz#2b96e22ca90382b3e93bd0aae2ce4c78bf51fb5b" + integrity sha512-hnjrvpKGdSMvKfbHyaG5Kul7pDJGZvjVy0CKpzhu28MmAssDXS6GpynhXzgst1wBQoKD8c9b2VS2a5yhDLQRCA== + dependencies: + "@babel/core" "^7.7.2" + "@babel/generator" "^7.7.2" + "@babel/parser" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/traverse" "^7.7.2" + "@babel/types" "^7.0.0" + "@jest/transform" "^27.0.2" + "@jest/types" "^27.0.2" + "@types/babel__traverse" "^7.0.4" + "@types/prettier" "^2.1.5" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^27.0.2" + graceful-fs "^4.2.4" + jest-diff "^27.0.2" + jest-get-type "^27.0.1" + jest-haste-map "^27.0.2" + jest-matcher-utils "^27.0.2" + jest-message-util "^27.0.2" + jest-resolve "^27.0.4" + jest-util "^27.0.2" + natural-compare "^1.4.0" + pretty-format "^27.0.2" + semver "^7.3.2" + jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/jest-specific-snapshot/-/jest-specific-snapshot-5.0.0.tgz#48f72d5613af7f3e30df75b6b3534db6bab32ea0" @@ -5865,13 +5912,13 @@ jest-worker@^27.0.2: supports-color "^8.0.0" jest@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.3.tgz#0b4ac738c93612f778d58250aee026220487e5a4" - integrity sha512-0G9+QqXFIZWgf5rs3yllpaA+13ZawVHfyuhuCV1EnoFbX++rVMRrYWCAnk+dfhwyv9/VTQvn+XG969u8aPRsBg== + version "27.0.4" + resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.4.tgz#91d4d564b36bcf93b98dac1ab19f07089e670f53" + integrity sha512-Px1iKFooXgGSkk1H8dJxxBIrM3tsc5SIuI4kfKYK2J+4rvCvPGr/cXktxh0e9zIPQ5g09kOMNfHQEmusBUf/ZA== dependencies: - "@jest/core" "^27.0.3" + "@jest/core" "^27.0.4" import-local "^3.0.2" - jest-cli "^27.0.3" + jest-cli "^27.0.4" jju@~1.4.0: version "1.4.0" From 9c78619b1ee8b30c47a6777d7ab9c2ae8dfe732f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jun 2021 23:00:09 -0700 Subject: [PATCH 177/473] chore: bump prettier from 2.3.0 to 2.3.1 (#3493) Bumps [prettier](https://github.com/prettier/prettier) from 2.3.0 to 2.3.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.3.0...2.3.1) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:production update-type: version-update:semver-patch ... 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 a396486e4414..c26a3fa775e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7498,9 +7498,9 @@ prelude-ls@~1.1.2: integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= prettier@*, prettier@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" - integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w== + version "2.3.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6" + integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA== pretty-format@*, pretty-format@^26.0.0, pretty-format@^27.0.0, pretty-format@^27.0.2: version "27.0.2" From e855b18b8feee0edb5c617c11006861426a6f530 Mon Sep 17 00:00:00 2001 From: Ben Lichtman Date: Mon, 7 Jun 2021 23:32:17 -0700 Subject: [PATCH 178/473] feat: allow user to provide TS program instance in parser options (#3484) --- packages/parser/README.md | 35 +++++++ packages/parser/src/index.ts | 1 + packages/parser/tests/lib/services.ts | 13 ++- packages/types/package.json | 3 + packages/types/src/parser-options.ts | 2 + packages/typescript-estree/README.md | 35 +++++++ .../create-program/createProjectProgram.ts | 22 +---- .../src/create-program/shared.ts | 47 +++++++-- .../src/create-program/useProvidedProgram.ts | 87 +++++++++++++++++ packages/typescript-estree/src/index.ts | 1 + .../typescript-estree/src/parser-options.ts | 8 ++ packages/typescript-estree/src/parser.ts | 53 ++++++---- .../tests/lib/semanticInfo.test.ts | 96 ++++++++++++++----- 13 files changed, 330 insertions(+), 73 deletions(-) create mode 100644 packages/typescript-estree/src/create-program/useProvidedProgram.ts diff --git a/packages/parser/README.md b/packages/parser/README.md index 0599f61b2369..433c175bfef6 100644 --- a/packages/parser/README.md +++ b/packages/parser/README.md @@ -64,6 +64,8 @@ interface ParserOptions { tsconfigRootDir?: string; extraFileExtensions?: string[]; warnOnUnsupportedTypeScriptVersion?: boolean; + + program?: import('typescript').Program; } ``` @@ -211,6 +213,39 @@ Default `false`. This option allows you to request that when the `project` setting is specified, files will be allowed when not included in the projects defined by the provided `tsconfig.json` files. **Using this option will incur significant performance costs. This option is primarily included for backwards-compatibility.** See the **`project`** section above for more information. +### `parserOptions.program` + +Default `undefined`. + +This option allows you to programmatically provide an instance of a TypeScript Program object that will provide type information to rules. +This will override any program that would have been computed from `parserOptions.project` or `parserOptions.createDefaultProgram`. +All linted files must be part of the provided program. + +## Utilities + +### `createProgram(configFile, projectDirectory)` + +This serves as a utility method for users of the `parserOptions.program` feature to create a TypeScript program instance from a config file. + +```ts +declare function createProgram( + configFile: string, + projectDirectory?: string, +): import('typescript').Program; +``` + +Example usage in .eslintrc.js: + +```js +const parser = require('@typescript-eslint/parser'); +const program = parser.createProgram('tsconfig.json'); +module.exports = { + parserOptions: { + program, + }, +}; +``` + ## Supported TypeScript Version Please see [`typescript-eslint`](https://github.com/typescript-eslint/typescript-eslint) for the supported TypeScript version. diff --git a/packages/parser/src/index.ts b/packages/parser/src/index.ts index 451f263d62b6..c1bb82bf5935 100644 --- a/packages/parser/src/index.ts +++ b/packages/parser/src/index.ts @@ -2,6 +2,7 @@ export { parse, parseForESLint, ParserOptions } from './parser'; export { ParserServices, clearCaches, + createProgram, } from '@typescript-eslint/typescript-estree'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder diff --git a/packages/parser/tests/lib/services.ts b/packages/parser/tests/lib/services.ts index 28cada9d251d..4567f5f85a45 100644 --- a/packages/parser/tests/lib/services.ts +++ b/packages/parser/tests/lib/services.ts @@ -7,6 +7,7 @@ import { formatSnapshotName, testServices, } from '../tools/test-utils'; +import { createProgram } from '@typescript-eslint/typescript-estree'; //------------------------------------------------------------------------------ // Setup @@ -30,15 +31,17 @@ function createConfig(filename: string): ParserOptions { //------------------------------------------------------------------------------ describe('services', () => { + const program = createProgram(path.resolve(FIXTURES_DIR, 'tsconfig.json')); testFiles.forEach(filename => { const code = fs.readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); const config = createConfig(filename); - it( - formatSnapshotName(filename, FIXTURES_DIR, '.ts'), - createSnapshotTestBlock(code, config), - ); - it(`${formatSnapshotName(filename, FIXTURES_DIR, '.ts')} services`, () => { + const snapshotName = formatSnapshotName(filename, FIXTURES_DIR, '.ts'); + it(snapshotName, createSnapshotTestBlock(code, config)); + it(`${snapshotName} services`, () => { testServices(code, config); }); + it(`${snapshotName} services with provided program`, () => { + testServices(code, { ...config, program }); + }); }); }); diff --git a/packages/types/package.json b/packages/types/package.json index e6a4c44ea3ae..88f7555d0629 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -48,5 +48,8 @@ "_ts3.4/*" ] } + }, + "devDependencies": { + "typescript": "*" } } diff --git a/packages/types/src/parser-options.ts b/packages/types/src/parser-options.ts index 8f6632df9a42..a8ecb896726c 100644 --- a/packages/types/src/parser-options.ts +++ b/packages/types/src/parser-options.ts @@ -1,4 +1,5 @@ import { Lib } from './lib'; +import type { Program } from 'typescript'; type DebugLevel = boolean | ('typescript-eslint' | 'eslint' | 'typescript')[]; @@ -41,6 +42,7 @@ interface ParserOptions { extraFileExtensions?: string[]; filePath?: string; loc?: boolean; + program?: Program; project?: string | string[]; projectFolderIgnoreList?: (string | RegExp)[]; range?: boolean; diff --git a/packages/typescript-estree/README.md b/packages/typescript-estree/README.md index b9d40fb1ec07..fca834e22098 100644 --- a/packages/typescript-estree/README.md +++ b/packages/typescript-estree/README.md @@ -208,6 +208,13 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { */ tsconfigRootDir?: string; + /** + * Instance of a TypeScript Program object to be used for type information. + * This overrides any program or programs that would have been computed from the `project` option. + * All linted files must be part of the provided program. + */ + program?: import('typescript').Program; + /** *************************************************************************************** * IT IS RECOMMENDED THAT YOU DO NOT USE THIS OPTION, AS IT CAUSES PERFORMANCE ISSUES. * @@ -303,6 +310,34 @@ Types for the AST produced by the parse functions. - `AST_NODE_TYPES` is an enum which provides the values for every single AST node's `type` property. - `AST_TOKEN_TYPES` is an enum which provides the values for every single AST token's `type` property. +### Utilities + +#### `createProgram(configFile, projectDirectory)` + +This serves as a utility method for users of the `ParseOptions.program` feature to create a TypeScript program instance from a config file. + +```ts +declare function createProgram( + configFile: string, + projectDirectory: string = process.cwd(), +): import('typescript').Program; +``` + +Example usage: + +```js +const tsESTree = require('@typescript-eslint/typescript-estree'); + +const program = tsESTree.createProgram('tsconfig.json'); +const code = `const hello: string = 'world';`; +const { ast, services } = parseAndGenerateServices(code, { + filePath: '/some/path/to/file/foo.ts', + loc: true, + program, + range: true, +}); +``` + ## Supported TypeScript Version See the [Supported TypeScript Version](../../README.md#supported-typescript-version) section in the project root. diff --git a/packages/typescript-estree/src/create-program/createProjectProgram.ts b/packages/typescript-estree/src/create-program/createProjectProgram.ts index bca6fda10051..69903a5bcafc 100644 --- a/packages/typescript-estree/src/create-program/createProjectProgram.ts +++ b/packages/typescript-estree/src/create-program/createProjectProgram.ts @@ -3,19 +3,12 @@ import path from 'path'; import { getProgramsForProjects } from './createWatchProgram'; import { firstDefined } from '../node-utils'; import { Extra } from '../parser-options'; -import { ASTAndProgram } from './shared'; +import { ASTAndProgram, getAstFromProgram } from './shared'; const log = debug('typescript-eslint:typescript-estree:createProjectProgram'); const DEFAULT_EXTRA_FILE_EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx']; -function getExtension(fileName: string | undefined): string | null { - if (!fileName) { - return null; - } - return fileName.endsWith('.d.ts') ? '.d.ts' : path.extname(fileName); -} - /** * @param code The code of the file being linted * @param createDefaultProgram True if the default program should be created @@ -31,18 +24,7 @@ function createProjectProgram( const astAndProgram = firstDefined( getProgramsForProjects(code, extra.filePath, extra), - currentProgram => { - const ast = currentProgram.getSourceFile(extra.filePath); - - // working around https://github.com/typescript-eslint/typescript-eslint/issues/1573 - const expectedExt = getExtension(extra.filePath); - const returnedExt = getExtension(ast?.fileName); - if (expectedExt !== returnedExt) { - return; - } - - return ast && { ast, program: currentProgram }; - }, + currentProgram => getAstFromProgram(currentProgram, extra), ); if (!astAndProgram && !createDefaultProgram) { diff --git a/packages/typescript-estree/src/create-program/shared.ts b/packages/typescript-estree/src/create-program/shared.ts index ae2962528040..8202c538d342 100644 --- a/packages/typescript-estree/src/create-program/shared.ts +++ b/packages/typescript-estree/src/create-program/shared.ts @@ -1,5 +1,6 @@ import path from 'path'; import * as ts from 'typescript'; +import { Program } from 'typescript'; import { Extra } from '../parser-options'; interface ASTAndProgram { @@ -8,14 +9,11 @@ interface ASTAndProgram { } /** - * Default compiler options for program generation from single root file + * Compiler options required to avoid critical functionality issues */ -const DEFAULT_COMPILER_OPTIONS: ts.CompilerOptions = { - allowNonTsExtensions: true, - allowJs: true, - checkJs: true, - noEmit: true, - // extendedDiagnostics: true, +const CORE_COMPILER_OPTIONS: ts.CompilerOptions = { + noEmit: true, // required to avoid parse from causing emit to occur + /** * Flags required to make no-unused-vars work */ @@ -23,6 +21,16 @@ const DEFAULT_COMPILER_OPTIONS: ts.CompilerOptions = { noUnusedParameters: true, }; +/** + * Default compiler options for program generation + */ +const DEFAULT_COMPILER_OPTIONS: ts.CompilerOptions = { + ...CORE_COMPILER_OPTIONS, + allowNonTsExtensions: true, + allowJs: true, + checkJs: true, +}; + function createDefaultCompilerOptionsFromExtra( extra: Extra, ): ts.CompilerOptions { @@ -93,12 +101,37 @@ function getScriptKind( } } +function getExtension(fileName: string | undefined): string | null { + if (!fileName) { + return null; + } + return fileName.endsWith('.d.ts') ? '.d.ts' : path.extname(fileName); +} + +function getAstFromProgram( + currentProgram: Program, + extra: Extra, +): ASTAndProgram | undefined { + const ast = currentProgram.getSourceFile(extra.filePath); + + // working around https://github.com/typescript-eslint/typescript-eslint/issues/1573 + const expectedExt = getExtension(extra.filePath); + const returnedExt = getExtension(ast?.fileName); + if (expectedExt !== returnedExt) { + return undefined; + } + + return ast && { ast, program: currentProgram }; +} + export { ASTAndProgram, + CORE_COMPILER_OPTIONS, canonicalDirname, CanonicalPath, createDefaultCompilerOptionsFromExtra, ensureAbsolutePath, getCanonicalFileName, getScriptKind, + getAstFromProgram, }; diff --git a/packages/typescript-estree/src/create-program/useProvidedProgram.ts b/packages/typescript-estree/src/create-program/useProvidedProgram.ts new file mode 100644 index 000000000000..16aebbf8f69d --- /dev/null +++ b/packages/typescript-estree/src/create-program/useProvidedProgram.ts @@ -0,0 +1,87 @@ +import debug from 'debug'; +import * as fs from 'fs'; +import * as path from 'path'; +import * as ts from 'typescript'; +import { Extra } from '../parser-options'; +import { + ASTAndProgram, + CORE_COMPILER_OPTIONS, + getAstFromProgram, +} from './shared'; + +const log = debug('typescript-eslint:typescript-estree:useProvidedProgram'); + +function useProvidedProgram( + programInstance: ts.Program, + extra: Extra, +): ASTAndProgram | undefined { + log('Retrieving ast for %s from provided program instance', extra.filePath); + + programInstance.getTypeChecker(); // ensure parent pointers are set in source files + + const astAndProgram = getAstFromProgram(programInstance, extra); + + if (!astAndProgram) { + const relativeFilePath = path.relative( + extra.tsconfigRootDir || process.cwd(), + extra.filePath, + ); + const errorLines = [ + '"parserOptions.program" has been provided for @typescript-eslint/parser.', + `The file was not found in the provided program instance: ${relativeFilePath}`, + ]; + + throw new Error(errorLines.join('\n')); + } + + return astAndProgram; +} + +/** + * Utility offered by parser to help consumers construct their own program instance. + * + * @param configFile the path to the tsconfig.json file, relative to `projectDirectory` + * @param projectDirectory the project directory to use as the CWD, defaults to `process.cwd()` + */ +function createProgramFromConfigFile( + configFile: string, + projectDirectory?: string, +): ts.Program { + if (ts.sys === undefined) { + throw new Error( + '`createProgramFromConfigFile` is only supported in a Node-like environment.', + ); + } + + const parsed = ts.getParsedCommandLineOfConfigFile( + configFile, + CORE_COMPILER_OPTIONS, + { + onUnRecoverableConfigFileDiagnostic: diag => { + throw new Error(formatDiagnostics([diag])); // ensures that `parsed` is defined. + }, + fileExists: fs.existsSync, + getCurrentDirectory: () => + (projectDirectory && path.resolve(projectDirectory)) || process.cwd(), + readDirectory: ts.sys.readDirectory, + readFile: file => fs.readFileSync(file, 'utf-8'), + useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames, + }, + ); + const result = parsed!; // parsed is not undefined, since we throw on failure. + if (result.errors.length) { + throw new Error(formatDiagnostics(result.errors)); + } + const host = ts.createCompilerHost(result.options, true); + return ts.createProgram(result.fileNames, result.options, host); +} + +function formatDiagnostics(diagnostics: ts.Diagnostic[]): string | undefined { + return ts.formatDiagnostics(diagnostics, { + getCanonicalFileName: f => f, + getCurrentDirectory: process.cwd, + getNewLine: () => '\n', + }); +} + +export { useProvidedProgram, createProgramFromConfigFile }; diff --git a/packages/typescript-estree/src/index.ts b/packages/typescript-estree/src/index.ts index 81f3d69446b6..c80cd8f9de50 100644 --- a/packages/typescript-estree/src/index.ts +++ b/packages/typescript-estree/src/index.ts @@ -3,6 +3,7 @@ export { ParserServices, TSESTreeOptions } from './parser-options'; export { simpleTraverse } from './simple-traverse'; export * from './ts-estree'; export { clearCaches } from './create-program/createWatchProgram'; +export { createProgramFromConfigFile as createProgram } from './create-program/useProvidedProgram'; // re-export for backwards-compat export { visitorKeys } from '@typescript-eslint/visitor-keys'; diff --git a/packages/typescript-estree/src/parser-options.ts b/packages/typescript-estree/src/parser-options.ts index a3758fffb794..3915d5945ebe 100644 --- a/packages/typescript-estree/src/parser-options.ts +++ b/packages/typescript-estree/src/parser-options.ts @@ -20,6 +20,7 @@ export interface Extra { loc: boolean; log: (message: string) => void; preserveNodeMaps?: boolean; + program: null | Program; projects: CanonicalPath[]; range: boolean; strict: boolean; @@ -169,6 +170,13 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { */ tsconfigRootDir?: string; + /** + * Instance of a TypeScript Program object to be used for type information. + * This overrides any program or programs that would have been computed from the `project` option. + * All linted files must be part of the provided program. + */ + program?: Program; + /** *************************************************************************************** * IT IS RECOMMENDED THAT YOU DO NOT USE THIS OPTION, AS IT CAUSES PERFORMANCE ISSUES. * diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index fdbeaa6fa069..8d6d7df312ff 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -18,6 +18,8 @@ import { ensureAbsolutePath, getCanonicalFileName, } from './create-program/shared'; +import { Program } from 'typescript'; +import { useProvidedProgram } from './create-program/useProvidedProgram'; const log = debug('typescript-eslint:typescript-estree:parser'); @@ -61,10 +63,12 @@ function enforceString(code: unknown): string { */ function getProgramAndAST( code: string, + programInstance: Program | null, shouldProvideParserServices: boolean, shouldCreateDefaultProgram: boolean, ): ASTAndProgram { return ( + (programInstance && useProvidedProgram(programInstance, extra)) || (shouldProvideParserServices && createProjectProgram(code, shouldCreateDefaultProgram, extra)) || (shouldProvideParserServices && @@ -105,6 +109,7 @@ function resetExtra(): void { loc: false, log: console.log, // eslint-disable-line no-console preserveNodeMaps: true, + program: null, projects: [], range: false, strict: false, @@ -264,22 +269,32 @@ function applyParserOptionsToExtra(options: TSESTreeOptions): void { // NOTE - ensureAbsolutePath relies upon having the correct tsconfigRootDir in extra extra.filePath = ensureAbsolutePath(extra.filePath, extra); - const projectFolderIgnoreList = ( - options.projectFolderIgnoreList ?? ['**/node_modules/**'] - ) - .reduce((acc, folder) => { - if (typeof folder === 'string') { - acc.push(folder); - } - return acc; - }, []) - // prefix with a ! for not match glob - .map(folder => (folder.startsWith('!') ? folder : `!${folder}`)); - // NOTE - prepareAndTransformProjects relies upon having the correct tsconfigRootDir in extra - extra.projects = prepareAndTransformProjects( - options.project, - projectFolderIgnoreList, - ); + if (options.program && typeof options.program === 'object') { + extra.program = options.program; + log( + 'parserOptions.program was provided, so parserOptions.project will be ignored.', + ); + } + + if (!extra.program) { + // providing a program overrides project resolution + const projectFolderIgnoreList = ( + options.projectFolderIgnoreList ?? ['**/node_modules/**'] + ) + .reduce((acc, folder) => { + if (typeof folder === 'string') { + acc.push(folder); + } + return acc; + }, []) + // prefix with a ! for not match glob + .map(folder => (folder.startsWith('!') ? folder : `!${folder}`)); + // NOTE - prepareAndTransformProjects relies upon having the correct tsconfigRootDir in extra + extra.projects = prepareAndTransformProjects( + options.project, + projectFolderIgnoreList, + ); + } if ( Array.isArray(options.extraFileExtensions) && @@ -446,13 +461,13 @@ function parseAndGenerateServices( warnAboutTSVersion(); /** - * Generate a full ts.Program in order to be able to provide parser - * services, such as type-checking + * Generate a full ts.Program or offer provided instance in order to be able to provide parser services, such as type-checking */ const shouldProvideParserServices = - extra.projects && extra.projects.length > 0; + extra.program != null || (extra.projects && extra.projects.length > 0); const { ast, program } = getProgramAndAST( code, + extra.program, shouldProvideParserServices, extra.createDefaultProgram, )!; diff --git a/packages/typescript-estree/tests/lib/semanticInfo.test.ts b/packages/typescript-estree/tests/lib/semanticInfo.test.ts index 3d8cb41bd25d..fb6a4cf0e23b 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo.test.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo.test.ts @@ -1,6 +1,6 @@ -import { readFileSync } from 'fs'; +import * as fs from 'fs'; import glob from 'glob'; -import { extname, join, resolve } from 'path'; +import * as path from 'path'; import * as ts from 'typescript'; import { TSESTreeOptions } from '../../src/parser-options'; import { @@ -10,6 +10,7 @@ import { } from '../../tools/test-utils'; import { clearCaches, + createProgram, parseAndGenerateServices, ParseAndGenerateServicesResult, } from '../../src'; @@ -30,7 +31,7 @@ function createOptions(fileName: string): TSESTreeOptions & { cwd?: string } { useJSXTextNode: false, errorOnUnknownASTType: true, filePath: fileName, - tsconfigRootDir: join(process.cwd(), FIXTURES_DIR), + tsconfigRootDir: path.join(process.cwd(), FIXTURES_DIR), project: `./tsconfig.json`, loggerFn: false, }; @@ -42,9 +43,9 @@ beforeEach(() => clearCaches()); describe('semanticInfo', () => { // test all AST snapshots testFiles.forEach(filename => { - const code = readFileSync(join(FIXTURES_DIR, filename), 'utf8'); + const code = fs.readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); it( - formatSnapshotName(filename, FIXTURES_DIR, extname(filename)), + formatSnapshotName(filename, FIXTURES_DIR, path.extname(filename)), createSnapshotTestBlock( code, createOptions(filename), @@ -55,7 +56,7 @@ describe('semanticInfo', () => { it(`should cache the created ts.program`, () => { const filename = testFiles[0]; - const code = readFileSync(join(FIXTURES_DIR, filename), 'utf8'); + const code = fs.readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); const options = createOptions(filename); const optionsProjectString = { ...options, @@ -70,7 +71,7 @@ describe('semanticInfo', () => { it(`should handle "project": "./tsconfig.json" and "project": ["./tsconfig.json"] the same`, () => { const filename = testFiles[0]; - const code = readFileSync(join(FIXTURES_DIR, filename), 'utf8'); + const code = fs.readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); const options = createOptions(filename); const optionsProjectString = { ...options, @@ -87,7 +88,7 @@ describe('semanticInfo', () => { it(`should resolve absolute and relative tsconfig paths the same`, () => { const filename = testFiles[0]; - const code = readFileSync(join(FIXTURES_DIR, filename), 'utf8'); + const code = fs.readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); const options = createOptions(filename); const optionsAbsolutePath = { ...options, @@ -119,9 +120,9 @@ describe('semanticInfo', () => { // case-specific tests it('isolated-file tests', () => { - const fileName = resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const parseResult = parseCodeAndGenerateServices( - readFileSync(fileName, 'utf8'), + fs.readFileSync(fileName, 'utf8'), createOptions(fileName), ); @@ -129,9 +130,9 @@ describe('semanticInfo', () => { }); it('isolated-vue-file tests', () => { - const fileName = resolve(FIXTURES_DIR, 'extra-file-extension.vue'); + const fileName = path.resolve(FIXTURES_DIR, 'extra-file-extension.vue'); const parseResult = parseCodeAndGenerateServices( - readFileSync(fileName, 'utf8'), + fs.readFileSync(fileName, 'utf8'), { ...createOptions(fileName), extraFileExtensions: ['.vue'], @@ -142,9 +143,12 @@ describe('semanticInfo', () => { }); it('non-existent-estree-nodes tests', () => { - const fileName = resolve(FIXTURES_DIR, 'non-existent-estree-nodes.src.ts'); + const fileName = path.resolve( + FIXTURES_DIR, + 'non-existent-estree-nodes.src.ts', + ); const parseResult = parseCodeAndGenerateServices( - readFileSync(fileName, 'utf8'), + fs.readFileSync(fileName, 'utf8'), createOptions(fileName), ); @@ -166,9 +170,9 @@ describe('semanticInfo', () => { }); it('imported-file tests', () => { - const fileName = resolve(FIXTURES_DIR, 'import-file.src.ts'); + const fileName = path.resolve(FIXTURES_DIR, 'import-file.src.ts'); const parseResult = parseCodeAndGenerateServices( - readFileSync(fileName, 'utf8'), + fs.readFileSync(fileName, 'utf8'), createOptions(fileName), ); @@ -242,20 +246,26 @@ describe('semanticInfo', () => { }); it('non-existent project file', () => { - const fileName = resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const badConfig = createOptions(fileName); badConfig.project = './tsconfigs.json'; expect(() => - parseCodeAndGenerateServices(readFileSync(fileName, 'utf8'), badConfig), + parseCodeAndGenerateServices( + fs.readFileSync(fileName, 'utf8'), + badConfig, + ), ).toThrow(/Cannot read file .+tsconfigs\.json'/); }); it('fail to read project file', () => { - const fileName = resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const badConfig = createOptions(fileName); badConfig.project = '.'; expect(() => - parseCodeAndGenerateServices(readFileSync(fileName, 'utf8'), badConfig), + parseCodeAndGenerateServices( + fs.readFileSync(fileName, 'utf8'), + badConfig, + ), ).toThrow( // case insensitive because unix based systems are case insensitive /Cannot read file .+semanticInfo'./i, @@ -263,11 +273,14 @@ describe('semanticInfo', () => { }); it('malformed project file', () => { - const fileName = resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const badConfig = createOptions(fileName); badConfig.project = './badTSConfig/tsconfig.json'; expect(() => - parseCodeAndGenerateServices(readFileSync(fileName, 'utf8'), badConfig), + parseCodeAndGenerateServices( + fs.readFileSync(fileName, 'utf8'), + badConfig, + ), ).toThrowErrorMatchingSnapshot(); }); @@ -279,6 +292,45 @@ describe('semanticInfo', () => { expect(parseResult.services.program).toBeDefined(); }); + + it(`provided program instance is returned in result`, () => { + const filename = testFiles[0]; + const program = createProgram(path.join(FIXTURES_DIR, 'tsconfig.json')); + const code = fs.readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); + const options = createOptions(filename); + const optionsProjectString = { + ...options, + program: program, + project: './tsconfig.json', + }; + const parseResult = parseAndGenerateServices(code, optionsProjectString); + expect(parseResult.services.program).toBe(program); + }); + + it('file not in provided program instance', () => { + const filename = 'non-existant-file.ts'; + const program = createProgram(path.join(FIXTURES_DIR, 'tsconfig.json')); + const options = createOptions(filename); + const optionsProjectString = { + ...options, + program: program, + }; + expect(() => + parseAndGenerateServices('const foo = 5;', optionsProjectString), + ).toThrow( + `The file was not found in the provided program instance: ${filename}`, + ); + }); + + it('createProgram fails on non-existant file', () => { + expect(() => createProgram('tsconfig.non-existant.json')).toThrow(); + }); + + it('createProgram fails on tsconfig with errors', () => { + expect(() => + createProgram(path.join(FIXTURES_DIR, 'badTSConfig', 'tsconfig.json')), + ).toThrow(); + }); }); function testIsolatedFile( From 389418bdb4588dfb1248abed572eecf29a004d94 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Jun 2021 10:12:08 -0700 Subject: [PATCH 179/473] chore: bump ts-jest from 27.0.2 to 27.0.3 (#3500) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 27.0.2 to 27.0.3. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v27.0.2...v27.0.3) --- updated-dependencies: - dependency-name: ts-jest dependency-type: direct:development update-type: version-update:semver-patch ... 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 c26a3fa775e4..393d9d802987 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8799,9 +8799,9 @@ trim-off-newlines@^1.0.0: integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= ts-jest@^27.0.1: - version "27.0.2" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.2.tgz#acc1525d5fd25c107c777c3b80a11365db579aa1" - integrity sha512-pozjHOOfm+sbv9kXCvTFVyDntWvuJztzkNFql/akD75hSMZ2jsbidVauOhBRImAopXohqcLtPK/NTTIS8Y49Ug== + version "27.0.3" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.3.tgz#808492f022296cde19390bb6ad627c8126bf93f8" + integrity sha512-U5rdMjnYam9Ucw+h0QvtNDbc5+88nxt7tbIvqaZUhFrfG4+SkWhMXjejCLVGcpILTPuV+H3W/GZDZrnZFpPeXw== dependencies: bs-logger "0.x" buffer-from "1.x" From 44452dd5a545665c2365f2f747fc7610ea0eb686 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Jun 2021 10:12:19 -0700 Subject: [PATCH 180/473] chore: bump @types/node from 15.6.1 to 15.12.2 (#3501) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.6.1 to 15.12.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... 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 393d9d802987..7f5f6b6e92f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2037,9 +2037,9 @@ form-data "^3.0.0" "@types/node@*", "@types/node@10.17.13", "@types/node@>= 8", "@types/node@^15.6.1": - version "15.6.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.6.1.tgz#32d43390d5c62c5b6ec486a9bc9c59544de39a08" - integrity sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA== + version "15.12.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.2.tgz#1f2b42c4be7156ff4a6f914b2fb03d05fa84e38d" + integrity sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww== "@types/normalize-package-data@^2.4.0": version "2.4.0" From 33b9f69a681cd3219a2acca5b0b2fa67609f099e Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Wed, 9 Jun 2021 14:57:39 +0900 Subject: [PATCH 181/473] fix(typescript-estree): support override modifier for parameter property (#3485) --- .../src/parameter/TSParameterProperty/spec.ts | 1 + ...d-parameter-property-with-modifiers.src.ts | 3 + ...ter-proptery-with-override-modifier.src.ts | 5 + packages/typescript-estree/src/convert.ts | 2 + .../tests/ast-alignment/fixtures-to-test.ts | 6 + .../semantic-diagnostics-enabled.test.ts.snap | 4 + ...ameter-property-with-modifiers.src.ts.shot | 559 +++++++++++++++ ...roptery-with-override-modifier.src.ts.shot | 649 ++++++++++++++++++ ...th-export-parameter-properties.src.ts.shot | 1 + ...h-private-parameter-properties.src.ts.shot | 4 + ...protected-parameter-properties.src.ts.shot | 4 + ...th-public-parameter-properties.src.ts.shot | 4 + ...-readonly-parameter-properties.src.ts.shot | 2 + ...th-static-parameter-properties.src.ts.shot | 1 + ...e-with-parameter-accessibility.src.ts.shot | 2 + .../nested-internal-module.src.ts.shot | 2 + 16 files changed, 1249 insertions(+) create mode 100644 packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts create mode 100644 packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts create mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts.shot create mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts.shot diff --git a/packages/ast-spec/src/parameter/TSParameterProperty/spec.ts b/packages/ast-spec/src/parameter/TSParameterProperty/spec.ts index d04e49fd98b8..0cf3c4a911d0 100644 --- a/packages/ast-spec/src/parameter/TSParameterProperty/spec.ts +++ b/packages/ast-spec/src/parameter/TSParameterProperty/spec.ts @@ -12,6 +12,7 @@ export interface TSParameterProperty extends BaseNode { readonly?: boolean; static?: boolean; export?: boolean; + override?: boolean; parameter: AssignmentPattern | BindingName | RestElement; decorators?: Decorator[]; } diff --git a/packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts new file mode 100644 index 000000000000..846318396d4e --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts @@ -0,0 +1,3 @@ +class SpecializedComponent extends SomeComponent { + constructor(protected override readonly param: string) {} +} diff --git a/packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts new file mode 100644 index 000000000000..2c734ff5c607 --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts @@ -0,0 +1,5 @@ +class SpecializedComponent extends SomeComponent { + constructor(override param: string) { + super(); + } +} diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 2a0c8ff4b2eb..8ffa10ab9181 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1585,6 +1585,8 @@ export class Converter { hasModifier(SyntaxKind.ReadonlyKeyword, node) || undefined, static: hasModifier(SyntaxKind.StaticKeyword, node) || undefined, export: hasModifier(SyntaxKind.ExportKeyword, node) || undefined, + override: + hasModifier(SyntaxKind.OverrideKeyword, node) || undefined, parameter: result, }); } diff --git a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts index cab81a426fe1..92eb7909f457 100644 --- a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts +++ b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts @@ -386,6 +386,12 @@ tester.addFixturePatternConfig('typescript/basics', { * This is intentional; babel is not checking types */ 'catch-clause-with-invalid-annotation', + /** + * [BABEL ERRORED, BUT TS-ESTREE DID NOT] + * SyntaxError: Unexpected token, expected "," + */ + 'class-with-constructor-and-parameter-property-with-modifiers', + 'class-with-constructor-and-parameter-proptery-with-override-modifier', ], ignoreSourceType: [ /** diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap index b8cf71c020cd..7a972315f315 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap @@ -1746,6 +1746,10 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-modifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-return-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts.shot new file mode 100644 index 000000000000..c05e61d23707 --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts.shot @@ -0,0 +1,559 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics class-with-constructor-and-parameter-property-with-modifiers.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 53, + 64, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": false, + "range": Array [ + 53, + 110, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 57, + "line": 2, + }, + }, + "range": Array [ + 108, + 110, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "params": Array [ + Object { + "accessibility": "protected", + "export": undefined, + "loc": Object { + "end": Object { + "column": 55, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "override": true, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 2, + }, + "start": Object { + "column": 42, + "line": 2, + }, + }, + "name": "param", + "range": Array [ + 93, + 106, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 2, + }, + "start": Object { + "column": 47, + "line": 2, + }, + }, + "range": Array [ + 98, + 106, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 2, + }, + "start": Object { + "column": 49, + "line": 2, + }, + }, + "range": Array [ + 100, + 106, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 65, + 106, + ], + "readonly": true, + "static": undefined, + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 64, + 110, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 112, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "SpecializedComponent", + "range": Array [ + 6, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 112, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "SomeComponent", + "range": Array [ + 35, + 48, + ], + "type": "Identifier", + }, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 113, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 26, + ], + "type": "Identifier", + "value": "SpecializedComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 34, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 48, + ], + "type": "Identifier", + "value": "SomeComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 53, + 64, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 65, + 74, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 75, + 83, + ], + "type": "Identifier", + "value": "override", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 84, + 92, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 2, + }, + "start": Object { + "column": 42, + "line": 2, + }, + }, + "range": Array [ + 93, + 98, + ], + "type": "Identifier", + "value": "param", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 2, + }, + "start": Object { + "column": 47, + "line": 2, + }, + }, + "range": Array [ + 98, + 99, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 2, + }, + "start": Object { + "column": 49, + "line": 2, + }, + }, + "range": Array [ + 100, + 106, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 2, + }, + "start": Object { + "column": 55, + "line": 2, + }, + }, + "range": Array [ + 106, + 107, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 58, + "line": 2, + }, + "start": Object { + "column": 57, + "line": 2, + }, + }, + "range": Array [ + 108, + 109, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 58, + "line": 2, + }, + }, + "range": Array [ + 109, + 110, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 111, + 112, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts.shot new file mode 100644 index 000000000000..2ab13d8e51c6 --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts.shot @@ -0,0 +1,649 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics class-with-constructor-and-parameter-proptery-with-override-modifier.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 53, + 64, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": false, + "range": Array [ + 53, + 109, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 97, + 102, + ], + "type": "Super", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "optional": false, + "range": Array [ + 97, + 104, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 97, + 105, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 38, + "line": 2, + }, + }, + "range": Array [ + 89, + 109, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "params": Array [ + Object { + "accessibility": undefined, + "export": undefined, + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "override": true, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "name": "param", + "range": Array [ + 74, + 87, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 79, + 87, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 81, + 87, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 65, + 87, + ], + "readonly": undefined, + "static": undefined, + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 64, + 109, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 111, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "SpecializedComponent", + "range": Array [ + 6, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 111, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "SomeComponent", + "range": Array [ + 35, + 48, + ], + "type": "Identifier", + }, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 112, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 26, + ], + "type": "Identifier", + "value": "SpecializedComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 34, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 48, + ], + "type": "Identifier", + "value": "SomeComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 53, + 64, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 65, + 73, + ], + "type": "Identifier", + "value": "override", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 74, + 79, + ], + "type": "Identifier", + "value": "param", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 79, + 80, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 81, + 87, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "range": Array [ + 87, + 88, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 2, + }, + }, + "range": Array [ + 89, + 90, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 97, + 102, + ], + "type": "Keyword", + "value": "super", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 102, + 103, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 103, + 104, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "range": Array [ + 104, + 105, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 108, + 109, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 110, + 111, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot index 57fd7fb7ff7a..274ac4ac7c7c 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot @@ -91,6 +91,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot index b4662a489b0b..72e5749ba0f1 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot @@ -91,6 +91,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -164,6 +165,7 @@ Object { "line": 3, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -237,6 +239,7 @@ Object { "line": 4, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { @@ -346,6 +349,7 @@ Object { "line": 5, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot index 0248c45f7818..7e87ef2df91e 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot @@ -91,6 +91,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -164,6 +165,7 @@ Object { "line": 3, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -237,6 +239,7 @@ Object { "line": 4, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { @@ -346,6 +349,7 @@ Object { "line": 5, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot index bd27cd8449be..363608735e5e 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot @@ -91,6 +91,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -164,6 +165,7 @@ Object { "line": 3, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -237,6 +239,7 @@ Object { "line": 4, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { @@ -346,6 +349,7 @@ Object { "line": 5, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot index a33a42f2d7d5..225de104f5ed 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot @@ -91,6 +91,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -164,6 +165,7 @@ Object { "line": 3, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot index 41e85e115fc3..9287f9c1d21c 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot @@ -91,6 +91,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.shot index 6f1327b0808f..75ad28bb7599 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.shot @@ -31,6 +31,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -70,6 +71,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot index 32b6bf5d3bdf..c744f34b9000 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot @@ -189,6 +189,7 @@ Object { "line": 5, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -262,6 +263,7 @@ Object { "line": 5, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { From ced9b26ce088eb4b3a39ddb0c5342373725c9912 Mon Sep 17 00:00:00 2001 From: James Henry Date: Wed, 9 Jun 2021 11:47:52 +0400 Subject: [PATCH 182/473] chore: add nx monorepo tooling (#3465) --- .github/workflows/ci.yml | 69 ++-- .github/workflows/generate-contributors.yml | 2 +- CONTRIBUTING.md | 6 +- nx.json | 66 ++++ package.json | 34 +- packages/eslint-plugin/package.json | 4 +- workspace.json | 49 +++ yarn.lock | 418 ++++++++++++++++++-- 8 files changed, 550 insertions(+), 98 deletions(-) create mode 100644 nx.json create mode 100644 workspace.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e1a349e5aa3..ca2816fa5baf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,14 +4,14 @@ on: push: branches: - master - # TODO - delete this before merging v4 into master - - v4 pull_request: branches: - '**' env: PRIMARY_NODE_VERSION: 12 + NX_BRANCH: ${{ github.event.number }} + NX_RUN_GROUP: ${{ github.run_id }} jobs: typecheck: @@ -43,7 +43,7 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn check:clean-workspace-after-install + yarn check-clean-workspace-after-install - name: Build run: | @@ -85,57 +85,49 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn check:clean-workspace-after-install + yarn check-clean-workspace-after-install - name: Build run: | yarn build - name: Run unit tests for typescript-estree - run: yarn test - working-directory: packages/typescript-estree + run: npx nx test @typescript-eslint/typescript-estree env: CI: true - name: Run unit tests for visitor-keys - run: yarn test - working-directory: packages/visitor-keys + run: npx nx test @typescript-eslint/visitor-keys env: CI: true - name: Run unit tests for scope-manager - run: yarn test - working-directory: packages/scope-manager + run: npx nx test @typescript-eslint/scope-manager env: CI: true - name: Run unit tests for experimental-utils - run: yarn test - working-directory: packages/experimental-utils + run: npx nx test @typescript-eslint/experimental-utils env: CI: true - name: Run unit tests for parser - run: yarn test - working-directory: packages/parser + run: npx nx test @typescript-eslint/parser env: CI: true - name: Run unit tests for eslint-plugin - run: yarn test - working-directory: packages/eslint-plugin + run: npx nx test @typescript-eslint/eslint-plugin env: CI: true - name: Run unit tests for eslint-plugin-tslint - run: yarn test - working-directory: packages/eslint-plugin-tslint + run: npx nx test @typescript-eslint/eslint-plugin-tslint env: CI: true - name: Run unit tests for eslint-plugin-internal - run: yarn test - working-directory: packages/eslint-plugin-internal + run: npx nx test @typescript-eslint/eslint-plugin-internal env: CI: true @@ -171,23 +163,23 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn check:clean-workspace-after-install + yarn check-clean-workspace-after-install - name: Build run: | yarn build - name: Check code formatting - run: yarn check:format + run: yarn check-format - name: Lint code run: yarn lint - name: Lint markdown - run: yarn lint:markdown + run: yarn lint-markdown - name: Check spelling - run: yarn check:spelling + run: yarn check-spelling integration_tests: name: Run integration tests on primary Node.js version @@ -214,14 +206,14 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn check:clean-workspace-after-install + yarn check-clean-workspace-after-install - name: Build run: | yarn build - name: Run integrations tests - run: yarn test:integration + run: yarn test-integration env: CI: true @@ -253,51 +245,44 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn check:clean-workspace-after-install + yarn check-clean-workspace-after-install - name: Build run: | yarn build - name: Run unit tests for typescript-estree - run: yarn test - working-directory: packages/typescript-estree + run: npx nx test @typescript-eslint/typescript-estree env: CI: true - name: Run unit tests for visitor-keys - run: yarn test - working-directory: packages/visitor-keys + run: npx nx test @typescript-eslint/visitor-keys env: CI: true - name: Run unit tests for scope-manager - run: yarn test - working-directory: packages/scope-manager + run: npx nx test @typescript-eslint/scope-manager env: CI: true - name: Run unit tests for experimental-utils - run: yarn test - working-directory: packages/experimental-utils + run: npx nx test @typescript-eslint/experimental-utils env: CI: true - name: Run unit tests for parser - run: yarn test - working-directory: packages/parser + run: npx nx test @typescript-eslint/parser env: CI: true - name: Run unit tests for eslint-plugin - run: yarn test - working-directory: packages/eslint-plugin + run: npx nx test @typescript-eslint/eslint-plugin env: CI: true - name: Run unit tests for eslint-plugin-tslint - run: yarn test - working-directory: packages/eslint-plugin-tslint + run: npx nx test @typescript-eslint/eslint-plugin-tslint env: CI: true @@ -335,7 +320,7 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn check:clean-workspace-after-install + yarn check-clean-workspace-after-install - name: Build run: | diff --git a/.github/workflows/generate-contributors.yml b/.github/workflows/generate-contributors.yml index c45a78430669..c1d29f1fda2a 100644 --- a/.github/workflows/generate-contributors.yml +++ b/.github/workflows/generate-contributors.yml @@ -35,7 +35,7 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts - name: Generate contributors - run: yarn generate:contributors + run: yarn generate-contributors - name: Create Pull Request uses: peter-evans/create-pull-request@v3 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c8a732fc417b..f742bdd75e93 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,12 +55,12 @@ We have a sophisticated CI process setup which gets run on every PR. You must pa - Coverage reports should automatically be generated locally, and the `codecov` bot should also comment on your PR with the percentage, as well as links to the line-by-line coverage of each file touched by your PR. - Ensure you have no lint errors. - You can run `yarn lint` in any package or in the root. - - You can run `yarn lint:markdown` in the root. + - You can run `yarn lint-markdown` in the root. - If you have made changes to any markdown documentation, ensure there are no spelling errors - - You can run `yarn check:spelling` in the root. + - You can run `yarn check-spelling` in the root. - Or if you are using vscode, you can use [`Code Spell Checker`](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) plugin. - If you have made changes within the `eslint-plugin` package, ensure the configs and documentation are valid. - - You can run `yarn check:configs` and `yarn check:docs` in the root, or in the `eslint-plugin` folder. + - You can run `yarn check-configs` and `yarn check-docs` in the root, or in the `eslint-plugin` folder. ### Raising a PR diff --git a/nx.json b/nx.json new file mode 100644 index 000000000000..361ed34b99a8 --- /dev/null +++ b/nx.json @@ -0,0 +1,66 @@ +{ + "npmScope": "typescript-eslint", + "implicitDependencies": { + "workspace.json": "*", + "package.json": { + "dependencies": "*", + "devDependencies": "*" + }, + "nx.json": "*", + ".github/workflows/ci.yml": "*" + }, + "workspaceLayout": { + "libsDir": "packages" + }, + "tasksRunnerOptions": { + "default": { + "runner": "@nrwl/nx-cloud", + "options": { + "cacheableOperations": ["build", "test", "package", "prepare"], + "strictlyOrderedTargets": ["build", "package", "prepare"], + "accessToken": "YjFjNTBhOWUtY2JmNy00ZDhiLWE5N2UtZjliNDAwNmIzOTdjfHJlYWQtd3JpdGU=", + "canTrackAnalytics": false, + "showUsageWarnings": true, + "runtimeCacheInputs": ["node -v"] + } + } + }, + "projects": { + "@typescript-eslint/ast-spec": { + "implicitDependencies": [] + }, + "@typescript-eslint/eslint-plugin": { + "implicitDependencies": [] + }, + "@typescript-eslint/eslint-plugin-internal": { + "implicitDependencies": [] + }, + "@typescript-eslint/eslint-plugin-tslint": { + "implicitDependencies": [] + }, + "@typescript-eslint/experimental-utils": { + "implicitDependencies": [] + }, + "@typescript-eslint/parser": { + "implicitDependencies": [] + }, + "@typescript-eslint/scope-manager": { + "implicitDependencies": [] + }, + "@typescript-eslint/shared-fixtures": { + "implicitDependencies": [] + }, + "@typescript-eslint/types": { + "implicitDependencies": ["@typescript-eslint/ast-spec"] + }, + "@typescript-eslint/typescript-estree": { + "implicitDependencies": [] + }, + "@typescript-eslint/visitor-keys": { + "implicitDependencies": [] + } + }, + "affected": { + "defaultBase": "master" + } +} diff --git a/package.json b/package.json index 7d4bc600bec3..e4c07d58f0ef 100644 --- a/package.json +++ b/package.json @@ -17,27 +17,27 @@ "url": "https://github.com/typescript-eslint/typescript-eslint/issues" }, "scripts": { - "build": "lerna run build --ignore ast-spec", - "check:clean-workspace-after-install": "git diff --quiet --exit-code", - "check:configs": "lerna run check:configs", - "check:docs": "lerna run check:docs", - "check:format": "prettier --list-different \"./**/*.{ts,js,json,md}\"", - "check:spelling": "cspell --config=.cspell.json \"**/*.{md,ts,js}\"", + "build": "npx nx prebuild @typescript-eslint/types && nx run-many --target=build --all --parallel", + "check-clean-workspace-after-install": "git diff --quiet --exit-code", + "check-configs": "nx run-many --target=check-configs --all --parallel", + "check-docs": "nx run-many --target=check-docs --all --parallel", + "check-format": "prettier --list-different \"./**/*.{ts,js,json,md}\"", + "check-spelling": "cspell --config=.cspell.json \"**/*.{md,ts,js}\"", "clean": "lerna clean && lerna run clean", "cz": "git-cz", "format": "prettier --write \"./**/*.{ts,js,json,md}\"", - "generate:contributors": "yarn ts-node --transpile-only ./tools/generate-contributors.ts && yarn all-contributors generate", - "lint:fix": "eslint . --ext .js,.ts --fix", - "lint:markdown:fix": "yarn lint:markdown --fix", - "lint:markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore", + "generate-contributors": "yarn ts-node --transpile-only ./tools/generate-contributors.ts && yarn all-contributors generate", + "lint-fix": "eslint . --ext .js,.ts --fix", + "lint-markdown-fix": "yarn lint-markdown --fix", + "lint-markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore", "lint": "eslint . --ext .js,.ts", "postinstall": "yarn husky install && yarn build", "pre-commit": "yarn lint-staged", - "pre-push": "yarn check:format", - "test": "lerna run test --concurrency 1", - "test:integration": "./tests/integration/run-all-tests.sh", - "test:kill-integration-containers": "docker-compose -f tests/integration/docker-compose.yml down -v --rmi local", - "typecheck": "lerna run typecheck" + "pre-push": "yarn check-format", + "test": "nx run-many --target=test --all --parallel", + "test-integration": "./tests/integration/run-all-tests.sh", + "test-kill-integration-containers": "docker-compose -f tests/integration/docker-compose.yml down -v --rmi local", + "typecheck": "nx run-many --target=typecheck --all --parallel" }, "config": { "commitizen": { @@ -77,6 +77,10 @@ "@commitlint/cli": "^12.1.4", "@commitlint/config-conventional": "^12.1.4", "@commitlint/config-lerna-scopes": "^12.1.4", + "@nrwl/cli": "^12.3.5", + "@nrwl/nx-cloud": "^12.1.3", + "@nrwl/tao": "^12.3.5", + "@nrwl/workspace": "^12.3.5", "@types/babel__code-frame": "^7.0.2", "@types/debug": "^4.1.5", "@types/eslint-visitor-keys": "^1.0.0", diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 8f23087a053d..b00b019d7337 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -32,8 +32,8 @@ "types": "index.d.ts", "scripts": { "build": "tsc -b tsconfig.build.json", - "check:docs": "jest tests/docs.test.ts --runTestsByPath --silent --runInBand", - "check:configs": "jest tests/configs.test.ts --runTestsByPath --silent --runInBand", + "check-docs": "jest tests/docs.test.ts --runTestsByPath --silent --runInBand", + "check-configs": "jest tests/configs.test.ts --runTestsByPath --silent --runInBand", "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf coverage", "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", diff --git a/workspace.json b/workspace.json new file mode 100644 index 000000000000..8ff120441560 --- /dev/null +++ b/workspace.json @@ -0,0 +1,49 @@ +{ + "version": 2, + "projects": { + "@typescript-eslint/ast-spec": { + "root": "packages/ast-spec", + "type": "library" + }, + "@typescript-eslint/eslint-plugin": { + "root": "packages/eslint-plugin", + "type": "library" + }, + "@typescript-eslint/eslint-plugin-internal": { + "root": "packages/eslint-plugin-internal", + "type": "library" + }, + "@typescript-eslint/eslint-plugin-tslint": { + "root": "packages/eslint-plugin-tslint", + "type": "library" + }, + "@typescript-eslint/experimental-utils": { + "root": "packages/experimental-utils", + "type": "library" + }, + "@typescript-eslint/parser": { + "root": "packages/parser", + "type": "library" + }, + "@typescript-eslint/scope-manager": { + "root": "packages/scope-manager", + "type": "library" + }, + "@typescript-eslint/shared-fixtures": { + "root": "packages/shared-fixtures", + "type": "library" + }, + "@typescript-eslint/types": { + "root": "packages/types", + "type": "library" + }, + "@typescript-eslint/typescript-estree": { + "root": "packages/typescript-estree", + "type": "library" + }, + "@typescript-eslint/visitor-keys": { + "root": "packages/visitor-keys", + "type": "library" + } + } +} diff --git a/yarn.lock b/yarn.lock index 7f5f6b6e92f4..793ab3f9327d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -933,6 +933,17 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" +"@jest/types@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" + integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + "@jest/types@^27.0.2": version "27.0.2" resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.0.2.tgz#e153d6c46bda0f2589f0702b071f9898c7bbd37e" @@ -1705,6 +1716,109 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@nrwl/cli@12.3.5", "@nrwl/cli@^12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.3.5.tgz#15a4011990cc8cfae660addc7abcf6a3f7402107" + integrity sha512-iAH90jevQW3G9KPtEg9b14g1zMxrsxgRYQfkZDXijx21yJGDieJh1mCIewpy5jcEBS+ODQKvant0XdyhS/kUBw== + dependencies: + "@nrwl/tao" "12.3.5" + chalk "4.1.0" + v8-compile-cache "2.3.0" + yargs "15.4.1" + yargs-parser "20.0.0" + +"@nrwl/devkit@12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.3.5.tgz#5b1a9382f9a51f12ce133a95eb4d6731fc2cda03" + integrity sha512-bZi2WNHAAy/nSHAlA7r8zGpLuWPeurTbwBeNH9gm3It19fV5+hWoL1/pPlDBr2xEWjJQJNmWikxonxhw2ZIpGw== + dependencies: + "@nrwl/tao" "12.3.5" + ejs "^3.1.5" + ignore "^5.0.4" + semver "7.3.4" + strip-json-comments "^3.1.1" + tslib "^2.0.0" + +"@nrwl/jest@12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.3.5.tgz#6e74902cc290b8a7c6cdcf937d4634c4befea59e" + integrity sha512-pFaDcr7tGbYQ7NrWlym0cKAXFtphqLq8KlEoWM0aQcBQxv9VZtj4N8dwYPXPMAiAGYKYqgt9e74rgvN+bGeS1g== + dependencies: + "@nrwl/devkit" "12.3.5" + jest-resolve "^26.6.2" + rxjs "^6.5.4" + strip-json-comments "^3.1.1" + tslib "^2.0.0" + +"@nrwl/linter@12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.3.5.tgz#3224926a936b60e31c74b63efd7c97fce511610a" + integrity sha512-6YhjlDZFb2dk0kphdLUELj99bAhG/So+CO1E8/eJsTvK4Mf7LySaTamabR9meSJW7yu2WKxiIIm4Z69IBI1bNQ== + dependencies: + "@nrwl/devkit" "12.3.5" + glob "7.1.4" + minimatch "3.0.4" + tmp "~0.2.1" + tslib "^2.0.0" + +"@nrwl/nx-cloud@^12.1.3": + version "12.1.3" + resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.1.3.tgz#a22b34b787ecebade1c7fcb21e6c1cf765b80d3b" + integrity sha512-IC+CNSXGuInEnIwDS6wVl25vQJm5z9Duh1PzP5k0e30JcoUTqjL08KKwvzo8cmKpUvgLNo3rABc5J5F+fXaJGQ== + dependencies: + axios "^0.21.1" + chalk "4.1.0" + node-machine-id "^1.1.12" + rxjs "6.5.5" + strip-json-comments "^3.1.1" + tar "5.0.5" + uuid "^3.3.3" + +"@nrwl/tao@12.3.5", "@nrwl/tao@^12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.3.5.tgz#7cbc65a561e5f9255403dc55bddf0f9a6743397c" + integrity sha512-K/Q0GsrLzqXubmLgm8tFSjvrG61lQ00DrtNZ5dHywOAXREeV11A0bR7lXVDTohABk3D9Wgly5IKZPZ3iUwscsg== + dependencies: + chalk "4.1.0" + enquirer "~2.3.6" + fs-extra "^9.1.0" + rxjs "^6.5.4" + rxjs-for-await "0.0.2" + semver "7.3.4" + strip-json-comments "^3.1.1" + tmp "~0.2.1" + tslib "^2.0.0" + yargs-parser "20.0.0" + +"@nrwl/workspace@^12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.3.5.tgz#1e3c0ba31bf45ba18a958a7bf99b938631eae9eb" + integrity sha512-mawmYJBxjjiqGKQPu7bqtAhuWFj1vzK+VVUuGlItDM+mJuDFLrOZqVAQL/SJOVPS0qRpYTBiWrdF4ZsLTEa8LQ== + dependencies: + "@nrwl/cli" "12.3.5" + "@nrwl/devkit" "12.3.5" + "@nrwl/jest" "12.3.5" + "@nrwl/linter" "12.3.5" + chalk "4.1.0" + cosmiconfig "^4.0.0" + dotenv "8.2.0" + enquirer "~2.3.6" + flat "^5.0.2" + fs-extra "^9.1.0" + glob "7.1.4" + ignore "^5.0.4" + minimatch "3.0.4" + npm-run-all "^4.1.5" + open "^7.4.2" + resolve "1.17.0" + rxjs "^6.5.4" + semver "7.3.4" + strip-json-comments "^3.1.1" + tmp "~0.2.1" + tslib "^2.0.0" + yargs "15.4.1" + yargs-parser "20.0.0" + "@octokit/auth-token@^2.4.0": version "2.4.2" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a" @@ -2084,6 +2198,13 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA== +"@types/yargs@^15.0.0": + version "15.0.13" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.13.tgz#34f7fec8b389d7f3c1fd08026a5763e072d3c6dc" + integrity sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ== + dependencies: + "@types/yargs-parser" "*" + "@types/yargs@^16.0.0": version "16.0.3" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.3.tgz#4b6d35bb8e680510a7dc2308518a80ee1ef27e01" @@ -2432,6 +2553,11 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== +async@0.9.x: + version "0.9.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" + integrity sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0= + async@^3.0.1: version "3.2.0" resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" @@ -2467,6 +2593,13 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== +axios@^0.21.1: + version "0.21.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" + integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== + dependencies: + follow-redirects "^1.10.0" + babel-jest@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.2.tgz#7dc18adb01322acce62c2af76ea2c7cd186ade37" @@ -2788,6 +2921,14 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= +chalk@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chalk@^2.0.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -2815,7 +2956,7 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -chownr@^1.1.1, chownr@^1.1.2: +chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.3: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -3238,6 +3379,16 @@ core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +cosmiconfig@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" + integrity sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ== + dependencies: + is-directory "^0.3.1" + js-yaml "^3.9.0" + parse-json "^4.0.0" + require-from-string "^2.0.1" + cosmiconfig@^5.1.0: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" @@ -3264,7 +3415,7 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -cross-spawn@^6.0.0: +cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -3659,6 +3810,11 @@ dot-prop@^5.1.0, dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" +dotenv@8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + downlevel-dts@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/downlevel-dts/-/downlevel-dts-0.7.0.tgz#155c24310dad8a4820ad077e64b15a8c461aa932" @@ -3691,6 +3847,13 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +ejs@^3.1.5: + version "3.1.6" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.6.tgz#5bfd0a0689743bb5268b3550cceeebbc1702822a" + integrity sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw== + dependencies: + jake "^10.6.1" + electron-to-chromium@^1.3.723: version "1.3.736" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.736.tgz#f632d900a1f788dab22fec9c62ec5c9c8f0c4052" @@ -3725,7 +3888,7 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enquirer@^2.3.5, enquirer@^2.3.6: +enquirer@^2.3.5, enquirer@^2.3.6, enquirer@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -4220,6 +4383,13 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" +filelist@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.2.tgz#80202f21462d4d1c2e214119b1807c1bc0380e5b" + integrity sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ== + dependencies: + minimatch "^3.0.4" + fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" @@ -4306,6 +4476,11 @@ flat-cache@^3.0.4: flatted "^3.1.0" rimraf "^3.0.2" +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + flatted@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" @@ -4319,6 +4494,11 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" +follow-redirects@^1.10.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43" + integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg== + for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -4380,7 +4560,7 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^9.0.0: +fs-extra@^9.0.0, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== @@ -4406,6 +4586,13 @@ fs-minipass@^1.2.5: dependencies: minipass "^2.6.0" +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" @@ -4937,7 +5124,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.0.5, ignore@^5.1.4, ignore@~5.1.8: +ignore@^5.0.4, ignore@^5.0.5, ignore@^5.1.4, ignore@~5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -5205,6 +5392,11 @@ is-directory@^0.3.1: resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -5386,6 +5578,13 @@ is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== +is-wsl@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -5459,6 +5658,16 @@ iterable-to-stream@^2.0.0: resolved "https://registry.yarnpkg.com/iterable-to-stream/-/iterable-to-stream-2.0.0.tgz#8cc654ab9b1011dc138e681fee2c0f0bb3cc7e3c" integrity sha512-efkLePxXjJk92hvN+2rS3tGJTRn8/tqXjmZvPI6LQ29xCj2sUF4zW8hkMsVe3jpTkxtMZ89xsKnz9FaRqNWM6g== +jake@^10.6.1: + version "10.8.2" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.2.tgz#ebc9de8558160a66d82d0eadc6a2e58fbc500a7b" + integrity sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A== + dependencies: + async "0.9.x" + chalk "^2.4.2" + filelist "^1.0.1" + minimatch "^3.0.4" + jest-changed-files@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.0.2.tgz#997253042b4a032950fc5f56abf3c5d1f8560801" @@ -5700,6 +5909,20 @@ jest-resolve-dependencies@^27.0.4: jest-regex-util "^27.0.1" jest-snapshot "^27.0.4" +jest-resolve@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.2.tgz#a3ab1517217f469b504f1b56603c5bb541fbb507" + integrity sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ== + dependencies: + "@jest/types" "^26.6.2" + chalk "^4.0.0" + graceful-fs "^4.2.4" + jest-pnp-resolver "^1.2.2" + jest-util "^26.6.2" + read-pkg-up "^7.0.1" + resolve "^1.18.1" + slash "^3.0.0" + jest-resolve@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.0.2.tgz#087a3ed17182722a3415f92bfacc99c49cf8a965" @@ -5865,6 +6088,18 @@ jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: dependencies: jest-snapshot "^27.0.2" +jest-util@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" + integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== + dependencies: + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + micromatch "^4.0.2" + jest-util@^27.0.0, jest-util@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.0.2.tgz#fc2c7ace3c75ae561cf1e5fdb643bf685a5be7c7" @@ -5930,7 +6165,7 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.1: +js-yaml@^3.13.1, js-yaml@^3.9.0: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -6532,6 +6767,11 @@ mdurl@^1.0.1: resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= + meow@^3.3.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" @@ -6649,7 +6889,7 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimatch@^3.0.4, minimatch@~3.0.4: +minimatch@3.0.4, minimatch@^3.0.4, minimatch@~3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -6686,6 +6926,13 @@ minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" +minipass@^3.0.0: + version "3.1.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" + integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== + dependencies: + yallist "^4.0.0" + minizlib@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" @@ -6693,6 +6940,14 @@ minizlib@^1.2.1: dependencies: minipass "^2.9.0" +minizlib@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" @@ -6860,6 +7115,11 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= +node-machine-id@^1.1.12: + version "1.1.12" + resolved "https://registry.yarnpkg.com/node-machine-id/-/node-machine-id-1.1.12.tgz#37904eee1e59b320bb9c5d6c0a59f3b469cb6267" + integrity sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ== + node-modules-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" @@ -6952,6 +7212,21 @@ npm-pick-manifest@^3.0.0: npm-package-arg "^6.0.0" semver "^5.4.1" +npm-run-all@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.5.tgz#04476202a15ee0e2e214080861bff12a51d98fba" + integrity sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ== + dependencies: + ansi-styles "^3.2.1" + chalk "^2.4.1" + cross-spawn "^6.0.5" + memorystream "^0.3.1" + minimatch "^3.0.4" + pidtree "^0.3.0" + read-pkg "^3.0.0" + shell-quote "^1.6.1" + string.prototype.padend "^3.0.0" + npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -7082,6 +7357,14 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +open@^7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -7408,6 +7691,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.3.tgz#465547f359ccc206d3c48e46a1bcb89bf7ee619d" integrity sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg== +pidtree@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.1.tgz#ef09ac2cc0533df1f3250ccf2c4d366b0d12114a" + integrity sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA== + pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -7852,7 +8140,7 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-from-string@^2.0.2: +require-from-string@^2.0.1, require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== @@ -7918,7 +8206,14 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.20.0, resolve@^1.3.2: +resolve@1.17.0, resolve@~1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.18.1, resolve@^1.20.0, resolve@^1.3.2: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -7926,13 +8221,6 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.20.0, resolve@^1.3. is-core-module "^2.2.0" path-parse "^1.0.6" -resolve@~1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== - dependencies: - path-parse "^1.0.6" - resolve@~1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" @@ -8003,7 +8291,19 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.7: +rxjs-for-await@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/rxjs-for-await/-/rxjs-for-await-0.0.2.tgz#26598a1d6167147cc192172970e7eed4e620384b" + integrity sha512-IJ8R/ZCFMHOcDIqoABs82jal00VrZx8Xkgfe7TOKoaRPAW5nH/VFlG23bXpeGdrmtqI9UobFPgUKgCuFc7Lncw== + +rxjs@6.5.5: + version "6.5.5" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" + integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== + dependencies: + tslib "^1.9.0" + +rxjs@^6.4.0, rxjs@^6.5.4, rxjs@^6.6.0, rxjs@^6.6.7: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== @@ -8049,6 +8349,13 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== +semver@7.3.4: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + semver@7.3.5, semver@7.x, semver@^7.2.1, semver@^7.3.2, semver@^7.3.5, semver@~7.3.0: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" @@ -8107,6 +8414,11 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +shell-quote@^1.6.1: + version "1.7.2" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" + integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== + shelljs@^0.8.3: version "0.8.4" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" @@ -8406,6 +8718,15 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string.prototype.padend@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.2.tgz#6858ca4f35c5268ebd5e8615e1327d55f59ee311" + integrity sha512-/AQFLdYvePENU3W5rgurfWSMU6n+Ww8n/3cUt7E+vPBB/D7YDG8x+qjoFs4M/alR2bW7Qg6xMjVwWUOvuQ0XpQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + string.prototype.trimend@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" @@ -8589,6 +8910,18 @@ table@^6.0.9: string-width "^4.2.0" strip-ansi "^6.0.0" +tar@5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/tar/-/tar-5.0.5.tgz#03fcdb7105bc8ea3ce6c86642b9c942495b04f93" + integrity sha512-MNIgJddrV2TkuwChwcSNds/5E9VijOiw7kAc1y5hTNJoLDSuIyid2QtLYiCYNnICebpuvjhPQZsXwUL0O3l7OQ== + dependencies: + chownr "^1.1.3" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.0" + mkdirp "^0.5.0" + yallist "^4.0.0" + tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" @@ -8698,7 +9031,7 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -tmp@^0.2.1: +tmp@^0.2.1, tmp@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== @@ -8845,6 +9178,11 @@ tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== +tslib@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" + integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== + tslint@^6.1.3: version "6.1.3" resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.3.tgz#5c23b2eccc32487d5523bd3a470e9aa31789d904" @@ -9086,11 +9424,16 @@ util-promisify@^2.1.0: dependencies: object.getownpropertydescriptors "^2.0.3" -uuid@^3.0.1, uuid@^3.3.2: +uuid@^3.0.1, uuid@^3.3.2, uuid@^3.3.3: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +v8-compile-cache@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== + v8-compile-cache@^2.0.3: version "2.2.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz#9471efa3ef9128d2f7c6a7ca39c4dd6b5055b132" @@ -9399,6 +9742,11 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== +yargs-parser@20.0.0: + version "20.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.0.0.tgz#c65a1daaa977ad63cebdd52159147b789a4e19a9" + integrity sha512-8eblPHTL7ZWRkyjIZJjnGf+TijiKJSwA24svzLRVvtgoi/RZiKa9fFQTrlx0OKLnyHSdt/enrdadji6WFfESVA== + yargs-parser@20.x, yargs-parser@^20.2.2: version "20.2.6" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.6.tgz#69f920addf61aafc0b8b89002f5d66e28f2d8b20" @@ -9420,39 +9768,39 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3: camelcase "^5.0.0" decamelize "^1.2.0" -yargs@^14.2.2: - version "14.2.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" - integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== +yargs@15.4.1, yargs@^15.0.1: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== dependencies: - cliui "^5.0.0" + cliui "^6.0.0" decamelize "^1.2.0" - find-up "^3.0.0" + find-up "^4.1.0" get-caller-file "^2.0.1" require-directory "^2.1.1" require-main-filename "^2.0.0" set-blocking "^2.0.0" - string-width "^3.0.0" + string-width "^4.2.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^15.0.1" + yargs-parser "^18.1.2" -yargs@^15.0.1: - version "15.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" - integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== +yargs@^14.2.2: + version "14.2.3" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" + integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== dependencies: - cliui "^6.0.0" + cliui "^5.0.0" decamelize "^1.2.0" - find-up "^4.1.0" + find-up "^3.0.0" get-caller-file "^2.0.1" require-directory "^2.1.1" require-main-filename "^2.0.0" set-blocking "^2.0.0" - string-width "^4.2.0" + string-width "^3.0.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^18.1.2" + yargs-parser "^15.0.1" yargs@^16.0.3, yargs@^16.2.0: version "16.2.0" From 4f1806e548affb7265da360d1fc8d033e25de325 Mon Sep 17 00:00:00 2001 From: James Henry Date: Wed, 9 Jun 2021 23:10:16 +0400 Subject: [PATCH 183/473] fix(typescript-estree): allow providing more one than one existing program in config (#3508) --- .eslintrc.js | 2 +- .../eslint-utils/ReferenceTracker.ts | 2 - .../src/ts-eslint-scope/index.ts | 1 - packages/parser/README.md | 14 +++--- ...videdProgram.ts => useProvidedPrograms.ts} | 28 +++++++---- packages/typescript-estree/src/index.ts | 2 +- .../typescript-estree/src/parser-options.ts | 8 ++-- packages/typescript-estree/src/parser.ts | 27 +++++++---- .../tests/lib/semanticInfo.test.ts | 47 ++++++++++++++----- tsconfig.eslint.json | 4 +- 10 files changed, 86 insertions(+), 49 deletions(-) rename packages/typescript-estree/src/create-program/{useProvidedProgram.ts => useProvidedPrograms.ts} (75%) diff --git a/.eslintrc.js b/.eslintrc.js index 4dbde1fb20cf..41f25f556716 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -27,7 +27,7 @@ module.exports = { ], tsconfigRootDir: __dirname, warnOnUnsupportedTypeScriptVersion: false, - EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true, + EXPERIMENTAL_useSourceOfProjectReferenceRedirect: false, }, rules: { // diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts index ddd24e1c029e..e0b472229499 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts @@ -3,12 +3,10 @@ import * as eslintUtils from 'eslint-utils'; import { TSESTree } from '../../ts-estree'; import * as TSESLint from '../../ts-eslint'; -/* eslint-disable @typescript-eslint/no-unsafe-assignment */ const ReferenceTrackerREAD: unique symbol = eslintUtils.ReferenceTracker.READ; const ReferenceTrackerCALL: unique symbol = eslintUtils.ReferenceTracker.CALL; const ReferenceTrackerCONSTRUCT: unique symbol = eslintUtils.ReferenceTracker.CONSTRUCT; -/* eslint-enable @typescript-eslint/no-unsafe-assignment */ interface ReferenceTracker { /** diff --git a/packages/experimental-utils/src/ts-eslint-scope/index.ts b/packages/experimental-utils/src/ts-eslint-scope/index.ts index 7cd1bed4021c..870c34fce1bb 100644 --- a/packages/experimental-utils/src/ts-eslint-scope/index.ts +++ b/packages/experimental-utils/src/ts-eslint-scope/index.ts @@ -10,5 +10,4 @@ export * from './Scope'; export * from './ScopeManager'; export * from './Variable'; -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment export const version: string = ESLintVersion; diff --git a/packages/parser/README.md b/packages/parser/README.md index 433c175bfef6..04f5c53d0f4a 100644 --- a/packages/parser/README.md +++ b/packages/parser/README.md @@ -213,19 +213,19 @@ Default `false`. This option allows you to request that when the `project` setting is specified, files will be allowed when not included in the projects defined by the provided `tsconfig.json` files. **Using this option will incur significant performance costs. This option is primarily included for backwards-compatibility.** See the **`project`** section above for more information. -### `parserOptions.program` +### `parserOptions.programs` Default `undefined`. -This option allows you to programmatically provide an instance of a TypeScript Program object that will provide type information to rules. -This will override any program that would have been computed from `parserOptions.project` or `parserOptions.createDefaultProgram`. -All linted files must be part of the provided program. +This option allows you to programmatically provide an array of one or more instances of a TypeScript Program object that will provide type information to rules. +This will override any programs that would have been computed from `parserOptions.project` or `parserOptions.createDefaultProgram`. +All linted files must be part of the provided program(s). ## Utilities ### `createProgram(configFile, projectDirectory)` -This serves as a utility method for users of the `parserOptions.program` feature to create a TypeScript program instance from a config file. +This serves as a utility method for users of the `parserOptions.programs` feature to create a TypeScript program instance from a config file. ```ts declare function createProgram( @@ -238,10 +238,10 @@ Example usage in .eslintrc.js: ```js const parser = require('@typescript-eslint/parser'); -const program = parser.createProgram('tsconfig.json'); +const programs = [parser.createProgram('tsconfig.json')]; module.exports = { parserOptions: { - program, + programs, }, }; ``` diff --git a/packages/typescript-estree/src/create-program/useProvidedProgram.ts b/packages/typescript-estree/src/create-program/useProvidedPrograms.ts similarity index 75% rename from packages/typescript-estree/src/create-program/useProvidedProgram.ts rename to packages/typescript-estree/src/create-program/useProvidedPrograms.ts index 16aebbf8f69d..d807a0f4675a 100644 --- a/packages/typescript-estree/src/create-program/useProvidedProgram.ts +++ b/packages/typescript-estree/src/create-program/useProvidedPrograms.ts @@ -11,15 +11,23 @@ import { const log = debug('typescript-eslint:typescript-estree:useProvidedProgram'); -function useProvidedProgram( - programInstance: ts.Program, +function useProvidedPrograms( + programInstances: ts.Program[], extra: Extra, ): ASTAndProgram | undefined { - log('Retrieving ast for %s from provided program instance', extra.filePath); - - programInstance.getTypeChecker(); // ensure parent pointers are set in source files + log( + 'Retrieving ast for %s from provided program instance(s)', + extra.filePath, + ); - const astAndProgram = getAstFromProgram(programInstance, extra); + let astAndProgram: ASTAndProgram | undefined; + for (const programInstance of programInstances) { + astAndProgram = getAstFromProgram(programInstance, extra); + // Stop at the first applicable program instance + if (astAndProgram) { + break; + } + } if (!astAndProgram) { const relativeFilePath = path.relative( @@ -27,13 +35,15 @@ function useProvidedProgram( extra.filePath, ); const errorLines = [ - '"parserOptions.program" has been provided for @typescript-eslint/parser.', - `The file was not found in the provided program instance: ${relativeFilePath}`, + '"parserOptions.programs" has been provided for @typescript-eslint/parser.', + `The file was not found in any of the provided program instance(s): ${relativeFilePath}`, ]; throw new Error(errorLines.join('\n')); } + astAndProgram.program.getTypeChecker(); // ensure parent pointers are set in source files + return astAndProgram; } @@ -84,4 +94,4 @@ function formatDiagnostics(diagnostics: ts.Diagnostic[]): string | undefined { }); } -export { useProvidedProgram, createProgramFromConfigFile }; +export { useProvidedPrograms, createProgramFromConfigFile }; diff --git a/packages/typescript-estree/src/index.ts b/packages/typescript-estree/src/index.ts index c80cd8f9de50..3345d4d46ceb 100644 --- a/packages/typescript-estree/src/index.ts +++ b/packages/typescript-estree/src/index.ts @@ -3,7 +3,7 @@ export { ParserServices, TSESTreeOptions } from './parser-options'; export { simpleTraverse } from './simple-traverse'; export * from './ts-estree'; export { clearCaches } from './create-program/createWatchProgram'; -export { createProgramFromConfigFile as createProgram } from './create-program/useProvidedProgram'; +export { createProgramFromConfigFile as createProgram } from './create-program/useProvidedPrograms'; // re-export for backwards-compat export { visitorKeys } from '@typescript-eslint/visitor-keys'; diff --git a/packages/typescript-estree/src/parser-options.ts b/packages/typescript-estree/src/parser-options.ts index 3915d5945ebe..9e33627ac9a1 100644 --- a/packages/typescript-estree/src/parser-options.ts +++ b/packages/typescript-estree/src/parser-options.ts @@ -20,7 +20,7 @@ export interface Extra { loc: boolean; log: (message: string) => void; preserveNodeMaps?: boolean; - program: null | Program; + programs: null | Program[]; projects: CanonicalPath[]; range: boolean; strict: boolean; @@ -171,11 +171,11 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { tsconfigRootDir?: string; /** - * Instance of a TypeScript Program object to be used for type information. + * An array of one or more instances of TypeScript Program objects to be used for type information. * This overrides any program or programs that would have been computed from the `project` option. - * All linted files must be part of the provided program. + * All linted files must be part of the provided program(s). */ - program?: Program; + programs?: Program[]; /** *************************************************************************************** diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index 8d6d7df312ff..7fe008189591 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -19,7 +19,7 @@ import { getCanonicalFileName, } from './create-program/shared'; import { Program } from 'typescript'; -import { useProvidedProgram } from './create-program/useProvidedProgram'; +import { useProvidedPrograms } from './create-program/useProvidedPrograms'; const log = debug('typescript-eslint:typescript-estree:parser'); @@ -57,18 +57,20 @@ function enforceString(code: unknown): string { /** * @param code The code of the file being linted + * @param programInstances One or more existing programs to use * @param shouldProvideParserServices True if the program should be attempted to be calculated from provided tsconfig files * @param shouldCreateDefaultProgram True if the program should be created from compiler host * @returns Returns a source file and program corresponding to the linted code */ function getProgramAndAST( code: string, - programInstance: Program | null, + programInstances: Program[] | null, shouldProvideParserServices: boolean, shouldCreateDefaultProgram: boolean, ): ASTAndProgram { return ( - (programInstance && useProvidedProgram(programInstance, extra)) || + (programInstances?.length && + useProvidedPrograms(programInstances, extra)) || (shouldProvideParserServices && createProjectProgram(code, shouldCreateDefaultProgram, extra)) || (shouldProvideParserServices && @@ -109,7 +111,7 @@ function resetExtra(): void { loc: false, log: console.log, // eslint-disable-line no-console preserveNodeMaps: true, - program: null, + programs: null, projects: [], range: false, strict: false, @@ -269,14 +271,19 @@ function applyParserOptionsToExtra(options: TSESTreeOptions): void { // NOTE - ensureAbsolutePath relies upon having the correct tsconfigRootDir in extra extra.filePath = ensureAbsolutePath(extra.filePath, extra); - if (options.program && typeof options.program === 'object') { - extra.program = options.program; + if (Array.isArray(options.programs)) { + if (!options.programs.length) { + throw new Error( + `You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.`, + ); + } + extra.programs = options.programs; log( - 'parserOptions.program was provided, so parserOptions.project will be ignored.', + 'parserOptions.programs was provided, so parserOptions.project will be ignored.', ); } - if (!extra.program) { + if (!extra.programs) { // providing a program overrides project resolution const projectFolderIgnoreList = ( options.projectFolderIgnoreList ?? ['**/node_modules/**'] @@ -464,10 +471,10 @@ function parseAndGenerateServices( * Generate a full ts.Program or offer provided instance in order to be able to provide parser services, such as type-checking */ const shouldProvideParserServices = - extra.program != null || (extra.projects && extra.projects.length > 0); + extra.programs != null || (extra.projects && extra.projects.length > 0); const { ast, program } = getProgramAndAST( code, - extra.program, + extra.programs, shouldProvideParserServices, extra.createDefaultProgram, )!; diff --git a/packages/typescript-estree/tests/lib/semanticInfo.test.ts b/packages/typescript-estree/tests/lib/semanticInfo.test.ts index fb6a4cf0e23b..397fb4ddad42 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo.test.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo.test.ts @@ -293,37 +293,58 @@ describe('semanticInfo', () => { expect(parseResult.services.program).toBeDefined(); }); - it(`provided program instance is returned in result`, () => { + it('empty programs array should throw', () => { + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const badConfig = createOptions(fileName); + badConfig.programs = []; + expect(() => parseAndGenerateServices('const foo = 5;', badConfig)).toThrow( + 'You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.', + ); + }); + + it(`first matching provided program instance is returned in result`, () => { const filename = testFiles[0]; - const program = createProgram(path.join(FIXTURES_DIR, 'tsconfig.json')); + const program1 = createProgram(path.join(FIXTURES_DIR, 'tsconfig.json')); + const program2 = createProgram(path.join(FIXTURES_DIR, 'tsconfig.json')); const code = fs.readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); const options = createOptions(filename); const optionsProjectString = { ...options, - program: program, + programs: [program1, program2], project: './tsconfig.json', }; const parseResult = parseAndGenerateServices(code, optionsProjectString); - expect(parseResult.services.program).toBe(program); + expect(parseResult.services.program).toBe(program1); }); - it('file not in provided program instance', () => { - const filename = 'non-existant-file.ts'; - const program = createProgram(path.join(FIXTURES_DIR, 'tsconfig.json')); + it('file not in provided program instance(s)', () => { + const filename = 'non-existent-file.ts'; + const program1 = createProgram(path.join(FIXTURES_DIR, 'tsconfig.json')); const options = createOptions(filename); - const optionsProjectString = { + const optionsWithSingleProgram = { + ...options, + programs: [program1], + }; + expect(() => + parseAndGenerateServices('const foo = 5;', optionsWithSingleProgram), + ).toThrow( + `The file was not found in any of the provided program instance(s): ${filename}`, + ); + + const program2 = createProgram(path.join(FIXTURES_DIR, 'tsconfig.json')); + const optionsWithMultiplePrograms = { ...options, - program: program, + programs: [program1, program2], }; expect(() => - parseAndGenerateServices('const foo = 5;', optionsProjectString), + parseAndGenerateServices('const foo = 5;', optionsWithMultiplePrograms), ).toThrow( - `The file was not found in the provided program instance: ${filename}`, + `The file was not found in any of the provided program instance(s): ${filename}`, ); }); - it('createProgram fails on non-existant file', () => { - expect(() => createProgram('tsconfig.non-existant.json')).toThrow(); + it('createProgram fails on non-existent file', () => { + expect(() => createProgram('tsconfig.non-existent.json')).toThrow(); }); it('createProgram fails on tsconfig with errors', () => { diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 0cfd463e6b2d..0e8da2eba1ce 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,6 +1,8 @@ { "compilerOptions": { - "types": ["@types/node"] + "types": ["@types/node"], + "noEmit": true, + "allowJs": true }, "extends": "./tsconfig.base.json", "include": ["tests/**/*.ts", "tools/**/*.ts", ".eslintrc.js"] From 79b510c00f25d76daf741936682e1222b0c994b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Jun 2021 13:25:29 -0700 Subject: [PATCH 184/473] chore: bump y18n from 4.0.0 to 4.0.3 (#3511) Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.3. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/y18n-v4.0.3/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/compare/v4.0.0...y18n-v4.0.3) --- updated-dependencies: - dependency-name: y18n dependency-type: indirect ... 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 793ab3f9327d..dd47863227d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9718,9 +9718,9 @@ xtend@~4.0.1: integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== y18n@^5.0.5: version "5.0.5" From 06c2d9ba5442330f56637ecb14fae7e41696699c Mon Sep 17 00:00:00 2001 From: James Henry Date: Fri, 11 Jun 2021 23:44:46 +0400 Subject: [PATCH 185/473] feat(typescript-estree): add opt-in inference for single runs and create programs for projects up front (#3512) --- .eslintrc.js | 1 + packages/typescript-estree/README.md | 14 + .../src/create-program/createWatchProgram.ts | 4 +- .../src/create-program/useProvidedPrograms.ts | 2 +- packages/typescript-estree/src/index.ts | 2 +- .../typescript-estree/src/parser-options.ts | 21 +- packages/typescript-estree/src/parser.ts | 109 +++++++- .../tests/lib/persistentParse.test.ts | 5 +- .../tests/lib/semanticInfo-singleRun.test.ts | 248 ++++++++++++++++++ .../tests/lib/semanticInfo.test.ts | 18 +- 10 files changed, 399 insertions(+), 25 deletions(-) create mode 100644 packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts diff --git a/.eslintrc.js b/.eslintrc.js index 41f25f556716..b39e5187bc73 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,6 +25,7 @@ module.exports = { './tests/integration/utils/jsconfig.json', './packages/*/tsconfig.json', ], + allowAutomaticSingleRunInference: true, tsconfigRootDir: __dirname, warnOnUnsupportedTypeScriptVersion: false, EXPERIMENTAL_useSourceOfProjectReferenceRedirect: false, diff --git a/packages/typescript-estree/README.md b/packages/typescript-estree/README.md index fca834e22098..31084150646b 100644 --- a/packages/typescript-estree/README.md +++ b/packages/typescript-estree/README.md @@ -225,6 +225,20 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { * it will not error, but will instead parse the file and its dependencies in a new program. */ createDefaultProgram?: boolean; + + /** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. + * + * When allowAutomaticSingleRunInference is enabled, we will use common heuristics to infer + * whether or not ESLint is being used as part of a single run. + */ + allowAutomaticSingleRunInference?: boolean; } interface ParserServices { diff --git a/packages/typescript-estree/src/create-program/createWatchProgram.ts b/packages/typescript-estree/src/create-program/createWatchProgram.ts index e2bf060050c2..f10f2a2295fc 100644 --- a/packages/typescript-estree/src/create-program/createWatchProgram.ts +++ b/packages/typescript-estree/src/create-program/createWatchProgram.ts @@ -50,7 +50,7 @@ const parsedFilesSeenHash = new Map(); * Clear all of the parser caches. * This should only be used in testing to ensure the parser is clean between tests. */ -function clearCaches(): void { +function clearWatchCaches(): void { knownWatchProgramMap.clear(); fileWatchCallbackTrackingMap.clear(); folderWatchCallbackTrackingMap.clear(); @@ -530,4 +530,4 @@ function maybeInvalidateProgram( return null; } -export { clearCaches, createWatchProgram, getProgramsForProjects }; +export { clearWatchCaches, createWatchProgram, getProgramsForProjects }; diff --git a/packages/typescript-estree/src/create-program/useProvidedPrograms.ts b/packages/typescript-estree/src/create-program/useProvidedPrograms.ts index d807a0f4675a..23b56497dc61 100644 --- a/packages/typescript-estree/src/create-program/useProvidedPrograms.ts +++ b/packages/typescript-estree/src/create-program/useProvidedPrograms.ts @@ -12,7 +12,7 @@ import { const log = debug('typescript-eslint:typescript-estree:useProvidedProgram'); function useProvidedPrograms( - programInstances: ts.Program[], + programInstances: Iterable, extra: Extra, ): ASTAndProgram | undefined { log( diff --git a/packages/typescript-estree/src/index.ts b/packages/typescript-estree/src/index.ts index 3345d4d46ceb..b2a0581dc926 100644 --- a/packages/typescript-estree/src/index.ts +++ b/packages/typescript-estree/src/index.ts @@ -2,7 +2,7 @@ export * from './parser'; export { ParserServices, TSESTreeOptions } from './parser-options'; export { simpleTraverse } from './simple-traverse'; export * from './ts-estree'; -export { clearCaches } from './create-program/createWatchProgram'; +export { clearWatchCaches as clearCaches } from './create-program/createWatchProgram'; export { createProgramFromConfigFile as createProgram } from './create-program/useProvidedPrograms'; // re-export for backwards-compat diff --git a/packages/typescript-estree/src/parser-options.ts b/packages/typescript-estree/src/parser-options.ts index 9e33627ac9a1..0bde1d9176ab 100644 --- a/packages/typescript-estree/src/parser-options.ts +++ b/packages/typescript-estree/src/parser-options.ts @@ -1,7 +1,7 @@ import { DebugLevel } from '@typescript-eslint/types'; -import { Program } from 'typescript'; -import { TSESTree, TSNode, TSESTreeToTSNode, TSToken } from './ts-estree'; +import type { Program } from 'typescript'; import { CanonicalPath } from './create-program/shared'; +import { TSESTree, TSESTreeToTSNode, TSNode, TSToken } from './ts-estree'; type DebugModule = 'typescript-eslint' | 'eslint' | 'typescript'; @@ -18,9 +18,10 @@ export interface Extra { filePath: string; jsx: boolean; loc: boolean; + singleRun: boolean; log: (message: string) => void; preserveNodeMaps?: boolean; - programs: null | Program[]; + programs: null | Iterable; projects: CanonicalPath[]; range: boolean; strict: boolean; @@ -187,6 +188,20 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { * it will not error, but will instead parse the file and its dependencies in a new program. */ createDefaultProgram?: boolean; + + /** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. + * + * When allowAutomaticSingleRunInference is enabled, we will use common heuristics to infer + * whether or not ESLint is being used as part of a single run. + */ + allowAutomaticSingleRunInference?: boolean; } export type TSESTreeOptions = ParseAndGenerateServicesOptions; diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index 7fe008189591..904bb054fdf8 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -2,6 +2,7 @@ import debug from 'debug'; import { sync as globSync } from 'globby'; import isGlob from 'is-glob'; import semver from 'semver'; +import { normalize } from 'path'; import * as ts from 'typescript'; import { astConverter } from './ast-converter'; import { convertError } from './convert'; @@ -18,8 +19,10 @@ import { ensureAbsolutePath, getCanonicalFileName, } from './create-program/shared'; -import { Program } from 'typescript'; -import { useProvidedPrograms } from './create-program/useProvidedPrograms'; +import { + createProgramFromConfigFile, + useProvidedPrograms, +} from './create-program/useProvidedPrograms'; const log = debug('typescript-eslint:typescript-estree:parser'); @@ -44,6 +47,16 @@ const isRunningSupportedTypeScriptVersion = semver.satisfies( let extra: Extra; let warnedAboutTSVersion = false; +/** + * Cache existing programs for the single run use-case. + * + * clearProgramCache() is only intended to be used in testing to ensure the parser is clean between tests. + */ +const existingPrograms = new Map(); +function clearProgramCache(): void { + existingPrograms.clear(); +} + function enforceString(code: unknown): string { /** * Ensure the source code is a string @@ -57,20 +70,19 @@ function enforceString(code: unknown): string { /** * @param code The code of the file being linted - * @param programInstances One or more existing programs to use + * @param programInstances One or more (potentially lazily constructed) existing programs to use * @param shouldProvideParserServices True if the program should be attempted to be calculated from provided tsconfig files * @param shouldCreateDefaultProgram True if the program should be created from compiler host * @returns Returns a source file and program corresponding to the linted code */ function getProgramAndAST( code: string, - programInstances: Program[] | null, + programInstances: Iterable | null, shouldProvideParserServices: boolean, shouldCreateDefaultProgram: boolean, ): ASTAndProgram { return ( - (programInstances?.length && - useProvidedPrograms(programInstances, extra)) || + (programInstances && useProvidedPrograms(programInstances, extra)) || (shouldProvideParserServices && createProjectProgram(code, shouldCreateDefaultProgram, extra)) || (shouldProvideParserServices && @@ -118,6 +130,11 @@ function resetExtra(): void { tokens: null, tsconfigRootDir: process.cwd(), useJSXTextNode: false, + /** + * Unless we can reliably infer otherwise, we default to assuming that this run could be part + * of a long-running session (e.g. in an IDE) and watch programs will therefore be required + */ + singleRun: false, }; } @@ -347,6 +364,47 @@ function warnAboutTSVersion(): void { } } +/** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. We therefore use the following logic to figure out which + * of these contexts applies to the current execution. + */ +function inferSingleRun(options: TSESTreeOptions | undefined): void { + // Allow users to explicitly inform us of their intent to perform a single run (or not) with TSESTREE_SINGLE_RUN + if (process.env.TSESTREE_SINGLE_RUN === 'false') { + extra.singleRun = false; + return; + } + if (process.env.TSESTREE_SINGLE_RUN === 'true') { + extra.singleRun = true; + return; + } + + // Currently behind a flag while we gather real-world feedback + if (options?.allowAutomaticSingleRunInference) { + if ( + // Default to single runs for CI processes. CI=true is set by most CI providers by default. + process.env.CI === 'true' || + // This will be true for invocations such as `npx eslint ...` and `./node_modules/.bin/eslint ...` + process.argv[1].endsWith(normalize('node_modules/.bin/eslint')) + ) { + extra.singleRun = true; + return; + } + } + + /** + * We default to assuming that this run could be part of a long-running session (e.g. in an IDE) + * and watch programs will therefore be required + */ + extra.singleRun = false; +} + // eslint-disable-next-line @typescript-eslint/no-empty-interface interface EmptyObject {} type AST = TSESTree.Program & @@ -408,6 +466,11 @@ function parseWithNodeMapsInternal( */ warnAboutTSVersion(); + /** + * Figure out whether this is a single run or part of a long-running process + */ + inferSingleRun(options); + /** * Create a ts.SourceFile directly, no ts.Program is needed for a simple * parse @@ -468,7 +531,38 @@ function parseAndGenerateServices( warnAboutTSVersion(); /** - * Generate a full ts.Program or offer provided instance in order to be able to provide parser services, such as type-checking + * Figure out whether this is a single run or part of a long-running process + */ + inferSingleRun(options); + + /** + * If this is a single run in which the user has not provided any existing programs but there + * are programs which need to be created from the provided "project" option, + * create an Iterable which will lazily create the programs as needed by the iteration logic + */ + if (extra.singleRun && !extra.programs && extra.projects?.length > 0) { + extra.programs = { + *[Symbol.iterator](): Iterator { + for (const configFile of extra.projects) { + const existingProgram = existingPrograms.get(configFile); + if (existingProgram) { + yield existingProgram; + } else { + log( + 'Detected single-run/CLI usage, creating Program once ahead of time for project: %s', + configFile, + ); + const newProgram = createProgramFromConfigFile(configFile); + existingPrograms.set(configFile, newProgram); + yield newProgram; + } + } + }, + }; + } + + /** + * Generate a full ts.Program or offer provided instances in order to be able to provide parser services, such as type-checking */ const shouldProvideParserServices = extra.programs != null || (extra.projects && extra.projects.length > 0); @@ -519,4 +613,5 @@ export { parseWithNodeMaps, ParseAndGenerateServicesResult, ParseWithNodeMapsResult, + clearProgramCache, }; diff --git a/packages/typescript-estree/tests/lib/persistentParse.test.ts b/packages/typescript-estree/tests/lib/persistentParse.test.ts index 7e751ed42489..50ab0351c16c 100644 --- a/packages/typescript-estree/tests/lib/persistentParse.test.ts +++ b/packages/typescript-estree/tests/lib/persistentParse.test.ts @@ -1,7 +1,8 @@ import fs from 'fs'; import path from 'path'; import tmp from 'tmp'; -import { clearCaches, parseAndGenerateServices } from '../../src'; +import { clearWatchCaches } from '../../src/create-program/createWatchProgram'; +import { parseAndGenerateServices } from '../../src/parser'; const CONTENTS = { foo: 'console.log("foo")', @@ -17,7 +18,7 @@ const cwdCopy = process.cwd(); const tmpDirs = new Set(); afterEach(() => { // stop watching the files and folders - clearCaches(); + clearWatchCaches(); // clean up the temporary files and folders tmpDirs.forEach(t => t.removeCallback()); diff --git a/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts b/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts new file mode 100644 index 000000000000..b8e778e0fb01 --- /dev/null +++ b/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts @@ -0,0 +1,248 @@ +import glob from 'glob'; +import * as path from 'path'; +import { clearProgramCache, parseAndGenerateServices } from '../../src'; +import { getCanonicalFileName } from '../../src/create-program/shared'; + +const mockProgram = { + getSourceFile(): void { + return; + }, + getTypeChecker(): void { + return; + }, +}; + +jest.mock('../../src/ast-converter', () => { + return { + astConverter(): unknown { + return { estree: {}, astMaps: {} }; + }, + }; +}); + +interface MockProgramWithConfigFile { + __FROM_CONFIG_FILE__?: string; +} + +jest.mock('../../src/create-program/shared.ts', () => { + return { + ...jest.requireActual('../../src/create-program/shared.ts'), + getAstFromProgram(program: MockProgramWithConfigFile): unknown { + if ( + program.__FROM_CONFIG_FILE__?.endsWith('non-matching-tsconfig.json') + ) { + return null; + } + // Remove temporary tracking value for the config added by mock createProgramFromConfigFile() below + delete program.__FROM_CONFIG_FILE__; + return { ast: {}, program }; + }, + }; +}); + +jest.mock('../../src/create-program/useProvidedPrograms.ts', () => { + return { + ...jest.requireActual('../../src/create-program/useProvidedPrograms.ts'), + createProgramFromConfigFile: jest + .fn() + .mockImplementation((configFile): MockProgramWithConfigFile => { + return { + // So we can differentiate our mock return values based on which tsconfig this is + __FROM_CONFIG_FILE__: configFile, + ...mockProgram, + }; + }), + }; +}); + +jest.mock('../../src/create-program/createWatchProgram', () => { + return { + ...jest.requireActual('../../src/create-program/createWatchProgram'), + getProgramsForProjects: jest.fn(() => [mockProgram]), + }; +}); + +const { + createProgramFromConfigFile, +} = require('../../src/create-program/useProvidedPrograms'); + +const FIXTURES_DIR = './tests/fixtures/semanticInfo'; +const testFiles = glob.sync(`**/*.src.ts`, { + cwd: FIXTURES_DIR, +}); + +const code = 'const foo = 5;'; +// File will not be found in the first Program, but will be in the second +const tsconfigs = ['./non-matching-tsconfig.json', './tsconfig.json']; +const options = { + filePath: testFiles[0], + tsconfigRootDir: path.join(process.cwd(), FIXTURES_DIR), + loggerFn: false, + project: tsconfigs, + allowAutomaticSingleRunInference: true, +} as const; + +const resolvedProject = (p: string): string => + getCanonicalFileName(path.resolve(path.join(process.cwd(), FIXTURES_DIR), p)); + +describe('semanticInfo - singleRun', () => { + beforeEach(() => { + // ensure caches are clean for each test + clearProgramCache(); + // ensure invocations of mock are clean for each test + (createProgramFromConfigFile as jest.Mock).mockClear(); + }); + + it('should not create any programs ahead of time by default when there is no way to infer singleRun=true', () => { + // For when these tests themselves are running in CI, we need to ignore that for this particular spec + const originalEnvCI = process.env.CI; + process.env.CI = 'false'; + + /** + * At this point there is nothing to indicate it is a single run, so createProgramFromConfigFile should + * never be called + */ + parseAndGenerateServices(code, options); + expect(createProgramFromConfigFile).not.toHaveBeenCalled(); + + // Restore process data + process.env.CI = originalEnvCI; + }); + + it('should not create any programs ahead of time when when TSESTREE_SINGLE_RUN=false, even if other inferrence criteria apply', () => { + const originalTSESTreeSingleRun = process.env.TSESTREE_SINGLE_RUN; + process.env.TSESTREE_SINGLE_RUN = 'false'; + + // Normally CI=true would be used to infer singleRun=true, but TSESTREE_SINGLE_RUN is explicitly set to false + const originalEnvCI = process.env.CI; + process.env.CI = 'true'; + + parseAndGenerateServices(code, options); + expect(createProgramFromConfigFile).not.toHaveBeenCalled(); + + // Restore process data + process.env.TSESTREE_SINGLE_RUN = originalTSESTreeSingleRun; + process.env.CI = originalEnvCI; + }); + + it('should lazily create the required program out of the provided "parserOptions.project" one time when TSESTREE_SINGLE_RUN=true', () => { + /** + * Single run because of explicit environment variable TSESTREE_SINGLE_RUN + */ + const originalTSESTreeSingleRun = process.env.TSESTREE_SINGLE_RUN; + process.env.TSESTREE_SINGLE_RUN = 'true'; + + const resultProgram = parseAndGenerateServices(code, options).services + .program; + expect(resultProgram).toEqual(mockProgram); + + // Call parseAndGenerateServices() again to ensure caching of Programs is working correctly... + parseAndGenerateServices(code, options); + // ...by asserting this was only called once per project + expect(createProgramFromConfigFile).toHaveBeenCalledTimes(tsconfigs.length); + + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 1, + resolvedProject(tsconfigs[0]), + ); + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 2, + resolvedProject(tsconfigs[1]), + ); + + // Restore process data + process.env.TSESTREE_SINGLE_RUN = originalTSESTreeSingleRun; + }); + + it('should lazily create the required program out of the provided "parserOptions.project" one time when singleRun is inferred from CI=true', () => { + /** + * Single run because of CI=true (we need to make sure we respect the original value + * so that we won't interfere with our own usage of the variable) + */ + const originalEnvCI = process.env.CI; + process.env.CI = 'true'; + + const resultProgram = parseAndGenerateServices(code, options).services + .program; + expect(resultProgram).toEqual(mockProgram); + + // Call parseAndGenerateServices() again to ensure caching of Programs is working correctly... + parseAndGenerateServices(code, options); + // ...by asserting this was only called once per project + expect(createProgramFromConfigFile).toHaveBeenCalledTimes(tsconfigs.length); + + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 1, + resolvedProject(tsconfigs[0]), + ); + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 2, + resolvedProject(tsconfigs[1]), + ); + + // Restore process data + process.env.CI = originalEnvCI; + }); + + it('should lazily create the required program out of the provided "parserOptions.project" one time when singleRun is inferred from process.argv', () => { + /** + * Single run because of process.argv + */ + const originalProcessArgv = process.argv; + process.argv = ['', 'node_modules/.bin/eslint', '']; + + const resultProgram = parseAndGenerateServices(code, options).services + .program; + expect(resultProgram).toEqual(mockProgram); + + // Call parseAndGenerateServices() again to ensure caching of Programs is working correctly... + parseAndGenerateServices(code, options); + // ...by asserting this was only called once per project + expect(createProgramFromConfigFile).toHaveBeenCalledTimes(tsconfigs.length); + + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 1, + resolvedProject(tsconfigs[0]), + ); + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 2, + resolvedProject(tsconfigs[1]), + ); + + // Restore process data + process.argv = originalProcessArgv; + }); + + it('should stop iterating through and lazily creating programs for the given "parserOptions.project" once a matching one has been found', () => { + /** + * Single run because of explicit environment variable TSESTREE_SINGLE_RUN + */ + const originalTSESTreeSingleRun = process.env.TSESTREE_SINGLE_RUN; + process.env.TSESTREE_SINGLE_RUN = 'true'; + + const optionsWithReversedTsconfigs = { + ...options, + // Now the matching tsconfig comes first + project: options.project.reverse(), + }; + + const resultProgram = parseAndGenerateServices( + code, + optionsWithReversedTsconfigs, + ).services.program; + expect(resultProgram).toEqual(mockProgram); + + // Call parseAndGenerateServices() again to ensure caching of Programs is working correctly... + parseAndGenerateServices(code, options); + // ...by asserting this was only called only once + expect(createProgramFromConfigFile).toHaveBeenCalledTimes(1); + + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 1, + resolvedProject(tsconfigs[0]), + ); + + // Restore process data + process.env.TSESTREE_SINGLE_RUN = originalTSESTreeSingleRun; + }); +}); diff --git a/packages/typescript-estree/tests/lib/semanticInfo.test.ts b/packages/typescript-estree/tests/lib/semanticInfo.test.ts index 397fb4ddad42..d099342c72e7 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo.test.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo.test.ts @@ -2,19 +2,19 @@ import * as fs from 'fs'; import glob from 'glob'; import * as path from 'path'; import * as ts from 'typescript'; +import { clearWatchCaches } from '../../src/create-program/createWatchProgram'; +import { createProgramFromConfigFile as createProgram } from '../../src/create-program/useProvidedPrograms'; +import { + parseAndGenerateServices, + ParseAndGenerateServicesResult, +} from '../../src/parser'; import { TSESTreeOptions } from '../../src/parser-options'; +import { TSESTree } from '../../src/ts-estree'; import { createSnapshotTestBlock, formatSnapshotName, parseCodeAndGenerateServices, } from '../../tools/test-utils'; -import { - clearCaches, - createProgram, - parseAndGenerateServices, - ParseAndGenerateServicesResult, -} from '../../src'; -import { TSESTree } from '../../src/ts-estree'; const FIXTURES_DIR = './tests/fixtures/semanticInfo'; const testFiles = glob.sync(`**/*.src.ts`, { @@ -37,8 +37,8 @@ function createOptions(fileName: string): TSESTreeOptions & { cwd?: string } { }; } -// ensure tsconfig-parser caches are clean for each test -beforeEach(() => clearCaches()); +// ensure tsconfig-parser watch caches are clean for each test +beforeEach(() => clearWatchCaches()); describe('semanticInfo', () => { // test all AST snapshots From 9e343fdaa0b04ed007b873c781e8cc98fc1fb7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sun, 13 Jun 2021 02:34:58 +0200 Subject: [PATCH 186/473] feat(ast-spec): specify `LogicalExpression`'s `operator` type (#3497) --- packages/ast-spec/src/expression/LogicalExpression/spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ast-spec/src/expression/LogicalExpression/spec.ts b/packages/ast-spec/src/expression/LogicalExpression/spec.ts index a9bd50e1dfe1..6d2b56b50dd4 100644 --- a/packages/ast-spec/src/expression/LogicalExpression/spec.ts +++ b/packages/ast-spec/src/expression/LogicalExpression/spec.ts @@ -3,4 +3,5 @@ import type { BinaryExpressionBase } from '../../base/BinaryExpressionBase'; export interface LogicalExpression extends BinaryExpressionBase { type: AST_NODE_TYPES.LogicalExpression; + operator: '??' | '&&' | '||'; } From 288092a085fdd9abaffe0aa1d0b37a8844dd86ff Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 13 Jun 2021 03:51:20 +0300 Subject: [PATCH 187/473] feat(eslint-plugin): [prefer-literal-enum-member] add allowBitwiseExpressions option (#3515) --- .../docs/rules/prefer-literal-enum-member.md | 35 ++++++ .../src/rules/prefer-literal-enum-member.ts | 37 +++++- .../rules/prefer-literal-enum-member.test.ts | 117 ++++++++++++++++++ 3 files changed, 184 insertions(+), 5 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md b/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md index e2350f357113..2086f6533cf8 100644 --- a/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md +++ b/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md @@ -21,6 +21,10 @@ The answer is that `Foo.c` will be `1` at runtime. The [playground](https://www. This rule is meant to prevent unexpected results in code by requiring the use of literal values as enum members to prevent unexpected runtime behavior. Template literals, arrays, objects, constructors, and all other expression types can end up using a variable from its scope or the parent scope, which can result in the same unexpected behavior at runtime. +## Options + +- `allowBitwiseExpressions` set to `true` will allow you to use bitwise expressions in enum initializer (Default: `false`). + Examples of **incorrect** code for this rule: ```ts @@ -46,6 +50,37 @@ enum Valid { } ``` +### `allowBitwiseExpressions` + +Examples of **incorrect** code for the `{ "allowBitwiseExpressions": true }` option: + +```ts +const x = 1; +enum Foo { + A = x << 0, + B = x >> 0, + C = x >>> 0, + D = x | 0, + E = x & 0, + F = x ^ 0, + G = ~x, +} +``` + +Examples of **correct** code for the `{ "allowBitwiseExpressions": true }` option: + +```ts +enum Foo { + A = 1 << 0, + B = 1 >> 0, + C = 1 >>> 0, + D = 1 | 0, + E = 1 & 0, + F = 1 ^ 0, + G = ~1, +} +``` + ## When Not To Use It If you want use anything other than simple literals as an enum value. diff --git a/packages/eslint-plugin/src/rules/prefer-literal-enum-member.ts b/packages/eslint-plugin/src/rules/prefer-literal-enum-member.ts index 9843afeef4f3..77b6746a06b0 100644 --- a/packages/eslint-plugin/src/rules/prefer-literal-enum-member.ts +++ b/packages/eslint-plugin/src/rules/prefer-literal-enum-member.ts @@ -15,10 +15,24 @@ export default createRule({ messages: { notLiteral: `Explicit enum value must only be a literal value (string, number, boolean, etc).`, }, - schema: [], + schema: [ + { + type: 'object', + properties: { + allowBitwiseExpressions: { + type: 'boolean', + }, + }, + additionalProperties: false, + }, + ], }, - defaultOptions: [], - create(context) { + defaultOptions: [ + { + allowBitwiseExpressions: false, + }, + ], + create(context, [{ allowBitwiseExpressions }]) { return { TSEnumMember(node): void { // If there is no initializer, then this node is just the name of the member, so ignore. @@ -39,8 +53,21 @@ export default createRule({ // -1 and +1 if ( node.initializer.type === AST_NODE_TYPES.UnaryExpression && - ['+', '-'].includes(node.initializer.operator) && - node.initializer.argument.type === AST_NODE_TYPES.Literal + node.initializer.argument.type === AST_NODE_TYPES.Literal && + (['+', '-'].includes(node.initializer.operator) || + (allowBitwiseExpressions && node.initializer.operator === '~')) + ) { + return; + } + + if ( + allowBitwiseExpressions && + node.initializer.type === AST_NODE_TYPES.BinaryExpression && + ['|', '&', '^', '<<', '>>', '>>>'].includes( + node.initializer.operator, + ) && + node.initializer.left.type === AST_NODE_TYPES.Literal && + node.initializer.right.type === AST_NODE_TYPES.Literal ) { return; } diff --git a/packages/eslint-plugin/tests/rules/prefer-literal-enum-member.test.ts b/packages/eslint-plugin/tests/rules/prefer-literal-enum-member.test.ts index 5459c42d51e1..5ec7af3c9db8 100644 --- a/packages/eslint-plugin/tests/rules/prefer-literal-enum-member.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-literal-enum-member.test.ts @@ -62,6 +62,20 @@ enum ValidKeyWithComputedSyntaxButNoComputedKey { ['a'], } `, + { + code: ` +enum Foo { + A = 1 << 0, + B = 1 >> 0, + C = 1 >>> 0, + D = 1 | 0, + E = 1 & 0, + F = 1 ^ 0, + G = ~1, +} + `, + options: [{ allowBitwiseExpressions: true }], + }, ], invalid: [ { @@ -255,5 +269,108 @@ enum InvalidSpread { }, ], }, + { + code: ` +enum Foo { + A = 1 << 0, + B = 1 >> 0, + C = 1 >>> 0, + D = 1 | 0, + E = 1 & 0, + F = 1 ^ 0, + G = ~1, +} + `, + options: [{ allowBitwiseExpressions: false }], + errors: [ + { + messageId: 'notLiteral', + line: 3, + column: 3, + }, + { + messageId: 'notLiteral', + line: 4, + column: 3, + }, + { + messageId: 'notLiteral', + line: 5, + column: 3, + }, + { + messageId: 'notLiteral', + line: 6, + column: 3, + }, + { + messageId: 'notLiteral', + line: 7, + column: 3, + }, + { + messageId: 'notLiteral', + line: 8, + column: 3, + }, + { + messageId: 'notLiteral', + line: 9, + column: 3, + }, + ], + }, + { + code: ` +const x = 1; +enum Foo { + A = x << 0, + B = x >> 0, + C = x >>> 0, + D = x | 0, + E = x & 0, + F = x ^ 0, + G = ~x, +} + `, + options: [{ allowBitwiseExpressions: true }], + errors: [ + { + messageId: 'notLiteral', + line: 4, + column: 3, + }, + { + messageId: 'notLiteral', + line: 5, + column: 3, + }, + { + messageId: 'notLiteral', + line: 6, + column: 3, + }, + { + messageId: 'notLiteral', + line: 7, + column: 3, + }, + { + messageId: 'notLiteral', + line: 8, + column: 3, + }, + { + messageId: 'notLiteral', + line: 9, + column: 3, + }, + { + messageId: 'notLiteral', + line: 10, + column: 3, + }, + ], + }, ], }); From b15a2b2a02dc9af2b47b77eb3aede73ffa85ac66 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 12 Jun 2021 20:52:00 -0400 Subject: [PATCH 188/473] fix(eslint-plugin): allow explicit any for no-unsafe-return (#3498) --- .../eslint-plugin/src/rules/no-unsafe-return.ts | 17 ++++++++++------- .../tests/rules/no-unsafe-return.test.ts | 12 ++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unsafe-return.ts b/packages/eslint-plugin/src/rules/no-unsafe-return.ts index 4d65ce529af0..d460dd04c9bf 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-return.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-return.ts @@ -91,6 +91,16 @@ export default util.createRule({ functionType = checker.getTypeAtLocation(functionTSNode); } + // If there is an explicit type annotation *and* that type matches the actual + // function return type, we shouldn't complain (it's intentional, even if unsafe) + if (functionTSNode.type) { + for (const signature of functionType.getCallSignatures()) { + if (returnNodeType === signature.getReturnType()) { + return; + } + } + } + if (anyType !== util.AnyType.Safe) { // Allow cases when the declared return type of the function is either unknown or unknown[] // and the function is returning any or any[]. @@ -140,13 +150,6 @@ export default util.createRule({ for (const signature of functionType.getCallSignatures()) { const functionReturnType = signature.getReturnType(); - if (returnNodeType === functionReturnType) { - // don't bother checking if they're the same - // either the function is explicitly declared to return the same type - // or there was no declaration, so the return type is implicit - return; - } - const result = util.isUnsafeAssignment( returnNodeType, functionReturnType, diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts index 0f533917d54c..2bbdfdd5ffaf 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts @@ -40,6 +40,18 @@ function foo() { ` function foo() { return []; +} + `, + // explicit any return type is allowed, if you want to be unsafe like that + ` +function foo(): any { + return {} as any; +} + `, + // explicit any array return type is allowed, if you want to be unsafe like that + ` +function foo(): any[] { + return [] as any[]; } `, // explicit any generic return type is allowed, if you want to be unsafe like that From c7a95ab7efeff9155db801c93b7564b080c26e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 14 Jun 2021 05:57:21 +0200 Subject: [PATCH 189/473] chore(typescript-estree): use `SyntaxKind.LastPunctuation` as upper bound to determine `Punctuator` token type (#3519) --- packages/typescript-estree/src/node-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typescript-estree/src/node-utils.ts b/packages/typescript-estree/src/node-utils.ts index 9afe27669265..ccdfe9d4b215 100644 --- a/packages/typescript-estree/src/node-utils.ts +++ b/packages/typescript-estree/src/node-utils.ts @@ -518,7 +518,7 @@ export function getTokenType( if ( token.kind >= SyntaxKind.FirstPunctuation && - token.kind <= SyntaxKind.LastBinaryOperator + token.kind <= SyntaxKind.LastPunctuation ) { return AST_TOKEN_TYPES.Punctuator; } From fdb1d81f0fcf75a9216e6a90469f18c24c91f718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 14 Jun 2021 18:27:12 +0200 Subject: [PATCH 190/473] feat(ast-spec): specify `PunctuatorToken`'s `value` type (#3496) --- packages/ast-spec/package.json | 3 +- .../PunctuatorToken/PunctuatorTokenToText.ts | 63 ++++++++++++++++ .../src/token/PunctuatorToken/spec.ts | 6 ++ packages/typescript-estree/src/node-utils.ts | 71 ++----------------- 4 files changed, 78 insertions(+), 65 deletions(-) create mode 100644 packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 96ec8a09b7dc..8dddb73dceb1 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -41,6 +41,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "devDependencies": { - "@microsoft/api-extractor": "^7.15.2" + "@microsoft/api-extractor": "^7.15.2", + "typescript": "*" } } diff --git a/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts b/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts new file mode 100644 index 000000000000..a3ab12ee8564 --- /dev/null +++ b/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts @@ -0,0 +1,63 @@ +import type { SyntaxKind } from 'typescript'; + +export interface PunctuatorTokenToText { + [SyntaxKind.OpenBraceToken]: '{'; + [SyntaxKind.CloseBraceToken]: '}'; + [SyntaxKind.OpenParenToken]: '('; + [SyntaxKind.CloseParenToken]: ')'; + [SyntaxKind.OpenBracketToken]: '['; + [SyntaxKind.CloseBracketToken]: ']'; + [SyntaxKind.DotToken]: '.'; + [SyntaxKind.DotDotDotToken]: '...'; + [SyntaxKind.SemicolonToken]: ';'; + [SyntaxKind.CommaToken]: ','; + [SyntaxKind.QuestionDotToken]: '?.'; + [SyntaxKind.LessThanToken]: '<'; + [SyntaxKind.LessThanSlashToken]: ''; + [SyntaxKind.LessThanEqualsToken]: '<='; + [SyntaxKind.GreaterThanEqualsToken]: '>='; + [SyntaxKind.EqualsEqualsToken]: '=='; + [SyntaxKind.ExclamationEqualsToken]: '!='; + [SyntaxKind.EqualsEqualsEqualsToken]: '==='; + [SyntaxKind.ExclamationEqualsEqualsToken]: '!=='; + [SyntaxKind.EqualsGreaterThanToken]: '=>'; + [SyntaxKind.PlusToken]: '+'; + [SyntaxKind.MinusToken]: '-'; + [SyntaxKind.AsteriskToken]: '*'; + [SyntaxKind.AsteriskAsteriskToken]: '**'; + [SyntaxKind.SlashToken]: '/'; + [SyntaxKind.PercentToken]: '%'; + [SyntaxKind.PlusPlusToken]: '++'; + [SyntaxKind.MinusMinusToken]: '--'; + [SyntaxKind.LessThanLessThanToken]: '<<'; + [SyntaxKind.GreaterThanGreaterThanToken]: '>>'; + [SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>'; + [SyntaxKind.AmpersandToken]: '&'; + [SyntaxKind.BarToken]: '|'; + [SyntaxKind.CaretToken]: '^'; + [SyntaxKind.ExclamationToken]: '!'; + [SyntaxKind.TildeToken]: '~'; + [SyntaxKind.AmpersandAmpersandToken]: '&&'; + [SyntaxKind.BarBarToken]: '||'; + [SyntaxKind.QuestionToken]: '?'; + [SyntaxKind.ColonToken]: ':'; + [SyntaxKind.AtToken]: '@'; + [SyntaxKind.QuestionQuestionToken]: '??'; + [SyntaxKind.EqualsToken]: '='; + [SyntaxKind.PlusEqualsToken]: '+='; + [SyntaxKind.MinusEqualsToken]: '-='; + [SyntaxKind.AsteriskEqualsToken]: '*='; + [SyntaxKind.AsteriskAsteriskEqualsToken]: '**='; + [SyntaxKind.SlashEqualsToken]: '/='; + [SyntaxKind.PercentEqualsToken]: '%='; + [SyntaxKind.LessThanLessThanEqualsToken]: '<<='; + [SyntaxKind.GreaterThanGreaterThanEqualsToken]: '>>='; + [SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken]: '>>>='; + [SyntaxKind.AmpersandEqualsToken]: '&='; + [SyntaxKind.BarEqualsToken]: '|='; + [SyntaxKind.BarBarEqualsToken]: '||='; + [SyntaxKind.AmpersandAmpersandEqualsToken]: '&&='; + [SyntaxKind.QuestionQuestionEqualsToken]: '??='; + [SyntaxKind.CaretEqualsToken]: '^='; +} diff --git a/packages/ast-spec/src/token/PunctuatorToken/spec.ts b/packages/ast-spec/src/token/PunctuatorToken/spec.ts index 39b9507348c2..68156aad6638 100644 --- a/packages/ast-spec/src/token/PunctuatorToken/spec.ts +++ b/packages/ast-spec/src/token/PunctuatorToken/spec.ts @@ -1,6 +1,12 @@ import type { AST_TOKEN_TYPES } from '../../ast-token-types'; import type { BaseToken } from '../../base/BaseToken'; +import type { PunctuatorTokenToText } from './PunctuatorTokenToText'; + +export * from './PunctuatorTokenToText'; + +type ValueOf = T[keyof T]; export interface PunctuatorToken extends BaseToken { type: AST_TOKEN_TYPES.Punctuator; + value: ValueOf; } diff --git a/packages/typescript-estree/src/node-utils.ts b/packages/typescript-estree/src/node-utils.ts index ccdfe9d4b215..1969b6b2fb39 100644 --- a/packages/typescript-estree/src/node-utils.ts +++ b/packages/typescript-estree/src/node-utils.ts @@ -13,73 +13,14 @@ const LOGICAL_OPERATORS: ( SyntaxKind.QuestionQuestionToken, ]; -interface TokenToText { - [SyntaxKind.OpenBraceToken]: '{'; - [SyntaxKind.CloseBraceToken]: '}'; - [SyntaxKind.OpenParenToken]: '('; - [SyntaxKind.CloseParenToken]: ')'; - [SyntaxKind.OpenBracketToken]: '['; - [SyntaxKind.CloseBracketToken]: ']'; - [SyntaxKind.DotToken]: '.'; - [SyntaxKind.DotDotDotToken]: '...'; - [SyntaxKind.SemicolonToken]: ';'; - [SyntaxKind.CommaToken]: ','; - [SyntaxKind.LessThanToken]: '<'; - [SyntaxKind.GreaterThanToken]: '>'; - [SyntaxKind.LessThanEqualsToken]: '<='; - [SyntaxKind.GreaterThanEqualsToken]: '>='; - [SyntaxKind.EqualsEqualsToken]: '=='; - [SyntaxKind.ExclamationEqualsToken]: '!='; - [SyntaxKind.EqualsEqualsEqualsToken]: '==='; - [SyntaxKind.InstanceOfKeyword]: 'instanceof'; - [SyntaxKind.ExclamationEqualsEqualsToken]: '!=='; - [SyntaxKind.EqualsGreaterThanToken]: '=>'; - [SyntaxKind.PlusToken]: '+'; - [SyntaxKind.MinusToken]: '-'; - [SyntaxKind.AsteriskToken]: '*'; - [SyntaxKind.AsteriskAsteriskToken]: '**'; - [SyntaxKind.SlashToken]: '/'; - [SyntaxKind.PercentToken]: '%'; - [SyntaxKind.PlusPlusToken]: '++'; - [SyntaxKind.MinusMinusToken]: '--'; - [SyntaxKind.LessThanLessThanToken]: '<<'; - [SyntaxKind.LessThanSlashToken]: '>'; - [SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>'; - [SyntaxKind.AmpersandToken]: '&'; - [SyntaxKind.BarToken]: '|'; - [SyntaxKind.CaretToken]: '^'; - [SyntaxKind.ExclamationToken]: '!'; - [SyntaxKind.TildeToken]: '~'; - [SyntaxKind.AmpersandAmpersandToken]: '&&'; - [SyntaxKind.BarBarToken]: '||'; - [SyntaxKind.QuestionToken]: '?'; - [SyntaxKind.ColonToken]: ':'; - [SyntaxKind.EqualsToken]: '='; - [SyntaxKind.PlusEqualsToken]: '+='; - [SyntaxKind.MinusEqualsToken]: '-='; - [SyntaxKind.AsteriskEqualsToken]: '*='; - [SyntaxKind.AsteriskAsteriskEqualsToken]: '**='; - [SyntaxKind.SlashEqualsToken]: '/='; - [SyntaxKind.PercentEqualsToken]: '%='; - [SyntaxKind.LessThanLessThanEqualsToken]: '<<='; - [SyntaxKind.GreaterThanGreaterThanEqualsToken]: '>>='; - [SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken]: '>>>='; - [SyntaxKind.AmpersandEqualsToken]: '&='; - [SyntaxKind.AmpersandAmpersandEqualsToken]: '&&='; - [SyntaxKind.BarEqualsToken]: '|='; - [SyntaxKind.BarBarEqualsToken]: '||='; - [SyntaxKind.CaretEqualsToken]: '^='; - [SyntaxKind.QuestionQuestionEqualsToken]: '??='; - [SyntaxKind.AtToken]: '@'; +interface TokenToText extends TSESTree.PunctuatorTokenToText { + [SyntaxKind.ImportKeyword]: 'import'; [SyntaxKind.InKeyword]: 'in'; - [SyntaxKind.UniqueKeyword]: 'unique'; - [SyntaxKind.KeyOfKeyword]: 'keyof'; + [SyntaxKind.InstanceOfKeyword]: 'instanceof'; [SyntaxKind.NewKeyword]: 'new'; - [SyntaxKind.ImportKeyword]: 'import'; + [SyntaxKind.KeyOfKeyword]: 'keyof'; [SyntaxKind.ReadonlyKeyword]: 'readonly'; - [SyntaxKind.QuestionQuestionToken]: '??'; - [SyntaxKind.QuestionDotToken]: '?.'; + [SyntaxKind.UniqueKeyword]: 'unique'; } /** @@ -609,6 +550,8 @@ export function convertToken( }, }; } else { + // @ts-expect-error TS is complaining about `value` not being the correct + // type but it is return { type: tokenType, value, From b3ac5f6e2183c6ae33a14959867f6247d2aaa0d1 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 14 Jun 2021 17:01:26 +0000 Subject: [PATCH 191/473] chore: publish v4.27.0 --- CHANGELOG.md | 22 ++++++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 17 +++++++++++++++ packages/ast-spec/package.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 | 11 ++++++++++ packages/experimental-utils/package.json | 8 +++---- packages/parser/CHANGELOG.md | 16 ++++++++++++++ packages/parser/package.json | 10 ++++----- packages/scope-manager/CHANGELOG.md | 8 +++++++ packages/scope-manager/package.json | 8 +++---- packages/shared-fixtures/CHANGELOG.md | 11 ++++++++++ packages/shared-fixtures/package.json | 2 +- packages/types/CHANGELOG.md | 11 ++++++++++ packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 19 +++++++++++++++++ packages/typescript-estree/package.json | 8 +++---- packages/visitor-keys/CHANGELOG.md | 8 +++++++ packages/visitor-keys/package.json | 4 ++-- 24 files changed, 186 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cace1e04257..6583908b372b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **eslint-plugin:** allow explicit any for no-unsafe-return ([#3498](https://github.com/typescript-eslint/typescript-eslint/issues/3498)) ([b15a2b2](https://github.com/typescript-eslint/typescript-eslint/commit/b15a2b2a02dc9af2b47b77eb3aede73ffa85ac66)) +* **typescript-estree:** allow providing more one than one existing program in config ([#3508](https://github.com/typescript-eslint/typescript-eslint/issues/3508)) ([4f1806e](https://github.com/typescript-eslint/typescript-eslint/commit/4f1806e548affb7265da360d1fc8d033e25de325)) +* **typescript-estree:** support override modifier for parameter property ([#3485](https://github.com/typescript-eslint/typescript-eslint/issues/3485)) ([33b9f69](https://github.com/typescript-eslint/typescript-eslint/commit/33b9f69a681cd3219a2acca5b0b2fa67609f099e)) + + +### Features + +* **ast-spec:** specify `LogicalExpression`'s `operator` type ([#3497](https://github.com/typescript-eslint/typescript-eslint/issues/3497)) ([9e343fd](https://github.com/typescript-eslint/typescript-eslint/commit/9e343fdaa0b04ed007b873c781e8cc98fc1fb7f5)) +* **ast-spec:** specify `PunctuatorToken`'s `value` type ([#3496](https://github.com/typescript-eslint/typescript-eslint/issues/3496)) ([fdb1d81](https://github.com/typescript-eslint/typescript-eslint/commit/fdb1d81f0fcf75a9216e6a90469f18c24c91f718)) +* **eslint-plugin:** [prefer-literal-enum-member] add allowBitwiseExpressions option ([#3515](https://github.com/typescript-eslint/typescript-eslint/issues/3515)) ([288092a](https://github.com/typescript-eslint/typescript-eslint/commit/288092a085fdd9abaffe0aa1d0b37a8844dd86ff)) +* **typescript-estree:** add opt-in inference for single runs and create programs for projects up front ([#3512](https://github.com/typescript-eslint/typescript-eslint/issues/3512)) ([06c2d9b](https://github.com/typescript-eslint/typescript-eslint/commit/06c2d9ba5442330f56637ecb14fae7e41696699c)) +* allow user to provide TS program instance in parser options ([#3484](https://github.com/typescript-eslint/typescript-eslint/issues/3484)) ([e855b18](https://github.com/typescript-eslint/typescript-eslint/commit/e855b18b8feee0edb5c617c11006861426a6f530)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) diff --git a/lerna.json b/lerna.json index 757d0fec9038..ce8013f10bd6 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.26.1", + "version": "4.27.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index f7ea1246c5c2..dc5f93812474 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **typescript-estree:** support override modifier for parameter property ([#3485](https://github.com/typescript-eslint/typescript-eslint/issues/3485)) ([33b9f69](https://github.com/typescript-eslint/typescript-eslint/commit/33b9f69a681cd3219a2acca5b0b2fa67609f099e)) + + +### Features + +* **ast-spec:** specify `LogicalExpression`'s `operator` type ([#3497](https://github.com/typescript-eslint/typescript-eslint/issues/3497)) ([9e343fd](https://github.com/typescript-eslint/typescript-eslint/commit/9e343fdaa0b04ed007b873c781e8cc98fc1fb7f5)) +* **ast-spec:** specify `PunctuatorToken`'s `value` type ([#3496](https://github.com/typescript-eslint/typescript-eslint/issues/3496)) ([fdb1d81](https://github.com/typescript-eslint/typescript-eslint/commit/fdb1d81f0fcf75a9216e6a90469f18c24c91f718)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 8dddb73dceb1..ed01fb3f7d3e 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.26.1", + "version": "4.27.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index e0a9ecca5f7b..1a3541a5dbf8 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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 432794935bc3..77d46e71b1f6 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.26.1", + "version": "4.27.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.26.1", + "@typescript-eslint/experimental-utils": "4.27.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 18539ad609f0..7d18d1347758 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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 5a31ac9fe864..a2d1916e0008 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.26.1", + "version": "4.27.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.26.1", + "@typescript-eslint/experimental-utils": "4.27.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.26.1" + "@typescript-eslint/parser": "4.27.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 8b7f427128d3..8df2fb68dbbf 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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **eslint-plugin:** allow explicit any for no-unsafe-return ([#3498](https://github.com/typescript-eslint/typescript-eslint/issues/3498)) ([b15a2b2](https://github.com/typescript-eslint/typescript-eslint/commit/b15a2b2a02dc9af2b47b77eb3aede73ffa85ac66)) + + +### Features + +* **eslint-plugin:** [prefer-literal-enum-member] add allowBitwiseExpressions option ([#3515](https://github.com/typescript-eslint/typescript-eslint/issues/3515)) ([288092a](https://github.com/typescript-eslint/typescript-eslint/commit/288092a085fdd9abaffe0aa1d0b37a8844dd86ff)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index b00b019d7337..47cc63e7719b 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.26.1", + "version": "4.27.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.26.1", - "@typescript-eslint/scope-manager": "4.26.1", + "@typescript-eslint/experimental-utils": "4.27.0", + "@typescript-eslint/scope-manager": "4.27.0", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.21", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index d6055ce29b9c..9fc69e872a0e 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **typescript-estree:** allow providing more one than one existing program in config ([#3508](https://github.com/typescript-eslint/typescript-eslint/issues/3508)) ([4f1806e](https://github.com/typescript-eslint/typescript-eslint/commit/4f1806e548affb7265da360d1fc8d033e25de325)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 d0499b562518..89b3207346c7 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.26.1", + "version": "4.27.0", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.26.1", - "@typescript-eslint/types": "4.26.1", - "@typescript-eslint/typescript-estree": "4.26.1", + "@typescript-eslint/scope-manager": "4.27.0", + "@typescript-eslint/types": "4.27.0", + "@typescript-eslint/typescript-estree": "4.27.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index c07db4b495e9..3233eb7a70ae 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **typescript-estree:** allow providing more one than one existing program in config ([#3508](https://github.com/typescript-eslint/typescript-eslint/issues/3508)) ([4f1806e](https://github.com/typescript-eslint/typescript-eslint/commit/4f1806e548affb7265da360d1fc8d033e25de325)) + + +### Features + +* allow user to provide TS program instance in parser options ([#3484](https://github.com/typescript-eslint/typescript-eslint/issues/3484)) ([e855b18](https://github.com/typescript-eslint/typescript-eslint/commit/e855b18b8feee0edb5c617c11006861426a6f530)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 3ff1f3968e96..b60fefa206de 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.26.1", + "version": "4.27.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.26.1", - "@typescript-eslint/types": "4.26.1", - "@typescript-eslint/typescript-estree": "4.26.1", + "@typescript-eslint/scope-manager": "4.27.0", + "@typescript-eslint/types": "4.27.0", + "@typescript-eslint/typescript-estree": "4.27.0", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.26.1", + "@typescript-eslint/experimental-utils": "4.27.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 2ee969b4e090..eafe71aee419 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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 b2584b548268..330a99619bfe 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.26.1", + "version": "4.27.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.26.1", - "@typescript-eslint/visitor-keys": "4.26.1" + "@typescript-eslint/types": "4.27.0", + "@typescript-eslint/visitor-keys": "4.27.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.26.1", + "@typescript-eslint/typescript-estree": "4.27.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 55b086a682dd..8c8d35582fb5 100644 --- a/packages/shared-fixtures/CHANGELOG.md +++ b/packages/shared-fixtures/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **typescript-estree:** support override modifier for parameter property ([#3485](https://github.com/typescript-eslint/typescript-eslint/issues/3485)) ([33b9f69](https://github.com/typescript-eslint/typescript-eslint/commit/33b9f69a681cd3219a2acca5b0b2fa67609f099e)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 13c290d52509..34945d18889f 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.26.1", + "version": "4.27.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 638d10d83e5a..4a1f19861b82 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Features + +* allow user to provide TS program instance in parser options ([#3484](https://github.com/typescript-eslint/typescript-eslint/issues/3484)) ([e855b18](https://github.com/typescript-eslint/typescript-eslint/commit/e855b18b8feee0edb5c617c11006861426a6f530)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 88f7555d0629..4b81f6165290 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.26.1", + "version": "4.27.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 31b10925f0cd..357f5300c1e9 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **typescript-estree:** allow providing more one than one existing program in config ([#3508](https://github.com/typescript-eslint/typescript-eslint/issues/3508)) ([4f1806e](https://github.com/typescript-eslint/typescript-eslint/commit/4f1806e548affb7265da360d1fc8d033e25de325)) +* **typescript-estree:** support override modifier for parameter property ([#3485](https://github.com/typescript-eslint/typescript-eslint/issues/3485)) ([33b9f69](https://github.com/typescript-eslint/typescript-eslint/commit/33b9f69a681cd3219a2acca5b0b2fa67609f099e)) + + +### Features + +* **ast-spec:** specify `PunctuatorToken`'s `value` type ([#3496](https://github.com/typescript-eslint/typescript-eslint/issues/3496)) ([fdb1d81](https://github.com/typescript-eslint/typescript-eslint/commit/fdb1d81f0fcf75a9216e6a90469f18c24c91f718)) +* **typescript-estree:** add opt-in inference for single runs and create programs for projects up front ([#3512](https://github.com/typescript-eslint/typescript-eslint/issues/3512)) ([06c2d9b](https://github.com/typescript-eslint/typescript-eslint/commit/06c2d9ba5442330f56637ecb14fae7e41696699c)) +* allow user to provide TS program instance in parser options ([#3484](https://github.com/typescript-eslint/typescript-eslint/issues/3484)) ([e855b18](https://github.com/typescript-eslint/typescript-eslint/commit/e855b18b8feee0edb5c617c11006861426a6f530)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 1781b27a7345..438a537f84cc 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.26.1", + "version": "4.27.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.26.1", - "@typescript-eslint/visitor-keys": "4.26.1", + "@typescript-eslint/types": "4.27.0", + "@typescript-eslint/visitor-keys": "4.27.0", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.26.1", + "@typescript-eslint/shared-fixtures": "4.27.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 728f075000f4..9805958418b9 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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 8028f5e8f628..665bc6a4dc7a 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.26.1", + "version": "4.27.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.26.1", + "@typescript-eslint/types": "4.27.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 8d3aaa099b721a5d1175a5f2138c15c75b7465f4 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Thu, 17 Jun 2021 12:06:37 +0900 Subject: [PATCH 192/473] test: update @babel/parser to update ignored fixtures (#3530) * chore: install @babel/parser 7.14.6 * test: update ignored list --- package.json | 2 +- .../tests/ast-alignment/fixtures-to-test.ts | 6 ------ yarn.lock | 7 ++++++- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index e4c07d58f0ef..8b13e068b359 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ }, "devDependencies": { "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.14.4", + "@babel/parser": "^7.14.6", "@babel/types": "^7.14.4", "@commitlint/cli": "^12.1.4", "@commitlint/config-conventional": "^12.1.4", diff --git a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts index 92eb7909f457..cab81a426fe1 100644 --- a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts +++ b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts @@ -386,12 +386,6 @@ tester.addFixturePatternConfig('typescript/basics', { * This is intentional; babel is not checking types */ 'catch-clause-with-invalid-annotation', - /** - * [BABEL ERRORED, BUT TS-ESTREE DID NOT] - * SyntaxError: Unexpected token, expected "," - */ - 'class-with-constructor-and-parameter-property-with-modifiers', - 'class-with-constructor-and-parameter-proptery-with-override-modifier', ], ignoreSourceType: [ /** diff --git a/yarn.lock b/yarn.lock index dd47863227d5..d0571f1244b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -169,7 +169,12 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@*", "@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.14.2", "@babel/parser@^7.14.3", "@babel/parser@^7.14.4", "@babel/parser@^7.7.2": +"@babel/parser@*", "@babel/parser@^7.14.6": + version "7.14.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.6.tgz#d85cc68ca3cac84eae384c06f032921f5227f4b2" + integrity sha512-oG0ej7efjEXxb4UgE+klVx+3j4MVo+A2vCzm7OUN4CLo6WhQ+vSOD2yJ8m7B+DghObxtLxt3EfgMWpq+AsWehQ== + +"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.14.2", "@babel/parser@^7.14.3", "@babel/parser@^7.7.2": version "7.14.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.4.tgz#a5c560d6db6cd8e6ed342368dea8039232cbab18" integrity sha512-ArliyUsWDUqEGfWcmzpGUzNfLxTdTp6WU4IuP6QFSp9gGfWS6boxFCkJSJ/L4+RG8z/FnIU3WxCk6hPL9SSWeA== From 614b0a38b4163eb4667cce7a415d534222d15dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 17 Jun 2021 05:07:28 +0200 Subject: [PATCH 193/473] fix(experimental-utils): fix `eslint-utils`' negative predicates' return types in `ast-utils` (#3461) --- .../src/ast-utils/eslint-utils/predicates.ts | 50 +++++++++++++++---- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts index 55d20a3e40b0..668fef3617e4 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts @@ -6,42 +6,60 @@ const isArrowToken = eslintUtils.isArrowToken as ( ) => token is TSESTree.PunctuatorToken & { value: '=>' }; const isNotArrowToken = eslintUtils.isNotArrowToken as ( token: TSESTree.Token, -) => boolean; +) => token is Exclude< + TSESTree.Token, + TSESTree.PunctuatorToken & { value: '=>' } +>; const isClosingBraceToken = eslintUtils.isClosingBraceToken as ( token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: '}' }; const isNotClosingBraceToken = eslintUtils.isNotClosingBraceToken as ( token: TSESTree.Token, -) => boolean; +) => token is Exclude< + TSESTree.Token, + TSESTree.PunctuatorToken & { value: '}' } +>; const isClosingBracketToken = eslintUtils.isClosingBracketToken as ( token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: ']' }; const isNotClosingBracketToken = eslintUtils.isNotClosingBracketToken as ( token: TSESTree.Token, -) => boolean; +) => token is Exclude< + TSESTree.Token, + TSESTree.PunctuatorToken & { value: ']' } +>; const isClosingParenToken = eslintUtils.isClosingParenToken as ( token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: ')' }; const isNotClosingParenToken = eslintUtils.isNotClosingParenToken as ( token: TSESTree.Token, -) => boolean; +) => token is Exclude< + TSESTree.Token, + TSESTree.PunctuatorToken & { value: ')' } +>; const isColonToken = eslintUtils.isColonToken as ( token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: ':' }; const isNotColonToken = eslintUtils.isNotColonToken as ( token: TSESTree.Token, -) => boolean; +) => token is Exclude< + TSESTree.Token, + TSESTree.PunctuatorToken & { value: ':' } +>; const isCommaToken = eslintUtils.isCommaToken as ( token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: ',' }; const isNotCommaToken = eslintUtils.isNotCommaToken as ( token: TSESTree.Token, -) => boolean; +) => token is Exclude< + TSESTree.Token, + TSESTree.PunctuatorToken & { value: ',' } +>; const isCommentToken = eslintUtils.isCommentToken as ( token: TSESTree.Token, @@ -55,28 +73,40 @@ const isOpeningBraceToken = eslintUtils.isOpeningBraceToken as ( ) => token is TSESTree.PunctuatorToken & { value: '{' }; const isNotOpeningBraceToken = eslintUtils.isNotOpeningBraceToken as ( token: TSESTree.Token, -) => boolean; +) => token is Exclude< + TSESTree.Token, + TSESTree.PunctuatorToken & { value: '{' } +>; const isOpeningBracketToken = eslintUtils.isOpeningBracketToken as ( token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: '[' }; const isNotOpeningBracketToken = eslintUtils.isNotOpeningBracketToken as ( token: TSESTree.Token, -) => boolean; +) => token is Exclude< + TSESTree.Token, + TSESTree.PunctuatorToken & { value: '[' } +>; const isOpeningParenToken = eslintUtils.isOpeningParenToken as ( token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: '(' }; const isNotOpeningParenToken = eslintUtils.isNotOpeningParenToken as ( token: TSESTree.Token, -) => boolean; +) => token is Exclude< + TSESTree.Token, + TSESTree.PunctuatorToken & { value: '(' } +>; const isSemicolonToken = eslintUtils.isSemicolonToken as ( token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: ';' }; const isNotSemicolonToken = eslintUtils.isNotSemicolonToken as ( token: TSESTree.Token, -) => boolean; +) => token is Exclude< + TSESTree.Token, + TSESTree.PunctuatorToken & { value: ';' } +>; export { isArrowToken, From 1e6016b356ae40e4636a3cbe41fa02b6a61403ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 17 Jun 2021 05:11:09 +0200 Subject: [PATCH 194/473] fix(experimental-utils): fix `eslint-utils`' negative predicates' return types (#3462) --- .../experimental-utils/src/ast-utils/predicates.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/predicates.ts index 3be38cbdf5c5..919820d7653d 100644 --- a/packages/experimental-utils/src/ast-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/predicates.ts @@ -5,7 +5,12 @@ function isOptionalChainPunctuator( ): token is TSESTree.PunctuatorToken & { value: '?.' } { return token.type === AST_TOKEN_TYPES.Punctuator && token.value === '?.'; } -function isNotOptionalChainPunctuator(token: TSESTree.Token): boolean { +function isNotOptionalChainPunctuator( + token: TSESTree.Token, +): token is Exclude< + TSESTree.Token, + TSESTree.PunctuatorToken & { value: '?.' } +> { return !isOptionalChainPunctuator(token); } @@ -14,7 +19,9 @@ function isNonNullAssertionPunctuator( ): token is TSESTree.PunctuatorToken & { value: '!' } { return token.type === AST_TOKEN_TYPES.Punctuator && token.value === '!'; } -function isNotNonNullAssertionPunctuator(token: TSESTree.Token): boolean { +function isNotNonNullAssertionPunctuator( + token: TSESTree.Token, +): token is Exclude { return !isNonNullAssertionPunctuator(token); } From e5d121052c3849071f47bdb49c7215f163774337 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Jun 2021 21:39:29 -0700 Subject: [PATCH 195/473] chore: bump @types/prettier from 2.2.3 to 2.3.0 (#3539) Bumps [@types/prettier](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/prettier) from 2.2.3 to 2.3.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/prettier) --- updated-dependencies: - dependency-name: "@types/prettier" dependency-type: direct:production update-type: version-update:semver-minor ... 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 d0571f1244b5..cf00164c7fc6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2171,9 +2171,9 @@ integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== "@types/prettier@*", "@types/prettier@^2.1.5", "@types/prettier@^2.2.3": - version "2.2.3" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.3.tgz#ef65165aea2924c9359205bf748865b8881753c0" - integrity sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.0.tgz#2e8332cc7363f887d32ec5496b207d26ba8052bb" + integrity sha512-hkc1DATxFLQo4VxPDpMH1gCkPpBbpOoJ/4nhuXw4n63/0R6bCpQECj4+K226UJ4JO/eJQz+1mC2I7JsWanAdQw== "@types/rimraf@^3.0.0": version "3.0.0" From 443b57389ee3dd4c56dca04d0076ef637d60044f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Jun 2021 21:39:38 -0700 Subject: [PATCH 196/473] chore: bump @nrwl/nx-cloud from 12.1.3 to 12.2.4 (#3540) Bumps [@nrwl/nx-cloud](https://github.com/nrwl/nx) from 12.1.3 to 12.2.4. - [Release notes](https://github.com/nrwl/nx/releases) - [Commits](https://github.com/nrwl/nx/commits) --- updated-dependencies: - dependency-name: "@nrwl/nx-cloud" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index cf00164c7fc6..1728379878de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1767,9 +1767,9 @@ tslib "^2.0.0" "@nrwl/nx-cloud@^12.1.3": - version "12.1.3" - resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.1.3.tgz#a22b34b787ecebade1c7fcb21e6c1cf765b80d3b" - integrity sha512-IC+CNSXGuInEnIwDS6wVl25vQJm5z9Duh1PzP5k0e30JcoUTqjL08KKwvzo8cmKpUvgLNo3rABc5J5F+fXaJGQ== + version "12.2.4" + resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.2.4.tgz#a6b054a627e6c68741ce503ebb414e9e80b60561" + integrity sha512-q1tqh87VqPZhvByOMit6q9aWF0MjRx1ItqQFQvwXOBx0Hx8z/8UfRgSwPK5AQBL7Npue10KMgwAooR4r/nvvMw== dependencies: axios "^0.21.1" chalk "4.1.0" @@ -1777,7 +1777,6 @@ rxjs "6.5.5" strip-json-comments "^3.1.1" tar "5.0.5" - uuid "^3.3.3" "@nrwl/tao@12.3.5", "@nrwl/tao@^12.3.5": version "12.3.5" @@ -9429,7 +9428,7 @@ util-promisify@^2.1.0: dependencies: object.getownpropertydescriptors "^2.0.3" -uuid@^3.0.1, uuid@^3.3.2, uuid@^3.3.3: +uuid@^3.0.1, uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== From 0436eb904997383c8d36658796a46e3e8c90a14d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Jun 2021 21:39:48 -0700 Subject: [PATCH 197/473] chore: bump @nrwl/workspace from 12.3.5 to 12.4.0 (#3541) Bumps [@nrwl/workspace](https://github.com/nrwl/nx) from 12.3.5 to 12.4.0. - [Release notes](https://github.com/nrwl/nx/releases) - [Commits](https://github.com/nrwl/nx/compare/12.3.5...12.4.0) --- updated-dependencies: - dependency-name: "@nrwl/workspace" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 92 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 40 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1728379878de..5dfe3c26764f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1721,46 +1721,44 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@nrwl/cli@12.3.5", "@nrwl/cli@^12.3.5": - version "12.3.5" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.3.5.tgz#15a4011990cc8cfae660addc7abcf6a3f7402107" - integrity sha512-iAH90jevQW3G9KPtEg9b14g1zMxrsxgRYQfkZDXijx21yJGDieJh1mCIewpy5jcEBS+ODQKvant0XdyhS/kUBw== +"@nrwl/cli@12.4.0", "@nrwl/cli@^12.3.5": + version "12.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.4.0.tgz#d313ddbabfef0d4b1b3e799dac5fa1dafe4819d4" + integrity sha512-ZU1NAjxEa9iMRRhUCYmD0ZLlK1j5l+zDseDE1a0A3KdgMVGh2eOchREnf6R75skQJHl4v9hKFweqiy0Xl14ZRQ== dependencies: - "@nrwl/tao" "12.3.5" + "@nrwl/tao" "12.4.0" chalk "4.1.0" v8-compile-cache "2.3.0" yargs "15.4.1" yargs-parser "20.0.0" -"@nrwl/devkit@12.3.5": - version "12.3.5" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.3.5.tgz#5b1a9382f9a51f12ce133a95eb4d6731fc2cda03" - integrity sha512-bZi2WNHAAy/nSHAlA7r8zGpLuWPeurTbwBeNH9gm3It19fV5+hWoL1/pPlDBr2xEWjJQJNmWikxonxhw2ZIpGw== +"@nrwl/devkit@12.4.0": + version "12.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.4.0.tgz#6110327f1aed6d87d407929651e6f1140c779451" + integrity sha512-kGw5/SH4ze4j+rG6seEcslNenscrZFZMGpcoc3OIxfTTGlFA0mCFasFgzN8osgTX4+PgEOushvm3yRAaMmLqIg== dependencies: - "@nrwl/tao" "12.3.5" + "@nrwl/tao" "12.4.0" ejs "^3.1.5" ignore "^5.0.4" semver "7.3.4" - strip-json-comments "^3.1.1" tslib "^2.0.0" -"@nrwl/jest@12.3.5": - version "12.3.5" - resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.3.5.tgz#6e74902cc290b8a7c6cdcf937d4634c4befea59e" - integrity sha512-pFaDcr7tGbYQ7NrWlym0cKAXFtphqLq8KlEoWM0aQcBQxv9VZtj4N8dwYPXPMAiAGYKYqgt9e74rgvN+bGeS1g== +"@nrwl/jest@12.4.0": + version "12.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.4.0.tgz#d59b840ba1ad79ff969aefa353ad360e952bd86c" + integrity sha512-YZbo4+NYsSp7StJFvY7pKAArpYOP5AtZAu4ltshzdAWYM9KgPtoDtstRBksFzDq6jnApXuMb4eEcE4ttlMj3yQ== dependencies: - "@nrwl/devkit" "12.3.5" + "@nrwl/devkit" "12.4.0" jest-resolve "^26.6.2" rxjs "^6.5.4" - strip-json-comments "^3.1.1" tslib "^2.0.0" -"@nrwl/linter@12.3.5": - version "12.3.5" - resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.3.5.tgz#3224926a936b60e31c74b63efd7c97fce511610a" - integrity sha512-6YhjlDZFb2dk0kphdLUELj99bAhG/So+CO1E8/eJsTvK4Mf7LySaTamabR9meSJW7yu2WKxiIIm4Z69IBI1bNQ== +"@nrwl/linter@12.4.0": + version "12.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.4.0.tgz#61afc3d1bfb9e71ceea1ed820d15f4163911c00b" + integrity sha512-n+xEKSAU5nVyMii7GtvBWDdjtrlCqMXrnozBs586k+bL0opogP4ZOrWxPZUjLnOlOHx1BuIl0nViSjBmh2y0wA== dependencies: - "@nrwl/devkit" "12.3.5" + "@nrwl/devkit" "12.4.0" glob "7.1.4" minimatch "3.0.4" tmp "~0.2.1" @@ -1778,7 +1776,23 @@ strip-json-comments "^3.1.1" tar "5.0.5" -"@nrwl/tao@12.3.5", "@nrwl/tao@^12.3.5": +"@nrwl/tao@12.4.0": + version "12.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.4.0.tgz#90620513fc66faca22c98a64623b2d1c058bb1a4" + integrity sha512-WH8SqOuJuuBwXpLX9vIVVWEovDqfLmiyFQS4Ebz35KWXNoIv9MS3QgItXKCu7X463hiJnxjAA3RqVYIt8U1vXg== + dependencies: + chalk "4.1.0" + enquirer "~2.3.6" + fs-extra "^9.1.0" + jsonc-parser "3.0.0" + rxjs "^6.5.4" + rxjs-for-await "0.0.2" + semver "7.3.4" + tmp "~0.2.1" + tslib "^2.0.0" + yargs-parser "20.0.0" + +"@nrwl/tao@^12.3.5": version "12.3.5" resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.3.5.tgz#7cbc65a561e5f9255403dc55bddf0f9a6743397c" integrity sha512-K/Q0GsrLzqXubmLgm8tFSjvrG61lQ00DrtNZ5dHywOAXREeV11A0bR7lXVDTohABk3D9Wgly5IKZPZ3iUwscsg== @@ -1795,14 +1809,14 @@ yargs-parser "20.0.0" "@nrwl/workspace@^12.3.5": - version "12.3.5" - resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.3.5.tgz#1e3c0ba31bf45ba18a958a7bf99b938631eae9eb" - integrity sha512-mawmYJBxjjiqGKQPu7bqtAhuWFj1vzK+VVUuGlItDM+mJuDFLrOZqVAQL/SJOVPS0qRpYTBiWrdF4ZsLTEa8LQ== + version "12.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.4.0.tgz#095d29bbb1d19f6266af06c528ebc83392d07654" + integrity sha512-RjcvP4rQCj6CQPDrRTLlzviF6kskfDBfBlyrQfDjh4CC9HasjlRCOfB39OQynT2M4iZqckXl5upG7Ph1gP5+dg== dependencies: - "@nrwl/cli" "12.3.5" - "@nrwl/devkit" "12.3.5" - "@nrwl/jest" "12.3.5" - "@nrwl/linter" "12.3.5" + "@nrwl/cli" "12.4.0" + "@nrwl/devkit" "12.4.0" + "@nrwl/jest" "12.4.0" + "@nrwl/linter" "12.4.0" chalk "4.1.0" cosmiconfig "^4.0.0" dotenv "8.2.0" @@ -1814,10 +1828,8 @@ minimatch "3.0.4" npm-run-all "^4.1.5" open "^7.4.2" - resolve "1.17.0" rxjs "^6.5.4" semver "7.3.4" - strip-json-comments "^3.1.1" tmp "~0.2.1" tslib "^2.0.0" yargs "15.4.1" @@ -6285,7 +6297,7 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -jsonc-parser@~3.0.0: +jsonc-parser@3.0.0, jsonc-parser@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" integrity sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA== @@ -8210,13 +8222,6 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@1.17.0, resolve@~1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== - dependencies: - path-parse "^1.0.6" - resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.18.1, resolve@^1.20.0, resolve@^1.3.2: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" @@ -8225,6 +8230,13 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.18.1, resolve@^1.20 is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@~1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + resolve@~1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" From 8ecb4f6d83015fb72c0c69c03478a1f57434a5bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Jun 2021 21:39:57 -0700 Subject: [PATCH 198/473] chore: bump @babel/code-frame from 7.12.13 to 7.14.5 (#3523) Bumps [@babel/code-frame](https://github.com/babel/babel/tree/HEAD/packages/babel-code-frame) from 7.12.13 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-code-frame) --- updated-dependencies: - dependency-name: "@babel/code-frame" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5dfe3c26764f..170d561ef956 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,11 +3,11 @@ "@babel/code-frame@*", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" - integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" + integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw== dependencies: - "@babel/highlight" "^7.12.13" + "@babel/highlight" "^7.14.5" "@babel/code-frame@7.12.11": version "7.12.11" @@ -141,11 +141,16 @@ dependencies: "@babel/types" "^7.12.13" -"@babel/helper-validator-identifier@^7.12.11", "@babel/helper-validator-identifier@^7.14.0": +"@babel/helper-validator-identifier@^7.14.0": version "7.14.0" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz#d26cad8a47c65286b15df1547319a5d0bcf27288" integrity sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A== +"@babel/helper-validator-identifier@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" + integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== + "@babel/helper-validator-option@^7.12.17": version "7.12.17" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz#d1fbf012e1a79b7eebbfdc6d270baaf8d9eb9831" @@ -160,12 +165,12 @@ "@babel/traverse" "^7.14.0" "@babel/types" "^7.14.0" -"@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": - version "7.13.10" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.13.10.tgz#a8b2a66148f5b27d666b15d81774347a731d52d1" - integrity sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg== +"@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" + integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== dependencies: - "@babel/helper-validator-identifier" "^7.12.11" + "@babel/helper-validator-identifier" "^7.14.5" chalk "^2.0.0" js-tokens "^4.0.0" From a7fd7bb25584cb3f72f0339025dc76efa6cccceb Mon Sep 17 00:00:00 2001 From: Yuri Pieters Date: Thu, 17 Jun 2021 05:40:25 +0100 Subject: [PATCH 199/473] fix(experimental-utils): make keys for `ReferenceTracker` options optional (#3531) --- .../src/ast-utils/eslint-utils/ReferenceTracker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts index e0b472229499..ee2ace3f762b 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts @@ -48,11 +48,11 @@ interface ReferenceTrackerStatic { * If this is `"strict"`, the method binds CommonJS modules to the default export. Otherwise, the method binds * CommonJS modules to both the default export and named exports. Optional. Default is `"strict"`. */ - mode: 'strict' | 'legacy'; + mode?: 'strict' | 'legacy'; /** * The name list of Global Object. Optional. Default is `["global", "globalThis", "self", "window"]`. */ - globalObjectNames: readonly string[]; + globalObjectNames?: readonly string[]; }, ): ReferenceTracker; From 4ac67c4c9401c5ce0e947a6409efbc11afe1eb3b Mon Sep 17 00:00:00 2001 From: Yuri Pieters Date: Thu, 17 Jun 2021 05:40:50 +0100 Subject: [PATCH 200/473] feat(experimental-utils): expose ReferenceTracker.ESM (#3532) Co-authored-by: Yuri Pieters --- .../src/ast-utils/eslint-utils/ReferenceTracker.ts | 4 ++++ packages/experimental-utils/typings/eslint-utils.d.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts index ee2ace3f762b..40e5fa7c1793 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts @@ -7,6 +7,7 @@ const ReferenceTrackerREAD: unique symbol = eslintUtils.ReferenceTracker.READ; const ReferenceTrackerCALL: unique symbol = eslintUtils.ReferenceTracker.CALL; const ReferenceTrackerCONSTRUCT: unique symbol = eslintUtils.ReferenceTracker.CONSTRUCT; +const ReferenceTrackerESM: unique symbol = eslintUtils.ReferenceTracker.ESM; interface ReferenceTracker { /** @@ -59,12 +60,14 @@ interface ReferenceTrackerStatic { readonly READ: typeof ReferenceTrackerREAD; readonly CALL: typeof ReferenceTrackerCALL; readonly CONSTRUCT: typeof ReferenceTrackerCONSTRUCT; + readonly ESM: typeof ReferenceTrackerESM; } namespace ReferenceTracker { export type READ = ReferenceTrackerStatic['READ']; export type CALL = ReferenceTrackerStatic['CALL']; export type CONSTRUCT = ReferenceTrackerStatic['CONSTRUCT']; + export type ESM = ReferenceTrackerStatic['ESM']; export type ReferenceType = READ | CALL | CONSTRUCT; // eslint-disable-next-line @typescript-eslint/no-explicit-any export type TraceMap = Record>; @@ -72,6 +75,7 @@ namespace ReferenceTracker { [ReferenceTrackerREAD]?: T; [ReferenceTrackerCALL]?: T; [ReferenceTrackerCONSTRUCT]?: T; + [ReferenceTrackerESM]?: true; [key: string]: TraceMapElement; } // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/packages/experimental-utils/typings/eslint-utils.d.ts b/packages/experimental-utils/typings/eslint-utils.d.ts index f99a3e840db8..5843e99466f8 100644 --- a/packages/experimental-utils/typings/eslint-utils.d.ts +++ b/packages/experimental-utils/typings/eslint-utils.d.ts @@ -35,6 +35,7 @@ declare module 'eslint-utils' { readonly READ: never; readonly CALL: never; readonly CONSTRUCT: never; + readonly ESM: never; new (): never; }; } From 0aa2db18628629b6c391d07e537f1fa9bc26dbb5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Jun 2021 23:45:31 -0700 Subject: [PATCH 201/473] chore: bump @babel/types from 7.14.4 to 7.14.5 (#3520) Bumps [@babel/types](https://github.com/babel/babel/tree/HEAD/packages/babel-types) from 7.14.4 to 7.14.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.5/packages/babel-types) --- updated-dependencies: - dependency-name: "@babel/types" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/yarn.lock b/yarn.lock index 170d561ef956..e116cdd04f90 100644 --- a/yarn.lock +++ b/yarn.lock @@ -141,12 +141,7 @@ dependencies: "@babel/types" "^7.12.13" -"@babel/helper-validator-identifier@^7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz#d26cad8a47c65286b15df1547319a5d0bcf27288" - integrity sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A== - -"@babel/helper-validator-identifier@^7.14.5": +"@babel/helper-validator-identifier@^7.14.0", "@babel/helper-validator-identifier@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== @@ -306,11 +301,11 @@ globals "^11.1.0" "@babel/types@*", "@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.12", "@babel/types@^7.14.0", "@babel/types@^7.14.2", "@babel/types@^7.14.4", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.14.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.4.tgz#bfd6980108168593b38b3eb48a24aa026b919bc0" - integrity sha512-lCj4aIs0xUefJFQnwwQv2Bxg7Omd6bgquZ6LGC+gGMh6/s5qDVfjuCMlDmYQ15SLsWHd9n+X3E75lKIhl5Lkiw== + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.5.tgz#3bb997ba829a2104cedb20689c4a5b8121d383ff" + integrity sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg== dependencies: - "@babel/helper-validator-identifier" "^7.14.0" + "@babel/helper-validator-identifier" "^7.14.5" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": From 4c7cbb13f8a38c65e48b64282f063b5782b2c224 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Jun 2021 23:45:45 -0700 Subject: [PATCH 202/473] chore: bump marked from 2.0.7 to 2.1.1 (#3542) Bumps [marked](https://github.com/markedjs/marked) from 2.0.7 to 2.1.1. - [Release notes](https://github.com/markedjs/marked/releases) - [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js) - [Commits](https://github.com/markedjs/marked/compare/v2.0.7...v2.1.1) --- updated-dependencies: - dependency-name: marked dependency-type: direct:development update-type: version-update:semver-minor ... 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 e116cdd04f90..1d64f5dbd779 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6774,9 +6774,9 @@ markdownlint@~0.23.1: markdown-it "12.0.4" marked@^2.0.6: - version "2.0.7" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.7.tgz#bc5b857a09071b48ce82a1f7304913a993d4b7d1" - integrity sha512-BJXxkuIfJchcXOJWTT2DOL+yFWifFv2yGYOUzvXg8Qz610QKw+sHCvTMYwA+qWGhlA2uivBezChZ/pBy1tWdkQ== + version "2.1.1" + resolved "https://registry.yarnpkg.com/marked/-/marked-2.1.1.tgz#b7c27f520fc4de0ddd049d9b4be3b04e06314923" + integrity sha512-5XFS69o9CzDpQDSpUYC+AN2xvq8yl1EGa5SG/GI1hP78/uTeo3PDfiDNmsUyiahpyhToDDJhQk7fNtJsga+KVw== mdurl@^1.0.1: version "1.0.1" From e5a030d511507e3fe79848561ddd6e066c7f01e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Jun 2021 23:46:03 -0700 Subject: [PATCH 203/473] chore: bump regexpp from 3.1.0 to 3.2.0 (#3545) Bumps [regexpp](https://github.com/mysticatea/regexpp) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/mysticatea/regexpp/releases) - [Commits](https://github.com/mysticatea/regexpp/compare/v3.1.0...v3.2.0) --- updated-dependencies: - dependency-name: regexpp dependency-type: direct:production update-type: version-update:semver-minor ... 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 1d64f5dbd779..e81ea7f4beff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8104,9 +8104,9 @@ regex-not@^1.0.0, regex-not@^1.0.2: safe-regex "^1.1.0" regexpp@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" - integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== repeat-element@^1.1.2: version "1.1.3" From bd217e808af7f36181d1efbe4bf2cb23524c0102 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Jun 2021 11:20:31 -0700 Subject: [PATCH 204/473] chore: bump eslint-plugin-eslint-plugin from 3.0.3 to 3.1.0 (#3546) Bumps [eslint-plugin-eslint-plugin](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin) from 3.0.3 to 3.1.0. - [Release notes](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/releases) - [Changelog](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/compare/v3.0.3...v3.1.0) --- updated-dependencies: - dependency-name: eslint-plugin-eslint-plugin dependency-type: direct:development update-type: version-update:semver-minor ... 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 e81ea7f4beff..8e017003a79f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4038,9 +4038,9 @@ eslint-plugin-eslint-comments@^3.2.0: ignore "^5.0.5" eslint-plugin-eslint-plugin@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.0.3.tgz#3356adec58bd4904f98001779f61eff5b7006ec8" - integrity sha512-vVNx9qexy0iQwqtOzzJPFAfC6j6i4L6QE//JqwJOnAC5aUHJA4yFQy56kX9JOJ2rx3iKlpTt3h/adErgbqU/SA== + version "3.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.1.0.tgz#1d5c54f30b1bddf9b34b1f1dc1a4dff0efec4f79" + integrity sha512-Czb+Dx7ktQ3fFocksu9mF1xBhEzqMhu8g9eaaxpMlnrcDPE7kwIrDo0ttpCDsVEFH9FHWbZ3EzSnQG2gb5miHg== dependencies: eslint-utils "^2.1.0" From d310e6e6b464f1d5854e49908fb49c8489ce586a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Jun 2021 11:20:47 -0700 Subject: [PATCH 205/473] chore: bump cspell from 5.6.0 to 5.6.4 (#3547) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.6.0 to 5.6.4. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/compare/v5.6.0...v5.6.4) --- updated-dependencies: - dependency-name: cspell dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 141 +++++++++++++++++++++++++++--------------------------- 1 file changed, 71 insertions(+), 70 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8e017003a79f..833ac21d42de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -460,25 +460,25 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.6.0.tgz#998410852abad3253dfe19a3786c34ad7a5ad618" - integrity sha512-l9rFp7tNq5bpUlihh54a5Gtby2Ol9slsgTS4dq7VwbZcCye2BrVW0XhjmEWpl+bngOUMHnLLza+GQrDzELgXDA== +"@cspell/cspell-bundled-dicts@^5.6.4": + version "5.6.4" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.6.4.tgz#09809441105711f545ef64950fb8ae7cb50c97cc" + integrity sha512-0Q7byfMiLpUocALf8WWoQgYJpCY2fOyoH20AF1lhzPhHkoNXw0G0TisBIqinLI/c5sLsOFrZtH+kD1+cgF/b1A== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" - "@cspell/dict-bash" "^1.0.13" + "@cspell/dict-bash" "^1.0.15" "@cspell/dict-companies" "^1.0.38" "@cspell/dict-cpp" "^1.1.39" "@cspell/dict-cryptocurrencies" "^1.0.10" "@cspell/dict-csharp" "^1.0.11" "@cspell/dict-css" "^1.0.11" "@cspell/dict-django" "^1.0.26" - "@cspell/dict-dotnet" "^1.0.25" + "@cspell/dict-dotnet" "^1.0.27" "@cspell/dict-elixir" "^1.0.24" - "@cspell/dict-en-gb" "^1.1.30" - "@cspell/dict-en_us" "^1.2.43" - "@cspell/dict-filetypes" "^1.1.5" + "@cspell/dict-en-gb" "^1.1.31" + "@cspell/dict-en_us" "^1.2.44" + "@cspell/dict-filetypes" "^1.1.7" "@cspell/dict-fonts" "^1.0.14" "@cspell/dict-fullstack" "^1.0.38" "@cspell/dict-golang" "^1.1.24" @@ -490,20 +490,20 @@ "@cspell/dict-lorem-ipsum" "^1.0.22" "@cspell/dict-lua" "^1.0.16" "@cspell/dict-node" "^1.0.12" - "@cspell/dict-npm" "^1.0.13" + "@cspell/dict-npm" "^1.0.15" "@cspell/dict-php" "^1.0.24" "@cspell/dict-powershell" "^1.0.16" "@cspell/dict-python" "^1.0.35" "@cspell/dict-ruby" "^1.0.14" "@cspell/dict-rust" "^1.0.22" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.33" + "@cspell/dict-software-terms" "^1.0.37" "@cspell/dict-typescript" "^1.0.19" -"@cspell/cspell-types@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.6.0.tgz#e7c368545bcfb3313d586dc5c7a4db017016f0e8" - integrity sha512-jbNHEQOmRaa15c5MDmaBOSRxpc3vUpAX9nhhcLrRgUk9eOIJzbIKsRJhMrwPcMd9F6V+mInAxdWGrsBETq9waw== +"@cspell/cspell-types@^5.6.4": + version "5.6.4" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.6.4.tgz#c49c5a0196e4c95d151ce7147679251df757ae19" + integrity sha512-7XoM1lakuwEJmKjXcZlqAgY1wzamrJGtKP8ZM9RzHYTfYoP/bJ8APViwVsQFpG1YyZ5K83F+vdvDkKjlRk1ZpA== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -515,10 +515,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-aws/-/dict-aws-1.0.14.tgz#beddede1053ce3622400e36c65da9fd2954e939d" integrity sha512-K21CfB4ZpKYwwDQiPfic2zJA/uxkbsd4IQGejEvDAhE3z8wBs6g6BwwqdVO767M9NgZqc021yAVpr79N5pWe3w== -"@cspell/dict-bash@^1.0.13": - version "1.0.14" - resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-1.0.14.tgz#b519aca2843ea206b034381aabcf37b18b4930b2" - integrity sha512-Q5RKcyJfPzLraFGliKaRVMBFACCtcQZ4wPLRkLLFHKEUN6/hKqKB0owrVq225AByv3aY2CMEPIaPEU7F0QDlTA== +"@cspell/dict-bash@^1.0.15": + version "1.0.15" + resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-1.0.15.tgz#ac70ab1572d9b8d0e3cf7777383b6caa2daad022" + integrity sha512-rY5Bq4RWTgJTioG8vqFbCmnalc/UEM+iBuAZBYvBfT3nU/6SN00Zjyvlh823ir2ODkUryT29CwRYwXcPnuM04w== "@cspell/dict-companies@^1.0.38": version "1.0.38" @@ -550,30 +550,30 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-django/-/dict-django-1.0.26.tgz#b97ce0112fbe8c3c3ada0387c68971b5e27483ab" integrity sha512-mn9bd7Et1L2zuibc08GVHTiD2Go3/hdjyX5KLukXDklBkq06r+tb0OtKtf1zKodtFDTIaYekGADhNhA6AnKLkg== -"@cspell/dict-dotnet@^1.0.25": - version "1.0.25" - resolved "https://registry.yarnpkg.com/@cspell/dict-dotnet/-/dict-dotnet-1.0.25.tgz#7e7ad82b730d4fa10af5d2383c452d69d23e2aaa" - integrity sha512-3BFhdquYqqjeI8Jm1dYepZKGEg+fKFhw7UfPkVdx13C4ETo5VlsS4FAblC0pCY21pDU3QgRZOGL1Bj+KWCGp/w== +"@cspell/dict-dotnet@^1.0.27": + version "1.0.27" + resolved "https://registry.yarnpkg.com/@cspell/dict-dotnet/-/dict-dotnet-1.0.27.tgz#bc1f27799553ac8780f32589e7b17ef9bfa51bf2" + integrity sha512-Ap/qpvZa6JTZI/I4ou3zJHKByjTMA6toaAUXDm4h9xVBiSESD1EkraZ/Z130w/NmJja7Xjv/UurH5IM6xGjTJQ== "@cspell/dict-elixir@^1.0.24": version "1.0.24" resolved "https://registry.yarnpkg.com/@cspell/dict-elixir/-/dict-elixir-1.0.24.tgz#fc5c15b9f66b8aa5e25c98f54103c796fec70aba" integrity sha512-pEX6GYlEx4Teusw/m+XmqoXzcHOqpcn1ZX4H33ONqR81XdPwbaKorBr1IG23Ic76IhwrFlOqs48tcnxrHYpFnA== -"@cspell/dict-en-gb@^1.1.30": - version "1.1.30" - resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.30.tgz#eee3d16b0176f5a44667f966f83097c3d6a7d654" - integrity sha512-xQUXZZ0ODBY9saso9e0BozS5FsX2o2+0fmbrekyITTTOCt/RN7bqByC7Hfj7HziQ3LxuC06EsS8ao8CKk9JTmQ== +"@cspell/dict-en-gb@^1.1.31": + version "1.1.31" + resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.31.tgz#56a99d9bfec9ded8d6fe456a63c2454f42a97b98" + integrity sha512-4VtiDhMOWrgimmYYHO0oQDSs6izvAnAhpLHoBzFeME6XMpO15XDzMWvd8ICca7kk5hk+XEGnPF4Mpa5aHJh6Pg== -"@cspell/dict-en_us@^1.2.43": - version "1.2.43" - resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.43.tgz#dae5a5cd1a47408a5d3a13c2f215793ecde5f400" - integrity sha512-WAOtAZr3rNH4zpUXSeuxEo/C65o4Xp4sVdZ9cIqI+FPU7Vrgz0wuQZIL5TwbkuGUdtQtpRfgs2kTPXzns0fjGw== +"@cspell/dict-en_us@^1.2.44": + version "1.2.44" + resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.44.tgz#1cd016013f069c62c6d37a6d463bae1d6e47461e" + integrity sha512-pdq/HXsrB34VRYZIv7jidikIQBVLSKyCLkRXBvmkbUg4NkfpNcmmA1bVXc3gOhgghDNctGXe5UIIl8hfY1nvEg== -"@cspell/dict-filetypes@^1.1.5": - version "1.1.5" - resolved "https://registry.yarnpkg.com/@cspell/dict-filetypes/-/dict-filetypes-1.1.5.tgz#d1024eb0ae3b316e3e9411e2f36e624844345563" - integrity sha512-yfkB37J+hL6W8qa4AknFp7u6CGECrw2ql2/y0lUKruLQYid0ApK+bH+ll+Sqgl2YS5QAOhclskc72aQHAcRJIQ== +"@cspell/dict-filetypes@^1.1.7": + version "1.1.7" + resolved "https://registry.yarnpkg.com/@cspell/dict-filetypes/-/dict-filetypes-1.1.7.tgz#98c69f006041c145e3205c2f7fa617645a5b78ec" + integrity sha512-b0e+eiBzTiL1yJZgPBGHP8G7Z0Kkpr/35dXlR9LWoP/EnrAlVj0ulXwErPgTwSoFdxWBgbDJjKZsrMdxWCckuA== "@cspell/dict-fonts@^1.0.14": version "1.0.14" @@ -630,10 +630,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-node/-/dict-node-1.0.12.tgz#a7236be30340ff8fe365f62c8d13121fdbe7f51c" integrity sha512-RPNn/7CSkflAWk0sbSoOkg0ORrgBARUjOW3QjB11KwV1gSu8f5W/ij/S50uIXtlrfoBLqd4OyE04jyON+g/Xfg== -"@cspell/dict-npm@^1.0.13": - version "1.0.14" - resolved "https://registry.yarnpkg.com/@cspell/dict-npm/-/dict-npm-1.0.14.tgz#047043a1d44a3dfa56f33cb8070c05867050f84a" - integrity sha512-RPaU6HJR03J9pg0yCgR59X55ozLhBkWvkHR3mD++ko5hKv0IXOfbS53nQwVN9yBAWjhCREJImemWPswoVu31zg== +"@cspell/dict-npm@^1.0.15": + version "1.0.15" + resolved "https://registry.yarnpkg.com/@cspell/dict-npm/-/dict-npm-1.0.15.tgz#4eac51a4e5258b48e2fd1af277c12cb1fd189f4d" + integrity sha512-6N1G1rGi5AsCaDu9mu+VmrrAj5S9gHv8TvJlarauDeEMS6uVl+ce2JpzDf7ld3Qu/4Dkr0sKS63OeA0DKeQTkw== "@cspell/dict-php@^1.0.24": version "1.0.24" @@ -665,10 +665,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.33": - version "1.0.35" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.35.tgz#f3d75af834f4e051e41b85fcfc4fd092d993aef1" - integrity sha512-b2q1Ja12WivVYDMkXpix+CY+PTDOHJriEZJpDWt7AG+DhwjqjASufjfBIV7U0t0e/eV7PLzbYCj0oj9lTT5eow== +"@cspell/dict-software-terms@^1.0.37": + version "1.0.37" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.37.tgz#93001d423296cbfd4bf02f14d769c2f4e322ae35" + integrity sha512-dK4vdeohyVw60h4w6j9V4pfgi6Vv4vaxS67X6By7IXPIH+S/mBcHiXhqnGXqWFSfPNB7Oh+GP47nPLAHHFRZRg== "@cspell/dict-typescript@^1.0.19": version "1.0.19" @@ -3456,35 +3456,35 @@ 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.6.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.6.0.tgz#25c459d23ceae071fb845e4affc3b32d88499150" - integrity sha512-2VLuKwm7fJmB/U3Y30GXaQiqy1Zu3Qt5lQNkWYW1i1FTjp7seodTXQUUntkILTOdMGsOgCwsQmEP9WmqVkAKUg== +cspell-glob@^5.6.4: + version "5.6.4" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.6.4.tgz#282810958f253c665e052df70b8d6fc9b14e5bb7" + integrity sha512-aSXLEOPGYAy/b97NNqw0jyB3T/JTwFtoh2n5lWisUHhqOufpcPnVbbZmX8UWIwFPs6fD4M0oFyhUCAMDg9sfhQ== dependencies: micromatch "^4.0.4" -cspell-io@^5.6.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.6.0.tgz#2e6463e6a83aba8c7707d09a54569d62bb95fd9d" - integrity sha512-PIUl7UNLcM3d/BNWD5TphuhxM0Dwpg+MkmahEjuvoYR0S67q6twNj5MOPfmih08KB1hkFecHZJDTkfUS/8a9Hg== +cspell-io@^5.6.4: + version "5.6.4" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.6.4.tgz#ce282d15c61eb631156cc92eed067362915de834" + integrity sha512-N0jgFupRsVNKt/UXx3HwGeOQJU7W+IfIKoBP0PIZuJe7MsuT+YofpQYwLcNxEQ7n5sOqRlPvS/6qRL8epClGPw== dependencies: iconv-lite "^0.6.3" iterable-to-stream "^2.0.0" -cspell-lib@^5.6.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.6.0.tgz#913e5ccdc12f4d333e8611d70eab5cf8f37294a9" - integrity sha512-Knep49uDKH/UWKrkRrwxUzo3EB8gDIL47ikJk9KMcT7EynYW8EJmoeRqDCMbagmBSID8FEHsuDV3SHR9q0FYIw== +cspell-lib@^5.6.4: + version "5.6.4" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.6.4.tgz#fd19b8bc5ac54d394aa76075697ad3b62c000fe6" + integrity sha512-54esfuMa+DTyvrRgsoo30E9u/sHH5QEB0yyQ5LeyzlxlTmaUq5kTE/gssH9jkwXt1gd4rmb8jfE55Y+tQkXWWg== dependencies: - "@cspell/cspell-bundled-dicts" "^5.6.0" - "@cspell/cspell-types" "^5.6.0" + "@cspell/cspell-bundled-dicts" "^5.6.4" + "@cspell/cspell-types" "^5.6.4" clear-module "^4.1.1" comment-json "^4.1.0" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-glob "^5.6.0" - cspell-io "^5.6.0" - cspell-trie-lib "^5.6.0" + cspell-glob "^5.6.4" + cspell-io "^5.6.4" + cspell-trie-lib "^5.6.4" find-up "^5.0.0" fs-extra "^10.0.0" gensequence "^3.1.1" @@ -3493,29 +3493,30 @@ cspell-lib@^5.6.0: resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.6.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.6.0.tgz#57199083f715a435d995e02f765d7435d65bc9c9" - integrity sha512-ZnEiKgWQv+D0HWQssSwDReTVRSXK8stl8meyu8To0Tdm/y1gTHx3JWhdBToRMFSmodLARVu4hp7mIArzcAyO1g== +cspell-trie-lib@^5.6.4: + version "5.6.4" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.6.4.tgz#e737e842a05f6130141eb53e45802294db257dd3" + integrity sha512-5BFPqkRUZLk1OCUyHExUmHQTnrie4z1TMwXRk0Ur4nE7pZ90Mu7YrPnujyXt9RAo1Wh8REhTlQoZpN60wOrBJQ== dependencies: fs-extra "^10.0.0" gensequence "^3.1.1" cspell@^5.5.2: - version "5.6.0" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.6.0.tgz#5abb52081c9386e846a989b755486a87dbb7019d" - integrity sha512-keruL7u2yKuWAOW28C6NHknyHX3zpY3PtIobaS8bZ2REGVepFi28oES3S5ZquK/fLVy9WdsbUCg9pA/sUMmIAg== + version "5.6.4" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.6.4.tgz#572fc72669c5a4cad68553b6f8943f30060c2b52" + integrity sha512-pdOvCv5Cn3mN+NPk10hZDI8Y8TDqZq//9lMC9r31xJJCqcUvWHz0FLbiEzqBbUwQJJ2KaCDUcOybZAsaRiY27w== dependencies: - "@cspell/cspell-types" "^5.6.0" + "@cspell/cspell-types" "^5.6.4" chalk "^4.1.1" commander "^7.2.0" comment-json "^4.1.0" - cspell-glob "^5.6.0" - cspell-lib "^5.6.0" + cspell-glob "^5.6.4" + cspell-lib "^5.6.4" fs-extra "^10.0.0" get-stdin "^8.0.0" glob "^7.1.7" strip-ansi "^6.0.0" + vscode-uri "^3.0.2" cssom@^0.4.4: version "0.4.4" From 336a1bcaa45f8195d06e95de54fd9e767618d59e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Jun 2021 11:20:56 -0700 Subject: [PATCH 206/473] chore: bump @nrwl/tao from 12.3.5 to 12.4.0 (#3543) Bumps [@nrwl/tao](https://github.com/nrwl/nx) from 12.3.5 to 12.4.0. - [Release notes](https://github.com/nrwl/nx/releases) - [Commits](https://github.com/nrwl/nx/compare/12.3.5...12.4.0) --- updated-dependencies: - dependency-name: "@nrwl/tao" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/yarn.lock b/yarn.lock index 833ac21d42de..6cf4549af018 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1776,7 +1776,7 @@ strip-json-comments "^3.1.1" tar "5.0.5" -"@nrwl/tao@12.4.0": +"@nrwl/tao@12.4.0", "@nrwl/tao@^12.3.5": version "12.4.0" resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.4.0.tgz#90620513fc66faca22c98a64623b2d1c058bb1a4" integrity sha512-WH8SqOuJuuBwXpLX9vIVVWEovDqfLmiyFQS4Ebz35KWXNoIv9MS3QgItXKCu7X463hiJnxjAA3RqVYIt8U1vXg== @@ -1792,22 +1792,6 @@ tslib "^2.0.0" yargs-parser "20.0.0" -"@nrwl/tao@^12.3.5": - version "12.3.5" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.3.5.tgz#7cbc65a561e5f9255403dc55bddf0f9a6743397c" - integrity sha512-K/Q0GsrLzqXubmLgm8tFSjvrG61lQ00DrtNZ5dHywOAXREeV11A0bR7lXVDTohABk3D9Wgly5IKZPZ3iUwscsg== - dependencies: - chalk "4.1.0" - enquirer "~2.3.6" - fs-extra "^9.1.0" - rxjs "^6.5.4" - rxjs-for-await "0.0.2" - semver "7.3.4" - strip-json-comments "^3.1.1" - tmp "~0.2.1" - tslib "^2.0.0" - yargs-parser "20.0.0" - "@nrwl/workspace@^12.3.5": version "12.4.0" resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.4.0.tgz#095d29bbb1d19f6266af06c528ebc83392d07654" From a2f1dfb7bf0407620919f8f2374e4e2f5cf1cd00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Jun 2021 18:37:37 +0000 Subject: [PATCH 207/473] chore: bump globby from 11.0.3 to 11.0.4 (#3548) 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 6cf4549af018..555905851742 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4878,9 +4878,9 @@ globals@^13.6.0: type-fest "^0.20.2" globby@^11.0.1, globby@^11.0.3: - version "11.0.3" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" - integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== + version "11.0.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" + integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" From 2a36e3e737f935cc6b967befb022d10a83c8bc9b Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sun, 20 Jun 2021 10:31:02 +1200 Subject: [PATCH 208/473] feat(experimental-utils): add `only` property to `RuleTester` types (#3555) --- packages/experimental-utils/src/ts-eslint/RuleTester.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/experimental-utils/src/ts-eslint/RuleTester.ts b/packages/experimental-utils/src/ts-eslint/RuleTester.ts index e237586d151c..bbd383115020 100644 --- a/packages/experimental-utils/src/ts-eslint/RuleTester.ts +++ b/packages/experimental-utils/src/ts-eslint/RuleTester.ts @@ -36,6 +36,10 @@ interface ValidTestCase> { * Settings for the test case. */ readonly settings?: Readonly>; + /** + * Run this case exclusively for debugging in supported test frameworks. + */ + readonly only?: boolean; } interface SuggestionOutput { From ffbb3cff18bc78467e70e794f9b1f0e79be4aff7 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sun, 20 Jun 2021 16:24:58 +1200 Subject: [PATCH 209/473] fix(experimental-utils): expand `RuleTester` config properties (#3557) --- packages/experimental-utils/src/ts-eslint/RuleTester.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/experimental-utils/src/ts-eslint/RuleTester.ts b/packages/experimental-utils/src/ts-eslint/RuleTester.ts index bbd383115020..445b4d8141e2 100644 --- a/packages/experimental-utils/src/ts-eslint/RuleTester.ts +++ b/packages/experimental-utils/src/ts-eslint/RuleTester.ts @@ -1,6 +1,7 @@ import { RuleTester as ESLintRuleTester } from 'eslint'; import { AST_NODE_TYPES, AST_TOKEN_TYPES } from '../ts-estree'; import { ParserOptions } from './ParserOptions'; +import { Linter } from './Linter'; import { RuleCreateFunction, RuleModule } from './Rule'; interface ValidTestCase> { @@ -121,7 +122,7 @@ interface RunTests< readonly valid: readonly (ValidTestCase | string)[]; readonly invalid: readonly InvalidTestCase[]; } -interface RuleTesterConfig { +interface RuleTesterConfig extends Linter.Config { // should be require.resolve(parserPackageName) readonly parser: string; readonly parserOptions?: Readonly; From e2e76a7b60a23a5f26e9e14b75ab91c44ee4e5e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 21 Jun 2021 00:54:30 +0200 Subject: [PATCH 210/473] refactor(experimental-utils): simplify `eslint-utils`' predicate types in `ast-utils` (#3550) --- .../src/ast-utils/eslint-utils/predicates.ts | 52 ++++++++----------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts index 668fef3617e4..ecadb4075381 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts @@ -1,9 +1,12 @@ import * as eslintUtils from 'eslint-utils'; import { TSESTree } from '../../ts-estree'; -const isArrowToken = eslintUtils.isArrowToken as ( +type IsPunctuatorTokenWithValueFunction = ( token: TSESTree.Token, -) => token is TSESTree.PunctuatorToken & { value: '=>' }; +) => token is TSESTree.PunctuatorToken & { value: Value }; + +const isArrowToken = + eslintUtils.isArrowToken as IsPunctuatorTokenWithValueFunction<'=>'>; const isNotArrowToken = eslintUtils.isNotArrowToken as ( token: TSESTree.Token, ) => token is Exclude< @@ -11,9 +14,8 @@ const isNotArrowToken = eslintUtils.isNotArrowToken as ( TSESTree.PunctuatorToken & { value: '=>' } >; -const isClosingBraceToken = eslintUtils.isClosingBraceToken as ( - token: TSESTree.Token, -) => token is TSESTree.PunctuatorToken & { value: '}' }; +const isClosingBraceToken = + eslintUtils.isClosingBraceToken as IsPunctuatorTokenWithValueFunction<'}'>; const isNotClosingBraceToken = eslintUtils.isNotClosingBraceToken as ( token: TSESTree.Token, ) => token is Exclude< @@ -21,9 +23,8 @@ const isNotClosingBraceToken = eslintUtils.isNotClosingBraceToken as ( TSESTree.PunctuatorToken & { value: '}' } >; -const isClosingBracketToken = eslintUtils.isClosingBracketToken as ( - token: TSESTree.Token, -) => token is TSESTree.PunctuatorToken & { value: ']' }; +const isClosingBracketToken = + eslintUtils.isClosingBracketToken as IsPunctuatorTokenWithValueFunction<']'>; const isNotClosingBracketToken = eslintUtils.isNotClosingBracketToken as ( token: TSESTree.Token, ) => token is Exclude< @@ -31,9 +32,8 @@ const isNotClosingBracketToken = eslintUtils.isNotClosingBracketToken as ( TSESTree.PunctuatorToken & { value: ']' } >; -const isClosingParenToken = eslintUtils.isClosingParenToken as ( - token: TSESTree.Token, -) => token is TSESTree.PunctuatorToken & { value: ')' }; +const isClosingParenToken = + eslintUtils.isClosingParenToken as IsPunctuatorTokenWithValueFunction<')'>; const isNotClosingParenToken = eslintUtils.isNotClosingParenToken as ( token: TSESTree.Token, ) => token is Exclude< @@ -41,9 +41,8 @@ const isNotClosingParenToken = eslintUtils.isNotClosingParenToken as ( TSESTree.PunctuatorToken & { value: ')' } >; -const isColonToken = eslintUtils.isColonToken as ( - token: TSESTree.Token, -) => token is TSESTree.PunctuatorToken & { value: ':' }; +const isColonToken = + eslintUtils.isColonToken as IsPunctuatorTokenWithValueFunction<':'>; const isNotColonToken = eslintUtils.isNotColonToken as ( token: TSESTree.Token, ) => token is Exclude< @@ -51,9 +50,8 @@ const isNotColonToken = eslintUtils.isNotColonToken as ( TSESTree.PunctuatorToken & { value: ':' } >; -const isCommaToken = eslintUtils.isCommaToken as ( - token: TSESTree.Token, -) => token is TSESTree.PunctuatorToken & { value: ',' }; +const isCommaToken = + eslintUtils.isCommaToken as IsPunctuatorTokenWithValueFunction<','>; const isNotCommaToken = eslintUtils.isNotCommaToken as ( token: TSESTree.Token, ) => token is Exclude< @@ -68,9 +66,8 @@ const isNotCommentToken = eslintUtils.isNotCommentToken as ( token: TSESTree.Token, ) => token is Exclude; -const isOpeningBraceToken = eslintUtils.isOpeningBraceToken as ( - token: TSESTree.Token, -) => token is TSESTree.PunctuatorToken & { value: '{' }; +const isOpeningBraceToken = + eslintUtils.isOpeningBraceToken as IsPunctuatorTokenWithValueFunction<'{'>; const isNotOpeningBraceToken = eslintUtils.isNotOpeningBraceToken as ( token: TSESTree.Token, ) => token is Exclude< @@ -78,9 +75,8 @@ const isNotOpeningBraceToken = eslintUtils.isNotOpeningBraceToken as ( TSESTree.PunctuatorToken & { value: '{' } >; -const isOpeningBracketToken = eslintUtils.isOpeningBracketToken as ( - token: TSESTree.Token, -) => token is TSESTree.PunctuatorToken & { value: '[' }; +const isOpeningBracketToken = + eslintUtils.isOpeningBracketToken as IsPunctuatorTokenWithValueFunction<'['>; const isNotOpeningBracketToken = eslintUtils.isNotOpeningBracketToken as ( token: TSESTree.Token, ) => token is Exclude< @@ -88,9 +84,8 @@ const isNotOpeningBracketToken = eslintUtils.isNotOpeningBracketToken as ( TSESTree.PunctuatorToken & { value: '[' } >; -const isOpeningParenToken = eslintUtils.isOpeningParenToken as ( - token: TSESTree.Token, -) => token is TSESTree.PunctuatorToken & { value: '(' }; +const isOpeningParenToken = + eslintUtils.isOpeningParenToken as IsPunctuatorTokenWithValueFunction<'('>; const isNotOpeningParenToken = eslintUtils.isNotOpeningParenToken as ( token: TSESTree.Token, ) => token is Exclude< @@ -98,9 +93,8 @@ const isNotOpeningParenToken = eslintUtils.isNotOpeningParenToken as ( TSESTree.PunctuatorToken & { value: '(' } >; -const isSemicolonToken = eslintUtils.isSemicolonToken as ( - token: TSESTree.Token, -) => token is TSESTree.PunctuatorToken & { value: ';' }; +const isSemicolonToken = + eslintUtils.isSemicolonToken as IsPunctuatorTokenWithValueFunction<';'>; const isNotSemicolonToken = eslintUtils.isNotSemicolonToken as ( token: TSESTree.Token, ) => token is Exclude< From c50f70b73e3c7e1e51b3fbc71fe5d4d5e633d51f Mon Sep 17 00:00:00 2001 From: Sukka Date: Mon, 21 Jun 2021 07:04:42 +0800 Subject: [PATCH 211/473] chore(eslint-plugin): remove lodash from dependencies (#3478) --- packages/eslint-plugin/package.json | 1 - packages/eslint-plugin/src/util/astUtils.ts | 2 +- packages/eslint-plugin/src/util/escapeRegExp.ts | 12 ++++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 packages/eslint-plugin/src/util/escapeRegExp.ts diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 47cc63e7719b..e3ff76717139 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -48,7 +48,6 @@ "@typescript-eslint/scope-manager": "4.27.0", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", - "lodash": "^4.17.21", "regexpp": "^3.1.0", "semver": "^7.3.5", "tsutils": "^3.21.0" diff --git a/packages/eslint-plugin/src/util/astUtils.ts b/packages/eslint-plugin/src/util/astUtils.ts index 53ad3f116e60..3fe1c01e2968 100644 --- a/packages/eslint-plugin/src/util/astUtils.ts +++ b/packages/eslint-plugin/src/util/astUtils.ts @@ -1,5 +1,5 @@ import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; -import escapeRegExp from 'lodash/escapeRegExp'; +import { escapeRegExp } from './escapeRegExp'; // deeply re-export, for convenience export * from '@typescript-eslint/experimental-utils/dist/ast-utils'; diff --git a/packages/eslint-plugin/src/util/escapeRegExp.ts b/packages/eslint-plugin/src/util/escapeRegExp.ts new file mode 100644 index 000000000000..52d161b3b207 --- /dev/null +++ b/packages/eslint-plugin/src/util/escapeRegExp.ts @@ -0,0 +1,12 @@ +/** + * Lodash + * Released under MIT license + */ +const reRegExpChar = /[\\^$.*+?()[\]{}|]/g; +const reHasRegExpChar = RegExp(reRegExpChar.source); + +export function escapeRegExp(string = ''): string { + return string && reHasRegExpChar.test(string) + ? string.replace(reRegExpChar, '\\$&') + : string; +} From ac86a79bd416f031beccc7bdac28a938cb354ba5 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 20 Jun 2021 19:10:03 -0400 Subject: [PATCH 212/473] fix(eslint-plugin): [prefer-regexp-exec] factor in union types (#3434) --- .../src/rules/prefer-regexp-exec.ts | 114 +++++++++++------- .../tests/rules/prefer-regexp-exec.test.ts | 93 ++++---------- 2 files changed, 92 insertions(+), 115 deletions(-) diff --git a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts index 636fe2b3825a..0d6693715bac 100644 --- a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts +++ b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts @@ -2,6 +2,8 @@ import { AST_NODE_TYPES, TSESTree, } from '@typescript-eslint/experimental-utils'; +import * as tsutils from 'tsutils'; +import * as ts from 'typescript'; import { createRule, getParserServices, @@ -10,6 +12,13 @@ import { getWrappingFixer, } from '../util'; +enum ArgumentType { + Other = 0, + String = 1 << 0, + RegExp = 1 << 1, + Both = String | RegExp, +} + export default createRule({ name: 'prefer-regexp-exec', defaultOptions: [], @@ -37,25 +46,33 @@ export default createRule({ const sourceCode = context.getSourceCode(); /** - * Check if a given node is a string. - * @param node The node to check. + * Check if a given node type is a string. + * @param node The node type to check. */ - function isStringType(node: TSESTree.Node): boolean { - const objectType = typeChecker.getTypeAtLocation( - parserServices.esTreeNodeToTSNodeMap.get(node), - ); - return getTypeName(typeChecker, objectType) === 'string'; + function isStringType(type: ts.Type): boolean { + return getTypeName(typeChecker, type) === 'string'; } /** - * Check if a given node is a RegExp. - * @param node The node to check. + * Check if a given node type is a RegExp. + * @param node The node type to check. */ - function isRegExpType(node: TSESTree.Node): boolean { - const objectType = typeChecker.getTypeAtLocation( - parserServices.esTreeNodeToTSNodeMap.get(node), - ); - return getTypeName(typeChecker, objectType) === 'RegExp'; + function isRegExpType(type: ts.Type): boolean { + return getTypeName(typeChecker, type) === 'RegExp'; + } + + function collectArgumentTypes(types: ts.Type[]): ArgumentType { + let result = ArgumentType.Other; + + for (const type of types) { + if (isRegExpType(type)) { + result |= ArgumentType.RegExp; + } else if (isStringType(type)) { + result |= ArgumentType.String; + } + } + + return result; } return { @@ -67,7 +84,13 @@ export default createRule({ const argumentNode = callNode.arguments[0]; const argumentValue = getStaticValue(argumentNode, globalScope); - if (!isStringType(objectNode)) { + if ( + !isStringType( + typeChecker.getTypeAtLocation( + parserServices.esTreeNodeToTSNodeMap.get(objectNode), + ), + ) + ) { return; } @@ -97,38 +120,39 @@ export default createRule({ }); } - 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})`, - }), - }); - } + const argumentType = typeChecker.getTypeAtLocation( + parserServices.esTreeNodeToTSNodeMap.get(argumentNode), + ); + const argumentTypes = collectArgumentTypes( + tsutils.unionTypeParts(argumentType), + ); + switch (argumentTypes) { + case ArgumentType.RegExp: + return context.report({ + node: memberNode.property, + messageId: 'regExpExecOverStringMatch', + fix: getWrappingFixer({ + sourceCode, + node: callNode, + innerNode: [objectNode, argumentNode], + wrap: (objectCode, argumentCode) => + `${argumentCode}.exec(${objectCode})`, + }), + }); - 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})`, - }), - }); + case ArgumentType.String: + 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/tests/rules/prefer-regexp-exec.test.ts b/packages/eslint-plugin/tests/rules/prefer-regexp-exec.test.ts index 95cb567d78bd..b45935108071 100644 --- a/packages/eslint-plugin/tests/rules/prefer-regexp-exec.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-regexp-exec.test.ts @@ -33,6 +33,29 @@ function f(s: string | string[]) { s.match(/e/); } `, + "(Math.random() > 0.5 ? 'abc' : 123).match(2);", + "'212'.match(2);", + "'212'.match(+2);", + "'oNaNo'.match(NaN);", + "'Infinity contains -Infinity and +Infinity in JavaScript.'.match(Infinity);", + "'Infinity contains -Infinity and +Infinity in JavaScript.'.match(+Infinity);", + "'Infinity contains -Infinity and +Infinity in JavaScript.'.match(-Infinity);", + "'void and null'.match(null);", + ` +const matchers = ['package-lock.json', /regexp/]; +const file = ''; +matchers.some(matcher => !!file.match(matcher)); + `, + ` +const matchers = [/regexp/, 'package-lock.json']; +const file = ''; +matchers.some(matcher => !!file.match(matcher)); + `, + ` +const matchers = [{ match: (s: RegExp) => false }]; +const file = ''; +matchers.some(matcher => !!file.match(matcher)); + `, ], invalid: [ { @@ -95,76 +118,6 @@ const search = 'thing'; RegExp(search).exec(text); `, }, - { - code: "'212'.match(2);", - errors: [ - { - messageId: 'regExpExecOverStringMatch', - line: 1, - column: 7, - }, - ], - }, - { - code: "'212'.match(+2);", - errors: [ - { - messageId: 'regExpExecOverStringMatch', - line: 1, - column: 7, - }, - ], - }, - { - code: "'oNaNo'.match(NaN);", - errors: [ - { - messageId: 'regExpExecOverStringMatch', - line: 1, - column: 9, - }, - ], - }, - { - code: "'Infinity contains -Infinity and +Infinity in JavaScript.'.match(Infinity);", - errors: [ - { - messageId: 'regExpExecOverStringMatch', - line: 1, - column: 60, - }, - ], - }, - { - code: "'Infinity contains -Infinity and +Infinity in JavaScript.'.match(+Infinity);", - errors: [ - { - messageId: 'regExpExecOverStringMatch', - line: 1, - column: 60, - }, - ], - }, - { - code: "'Infinity contains -Infinity and +Infinity in JavaScript.'.match(-Infinity);", - errors: [ - { - messageId: 'regExpExecOverStringMatch', - line: 1, - column: 60, - }, - ], - }, - { - code: "'void and null'.match(null);", - errors: [ - { - messageId: 'regExpExecOverStringMatch', - line: 1, - column: 17, - }, - ], - }, { code: ` function f(s: 'a' | 'b') { From abfc19bf9364d881bdf594ee166a1deb23240630 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Mon, 21 Jun 2021 11:10:54 +1200 Subject: [PATCH 213/473] feat(experimental-utils): use mergable interface for `settings` property (#3556) --- packages/experimental-utils/src/ts-eslint/Linter.ts | 9 +++++++-- packages/experimental-utils/src/ts-eslint/Rule.ts | 11 ++++++++++- .../experimental-utils/src/ts-eslint/RuleTester.ts | 8 ++++++-- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/packages/experimental-utils/src/ts-eslint/Linter.ts b/packages/experimental-utils/src/ts-eslint/Linter.ts index 9abefbabe7d5..56476834cc03 100644 --- a/packages/experimental-utils/src/ts-eslint/Linter.ts +++ b/packages/experimental-utils/src/ts-eslint/Linter.ts @@ -3,7 +3,12 @@ import { Linter as ESLintLinter } from 'eslint'; import { TSESTree, ParserServices } from '../ts-estree'; import { ParserOptions as TSParserOptions } from './ParserOptions'; -import { RuleCreateFunction, RuleFix, RuleModule } from './Rule'; +import { + RuleCreateFunction, + RuleFix, + RuleModule, + SharedConfigurationSettings, +} from './Rule'; import { Scope } from './Scope'; import { SourceCode } from './SourceCode'; @@ -164,7 +169,7 @@ namespace Linter { /** * The shared settings. */ - settings?: { [name: string]: unknown }; + settings?: SharedConfigurationSettings; } export interface ConfigOverride extends BaseConfig { diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index 098ae411bc4e..20a7735f08b6 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -165,6 +165,14 @@ type ReportDescriptor = ReportDescriptorWithSuggestion & (ReportDescriptorNodeOptionalLoc | ReportDescriptorLocOnly); +/** + * Plugins can add their settings using declaration + * merging against this interface. + */ +interface SharedConfigurationSettings { + [name: string]: unknown; +} + interface RuleContext< TMessageIds extends string, TOptions extends readonly unknown[], @@ -194,7 +202,7 @@ interface RuleContext< * The shared settings from configuration. * We do not have any shared settings in this plugin. */ - settings: Record; + settings: SharedConfigurationSettings; /** * Returns an array of the ancestors of the currently-traversed node, starting at @@ -452,4 +460,5 @@ export { RuleMetaData, RuleMetaDataDocs, RuleModule, + SharedConfigurationSettings, }; diff --git a/packages/experimental-utils/src/ts-eslint/RuleTester.ts b/packages/experimental-utils/src/ts-eslint/RuleTester.ts index 445b4d8141e2..9a255b242070 100644 --- a/packages/experimental-utils/src/ts-eslint/RuleTester.ts +++ b/packages/experimental-utils/src/ts-eslint/RuleTester.ts @@ -2,7 +2,11 @@ import { RuleTester as ESLintRuleTester } from 'eslint'; import { AST_NODE_TYPES, AST_TOKEN_TYPES } from '../ts-estree'; import { ParserOptions } from './ParserOptions'; import { Linter } from './Linter'; -import { RuleCreateFunction, RuleModule } from './Rule'; +import { + RuleCreateFunction, + RuleModule, + SharedConfigurationSettings, +} from './Rule'; interface ValidTestCase> { /** @@ -36,7 +40,7 @@ interface ValidTestCase> { /** * Settings for the test case. */ - readonly settings?: Readonly>; + readonly settings?: Readonly; /** * Run this case exclusively for debugging in supported test frameworks. */ From 44f9c07e92294fe75e2e5239030cc6eb7dacdfe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 21 Jun 2021 01:35:06 +0200 Subject: [PATCH 214/473] chore(ast-spec): move `ImportDeclaration` to `declarations` folder (#3562) --- .../src/{statement => declaration}/ImportDeclaration/spec.ts | 0 packages/ast-spec/src/declaration/spec.ts | 1 + packages/ast-spec/src/statement/spec.ts | 1 - packages/ast-spec/src/unions/Node.ts | 2 +- packages/ast-spec/src/unions/Statement.ts | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) rename packages/ast-spec/src/{statement => declaration}/ImportDeclaration/spec.ts (100%) diff --git a/packages/ast-spec/src/statement/ImportDeclaration/spec.ts b/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts similarity index 100% rename from packages/ast-spec/src/statement/ImportDeclaration/spec.ts rename to packages/ast-spec/src/declaration/ImportDeclaration/spec.ts diff --git a/packages/ast-spec/src/declaration/spec.ts b/packages/ast-spec/src/declaration/spec.ts index 8d29c3cd70a1..52ab7c72bab6 100644 --- a/packages/ast-spec/src/declaration/spec.ts +++ b/packages/ast-spec/src/declaration/spec.ts @@ -3,6 +3,7 @@ export * from './ExportAllDeclaration/spec'; export * from './ExportDefaultDeclaration/spec'; export * from './ExportNamedDeclaration/spec'; export * from './FunctionDeclaration/spec'; +export * from './ImportDeclaration/spec'; export * from './TSDeclareFunction/spec'; export * from './TSEnumDeclaration/spec'; export * from './TSImportEqualsDeclaration/spec'; diff --git a/packages/ast-spec/src/statement/spec.ts b/packages/ast-spec/src/statement/spec.ts index d1ce293283e4..2621cf53004e 100644 --- a/packages/ast-spec/src/statement/spec.ts +++ b/packages/ast-spec/src/statement/spec.ts @@ -8,7 +8,6 @@ export * from './ForInStatement/spec'; export * from './ForOfStatement/spec'; export * from './ForStatement/spec'; export * from './IfStatement/spec'; -export * from './ImportDeclaration/spec'; export * from './LabeledStatement/spec'; export * from './ReturnStatement/spec'; export * from './SwitchStatement/spec'; diff --git a/packages/ast-spec/src/unions/Node.ts b/packages/ast-spec/src/unions/Node.ts index fe3435596a98..61c943af566a 100644 --- a/packages/ast-spec/src/unions/Node.ts +++ b/packages/ast-spec/src/unions/Node.ts @@ -3,6 +3,7 @@ import type { ExportAllDeclaration } from '../declaration/ExportAllDeclaration/s import type { ExportDefaultDeclaration } from '../declaration/ExportDefaultDeclaration/spec'; import type { ExportNamedDeclaration } from '../declaration/ExportNamedDeclaration/spec'; import type { FunctionDeclaration } from '../declaration/FunctionDeclaration/spec'; +import type { ImportDeclaration } from '../declaration/ImportDeclaration/spec'; import type { TSDeclareFunction } from '../declaration/TSDeclareFunction/spec'; import type { TSEnumDeclaration } from '../declaration/TSEnumDeclaration/spec'; import type { TSImportEqualsDeclaration } from '../declaration/TSImportEqualsDeclaration/spec'; @@ -103,7 +104,6 @@ import type { ForInStatement } from '../statement/ForInStatement/spec'; import type { ForOfStatement } from '../statement/ForOfStatement/spec'; import type { ForStatement } from '../statement/ForStatement/spec'; import type { IfStatement } from '../statement/IfStatement/spec'; -import type { ImportDeclaration } from '../statement/ImportDeclaration/spec'; import type { LabeledStatement } from '../statement/LabeledStatement/spec'; import type { ReturnStatement } from '../statement/ReturnStatement/spec'; import type { SwitchStatement } from '../statement/SwitchStatement/spec'; diff --git a/packages/ast-spec/src/unions/Statement.ts b/packages/ast-spec/src/unions/Statement.ts index 7345a159982e..e1af96b7fe5d 100644 --- a/packages/ast-spec/src/unions/Statement.ts +++ b/packages/ast-spec/src/unions/Statement.ts @@ -3,6 +3,7 @@ import type { ExportAllDeclaration } from '../declaration/ExportAllDeclaration/s import type { ExportDefaultDeclaration } from '../declaration/ExportDefaultDeclaration/spec'; import type { ExportNamedDeclaration } from '../declaration/ExportNamedDeclaration/spec'; import type { FunctionDeclaration } from '../declaration/FunctionDeclaration/spec'; +import type { ImportDeclaration } from '../declaration/ImportDeclaration/spec'; import type { TSDeclareFunction } from '../declaration/TSDeclareFunction/spec'; import type { TSEnumDeclaration } from '../declaration/TSEnumDeclaration/spec'; import type { TSImportEqualsDeclaration } from '../declaration/TSImportEqualsDeclaration/spec'; @@ -21,7 +22,6 @@ import type { ForInStatement } from '../statement/ForInStatement/spec'; import type { ForOfStatement } from '../statement/ForOfStatement/spec'; import type { ForStatement } from '../statement/ForStatement/spec'; import type { IfStatement } from '../statement/IfStatement/spec'; -import type { ImportDeclaration } from '../statement/ImportDeclaration/spec'; import type { LabeledStatement } from '../statement/LabeledStatement/spec'; import type { ReturnStatement } from '../statement/ReturnStatement/spec'; import type { SwitchStatement } from '../statement/SwitchStatement/spec'; From abda9614e944d9a8f47f75d2dec99e01d04ccc15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 21 Jun 2021 09:33:57 +0200 Subject: [PATCH 215/473] tests(ast-spec): make `PunctuatorTokenToText` more type-safe (#3529) --- .../token/PunctuatorToken/PunctuatorTokenToText.ts | 8 +++++--- packages/ast-spec/tests/PunctuatorTokenToText.test.ts | 11 +++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 packages/ast-spec/tests/PunctuatorTokenToText.test.ts diff --git a/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts b/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts index a3ab12ee8564..174e98e6c6b0 100644 --- a/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts +++ b/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts @@ -44,6 +44,8 @@ export interface PunctuatorTokenToText { [SyntaxKind.ColonToken]: ':'; [SyntaxKind.AtToken]: '@'; [SyntaxKind.QuestionQuestionToken]: '??'; + [SyntaxKind.BacktickToken]: '`'; + // [SyntaxKind.HashToken]: '#'; // new in PunctuationSyntaxKind in TS 4.4 [SyntaxKind.EqualsToken]: '='; [SyntaxKind.PlusEqualsToken]: '+='; [SyntaxKind.MinusEqualsToken]: '-='; @@ -56,8 +58,8 @@ export interface PunctuatorTokenToText { [SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken]: '>>>='; [SyntaxKind.AmpersandEqualsToken]: '&='; [SyntaxKind.BarEqualsToken]: '|='; - [SyntaxKind.BarBarEqualsToken]: '||='; - [SyntaxKind.AmpersandAmpersandEqualsToken]: '&&='; - [SyntaxKind.QuestionQuestionEqualsToken]: '??='; + [SyntaxKind.BarBarEqualsToken]: '||='; // included in PunctuationSyntaxKind in TS 4.4 + [SyntaxKind.AmpersandAmpersandEqualsToken]: '&&='; // included in PunctuationSyntaxKind in TS 4.4 + [SyntaxKind.QuestionQuestionEqualsToken]: '??='; // included in PunctuationSyntaxKind in TS 4.4 [SyntaxKind.CaretEqualsToken]: '^='; } diff --git a/packages/ast-spec/tests/PunctuatorTokenToText.test.ts b/packages/ast-spec/tests/PunctuatorTokenToText.test.ts new file mode 100644 index 000000000000..32deee0bea9a --- /dev/null +++ b/packages/ast-spec/tests/PunctuatorTokenToText.test.ts @@ -0,0 +1,11 @@ +import type { PunctuationSyntaxKind } from 'typescript'; + +import type { PunctuatorTokenToText } from '../src'; + +// @ts-expect-error: purposely unused +type _Test = { + readonly [T in PunctuationSyntaxKind]: PunctuatorTokenToText[T]; + // If there are any PunctuationSyntaxKind members that don't have a + // corresponding PunctuatorTokenToText, then this line will error with + // "Type 'T' cannot be used to index type 'PunctuatorTokenToText'." +}; From 44c583aeefc2fcde238ac52c05b458deb7f067b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 21 Jun 2021 09:35:32 +0200 Subject: [PATCH 216/473] refactor(experimental-utils): simplify `eslint-utils`' predicate types in `ast-utils` (#3563) --- .../src/ast-utils/eslint-utils/predicates.ts | 83 ++++++------------- 1 file changed, 25 insertions(+), 58 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts index ecadb4075381..290afca90eb3 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts @@ -5,59 +5,42 @@ type IsPunctuatorTokenWithValueFunction = ( token: TSESTree.Token, ) => token is TSESTree.PunctuatorToken & { value: Value }; -const isArrowToken = - eslintUtils.isArrowToken as IsPunctuatorTokenWithValueFunction<'=>'>; -const isNotArrowToken = eslintUtils.isNotArrowToken as ( +type IsNotPunctuatorTokenWithValueFunction = ( token: TSESTree.Token, ) => token is Exclude< TSESTree.Token, - TSESTree.PunctuatorToken & { value: '=>' } + TSESTree.PunctuatorToken & { value: Value } >; +const isArrowToken = + eslintUtils.isArrowToken as IsPunctuatorTokenWithValueFunction<'=>'>; +const isNotArrowToken = + eslintUtils.isNotArrowToken as IsNotPunctuatorTokenWithValueFunction<'=>'>; + const isClosingBraceToken = eslintUtils.isClosingBraceToken as IsPunctuatorTokenWithValueFunction<'}'>; -const isNotClosingBraceToken = eslintUtils.isNotClosingBraceToken as ( - token: TSESTree.Token, -) => token is Exclude< - TSESTree.Token, - TSESTree.PunctuatorToken & { value: '}' } ->; +const isNotClosingBraceToken = + eslintUtils.isNotClosingBraceToken as IsNotPunctuatorTokenWithValueFunction<'}'>; const isClosingBracketToken = eslintUtils.isClosingBracketToken as IsPunctuatorTokenWithValueFunction<']'>; -const isNotClosingBracketToken = eslintUtils.isNotClosingBracketToken as ( - token: TSESTree.Token, -) => token is Exclude< - TSESTree.Token, - TSESTree.PunctuatorToken & { value: ']' } ->; +const isNotClosingBracketToken = + eslintUtils.isNotClosingBracketToken as IsNotPunctuatorTokenWithValueFunction<']'>; const isClosingParenToken = eslintUtils.isClosingParenToken as IsPunctuatorTokenWithValueFunction<')'>; -const isNotClosingParenToken = eslintUtils.isNotClosingParenToken as ( - token: TSESTree.Token, -) => token is Exclude< - TSESTree.Token, - TSESTree.PunctuatorToken & { value: ')' } ->; +const isNotClosingParenToken = + eslintUtils.isNotClosingParenToken as IsNotPunctuatorTokenWithValueFunction<')'>; const isColonToken = eslintUtils.isColonToken as IsPunctuatorTokenWithValueFunction<':'>; -const isNotColonToken = eslintUtils.isNotColonToken as ( - token: TSESTree.Token, -) => token is Exclude< - TSESTree.Token, - TSESTree.PunctuatorToken & { value: ':' } ->; +const isNotColonToken = + eslintUtils.isNotColonToken as IsNotPunctuatorTokenWithValueFunction<':'>; const isCommaToken = eslintUtils.isCommaToken as IsPunctuatorTokenWithValueFunction<','>; -const isNotCommaToken = eslintUtils.isNotCommaToken as ( - token: TSESTree.Token, -) => token is Exclude< - TSESTree.Token, - TSESTree.PunctuatorToken & { value: ',' } ->; +const isNotCommaToken = + eslintUtils.isNotCommaToken as IsNotPunctuatorTokenWithValueFunction<','>; const isCommentToken = eslintUtils.isCommentToken as ( token: TSESTree.Token, @@ -68,39 +51,23 @@ const isNotCommentToken = eslintUtils.isNotCommentToken as ( const isOpeningBraceToken = eslintUtils.isOpeningBraceToken as IsPunctuatorTokenWithValueFunction<'{'>; -const isNotOpeningBraceToken = eslintUtils.isNotOpeningBraceToken as ( - token: TSESTree.Token, -) => token is Exclude< - TSESTree.Token, - TSESTree.PunctuatorToken & { value: '{' } ->; +const isNotOpeningBraceToken = + eslintUtils.isNotOpeningBraceToken as IsNotPunctuatorTokenWithValueFunction<'{'>; const isOpeningBracketToken = eslintUtils.isOpeningBracketToken as IsPunctuatorTokenWithValueFunction<'['>; -const isNotOpeningBracketToken = eslintUtils.isNotOpeningBracketToken as ( - token: TSESTree.Token, -) => token is Exclude< - TSESTree.Token, - TSESTree.PunctuatorToken & { value: '[' } ->; +const isNotOpeningBracketToken = + eslintUtils.isNotOpeningBracketToken as IsNotPunctuatorTokenWithValueFunction<'['>; const isOpeningParenToken = eslintUtils.isOpeningParenToken as IsPunctuatorTokenWithValueFunction<'('>; -const isNotOpeningParenToken = eslintUtils.isNotOpeningParenToken as ( - token: TSESTree.Token, -) => token is Exclude< - TSESTree.Token, - TSESTree.PunctuatorToken & { value: '(' } ->; +const isNotOpeningParenToken = + eslintUtils.isNotOpeningParenToken as IsNotPunctuatorTokenWithValueFunction<'('>; const isSemicolonToken = eslintUtils.isSemicolonToken as IsPunctuatorTokenWithValueFunction<';'>; -const isNotSemicolonToken = eslintUtils.isNotSemicolonToken as ( - token: TSESTree.Token, -) => token is Exclude< - TSESTree.Token, - TSESTree.PunctuatorToken & { value: ';' } ->; +const isNotSemicolonToken = + eslintUtils.isNotSemicolonToken as IsNotPunctuatorTokenWithValueFunction<';'>; export { isArrowToken, From 8cfe93372e1d826e54febc3aeb7047c792b90963 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 21 Jun 2021 17:01:36 +0000 Subject: [PATCH 217/473] chore: publish v4.28.0 --- CHANGELOG.md | 22 ++++++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 +++++++ packages/ast-spec/package.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 | 11 ++++++++++ packages/eslint-plugin/package.json | 6 +++--- packages/experimental-utils/CHANGELOG.md | 21 +++++++++++++++++++ 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 ++-- 24 files changed, 157 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6583908b372b..8dcc7fb1f8f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) + + +### Bug Fixes + +* **eslint-plugin:** [prefer-regexp-exec] factor in union types ([#3434](https://github.com/typescript-eslint/typescript-eslint/issues/3434)) ([ac86a79](https://github.com/typescript-eslint/typescript-eslint/commit/ac86a79bd416f031beccc7bdac28a938cb354ba5)) +* **experimental-utils:** expand `RuleTester` config properties ([#3557](https://github.com/typescript-eslint/typescript-eslint/issues/3557)) ([ffbb3cf](https://github.com/typescript-eslint/typescript-eslint/commit/ffbb3cff18bc78467e70e794f9b1f0e79be4aff7)) +* **experimental-utils:** fix `eslint-utils`' negative predicates' return types ([#3462](https://github.com/typescript-eslint/typescript-eslint/issues/3462)) ([1e6016b](https://github.com/typescript-eslint/typescript-eslint/commit/1e6016b356ae40e4636a3cbe41fa02b6a61403ee)) +* **experimental-utils:** fix `eslint-utils`' negative predicates' return types in `ast-utils` ([#3461](https://github.com/typescript-eslint/typescript-eslint/issues/3461)) ([614b0a3](https://github.com/typescript-eslint/typescript-eslint/commit/614b0a38b4163eb4667cce7a415d534222d15dd3)) +* **experimental-utils:** make keys for `ReferenceTracker` options optional ([#3531](https://github.com/typescript-eslint/typescript-eslint/issues/3531)) ([a7fd7bb](https://github.com/typescript-eslint/typescript-eslint/commit/a7fd7bb25584cb3f72f0339025dc76efa6cccceb)) + + +### Features + +* **experimental-utils:** add `only` property to `RuleTester` types ([#3555](https://github.com/typescript-eslint/typescript-eslint/issues/3555)) ([2a36e3e](https://github.com/typescript-eslint/typescript-eslint/commit/2a36e3e737f935cc6b967befb022d10a83c8bc9b)) +* **experimental-utils:** expose ReferenceTracker.ESM ([#3532](https://github.com/typescript-eslint/typescript-eslint/issues/3532)) ([4ac67c4](https://github.com/typescript-eslint/typescript-eslint/commit/4ac67c4c9401c5ce0e947a6409efbc11afe1eb3b)) +* **experimental-utils:** use mergable interface for `settings` property ([#3556](https://github.com/typescript-eslint/typescript-eslint/issues/3556)) ([abfc19b](https://github.com/typescript-eslint/typescript-eslint/commit/abfc19bf9364d881bdf594ee166a1deb23240630)) + + + + + # [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) diff --git a/lerna.json b/lerna.json index ce8013f10bd6..b892eac80960 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.27.0", + "version": "4.28.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index dc5f93812474..172eb878a20b 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + # [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index ed01fb3f7d3e..e7afe1aa8edd 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.27.0", + "version": "4.28.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 1a3541a5dbf8..b29583a5f9af 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.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) **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 77d46e71b1f6..b8f176ae3ebd 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.27.0", + "version": "4.28.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.27.0", + "@typescript-eslint/experimental-utils": "4.28.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 7d18d1347758..636bd75f812d 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.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) **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 a2d1916e0008..2f20ebe305bf 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.27.0", + "version": "4.28.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.27.0", + "@typescript-eslint/experimental-utils": "4.28.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.27.0" + "@typescript-eslint/parser": "4.28.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 8df2fb68dbbf..7781ebcd4d2d 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) + + +### Bug Fixes + +* **eslint-plugin:** [prefer-regexp-exec] factor in union types ([#3434](https://github.com/typescript-eslint/typescript-eslint/issues/3434)) ([ac86a79](https://github.com/typescript-eslint/typescript-eslint/commit/ac86a79bd416f031beccc7bdac28a938cb354ba5)) + + + + + # [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index e3ff76717139..3bda91f3ddc1 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.27.0", + "version": "4.28.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.27.0", - "@typescript-eslint/scope-manager": "4.27.0", + "@typescript-eslint/experimental-utils": "4.28.0", + "@typescript-eslint/scope-manager": "4.28.0", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 9fc69e872a0e..2cf25f9799cc 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) + + +### Bug Fixes + +* **experimental-utils:** expand `RuleTester` config properties ([#3557](https://github.com/typescript-eslint/typescript-eslint/issues/3557)) ([ffbb3cf](https://github.com/typescript-eslint/typescript-eslint/commit/ffbb3cff18bc78467e70e794f9b1f0e79be4aff7)) +* **experimental-utils:** fix `eslint-utils`' negative predicates' return types ([#3462](https://github.com/typescript-eslint/typescript-eslint/issues/3462)) ([1e6016b](https://github.com/typescript-eslint/typescript-eslint/commit/1e6016b356ae40e4636a3cbe41fa02b6a61403ee)) +* **experimental-utils:** fix `eslint-utils`' negative predicates' return types in `ast-utils` ([#3461](https://github.com/typescript-eslint/typescript-eslint/issues/3461)) ([614b0a3](https://github.com/typescript-eslint/typescript-eslint/commit/614b0a38b4163eb4667cce7a415d534222d15dd3)) +* **experimental-utils:** make keys for `ReferenceTracker` options optional ([#3531](https://github.com/typescript-eslint/typescript-eslint/issues/3531)) ([a7fd7bb](https://github.com/typescript-eslint/typescript-eslint/commit/a7fd7bb25584cb3f72f0339025dc76efa6cccceb)) + + +### Features + +* **experimental-utils:** add `only` property to `RuleTester` types ([#3555](https://github.com/typescript-eslint/typescript-eslint/issues/3555)) ([2a36e3e](https://github.com/typescript-eslint/typescript-eslint/commit/2a36e3e737f935cc6b967befb022d10a83c8bc9b)) +* **experimental-utils:** expose ReferenceTracker.ESM ([#3532](https://github.com/typescript-eslint/typescript-eslint/issues/3532)) ([4ac67c4](https://github.com/typescript-eslint/typescript-eslint/commit/4ac67c4c9401c5ce0e947a6409efbc11afe1eb3b)) +* **experimental-utils:** use mergable interface for `settings` property ([#3556](https://github.com/typescript-eslint/typescript-eslint/issues/3556)) ([abfc19b](https://github.com/typescript-eslint/typescript-eslint/commit/abfc19bf9364d881bdf594ee166a1deb23240630)) + + + + + # [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 89b3207346c7..6734be3e0a64 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.27.0", + "version": "4.28.0", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.27.0", - "@typescript-eslint/types": "4.27.0", - "@typescript-eslint/typescript-estree": "4.27.0", + "@typescript-eslint/scope-manager": "4.28.0", + "@typescript-eslint/types": "4.28.0", + "@typescript-eslint/typescript-estree": "4.28.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 3233eb7a70ae..c47adb4351ff 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.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) diff --git a/packages/parser/package.json b/packages/parser/package.json index b60fefa206de..648323955a19 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.27.0", + "version": "4.28.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.27.0", - "@typescript-eslint/types": "4.27.0", - "@typescript-eslint/typescript-estree": "4.27.0", + "@typescript-eslint/scope-manager": "4.28.0", + "@typescript-eslint/types": "4.28.0", + "@typescript-eslint/typescript-estree": "4.28.0", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.27.0", + "@typescript-eslint/experimental-utils": "4.28.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index eafe71aee419..c1b9fd84f71c 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.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) **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 330a99619bfe..7668b93bc94e 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.27.0", + "version": "4.28.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.27.0", - "@typescript-eslint/visitor-keys": "4.27.0" + "@typescript-eslint/types": "4.28.0", + "@typescript-eslint/visitor-keys": "4.28.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.27.0", + "@typescript-eslint/typescript-estree": "4.28.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 8c8d35582fb5..6bb5eb59097c 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.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) diff --git a/packages/shared-fixtures/package.json b/packages/shared-fixtures/package.json index 34945d18889f..227ecf37a58c 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.27.0", + "version": "4.28.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 4a1f19861b82..d42ad60b91f3 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.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) diff --git a/packages/types/package.json b/packages/types/package.json index 4b81f6165290..505d62084225 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.27.0", + "version": "4.28.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 357f5300c1e9..b4ece6a7b86b 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.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + # [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 438a537f84cc..d0a69a2a596c 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.27.0", + "version": "4.28.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.27.0", - "@typescript-eslint/visitor-keys": "4.27.0", + "@typescript-eslint/types": "4.28.0", + "@typescript-eslint/visitor-keys": "4.28.0", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.27.0", + "@typescript-eslint/shared-fixtures": "4.28.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 9805958418b9..1d0d57bf9a40 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.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) **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 665bc6a4dc7a..2ba49478e373 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.27.0", + "version": "4.28.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.27.0", + "@typescript-eslint/types": "4.28.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From f2c078cb1726349e5d1bb252e2653f4eb6310b68 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 28 Jun 2021 17:01:36 +0000 Subject: [PATCH 218/473] chore: publish v4.28.1 --- CHANGELOG.md | 8 ++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.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 | 8 ++++++++ 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 ++-- 24 files changed, 127 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dcc7fb1f8f2..8b5e469bc582 100644 --- a/CHANGELOG.md +++ b/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.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + + + + + # [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) diff --git a/lerna.json b/lerna.json index b892eac80960..5a18509d6d2d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.28.0", + "version": "4.28.1", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 172eb878a20b..043b5cba3a02 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + # [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index e7afe1aa8edd..2f17b3b987ae 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.28.0", + "version": "4.28.1", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index b29583a5f9af..19ccc384d630 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.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) **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 b8f176ae3ebd..8f96e7eab569 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.28.0", + "version": "4.28.1", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.28.0", + "@typescript-eslint/experimental-utils": "4.28.1", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 636bd75f812d..7d8df8cf29c0 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.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) **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 2f20ebe305bf..f3dae8190276 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.28.0", + "version": "4.28.1", "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.28.0", + "@typescript-eslint/experimental-utils": "4.28.1", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.28.0" + "@typescript-eslint/parser": "4.28.1" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 7781ebcd4d2d..3fd0f2495272 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/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.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + + + + + # [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 3bda91f3ddc1..10f64a332f07 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.28.0", + "version": "4.28.1", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.28.0", - "@typescript-eslint/scope-manager": "4.28.0", + "@typescript-eslint/experimental-utils": "4.28.1", + "@typescript-eslint/scope-manager": "4.28.1", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 2cf25f9799cc..786b6f532d1a 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.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + # [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 6734be3e0a64..42e3943616de 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.28.0", + "version": "4.28.1", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.28.0", - "@typescript-eslint/types": "4.28.0", - "@typescript-eslint/typescript-estree": "4.28.0", + "@typescript-eslint/scope-manager": "4.28.1", + "@typescript-eslint/types": "4.28.1", + "@typescript-eslint/typescript-estree": "4.28.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index c47adb4351ff..41d304180323 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.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 648323955a19..1facf9069cac 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.28.0", + "version": "4.28.1", "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.28.0", - "@typescript-eslint/types": "4.28.0", - "@typescript-eslint/typescript-estree": "4.28.0", + "@typescript-eslint/scope-manager": "4.28.1", + "@typescript-eslint/types": "4.28.1", + "@typescript-eslint/typescript-estree": "4.28.1", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.28.0", + "@typescript-eslint/experimental-utils": "4.28.1", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index c1b9fd84f71c..54b3ef302c83 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.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) **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 7668b93bc94e..12024e16c24d 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.28.0", + "version": "4.28.1", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.28.0", - "@typescript-eslint/visitor-keys": "4.28.0" + "@typescript-eslint/types": "4.28.1", + "@typescript-eslint/visitor-keys": "4.28.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.28.0", + "@typescript-eslint/typescript-estree": "4.28.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 6bb5eb59097c..4343da27b4e2 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.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) **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 227ecf37a58c..c77847a2aab5 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.28.0", + "version": "4.28.1", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index d42ad60b91f3..9225d06330c1 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.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 505d62084225..54ff38857d59 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.28.0", + "version": "4.28.1", "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 b4ece6a7b86b..b1e3f33bae76 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.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + # [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) **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 d0a69a2a596c..9379c86c01ad 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.28.0", + "version": "4.28.1", "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.28.0", - "@typescript-eslint/visitor-keys": "4.28.0", + "@typescript-eslint/types": "4.28.1", + "@typescript-eslint/visitor-keys": "4.28.1", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.28.0", + "@typescript-eslint/shared-fixtures": "4.28.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 1d0d57bf9a40..7cdb1ef16708 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.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.28.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.27.0...v4.28.0) (2021-06-21) **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 2ba49478e373..0332c2e9e52b 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.28.0", + "version": "4.28.1", "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.28.0", + "@typescript-eslint/types": "4.28.1", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 407a37430d5a8ff59e111993b2585ee162fef821 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 5 Jul 2021 17:01:37 +0000 Subject: [PATCH 219/473] chore: publish v4.28.2 --- CHANGELOG.md | 8 ++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.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 | 8 ++++++++ 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 ++-- 24 files changed, 127 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b5e469bc582..ca21552051df 100644 --- a/CHANGELOG.md +++ b/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.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + + + + + ## [4.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) **Note:** Version bump only for package @typescript-eslint/typescript-eslint diff --git a/lerna.json b/lerna.json index 5a18509d6d2d..8d9a6d4a56c3 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.28.1", + "version": "4.28.2", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 043b5cba3a02..712ca8b88bb8 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + ## [4.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 2f17b3b987ae..b79774de8c23 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.28.1", + "version": "4.28.2", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 19ccc384d630..37ba65ed95d7 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.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) **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 8f96e7eab569..ebcf1ccf3559 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.28.1", + "version": "4.28.2", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.28.1", + "@typescript-eslint/experimental-utils": "4.28.2", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 7d8df8cf29c0..0abafac66464 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.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) **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 f3dae8190276..c0db8e0d5198 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.28.1", + "version": "4.28.2", "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.28.1", + "@typescript-eslint/experimental-utils": "4.28.2", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.28.1" + "@typescript-eslint/parser": "4.28.2" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 3fd0f2495272..45f204fda6e2 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/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.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + + + + + ## [4.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 10f64a332f07..49a830f6e63e 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.28.1", + "version": "4.28.2", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.28.1", - "@typescript-eslint/scope-manager": "4.28.1", + "@typescript-eslint/experimental-utils": "4.28.2", + "@typescript-eslint/scope-manager": "4.28.2", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 786b6f532d1a..69478862a6e9 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.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + ## [4.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) **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 42e3943616de..2b4159e79cb5 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.28.1", + "version": "4.28.2", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.28.1", - "@typescript-eslint/types": "4.28.1", - "@typescript-eslint/typescript-estree": "4.28.1", + "@typescript-eslint/scope-manager": "4.28.2", + "@typescript-eslint/types": "4.28.2", + "@typescript-eslint/typescript-estree": "4.28.2", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 41d304180323..8f90d0eea4f3 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.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + ## [4.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 1facf9069cac..fbbc52a5a3b7 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.28.1", + "version": "4.28.2", "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.28.1", - "@typescript-eslint/types": "4.28.1", - "@typescript-eslint/typescript-estree": "4.28.1", + "@typescript-eslint/scope-manager": "4.28.2", + "@typescript-eslint/types": "4.28.2", + "@typescript-eslint/typescript-estree": "4.28.2", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.28.1", + "@typescript-eslint/experimental-utils": "4.28.2", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 54b3ef302c83..d3e8233f3782 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.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + ## [4.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) **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 12024e16c24d..378a3b0eff18 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.28.1", + "version": "4.28.2", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.28.1", - "@typescript-eslint/visitor-keys": "4.28.1" + "@typescript-eslint/types": "4.28.2", + "@typescript-eslint/visitor-keys": "4.28.2" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.28.1", + "@typescript-eslint/typescript-estree": "4.28.2", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 4343da27b4e2..7f79cbd4f6ae 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.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) **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 c77847a2aab5..20b2388f9143 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.28.1", + "version": "4.28.2", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 9225d06330c1..cac3b56d4790 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.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + ## [4.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 54ff38857d59..65a45a68698f 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.28.1", + "version": "4.28.2", "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 b1e3f33bae76..0e89e920425b 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.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + ## [4.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) **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 9379c86c01ad..099895a2e659 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.28.1", + "version": "4.28.2", "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.28.1", - "@typescript-eslint/visitor-keys": "4.28.1", + "@typescript-eslint/types": "4.28.2", + "@typescript-eslint/visitor-keys": "4.28.2", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.28.1", + "@typescript-eslint/shared-fixtures": "4.28.2", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 7cdb1ef16708..76b8e248dfce 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.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.28.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.0...v4.28.1) (2021-06-28) **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 0332c2e9e52b..8fcb569536cf 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.28.1", + "version": "4.28.2", "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.28.1", + "@typescript-eslint/types": "4.28.2", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From f0686e4849d237fa32da69f4097e35826a832a06 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 11 Jul 2021 11:00:28 -0400 Subject: [PATCH 220/473] docs: remove almost-deprecated html-has-lang rule from ROADMAP.md (#3604) --- packages/eslint-plugin/ROADMAP.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/ROADMAP.md b/packages/eslint-plugin/ROADMAP.md index 67b5676533ed..6a55ef2cb7d2 100644 --- a/packages/eslint-plugin/ROADMAP.md +++ b/packages/eslint-plugin/ROADMAP.md @@ -315,7 +315,7 @@ Relevant plugins: [`chai-expect-keywords`](https://github.com/gavinaiken/eslint- | `react-a11y-image-button-has-alt` | 🔌 | [`jsx-a11y/alt-text`] | | `react-a11y-img-has-alt` | 🔌 | [`jsx-a11y/alt-text`] | | `react-a11y-input-elements` | 🛑 | N/A | -| `react-a11y-lang` | 🔌 | [`jsx-a11y/html-has-lang`] & [`jsx-a11y/lang`] | +| `react-a11y-lang` | 🔌 | [`jsx-a11y/lang`] | | `react-a11y-meta` | 🛑 | N/A | | `react-a11y-no-onchange` | 🔌 | [`jsx-a11y/no-onchange`] | | `react-a11y-props` | 🔌 | [`jsx-a11y/aria-props`] | From 75dcf6942286f6ad3b507e469d160dc526cc7274 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 12 Jul 2021 17:01:39 +0000 Subject: [PATCH 221/473] chore: publish v4.28.3 --- CHANGELOG.md | 8 ++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.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 | 8 ++++++++ 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 ++-- 24 files changed, 127 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca21552051df..5a6756dd203b 100644 --- a/CHANGELOG.md +++ b/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.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + + + + + ## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) **Note:** Version bump only for package @typescript-eslint/typescript-eslint diff --git a/lerna.json b/lerna.json index 8d9a6d4a56c3..f9690434936f 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.28.2", + "version": "4.28.3", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 712ca8b88bb8..ead1056ce9f6 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + ## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index b79774de8c23..e5f525916ede 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.28.2", + "version": "4.28.3", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 37ba65ed95d7..b31107fa227d 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.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-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 ebcf1ccf3559..c32aabf3beed 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.28.2", + "version": "4.28.3", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.28.2", + "@typescript-eslint/experimental-utils": "4.28.3", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 0abafac66464..f0b94a6d9b77 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.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-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 c0db8e0d5198..9797a1a925e3 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.28.2", + "version": "4.28.3", "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.28.2", + "@typescript-eslint/experimental-utils": "4.28.3", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.28.2" + "@typescript-eslint/parser": "4.28.3" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 45f204fda6e2..e02ff4b4c9dc 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/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.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + + + + + ## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 49a830f6e63e..b757ab046471 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.28.2", + "version": "4.28.3", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.28.2", - "@typescript-eslint/scope-manager": "4.28.2", + "@typescript-eslint/experimental-utils": "4.28.3", + "@typescript-eslint/scope-manager": "4.28.3", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 69478862a6e9..b7c0740a4b8b 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.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + ## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-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 2b4159e79cb5..27e3a3282686 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.28.2", + "version": "4.28.3", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.28.2", - "@typescript-eslint/types": "4.28.2", - "@typescript-eslint/typescript-estree": "4.28.2", + "@typescript-eslint/scope-manager": "4.28.3", + "@typescript-eslint/types": "4.28.3", + "@typescript-eslint/typescript-estree": "4.28.3", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 8f90d0eea4f3..cb6b0ffca4a6 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.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + ## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index fbbc52a5a3b7..f401713d6416 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.28.2", + "version": "4.28.3", "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.28.2", - "@typescript-eslint/types": "4.28.2", - "@typescript-eslint/typescript-estree": "4.28.2", + "@typescript-eslint/scope-manager": "4.28.3", + "@typescript-eslint/types": "4.28.3", + "@typescript-eslint/typescript-estree": "4.28.3", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.28.2", + "@typescript-eslint/experimental-utils": "4.28.3", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index d3e8233f3782..ac73210cd4ce 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.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + ## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-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 378a3b0eff18..86416b0f357c 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.28.2", + "version": "4.28.3", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.28.2", - "@typescript-eslint/visitor-keys": "4.28.2" + "@typescript-eslint/types": "4.28.3", + "@typescript-eslint/visitor-keys": "4.28.3" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.28.2", + "@typescript-eslint/typescript-estree": "4.28.3", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 7f79cbd4f6ae..1041ae190cd0 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.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-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 20b2388f9143..abd3edbb3fa9 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.28.2", + "version": "4.28.3", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index cac3b56d4790..0054ec2bff0b 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.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + ## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 65a45a68698f..486965fa4231 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.28.2", + "version": "4.28.3", "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 0e89e920425b..31e48ba51669 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.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + ## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-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 099895a2e659..96e861c9c55b 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.28.2", + "version": "4.28.3", "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.28.2", - "@typescript-eslint/visitor-keys": "4.28.2", + "@typescript-eslint/types": "4.28.3", + "@typescript-eslint/visitor-keys": "4.28.3", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.28.2", + "@typescript-eslint/shared-fixtures": "4.28.3", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 76b8e248dfce..9bcd665dcb4d 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.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-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 8fcb569536cf..8e4ad403c5ec 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.28.2", + "version": "4.28.3", "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.28.2", + "@typescript-eslint/types": "4.28.3", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 84fff3575282f09683385e855c20df3c261ce313 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 19 Jul 2021 17:04:09 +0000 Subject: [PATCH 222/473] chore: publish v4.28.4 --- CHANGELOG.md | 8 ++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.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 | 8 ++++++++ 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 ++-- 24 files changed, 127 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a6756dd203b..efdec205c75e 100644 --- a/CHANGELOG.md +++ b/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.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + + + + + ## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) **Note:** Version bump only for package @typescript-eslint/typescript-eslint diff --git a/lerna.json b/lerna.json index f9690434936f..5fa41e9157ce 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.28.3", + "version": "4.28.4", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index ead1056ce9f6..a290ca852154 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + ## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index e5f525916ede..e37995c57b92 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.28.3", + "version": "4.28.4", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index b31107fa227d..0ee465ed4e9e 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.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) **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 c32aabf3beed..0ae43a471fce 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.28.3", + "version": "4.28.4", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.28.3", + "@typescript-eslint/experimental-utils": "4.28.4", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index f0b94a6d9b77..63672ea436ba 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.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) **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 9797a1a925e3..61354ebd7f09 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.28.3", + "version": "4.28.4", "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.28.3", + "@typescript-eslint/experimental-utils": "4.28.4", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.28.3" + "@typescript-eslint/parser": "4.28.4" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index e02ff4b4c9dc..ecaff23096bc 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/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.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + + + + + ## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index b757ab046471..551d55df0bd8 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.28.3", + "version": "4.28.4", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.28.3", - "@typescript-eslint/scope-manager": "4.28.3", + "@typescript-eslint/experimental-utils": "4.28.4", + "@typescript-eslint/scope-manager": "4.28.4", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index b7c0740a4b8b..66f3bc8bbadb 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.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + ## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) **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 27e3a3282686..0d8a7d296636 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.28.3", + "version": "4.28.4", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.28.3", - "@typescript-eslint/types": "4.28.3", - "@typescript-eslint/typescript-estree": "4.28.3", + "@typescript-eslint/scope-manager": "4.28.4", + "@typescript-eslint/types": "4.28.4", + "@typescript-eslint/typescript-estree": "4.28.4", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index cb6b0ffca4a6..b4a7dc14665d 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.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + ## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index f401713d6416..95368f9fbc76 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.28.3", + "version": "4.28.4", "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.28.3", - "@typescript-eslint/types": "4.28.3", - "@typescript-eslint/typescript-estree": "4.28.3", + "@typescript-eslint/scope-manager": "4.28.4", + "@typescript-eslint/types": "4.28.4", + "@typescript-eslint/typescript-estree": "4.28.4", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.28.3", + "@typescript-eslint/experimental-utils": "4.28.4", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index ac73210cd4ce..a72302518370 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.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + ## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) **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 86416b0f357c..5003729ef860 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.28.3", + "version": "4.28.4", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.28.3", - "@typescript-eslint/visitor-keys": "4.28.3" + "@typescript-eslint/types": "4.28.4", + "@typescript-eslint/visitor-keys": "4.28.4" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.28.3", + "@typescript-eslint/typescript-estree": "4.28.4", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 1041ae190cd0..7887f29091a8 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.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) **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 abd3edbb3fa9..e567a7076a03 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.28.3", + "version": "4.28.4", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 0054ec2bff0b..5c19f02589cf 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.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + ## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 486965fa4231..84897fb773be 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.28.3", + "version": "4.28.4", "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 31e48ba51669..8ae4ba83c854 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.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + ## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) **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 96e861c9c55b..a933f4c1d573 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.28.3", + "version": "4.28.4", "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.28.3", - "@typescript-eslint/visitor-keys": "4.28.3", + "@typescript-eslint/types": "4.28.4", + "@typescript-eslint/visitor-keys": "4.28.4", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.28.3", + "@typescript-eslint/shared-fixtures": "4.28.4", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 9bcd665dcb4d..a56f6e2ba292 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.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12) **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 8e4ad403c5ec..78e0b1eae1db 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.28.3", + "version": "4.28.4", "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.28.3", + "@typescript-eslint/types": "4.28.4", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From d3587857227526594f05a1d96515afe3c2ee0545 Mon Sep 17 00:00:00 2001 From: James Henry Date: Fri, 23 Jul 2021 14:06:03 +0400 Subject: [PATCH 223/473] chore: migrate to nx 12.6.0 and distributed workspace config (#3652) --- nx.json | 51 +- package.json | 12 +- packages/ast-spec/project.json | 5 + packages/eslint-plugin-internal/project.json | 5 + packages/eslint-plugin-tslint/project.json | 5 + packages/eslint-plugin/project.json | 5 + packages/experimental-utils/project.json | 5 + packages/parser/project.json | 5 + packages/scope-manager/project.json | 5 + packages/shared-fixtures/project.json | 5 + packages/types/project.json | 5 + packages/typescript-estree/project.json | 5 + packages/visitor-keys/project.json | 5 + tsconfig.base.json | 3 +- workspace.json | 55 +- yarn.lock | 711 ++++++++++++++++--- 16 files changed, 717 insertions(+), 170 deletions(-) create mode 100644 packages/ast-spec/project.json create mode 100644 packages/eslint-plugin-internal/project.json create mode 100644 packages/eslint-plugin-tslint/project.json create mode 100644 packages/eslint-plugin/project.json create mode 100644 packages/experimental-utils/project.json create mode 100644 packages/parser/project.json create mode 100644 packages/scope-manager/project.json create mode 100644 packages/shared-fixtures/project.json create mode 100644 packages/types/project.json create mode 100644 packages/typescript-estree/project.json create mode 100644 packages/visitor-keys/project.json diff --git a/nx.json b/nx.json index 361ed34b99a8..a417643d66a0 100644 --- a/nx.json +++ b/nx.json @@ -1,14 +1,15 @@ { "npmScope": "typescript-eslint", "implicitDependencies": { - "workspace.json": "*", "package.json": { "dependencies": "*", "devDependencies": "*" }, - "nx.json": "*", ".github/workflows/ci.yml": "*" }, + "affected": { + "defaultBase": "master" + }, "workspaceLayout": { "libsDir": "packages" }, @@ -17,7 +18,6 @@ "runner": "@nrwl/nx-cloud", "options": { "cacheableOperations": ["build", "test", "package", "prepare"], - "strictlyOrderedTargets": ["build", "package", "prepare"], "accessToken": "YjFjNTBhOWUtY2JmNy00ZDhiLWE5N2UtZjliNDAwNmIzOTdjfHJlYWQtd3JpdGU=", "canTrackAnalytics": false, "showUsageWarnings": true, @@ -25,42 +25,13 @@ } } }, - "projects": { - "@typescript-eslint/ast-spec": { - "implicitDependencies": [] - }, - "@typescript-eslint/eslint-plugin": { - "implicitDependencies": [] - }, - "@typescript-eslint/eslint-plugin-internal": { - "implicitDependencies": [] - }, - "@typescript-eslint/eslint-plugin-tslint": { - "implicitDependencies": [] - }, - "@typescript-eslint/experimental-utils": { - "implicitDependencies": [] - }, - "@typescript-eslint/parser": { - "implicitDependencies": [] - }, - "@typescript-eslint/scope-manager": { - "implicitDependencies": [] - }, - "@typescript-eslint/shared-fixtures": { - "implicitDependencies": [] - }, - "@typescript-eslint/types": { - "implicitDependencies": ["@typescript-eslint/ast-spec"] - }, - "@typescript-eslint/typescript-estree": { - "implicitDependencies": [] - }, - "@typescript-eslint/visitor-keys": { - "implicitDependencies": [] - } + "targetDependencies": { + "build": [ + { + "target": "build", + "projects": "dependencies" + } + ] }, - "affected": { - "defaultBase": "master" - } + "projects": {} } diff --git a/package.json b/package.json index 8b13e068b359..a04cb34c3213 100644 --- a/package.json +++ b/package.json @@ -77,10 +77,10 @@ "@commitlint/cli": "^12.1.4", "@commitlint/config-conventional": "^12.1.4", "@commitlint/config-lerna-scopes": "^12.1.4", - "@nrwl/cli": "^12.3.5", - "@nrwl/nx-cloud": "^12.1.3", - "@nrwl/tao": "^12.3.5", - "@nrwl/workspace": "^12.3.5", + "@nrwl/cli": "12.6.0", + "@nrwl/nx-cloud": "12.3.0", + "@nrwl/tao": "12.6.0", + "@nrwl/workspace": "12.6.0", "@types/babel__code-frame": "^7.0.2", "@types/debug": "^4.1.5", "@types/eslint-visitor-keys": "^1.0.0", @@ -115,7 +115,7 @@ "make-dir": "^3.1.0", "markdownlint-cli": "^0.27.1", "node-fetch": "^2.6.1", - "prettier": "^2.3.0", + "prettier": "2.3.2", "pretty-format": "^27.0.2", "rimraf": "^3.0.2", "ts-jest": "^27.0.1", @@ -127,6 +127,6 @@ "@types/node": "^15.6.1", "jest-diff": "^27.0.0", "pretty-format": "^27.0.0", - "typescript": "4.3.2" + "typescript": "4.3.5" } } diff --git a/packages/ast-spec/project.json b/packages/ast-spec/project.json new file mode 100644 index 000000000000..3cb2cf7be65b --- /dev/null +++ b/packages/ast-spec/project.json @@ -0,0 +1,5 @@ +{ + "root": "packages/ast-spec", + "type": "library", + "implicitDependencies": [] +} diff --git a/packages/eslint-plugin-internal/project.json b/packages/eslint-plugin-internal/project.json new file mode 100644 index 000000000000..948fce1f60cc --- /dev/null +++ b/packages/eslint-plugin-internal/project.json @@ -0,0 +1,5 @@ +{ + "root": "packages/eslint-plugin-internal", + "type": "library", + "implicitDependencies": [] +} diff --git a/packages/eslint-plugin-tslint/project.json b/packages/eslint-plugin-tslint/project.json new file mode 100644 index 000000000000..8ca785bd7d15 --- /dev/null +++ b/packages/eslint-plugin-tslint/project.json @@ -0,0 +1,5 @@ +{ + "root": "packages/eslint-plugin-tslint", + "type": "library", + "implicitDependencies": [] +} diff --git a/packages/eslint-plugin/project.json b/packages/eslint-plugin/project.json new file mode 100644 index 000000000000..d04cdcb07b13 --- /dev/null +++ b/packages/eslint-plugin/project.json @@ -0,0 +1,5 @@ +{ + "root": "packages/eslint-plugin", + "type": "library", + "implicitDependencies": [] +} diff --git a/packages/experimental-utils/project.json b/packages/experimental-utils/project.json new file mode 100644 index 000000000000..f8bd9117eeae --- /dev/null +++ b/packages/experimental-utils/project.json @@ -0,0 +1,5 @@ +{ + "root": "packages/experimental-utils", + "type": "library", + "implicitDependencies": [] +} diff --git a/packages/parser/project.json b/packages/parser/project.json new file mode 100644 index 000000000000..c9c9e3b6321b --- /dev/null +++ b/packages/parser/project.json @@ -0,0 +1,5 @@ +{ + "root": "packages/parser", + "type": "library", + "implicitDependencies": [] +} diff --git a/packages/scope-manager/project.json b/packages/scope-manager/project.json new file mode 100644 index 000000000000..702250b8421c --- /dev/null +++ b/packages/scope-manager/project.json @@ -0,0 +1,5 @@ +{ + "root": "packages/scope-manager", + "type": "library", + "implicitDependencies": [] +} diff --git a/packages/shared-fixtures/project.json b/packages/shared-fixtures/project.json new file mode 100644 index 000000000000..b100b1e4ba75 --- /dev/null +++ b/packages/shared-fixtures/project.json @@ -0,0 +1,5 @@ +{ + "root": "packages/shared-fixtures", + "type": "library", + "implicitDependencies": [] +} diff --git a/packages/types/project.json b/packages/types/project.json new file mode 100644 index 000000000000..d0c5660433fe --- /dev/null +++ b/packages/types/project.json @@ -0,0 +1,5 @@ +{ + "root": "packages/types", + "type": "library", + "implicitDependencies": ["@typescript-eslint/ast-spec"] +} diff --git a/packages/typescript-estree/project.json b/packages/typescript-estree/project.json new file mode 100644 index 000000000000..a3e44b64373d --- /dev/null +++ b/packages/typescript-estree/project.json @@ -0,0 +1,5 @@ +{ + "root": "packages/typescript-estree", + "type": "library", + "implicitDependencies": [] +} diff --git a/packages/visitor-keys/project.json b/packages/visitor-keys/project.json new file mode 100644 index 000000000000..e531f19f69d2 --- /dev/null +++ b/packages/visitor-keys/project.json @@ -0,0 +1,5 @@ +{ + "root": "packages/visitor-keys", + "type": "library", + "implicitDependencies": [] +} diff --git a/tsconfig.base.json b/tsconfig.base.json index ee6c33f86e51..0c43c219c073 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -15,6 +15,7 @@ "sourceMap": true, "strict": true, "target": "es2017", - "lib": ["es2017"] + "lib": ["es2017"], + "paths": {} } } diff --git a/workspace.json b/workspace.json index 8ff120441560..c6dbc5b4b0f9 100644 --- a/workspace.json +++ b/workspace.json @@ -1,49 +1,16 @@ { "version": 2, "projects": { - "@typescript-eslint/ast-spec": { - "root": "packages/ast-spec", - "type": "library" - }, - "@typescript-eslint/eslint-plugin": { - "root": "packages/eslint-plugin", - "type": "library" - }, - "@typescript-eslint/eslint-plugin-internal": { - "root": "packages/eslint-plugin-internal", - "type": "library" - }, - "@typescript-eslint/eslint-plugin-tslint": { - "root": "packages/eslint-plugin-tslint", - "type": "library" - }, - "@typescript-eslint/experimental-utils": { - "root": "packages/experimental-utils", - "type": "library" - }, - "@typescript-eslint/parser": { - "root": "packages/parser", - "type": "library" - }, - "@typescript-eslint/scope-manager": { - "root": "packages/scope-manager", - "type": "library" - }, - "@typescript-eslint/shared-fixtures": { - "root": "packages/shared-fixtures", - "type": "library" - }, - "@typescript-eslint/types": { - "root": "packages/types", - "type": "library" - }, - "@typescript-eslint/typescript-estree": { - "root": "packages/typescript-estree", - "type": "library" - }, - "@typescript-eslint/visitor-keys": { - "root": "packages/visitor-keys", - "type": "library" - } + "@typescript-eslint/ast-spec": "packages/ast-spec", + "@typescript-eslint/eslint-plugin": "packages/eslint-plugin", + "@typescript-eslint/eslint-plugin-internal": "packages/eslint-plugin-internal", + "@typescript-eslint/eslint-plugin-tslint": "packages/eslint-plugin-tslint", + "@typescript-eslint/experimental-utils": "packages/experimental-utils", + "@typescript-eslint/parser": "packages/parser", + "@typescript-eslint/scope-manager": "packages/scope-manager", + "@typescript-eslint/shared-fixtures": "packages/shared-fixtures", + "@typescript-eslint/types": "packages/types", + "@typescript-eslint/typescript-estree": "packages/typescript-estree", + "@typescript-eslint/visitor-keys": "packages/visitor-keys" } } diff --git a/yarn.lock b/yarn.lock index 555905851742..9810d184e899 100644 --- a/yarn.lock +++ b/yarn.lock @@ -792,6 +792,18 @@ jest-util "^27.0.2" slash "^3.0.0" +"@jest/console@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.0.6.tgz#3eb72ea80897495c3d73dd97aab7f26770e2260f" + integrity sha512-fMlIBocSHPZ3JxgWiDNW/KPj6s+YRd0hicb33IrmelCcjXo/pXPwvuiKFmZz+XuqI/1u7nbUK10zSsWL/1aegg== + dependencies: + "@jest/types" "^27.0.6" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^27.0.6" + jest-util "^27.0.6" + slash "^3.0.0" + "@jest/core@^27.0.4": version "27.0.4" resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.4.tgz#679bf9ac07900da2ddbb9667bb1afa8029038f53" @@ -837,6 +849,16 @@ "@types/node" "*" jest-mock "^27.0.3" +"@jest/environment@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.0.6.tgz#ee293fe996db01d7d663b8108fa0e1ff436219d2" + integrity sha512-4XywtdhwZwCpPJ/qfAkqExRsERW+UaoSRStSHCCiQTUpoYdLukj+YJbQSFrZjhlUDRZeNiU9SFH0u7iNimdiIg== + dependencies: + "@jest/fake-timers" "^27.0.6" + "@jest/types" "^27.0.6" + "@types/node" "*" + jest-mock "^27.0.6" + "@jest/fake-timers@^27.0.3": version "27.0.3" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.0.3.tgz#9899ba6304cc636734c74478df502e18136461dd" @@ -849,6 +871,18 @@ jest-mock "^27.0.3" jest-util "^27.0.2" +"@jest/fake-timers@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.0.6.tgz#cbad52f3fe6abe30e7acb8cd5fa3466b9588e3df" + integrity sha512-sqd+xTWtZ94l3yWDKnRTdvTeZ+A/V7SSKrxsrOKSqdyddb9CeNRF8fbhAU0D7ZJBpTTW2nbp6MftmKJDZfW2LQ== + dependencies: + "@jest/types" "^27.0.6" + "@sinonjs/fake-timers" "^7.0.2" + "@types/node" "*" + jest-message-util "^27.0.6" + jest-mock "^27.0.6" + jest-util "^27.0.6" + "@jest/globals@^27.0.3": version "27.0.3" resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.0.3.tgz#1cf8933b7791bba0b99305cbf39fd4d2e3fe4060" @@ -858,6 +892,45 @@ "@jest/types" "^27.0.2" expect "^27.0.2" +"@jest/globals@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.0.6.tgz#48e3903f99a4650673d8657334d13c9caf0e8f82" + integrity sha512-DdTGCP606rh9bjkdQ7VvChV18iS7q0IMJVP1piwTWyWskol4iqcVwthZmoJEf7obE1nc34OpIyoVGPeqLC+ryw== + dependencies: + "@jest/environment" "^27.0.6" + "@jest/types" "^27.0.6" + expect "^27.0.6" + +"@jest/reporters@27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.6.tgz#91e7f2d98c002ad5df94d5b5167c1eb0b9fd5b00" + integrity sha512-TIkBt09Cb2gptji3yJXb3EE+eVltW6BjO7frO7NEfjI9vSIYoISi5R3aI3KpEDXlB1xwB+97NXIqz84qYeYsfA== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/transform" "^27.0.6" + "@jest/types" "^27.0.6" + chalk "^4.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.2" + graceful-fs "^4.2.4" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^4.0.3" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.0.2" + jest-haste-map "^27.0.6" + jest-resolve "^27.0.6" + jest-util "^27.0.6" + jest-worker "^27.0.6" + slash "^3.0.0" + source-map "^0.6.0" + string-length "^4.0.1" + terminal-link "^2.0.0" + v8-to-istanbul "^8.0.0" + "@jest/reporters@^27.0.4": version "27.0.4" resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.4.tgz#95609b1be97afb80d55d8aa3d7c3179c15810e65" @@ -897,6 +970,25 @@ graceful-fs "^4.2.4" source-map "^0.6.0" +"@jest/source-map@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.0.6.tgz#be9e9b93565d49b0548b86e232092491fb60551f" + integrity sha512-Fek4mi5KQrqmlY07T23JRi0e7Z9bXTOOD86V/uS0EIW4PClvPDqZOyFlLpNJheS6QI0FNX1CgmPjtJ4EA/2M+g== + dependencies: + callsites "^3.0.0" + graceful-fs "^4.2.4" + source-map "^0.6.0" + +"@jest/test-result@27.0.6", "@jest/test-result@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.0.6.tgz#3fa42015a14e4fdede6acd042ce98c7f36627051" + integrity sha512-ja/pBOMTufjX4JLEauLxE3LQBPaI2YjGFtXexRAjt1I/MbfNlMx0sytSX3tn5hSLzQsR3Qy2rd0hc1BWojtj9w== + dependencies: + "@jest/console" "^27.0.6" + "@jest/types" "^27.0.6" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + "@jest/test-result@^27.0.2": version "27.0.2" resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.0.2.tgz#0451049e32ceb609b636004ccc27c8fa22263f10" @@ -917,6 +1009,16 @@ jest-haste-map "^27.0.2" jest-runtime "^27.0.4" +"@jest/test-sequencer@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.6.tgz#80a913ed7a1130545b1cd777ff2735dd3af5d34b" + integrity sha512-bISzNIApazYOlTHDum9PwW22NOyDa6VI31n6JucpjTVM0jD6JDgqEZ9+yn575nDdPF0+4csYDxNNW13NvFQGZA== + dependencies: + "@jest/test-result" "^27.0.6" + graceful-fs "^4.2.4" + jest-haste-map "^27.0.6" + jest-runtime "^27.0.6" + "@jest/transform@^27.0.2": version "27.0.2" resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.0.2.tgz#b073b7c589e3f4b842102468875def2bb722d6b5" @@ -938,16 +1040,26 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" - integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== +"@jest/transform@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.0.6.tgz#189ad7107413208f7600f4719f81dd2f7278cc95" + integrity sha512-rj5Dw+mtIcntAUnMlW/Vju5mr73u8yg+irnHwzgtgoeI6cCPOvUwQ0D1uQtc/APmWgvRweEb1g05pkUpxH3iCA== dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^15.0.0" + "@babel/core" "^7.1.0" + "@jest/types" "^27.0.6" + babel-plugin-istanbul "^6.0.0" chalk "^4.0.0" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.2.4" + jest-haste-map "^27.0.6" + jest-regex-util "^27.0.6" + jest-util "^27.0.6" + micromatch "^4.0.4" + pirates "^4.0.1" + slash "^3.0.0" + source-map "^0.6.1" + write-file-atomic "^3.0.0" "@jest/types@^27.0.2": version "27.0.2" @@ -960,6 +1072,17 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" +"@jest/types@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.0.6.tgz#9a992bc517e0c49f035938b8549719c2de40706b" + integrity sha512-aSquT1qa9Pik26JK5/3rvnYb4bGtm1VFNesHKmNTwmPIgOrixvhL2ghIvFRNEpzy3gU+rUgjIF/KodbkFAl++g== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^16.0.0" + chalk "^4.0.0" + "@lerna/add@3.21.0": version "3.21.0" resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.21.0.tgz#27007bde71cc7b0a2969ab3c2f0ae41578b4577b" @@ -1721,53 +1844,60 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@nrwl/cli@12.4.0", "@nrwl/cli@^12.3.5": - version "12.4.0" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.4.0.tgz#d313ddbabfef0d4b1b3e799dac5fa1dafe4819d4" - integrity sha512-ZU1NAjxEa9iMRRhUCYmD0ZLlK1j5l+zDseDE1a0A3KdgMVGh2eOchREnf6R75skQJHl4v9hKFweqiy0Xl14ZRQ== +"@nrwl/cli@12.6.0": + version "12.6.0" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.6.0.tgz#c5104bbe7b7c5fa8674e53858e21c9022eff7d58" + integrity sha512-gzQ2QWUCTxC2tNVg+9gPAGxO9RVrF+35Q1SidC4I8VxXh7uhzEp5aweWnfTHSBuefPzqpKDxsjco4070z0c3zQ== dependencies: - "@nrwl/tao" "12.4.0" + "@nrwl/tao" "12.6.0" chalk "4.1.0" v8-compile-cache "2.3.0" yargs "15.4.1" yargs-parser "20.0.0" -"@nrwl/devkit@12.4.0": - version "12.4.0" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.4.0.tgz#6110327f1aed6d87d407929651e6f1140c779451" - integrity sha512-kGw5/SH4ze4j+rG6seEcslNenscrZFZMGpcoc3OIxfTTGlFA0mCFasFgzN8osgTX4+PgEOushvm3yRAaMmLqIg== +"@nrwl/devkit@12.6.0": + version "12.6.0" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.6.0.tgz#a2bdd4c144f05597302580bcf31443abdd9dc6be" + integrity sha512-tvw/4n2JD/38UuzdxFCoj1+x02BAKK4EvtLhwUK5XSBF0wDYFBp5rHfxvUD9ZcoiRRrZA4QGFjhDljrfj95F2A== dependencies: - "@nrwl/tao" "12.4.0" + "@nrwl/tao" "12.6.0" ejs "^3.1.5" ignore "^5.0.4" + rxjs "^6.5.4" semver "7.3.4" tslib "^2.0.0" -"@nrwl/jest@12.4.0": - version "12.4.0" - resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.4.0.tgz#d59b840ba1ad79ff969aefa353ad360e952bd86c" - integrity sha512-YZbo4+NYsSp7StJFvY7pKAArpYOP5AtZAu4ltshzdAWYM9KgPtoDtstRBksFzDq6jnApXuMb4eEcE4ttlMj3yQ== +"@nrwl/jest@12.6.0": + version "12.6.0" + resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.6.0.tgz#4ae63b175c2a3a189267606d4e3796d0c4c406eb" + integrity sha512-xg9tqKgY1XIhA7GOhW9D9g3i3ulLa/Ofjuse0vPNG/e9qRrOUKAdK88OB5CB0AbrARCplf9//45i5NoeW9ZzDA== dependencies: - "@nrwl/devkit" "12.4.0" - jest-resolve "^26.6.2" + "@jest/reporters" "27.0.6" + "@jest/test-result" "27.0.6" + "@nrwl/devkit" "12.6.0" + chalk "4.1.0" + identity-obj-proxy "3.0.0" + jest-config "27.0.6" + jest-resolve "27.0.6" + jest-util "27.0.6" rxjs "^6.5.4" tslib "^2.0.0" -"@nrwl/linter@12.4.0": - version "12.4.0" - resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.4.0.tgz#61afc3d1bfb9e71ceea1ed820d15f4163911c00b" - integrity sha512-n+xEKSAU5nVyMii7GtvBWDdjtrlCqMXrnozBs586k+bL0opogP4ZOrWxPZUjLnOlOHx1BuIl0nViSjBmh2y0wA== +"@nrwl/linter@12.6.0": + version "12.6.0" + resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.6.0.tgz#b102b481a166a9ead4a1df1a05bcaa81305f31ab" + integrity sha512-qOk6tOUqwLNYmeNNLFUgnbEr+v2G9VqZUBUWpVWT8PR78Rd0vI2AJDkE/VrjPKIfHzbXraKTuWcwTCijX8324w== dependencies: - "@nrwl/devkit" "12.4.0" + "@nrwl/devkit" "12.6.0" glob "7.1.4" minimatch "3.0.4" tmp "~0.2.1" tslib "^2.0.0" -"@nrwl/nx-cloud@^12.1.3": - version "12.2.4" - resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.2.4.tgz#a6b054a627e6c68741ce503ebb414e9e80b60561" - integrity sha512-q1tqh87VqPZhvByOMit6q9aWF0MjRx1ItqQFQvwXOBx0Hx8z/8UfRgSwPK5AQBL7Npue10KMgwAooR4r/nvvMw== +"@nrwl/nx-cloud@12.3.0": + version "12.3.0" + resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.3.0.tgz#2f461d566b98441c585ecf93010faf066e1199bf" + integrity sha512-woWvAqp8fWXSl0a+tijo3FtrrjXvGTir89XNhUdh7jvzq7P4+XiPIt6slgcRD3X3ew3JNkJterzf+188fQH8aQ== dependencies: axios "^0.21.1" chalk "4.1.0" @@ -1776,10 +1906,10 @@ strip-json-comments "^3.1.1" tar "5.0.5" -"@nrwl/tao@12.4.0", "@nrwl/tao@^12.3.5": - version "12.4.0" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.4.0.tgz#90620513fc66faca22c98a64623b2d1c058bb1a4" - integrity sha512-WH8SqOuJuuBwXpLX9vIVVWEovDqfLmiyFQS4Ebz35KWXNoIv9MS3QgItXKCu7X463hiJnxjAA3RqVYIt8U1vXg== +"@nrwl/tao@12.6.0": + version "12.6.0" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.6.0.tgz#b0ef91cbc0a8b7747407d1f25b0be669d9a8ddc7" + integrity sha512-h6X+mqmTlZjA9nqlyPAu9TFNORHAMcC1BD8H8kA8lTHN1nktLHQ266qpHVLsxcqww2EYsVqQaKaOpUacck49+w== dependencies: chalk "4.1.0" enquirer "~2.3.6" @@ -1792,16 +1922,17 @@ tslib "^2.0.0" yargs-parser "20.0.0" -"@nrwl/workspace@^12.3.5": - version "12.4.0" - resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.4.0.tgz#095d29bbb1d19f6266af06c528ebc83392d07654" - integrity sha512-RjcvP4rQCj6CQPDrRTLlzviF6kskfDBfBlyrQfDjh4CC9HasjlRCOfB39OQynT2M4iZqckXl5upG7Ph1gP5+dg== +"@nrwl/workspace@12.6.0": + version "12.6.0" + resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.6.0.tgz#101fda472268008ca64ac5478b95ae17735f93b4" + integrity sha512-g7RqXHLWiB7dO6YhH0Vcb1JRs/q/lSA49Q5DzJqXrVng63LA0wBovmFdOF9slcYNcsow35cDBgWvup+BQgq6gg== dependencies: - "@nrwl/cli" "12.4.0" - "@nrwl/devkit" "12.4.0" - "@nrwl/jest" "12.4.0" - "@nrwl/linter" "12.4.0" + "@nrwl/cli" "12.6.0" + "@nrwl/devkit" "12.6.0" + "@nrwl/jest" "12.6.0" + "@nrwl/linter" "12.6.0" chalk "4.1.0" + chokidar "^3.5.1" cosmiconfig "^4.0.0" dotenv "8.2.0" enquirer "~2.3.6" @@ -2198,13 +2329,6 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA== -"@types/yargs@^15.0.0": - version "15.0.13" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.13.tgz#34f7fec8b389d7f3c1fd08026a5763e072d3c6dc" - integrity sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ== - dependencies: - "@types/yargs-parser" "*" - "@types/yargs@^16.0.0": version "16.0.3" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.3.tgz#4b6d35bb8e680510a7dc2308518a80ee1ef27e01" @@ -2409,6 +2533,14 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -2614,6 +2746,20 @@ babel-jest@^27.0.2: graceful-fs "^4.2.4" slash "^3.0.0" +babel-jest@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.6.tgz#e99c6e0577da2655118e3608b68761a5a69bd0d8" + integrity sha512-iTJyYLNc4wRofASmofpOc5NK9QunwMk+TLFgGXsTFS8uEqmd8wdI7sga0FPe2oVH3b5Agt/EAK1QjPEuKL8VfA== + dependencies: + "@jest/transform" "^27.0.6" + "@jest/types" "^27.0.6" + "@types/babel__core" "^7.1.14" + babel-plugin-istanbul "^6.0.0" + babel-preset-jest "^27.0.6" + chalk "^4.0.0" + graceful-fs "^4.2.4" + slash "^3.0.0" + babel-plugin-istanbul@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765" @@ -2635,6 +2781,16 @@ babel-plugin-jest-hoist@^27.0.1: "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" +babel-plugin-jest-hoist@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.6.tgz#f7c6b3d764af21cb4a2a1ab6870117dbde15b456" + integrity sha512-CewFeM9Vv2gM7Yr9n5eyyLVPRSiBnk6lKZRjgwYnGKSl9M14TMn2vkN02wTF04OGuSDLEzlWiMzvjXuW9mB6Gw== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.0.0" + "@types/babel__traverse" "^7.0.6" + babel-preset-current-node-syntax@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" @@ -2661,6 +2817,14 @@ babel-preset-jest@^27.0.1: babel-plugin-jest-hoist "^27.0.1" babel-preset-current-node-syntax "^1.0.0" +babel-preset-jest@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.0.6.tgz#909ef08e9f24a4679768be2f60a3df0856843f9d" + integrity sha512-WObA0/Biw2LrVVwZkF/2GqbOdzhKD6Fkdwhoy9ASIrOWr/zodcSpQh72JOkEn6NWyjmnPDjNSqaGN4KnpKzhXw== + dependencies: + babel-plugin-jest-hoist "^27.0.6" + babel-preset-current-node-syntax "^1.0.0" + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -2691,6 +2855,11 @@ before-after-hook@^2.0.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" @@ -2720,7 +2889,7 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" -braces@^3.0.1: +braces@^3.0.1, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -2956,6 +3125,21 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +chokidar@^3.5.1: + version "3.5.2" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" + integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.3: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" @@ -4252,6 +4436,18 @@ expect@^27.0.2: jest-message-util "^27.0.2" jest-regex-util "^27.0.1" +expect@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/expect/-/expect-27.0.6.tgz#a4d74fbe27222c718fff68ef49d78e26a8fd4c05" + integrity sha512-psNLt8j2kwg42jGBDSfAlU49CEZxejN1f1PlANWDZqIhBOVU/c2Pm888FcjWJzFewhIsNWfZJeLjUjtKGiPuSw== + dependencies: + "@jest/types" "^27.0.6" + ansi-styles "^5.0.0" + jest-get-type "^27.0.6" + jest-matcher-utils "^27.0.6" + jest-message-util "^27.0.6" + jest-regex-util "^27.0.6" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -4609,7 +4805,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^2.3.2: +fsevents@^2.3.2, fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -4802,6 +4998,13 @@ glob-parent@^5.0.0, glob-parent@^5.1.0: dependencies: is-glob "^4.0.1" +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" @@ -4938,6 +5141,11 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== +harmony-reflect@^1.4.6: + version "1.6.2" + resolved "https://registry.yarnpkg.com/harmony-reflect/-/harmony-reflect-1.6.2.tgz#31ecbd32e648a34d030d86adb67d4d47547fe710" + integrity sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g== + has-bigints@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" @@ -5108,6 +5316,13 @@ iconv-lite@^0.6.2, iconv-lite@^0.6.3: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" +identity-obj-proxy@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz#94d2bda96084453ef36fbc5aaec37e0f79f1fc14" + integrity sha1-lNK9qWCERT7zb7xarsN+D3nx/BQ= + dependencies: + harmony-reflect "^1.4.6" + iferr@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" @@ -5313,6 +5528,13 @@ is-bigint@^1.0.1: resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" integrity sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA== +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + is-boolean-object@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.1.tgz#3c0878f035cb821228d350d2e1e36719716a3de8" @@ -5449,7 +5671,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0, is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -5703,6 +5925,31 @@ jest-circus@^27.0.4: stack-utils "^2.0.3" throat "^6.0.1" +jest-circus@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.6.tgz#dd4df17c4697db6a2c232aaad4e9cec666926668" + integrity sha512-OJlsz6BBeX9qR+7O9lXefWoc2m9ZqcZ5Ohlzz0pTEAG4xMiZUJoacY8f4YDHxgk0oKYxj277AfOk9w6hZYvi1Q== + dependencies: + "@jest/environment" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/types" "^27.0.6" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + dedent "^0.7.0" + expect "^27.0.6" + is-generator-fn "^2.0.0" + jest-each "^27.0.6" + jest-matcher-utils "^27.0.6" + jest-message-util "^27.0.6" + jest-runtime "^27.0.6" + jest-snapshot "^27.0.6" + jest-util "^27.0.6" + pretty-format "^27.0.6" + slash "^3.0.0" + stack-utils "^2.0.3" + throat "^6.0.1" + jest-cli@^27.0.4: version "27.0.4" resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.4.tgz#491b12c754c0d7c6873b13a66f26b3a80a852910" @@ -5721,6 +5968,33 @@ jest-cli@^27.0.4: prompts "^2.0.1" yargs "^16.0.3" +jest-config@27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.6.tgz#119fb10f149ba63d9c50621baa4f1f179500277f" + integrity sha512-JZRR3I1Plr2YxPBhgqRspDE2S5zprbga3swYNrvY3HfQGu7p/GjyLOqwrYad97tX3U3mzT53TPHVmozacfP/3w== + dependencies: + "@babel/core" "^7.1.0" + "@jest/test-sequencer" "^27.0.6" + "@jest/types" "^27.0.6" + babel-jest "^27.0.6" + chalk "^4.0.0" + deepmerge "^4.2.2" + glob "^7.1.1" + graceful-fs "^4.2.4" + is-ci "^3.0.0" + jest-circus "^27.0.6" + jest-environment-jsdom "^27.0.6" + jest-environment-node "^27.0.6" + jest-get-type "^27.0.6" + jest-jasmine2 "^27.0.6" + jest-regex-util "^27.0.6" + jest-resolve "^27.0.6" + jest-runner "^27.0.6" + jest-util "^27.0.6" + jest-validate "^27.0.6" + micromatch "^4.0.4" + pretty-format "^27.0.6" + jest-config@^27.0.4: version "27.0.4" resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.4.tgz#c4f41378acf40ca77860fb4e213b12109d87b8cf" @@ -5748,7 +6022,7 @@ jest-config@^27.0.4: micromatch "^4.0.4" pretty-format "^27.0.2" -jest-diff@^26.0.0, jest-diff@^27.0.0, jest-diff@^27.0.2: +jest-diff@^26.0.0, jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.2.tgz#f315b87cee5dc134cf42c2708ab27375cc3f5a7e" integrity sha512-BFIdRb0LqfV1hBt8crQmw6gGQHVDhM87SpMIZ45FPYKReZYG5er1+5pIn2zKqvrJp6WNox0ylR8571Iwk2Dmgw== @@ -5765,6 +6039,13 @@ jest-docblock@^27.0.1: dependencies: detect-newline "^3.0.0" +jest-docblock@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.0.6.tgz#cc78266acf7fe693ca462cbbda0ea4e639e4e5f3" + integrity sha512-Fid6dPcjwepTFraz0YxIMCi7dejjJ/KL9FBjPYhBp4Sv1Y9PdhImlKZqYU555BlN4TQKaTc+F2Av1z+anVyGkA== + dependencies: + detect-newline "^3.0.0" + jest-each@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.0.2.tgz#865ddb4367476ced752167926b656fa0dcecd8c7" @@ -5776,6 +6057,17 @@ jest-each@^27.0.2: jest-util "^27.0.2" pretty-format "^27.0.2" +jest-each@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.0.6.tgz#cee117071b04060158dc8d9a66dc50ad40ef453b" + integrity sha512-m6yKcV3bkSWrUIjxkE9OC0mhBZZdhovIW5ergBYirqnkLXkyEn3oUUF/QZgyecA1cF1QFyTE8bRRl8Tfg1pfLA== + dependencies: + "@jest/types" "^27.0.6" + chalk "^4.0.0" + jest-get-type "^27.0.6" + jest-util "^27.0.6" + pretty-format "^27.0.6" + jest-environment-jsdom@^27.0.3: version "27.0.3" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.0.3.tgz#ed73e913ddc03864eb9f934b5cbabf1b63504e2e" @@ -5789,6 +6081,19 @@ jest-environment-jsdom@^27.0.3: jest-util "^27.0.2" jsdom "^16.6.0" +jest-environment-jsdom@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.0.6.tgz#f66426c4c9950807d0a9f209c590ce544f73291f" + integrity sha512-FvetXg7lnXL9+78H+xUAsra3IeZRTiegA3An01cWeXBspKXUhAwMM9ycIJ4yBaR0L7HkoMPaZsozCLHh4T8fuw== + dependencies: + "@jest/environment" "^27.0.6" + "@jest/fake-timers" "^27.0.6" + "@jest/types" "^27.0.6" + "@types/node" "*" + jest-mock "^27.0.6" + jest-util "^27.0.6" + jsdom "^16.6.0" + jest-environment-node@^27.0.3: version "27.0.3" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.0.3.tgz#b4acb3679d2552a4215732cab8b0ca7ec4398ee0" @@ -5801,11 +6106,28 @@ jest-environment-node@^27.0.3: jest-mock "^27.0.3" jest-util "^27.0.2" +jest-environment-node@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.0.6.tgz#a6699b7ceb52e8d68138b9808b0c404e505f3e07" + integrity sha512-+Vi6yLrPg/qC81jfXx3IBlVnDTI6kmRr08iVa2hFCWmJt4zha0XW7ucQltCAPhSR0FEKEoJ3i+W4E6T0s9is0w== + dependencies: + "@jest/environment" "^27.0.6" + "@jest/fake-timers" "^27.0.6" + "@jest/types" "^27.0.6" + "@types/node" "*" + jest-mock "^27.0.6" + jest-util "^27.0.6" + jest-get-type@^27.0.1: version "27.0.1" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.1.tgz#34951e2b08c8801eb28559d7eb732b04bbcf7815" integrity sha512-9Tggo9zZbu0sHKebiAijyt1NM77Z0uO4tuWOxUCujAiSeXv30Vb5D4xVF4UR4YWNapcftj+PbByU54lKD7/xMg== +jest-get-type@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.6.tgz#0eb5c7f755854279ce9b68a9f1a4122f69047cfe" + integrity sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg== + jest-haste-map@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.0.2.tgz#3f1819400c671237e48b4d4b76a80a0dbed7577f" @@ -5826,6 +6148,26 @@ jest-haste-map@^27.0.2: optionalDependencies: fsevents "^2.3.2" +jest-haste-map@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.0.6.tgz#4683a4e68f6ecaa74231679dca237279562c8dc7" + integrity sha512-4ldjPXX9h8doB2JlRzg9oAZ2p6/GpQUNAeiYXqcpmrKbP0Qev0wdZlxSMOmz8mPOEnt4h6qIzXFLDi8RScX/1w== + dependencies: + "@jest/types" "^27.0.6" + "@types/graceful-fs" "^4.1.2" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.4" + jest-regex-util "^27.0.6" + jest-serializer "^27.0.6" + jest-util "^27.0.6" + jest-worker "^27.0.6" + micromatch "^4.0.4" + walker "^1.0.7" + optionalDependencies: + fsevents "^2.3.2" + jest-jasmine2@^27.0.4: version "27.0.4" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.4.tgz#c669519ccf4904a485338555e1e66cad36bb0670" @@ -5850,6 +6192,30 @@ jest-jasmine2@^27.0.4: pretty-format "^27.0.2" throat "^6.0.1" +jest-jasmine2@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.6.tgz#fd509a9ed3d92bd6edb68a779f4738b100655b37" + integrity sha512-cjpH2sBy+t6dvCeKBsHpW41mjHzXgsavaFMp+VWRf0eR4EW8xASk1acqmljFtK2DgyIECMv2yCdY41r2l1+4iA== + dependencies: + "@babel/traverse" "^7.1.0" + "@jest/environment" "^27.0.6" + "@jest/source-map" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/types" "^27.0.6" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + expect "^27.0.6" + is-generator-fn "^2.0.0" + jest-each "^27.0.6" + jest-matcher-utils "^27.0.6" + jest-message-util "^27.0.6" + jest-runtime "^27.0.6" + jest-snapshot "^27.0.6" + jest-util "^27.0.6" + pretty-format "^27.0.6" + throat "^6.0.1" + jest-leak-detector@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.0.2.tgz#ce19aa9dbcf7a72a9d58907a970427506f624e69" @@ -5858,6 +6224,14 @@ jest-leak-detector@^27.0.2: jest-get-type "^27.0.1" pretty-format "^27.0.2" +jest-leak-detector@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.0.6.tgz#545854275f85450d4ef4b8fe305ca2a26450450f" + integrity sha512-2/d6n2wlH5zEcdctX4zdbgX8oM61tb67PQt4Xh8JFAIy6LRKUnX528HulkaG6nD5qDl5vRV1NXejCe1XRCH5gQ== + dependencies: + jest-get-type "^27.0.6" + pretty-format "^27.0.6" + jest-matcher-utils@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.0.2.tgz#f14c060605a95a466cdc759acc546c6f4cbfc4f0" @@ -5868,6 +6242,16 @@ jest-matcher-utils@^27.0.2: jest-get-type "^27.0.1" pretty-format "^27.0.2" +jest-matcher-utils@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.0.6.tgz#2a8da1e86c620b39459f4352eaa255f0d43e39a9" + integrity sha512-OFgF2VCQx9vdPSYTHWJ9MzFCehs20TsyFi6bIHbk5V1u52zJOnvF0Y/65z3GLZHKRuTgVPY4Z6LVePNahaQ+tA== + dependencies: + chalk "^4.0.0" + jest-diff "^27.0.6" + jest-get-type "^27.0.6" + pretty-format "^27.0.6" + jest-message-util@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.0.2.tgz#181c9b67dff504d8f4ad15cba10d8b80f272048c" @@ -5883,6 +6267,21 @@ jest-message-util@^27.0.2: slash "^3.0.0" stack-utils "^2.0.3" +jest-message-util@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.0.6.tgz#158bcdf4785706492d164a39abca6a14da5ab8b5" + integrity sha512-rBxIs2XK7rGy+zGxgi+UJKP6WqQ+KrBbD1YMj517HYN3v2BG66t3Xan3FWqYHKZwjdB700KiAJ+iES9a0M+ixw== + dependencies: + "@babel/code-frame" "^7.12.13" + "@jest/types" "^27.0.6" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.4" + micromatch "^4.0.4" + pretty-format "^27.0.6" + slash "^3.0.0" + stack-utils "^2.0.3" + jest-mock@^27.0.3: version "27.0.3" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.0.3.tgz#5591844f9192b3335c0dca38e8e45ed297d4d23d" @@ -5891,6 +6290,14 @@ jest-mock@^27.0.3: "@jest/types" "^27.0.2" "@types/node" "*" +jest-mock@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.0.6.tgz#0efdd40851398307ba16778728f6d34d583e3467" + integrity sha512-lzBETUoK8cSxts2NYXSBWT+EJNzmUVtVVwS1sU9GwE1DLCfGsngg+ZVSIe0yd0ZSm+y791esiuo+WSwpXJQ5Bw== + dependencies: + "@jest/types" "^27.0.6" + "@types/node" "*" + jest-pnp-resolver@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" @@ -5901,6 +6308,11 @@ jest-regex-util@^27.0.1: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.1.tgz#69d4b1bf5b690faa3490113c47486ed85dd45b68" integrity sha512-6nY6QVcpTgEKQy1L41P4pr3aOddneK17kn3HJw6SdwGiKfgCGTvH02hVXL0GU8GEKtPH83eD2DIDgxHXOxVohQ== +jest-regex-util@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5" + integrity sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ== + jest-resolve-dependencies@^27.0.4: version "27.0.4" resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.4.tgz#a07a242d70d668afd3fcf7f4270755eebb1fe579" @@ -5910,18 +6322,19 @@ jest-resolve-dependencies@^27.0.4: jest-regex-util "^27.0.1" jest-snapshot "^27.0.4" -jest-resolve@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.2.tgz#a3ab1517217f469b504f1b56603c5bb541fbb507" - integrity sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ== +jest-resolve@27.0.6, jest-resolve@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.0.6.tgz#e90f436dd4f8fbf53f58a91c42344864f8e55bff" + integrity sha512-yKmIgw2LgTh7uAJtzv8UFHGF7Dm7XfvOe/LQ3Txv101fLM8cx2h1QVwtSJ51Q/SCxpIiKfVn6G2jYYMDNHZteA== dependencies: - "@jest/types" "^26.6.2" + "@jest/types" "^27.0.6" chalk "^4.0.0" + escalade "^3.1.1" graceful-fs "^4.2.4" jest-pnp-resolver "^1.2.2" - jest-util "^26.6.2" - read-pkg-up "^7.0.1" - resolve "^1.18.1" + jest-util "^27.0.6" + jest-validate "^27.0.6" + resolve "^1.20.0" slash "^3.0.0" jest-resolve@^27.0.2: @@ -5982,6 +6395,34 @@ jest-runner@^27.0.4: source-map-support "^0.5.6" throat "^6.0.1" +jest-runner@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.6.tgz#1325f45055539222bbc7256a6976e993ad2f9520" + integrity sha512-W3Bz5qAgaSChuivLn+nKOgjqNxM7O/9JOJoKDCqThPIg2sH/d4A/lzyiaFgnb9V1/w29Le11NpzTJSzga1vyYQ== + dependencies: + "@jest/console" "^27.0.6" + "@jest/environment" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/transform" "^27.0.6" + "@jest/types" "^27.0.6" + "@types/node" "*" + chalk "^4.0.0" + emittery "^0.8.1" + exit "^0.1.2" + graceful-fs "^4.2.4" + jest-docblock "^27.0.6" + jest-environment-jsdom "^27.0.6" + jest-environment-node "^27.0.6" + jest-haste-map "^27.0.6" + jest-leak-detector "^27.0.6" + jest-message-util "^27.0.6" + jest-resolve "^27.0.6" + jest-runtime "^27.0.6" + jest-util "^27.0.6" + jest-worker "^27.0.6" + source-map-support "^0.5.6" + throat "^6.0.1" + jest-runtime@^27.0.4: version "27.0.4" resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.4.tgz#2e4a6aa77cac32ac612dfe12768387a8aa15c2f0" @@ -6014,6 +6455,38 @@ jest-runtime@^27.0.4: strip-bom "^4.0.0" yargs "^16.0.3" +jest-runtime@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.6.tgz#45877cfcd386afdd4f317def551fc369794c27c9" + integrity sha512-BhvHLRVfKibYyqqEFkybsznKwhrsu7AWx2F3y9G9L95VSIN3/ZZ9vBpm/XCS2bS+BWz3sSeNGLzI3TVQ0uL85Q== + dependencies: + "@jest/console" "^27.0.6" + "@jest/environment" "^27.0.6" + "@jest/fake-timers" "^27.0.6" + "@jest/globals" "^27.0.6" + "@jest/source-map" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/transform" "^27.0.6" + "@jest/types" "^27.0.6" + "@types/yargs" "^16.0.0" + chalk "^4.0.0" + cjs-module-lexer "^1.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.4" + jest-haste-map "^27.0.6" + jest-message-util "^27.0.6" + jest-mock "^27.0.6" + jest-regex-util "^27.0.6" + jest-resolve "^27.0.6" + jest-snapshot "^27.0.6" + jest-util "^27.0.6" + jest-validate "^27.0.6" + slash "^3.0.0" + strip-bom "^4.0.0" + yargs "^16.0.3" + jest-serializer@^27.0.1: version "27.0.1" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.0.1.tgz#2464d04dcc33fb71dc80b7c82e3c5e8a08cb1020" @@ -6022,6 +6495,14 @@ jest-serializer@^27.0.1: "@types/node" "*" graceful-fs "^4.2.4" +jest-serializer@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.0.6.tgz#93a6c74e0132b81a2d54623251c46c498bb5bec1" + integrity sha512-PtGdVK9EGC7dsaziskfqaAPib6wTViY3G8E5wz9tLVPhHyiDNTZn/xjZ4khAw+09QkoOVpn7vF5nPSN6dtBexA== + dependencies: + "@types/node" "*" + graceful-fs "^4.2.4" + jest-snapshot@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.2.tgz#40c48dc6afd3cbc5d3d07c061f20fc10d94ca0cd" @@ -6082,6 +6563,36 @@ jest-snapshot@^27.0.4: pretty-format "^27.0.2" semver "^7.3.2" +jest-snapshot@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.6.tgz#f4e6b208bd2e92e888344d78f0f650bcff05a4bf" + integrity sha512-NTHaz8He+ATUagUgE7C/UtFcRoHqR2Gc+KDfhQIyx+VFgwbeEMjeP+ILpUTLosZn/ZtbNdCF5LkVnN/l+V751A== + dependencies: + "@babel/core" "^7.7.2" + "@babel/generator" "^7.7.2" + "@babel/parser" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/traverse" "^7.7.2" + "@babel/types" "^7.0.0" + "@jest/transform" "^27.0.6" + "@jest/types" "^27.0.6" + "@types/babel__traverse" "^7.0.4" + "@types/prettier" "^2.1.5" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^27.0.6" + graceful-fs "^4.2.4" + jest-diff "^27.0.6" + jest-get-type "^27.0.6" + jest-haste-map "^27.0.6" + jest-matcher-utils "^27.0.6" + jest-message-util "^27.0.6" + jest-resolve "^27.0.6" + jest-util "^27.0.6" + natural-compare "^1.4.0" + pretty-format "^27.0.6" + semver "^7.3.2" + jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/jest-specific-snapshot/-/jest-specific-snapshot-5.0.0.tgz#48f72d5613af7f3e30df75b6b3534db6bab32ea0" @@ -6089,17 +6600,17 @@ jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: dependencies: jest-snapshot "^27.0.2" -jest-util@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" - integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== +jest-util@27.0.6, jest-util@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.0.6.tgz#e8e04eec159de2f4d5f57f795df9cdc091e50297" + integrity sha512-1JjlaIh+C65H/F7D11GNkGDDZtDfMEM8EBXsvd+l/cxtgQ6QhxuloOaiayt89DxUvDarbVhqI98HhgrM1yliFQ== dependencies: - "@jest/types" "^26.6.2" + "@jest/types" "^27.0.6" "@types/node" "*" chalk "^4.0.0" graceful-fs "^4.2.4" - is-ci "^2.0.0" - micromatch "^4.0.2" + is-ci "^3.0.0" + picomatch "^2.2.3" jest-util@^27.0.0, jest-util@^27.0.2: version "27.0.2" @@ -6125,6 +6636,18 @@ jest-validate@^27.0.2: leven "^3.1.0" pretty-format "^27.0.2" +jest-validate@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.0.6.tgz#930a527c7a951927df269f43b2dc23262457e2a6" + integrity sha512-yhZZOaMH3Zg6DC83n60pLmdU1DQE46DW+KLozPiPbSbPhlXXaiUTDlhHQhHFpaqIFRrInko1FHXjTRpjWRuWfA== + dependencies: + "@jest/types" "^27.0.6" + camelcase "^6.2.0" + chalk "^4.0.0" + jest-get-type "^27.0.6" + leven "^3.1.0" + pretty-format "^27.0.6" + jest-watcher@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.0.2.tgz#dab5f9443e2d7f52597186480731a8c6335c5deb" @@ -6147,6 +6670,15 @@ jest-worker@^27.0.2: merge-stream "^2.0.0" supports-color "^8.0.0" +jest-worker@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.6.tgz#a5fdb1e14ad34eb228cfe162d9f729cdbfa28aed" + integrity sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + jest@^27.0.3: version "27.0.4" resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.4.tgz#91d4d564b36bcf93b98dac1ab19f07089e670f53" @@ -7149,7 +7681,7 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package- semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^3.0.0: +normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== @@ -7786,12 +8318,17 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prettier@*, prettier@^2.3.0: +prettier@*: version "2.3.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6" integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA== -pretty-format@*, pretty-format@^26.0.0, pretty-format@^27.0.0, pretty-format@^27.0.2: +prettier@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" + integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== + +pretty-format@*, pretty-format@^26.0.0, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6: version "27.0.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.2.tgz#9283ff8c4f581b186b2d4da461617143dca478a4" integrity sha512-mXKbbBPnYTG7Yra9qFBtqj+IXcsvxsvOBco3QHxtxTl+hHKq6QdzMZ+q0CtL4ORHZgwGImRr2XZUX2EWzORxig== @@ -8044,6 +8581,13 @@ readdir-scoped-modules@^1.0.0: graceful-fs "^4.1.2" once "^1.3.0" +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" @@ -8207,7 +8751,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.18.1, resolve@^1.20.0, resolve@^1.3.2: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.20.0, resolve@^1.3.2: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -9290,10 +9834,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.3.2, "typescript@>=3.3.1 <4.4.0", typescript@^4.1.0-dev.20201026, typescript@~4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" - integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw== +typescript@*, typescript@4.3.5, "typescript@>=3.3.1 <4.4.0", typescript@^4.1.0-dev.20201026, typescript@~4.3.2: + version "4.3.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" + integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" @@ -9449,6 +9993,15 @@ v8-to-istanbul@^7.0.0: convert-source-map "^1.6.0" source-map "^0.7.3" +v8-to-istanbul@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.0.0.tgz#4229f2a99e367f3f018fa1d5c2b8ec684667c69c" + integrity sha512-LkmXi8UUNxnCC+JlH7/fsfsKr5AU110l+SYGJimWNkWhxbN5EyeOtm1MJ0hhvqMMOhGwBj1Fp70Yv9i+hX0QAg== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^1.6.0" + source-map "^0.7.3" + validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" From 15f718415eb4e522440a5d81f38d65ee81535795 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 26 Jul 2021 17:03:20 +0000 Subject: [PATCH 224/473] chore: publish v4.28.5 --- CHANGELOG.md | 8 ++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.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 | 8 ++++++++ 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 ++-- 24 files changed, 127 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efdec205c75e..7cbb536062bb 100644 --- a/CHANGELOG.md +++ b/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.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + + + + + ## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) **Note:** Version bump only for package @typescript-eslint/typescript-eslint diff --git a/lerna.json b/lerna.json index 5fa41e9157ce..0bdd3150c5fd 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.28.4", + "version": "4.28.5", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index a290ca852154..cf8aa62fff49 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + ## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index e37995c57b92..1de0a2fdbcfb 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.28.4", + "version": "4.28.5", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 0ee465ed4e9e..4ad594f0f09f 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.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) **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 0ae43a471fce..a66619ad72e0 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.28.4", + "version": "4.28.5", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.28.4", + "@typescript-eslint/experimental-utils": "4.28.5", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 63672ea436ba..6bc3be0b84f9 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.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) **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 61354ebd7f09..3f8f90c5e985 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.28.4", + "version": "4.28.5", "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.28.4", + "@typescript-eslint/experimental-utils": "4.28.5", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.28.4" + "@typescript-eslint/parser": "4.28.5" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index ecaff23096bc..4409fd54813a 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/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.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + + + + + ## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 551d55df0bd8..52d579430969 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.28.4", + "version": "4.28.5", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.28.4", - "@typescript-eslint/scope-manager": "4.28.4", + "@typescript-eslint/experimental-utils": "4.28.5", + "@typescript-eslint/scope-manager": "4.28.5", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 66f3bc8bbadb..754f93ce147b 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.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + ## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) **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 0d8a7d296636..5080e90e0da1 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.28.4", + "version": "4.28.5", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.28.4", - "@typescript-eslint/types": "4.28.4", - "@typescript-eslint/typescript-estree": "4.28.4", + "@typescript-eslint/scope-manager": "4.28.5", + "@typescript-eslint/types": "4.28.5", + "@typescript-eslint/typescript-estree": "4.28.5", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index b4a7dc14665d..83a7fd33fd15 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.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + ## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 95368f9fbc76..0c9f9a129e63 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.28.4", + "version": "4.28.5", "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.28.4", - "@typescript-eslint/types": "4.28.4", - "@typescript-eslint/typescript-estree": "4.28.4", + "@typescript-eslint/scope-manager": "4.28.5", + "@typescript-eslint/types": "4.28.5", + "@typescript-eslint/typescript-estree": "4.28.5", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.28.4", + "@typescript-eslint/experimental-utils": "4.28.5", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index a72302518370..2c88e35160d5 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.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + ## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) **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 5003729ef860..cd220b2e3b37 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.28.4", + "version": "4.28.5", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.28.4", - "@typescript-eslint/visitor-keys": "4.28.4" + "@typescript-eslint/types": "4.28.5", + "@typescript-eslint/visitor-keys": "4.28.5" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.28.4", + "@typescript-eslint/typescript-estree": "4.28.5", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 7887f29091a8..2c4338a53f21 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.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) **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 e567a7076a03..d9ee72f1db98 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.28.4", + "version": "4.28.5", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 5c19f02589cf..9abe57bc44b8 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.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + ## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 84897fb773be..c746e3336c43 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.28.4", + "version": "4.28.5", "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 8ae4ba83c854..313f0ed9be9b 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.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + ## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) **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 a933f4c1d573..00baf7782db7 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.28.4", + "version": "4.28.5", "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.28.4", - "@typescript-eslint/visitor-keys": "4.28.4", + "@typescript-eslint/types": "4.28.5", + "@typescript-eslint/visitor-keys": "4.28.5", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.28.4", + "@typescript-eslint/shared-fixtures": "4.28.5", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index a56f6e2ba292..c147f162a6b9 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.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19) **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 78e0b1eae1db..e7bacdbc4f57 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.28.4", + "version": "4.28.5", "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.28.4", + "@typescript-eslint/types": "4.28.5", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 5e1a61500472ff186eede686b2257464476d3d87 Mon Sep 17 00:00:00 2001 From: Zzzen Date: Sun, 1 Aug 2021 04:39:03 +0800 Subject: [PATCH 225/473] feat(eslint-plugin): [prefer-return-this-type] add a new rule (#3228) --- packages/eslint-plugin/README.md | 1 + .../docs/rules/prefer-return-this-type.md | 90 ++++++ packages/eslint-plugin/src/configs/all.ts | 1 + packages/eslint-plugin/src/rules/index.ts | 2 + .../src/rules/prefer-return-this-type.ts | 178 +++++++++++ packages/eslint-plugin/src/util/astUtils.ts | 36 +++ .../rules/prefer-return-this-type.test.ts | 288 ++++++++++++++++++ 7 files changed, 596 insertions(+) create mode 100644 packages/eslint-plugin/docs/rules/prefer-return-this-type.md create mode 100644 packages/eslint-plugin/src/rules/prefer-return-this-type.ts create mode 100644 packages/eslint-plugin/tests/rules/prefer-return-this-type.test.ts diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 344764dcb96b..6f890d272562 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -163,6 +163,7 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@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: | :wrench: | :thought_balloon: | +| [`@typescript-eslint/prefer-return-this-type`](./docs/rules/prefer-return-this-type.md) | Enforce that `this` is used when only `this` type is returned | | :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/docs/rules/prefer-return-this-type.md b/packages/eslint-plugin/docs/rules/prefer-return-this-type.md new file mode 100644 index 000000000000..161495b82c00 --- /dev/null +++ b/packages/eslint-plugin/docs/rules/prefer-return-this-type.md @@ -0,0 +1,90 @@ +# Enforce that `this` is used when only `this` type is returned (`prefer-return-this-type`) + +[Method chaining](https://en.wikipedia.org/wiki/Method_chaining) is a common pattern in OOP languages and TypeScript provides a special [polymorphic this type](https://www.typescriptlang.org/docs/handbook/2/classes.html#this-types). +If any type other than `this` is specified as the return type of these chaining methods, TypeScript will fail to cast it when invoking in subclass. + +```ts +class Animal { + eat(): Animal { + console.log("I'm moving!"); + return this; + } +} + +class Cat extends Animal { + meow(): Cat { + console.log('Meow~'); + return this; + } +} + +const cat = new Cat(); +// Error: Property 'meow' does not exist on type 'Animal'. +// because `eat` returns `Animal` and not all animals meow. +cat.eat().meow(); + +// the error can be fixed by removing the return type of `eat` or use `this` as the return type. +class Animal { + eat(): this { + console.log("I'm moving!"); + return this; + } +} + +class Cat extends Animal { + meow(): this { + console.log('Meow~'); + return this; + } +} + +const cat = new Cat(); +// no errors. Because `eat` returns `Cat` now +cat.eat().meow(); +``` + +Examples of **incorrect** code for this rule: + +```ts +class Foo { + f1(): Foo { + return this; + } + f2 = (): Foo => { + return this; + }; + f3(): Foo | undefined { + return Math.random() > 0.5 ? this : undefined; + } +} +``` + +Examples of **correct** code for this rule: + +```ts +class Foo { + f1(): this { + return this; + } + f2() { + return this; + } + f3 = (): this => { + return this; + }; + f4 = () => { + return this; + }; +} + +class Base {} +class Derived extends Base { + f(): Base { + return this; + } +} +``` + +## When Not To Use It + +If you don't use method chaining or explicit return values, you can safely turn this rule off. diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index b21d14efc9f0..66209b806233 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -129,6 +129,7 @@ export = { '@typescript-eslint/prefer-readonly-parameter-types': 'error', '@typescript-eslint/prefer-reduce-type-parameter': 'error', '@typescript-eslint/prefer-regexp-exec': 'error', + '@typescript-eslint/prefer-return-this-type': 'error', '@typescript-eslint/prefer-string-starts-ends-with': 'error', '@typescript-eslint/prefer-ts-expect-error': 'error', '@typescript-eslint/promise-function-async': 'error', diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index be78db26f806..1b6fa0f6ea12 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -94,6 +94,7 @@ import preferReadonly from './prefer-readonly'; import preferReadonlyParameterTypes from './prefer-readonly-parameter-types'; import preferReduceTypeParameter from './prefer-reduce-type-parameter'; import preferRegexpExec from './prefer-regexp-exec'; +import preferReturnThisType from './prefer-return-this-type'; import preferStringStartsEndsWith from './prefer-string-starts-ends-with'; import preferTsExpectError from './prefer-ts-expect-error'; import promiseFunctionAsync from './promise-function-async'; @@ -212,6 +213,7 @@ export default { 'prefer-readonly-parameter-types': preferReadonlyParameterTypes, 'prefer-reduce-type-parameter': preferReduceTypeParameter, 'prefer-regexp-exec': preferRegexpExec, + 'prefer-return-this-type': preferReturnThisType, 'prefer-string-starts-ends-with': preferStringStartsEndsWith, 'prefer-ts-expect-error': preferTsExpectError, 'promise-function-async': promiseFunctionAsync, diff --git a/packages/eslint-plugin/src/rules/prefer-return-this-type.ts b/packages/eslint-plugin/src/rules/prefer-return-this-type.ts new file mode 100644 index 000000000000..4287d6c5dfaa --- /dev/null +++ b/packages/eslint-plugin/src/rules/prefer-return-this-type.ts @@ -0,0 +1,178 @@ +import { + TSESTree, + AST_NODE_TYPES, +} from '@typescript-eslint/experimental-utils'; +import { createRule, forEachReturnStatement, getParserServices } from '../util'; +import * as ts from 'typescript'; + +type ClassLikeDeclaration = + | TSESTree.ClassDeclaration + | TSESTree.ClassExpression; + +type FunctionLike = + | TSESTree.MethodDefinition['value'] + | TSESTree.ArrowFunctionExpression; + +export default createRule({ + name: 'prefer-return-this-type', + defaultOptions: [], + + meta: { + type: 'suggestion', + docs: { + description: + 'Enforce that `this` is used when only `this` type is returned', + category: 'Best Practices', + recommended: false, + requiresTypeChecking: true, + }, + messages: { + useThisType: 'use `this` type instead.', + }, + schema: [], + fixable: 'code', + }, + + create(context) { + const parserServices = getParserServices(context); + const checker = parserServices.program.getTypeChecker(); + + function tryGetNameInType( + name: string, + typeNode: TSESTree.TypeNode, + ): TSESTree.Identifier | undefined { + if ( + typeNode.type === AST_NODE_TYPES.TSTypeReference && + typeNode.typeName.type === AST_NODE_TYPES.Identifier && + typeNode.typeName.name === name + ) { + return typeNode.typeName; + } + + if (typeNode.type === AST_NODE_TYPES.TSUnionType) { + for (const type of typeNode.types) { + const found = tryGetNameInType(name, type); + if (found) { + return found; + } + } + } + + return undefined; + } + + function isThisSpecifiedInParameters(originalFunc: FunctionLike): boolean { + const firstArg = originalFunc.params[0]; + return ( + firstArg && + firstArg.type === AST_NODE_TYPES.Identifier && + firstArg.name === 'this' + ); + } + + function isFunctionReturningThis( + originalFunc: FunctionLike, + originalClass: ClassLikeDeclaration, + ): boolean { + if (isThisSpecifiedInParameters(originalFunc)) { + return false; + } + + const func = parserServices.esTreeNodeToTSNodeMap.get(originalFunc); + + if (!func.body) { + return false; + } + + const classType = checker.getTypeAtLocation( + parserServices.esTreeNodeToTSNodeMap.get(originalClass), + ) as ts.InterfaceType; + + if (func.body.kind !== ts.SyntaxKind.Block) { + const type = checker.getTypeAtLocation(func.body); + return classType.thisType === type; + } + + let hasReturnThis = false; + let hasReturnClassType = false; + + forEachReturnStatement(func.body as ts.Block, stmt => { + const expr = stmt.expression; + if (!expr) { + return; + } + + // fast check + if (expr.kind === ts.SyntaxKind.ThisKeyword) { + hasReturnThis = true; + return; + } + + const type = checker.getTypeAtLocation(expr); + if (classType === type) { + hasReturnClassType = true; + return true; + } + + if (classType.thisType === type) { + hasReturnThis = true; + return; + } + + return; + }); + + return !hasReturnClassType && hasReturnThis; + } + + function checkFunction( + originalFunc: FunctionLike, + originalClass: ClassLikeDeclaration, + ): void { + const className = originalClass.id?.name; + if (!className) { + return; + } + + if (!originalFunc.returnType) { + return; + } + + const classNameRef = tryGetNameInType( + className, + originalFunc.returnType.typeAnnotation, + ); + if (!classNameRef) { + return; + } + + if (isFunctionReturningThis(originalFunc, originalClass)) { + context.report({ + node: classNameRef, + messageId: 'useThisType', + fix(fixer) { + return fixer.replaceText(classNameRef, 'this'); + }, + }); + } + } + + return { + 'ClassBody > MethodDefinition'(node: TSESTree.MethodDefinition): void { + checkFunction(node.value, node.parent!.parent as ClassLikeDeclaration); + }, + 'ClassBody > ClassProperty'(node: TSESTree.ClassProperty): void { + if ( + !( + node.value?.type === AST_NODE_TYPES.FunctionExpression || + node.value?.type === AST_NODE_TYPES.ArrowFunctionExpression + ) + ) { + return; + } + + checkFunction(node.value, node.parent!.parent as ClassLikeDeclaration); + }, + }; + }, +}); diff --git a/packages/eslint-plugin/src/util/astUtils.ts b/packages/eslint-plugin/src/util/astUtils.ts index 3fe1c01e2968..67bdfca5aa19 100644 --- a/packages/eslint-plugin/src/util/astUtils.ts +++ b/packages/eslint-plugin/src/util/astUtils.ts @@ -1,5 +1,6 @@ import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; import { escapeRegExp } from './escapeRegExp'; +import * as ts from 'typescript'; // deeply re-export, for convenience export * from '@typescript-eslint/experimental-utils/dist/ast-utils'; @@ -41,3 +42,38 @@ export function getNameLocationInGlobalDirectiveComment( return { start, end }; } + +// Copied from typescript https://github.com/microsoft/TypeScript/blob/42b0e3c4630c129ca39ce0df9fff5f0d1b4dd348/src/compiler/utilities.ts#L1335 +// Warning: This has the same semantics as the forEach family of functions, +// in that traversal terminates in the event that 'visitor' supplies a truthy value. +export function forEachReturnStatement( + body: ts.Block, + visitor: (stmt: ts.ReturnStatement) => T, +): T | undefined { + return traverse(body); + + function traverse(node: ts.Node): T | undefined { + switch (node.kind) { + case ts.SyntaxKind.ReturnStatement: + return visitor(node); + case ts.SyntaxKind.CaseBlock: + case ts.SyntaxKind.Block: + case ts.SyntaxKind.IfStatement: + case ts.SyntaxKind.DoStatement: + case ts.SyntaxKind.WhileStatement: + case ts.SyntaxKind.ForStatement: + case ts.SyntaxKind.ForInStatement: + case ts.SyntaxKind.ForOfStatement: + case ts.SyntaxKind.WithStatement: + case ts.SyntaxKind.SwitchStatement: + case ts.SyntaxKind.CaseClause: + case ts.SyntaxKind.DefaultClause: + case ts.SyntaxKind.LabeledStatement: + case ts.SyntaxKind.TryStatement: + case ts.SyntaxKind.CatchClause: + return ts.forEachChild(node, traverse); + } + + return undefined; + } +} diff --git a/packages/eslint-plugin/tests/rules/prefer-return-this-type.test.ts b/packages/eslint-plugin/tests/rules/prefer-return-this-type.test.ts new file mode 100644 index 000000000000..67864d22b6c8 --- /dev/null +++ b/packages/eslint-plugin/tests/rules/prefer-return-this-type.test.ts @@ -0,0 +1,288 @@ +import rule from '../../src/rules/prefer-return-this-type'; +import { RuleTester, getFixturesRootDir } from '../RuleTester'; + +const rootPath = getFixturesRootDir(); + +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', + parserOptions: { + tsconfigRootDir: rootPath, + project: './tsconfig.json', + }, +}); + +ruleTester.run('prefer-return-this-type', rule, { + valid: [ + ` +class Foo { + f1() {} + f2(): Foo { + return new Foo(); + } + f3() { + return this; + } + f4(): this { + return this; + } + f5(): any { + return this; + } + f6(): unknown { + return this; + } + f7(foo: Foo): Foo { + return Math.random() > 0.5 ? foo : this; + } + f10(this: Foo, that: Foo): Foo; + f11(): Foo { + return; + } + f13(this: Foo): Foo { + return this; + } + f14(): { f14: Function } { + return this; + } + f15(): Foo | this { + return Math.random() > 0.5 ? new Foo() : this; + } +} + `, + ` +class Foo { + f1 = () => {}; + f2 = (): Foo => { + return new Foo(); + }; + f3 = () => this; + f4 = (): this => { + return this; + }; + f5 = (): Foo => new Foo(); + f6 = ''; +} + `, + ` +const Foo = class { + bar() { + return this; + } +}; + `, + ` +class Base {} +class Derived extends Base { + f(): Base { + return this; + } +} + `, + ], + invalid: [ + { + code: ` +class Foo { + f(): Foo { + return this; + } +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 8, + }, + ], + output: ` +class Foo { + f(): this { + return this; + } +} + `, + }, + { + code: ` +class Foo { + f(): Foo { + const self = this; + return self; + } +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 8, + }, + ], + output: ` +class Foo { + f(): this { + const self = this; + return self; + } +} + `, + }, + { + code: ` +class Foo { + f = (): Foo => { + return this; + }; +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 11, + }, + ], + output: ` +class Foo { + f = (): this => { + return this; + }; +} + `, + }, + { + code: ` +class Foo { + f = (): Foo => { + const self = this; + return self; + }; +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 11, + }, + ], + output: ` +class Foo { + f = (): this => { + const self = this; + return self; + }; +} + `, + }, + { + code: ` +class Foo { + f = (): Foo => this; +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 11, + }, + ], + output: ` +class Foo { + f = (): this => this; +} + `, + }, + { + code: ` +class Foo { + f1(): Foo | undefined { + return this; + } + f2(): this | undefined { + return this; + } +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 9, + }, + ], + output: ` +class Foo { + f1(): this | undefined { + return this; + } + f2(): this | undefined { + return this; + } +} + `, + }, + { + code: ` +class Foo { + bar(): Foo | undefined { + if (Math.random() > 0.5) { + return this; + } + } +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 10, + }, + ], + output: ` +class Foo { + bar(): this | undefined { + if (Math.random() > 0.5) { + return this; + } + } +} + `, + }, + { + code: ` +class Foo { + bar(num: 1 | 2): Foo { + switch (num) { + case 1: + return this; + case 2: + return this; + } + } +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 20, + }, + ], + output: ` +class Foo { + bar(num: 1 | 2): this { + switch (num) { + case 1: + return this; + case 2: + return this; + } + } +} + `, + }, + ], +}); From 6848681a2b702097a7890734b5053f3a9b74ab92 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 31 Jul 2021 14:31:22 -0700 Subject: [PATCH 226/473] test: fix integration tests --- .../fixtures/typescript-and-tslint-plugins-together/test.js.snap | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/fixtures/typescript-and-tslint-plugins-together/test.js.snap b/tests/integration/fixtures/typescript-and-tslint-plugins-together/test.js.snap index 23e113677ccd..cc617dc19cc9 100644 --- a/tests/integration/fixtures/typescript-and-tslint-plugins-together/test.js.snap +++ b/tests/integration/fixtures/typescript-and-tslint-plugins-together/test.js.snap @@ -4,6 +4,7 @@ exports[`it should produce the expected lint ouput 1`] = ` Array [ Object { "errorCount": 1, + "fatalErrorCount": 0, "filePath": "/usr/linked/index.ts", "fixableErrorCount": 1, "fixableWarningCount": 0, From 50055ec6b15149d205e74c2cecac9012ebae9a36 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 31 Jul 2021 14:39:24 -0700 Subject: [PATCH 227/473] test: fix more integration test snapshots --- tests/integration/fixtures/eslint-v6/test.js.snap | 1 + tests/integration/fixtures/markdown/test.js.snap | 1 + .../fixtures/recommended-does-not-require-program/test.js.snap | 1 + tests/integration/fixtures/vue-jsx/test.js.snap | 1 + tests/integration/fixtures/vue-sfc/test.js.snap | 3 +++ 5 files changed, 7 insertions(+) diff --git a/tests/integration/fixtures/eslint-v6/test.js.snap b/tests/integration/fixtures/eslint-v6/test.js.snap index 350194ef759a..c15f60f0ff9b 100644 --- a/tests/integration/fixtures/eslint-v6/test.js.snap +++ b/tests/integration/fixtures/eslint-v6/test.js.snap @@ -4,6 +4,7 @@ exports[`it should produce the expected lint ouput 1`] = ` Array [ Object { "errorCount": 1, + "fatalErrorCount": 0, "filePath": "/usr/linked/index.ts", "fixableErrorCount": 0, "fixableWarningCount": 0, diff --git a/tests/integration/fixtures/markdown/test.js.snap b/tests/integration/fixtures/markdown/test.js.snap index 8663838f7edc..67725201aa8a 100644 --- a/tests/integration/fixtures/markdown/test.js.snap +++ b/tests/integration/fixtures/markdown/test.js.snap @@ -4,6 +4,7 @@ exports[`it should produce the expected lint ouput 1`] = ` Array [ Object { "errorCount": 10, + "fatalErrorCount": 0, "filePath": "/usr/linked/Doc.md", "fixableErrorCount": 0, "fixableWarningCount": 0, diff --git a/tests/integration/fixtures/recommended-does-not-require-program/test.js.snap b/tests/integration/fixtures/recommended-does-not-require-program/test.js.snap index b313deb408b7..5b77306e5543 100644 --- a/tests/integration/fixtures/recommended-does-not-require-program/test.js.snap +++ b/tests/integration/fixtures/recommended-does-not-require-program/test.js.snap @@ -4,6 +4,7 @@ exports[`it should produce the expected lint ouput 1`] = ` Array [ Object { "errorCount": 1, + "fatalErrorCount": 0, "filePath": "/usr/linked/index.ts", "fixableErrorCount": 1, "fixableWarningCount": 0, diff --git a/tests/integration/fixtures/vue-jsx/test.js.snap b/tests/integration/fixtures/vue-jsx/test.js.snap index 3f0b716085b2..6877b71a7e88 100644 --- a/tests/integration/fixtures/vue-jsx/test.js.snap +++ b/tests/integration/fixtures/vue-jsx/test.js.snap @@ -4,6 +4,7 @@ exports[`it should produce the expected lint ouput 1`] = ` Array [ Object { "errorCount": 1, + "fatalErrorCount": 0, "filePath": "/usr/linked/Jsx.vue", "fixableErrorCount": 0, "fixableWarningCount": 0, diff --git a/tests/integration/fixtures/vue-sfc/test.js.snap b/tests/integration/fixtures/vue-sfc/test.js.snap index ac5804574daf..3c0d7fc68a32 100644 --- a/tests/integration/fixtures/vue-sfc/test.js.snap +++ b/tests/integration/fixtures/vue-sfc/test.js.snap @@ -4,6 +4,7 @@ exports[`it should produce the expected lint ouput 1`] = ` Array [ Object { "errorCount": 1, + "fatalErrorCount": 0, "filePath": "/usr/linked/Hello.vue", "fixableErrorCount": 0, "fixableWarningCount": 0, @@ -89,6 +90,7 @@ export default Vue.extend({ }, Object { "errorCount": 0, + "fatalErrorCount": 0, "filePath": "/usr/linked/Utility.vue", "fixableErrorCount": 0, "fixableWarningCount": 0, @@ -114,6 +116,7 @@ export default class Utility { }, Object { "errorCount": 0, + "fatalErrorCount": 0, "filePath": "/usr/linked/World.vue", "fixableErrorCount": 0, "fixableWarningCount": 0, From d48429d97326545bb727f88ce9056270b1599a31 Mon Sep 17 00:00:00 2001 From: Edmundo Santos Date: Sat, 31 Jul 2021 18:41:49 -0300 Subject: [PATCH 228/473] feat(typescript-estree): add support for custom module resolution (#3516) --- packages/parser/README.md | 24 +++++ packages/types/src/parser-options.ts | 1 + packages/typescript-estree/README.md | 5 ++ .../create-program/createDefaultProgram.ts | 8 ++ .../src/create-program/createWatchProgram.ts | 7 ++ .../src/create-program/shared.ts | 20 ++++- .../typescript-estree/src/parser-options.ts | 22 ++++- packages/typescript-estree/src/parser.ts | 5 ++ .../tests/fixtures/moduleResolver/file.ts | 0 .../fixtures/moduleResolver/moduleResolver.js | 36 ++++++++ .../fixtures/moduleResolver/something.ts | 1 + .../tsconfig.defaultProgram.json | 3 + .../fixtures/moduleResolver/tsconfig.json | 3 + .../typescript-estree/tests/lib/parse.test.ts | 90 +++++++++++++++++++ 14 files changed, 220 insertions(+), 5 deletions(-) create mode 100644 packages/typescript-estree/tests/fixtures/moduleResolver/file.ts create mode 100644 packages/typescript-estree/tests/fixtures/moduleResolver/moduleResolver.js create mode 100644 packages/typescript-estree/tests/fixtures/moduleResolver/something.ts create mode 100644 packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.defaultProgram.json create mode 100644 packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.json diff --git a/packages/parser/README.md b/packages/parser/README.md index 04f5c53d0f4a..70ca5bf63d64 100644 --- a/packages/parser/README.md +++ b/packages/parser/README.md @@ -66,6 +66,7 @@ interface ParserOptions { warnOnUnsupportedTypeScriptVersion?: boolean; program?: import('typescript').Program; + moduleResolver?: string; } ``` @@ -221,6 +222,29 @@ This option allows you to programmatically provide an array of one or more insta This will override any programs that would have been computed from `parserOptions.project` or `parserOptions.createDefaultProgram`. All linted files must be part of the provided program(s). +### `parserOptions.moduleResolver` + +Default `undefined`. + +This option allows you to provide a custom module resolution. The value should point to a JS file that default exports (`export default`, or `module.exports =`, or `export =`) a file with the following interface: + +```ts +interface ModuleResolver { + version: 1; + resolveModuleNames( + moduleNames: string[], + containingFile: string, + reusedNames: string[] | undefined, + redirectedReference: ts.ResolvedProjectReference | undefined, + options: ts.CompilerOptions, + ): (ts.ResolvedModule | undefined)[]; +} +``` + +[Refer to the TypeScript Wiki for an example on how to write the `resolveModuleNames` function](https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#customizing-module-resolution). + +Note that if you pass custom programs via `options.programs` this option will not have any effect over them (you can simply add the custom resolution on them directly). + ## Utilities ### `createProgram(configFile, projectDirectory)` diff --git a/packages/types/src/parser-options.ts b/packages/types/src/parser-options.ts index a8ecb896726c..850086e1c5b7 100644 --- a/packages/types/src/parser-options.ts +++ b/packages/types/src/parser-options.ts @@ -51,6 +51,7 @@ interface ParserOptions { tsconfigRootDir?: string; useJSXTextNode?: boolean; warnOnUnsupportedTypeScriptVersion?: boolean; + moduleResolver?: string; } export { DebugLevel, EcmaVersion, ParserOptions, SourceType }; diff --git a/packages/typescript-estree/README.md b/packages/typescript-estree/README.md index 31084150646b..9cbcb2727cfc 100644 --- a/packages/typescript-estree/README.md +++ b/packages/typescript-estree/README.md @@ -239,6 +239,11 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { * whether or not ESLint is being used as part of a single run. */ allowAutomaticSingleRunInference?: boolean; + + /** + * Path to a file exporting a custom ModuleResolver. + */ + moduleResolver?: string; } interface ParserServices { diff --git a/packages/typescript-estree/src/create-program/createDefaultProgram.ts b/packages/typescript-estree/src/create-program/createDefaultProgram.ts index c912a44418a0..6e8c21612501 100644 --- a/packages/typescript-estree/src/create-program/createDefaultProgram.ts +++ b/packages/typescript-estree/src/create-program/createDefaultProgram.ts @@ -6,6 +6,7 @@ import { ASTAndProgram, CanonicalPath, createDefaultCompilerOptionsFromExtra, + getModuleResolver, } from './shared'; const log = debug('typescript-eslint:typescript-estree:createDefaultProgram'); @@ -43,6 +44,13 @@ function createDefaultProgram( commandLine.options, /* setParentNodes */ true, ); + + if (extra.moduleResolver) { + compilerHost.resolveModuleNames = getModuleResolver( + extra.moduleResolver, + ).resolveModuleNames; + } + const oldReadFile = compilerHost.readFile; compilerHost.readFile = (fileName: string): string | undefined => path.normalize(fileName) === path.normalize(extra.filePath) diff --git a/packages/typescript-estree/src/create-program/createWatchProgram.ts b/packages/typescript-estree/src/create-program/createWatchProgram.ts index f10f2a2295fc..2142065e47b0 100644 --- a/packages/typescript-estree/src/create-program/createWatchProgram.ts +++ b/packages/typescript-estree/src/create-program/createWatchProgram.ts @@ -9,6 +9,7 @@ import { CanonicalPath, createDefaultCompilerOptionsFromExtra, getCanonicalFileName, + getModuleResolver, } from './shared'; const log = debug('typescript-eslint:typescript-estree:createWatchProgram'); @@ -269,6 +270,12 @@ function createWatchProgram( /*reportWatchStatus*/ () => {}, ) as WatchCompilerHostOfConfigFile; + if (extra.moduleResolver) { + watchCompilerHost.resolveModuleNames = getModuleResolver( + extra.moduleResolver, + ).resolveModuleNames; + } + // ensure readFile reads the code being linted instead of the copy on disk const oldReadFile = watchCompilerHost.readFile; watchCompilerHost.readFile = (filePathIn, encoding): string | undefined => { diff --git a/packages/typescript-estree/src/create-program/shared.ts b/packages/typescript-estree/src/create-program/shared.ts index 8202c538d342..a0e654c90979 100644 --- a/packages/typescript-estree/src/create-program/shared.ts +++ b/packages/typescript-estree/src/create-program/shared.ts @@ -1,7 +1,7 @@ import path from 'path'; import * as ts from 'typescript'; import { Program } from 'typescript'; -import { Extra } from '../parser-options'; +import { Extra, ModuleResolver } from '../parser-options'; interface ASTAndProgram { ast: ts.SourceFile; @@ -124,6 +124,23 @@ function getAstFromProgram( return ast && { ast, program: currentProgram }; } +function getModuleResolver(moduleResolverPath: string): ModuleResolver { + let moduleResolver: ModuleResolver; + + try { + moduleResolver = require(moduleResolverPath) as ModuleResolver; + } catch (error) { + const errorLines = [ + 'Could not find the provided parserOptions.moduleResolver.', + 'Hint: use an absolute path if you are not in control over where the ESLint instance runs.', + ]; + + throw new Error(errorLines.join('\n')); + } + + return moduleResolver; +} + export { ASTAndProgram, CORE_COMPILER_OPTIONS, @@ -134,4 +151,5 @@ export { getCanonicalFileName, getScriptKind, getAstFromProgram, + getModuleResolver, }; diff --git a/packages/typescript-estree/src/parser-options.ts b/packages/typescript-estree/src/parser-options.ts index 0bde1d9176ab..55f47ef9041d 100644 --- a/packages/typescript-estree/src/parser-options.ts +++ b/packages/typescript-estree/src/parser-options.ts @@ -1,5 +1,5 @@ import { DebugLevel } from '@typescript-eslint/types'; -import type { Program } from 'typescript'; +import * as ts from 'typescript'; import { CanonicalPath } from './create-program/shared'; import { TSESTree, TSESTreeToTSNode, TSNode, TSToken } from './ts-estree'; @@ -21,13 +21,14 @@ export interface Extra { singleRun: boolean; log: (message: string) => void; preserveNodeMaps?: boolean; - programs: null | Iterable; + programs: null | Iterable; projects: CanonicalPath[]; range: boolean; strict: boolean; tokens: null | TSESTree.Token[]; tsconfigRootDir: string; useJSXTextNode: boolean; + moduleResolver: string; } //////////////////////////////////////////////////// @@ -176,7 +177,7 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { * This overrides any program or programs that would have been computed from the `project` option. * All linted files must be part of the provided program(s). */ - programs?: Program[]; + programs?: ts.Program[]; /** *************************************************************************************** @@ -202,6 +203,8 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { * whether or not ESLint is being used as part of a single run. */ allowAutomaticSingleRunInference?: boolean; + + moduleResolver?: string; } export type TSESTreeOptions = ParseAndGenerateServicesOptions; @@ -221,8 +224,19 @@ export interface ParserWeakMapESTreeToTSNode< } export interface ParserServices { - program: Program; + program: ts.Program; esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode; tsNodeToESTreeNodeMap: ParserWeakMap; hasFullTypeInformation: boolean; } + +export interface ModuleResolver { + version: 1; + resolveModuleNames( + moduleNames: string[], + containingFile: string, + reusedNames: string[] | undefined, + redirectedReference: ts.ResolvedProjectReference | undefined, + options: ts.CompilerOptions, + ): (ts.ResolvedModule | undefined)[]; +} diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index 904bb054fdf8..3701a8862b31 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -135,6 +135,7 @@ function resetExtra(): void { * of a long-running session (e.g. in an IDE) and watch programs will therefore be required */ singleRun: false, + moduleResolver: '', }; } @@ -342,6 +343,10 @@ function applyParserOptionsToExtra(options: TSESTreeOptions): void { extra.EXPERIMENTAL_useSourceOfProjectReferenceRedirect = typeof options.EXPERIMENTAL_useSourceOfProjectReferenceRedirect === 'boolean' && options.EXPERIMENTAL_useSourceOfProjectReferenceRedirect; + + if (typeof options.moduleResolver === 'string') { + extra.moduleResolver = options.moduleResolver; + } } function warnAboutTSVersion(): void { diff --git a/packages/typescript-estree/tests/fixtures/moduleResolver/file.ts b/packages/typescript-estree/tests/fixtures/moduleResolver/file.ts new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/packages/typescript-estree/tests/fixtures/moduleResolver/moduleResolver.js b/packages/typescript-estree/tests/fixtures/moduleResolver/moduleResolver.js new file mode 100644 index 000000000000..112df1b4b5f2 --- /dev/null +++ b/packages/typescript-estree/tests/fixtures/moduleResolver/moduleResolver.js @@ -0,0 +1,36 @@ +const ts = require('typescript'); + +module.exports = { + version: 1, + resolveModuleNames: ( + moduleNames, + containingFile, + _reusedNames, + _redirectedReferences, + compilerOptions, + ) => { + const resolvedModules = []; + + for (const moduleName of moduleNames) { + let parsedModuleName = moduleName; + + if (parsedModuleName === '__PLACEHOLDER__') { + parsedModuleName = './something'; + } + + const resolution = ts.resolveModuleName( + parsedModuleName, + containingFile, + compilerOptions, + { + fileExists: ts.sys.fileExists, + readFile: ts.sys.readFile, + }, + ); + + resolvedModules.push(resolution.resolvedModule); + } + + return resolvedModules; + } +} diff --git a/packages/typescript-estree/tests/fixtures/moduleResolver/something.ts b/packages/typescript-estree/tests/fixtures/moduleResolver/something.ts new file mode 100644 index 000000000000..c069798b6c26 --- /dev/null +++ b/packages/typescript-estree/tests/fixtures/moduleResolver/something.ts @@ -0,0 +1 @@ +export const something = () => true; diff --git a/packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.defaultProgram.json b/packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.defaultProgram.json new file mode 100644 index 000000000000..8de5ab303982 --- /dev/null +++ b/packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.defaultProgram.json @@ -0,0 +1,3 @@ +{ + "include": [] +} diff --git a/packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.json b/packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.json new file mode 100644 index 000000000000..e7f769a18418 --- /dev/null +++ b/packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.json @@ -0,0 +1,3 @@ +{ + "include": ["./file.ts", "./something.ts"] +} diff --git a/packages/typescript-estree/tests/lib/parse.test.ts b/packages/typescript-estree/tests/lib/parse.test.ts index 3e3129737009..aa15fc136c1b 100644 --- a/packages/typescript-estree/tests/lib/parse.test.ts +++ b/packages/typescript-estree/tests/lib/parse.test.ts @@ -670,4 +670,94 @@ describe('parseAndGenerateServices', () => { expect(testParse('includeme', ignore)).not.toThrow(); }); }); + + describe('moduleResolver', () => { + beforeEach(() => { + parser.clearCaches(); + }); + + const PROJECT_DIR = resolve(FIXTURES_DIR, '../moduleResolver'); + const code = ` + import { something } from '__PLACEHOLDER__'; + + something(); + `; + const config: TSESTreeOptions = { + comment: true, + tokens: true, + range: true, + loc: true, + project: './tsconfig.json', + tsconfigRootDir: PROJECT_DIR, + filePath: resolve(PROJECT_DIR, 'file.ts'), + }; + const withDefaultProgramConfig: TSESTreeOptions = { + ...config, + project: './tsconfig.defaultProgram.json', + createDefaultProgram: true, + }; + + describe('when file is in the project', () => { + it('returns error if __PLACEHOLDER__ can not be resolved', () => { + expect( + parser + .parseAndGenerateServices(code, config) + .services.program.getSemanticDiagnostics(), + ).toHaveProperty( + [0, 'messageText'], + "Cannot find module '__PLACEHOLDER__' or its corresponding type declarations.", + ); + }); + + it('throws error if moduleResolver can not be found', () => { + expect(() => + parser.parseAndGenerateServices(code, { + ...config, + moduleResolver: resolve( + PROJECT_DIR, + './this_moduleResolver_does_not_exist.js', + ), + }), + ).toThrowErrorMatchingInlineSnapshot(` + "Could not find the provided parserOptions.moduleResolver. + Hint: use an absolute path if you are not in control over where the ESLint instance runs." + `); + }); + + it('resolves __PLACEHOLDER__ correctly', () => { + expect( + parser + .parseAndGenerateServices(code, { + ...config, + moduleResolver: resolve(PROJECT_DIR, './moduleResolver.js'), + }) + .services.program.getSemanticDiagnostics(), + ).toHaveLength(0); + }); + }); + + describe('when file is not in the project and createDefaultProgram=true', () => { + it('returns error because __PLACEHOLDER__ can not be resolved', () => { + expect( + parser + .parseAndGenerateServices(code, withDefaultProgramConfig) + .services.program.getSemanticDiagnostics(), + ).toHaveProperty( + [0, 'messageText'], + "Cannot find module '__PLACEHOLDER__' or its corresponding type declarations.", + ); + }); + + it('resolves __PLACEHOLDER__ correctly', () => { + expect( + parser + .parseAndGenerateServices(code, { + ...withDefaultProgramConfig, + moduleResolver: resolve(PROJECT_DIR, './moduleResolver.js'), + }) + .services.program.getSemanticDiagnostics(), + ).toHaveLength(0); + }); + }); + }); }); From 418ab6951d269f2fd18fd79d1803506eb6294bf0 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 31 Jul 2021 15:08:51 -0700 Subject: [PATCH 229/473] test: fix integration test snapshots --- tests/integration/fixtures/eslint-v6/test.js.snap | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/fixtures/eslint-v6/test.js.snap b/tests/integration/fixtures/eslint-v6/test.js.snap index c15f60f0ff9b..350194ef759a 100644 --- a/tests/integration/fixtures/eslint-v6/test.js.snap +++ b/tests/integration/fixtures/eslint-v6/test.js.snap @@ -4,7 +4,6 @@ exports[`it should produce the expected lint ouput 1`] = ` Array [ Object { "errorCount": 1, - "fatalErrorCount": 0, "filePath": "/usr/linked/index.ts", "fixableErrorCount": 0, "fixableWarningCount": 0, From ce984e3b94093617f4500cd30c38c15efa1e91d1 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 31 Jul 2021 19:08:07 -0400 Subject: [PATCH 230/473] chore: enable no-unsafe-return internally (#3471) --- .eslintrc.js | 3 ++- packages/eslint-plugin/src/rules/no-loss-of-precision.ts | 4 +++- packages/eslint-plugin/tools/generate-rules-lists.ts | 2 +- packages/scope-manager/tests/util/serializers/TSESTreeNode.ts | 2 +- packages/typescript-estree/src/convert.ts | 2 +- tools/generate-contributors.ts | 4 ++-- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b39e5187bc73..e03f3106c93e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -66,7 +66,6 @@ module.exports = { // TODO - enable these new recommended rules '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/restrict-template-expressions': 'off', // TODO - enable this '@typescript-eslint/naming-convention': 'off', @@ -173,6 +172,7 @@ module.exports = { }, rules: { '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-return': 'off', 'eslint-plugin/no-identical-tests': 'error', 'jest/no-disabled-tests': 'warn', 'jest/no-focused-tests': 'error', @@ -198,6 +198,7 @@ module.exports = { rules: { '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/restrict-plus-operands': 'off', }, }, diff --git a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts index f6b15c0430c1..e9d52852668f 100644 --- a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts +++ b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts @@ -4,7 +4,9 @@ import * as util from '../util'; const baseRule = ((): typeof BaseRule | null => { try { - return require('eslint/lib/rules/no-loss-of-precision'); + return require('eslint/lib/rules/no-loss-of-precision') as + | typeof BaseRule + | null; } catch { /* istanbul ignore next */ return null; diff --git a/packages/eslint-plugin/tools/generate-rules-lists.ts b/packages/eslint-plugin/tools/generate-rules-lists.ts index 65faf6f2aa20..a4d3f3af8e72 100644 --- a/packages/eslint-plugin/tools/generate-rules-lists.ts +++ b/packages/eslint-plugin/tools/generate-rules-lists.ts @@ -43,7 +43,7 @@ const staticElements = { emojiKey.fixable, emojiKey.requiresTypeChecking, ], - listSpacerRow: Array(5).fill('-'), + listSpacerRow: Array(5).fill('-'), }; const returnEmojiIfTrue = ( diff --git a/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts b/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts index 4611ddcce736..3d57ab11d73e 100644 --- a/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts +++ b/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts @@ -18,7 +18,7 @@ const SEEN_NODES = new Map(); const serializer: NewPlugin = { test(val): boolean { - return ( + return !!( val && typeof val === 'object' && // make sure it's not one of the classes from the package diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 8ffa10ab9181..567da9d88ca1 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1,5 +1,5 @@ // There's lots of funny stuff due to the typing of ts.Node -/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return */ import * as ts from 'typescript'; import { canContainDirective, diff --git a/tools/generate-contributors.ts b/tools/generate-contributors.ts index 07d59c394f00..c668ecf3da4a 100644 --- a/tools/generate-contributors.ts +++ b/tools/generate-contributors.ts @@ -78,9 +78,9 @@ async function main(): Promise { // fetch the user info const users = await Promise.all( - githubContributors.map>(async c => { + githubContributors.map(async c => { const response = await fetch(c.url, { method: 'GET' }); - return response.json(); + return (await response.json()) as User; }), ); From 120d566c980c61d3823fbe8b2db30d76b8c31140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sun, 1 Aug 2021 01:14:35 +0200 Subject: [PATCH 231/473] feat(ast-spec): extract `ExportKind` & `ImportKind` (#3564) --- .../ast-spec/src/declaration/ExportAllDeclaration/spec.ts | 3 ++- packages/ast-spec/src/declaration/ExportAndImportKind.ts | 4 ++++ .../ast-spec/src/declaration/ExportDefaultDeclaration/spec.ts | 3 ++- .../ast-spec/src/declaration/ExportNamedDeclaration/spec.ts | 3 ++- packages/ast-spec/src/declaration/ImportDeclaration/spec.ts | 3 ++- .../src/declaration/TSImportEqualsDeclaration/spec.ts | 3 ++- 6 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 packages/ast-spec/src/declaration/ExportAndImportKind.ts diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts index e9657a7536fa..e6700070b59b 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts @@ -2,10 +2,11 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; import type { Identifier } from '../../expression/Identifier/spec'; import type { Expression } from '../../unions/Expression'; +import type { ExportKind } from '../ExportAndImportKind'; export interface ExportAllDeclaration extends BaseNode { type: AST_NODE_TYPES.ExportAllDeclaration; source: Expression | null; - exportKind: 'type' | 'value'; + exportKind: ExportKind; exported: Identifier | null; } diff --git a/packages/ast-spec/src/declaration/ExportAndImportKind.ts b/packages/ast-spec/src/declaration/ExportAndImportKind.ts new file mode 100644 index 000000000000..e8d90b767981 --- /dev/null +++ b/packages/ast-spec/src/declaration/ExportAndImportKind.ts @@ -0,0 +1,4 @@ +type ExportAndImportKind = 'type' | 'value'; + +export type ExportKind = ExportAndImportKind; +export type ImportKind = ExportAndImportKind; diff --git a/packages/ast-spec/src/declaration/ExportDefaultDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportDefaultDeclaration/spec.ts index f34b6e44668f..492d0981b8ca 100644 --- a/packages/ast-spec/src/declaration/ExportDefaultDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ExportDefaultDeclaration/spec.ts @@ -2,9 +2,10 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; import type { ExportDeclaration } from '../../unions/ExportDeclaration'; import type { Expression } from '../../unions/Expression'; +import type { ExportKind } from '../ExportAndImportKind'; export interface ExportDefaultDeclaration extends BaseNode { type: AST_NODE_TYPES.ExportDefaultDeclaration; declaration: ExportDeclaration | Expression; - exportKind: 'type' | 'value'; + exportKind: ExportKind; } diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts index 021fea1c6330..bf4d9ea86d2c 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts @@ -3,11 +3,12 @@ import type { BaseNode } from '../../base/BaseNode'; import type { ExportSpecifier } from '../../special/ExportSpecifier/spec'; import type { ExportDeclaration } from '../../unions/ExportDeclaration'; import type { Expression } from '../../unions/Expression'; +import type { ExportKind } from '../ExportAndImportKind'; export interface ExportNamedDeclaration extends BaseNode { type: AST_NODE_TYPES.ExportNamedDeclaration; declaration: ExportDeclaration | null; specifiers: ExportSpecifier[]; source: Expression | null; - exportKind: 'type' | 'value'; + exportKind: ExportKind; } diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts b/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts index eaaad5f53e32..2aeaeae4539f 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts @@ -2,10 +2,11 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; import type { ImportClause } from '../../unions/ImportClause'; import type { Literal } from '../../unions/Literal'; +import type { ImportKind } from '../ExportAndImportKind'; export interface ImportDeclaration extends BaseNode { type: AST_NODE_TYPES.ImportDeclaration; source: Literal; specifiers: ImportClause[]; - importKind: 'type' | 'value'; + importKind: ImportKind; } diff --git a/packages/ast-spec/src/declaration/TSImportEqualsDeclaration/spec.ts b/packages/ast-spec/src/declaration/TSImportEqualsDeclaration/spec.ts index 4c434dded782..5ccd9b6fc4fc 100644 --- a/packages/ast-spec/src/declaration/TSImportEqualsDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/TSImportEqualsDeclaration/spec.ts @@ -3,11 +3,12 @@ import type { BaseNode } from '../../base/BaseNode'; import type { Identifier } from '../../expression/Identifier/spec'; import type { TSExternalModuleReference } from '../../special/TSExternalModuleReference/spec'; import type { EntityName } from '../../unions/EntityName'; +import type { ImportKind } from '../ExportAndImportKind'; export interface TSImportEqualsDeclaration extends BaseNode { type: AST_NODE_TYPES.TSImportEqualsDeclaration; id: Identifier; moduleReference: EntityName | TSExternalModuleReference; - importKind: 'type' | 'value'; + importKind: ImportKind; isExport: boolean; } From 72d53e447c9f4851b20bda20616aa9f9c26c7d53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Jul 2021 16:14:58 -0700 Subject: [PATCH 232/473] chore: bump cspell from 5.6.4 to 5.6.6 (#3566) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.6.4 to 5.6.6. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/compare/v5.6.4...v5.6.6) --- updated-dependencies: - dependency-name: cspell dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 70 +++++++++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9810d184e899..2133d098ab89 100644 --- a/yarn.lock +++ b/yarn.lock @@ -460,10 +460,10 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.6.4": - version "5.6.4" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.6.4.tgz#09809441105711f545ef64950fb8ae7cb50c97cc" - integrity sha512-0Q7byfMiLpUocALf8WWoQgYJpCY2fOyoH20AF1lhzPhHkoNXw0G0TisBIqinLI/c5sLsOFrZtH+kD1+cgF/b1A== +"@cspell/cspell-bundled-dicts@^5.6.6": + version "5.6.6" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.6.6.tgz#17ed23657d4a67fa8e60dacf40bfdff402009dd0" + integrity sha512-am79SwDYrs0g1aLmtoZDWIj/IT070ISPoZabpTqnR58MFn0NGrLlF9yEKy3oVZtJhe10L3WWHreYZkdELLS9Sg== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" @@ -500,10 +500,10 @@ "@cspell/dict-software-terms" "^1.0.37" "@cspell/dict-typescript" "^1.0.19" -"@cspell/cspell-types@^5.6.4": - version "5.6.4" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.6.4.tgz#c49c5a0196e4c95d151ce7147679251df757ae19" - integrity sha512-7XoM1lakuwEJmKjXcZlqAgY1wzamrJGtKP8ZM9RzHYTfYoP/bJ8APViwVsQFpG1YyZ5K83F+vdvDkKjlRk1ZpA== +"@cspell/cspell-types@^5.6.5": + version "5.6.5" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.6.5.tgz#445e73616e60ea27314595cedd8979dd8cae1091" + integrity sha512-NCcMIelcQFwr2Yu9ma0buVBAFBlqtlxvAurV5UYmdaYyFv6bKO81HN9oMpu5DFev0ntOjZUSYdAGAhCUuikd3w== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -3624,35 +3624,35 @@ 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.6.4: - version "5.6.4" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.6.4.tgz#282810958f253c665e052df70b8d6fc9b14e5bb7" - integrity sha512-aSXLEOPGYAy/b97NNqw0jyB3T/JTwFtoh2n5lWisUHhqOufpcPnVbbZmX8UWIwFPs6fD4M0oFyhUCAMDg9sfhQ== +cspell-glob@^5.6.5: + version "5.6.5" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.6.5.tgz#125818f94903fb070b9bb0f9fdf2488d2a279db7" + integrity sha512-bobER7IoYBJZCXxkiAc5FT1Tb55TFLf1vZSw0ORCFYMeMHlvYktwDx0Wo6/Nkz39MtMQ9nvLrepCMEEZNpKhVw== dependencies: micromatch "^4.0.4" -cspell-io@^5.6.4: - version "5.6.4" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.6.4.tgz#ce282d15c61eb631156cc92eed067362915de834" - integrity sha512-N0jgFupRsVNKt/UXx3HwGeOQJU7W+IfIKoBP0PIZuJe7MsuT+YofpQYwLcNxEQ7n5sOqRlPvS/6qRL8epClGPw== +cspell-io@^5.6.5: + version "5.6.5" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.6.5.tgz#071dfb9c1d1e38c758d9a5b38d5690142fb2e64f" + integrity sha512-OcnuiOkOetcWtihBF57fefLTNPHgsNEc7+x04U7hto3lwEWe8CFQfnkLbQIZfzXOyiyuPY2yjDO0/Y3oqWrB3A== dependencies: iconv-lite "^0.6.3" iterable-to-stream "^2.0.0" -cspell-lib@^5.6.4: - version "5.6.4" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.6.4.tgz#fd19b8bc5ac54d394aa76075697ad3b62c000fe6" - integrity sha512-54esfuMa+DTyvrRgsoo30E9u/sHH5QEB0yyQ5LeyzlxlTmaUq5kTE/gssH9jkwXt1gd4rmb8jfE55Y+tQkXWWg== +cspell-lib@^5.6.6: + version "5.6.6" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.6.6.tgz#241924d83d9df9714692946246afe37c9074a79b" + integrity sha512-Sum4U7/xWTJm99DeZF0bFBBN5SQ7roArlwnnKMmuRRcYl3s9/3OgtIK2YOOgqoSCxh4G51f7aal+bNAlAnx1bA== dependencies: - "@cspell/cspell-bundled-dicts" "^5.6.4" - "@cspell/cspell-types" "^5.6.4" + "@cspell/cspell-bundled-dicts" "^5.6.6" + "@cspell/cspell-types" "^5.6.5" clear-module "^4.1.1" comment-json "^4.1.0" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-glob "^5.6.4" - cspell-io "^5.6.4" - cspell-trie-lib "^5.6.4" + cspell-glob "^5.6.5" + cspell-io "^5.6.5" + cspell-trie-lib "^5.6.5" find-up "^5.0.0" fs-extra "^10.0.0" gensequence "^3.1.1" @@ -3661,25 +3661,25 @@ cspell-lib@^5.6.4: resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.6.4: - version "5.6.4" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.6.4.tgz#e737e842a05f6130141eb53e45802294db257dd3" - integrity sha512-5BFPqkRUZLk1OCUyHExUmHQTnrie4z1TMwXRk0Ur4nE7pZ90Mu7YrPnujyXt9RAo1Wh8REhTlQoZpN60wOrBJQ== +cspell-trie-lib@^5.6.5: + version "5.6.5" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.6.5.tgz#f0bbb998f62fd2122e1ab10a34ffd1bce9c03ab7" + integrity sha512-x4Ii8LwFp7tt+Ie+5R/a/qgYn43R5RwRfByn3taMy4D++PgF+vHTVZm1yORmUFBPTIT39gFbtkAJR7X0kdBL/w== dependencies: fs-extra "^10.0.0" gensequence "^3.1.1" cspell@^5.5.2: - version "5.6.4" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.6.4.tgz#572fc72669c5a4cad68553b6f8943f30060c2b52" - integrity sha512-pdOvCv5Cn3mN+NPk10hZDI8Y8TDqZq//9lMC9r31xJJCqcUvWHz0FLbiEzqBbUwQJJ2KaCDUcOybZAsaRiY27w== + version "5.6.6" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.6.6.tgz#b9af8535b1c5e0ec856d17c98e4b04128feca78b" + integrity sha512-4k3Jcz61mv5SQNjVcrWjARcEVa7gOF8nyg5MPU68AWPoyg5VuE51jgQDr4c01dbG/PGRLtrLwVmr+r6Kh5RDVA== dependencies: - "@cspell/cspell-types" "^5.6.4" + "@cspell/cspell-types" "^5.6.5" chalk "^4.1.1" commander "^7.2.0" comment-json "^4.1.0" - cspell-glob "^5.6.4" - cspell-lib "^5.6.4" + cspell-glob "^5.6.5" + cspell-lib "^5.6.6" fs-extra "^10.0.0" get-stdin "^8.0.0" glob "^7.1.7" From b362620ba248fde279aef98989aaecd243ba9d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sun, 1 Aug 2021 01:17:54 +0200 Subject: [PATCH 233/473] refactor(experimental-utils): simplify `eslint-utils`' predicate types in `ast-utils` even more (#3569) --- .../src/ast-utils/eslint-utils/predicates.ts | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts index 290afca90eb3..ad89e4730fcc 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts @@ -1,16 +1,20 @@ import * as eslintUtils from 'eslint-utils'; import { TSESTree } from '../../ts-estree'; -type IsPunctuatorTokenWithValueFunction = ( +type IsSpecificTokenFunction = ( token: TSESTree.Token, -) => token is TSESTree.PunctuatorToken & { value: Value }; +) => token is SpecificToken; -type IsNotPunctuatorTokenWithValueFunction = ( +type IsNotSpecificTokenFunction = ( token: TSESTree.Token, -) => token is Exclude< - TSESTree.Token, - TSESTree.PunctuatorToken & { value: Value } ->; +) => token is Exclude; + +type PunctuatorTokenWithValue = + TSESTree.PunctuatorToken & { value: Value }; +type IsPunctuatorTokenWithValueFunction = + IsSpecificTokenFunction>; +type IsNotPunctuatorTokenWithValueFunction = + IsNotSpecificTokenFunction>; const isArrowToken = eslintUtils.isArrowToken as IsPunctuatorTokenWithValueFunction<'=>'>; @@ -42,12 +46,10 @@ const isCommaToken = const isNotCommaToken = eslintUtils.isNotCommaToken as IsNotPunctuatorTokenWithValueFunction<','>; -const isCommentToken = eslintUtils.isCommentToken as ( - token: TSESTree.Token, -) => token is TSESTree.Comment; -const isNotCommentToken = eslintUtils.isNotCommentToken as ( - token: TSESTree.Token, -) => token is Exclude; +const isCommentToken = + eslintUtils.isCommentToken as IsSpecificTokenFunction; +const isNotCommentToken = + eslintUtils.isNotCommentToken as IsNotSpecificTokenFunction; const isOpeningBraceToken = eslintUtils.isOpeningBraceToken as IsPunctuatorTokenWithValueFunction<'{'>; From 3ef5267b850e1ffb7115e263e89a98c455fd2532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sun, 1 Aug 2021 01:19:22 +0200 Subject: [PATCH 234/473] fix(experimental-utils): simplify `eslint-utils`' `findVariable`'s signature in `ast-utils` (#3574) --- .../src/ast-utils/eslint-utils/scopeAnalysis.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/scopeAnalysis.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/scopeAnalysis.ts index 15f9325a582f..fa3efc70a772 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/scopeAnalysis.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/scopeAnalysis.ts @@ -9,7 +9,7 @@ import * as TSESLint from '../../ts-eslint'; */ const findVariable = eslintUtils.findVariable as ( initialScope: TSESLint.Scope.Scope, - name: string, + nameOrNode: string | TSESTree.Identifier, ) => TSESLint.Scope.Variable | null; /** From 18e30cb601ee4e990d6becdfb9d98ae8119b7919 Mon Sep 17 00:00:00 2001 From: Idan Attias Date: Sun, 1 Aug 2021 02:25:01 +0300 Subject: [PATCH 235/473] feat(eslint-plugin): [no-redeclare] ignoreDeclarationMerge of enum+namespace (#3572) --- .../eslint-plugin/docs/rules/no-redeclare.md | 1 + .../eslint-plugin/src/rules/no-redeclare.ts | 27 ++++++++++++++++++- .../tests/rules/no-redeclare.test.ts | 24 +++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/no-redeclare.md b/packages/eslint-plugin/docs/rules/no-redeclare.md index 4b5164d6f0e0..539e691cfb26 100644 --- a/packages/eslint-plugin/docs/rules/no-redeclare.md +++ b/packages/eslint-plugin/docs/rules/no-redeclare.md @@ -41,6 +41,7 @@ When set to `true`, the rule will ignore declaration merges between the followin - class + namespace - class + interface + namespace - function + namespace +- enum + namespace Examples of **correct** code with `{ ignoreDeclarationMerge: true }`: diff --git a/packages/eslint-plugin/src/rules/no-redeclare.ts b/packages/eslint-plugin/src/rules/no-redeclare.ts index 399966b16d2c..ae4b2e9a3f5a 100644 --- a/packages/eslint-plugin/src/rules/no-redeclare.ts +++ b/packages/eslint-plugin/src/rules/no-redeclare.ts @@ -63,6 +63,10 @@ export default util.createRule({ AST_NODE_TYPES.TSModuleDeclaration, AST_NODE_TYPES.FunctionDeclaration, ]); + const ENUM_DECLARATION_MERGE_NODES = new Set([ + AST_NODE_TYPES.TSEnumDeclaration, + AST_NODE_TYPES.TSModuleDeclaration, + ]); function* iterateDeclarations(variable: TSESLint.Scope.Variable): Generator< { @@ -164,12 +168,33 @@ export default util.createRule({ return; } - // there's more than one class declaration, which needs to be reported + // there's more than one function declaration, which needs to be reported for (const { identifier } of functionDecls) { yield { type: 'syntax', node: identifier, loc: identifier.loc }; } return; } + + if ( + // enum + namespace merging + identifiers.every(({ parent }) => + ENUM_DECLARATION_MERGE_NODES.has(parent.type), + ) + ) { + const enumDecls = identifiers.filter( + ({ parent }) => parent.type === AST_NODE_TYPES.TSEnumDeclaration, + ); + if (enumDecls.length === 1) { + // safe declaration merging + return; + } + + // there's more than one enum declaration, which needs to be reported + for (const { identifier } of enumDecls) { + yield { type: 'syntax', node: identifier, loc: identifier.loc }; + } + return; + } } for (const { identifier } of identifiers) { diff --git a/packages/eslint-plugin/tests/rules/no-redeclare.test.ts b/packages/eslint-plugin/tests/rules/no-redeclare.test.ts index f227c5ac8919..c371a738755e 100644 --- a/packages/eslint-plugin/tests/rules/no-redeclare.test.ts +++ b/packages/eslint-plugin/tests/rules/no-redeclare.test.ts @@ -122,6 +122,13 @@ namespace A {} code: ` interface A {} class A {} +namespace A {} + `, + options: [{ ignoreDeclarationMerge: true }], + }, + { + code: ` +enum A {} namespace A {} `, options: [{ ignoreDeclarationMerge: true }], @@ -605,6 +612,23 @@ class A {} }, { code: ` +enum A {} +namespace A {} +enum A {} + `, + options: [{ ignoreDeclarationMerge: true }], + errors: [ + { + messageId: 'redeclared', + data: { + id: 'A', + }, + line: 4, + }, + ], + }, + { + code: ` function A() {} class A {} namespace A {} From b595575ccef7bceb04c6317fb903f4bedeb19a69 Mon Sep 17 00:00:00 2001 From: alonstern Date: Sun, 1 Aug 2021 02:28:27 +0300 Subject: [PATCH 236/473] fix(eslint-plugin): [no-unnecessary-boolean-literal-compare] incorrect fix when condition is reversed (#3581) --- .../no-unnecessary-boolean-literal-compare.ts | 2 +- ...nnecessary-boolean-literal-compare.test.ts | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts b/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts index fe1fd24cc4f1..55719d857dab 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts @@ -186,7 +186,7 @@ export default util.createRule({ range: expression.range[0] < against.range[0] ? [expression.range[1], against.range[1]] - : [against.range[1], expression.range[1]], + : [against.range[0], expression.range[0]], }; } diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-boolean-literal-compare.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-boolean-literal-compare.test.ts index 36eb36033de1..7896fe00de88 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-boolean-literal-compare.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-boolean-literal-compare.test.ts @@ -224,5 +224,39 @@ ruleTester.run('no-unnecessary-boolean-literal-compare', rule, { } `, }, + { + code: ` + declare const varBoolean: boolean; + if (false !== varBoolean) { + } + `, + errors: [ + { + messageId: 'negated', + }, + ], + output: ` + declare const varBoolean: boolean; + if (varBoolean) { + } + `, + }, + { + code: ` + declare const varBoolean: boolean; + if (true !== varBoolean) { + } + `, + errors: [ + { + messageId: 'negated', + }, + ], + output: ` + declare const varBoolean: boolean; + if (!varBoolean) { + } + `, + }, ], }); From a6c5604b65b6330d047aa016fc46b8a597a6ae58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sun, 1 Aug 2021 01:28:50 +0200 Subject: [PATCH 237/473] feat(ast-spec): make `BaseNode` & `BaseToken` more type-safe (#3560) --- packages/ast-spec/src/base/BaseNode.ts | 21 +++++++------------ packages/ast-spec/src/base/BaseToken.ts | 6 ++++-- packages/ast-spec/src/base/NodeOrTokenData.ts | 17 +++++++++++++++ packages/ast-spec/src/index.ts | 2 +- .../experimental-utils/src/ts-eslint/Rule.ts | 4 ++-- packages/typescript-estree/src/convert.ts | 2 +- 6 files changed, 32 insertions(+), 20 deletions(-) create mode 100644 packages/ast-spec/src/base/NodeOrTokenData.ts diff --git a/packages/ast-spec/src/base/BaseNode.ts b/packages/ast-spec/src/base/BaseNode.ts index 362f156832b4..797b3d351320 100644 --- a/packages/ast-spec/src/base/BaseNode.ts +++ b/packages/ast-spec/src/base/BaseNode.ts @@ -1,22 +1,15 @@ // import type { Node } from '../unions/Node'; -import type { Range } from './Range'; -import type { SourceLocation } from './SourceLocation'; +import type { AST_NODE_TYPES } from '../ast-node-types'; +import type { NodeOrTokenData } from './NodeOrTokenData'; -export interface BaseNode { - /** - * The source location information of the node. - * @see {SourceLocation} - */ - loc: SourceLocation; - /** - * @see {Range} - */ - range: Range; +export interface BaseNode extends NodeOrTokenData { /** * The parent node of the current node + * + * This is added in the @typescript-eslint/types package as ESLint adds it + * while traversing. */ // parent?: Node; - // every node *will* have a type, but let the nodes define their own exact string - // type: string; + type: AST_NODE_TYPES; } diff --git a/packages/ast-spec/src/base/BaseToken.ts b/packages/ast-spec/src/base/BaseToken.ts index cdf0d1286438..8780cfcb9695 100644 --- a/packages/ast-spec/src/base/BaseToken.ts +++ b/packages/ast-spec/src/base/BaseToken.ts @@ -1,8 +1,10 @@ -import type { BaseNode } from './BaseNode'; +import type { AST_TOKEN_TYPES } from '../ast-token-types'; +import type { NodeOrTokenData } from './NodeOrTokenData'; /* * Token and Comment are pseudo-nodes to represent pieces of source code */ -export interface BaseToken extends BaseNode { +export interface BaseToken extends NodeOrTokenData { + type: AST_TOKEN_TYPES; value: string; } diff --git a/packages/ast-spec/src/base/NodeOrTokenData.ts b/packages/ast-spec/src/base/NodeOrTokenData.ts new file mode 100644 index 000000000000..8052278bbf02 --- /dev/null +++ b/packages/ast-spec/src/base/NodeOrTokenData.ts @@ -0,0 +1,17 @@ +import type { Range } from './Range'; +import type { SourceLocation } from './SourceLocation'; + +export interface NodeOrTokenData { + /** + * The source location information of the node. + * @see {SourceLocation} + */ + loc: SourceLocation; + + /** + * @see {Range} + */ + range: Range; + + type: string; +} diff --git a/packages/ast-spec/src/index.ts b/packages/ast-spec/src/index.ts index bd4b6584482d..c0dc09b70b0e 100644 --- a/packages/ast-spec/src/index.ts +++ b/packages/ast-spec/src/index.ts @@ -1,7 +1,7 @@ export * from './base/Accessibility'; export * from './base/BaseNode'; // this is exported so that the `types` package can merge the decl and add the `parent` property -export * from './base/OptionalRangeAndLoc'; export * from './base/LineAndColumnData'; +export * from './base/OptionalRangeAndLoc'; export * from './base/Range'; export * from './base/SourceLocation'; diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index 20a7735f08b6..139027372236 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -277,7 +277,7 @@ interface RuleListener { ClassDeclaration?: RuleFunction; ClassExpression?: RuleFunction; ClassProperty?: RuleFunction; - Comment?: RuleFunction; + // Comment?: RuleFunction; ConditionalExpression?: RuleFunction; ContinueStatement?: RuleFunction; DebuggerStatement?: RuleFunction; @@ -338,7 +338,7 @@ interface RuleListener { TemplateLiteral?: RuleFunction; ThisExpression?: RuleFunction; ThrowStatement?: RuleFunction; - Token?: RuleFunction; + // Token?: RuleFunction; TryStatement?: RuleFunction; TSAbstractClassProperty?: RuleFunction; TSAbstractKeyword?: RuleFunction; diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 567da9d88ca1..a49b15a5e533 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -199,7 +199,7 @@ export class Converter { */ private registerTSNodeInNodeMap( node: ts.Node, - result: TSESTree.BaseNode | null, + result: TSESTree.Node | null, ): void { if (result && this.options.shouldPreserveNodeMaps) { if (!this.tsNodeToESTreeNodeMap.has(node)) { From 6e9796fecbb85b9dc278e2c13c42009dde77b81c Mon Sep 17 00:00:00 2001 From: gfyoung Date: Sat, 31 Jul 2021 16:30:03 -0700 Subject: [PATCH 238/473] docs(eslint-plugin): [no-use-before-define] fix typo and outdated issue (#3592) --- packages/eslint-plugin/docs/rules/no-use-before-define.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/no-use-before-define.md b/packages/eslint-plugin/docs/rules/no-use-before-define.md index dfdab4d60f70..d7ec0aadd73b 100644 --- a/packages/eslint-plugin/docs/rules/no-use-before-define.md +++ b/packages/eslint-plugin/docs/rules/no-use-before-define.md @@ -1,7 +1,5 @@ # Disallow the use of variables before they are defined (`no-use-before-define`) -## PLEASE READ THIS ISSUE BEFORE USING THIS RULE [#1856](https://github.com/typescript-eslint/typescript-eslint/issues/1856) - ## Rule Details This rule extends the base [`eslint/no-use-before-define`](https://eslint.org/docs/rules/no-use-before-define) rule. @@ -42,10 +40,10 @@ const defaultOptions: Options = { If this is `true`, this rule warns every reference to a enum before the enum declaration. If this is `false`, this rule will ignore references to enums, when the reference is in a child scope. -Examples of **incorrect** code for the `{ "enums": false }` option: +Examples of **incorrect** code for the `{ "enums": true }` option: ```ts -/*eslint no-use-before-define: ["error", { "enums": false }]*/ +/*eslint no-use-before-define: ["error", { "enums": true }]*/ const x = Foo.FOO; From f5a6806ae4291f540eef73cd5c182c985c5059e7 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 1 Aug 2021 02:31:18 +0300 Subject: [PATCH 239/473] fix(eslint-plugin): [no-implied-eval] handle bind on nested member expressions (#3598) --- .../src/rules/no-implied-eval.ts | 12 ++++++----- .../tests/rules/no-implied-eval.test.ts | 20 +++++++++++++++++++ 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-implied-eval.ts b/packages/eslint-plugin/src/rules/no-implied-eval.ts index c7caf2d4bef4..4d3d645cb9e3 100644 --- a/packages/eslint-plugin/src/rules/no-implied-eval.ts +++ b/packages/eslint-plugin/src/rules/no-implied-eval.ts @@ -99,6 +99,12 @@ export default util.createRule({ return signatures.length > 0; } + function isBind(node: TSESTree.Node): boolean { + return node.type === AST_NODE_TYPES.MemberExpression + ? isBind(node.property) + : node.type === AST_NODE_TYPES.Identifier && node.name === 'bind'; + } + function isFunction(node: TSESTree.Node): boolean { switch (node.type) { case AST_NODE_TYPES.ArrowFunctionExpression: @@ -112,11 +118,7 @@ export default util.createRule({ return isFunctionType(node); case AST_NODE_TYPES.CallExpression: - return ( - (node.callee.type === AST_NODE_TYPES.Identifier && - node.callee.name === 'bind') || - isFunctionType(node) - ); + return isBind(node.callee) || isFunctionType(node); default: return false; diff --git a/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts b/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts index de619abbc8b5..5abb7406f577 100644 --- a/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts +++ b/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts @@ -257,6 +257,26 @@ const bar = () => {}; setTimeout(Math.radom() > 0.5 ? foo : bar, 0); `, + ` +class Foo { + func1() {} + func2(): void { + setTimeout(this.func1.bind(this), 1); + } +} + `, + ` +class Foo { + private a = { + b: { + c: function () {}, + }, + }; + funcw(): void { + setTimeout(this.a.b.c.bind(this), 1); + } +} + `, ], invalid: [ From 4a196b5818bb8557a7d3c5abae81fbd8021d9cb9 Mon Sep 17 00:00:00 2001 From: Michael Belousov Date: Sat, 31 Jul 2021 19:34:01 -0400 Subject: [PATCH 240/473] fix(eslint-plugin): [return-await] handle nested functions correctly (#3601) --- .../eslint-plugin/src/rules/return-await.ts | 26 ++++++--- .../tests/rules/return-await.test.ts | 53 +++++++++++++++++++ 2 files changed, 72 insertions(+), 7 deletions(-) diff --git a/packages/eslint-plugin/src/rules/return-await.ts b/packages/eslint-plugin/src/rules/return-await.ts index 85a2eebe1f58..c7dc42888b60 100644 --- a/packages/eslint-plugin/src/rules/return-await.ts +++ b/packages/eslint-plugin/src/rules/return-await.ts @@ -7,15 +7,16 @@ import * as tsutils from 'tsutils'; import * as ts from 'typescript'; import * as util from '../util'; -interface ScopeInfo { - hasAsync: boolean; -} - type FunctionNode = | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression; +interface ScopeInfo { + hasAsync: boolean; + owningFunc: FunctionNode; +} + export default util.createRule({ name: 'return-await', meta: { @@ -49,12 +50,17 @@ export default util.createRule({ const checker = parserServices.program.getTypeChecker(); const sourceCode = context.getSourceCode(); - let scopeInfo: ScopeInfo | null = null; + const scopeInfoStack: ScopeInfo[] = []; function enterFunction(node: FunctionNode): void { - scopeInfo = { + scopeInfoStack.push({ hasAsync: node.async, - }; + owningFunc: node, + }); + } + + function exitFunction(): void { + scopeInfoStack.pop(); } function inTry(node: ts.Node): boolean { @@ -263,6 +269,11 @@ export default util.createRule({ FunctionExpression: enterFunction, ArrowFunctionExpression: enterFunction, + 'FunctionDeclaration:exit': exitFunction, + 'FunctionExpression:exit': exitFunction, + 'ArrowFunctionExpression:exit': exitFunction, + + // executes after less specific handler, so exitFunction is called 'ArrowFunctionExpression[async = true]:exit'( node: TSESTree.ArrowFunctionExpression, ): void { @@ -274,6 +285,7 @@ export default util.createRule({ } }, ReturnStatement(node): void { + const scopeInfo = scopeInfoStack[scopeInfoStack.length - 1]; if (!scopeInfo || !scopeInfo.hasAsync || !node.argument) { return; } diff --git a/packages/eslint-plugin/tests/rules/return-await.test.ts b/packages/eslint-plugin/tests/rules/return-await.test.ts index 73056f6091c6..91f3a71157bb 100644 --- a/packages/eslint-plugin/tests/rules/return-await.test.ts +++ b/packages/eslint-plugin/tests/rules/return-await.test.ts @@ -232,6 +232,21 @@ ruleTester.run('return-await', rule, { } `, }, + { + code: ` + async function test() { + const res = await Promise.resolve('{}'); + try { + async function nested() { + return Promise.resolve('ok'); + } + return await nested(); + } catch (error) { + return await Promise.resolve('error'); + } + } + `, + }, ], invalid: [ { @@ -827,5 +842,43 @@ const buzz = async () => ((await foo()) ? 1 : await bar()); }, ], }, + { + code: ` + async function test() { + try { + const callback1 = function () {}; + const callback2 = async function () {}; + function callback3() {} + async function callback4() {} + const callback5 = () => {}; + const callback6 = async () => {}; + return Promise.resolve('try'); + } finally { + return Promise.resolve('finally'); + } + } + `, + output: ` + async function test() { + try { + const callback1 = function () {}; + const callback2 = async function () {}; + function callback3() {} + async function callback4() {} + const callback5 = () => {}; + const callback6 = async () => {}; + return await Promise.resolve('try'); + } finally { + return Promise.resolve('finally'); + } + } + `, + errors: [ + { + line: 10, + messageId: 'requiredPromiseAwait', + }, + ], + }, ], }); From 216cf829c632510a51e266a854404e8aaf07f30c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Jul 2021 16:39:37 -0700 Subject: [PATCH 241/473] chore: bump marked from 2.1.1 to 2.1.3 (#3589) Bumps [marked](https://github.com/markedjs/marked) from 2.1.1 to 2.1.3. - [Release notes](https://github.com/markedjs/marked/releases) - [Changelog](https://github.com/markedjs/marked/blob/master/release.config.js) - [Commits](https://github.com/markedjs/marked/compare/v2.1.1...v2.1.3) --- updated-dependencies: - dependency-name: marked dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2133d098ab89..80dc6704dc27 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3936,10 +3936,10 @@ didyoumean@^1.2.1: resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.1.tgz#e92edfdada6537d484d73c0172fd1eba0c4976ff" integrity sha1-6S7f2tplN9SE1zwBcv0eugxJdv8= -diff-sequences@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.1.tgz#9c9801d52ed5f576ff0a20e3022a13ee6e297e7c" - integrity sha512-XPLijkfJUh/PIBnfkcSHgvD6tlYixmcMAn3osTk6jt+H0v/mgURto1XUiD9DKuGX5NDoVS6dSlA23gd9FUaCFg== +diff-sequences@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.6.tgz#3305cb2e55a033924054695cc66019fd7f8e5723" + integrity sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ== diff@^4.0.1: version "4.0.2" @@ -6023,14 +6023,14 @@ jest-config@^27.0.4: pretty-format "^27.0.2" jest-diff@^26.0.0, jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.2.tgz#f315b87cee5dc134cf42c2708ab27375cc3f5a7e" - integrity sha512-BFIdRb0LqfV1hBt8crQmw6gGQHVDhM87SpMIZ45FPYKReZYG5er1+5pIn2zKqvrJp6WNox0ylR8571Iwk2Dmgw== + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.6.tgz#4a7a19ee6f04ad70e0e3388f35829394a44c7b5e" + integrity sha512-Z1mqgkTCSYaFgwTlP/NUiRzdqgxmmhzHY1Tq17zL94morOHfHu3K4bgSgl+CR4GLhpV8VxkuOYuIWnQ9LnFqmg== dependencies: chalk "^4.0.0" - diff-sequences "^27.0.1" - jest-get-type "^27.0.1" - pretty-format "^27.0.2" + diff-sequences "^27.0.6" + jest-get-type "^27.0.6" + pretty-format "^27.0.6" jest-docblock@^27.0.1: version "27.0.1" @@ -7291,9 +7291,9 @@ markdownlint@~0.23.1: markdown-it "12.0.4" marked@^2.0.6: - version "2.1.1" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.1.1.tgz#b7c27f520fc4de0ddd049d9b4be3b04e06314923" - integrity sha512-5XFS69o9CzDpQDSpUYC+AN2xvq8yl1EGa5SG/GI1hP78/uTeo3PDfiDNmsUyiahpyhToDDJhQk7fNtJsga+KVw== + version "2.1.3" + resolved "https://registry.yarnpkg.com/marked/-/marked-2.1.3.tgz#bd017cef6431724fd4b27e0657f5ceb14bff3753" + integrity sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA== mdurl@^1.0.1: version "1.0.1" @@ -8329,11 +8329,11 @@ prettier@2.3.2: integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== pretty-format@*, pretty-format@^26.0.0, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6: - version "27.0.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.2.tgz#9283ff8c4f581b186b2d4da461617143dca478a4" - integrity sha512-mXKbbBPnYTG7Yra9qFBtqj+IXcsvxsvOBco3QHxtxTl+hHKq6QdzMZ+q0CtL4ORHZgwGImRr2XZUX2EWzORxig== + version "27.0.6" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.6.tgz#ab770c47b2c6f893a21aefc57b75da63ef49a11f" + integrity sha512-8tGD7gBIENgzqA+UBzObyWqQ5B778VIFZA/S66cclyd5YkFLYs2Js7gxDKf0MXtTc9zcS7t1xhdfcElJ3YIvkQ== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" ansi-regex "^5.0.0" ansi-styles "^5.0.0" react-is "^17.0.1" From 9750c6f7d0059e2e8f79cd4d7ced5d6d24c90f4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Jul 2021 16:44:19 -0700 Subject: [PATCH 242/473] chore: bump @nrwl/tao from 12.6.0 to 12.6.3 (#3662) Bumps [@nrwl/tao](https://github.com/nrwl/nx) from 12.6.0 to 12.6.3. - [Release notes](https://github.com/nrwl/nx/releases) - [Commits](https://github.com/nrwl/nx/compare/12.6.0...12.6.3) --- updated-dependencies: - dependency-name: "@nrwl/tao" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a04cb34c3213..b1ca5dd38139 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "@commitlint/config-lerna-scopes": "^12.1.4", "@nrwl/cli": "12.6.0", "@nrwl/nx-cloud": "12.3.0", - "@nrwl/tao": "12.6.0", + "@nrwl/tao": "12.6.3", "@nrwl/workspace": "12.6.0", "@types/babel__code-frame": "^7.0.2", "@types/debug": "^4.1.5", diff --git a/yarn.lock b/yarn.lock index 80dc6704dc27..b08b6f957337 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1922,6 +1922,22 @@ tslib "^2.0.0" yargs-parser "20.0.0" +"@nrwl/tao@12.6.3": + version "12.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.6.3.tgz#3eee7eee4d18a0580eee30fe3e3df0193195bc07" + integrity sha512-KlVdQEyxi/mk0X9FBY6w72XouiMesD3FCCrqgKx5oShOx2GehuP+LhOOrfnuMOT7WgKBCoHnqhnK1x6X1F5/XQ== + dependencies: + chalk "4.1.0" + enquirer "~2.3.6" + fs-extra "^9.1.0" + jsonc-parser "3.0.0" + rxjs "^6.5.4" + rxjs-for-await "0.0.2" + semver "7.3.4" + tmp "~0.2.1" + tslib "^2.0.0" + yargs-parser "20.0.0" + "@nrwl/workspace@12.6.0": version "12.6.0" resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.6.0.tgz#101fda472268008ca64ac5478b95ae17735f93b4" From 93b8860eeb0059451b3eb5ee2f0b57dba6d9c290 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Jul 2021 17:18:50 -0700 Subject: [PATCH 243/473] chore: bump @microsoft/api-extractor from 7.16.1 to 7.18.4 (#3663) Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack) from 7.16.1 to 7.18.4. - [Release notes](https://github.com/microsoft/rushstack/releases) - [Commits](https://github.com/microsoft/rushstack/compare/@microsoft/api-extractor_v7.16.1...@microsoft/api-extractor_v7.18.4) --- updated-dependencies: - dependency-name: "@microsoft/api-extractor" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/yarn.lock b/yarn.lock index b08b6f957337..c9c527d78753 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1768,32 +1768,32 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@microsoft/api-extractor-model@7.13.3": - version "7.13.3" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.3.tgz#ac01c064c5af520d3661c85d7e5ef95e1ca8ab92" - integrity sha512-uXilAhu2GcvyY/0NwVRk3AN7TFYjkPnjHLV2UywTTz9uglS+Af0YjNrCy+aaK8qXtfbFWdBzkH9N2XU8/YBeRQ== +"@microsoft/api-extractor-model@7.13.4": + version "7.13.4" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.4.tgz#bff4a52a35da5d9896650041d4f7a769c970da60" + integrity sha512-NYaR3hJinh089/Gkee8fvmEFf9zKkoUvNxgkqUlKBCDXH2+Ou4tNDuL8G6zjhKBPicHkp2VcL8l7q9H6txUkjQ== dependencies: "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.39.0" + "@rushstack/node-core-library" "3.39.1" "@microsoft/api-extractor@^7.15.2": - version "7.16.1" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.16.1.tgz#7d5490a2ce1441ab8bc7bd6866a350cf580de0d0" - integrity sha512-hKFoLdmEUbHMIH48MXzSg8rndiugrXHruMVk+BQvhu14yX3LxH9re1CKwj4vLZb7bVBn+FfaWSZ5d3ltiXvX3w== + version "7.18.4" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.4.tgz#2d7641b36d323b4ac710d838a972be7e4f14d32b" + integrity sha512-Wx45VuIAu09Pk9Qwzt0I57OX31BaWO2r6+mfSXqYFsJjYTqwUkdFh92G1GKYgvuR9oF/ai7w10wrFpx5WZYbGg== dependencies: - "@microsoft/api-extractor-model" "7.13.3" + "@microsoft/api-extractor-model" "7.13.4" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.39.0" - "@rushstack/rig-package" "0.2.12" - "@rushstack/ts-command-line" "4.7.10" + "@rushstack/node-core-library" "3.39.1" + "@rushstack/rig-package" "0.2.13" + "@rushstack/ts-command-line" "4.8.1" colors "~1.2.1" lodash "~4.17.15" resolve "~1.17.0" semver "~7.3.0" source-map "~0.6.1" - typescript "~4.3.2" + typescript "~4.3.5" "@microsoft/tsdoc-config@~0.15.2": version "0.15.2" @@ -2075,10 +2075,10 @@ dependencies: "@types/node" ">= 8" -"@rushstack/node-core-library@3.39.0": - version "3.39.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.39.0.tgz#38928946d15ae89b773386cf97433d0d1ec83b93" - integrity sha512-kgu3+7/zOBkZU0+NdJb1rcHcpk3/oTjn5c8cg5nUTn+JDjEw58yG83SoeJEcRNNdl11dGX0lKG2PxPsjCokZOQ== +"@rushstack/node-core-library@3.39.1": + version "3.39.1" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.39.1.tgz#dd1dc270e3035ac4de270f0ca80c25724ce19cc7" + integrity sha512-HHgMEHZTXQ3NjpQzWd5+fSt2Eod9yFwj6qBPbaeaNtDNkOL8wbLoxVimQNtcH0Qhn4wxF5u2NTDNFsxf2yd1jw== dependencies: "@types/node" "10.17.13" colors "~1.2.1" @@ -2090,18 +2090,18 @@ timsort "~0.3.0" z-schema "~3.18.3" -"@rushstack/rig-package@0.2.12": - version "0.2.12" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.12.tgz#c434d62b28e0418a040938226f8913971d0424c7" - integrity sha512-nbePcvF8hQwv0ql9aeQxcaMPK/h1OLAC00W7fWCRWIvD2MchZOE8jumIIr66HGrfG2X1sw++m/ZYI4D+BM5ovQ== +"@rushstack/rig-package@0.2.13": + version "0.2.13" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.13.tgz#418f0aeb4c9b33bd8bd2547759fc0ae91fd970c7" + integrity sha512-qQMAFKvfb2ooaWU9DrGIK9d8QfyHy/HiuITJbWenlKgzcDXQvQgEduk57YF4Y7LLasDJ5ZzLaaXwlfX8qCRe5Q== dependencies: resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.7.10": - version "4.7.10" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.7.10.tgz#a2ec6efb1945b79b496671ce90eb1be4f1397d31" - integrity sha512-8t042g8eerypNOEcdpxwRA3uCmz0duMo21rG4Z2mdz7JxJeylDmzjlU3wDdef2t3P1Z61JCdZB6fbm1Mh0zi7w== +"@rushstack/ts-command-line@4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.8.1.tgz#c233a0226112338e58e7e4fd219247b4e7cec883" + integrity sha512-rmxvYdCNRbyRs+DYAPye3g6lkCkWHleqO40K8UPvUAzFqEuj6+YCVssBiOmrUDCoM5gaegSNT0wFDYhz24DWtw== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" @@ -9850,7 +9850,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.3.5, "typescript@>=3.3.1 <4.4.0", typescript@^4.1.0-dev.20201026, typescript@~4.3.2: +typescript@*, typescript@4.3.5, "typescript@>=3.3.1 <4.4.0", typescript@^4.1.0-dev.20201026, typescript@~4.3.5: version "4.3.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== From ddb11ac60c6590fef9be8c598128df861e300075 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Jul 2021 17:19:07 -0700 Subject: [PATCH 244/473] chore: bump @types/marked from 2.0.3 to 2.0.4 (#3654) Bumps [@types/marked](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/marked) from 2.0.3 to 2.0.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/marked) --- updated-dependencies: - dependency-name: "@types/marked" dependency-type: direct:development update-type: version-update:semver-patch ... 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 c9c527d78753..e599133f7b7c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2275,9 +2275,9 @@ integrity sha512-bpcvu/MKHHeYX+qeEN8GE7DIravODWdACVA1ctevD8CN24RhPZIKMn9ntfAsrvLfSX3cR5RrBKAbYm9bGs0A+Q== "@types/marked@*", "@types/marked@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.3.tgz#c8ea93684e530cc3b667d3e7226556dd0844ad1f" - integrity sha512-lbhSN1rht/tQ+dSWxawCzGgTfxe9DB31iLgiT1ZVT5lshpam/nyOA1m3tKHRoNPctB2ukSL22JZI5Fr+WI/zYg== + version "2.0.4" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.4.tgz#34a0ea548afe6e0c01095229d47b48b2af650613" + integrity sha512-L9VRSe0Id8xbPL99mUo/4aKgD7ZoRwFZqUQScNKHi2pFjF9ZYSMNShUHD6VlMT6J/prQq0T1mxuU25m3R7dFzg== "@types/minimatch@*": version "3.0.4" From 3db653276b97d79f9b0c93b48f4fd0b62d58f694 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 31 Jul 2021 20:20:11 -0400 Subject: [PATCH 245/473] chore: enabled no-unsafe-member-access internally (#3483) * chore: enabled no-unsafe-member-access internally * Update packages/scope-manager/tests/util/serializers/TSESTreeNode.ts Co-authored-by: Brad Zacher * fix: missing import * fix: one last lint disable * Update convert.ts * Update .eslintrc.js * Update .eslintrc.js Co-authored-by: Brad Zacher --- .eslintrc.js | 7 +++++-- packages/eslint-plugin/src/util/createRule.ts | 2 +- packages/experimental-utils/src/eslint-utils/RuleTester.ts | 2 +- packages/parser/src/index.ts | 2 +- .../scope-manager/tests/util/serializers/TSESTreeNode.ts | 4 ++-- packages/typescript-estree/src/convert.ts | 2 +- packages/typescript-estree/src/index.ts | 2 +- packages/typescript-estree/src/node-utils.ts | 3 +-- .../typescript-estree/src/semantic-or-syntactic-errors.ts | 2 +- packages/typescript-estree/src/simple-traverse.ts | 1 + packages/typescript-estree/tests/ast-alignment/parse.ts | 2 +- packages/typescript-estree/tests/ast-alignment/utils.ts | 2 +- packages/typescript-estree/typings/typescript.d.ts | 6 +++++- 13 files changed, 22 insertions(+), 15 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index e03f3106c93e..df695f85e94c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -65,7 +65,6 @@ module.exports = { ], // TODO - enable these new recommended rules - '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/restrict-template-expressions': 'off', // TODO - enable this '@typescript-eslint/naming-convention': 'off', @@ -163,8 +162,10 @@ module.exports = { // all test files { files: [ - 'packages/*/tests/**/*.test.ts', 'packages/*/tests/**/*.spec.ts', + 'packages/*/tests/**/*.test.ts', + 'packages/*/tests/**/spec.ts', + 'packages/*/tests/**/test.ts', 'packages/parser/tests/**/*.ts', ], env: { @@ -172,6 +173,7 @@ module.exports = { }, rules: { '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-return': 'off', 'eslint-plugin/no-identical-tests': 'error', 'jest/no-disabled-tests': 'warn', @@ -198,6 +200,7 @@ module.exports = { rules: { '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/restrict-plus-operands': 'off', }, diff --git a/packages/eslint-plugin/src/util/createRule.ts b/packages/eslint-plugin/src/util/createRule.ts index d56fe6d2a7d7..8e69adb95659 100644 --- a/packages/eslint-plugin/src/util/createRule.ts +++ b/packages/eslint-plugin/src/util/createRule.ts @@ -1,7 +1,7 @@ import { ESLintUtils } from '@typescript-eslint/experimental-utils'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access const version: string = require('../../package.json').version; export const createRule = ESLintUtils.RuleCreator( diff --git a/packages/experimental-utils/src/eslint-utils/RuleTester.ts b/packages/experimental-utils/src/eslint-utils/RuleTester.ts index a3210162e982..f2af7a290fd8 100644 --- a/packages/experimental-utils/src/eslint-utils/RuleTester.ts +++ b/packages/experimental-utils/src/eslint-utils/RuleTester.ts @@ -32,7 +32,7 @@ class RuleTester extends TSESLint.RuleTester { try { // instead of creating a hard dependency, just use a soft require // a bit weird, but if they're using this tooling, it'll be installed - // eslint-disable-next-line @typescript-eslint/no-unsafe-call + // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access require(parser).clearCaches(); } catch { // ignored diff --git a/packages/parser/src/index.ts b/packages/parser/src/index.ts index c1bb82bf5935..928671a3c5c1 100644 --- a/packages/parser/src/index.ts +++ b/packages/parser/src/index.ts @@ -6,5 +6,5 @@ export { } from '@typescript-eslint/typescript-estree'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access export const version: string = require('../package.json').version; diff --git a/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts b/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts index 3d57ab11d73e..8a75e729fd86 100644 --- a/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts +++ b/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts @@ -1,4 +1,4 @@ -import { AST_NODE_TYPES } from '@typescript-eslint/types'; +import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/types'; import { NewPlugin } from 'pretty-format'; import { createIdGenerator } from '../../../src/ID'; @@ -24,7 +24,7 @@ const serializer: NewPlugin = { // make sure it's not one of the classes from the package Object.getPrototypeOf(val) === Object.prototype && 'type' in val && - val.type in AST_NODE_TYPES + (val as TSESTree.Node).type in AST_NODE_TYPES ); }, serialize(node: Node): string { diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index a49b15a5e533..7f8514d8bc00 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1,5 +1,5 @@ // There's lots of funny stuff due to the typing of ts.Node -/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access */ import * as ts from 'typescript'; import { canContainDirective, diff --git a/packages/typescript-estree/src/index.ts b/packages/typescript-estree/src/index.ts index b2a0581dc926..5ed06629f17c 100644 --- a/packages/typescript-estree/src/index.ts +++ b/packages/typescript-estree/src/index.ts @@ -9,5 +9,5 @@ export { createProgramFromConfigFile as createProgram } from './create-program/u export { visitorKeys } from '@typescript-eslint/visitor-keys'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access export const version: string = require('../package.json').version; diff --git a/packages/typescript-estree/src/node-utils.ts b/packages/typescript-estree/src/node-utils.ts index 1969b6b2fb39..8c223ed650a2 100644 --- a/packages/typescript-estree/src/node-utils.ts +++ b/packages/typescript-estree/src/node-utils.ts @@ -632,8 +632,7 @@ export function nodeHasTokens(n: ts.Node, ast: ts.SourceFile): boolean { // If we have a token or node that has a non-zero width, it must have tokens. // Note: getWidth() does not take trivia into account. return n.kind === SyntaxKind.EndOfFileToken - ? // eslint-disable-next-line @typescript-eslint/no-explicit-any - !!(n as any).jsDoc + ? !!(n as ts.JSDocContainer).jsDoc : n.getWidth(ast) !== 0; } diff --git a/packages/typescript-estree/src/semantic-or-syntactic-errors.ts b/packages/typescript-estree/src/semantic-or-syntactic-errors.ts index 023d7e3faf8f..fab5cd642e09 100644 --- a/packages/typescript-estree/src/semantic-or-syntactic-errors.ts +++ b/packages/typescript-estree/src/semantic-or-syntactic-errors.ts @@ -45,7 +45,7 @@ export function getFirstSemanticOrSyntacticError( * and log a a warning. */ /* istanbul ignore next */ - console.warn(`Warning From TSC: "${e.message}`); // eslint-disable-line no-console + console.warn(`Warning From TSC: "${(e as Error).message}`); // eslint-disable-line no-console /* istanbul ignore next */ return undefined; } diff --git a/packages/typescript-estree/src/simple-traverse.ts b/packages/typescript-estree/src/simple-traverse.ts index 4d4ddaa5f187..f513e54b14f1 100644 --- a/packages/typescript-estree/src/simple-traverse.ts +++ b/packages/typescript-estree/src/simple-traverse.ts @@ -3,6 +3,7 @@ import { TSESTree } from './ts-estree'; // eslint-disable-next-line @typescript-eslint/no-explicit-any function isValidNode(x: any): x is TSESTree.Node { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access return x !== null && typeof x === 'object' && typeof x.type === 'string'; } diff --git a/packages/typescript-estree/tests/ast-alignment/parse.ts b/packages/typescript-estree/tests/ast-alignment/parse.ts index 0a643827f3e3..7a463d97256b 100644 --- a/packages/typescript-estree/tests/ast-alignment/parse.ts +++ b/packages/typescript-estree/tests/ast-alignment/parse.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */ import type babelParser from '@babel/parser'; import { ParserPlugin } from '@babel/parser'; diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index 34b318898c11..3cecac3f09f6 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -1,5 +1,5 @@ // babel types are something we don't really care about -/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/restrict-plus-operands */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-plus-operands */ import { AST_NODE_TYPES, TSESTree } from '../../src/ts-estree'; import { deeplyCopy, omitDeep } from '../../tools/test-utils'; import * as BabelTypes from '@babel/types'; diff --git a/packages/typescript-estree/typings/typescript.d.ts b/packages/typescript-estree/typings/typescript.d.ts index 73268ec90529..a247b2808841 100644 --- a/packages/typescript-estree/typings/typescript.d.ts +++ b/packages/typescript-estree/typings/typescript.d.ts @@ -1,9 +1,13 @@ import 'typescript'; +// these additions are marked as internal to typescript declare module 'typescript' { interface SourceFile { - // this is marked as internal to typescript externalModuleIndicator?: Node; parseDiagnostics: DiagnosticWithLocation[]; } + + interface JSDocContainer { + jsDoc?: JSDoc[]; + } } From 02998eac510665758b9a093d43afc310f3ac980d Mon Sep 17 00:00:00 2001 From: Alex Anthony Date: Sun, 1 Aug 2021 01:20:23 +0100 Subject: [PATCH 246/473] feat(eslint-plugin): Catch unused React import with new JSX transform (#3577) --- .../no-unused-vars/no-unused-vars.test.ts | 27 +++++++++++++++++++ packages/parser/README.md | 4 +-- packages/scope-manager/src/analyze.ts | 7 +++-- .../src/referencer/Referencer.ts | 6 ++--- packages/types/src/parser-options.ts | 2 +- 5 files changed, 38 insertions(+), 8 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts index e13dfc6f8496..fb7eadb47b71 100644 --- a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts @@ -1576,6 +1576,33 @@ export const ComponentFoo = () => { }, ], }, + // https://github.com/typescript-eslint/typescript-eslint/issues/3303 + { + code: ` +import React from 'react'; + +export const ComponentFoo = () => { + return
Foo Foo
; +}; + `, + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + jsxPragma: null, + }, + errors: [ + { + messageId: 'unusedVar', + line: 2, + data: { + varName: 'React', + action: 'defined', + additional: '', + }, + }, + ], + }, { code: ` declare module 'foo' { diff --git a/packages/parser/README.md b/packages/parser/README.md index 70ca5bf63d64..d76219e1ae9f 100644 --- a/packages/parser/README.md +++ b/packages/parser/README.md @@ -55,7 +55,7 @@ interface ParserOptions { }; ecmaVersion?: number; - jsxPragma?: string; + jsxPragma?: string | null; jsxFragmentName?: string | null; lib?: string[]; @@ -111,7 +111,7 @@ Specifies the version of ECMAScript syntax you want to use. This is used by the Default `'React'` The identifier that's used for JSX Elements creation (after transpilation). -If you're using a library other than React (like `preact`), then you should change this value. +If you're using a library other than React (like `preact`), then you should change this value. If you are using the [new JSX transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) you can set this to `null`. This should not be a member expression - just the root identifier (i.e. use `"React"` instead of `"React.createElement"`). diff --git a/packages/scope-manager/src/analyze.ts b/packages/scope-manager/src/analyze.ts index 1aaf874049fc..9845a3c17505 100644 --- a/packages/scope-manager/src/analyze.ts +++ b/packages/scope-manager/src/analyze.ts @@ -38,7 +38,7 @@ interface AnalyzeOptions { * This should not be a member expression - just the root identifier (i.e. use "React" instead of "React.createElement"). * Defaults to `"React"`. */ - jsxPragma?: string; + jsxPragma?: string | null; /** * The identifier that's used for JSX fragment elements (after transpilation). @@ -108,7 +108,10 @@ function analyze( globalReturn: providedOptions?.globalReturn ?? DEFAULT_OPTIONS.globalReturn, impliedStrict: providedOptions?.impliedStrict ?? DEFAULT_OPTIONS.impliedStrict, - jsxPragma: providedOptions?.jsxPragma ?? DEFAULT_OPTIONS.jsxPragma, + jsxPragma: + providedOptions?.jsxPragma === undefined + ? DEFAULT_OPTIONS.jsxPragma + : providedOptions.jsxPragma, jsxFragmentName: providedOptions?.jsxFragmentName ?? DEFAULT_OPTIONS.jsxFragmentName, sourceType: providedOptions?.sourceType ?? DEFAULT_OPTIONS.sourceType, diff --git a/packages/scope-manager/src/referencer/Referencer.ts b/packages/scope-manager/src/referencer/Referencer.ts index f35830e6acda..df4c318daddb 100644 --- a/packages/scope-manager/src/referencer/Referencer.ts +++ b/packages/scope-manager/src/referencer/Referencer.ts @@ -22,7 +22,7 @@ import { lib as TSLibraries } from '../lib'; import { Scope, GlobalScope } from '../scope'; interface ReferencerOptions extends VisitorOptions { - jsxPragma: string; + jsxPragma: string | null; jsxFragmentName: string | null; lib: Lib[]; emitDecoratorMetadata: boolean; @@ -30,7 +30,7 @@ interface ReferencerOptions extends VisitorOptions { // Referencing variables and creating bindings. class Referencer extends Visitor { - #jsxPragma: string; + #jsxPragma: string | null; #jsxFragmentName: string | null; #hasReferencedJsxFactory = false; #hasReferencedJsxFragmentFactory = false; @@ -120,7 +120,7 @@ class Referencer extends Visitor { } private referenceJsxPragma(): void { - if (this.#hasReferencedJsxFactory) { + if (this.#jsxPragma === null || this.#hasReferencedJsxFactory) { return; } this.#hasReferencedJsxFactory = this.referenceInSomeUpperScope( diff --git a/packages/types/src/parser-options.ts b/packages/types/src/parser-options.ts index 850086e1c5b7..9a761a37b97d 100644 --- a/packages/types/src/parser-options.ts +++ b/packages/types/src/parser-options.ts @@ -29,7 +29,7 @@ interface ParserOptions { ecmaVersion?: EcmaVersion; // scope-manager specific - jsxPragma?: string; + jsxPragma?: string | null; jsxFragmentName?: string | null; lib?: Lib[]; From 62bcc937f08cd18296ffbe96a3551ec1fb87aecd Mon Sep 17 00:00:00 2001 From: JounQin Date: Sun, 1 Aug 2021 08:20:40 +0800 Subject: [PATCH 247/473] fix(typescript-estree): correct tty check (#3635) --- packages/typescript-estree/src/parser.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index 3701a8862b31..69132424ba28 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -351,7 +351,8 @@ function applyParserOptionsToExtra(options: TSESTreeOptions): void { function warnAboutTSVersion(): void { if (!isRunningSupportedTypeScriptVersion && !warnedAboutTSVersion) { - const isTTY = typeof process === undefined ? false : process.stdout?.isTTY; + const isTTY = + typeof process === 'undefined' ? false : process.stdout?.isTTY; if (isTTY) { const border = '============='; const versionWarning = [ From ca7c549426d885ecb43cc8fe99518e58041ad152 Mon Sep 17 00:00:00 2001 From: Joe Stein Date: Sat, 31 Jul 2021 20:23:02 -0400 Subject: [PATCH 248/473] fix(eslint-plugin): [no-implied-eval] permit more expression types (#3624) --- .../eslint-plugin/src/rules/no-implied-eval.ts | 9 ++++----- .../tests/rules/no-implied-eval.test.ts | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-implied-eval.ts b/packages/eslint-plugin/src/rules/no-implied-eval.ts index 4d3d645cb9e3..34b1c70b16d0 100644 --- a/packages/eslint-plugin/src/rules/no-implied-eval.ts +++ b/packages/eslint-plugin/src/rules/no-implied-eval.ts @@ -112,16 +112,15 @@ export default util.createRule({ case AST_NODE_TYPES.FunctionExpression: return true; - case AST_NODE_TYPES.MemberExpression: - case AST_NODE_TYPES.Identifier: - case AST_NODE_TYPES.ConditionalExpression: - return isFunctionType(node); + case AST_NODE_TYPES.Literal: + case AST_NODE_TYPES.TemplateLiteral: + return false; case AST_NODE_TYPES.CallExpression: return isBind(node.callee) || isFunctionType(node); default: - return false; + return isFunctionType(node); } } diff --git a/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts b/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts index 5abb7406f577..c789bd311211 100644 --- a/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts +++ b/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts @@ -256,6 +256,7 @@ const foo = () => {}; const bar = () => {}; setTimeout(Math.radom() > 0.5 ? foo : bar, 0); +setTimeout(foo || bar, 500); `, ` class Foo { @@ -816,6 +817,21 @@ globalThis['execScript'](\`\`); }, ], }, + { + code: ` +const foo: string | undefined = 'hello'; +const bar = () => {}; + +setTimeout(foo || bar, 500); + `, + errors: [ + { + messageId: 'noImpliedEvalError', + line: 5, + column: 12, + }, + ], + }, { code: 'const fn = Function();', errors: [ From 6eeb13c6ad073f34a968db8c0dcb760b2f1b3857 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Jul 2021 18:04:34 -0700 Subject: [PATCH 249/473] chore: bump lint-staged from 11.0.0 to 11.1.1 (#3670) Bumps [lint-staged](https://github.com/okonet/lint-staged) from 11.0.0 to 11.1.1. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](https://github.com/okonet/lint-staged/compare/v11.0.0...v11.1.1) --- updated-dependencies: - dependency-name: lint-staged dependency-type: direct:development update-type: version-update:semver-minor ... 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 e599133f7b7c..d3ed1d07554f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6953,9 +6953,9 @@ linkify-it@^3.0.1: uc.micro "^1.0.1" lint-staged@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.0.0.tgz#24d0a95aa316ba28e257f5c4613369a75a10c712" - integrity sha512-3rsRIoyaE8IphSUtO1RVTFl1e0SLBtxxUOPBtHxQgBHS5/i6nqvjcUfNioMa4BU9yGnPzbO+xkfLtXtxBpCzjw== + version "11.1.1" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.1.1.tgz#9c2018b872654cf80b2b1ff5a10b6b74aef6e300" + integrity sha512-eTNGe6i78PSUUH2BZi1gZmGmNfb8IeN4z2OzMYxSZ1qnP1WXKn1E7D+OHwLbRDm/wQINnzIj0bsKJ6lLVSuZiQ== dependencies: chalk "^4.1.1" cli-truncate "^2.1.0" From 0c72b178fe537cd23801f5d0f6fe5bac3892a3bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Jul 2021 18:04:42 -0700 Subject: [PATCH 250/473] chore: bump @types/semver from 7.3.6 to 7.3.8 (#3669) Bumps [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) from 7.3.6 to 7.3.8. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver) --- updated-dependencies: - dependency-name: "@types/semver" dependency-type: direct:development update-type: version-update:semver-patch ... 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 d3ed1d07554f..5fab27a0d394 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2326,9 +2326,9 @@ "@types/node" "*" "@types/semver@*", "@types/semver@^7.3.6": - version "7.3.6" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.6.tgz#e9831776f4512a7ba6da53e71c26e5fb67882d63" - integrity sha512-0caWDWmpCp0uifxFh+FaqK3CuZ2SkRR/ZRxAV5+zNdC3QVUi6wyOJnefhPvtNt8NQWXB5OA93BUvZsXpWat2Xw== + version "7.3.8" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.8.tgz#508a27995498d7586dcecd77c25e289bfaf90c59" + integrity sha512-D/2EJvAlCEtYFEYmmlGwbGXuK886HzyCc3nZX/tkFTQdEU8jZDAgiv08P162yB17y4ZXZoq7yFAnW4GDBb9Now== "@types/stack-utils@^2.0.0": version "2.0.0" From b806487a76c7b02decdfbf17ca3972fc8369c9ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Jul 2021 18:04:49 -0700 Subject: [PATCH 251/473] chore: bump @types/prettier from 2.3.0 to 2.3.2 (#3668) Bumps [@types/prettier](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/prettier) from 2.3.0 to 2.3.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/prettier) --- updated-dependencies: - dependency-name: "@types/prettier" dependency-type: direct:production update-type: version-update:semver-patch ... 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 5fab27a0d394..2f6926baea56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2313,9 +2313,9 @@ integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== "@types/prettier@*", "@types/prettier@^2.1.5", "@types/prettier@^2.2.3": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.0.tgz#2e8332cc7363f887d32ec5496b207d26ba8052bb" - integrity sha512-hkc1DATxFLQo4VxPDpMH1gCkPpBbpOoJ/4nhuXw4n63/0R6bCpQECj4+K226UJ4JO/eJQz+1mC2I7JsWanAdQw== + version "2.3.2" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.2.tgz#fc8c2825e4ed2142473b4a81064e6e081463d1b3" + integrity sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog== "@types/rimraf@^3.0.0": version "3.0.0" From 635e6cc7f1039f992bc250a68fe32d40008958a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Jul 2021 18:04:57 -0700 Subject: [PATCH 252/473] chore: bump @types/babel__code-frame from 7.0.2 to 7.0.3 (#3666) Bumps [@types/babel__code-frame](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/babel__code-frame) from 7.0.2 to 7.0.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/babel__code-frame) --- updated-dependencies: - dependency-name: "@types/babel__code-frame" dependency-type: direct:development update-type: version-update:semver-patch ... 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 2f6926baea56..a9e2e68e91fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2153,9 +2153,9 @@ integrity sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== "@types/babel__code-frame@*", "@types/babel__code-frame@^7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@types/babel__code-frame/-/babel__code-frame-7.0.2.tgz#e0c0f1648cbc09a9d4e5b4ed2ae9a6f7c8f5aeb0" - integrity sha512-imO+jT/yjOKOAS5GQZ8SDtwiIloAGGr6OaZDKB0V5JVaSfGZLat5K5/ZRtyKW6R60XHV3RHYPTFfhYb+wDKyKg== + version "7.0.3" + resolved "https://registry.yarnpkg.com/@types/babel__code-frame/-/babel__code-frame-7.0.3.tgz#eda94e1b7c9326700a4b69c485ebbc9498a0b63f" + integrity sha512-2TN6oiwtNjOezilFVl77zwdNPwQWaDBBCCWWxyo1ctiO3vAtd7H/aB/CBJdw9+kqq3+latD0SXoedIuHySSZWw== "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": version "7.1.14" From da3511dc16a16cc95ac7588b179642293a258149 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Jul 2021 18:05:05 -0700 Subject: [PATCH 253/473] chore: bump @commitlint/cli from 12.1.4 to 13.1.0 (#3665) Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint) from 12.1.4 to 13.1.0. - [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.1.4...v13.1.0) --- updated-dependencies: - dependency-name: "@commitlint/cli" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 188 +++++++++++++++++++++++++++------------------------ 2 files changed, 102 insertions(+), 88 deletions(-) diff --git a/package.json b/package.json index b1ca5dd38139..7febd975e4f5 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "@babel/code-frame": "^7.12.13", "@babel/parser": "^7.14.6", "@babel/types": "^7.14.4", - "@commitlint/cli": "^12.1.4", + "@commitlint/cli": "^13.1.0", "@commitlint/config-conventional": "^12.1.4", "@commitlint/config-lerna-scopes": "^12.1.4", "@nrwl/cli": "12.6.0", diff --git a/yarn.lock b/yarn.lock index a9e2e68e91fb..ba771bba7d2e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -313,20 +313,20 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@commitlint/cli@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-12.1.4.tgz#af4d9dd3c0122c7b39a61fa1cd2abbad0422dbe0" - integrity sha512-ZR1WjXLvqEffYyBPT0XdnSxtt3Ty1TMoujEtseW5o3vPnkA1UNashAMjQVg/oELqfaiAMnDw8SERPMN0e/0kLg== - dependencies: - "@commitlint/format" "^12.1.4" - "@commitlint/lint" "^12.1.4" - "@commitlint/load" "^12.1.4" - "@commitlint/read" "^12.1.4" - "@commitlint/types" "^12.1.4" +"@commitlint/cli@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-13.1.0.tgz#3608bb24dbef41aaa0729ffe65c7f9b57409626a" + integrity sha512-xN/uNYWtGTva5OMSd+xA6e6/c2jk8av7MUbdd6w2cw89u6z3fAWoyiH87X0ewdSMNYmW/6B3L/2dIVGHRDID5w== + dependencies: + "@commitlint/format" "^13.1.0" + "@commitlint/lint" "^13.1.0" + "@commitlint/load" "^13.1.0" + "@commitlint/read" "^13.1.0" + "@commitlint/types" "^13.1.0" lodash "^4.17.19" resolve-from "5.0.0" resolve-global "1.0.0" - yargs "^16.2.0" + yargs "^17.0.0" "@commitlint/config-conventional@^12.1.4": version "12.1.4" @@ -345,118 +345,119 @@ resolve-pkg "2.0.0" semver "7.3.5" -"@commitlint/ensure@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-12.1.4.tgz#287ae2dcc5ccb086e749705b1bd9bdb99773056f" - integrity sha512-MxHIBuAG9M4xl33qUfIeMSasbv3ktK0W+iygldBxZOL4QSYC2Gn66pZAQMnV9o3V+sVFHoAK2XUKqBAYrgbEqw== +"@commitlint/ensure@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-13.1.0.tgz#057a325b54f104cbeed2a26bacb5eec29298e7d5" + integrity sha512-NRGyjOdZQnlYwm9it//BZJ2Vm+4x7G9rEnHpLCvNKYY0c6RA8Qf7hamLAB8dWO12RLuFt06JaOpHZoTt/gHutA== dependencies: - "@commitlint/types" "^12.1.4" + "@commitlint/types" "^13.1.0" lodash "^4.17.19" -"@commitlint/execute-rule@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-12.1.4.tgz#9973b02e9779adbf1522ae9ac207a4815ec73de1" - integrity sha512-h2S1j8SXyNeABb27q2Ok2vD1WfxJiXvOttKuRA9Or7LN6OQoC/KtT3844CIhhWNteNMu/wE0gkTqGxDVAnJiHg== +"@commitlint/execute-rule@^13.0.0": + version "13.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-13.0.0.tgz#7823303b82b5d86dac46e67cfa005f4433476981" + integrity sha512-lBz2bJhNAgkkU/rFMAw3XBNujbxhxlaFHY3lfKB/MxpAa+pIfmWB3ig9i1VKe0wCvujk02O0WiMleNaRn2KJqw== -"@commitlint/format@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-12.1.4.tgz#db2d46418a6ae57c90e5f7f65dff46f0265d9f24" - integrity sha512-h28ucMaoRjVvvgS6Bdf85fa/+ZZ/iu1aeWGCpURnQV7/rrVjkhNSjZwGlCOUd5kDV1EnZ5XdI7L18SUpRjs26g== +"@commitlint/format@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-13.1.0.tgz#915570d958d83bae5fa645de6b1e6c9dd1362ec0" + integrity sha512-n46rYvzf+6Sm99TJjTLjJBkjm6JVcklt31lDO5Q+pCIV0NnJ4qIUcwa6wIL9a9Vqb1XzlMgtp27E0zyYArkvSg== dependencies: - "@commitlint/types" "^12.1.4" + "@commitlint/types" "^13.1.0" chalk "^4.0.0" -"@commitlint/is-ignored@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-12.1.4.tgz#4c430bc3b361aa9be5cd4ddb252c1559870ea7bc" - integrity sha512-uTu2jQU2SKvtIRVLOzMQo3KxDtO+iJ1p0olmncwrqy4AfPLgwoyCP2CiULq5M7xpR3+dE3hBlZXbZTQbD7ycIw== +"@commitlint/is-ignored@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-13.1.0.tgz#88a5dfbc8f9ea91e860323af6681aa131322b0c4" + integrity sha512-P6zenLE5Tn3FTNjRzmL9+/KooTXEI0khA2TmUbuei9KiycemeO4q7Xk7w7aXwFPNAbN0O9oI7z3z7cFpzKJWmQ== dependencies: - "@commitlint/types" "^12.1.4" + "@commitlint/types" "^13.1.0" semver "7.3.5" -"@commitlint/lint@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-12.1.4.tgz#856b7fd2b2e6367b836cb84a12f1c1b3c0e40d22" - integrity sha512-1kZ8YDp4to47oIPFELUFGLiLumtPNKJigPFDuHt2+f3Q3IKdQ0uk53n3CPl4uoyso/Og/EZvb1mXjFR/Yce4cA== +"@commitlint/lint@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-13.1.0.tgz#ea56ce0970f9b75ffe7bd2c9968f4f1d4461ba3a" + integrity sha512-qH9AYSQDDTaSWSdtOvB3G1RdPpcYSgddAdFYqpFewlKQ1GJj/L+sM7vwqCG7/ip6AiM04Sry1sgmFzaEoFREUA== dependencies: - "@commitlint/is-ignored" "^12.1.4" - "@commitlint/parse" "^12.1.4" - "@commitlint/rules" "^12.1.4" - "@commitlint/types" "^12.1.4" + "@commitlint/is-ignored" "^13.1.0" + "@commitlint/parse" "^13.1.0" + "@commitlint/rules" "^13.1.0" + "@commitlint/types" "^13.1.0" -"@commitlint/load@>6.1.1", "@commitlint/load@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-12.1.4.tgz#e3c2dbc0e7d8d928f57a6878bd7219909fc0acab" - integrity sha512-Keszi0IOjRzKfxT+qES/n+KZyLrxy79RQz8wWgssCboYjKEp+wC+fLCgbiMCYjI5k31CIzIOq/16J7Ycr0C0EA== +"@commitlint/load@>6.1.1", "@commitlint/load@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-13.1.0.tgz#d6c9b547551f2216586d6c1964d93f92e7b04277" + integrity sha512-zlZbjJCWnWmBOSwTXis8H7I6pYk6JbDwOCuARA6B9Y/qt2PD+NCo0E/7EuaaFoxjHl+o56QR5QttuMBrf+BJzg== dependencies: - "@commitlint/execute-rule" "^12.1.4" - "@commitlint/resolve-extends" "^12.1.4" - "@commitlint/types" "^12.1.4" + "@commitlint/execute-rule" "^13.0.0" + "@commitlint/resolve-extends" "^13.0.0" + "@commitlint/types" "^13.1.0" chalk "^4.0.0" cosmiconfig "^7.0.0" lodash "^4.17.19" resolve-from "^5.0.0" -"@commitlint/message@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-12.1.4.tgz#3895edcc0709deca5945f3d55f5ea95a9f1f446d" - integrity sha512-6QhalEKsKQ/Y16/cTk5NH4iByz26fqws2ub+AinHPtM7Io0jy4e3rym9iE+TkEqiqWZlUigZnTwbPvRJeSUBaA== +"@commitlint/message@^13.0.0": + version "13.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-13.0.0.tgz#4f8d56b59e9cee8b37b8db6b48c26d7faf33762f" + integrity sha512-W/pxhesVEk8747BEWJ+VGQ9ILHmCV27/pEwJ0hGny1wqVquUR8SxvScRCbUjHCB1YtWX4dEnOPXOS9CLH/CX7A== -"@commitlint/parse@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-12.1.4.tgz#ba03d54d24ef84f6fd2ff31c5e9998b22d7d0aa1" - integrity sha512-yqKSAsK2V4X/HaLb/yYdrzs6oD/G48Ilt0EJ2Mp6RJeWYxG14w/Out6JrneWnr/cpzemyN5hExOg6+TB19H/Lw== +"@commitlint/parse@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-13.1.0.tgz#b88764be36527a468531e1b8dd2d95693ff9ba34" + integrity sha512-xFybZcqBiKVjt6vTStvQkySWEUYPI0AcO4QQELyy29o8EzYZqWkhUfrb7K61fWiHsplWL1iL6F3qCLoxSgTcrg== dependencies: - "@commitlint/types" "^12.1.4" + "@commitlint/types" "^13.1.0" conventional-changelog-angular "^5.0.11" conventional-commits-parser "^3.0.0" -"@commitlint/read@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-12.1.4.tgz#552fda42ef185d5b578beb6f626a5f8b282de3a6" - integrity sha512-TnPQSJgD8Aod5Xeo9W4SaYKRZmIahukjcCWJ2s5zb3ZYSmj6C85YD9cR5vlRyrZjj78ItLUV/X4FMWWVIS38Jg== +"@commitlint/read@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-13.1.0.tgz#ccb65426b1228b8a598ed36966722d19756eea41" + integrity sha512-NrVe23GMKyL6i1yDJD8IpqCBzhzoS3wtLfDj8QBzc01Ov1cYBmDojzvBklypGb+MLJM1NbzmRM4PR5pNX0U/NQ== dependencies: - "@commitlint/top-level" "^12.1.4" - "@commitlint/types" "^12.1.4" - fs-extra "^9.0.0" + "@commitlint/top-level" "^13.0.0" + "@commitlint/types" "^13.1.0" + fs-extra "^10.0.0" git-raw-commits "^2.0.0" -"@commitlint/resolve-extends@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-12.1.4.tgz#e758ed7dcdf942618b9f603a7c28a640f6a0802a" - integrity sha512-R9CoUtsXLd6KSCfsZly04grsH6JVnWFmVtWgWs1KdDpdV+G3TSs37tColMFqglpkx3dsWu8dsPD56+D9YnJfqg== +"@commitlint/resolve-extends@^13.0.0": + version "13.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-13.0.0.tgz#a38fcd2474483bf9ec6e1e901b27b8a23abe7d73" + integrity sha512-1SyaE+UOsYTkQlTPUOoj4NwxQhGFtYildVS/d0TJuK8a9uAJLw7bhCLH2PEeH5cC2D1do4Eqhx/3bLDrSLH3hg== dependencies: import-fresh "^3.0.0" lodash "^4.17.19" resolve-from "^5.0.0" resolve-global "^1.0.0" -"@commitlint/rules@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-12.1.4.tgz#0e141b08caa3d7bdc48aa784baa8baff3efd64db" - integrity sha512-W8m6ZSjg7RuIsIfzQiFHa48X5mcPXeKT9yjBxVmjHvYfS2FDBf1VxCQ7vO0JTVIdV4ohjZ0eKg/wxxUuZHJAZg== +"@commitlint/rules@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-13.1.0.tgz#04f5aaf952884364ebf4e899ec440e3985f0e580" + integrity sha512-b6F+vBqEXsHVghrhomG0Y6YJimHZqkzZ0n5QEpk03dpBXH2OnsezpTw5e+GvbyYCc7PutGbYVQkytuv+7xCxYA== dependencies: - "@commitlint/ensure" "^12.1.4" - "@commitlint/message" "^12.1.4" - "@commitlint/to-lines" "^12.1.4" - "@commitlint/types" "^12.1.4" + "@commitlint/ensure" "^13.1.0" + "@commitlint/message" "^13.0.0" + "@commitlint/to-lines" "^13.0.0" + "@commitlint/types" "^13.1.0" + execa "^5.0.0" -"@commitlint/to-lines@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-12.1.4.tgz#caa582dbf121f377a0588bb64e25c4854843cd25" - integrity sha512-TParumvbi8bdx3EdLXz2MaX+e15ZgoCqNUgqHsRLwyqLUTRbqCVkzrfadG1UcMQk8/d5aMbb327ZKG3Q4BRorw== +"@commitlint/to-lines@^13.0.0": + version "13.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-13.0.0.tgz#5937dd287e3a4f984580ea94bdb994132169a780" + integrity sha512-mzxWwCio1M4/kG9/69TTYqrraQ66LmtJCYTzAZdZ2eJX3I5w52pSjyP/DJzAUVmmJCYf2Kw3s+RtNVShtnZ+Rw== -"@commitlint/top-level@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-12.1.4.tgz#96d5c715bfc1bdf86dfcf11b67fc2cf7658c7a6e" - integrity sha512-d4lTJrOT/dXlpY+NIt4CUl77ciEzYeNVc0VFgUQ6VA+b1rqYD2/VWFjBlWVOrklxtSDeKyuEhs36RGrppEFAvg== +"@commitlint/top-level@^13.0.0": + version "13.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-13.0.0.tgz#f8e1d1425240cd72c600e4da5716418c4ea0bda2" + integrity sha512-baBy3MZBF28sR93yFezd4a5TdHsbXaakeladfHK9dOcGdXo9oQe3GS5hP3BmlN680D6AiQSN7QPgEJgrNUWUCg== dependencies: find-up "^5.0.0" -"@commitlint/types@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-12.1.4.tgz#9618a5dc8991fb58e6de6ed89d7bf712fa74ba7e" - integrity sha512-KRIjdnWNUx6ywz+SJvjmNCbQKcKP6KArhjZhY2l+CWKxak0d77SOjggkMwFTiSgLODOwmuLTbarR2ZfWPiPMlw== +"@commitlint/types@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-13.1.0.tgz#12cfb6e932372b1816af8900e2d10694add28191" + integrity sha512-zcVjuT+OfKt8h91vhBxt05RMcTGEx6DM7Q9QZeuMbXFk6xgbsSEDMMapbJPA1bCZ81fa/1OQBijSYPrKvtt06g== dependencies: chalk "^4.0.0" @@ -4773,7 +4774,7 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^9.0.0, fs-extra@^9.1.0: +fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== @@ -10372,7 +10373,7 @@ yargs@^14.2.2: y18n "^4.0.0" yargs-parser "^15.0.1" -yargs@^16.0.3, yargs@^16.2.0: +yargs@^16.0.3: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== @@ -10385,6 +10386,19 @@ yargs@^16.0.3, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yargs@^17.0.0: + version "17.0.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.0.1.tgz#6a1ced4ed5ee0b388010ba9fd67af83b9362e0bb" + integrity sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" From 00a436986ceb2520fdeb7efed9ad8b2d866700b7 Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Sat, 31 Jul 2021 22:05:40 -0300 Subject: [PATCH 254/473] fix(eslint-plugin): [return-await] properly handle fixes for `TSAsExpression` (#3631) --- .../eslint-plugin/src/rules/return-await.ts | 11 +++++-- .../tests/rules/return-await.test.ts | 29 +++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/src/rules/return-await.ts b/packages/eslint-plugin/src/rules/return-await.ts index c7dc42888b60..940dfe94023f 100644 --- a/packages/eslint-plugin/src/rules/return-await.ts +++ b/packages/eslint-plugin/src/rules/return-await.ts @@ -153,8 +153,15 @@ export default util.createRule({ function insertAwait( fixer: TSESLint.RuleFixer, node: TSESTree.Expression, - ): TSESLint.RuleFix | null { - return fixer.insertTextBefore(node, 'await '); + ): TSESLint.RuleFix | TSESLint.RuleFix[] { + if (node.type !== AST_NODE_TYPES.TSAsExpression) { + return fixer.insertTextBefore(node, 'await '); + } + + return [ + fixer.insertTextBefore(node, 'await ('), + fixer.insertTextAfter(node, ')'), + ]; } function test(node: TSESTree.Expression, expression: ts.Node): void { diff --git a/packages/eslint-plugin/tests/rules/return-await.test.ts b/packages/eslint-plugin/tests/rules/return-await.test.ts index 91f3a71157bb..1c0a9cdd2a13 100644 --- a/packages/eslint-plugin/tests/rules/return-await.test.ts +++ b/packages/eslint-plugin/tests/rules/return-await.test.ts @@ -842,6 +842,35 @@ const buzz = async () => ((await foo()) ? 1 : await bar()); }, ], }, + { + // https://github.com/typescript-eslint/typescript-eslint/issues/2109 + code: ` +async function test(): Promise { + const res = await fetch('...'); + try { + return res.json() as Promise; + } catch (err) { + throw Error('Request Failed.'); + } +} + `, + output: ` +async function test(): Promise { + const res = await fetch('...'); + try { + return await (res.json() as Promise); + } catch (err) { + throw Error('Request Failed.'); + } +} + `, + errors: [ + { + line: 5, + messageId: 'requiredPromiseAwait', + }, + ], + }, { code: ` async function test() { From 0bb878b5306c7a946e856d7a3f6f0ac04646fe20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sun, 1 Aug 2021 03:05:53 +0200 Subject: [PATCH 255/473] chore(experimental-utils): remove commented out `RuleListener`s (#3667) --- packages/experimental-utils/src/ts-eslint/Rule.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index 139027372236..f813b9d17309 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -277,7 +277,6 @@ interface RuleListener { ClassDeclaration?: RuleFunction; ClassExpression?: RuleFunction; ClassProperty?: RuleFunction; - // Comment?: RuleFunction; ConditionalExpression?: RuleFunction; ContinueStatement?: RuleFunction; DebuggerStatement?: RuleFunction; @@ -338,7 +337,6 @@ interface RuleListener { TemplateLiteral?: RuleFunction; ThisExpression?: RuleFunction; ThrowStatement?: RuleFunction; - // Token?: RuleFunction; TryStatement?: RuleFunction; TSAbstractClassProperty?: RuleFunction; TSAbstractKeyword?: RuleFunction; From 2c2dcb61605d3c1ba5916e585e8c916a37ef1b0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 00:30:29 -0700 Subject: [PATCH 256/473] chore: bump @babel/types from 7.14.5 to 7.14.8 (#3672) Bumps [@babel/types](https://github.com/babel/babel/tree/HEAD/packages/babel-types) from 7.14.5 to 7.14.8. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.8/packages/babel-types) --- updated-dependencies: - dependency-name: "@babel/types" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index ba771bba7d2e..396d61189974 100644 --- a/yarn.lock +++ b/yarn.lock @@ -141,10 +141,10 @@ dependencies: "@babel/types" "^7.12.13" -"@babel/helper-validator-identifier@^7.14.0", "@babel/helper-validator-identifier@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" - integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== +"@babel/helper-validator-identifier@^7.14.0", "@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.8": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.8.tgz#32be33a756f29e278a0d644fa08a2c9e0f88a34c" + integrity sha512-ZGy6/XQjllhYQrNw/3zfWRwZCTVSiBLZ9DHVZxn9n2gip/7ab8mv2TWlKPIBk26RwedCBoWdjLmn+t9na2Gcow== "@babel/helper-validator-option@^7.12.17": version "7.12.17" @@ -301,11 +301,11 @@ globals "^11.1.0" "@babel/types@*", "@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.12", "@babel/types@^7.14.0", "@babel/types@^7.14.2", "@babel/types@^7.14.4", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.5.tgz#3bb997ba829a2104cedb20689c4a5b8121d383ff" - integrity sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg== + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.8.tgz#38109de8fcadc06415fbd9b74df0065d4d41c728" + integrity sha512-iob4soQa7dZw8nodR/KlOQkPh9S4I8RwCxwRIFuiMRYjOzH/KJzdUfDgz6cGi5dDaclXF4P2PAhCdrBJNIg68Q== dependencies: - "@babel/helper-validator-identifier" "^7.14.5" + "@babel/helper-validator-identifier" "^7.14.8" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": From f69ce63f291fbe00f19e7fd8fdd811bc75b9e2d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 00:30:39 -0700 Subject: [PATCH 257/473] chore: bump @commitlint/config-lerna-scopes from 12.1.4 to 13.1.0 (#3674) Bumps [@commitlint/config-lerna-scopes](https://github.com/conventional-changelog/commitlint) from 12.1.4 to 13.1.0. - [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.1.4...v13.1.0) --- updated-dependencies: - dependency-name: "@commitlint/config-lerna-scopes" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 7febd975e4f5..c5d2f9b0536f 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "@babel/types": "^7.14.4", "@commitlint/cli": "^13.1.0", "@commitlint/config-conventional": "^12.1.4", - "@commitlint/config-lerna-scopes": "^12.1.4", + "@commitlint/config-lerna-scopes": "^13.1.0", "@nrwl/cli": "12.6.0", "@nrwl/nx-cloud": "12.3.0", "@nrwl/tao": "12.6.3", diff --git a/yarn.lock b/yarn.lock index 396d61189974..01d9750d7e62 100644 --- a/yarn.lock +++ b/yarn.lock @@ -335,13 +335,13 @@ dependencies: conventional-changelog-conventionalcommits "^4.3.1" -"@commitlint/config-lerna-scopes@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/config-lerna-scopes/-/config-lerna-scopes-12.1.4.tgz#af6786d2a479eb4c90838782368bb3958547327a" - integrity sha512-D/VqvATs8fYi2CFpFdjLYeOHGm/KkxUSehGqwIPJfYXHHua19V5UqmUOeXTNAJaD+bTpiHvoBTK75NcmWpBQSg== +"@commitlint/config-lerna-scopes@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-lerna-scopes/-/config-lerna-scopes-13.1.0.tgz#c30006ff60a2a625184b9c37bc2ba8ce44ff0d60" + integrity sha512-/OTFM75GYHFRm5m1TKOpHsLvAUuGL6GYnA5xJDT4fe2vPIGqgBYVL9hEolKYTJfDtviBq4fEkEWZQjQF5e4KgA== dependencies: globby "^11.0.1" - import-from "3.0.0" + import-from "4.0.0" resolve-pkg "2.0.0" semver "7.3.5" @@ -5386,12 +5386,10 @@ import-fresh@^3.3.0: parent-module "^1.0.0" resolve-from "^4.0.0" -import-from@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966" - integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ== - dependencies: - resolve-from "^5.0.0" +import-from@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/import-from/-/import-from-4.0.0.tgz#2710b8d66817d232e16f4166e319248d3d5492e2" + integrity sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ== import-lazy@~4.0.0: version "4.0.0" From ab258eb6792641aff98c6a58be08d51a92e30595 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 00:30:48 -0700 Subject: [PATCH 258/473] chore: bump @nrwl/workspace from 12.6.0 to 12.6.3 (#3673) Bumps [@nrwl/workspace](https://github.com/nrwl/nx) from 12.6.0 to 12.6.3. - [Release notes](https://github.com/nrwl/nx/releases) - [Commits](https://github.com/nrwl/nx/compare/12.6.0...12.6.3) --- updated-dependencies: - dependency-name: "@nrwl/workspace" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 67 ++++++++++++++++++++++++++++++---------------------- 2 files changed, 40 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index c5d2f9b0536f..3ff7d527d5c3 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "@nrwl/cli": "12.6.0", "@nrwl/nx-cloud": "12.3.0", "@nrwl/tao": "12.6.3", - "@nrwl/workspace": "12.6.0", + "@nrwl/workspace": "12.6.3", "@types/babel__code-frame": "^7.0.2", "@types/debug": "^4.1.5", "@types/eslint-visitor-keys": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 01d9750d7e62..1d67b76b65a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1856,26 +1856,37 @@ yargs "15.4.1" yargs-parser "20.0.0" -"@nrwl/devkit@12.6.0": - version "12.6.0" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.6.0.tgz#a2bdd4c144f05597302580bcf31443abdd9dc6be" - integrity sha512-tvw/4n2JD/38UuzdxFCoj1+x02BAKK4EvtLhwUK5XSBF0wDYFBp5rHfxvUD9ZcoiRRrZA4QGFjhDljrfj95F2A== +"@nrwl/cli@12.6.3": + version "12.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.6.3.tgz#d74a0a639698d0b8c9347e0679ef9e8ba97182a4" + integrity sha512-UaVaoknao2+EHWlcyMahNHwelXVdDPDc13ki6T2pFYm9oFj+36YLXexhjwUxafeD/Po8nahaVWhsgqGcjUNgxQ== dependencies: - "@nrwl/tao" "12.6.0" + "@nrwl/tao" "12.6.3" + chalk "4.1.0" + v8-compile-cache "2.3.0" + yargs "15.4.1" + yargs-parser "20.0.0" + +"@nrwl/devkit@12.6.3": + version "12.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.6.3.tgz#990885aef16c6e312de8655ba254b22b6eb21c76" + integrity sha512-HeBYesksZirm85sp5a2F23y/V8z2ajBN+Ej29R9E/hpnhOsZScpLxgxmhl+Cq4bd1omVJ6XRvUDwGwuIf1kQmg== + dependencies: + "@nrwl/tao" "12.6.3" ejs "^3.1.5" ignore "^5.0.4" rxjs "^6.5.4" semver "7.3.4" tslib "^2.0.0" -"@nrwl/jest@12.6.0": - version "12.6.0" - resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.6.0.tgz#4ae63b175c2a3a189267606d4e3796d0c4c406eb" - integrity sha512-xg9tqKgY1XIhA7GOhW9D9g3i3ulLa/Ofjuse0vPNG/e9qRrOUKAdK88OB5CB0AbrARCplf9//45i5NoeW9ZzDA== +"@nrwl/jest@12.6.3": + version "12.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.6.3.tgz#9d020f61a1fbf63280034b7387c9f62bebafc1c6" + integrity sha512-wcWoq0bLFZeYGR7V4oAzzhp3RxnmeNRLJsYFVI7ShWaYW7em2MGyFiqYt6/Vp5lPT0WlgQH7HujDCx5EYCXVPQ== dependencies: "@jest/reporters" "27.0.6" "@jest/test-result" "27.0.6" - "@nrwl/devkit" "12.6.0" + "@nrwl/devkit" "12.6.3" chalk "4.1.0" identity-obj-proxy "3.0.0" jest-config "27.0.6" @@ -1884,12 +1895,12 @@ rxjs "^6.5.4" tslib "^2.0.0" -"@nrwl/linter@12.6.0": - version "12.6.0" - resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.6.0.tgz#b102b481a166a9ead4a1df1a05bcaa81305f31ab" - integrity sha512-qOk6tOUqwLNYmeNNLFUgnbEr+v2G9VqZUBUWpVWT8PR78Rd0vI2AJDkE/VrjPKIfHzbXraKTuWcwTCijX8324w== +"@nrwl/linter@12.6.3": + version "12.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.6.3.tgz#f66134a1cea2cf890c3c6e31ca3a3bbbddfaa02d" + integrity sha512-9Dmz7/ke0SMxVJLLdBfqa4U373Hrc7HDrbVPutUImNH/aEybhhYIc6yIURm+kUMswiwYSHvLpbb3QbvsxUZnYQ== dependencies: - "@nrwl/devkit" "12.6.0" + "@nrwl/devkit" "12.6.3" glob "7.1.4" minimatch "3.0.4" tmp "~0.2.1" @@ -1939,19 +1950,19 @@ tslib "^2.0.0" yargs-parser "20.0.0" -"@nrwl/workspace@12.6.0": - version "12.6.0" - resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.6.0.tgz#101fda472268008ca64ac5478b95ae17735f93b4" - integrity sha512-g7RqXHLWiB7dO6YhH0Vcb1JRs/q/lSA49Q5DzJqXrVng63LA0wBovmFdOF9slcYNcsow35cDBgWvup+BQgq6gg== +"@nrwl/workspace@12.6.3": + version "12.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.6.3.tgz#42a0228ae6e6b788055f672e422676a863fbaf46" + integrity sha512-/5bCdRYqn/R50YGjNMZRbnOx7ACKoOsuwW1hpe6in36qNjquT0QXlukSTo72dqCoHgDf5Ha34sgZndsEMSnHPg== dependencies: - "@nrwl/cli" "12.6.0" - "@nrwl/devkit" "12.6.0" - "@nrwl/jest" "12.6.0" - "@nrwl/linter" "12.6.0" + "@nrwl/cli" "12.6.3" + "@nrwl/devkit" "12.6.3" + "@nrwl/jest" "12.6.3" + "@nrwl/linter" "12.6.3" chalk "4.1.0" chokidar "^3.5.1" cosmiconfig "^4.0.0" - dotenv "8.2.0" + dotenv "~10.0.0" enquirer "~2.3.6" flat "^5.0.2" fs-extra "^9.1.0" @@ -4012,10 +4023,10 @@ dot-prop@^5.1.0, dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" -dotenv@8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== +dotenv@~10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" + integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== downlevel-dts@^0.7.0: version "0.7.0" From f47ebd76bea7014bf07c37ba6451376224609119 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 00:30:55 -0700 Subject: [PATCH 259/473] chore: bump @types/is-glob from 4.0.1 to 4.0.2 (#3675) Bumps [@types/is-glob](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/is-glob) from 4.0.1 to 4.0.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/is-glob) --- updated-dependencies: - dependency-name: "@types/is-glob" dependency-type: direct:development update-type: version-update:semver-patch ... 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 1d67b76b65a7..e8ddeb096454 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2233,9 +2233,9 @@ "@types/node" "*" "@types/is-glob@*", "@types/is-glob@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/is-glob/-/is-glob-4.0.1.tgz#a93eec1714172c8eb3225a1cc5eb88c2477b7d00" - integrity sha512-k3RS5HyBPu4h+5hTmIEfPB2rl5P3LnGdQEZrV2b9OWTJVtsUQ2VBcedqYKGqxvZqle5UALUXdSfVA8nf3HfyWQ== + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/is-glob/-/is-glob-4.0.2.tgz#c243dd0d09eac2992130142419ff2308ffd988bf" + integrity sha512-4j5G9Y5jljDSICQ1R2f/Rcyoj6DZmYGneny+p/cDkjep0rkqNg0W73Ty0bVjMUTZgLXHf8oiMjg1XC3CDwCz+g== "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.3" From 12b98f1f3a6b8f0e58b214de3421f8fe549667f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 00:31:02 -0700 Subject: [PATCH 260/473] chore: bump @types/jest from 26.0.23 to 26.0.24 (#3676) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.23 to 26.0.24. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) --- updated-dependencies: - dependency-name: "@types/jest" dependency-type: direct:development update-type: version-update:semver-patch ... 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 e8ddeb096454..a582d327cbf3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2264,9 +2264,9 @@ "@types/jest" "*" "@types/jest@*", "@types/jest@^26.0.23": - version "26.0.23" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.23.tgz#a1b7eab3c503b80451d019efb588ec63522ee4e7" - integrity sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA== + version "26.0.24" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.24.tgz#943d11976b16739185913a1936e0de0c4a7d595a" + integrity sha512-E/X5Vib8BWqZNRlDxj9vYXhsDwPYbPINqKF9BsnSoon4RQ0D9moEuLD8txgyypFLH7J4+Lho9Nr/c8H0Fi+17w== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" From aff5a3df3dd701c65c00a4d02ea163561ff37e44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 02:41:54 -0700 Subject: [PATCH 261/473] chore: bump ts-node from 10.0.0 to 10.1.0 (#3679) Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.0.0 to 10.1.0. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v10.0.0...v10.1.0) --- updated-dependencies: - dependency-name: ts-node dependency-type: direct:development update-type: version-update:semver-minor ... 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 a582d327cbf3..5b0c1c9349ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9719,9 +9719,9 @@ ts-jest@^27.0.1: yargs-parser "20.x" ts-node@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.0.0.tgz#05f10b9a716b0b624129ad44f0ea05dac84ba3be" - integrity sha512-ROWeOIUvfFbPZkoDis0L/55Fk+6gFQNZwwKPLinacRl6tsxstTF1DbAcLKkovwnpKMVvOMHP1TIbnwXwtLg1gg== + version "10.1.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.1.0.tgz#e656d8ad3b61106938a867f69c39a8ba6efc966e" + integrity sha512-6szn3+J9WyG2hE+5W8e0ruZrzyk1uFLYye6IGMBadnOzDh8aP7t8CbFpsfCiEx2+wMixAhjFt7lOZC4+l+WbEA== dependencies: "@tsconfig/node10" "^1.0.7" "@tsconfig/node12" "^1.0.7" From 0813a4e69daa52fd7a0dd3309a2454be898d1d6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 02:42:03 -0700 Subject: [PATCH 262/473] chore: bump jest from 27.0.4 to 27.0.6 (#3682) Bumps [jest](https://github.com/facebook/jest) from 27.0.4 to 27.0.6. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/compare/v27.0.4...v27.0.6) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 499 +++++++----------------------------------------------- 1 file changed, 58 insertions(+), 441 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5b0c1c9349ea..90548d6f9734 100644 --- a/yarn.lock +++ b/yarn.lock @@ -781,18 +781,6 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^27.0.2": - version "27.0.2" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.0.2.tgz#b8eeff8f21ac51d224c851e1729d2630c18631e6" - integrity sha512-/zYigssuHLImGeMAACkjI4VLAiiJznHgAl3xnFT19iWyct2LhrH3KXOjHRmxBGTkiPLZKKAJAgaPpiU9EZ9K+w== - dependencies: - "@jest/types" "^27.0.2" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^27.0.2" - jest-util "^27.0.2" - slash "^3.0.0" - "@jest/console@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.0.6.tgz#3eb72ea80897495c3d73dd97aab7f26770e2260f" @@ -805,51 +793,41 @@ jest-util "^27.0.6" slash "^3.0.0" -"@jest/core@^27.0.4": - version "27.0.4" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.4.tgz#679bf9ac07900da2ddbb9667bb1afa8029038f53" - integrity sha512-+dsmV8VUs1h/Szb+rEWk8xBM1fp1I///uFy9nk3wXGvRsF2lBp8EVPmtWc+QFRb3MY2b7u2HbkGF1fzoDzQTLA== +"@jest/core@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.6.tgz#c5f642727a0b3bf0f37c4b46c675372d0978d4a1" + integrity sha512-SsYBm3yhqOn5ZLJCtccaBcvD/ccTLCeuDv8U41WJH/V1MW5eKUkeMHT9U+Pw/v1m1AIWlnIW/eM2XzQr0rEmow== dependencies: - "@jest/console" "^27.0.2" - "@jest/reporters" "^27.0.4" - "@jest/test-result" "^27.0.2" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/console" "^27.0.6" + "@jest/reporters" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/transform" "^27.0.6" + "@jest/types" "^27.0.6" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^27.0.2" - jest-config "^27.0.4" - jest-haste-map "^27.0.2" - jest-message-util "^27.0.2" - jest-regex-util "^27.0.1" - jest-resolve "^27.0.4" - jest-resolve-dependencies "^27.0.4" - jest-runner "^27.0.4" - jest-runtime "^27.0.4" - jest-snapshot "^27.0.4" - jest-util "^27.0.2" - jest-validate "^27.0.2" - jest-watcher "^27.0.2" + jest-changed-files "^27.0.6" + jest-config "^27.0.6" + jest-haste-map "^27.0.6" + jest-message-util "^27.0.6" + jest-regex-util "^27.0.6" + jest-resolve "^27.0.6" + jest-resolve-dependencies "^27.0.6" + jest-runner "^27.0.6" + jest-runtime "^27.0.6" + jest-snapshot "^27.0.6" + jest-util "^27.0.6" + jest-validate "^27.0.6" + jest-watcher "^27.0.6" micromatch "^4.0.4" p-each-series "^2.1.0" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^27.0.3": - version "27.0.3" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.0.3.tgz#68769b1dfdd213e3456169d64fbe9bd63a5fda92" - integrity sha512-pN9m7fbKsop5vc3FOfH8NF7CKKdRbEZzcxfIo1n2TT6ucKWLFq0P6gCJH0GpnQp036++yY9utHOxpeT1WnkWTA== - dependencies: - "@jest/fake-timers" "^27.0.3" - "@jest/types" "^27.0.2" - "@types/node" "*" - jest-mock "^27.0.3" - "@jest/environment@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.0.6.tgz#ee293fe996db01d7d663b8108fa0e1ff436219d2" @@ -860,18 +838,6 @@ "@types/node" "*" jest-mock "^27.0.6" -"@jest/fake-timers@^27.0.3": - version "27.0.3" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.0.3.tgz#9899ba6304cc636734c74478df502e18136461dd" - integrity sha512-fQ+UCKRIYKvTCEOyKPnaPnomLATIhMnHC/xPZ7yT1Uldp7yMgMxoYIFidDbpSTgB79+/U+FgfoD30c6wg3IUjA== - dependencies: - "@jest/types" "^27.0.2" - "@sinonjs/fake-timers" "^7.0.2" - "@types/node" "*" - jest-message-util "^27.0.2" - jest-mock "^27.0.3" - jest-util "^27.0.2" - "@jest/fake-timers@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.0.6.tgz#cbad52f3fe6abe30e7acb8cd5fa3466b9588e3df" @@ -884,15 +850,6 @@ jest-mock "^27.0.6" jest-util "^27.0.6" -"@jest/globals@^27.0.3": - version "27.0.3" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.0.3.tgz#1cf8933b7791bba0b99305cbf39fd4d2e3fe4060" - integrity sha512-OzsIuf7uf+QalqAGbjClyezzEcLQkdZ+7PejUrZgDs+okdAK8GwRCGcYCirHvhMBBQh60Jr3NlIGbn/KBPQLEQ== - dependencies: - "@jest/environment" "^27.0.3" - "@jest/types" "^27.0.2" - expect "^27.0.2" - "@jest/globals@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.0.6.tgz#48e3903f99a4650673d8657334d13c9caf0e8f82" @@ -902,7 +859,7 @@ "@jest/types" "^27.0.6" expect "^27.0.6" -"@jest/reporters@27.0.6": +"@jest/reporters@27.0.6", "@jest/reporters@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.6.tgz#91e7f2d98c002ad5df94d5b5167c1eb0b9fd5b00" integrity sha512-TIkBt09Cb2gptji3yJXb3EE+eVltW6BjO7frO7NEfjI9vSIYoISi5R3aI3KpEDXlB1xwB+97NXIqz84qYeYsfA== @@ -932,45 +889,6 @@ terminal-link "^2.0.0" v8-to-istanbul "^8.0.0" -"@jest/reporters@^27.0.4": - version "27.0.4" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.4.tgz#95609b1be97afb80d55d8aa3d7c3179c15810e65" - integrity sha512-Xa90Nm3JnV0xCe4M6A10M9WuN9krb+WFKxV1A98Y4ePCw40n++r7uxFUNU7DT1i9Behj7fjrAIju9oU0t1QtCg== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.0.2" - "@jest/test-result" "^27.0.2" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.2.4" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^4.0.3" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.0.2" - jest-haste-map "^27.0.2" - jest-resolve "^27.0.4" - jest-util "^27.0.2" - jest-worker "^27.0.2" - slash "^3.0.0" - source-map "^0.6.0" - string-length "^4.0.1" - terminal-link "^2.0.0" - v8-to-istanbul "^7.0.0" - -"@jest/source-map@^27.0.1": - version "27.0.1" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.0.1.tgz#2afbf73ddbaddcb920a8e62d0238a0a9e0a8d3e4" - integrity sha512-yMgkF0f+6WJtDMdDYNavmqvbHtiSpwRN2U/W+6uztgfqgkq/PXdKPqjBTUF1RD/feth4rH5N3NW0T5+wIuln1A== - dependencies: - callsites "^3.0.0" - graceful-fs "^4.2.4" - source-map "^0.6.0" - "@jest/source-map@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.0.6.tgz#be9e9b93565d49b0548b86e232092491fb60551f" @@ -990,26 +908,6 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^27.0.2": - version "27.0.2" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.0.2.tgz#0451049e32ceb609b636004ccc27c8fa22263f10" - integrity sha512-gcdWwL3yP5VaIadzwQtbZyZMgpmes8ryBAJp70tuxghiA8qL4imJyZex+i+USQH2H4jeLVVszhwntgdQ97fccA== - dependencies: - "@jest/console" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^27.0.4": - version "27.0.4" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.4.tgz#976493b277594d81e589896f0ed21f198308928a" - integrity sha512-6UFEVwdmxYdyNffBxVVZxmXEdBE4riSddXYSnFNH0ELFQFk/bvagizim8WfgJTqF4EKd+j1yFxvhb8BMHfOjSQ== - dependencies: - "@jest/test-result" "^27.0.2" - graceful-fs "^4.2.4" - jest-haste-map "^27.0.2" - jest-runtime "^27.0.4" - "@jest/test-sequencer@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.6.tgz#80a913ed7a1130545b1cd777ff2735dd3af5d34b" @@ -2760,20 +2658,6 @@ axios@^0.21.1: dependencies: follow-redirects "^1.10.0" -babel-jest@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.2.tgz#7dc18adb01322acce62c2af76ea2c7cd186ade37" - integrity sha512-9OThPl3/IQbo4Yul2vMz4FYwILPQak8XelX4YGowygfHaOl5R5gfjm4iVx4d8aUugkW683t8aq0A74E7b5DU1Q== - dependencies: - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^27.0.1" - chalk "^4.0.0" - graceful-fs "^4.2.4" - slash "^3.0.0" - babel-jest@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.6.tgz#e99c6e0577da2655118e3608b68761a5a69bd0d8" @@ -2799,16 +2683,6 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.1.tgz#a6d10e484c93abff0f4e95f437dad26e5736ea11" - integrity sha512-sqBF0owAcCDBVEDtxqfYr2F36eSHdx7lAVGyYuOBRnKdD6gzcy0I0XrAYCZgOA3CRrLhmR+Uae9nogPzmAtOfQ== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.0.0" - "@types/babel__traverse" "^7.0.6" - babel-plugin-jest-hoist@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.6.tgz#f7c6b3d764af21cb4a2a1ab6870117dbde15b456" @@ -2837,14 +2711,6 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.0.1.tgz#7a50c75d16647c23a2cf5158d5bb9eb206b10e20" - integrity sha512-nIBIqCEpuiyhvjQs2mVNwTxQQa2xk70p9Dd/0obQGBf8FBzbnI8QhQKzLsWMN2i6q+5B0OcWDtrboBX5gmOLyA== - dependencies: - babel-plugin-jest-hoist "^27.0.1" - babel-preset-current-node-syntax "^1.0.0" - babel-preset-jest@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.0.6.tgz#909ef08e9f24a4679768be2f60a3df0856843f9d" @@ -5917,40 +5783,15 @@ jake@^10.6.1: filelist "^1.0.1" minimatch "^3.0.4" -jest-changed-files@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.0.2.tgz#997253042b4a032950fc5f56abf3c5d1f8560801" - integrity sha512-eMeb1Pn7w7x3wue5/vF73LPCJ7DKQuC9wQUR5ebP9hDPpk5hzcT/3Hmz3Q5BOFpR3tgbmaWhJcMTVgC8Z1NuMw== +jest-changed-files@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.0.6.tgz#bed6183fcdea8a285482e3b50a9a7712d49a7a8b" + integrity sha512-BuL/ZDauaq5dumYh5y20sn4IISnf1P9A0TDswTxUi84ORGtVa86ApuBHqICL0vepqAnZiY6a7xeSPWv2/yy4eA== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" execa "^5.0.0" throat "^6.0.1" -jest-circus@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.4.tgz#3b261514ee3b3da33def736a6352c98ff56bb6e6" - integrity sha512-QD+eblDiRphta630WRKewuASLs/oY1Zki2G4bccntRvrTHQ63ljwFR5TLduuK4Zg0ZPzW0+8o6AP7KRd1yKOjw== - dependencies: - "@jest/environment" "^27.0.3" - "@jest/test-result" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^0.7.0" - expect "^27.0.2" - is-generator-fn "^2.0.0" - jest-each "^27.0.2" - jest-matcher-utils "^27.0.2" - jest-message-util "^27.0.2" - jest-runtime "^27.0.4" - jest-snapshot "^27.0.4" - jest-util "^27.0.2" - pretty-format "^27.0.2" - slash "^3.0.0" - stack-utils "^2.0.3" - throat "^6.0.1" - jest-circus@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.6.tgz#dd4df17c4697db6a2c232aaad4e9cec666926668" @@ -5976,25 +5817,25 @@ jest-circus@^27.0.6: stack-utils "^2.0.3" throat "^6.0.1" -jest-cli@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.4.tgz#491b12c754c0d7c6873b13a66f26b3a80a852910" - integrity sha512-E0T+/i2lxsWAzV7LKYd0SB7HUAvePqaeIh5vX43/G5jXLhv1VzjYzJAGEkTfvxV774ll9cyE2ljcL73PVMEOXQ== +jest-cli@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.6.tgz#d021e5f4d86d6a212450d4c7b86cb219f1e6864f" + integrity sha512-qUUVlGb9fdKir3RDE+B10ULI+LQrz+MCflEH2UJyoUjoHHCbxDrMxSzjQAPUMsic4SncI62ofYCcAvW6+6rhhg== dependencies: - "@jest/core" "^27.0.4" - "@jest/test-result" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/core" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/types" "^27.0.6" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.0.4" - jest-util "^27.0.2" - jest-validate "^27.0.2" + jest-config "^27.0.6" + jest-util "^27.0.6" + jest-validate "^27.0.6" prompts "^2.0.1" yargs "^16.0.3" -jest-config@27.0.6: +jest-config@27.0.6, jest-config@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.6.tgz#119fb10f149ba63d9c50621baa4f1f179500277f" integrity sha512-JZRR3I1Plr2YxPBhgqRspDE2S5zprbga3swYNrvY3HfQGu7p/GjyLOqwrYad97tX3U3mzT53TPHVmozacfP/3w== @@ -6021,33 +5862,6 @@ jest-config@27.0.6: micromatch "^4.0.4" pretty-format "^27.0.6" -jest-config@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.4.tgz#c4f41378acf40ca77860fb4e213b12109d87b8cf" - integrity sha512-VkQFAHWnPQefdvHU9A+G3H/Z3NrrTKqWpvxgQz3nkUdkDTWeKJE6e//BL+R7z79dXOMVksYgM/z6ndtN0hfChg== - dependencies: - "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.0.4" - "@jest/types" "^27.0.2" - babel-jest "^27.0.2" - chalk "^4.0.0" - deepmerge "^4.2.2" - glob "^7.1.1" - graceful-fs "^4.2.4" - is-ci "^3.0.0" - jest-circus "^27.0.4" - jest-environment-jsdom "^27.0.3" - jest-environment-node "^27.0.3" - jest-get-type "^27.0.1" - jest-jasmine2 "^27.0.4" - jest-regex-util "^27.0.1" - jest-resolve "^27.0.4" - jest-runner "^27.0.4" - jest-util "^27.0.2" - jest-validate "^27.0.2" - micromatch "^4.0.4" - pretty-format "^27.0.2" - jest-diff@^26.0.0, jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.6.tgz#4a7a19ee6f04ad70e0e3388f35829394a44c7b5e" @@ -6058,13 +5872,6 @@ jest-diff@^26.0.0, jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6: jest-get-type "^27.0.6" pretty-format "^27.0.6" -jest-docblock@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.0.1.tgz#bd9752819b49fa4fab1a50b73eb58c653b962e8b" - integrity sha512-TA4+21s3oebURc7VgFV4r7ltdIJ5rtBH1E3Tbovcg7AV+oLfD5DcJ2V2vJ5zFA9sL5CFd/d2D6IpsAeSheEdrA== - dependencies: - detect-newline "^3.0.0" - jest-docblock@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.0.6.tgz#cc78266acf7fe693ca462cbbda0ea4e639e4e5f3" @@ -6072,17 +5879,6 @@ jest-docblock@^27.0.6: dependencies: detect-newline "^3.0.0" -jest-each@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.0.2.tgz#865ddb4367476ced752167926b656fa0dcecd8c7" - integrity sha512-OLMBZBZ6JkoXgUenDtseFRWA43wVl2BwmZYIWQws7eS7pqsIvePqj/jJmEnfq91ALk3LNphgwNK/PRFBYi7ITQ== - dependencies: - "@jest/types" "^27.0.2" - chalk "^4.0.0" - jest-get-type "^27.0.1" - jest-util "^27.0.2" - pretty-format "^27.0.2" - jest-each@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.0.6.tgz#cee117071b04060158dc8d9a66dc50ad40ef453b" @@ -6094,19 +5890,6 @@ jest-each@^27.0.6: jest-util "^27.0.6" pretty-format "^27.0.6" -jest-environment-jsdom@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.0.3.tgz#ed73e913ddc03864eb9f934b5cbabf1b63504e2e" - integrity sha512-5KLmgv1bhiimpSA8oGTnZYk6g4fsNyZiA/6gI2tAZUgrufd7heRUSVh4gRokzZVEj8zlwAQYT0Zs6tuJSW/ECA== - dependencies: - "@jest/environment" "^27.0.3" - "@jest/fake-timers" "^27.0.3" - "@jest/types" "^27.0.2" - "@types/node" "*" - jest-mock "^27.0.3" - jest-util "^27.0.2" - jsdom "^16.6.0" - jest-environment-jsdom@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.0.6.tgz#f66426c4c9950807d0a9f209c590ce544f73291f" @@ -6120,18 +5903,6 @@ jest-environment-jsdom@^27.0.6: jest-util "^27.0.6" jsdom "^16.6.0" -jest-environment-node@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.0.3.tgz#b4acb3679d2552a4215732cab8b0ca7ec4398ee0" - integrity sha512-co2/IVnIFL3cItpFULCvXFg9us4gvWXgs7mutAMPCbFhcqh56QAOdKhNzC2+RycsC/k4mbMj1VF+9F/NzA0ROg== - dependencies: - "@jest/environment" "^27.0.3" - "@jest/fake-timers" "^27.0.3" - "@jest/types" "^27.0.2" - "@types/node" "*" - jest-mock "^27.0.3" - jest-util "^27.0.2" - jest-environment-node@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.0.6.tgz#a6699b7ceb52e8d68138b9808b0c404e505f3e07" @@ -6194,30 +5965,6 @@ jest-haste-map@^27.0.6: optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.4.tgz#c669519ccf4904a485338555e1e66cad36bb0670" - integrity sha512-yj3WrjjquZwkJw+eA4c9yucHw4/+EHndHWSqgHbHGQfT94ihaaQsa009j1a0puU8CNxPDk0c1oAPeOpdJUElwA== - dependencies: - "@babel/traverse" "^7.1.0" - "@jest/environment" "^27.0.3" - "@jest/source-map" "^27.0.1" - "@jest/test-result" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - expect "^27.0.2" - is-generator-fn "^2.0.0" - jest-each "^27.0.2" - jest-matcher-utils "^27.0.2" - jest-message-util "^27.0.2" - jest-runtime "^27.0.4" - jest-snapshot "^27.0.4" - jest-util "^27.0.2" - pretty-format "^27.0.2" - throat "^6.0.1" - jest-jasmine2@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.6.tgz#fd509a9ed3d92bd6edb68a779f4738b100655b37" @@ -6242,14 +5989,6 @@ jest-jasmine2@^27.0.6: pretty-format "^27.0.6" throat "^6.0.1" -jest-leak-detector@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.0.2.tgz#ce19aa9dbcf7a72a9d58907a970427506f624e69" - integrity sha512-TZA3DmCOfe8YZFIMD1GxFqXUkQnIoOGQyy4hFCA2mlHtnAaf+FeOMxi0fZmfB41ZL+QbFG6BVaZF5IeFIVy53Q== - dependencies: - jest-get-type "^27.0.1" - pretty-format "^27.0.2" - jest-leak-detector@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.0.6.tgz#545854275f85450d4ef4b8fe305ca2a26450450f" @@ -6308,14 +6047,6 @@ jest-message-util@^27.0.6: slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.0.3.tgz#5591844f9192b3335c0dca38e8e45ed297d4d23d" - integrity sha512-O5FZn5XDzEp+Xg28mUz4ovVcdwBBPfAhW9+zJLO0Efn2qNbYcDaJvSlRiQ6BCZUCVOJjALicuJQI9mRFjv1o9Q== - dependencies: - "@jest/types" "^27.0.2" - "@types/node" "*" - jest-mock@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.0.6.tgz#0efdd40851398307ba16778728f6d34d583e3467" @@ -6339,14 +6070,14 @@ jest-regex-util@^27.0.6: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5" integrity sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ== -jest-resolve-dependencies@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.4.tgz#a07a242d70d668afd3fcf7f4270755eebb1fe579" - integrity sha512-F33UPfw1YGWCV2uxJl7wD6TvcQn5IC0LtguwY3r4L7R6H4twpLkp5Q2ZfzRx9A2I3G8feiy0O0sqcn/Qoym71A== +jest-resolve-dependencies@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.6.tgz#3e619e0ef391c3ecfcf6ef4056207a3d2be3269f" + integrity sha512-mg9x9DS3BPAREWKCAoyg3QucCr0n6S8HEEsqRCKSPjPcu9HzRILzhdzY3imsLoZWeosEbJZz6TKasveczzpJZA== dependencies: - "@jest/types" "^27.0.2" - jest-regex-util "^27.0.1" - jest-snapshot "^27.0.4" + "@jest/types" "^27.0.6" + jest-regex-util "^27.0.6" + jest-snapshot "^27.0.6" jest-resolve@27.0.6, jest-resolve@^27.0.6: version "27.0.6" @@ -6378,49 +6109,6 @@ jest-resolve@^27.0.2: resolve "^1.20.0" slash "^3.0.0" -jest-resolve@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.0.4.tgz#8a27bc3f2f00c8ea28f3bc99bbf6f468300a703d" - integrity sha512-BcfyK2i3cG79PDb/6gB6zFeFQlcqLsQjGBqznFCpA0L/3l1L/oOsltdUjs5eISAWA9HS9qtj8v2PSZr/yWxONQ== - dependencies: - "@jest/types" "^27.0.2" - chalk "^4.0.0" - escalade "^3.1.1" - graceful-fs "^4.2.4" - jest-pnp-resolver "^1.2.2" - jest-util "^27.0.2" - jest-validate "^27.0.2" - resolve "^1.20.0" - slash "^3.0.0" - -jest-runner@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.4.tgz#2787170a9509b792ae129794f6944d27d5d12a4f" - integrity sha512-NfmvSYLCsCJk2AG8Ar2NAh4PhsJJpO+/r+g4bKR5L/5jFzx/indUpnVBdrfDvuqhGLLAvrKJ9FM/Nt8o1dsqxg== - dependencies: - "@jest/console" "^27.0.2" - "@jest/environment" "^27.0.3" - "@jest/test-result" "^27.0.2" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.8.1" - exit "^0.1.2" - graceful-fs "^4.2.4" - jest-docblock "^27.0.1" - jest-environment-jsdom "^27.0.3" - jest-environment-node "^27.0.3" - jest-haste-map "^27.0.2" - jest-leak-detector "^27.0.2" - jest-message-util "^27.0.2" - jest-resolve "^27.0.4" - jest-runtime "^27.0.4" - jest-util "^27.0.2" - jest-worker "^27.0.2" - source-map-support "^0.5.6" - throat "^6.0.1" - jest-runner@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.6.tgz#1325f45055539222bbc7256a6976e993ad2f9520" @@ -6449,38 +6137,6 @@ jest-runner@^27.0.6: source-map-support "^0.5.6" throat "^6.0.1" -jest-runtime@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.4.tgz#2e4a6aa77cac32ac612dfe12768387a8aa15c2f0" - integrity sha512-voJB4xbAjS/qYPboV+e+gmg3jfvHJJY4CagFWBOM9dQKtlaiTjcpD2tWwla84Z7PtXSQPeIpXY0qksA9Dum29A== - dependencies: - "@jest/console" "^27.0.2" - "@jest/environment" "^27.0.3" - "@jest/fake-timers" "^27.0.3" - "@jest/globals" "^27.0.3" - "@jest/source-map" "^27.0.1" - "@jest/test-result" "^27.0.2" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.4" - jest-haste-map "^27.0.2" - jest-message-util "^27.0.2" - jest-mock "^27.0.3" - jest-regex-util "^27.0.1" - jest-resolve "^27.0.4" - jest-snapshot "^27.0.4" - jest-util "^27.0.2" - jest-validate "^27.0.2" - slash "^3.0.0" - strip-bom "^4.0.0" - yargs "^16.0.3" - jest-runtime@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.6.tgz#45877cfcd386afdd4f317def551fc369794c27c9" @@ -6559,36 +6215,6 @@ jest-snapshot@^27.0.2: pretty-format "^27.0.2" semver "^7.3.2" -jest-snapshot@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.4.tgz#2b96e22ca90382b3e93bd0aae2ce4c78bf51fb5b" - integrity sha512-hnjrvpKGdSMvKfbHyaG5Kul7pDJGZvjVy0CKpzhu28MmAssDXS6GpynhXzgst1wBQoKD8c9b2VS2a5yhDLQRCA== - dependencies: - "@babel/core" "^7.7.2" - "@babel/generator" "^7.7.2" - "@babel/parser" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.0.0" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/babel__traverse" "^7.0.4" - "@types/prettier" "^2.1.5" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^27.0.2" - graceful-fs "^4.2.4" - jest-diff "^27.0.2" - jest-get-type "^27.0.1" - jest-haste-map "^27.0.2" - jest-matcher-utils "^27.0.2" - jest-message-util "^27.0.2" - jest-resolve "^27.0.4" - jest-util "^27.0.2" - natural-compare "^1.4.0" - pretty-format "^27.0.2" - semver "^7.3.2" - jest-snapshot@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.6.tgz#f4e6b208bd2e92e888344d78f0f650bcff05a4bf" @@ -6674,17 +6300,17 @@ jest-validate@^27.0.6: leven "^3.1.0" pretty-format "^27.0.6" -jest-watcher@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.0.2.tgz#dab5f9443e2d7f52597186480731a8c6335c5deb" - integrity sha512-8nuf0PGuTxWj/Ytfw5fyvNn/R80iXY8QhIT0ofyImUvdnoaBdT6kob0GmhXR+wO+ALYVnh8bQxN4Tjfez0JgkA== +jest-watcher@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.0.6.tgz#89526f7f9edf1eac4e4be989bcb6dec6b8878d9c" + integrity sha512-/jIoKBhAP00/iMGnTwUBLgvxkn7vsOweDrOTSPzc7X9uOyUtJIDthQBTI1EXz90bdkrxorUZVhJwiB69gcHtYQ== dependencies: - "@jest/test-result" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/test-result" "^27.0.6" + "@jest/types" "^27.0.6" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.0.2" + jest-util "^27.0.6" string-length "^4.0.1" jest-worker@^27.0.2: @@ -6706,13 +6332,13 @@ jest-worker@^27.0.6: supports-color "^8.0.0" jest@^27.0.3: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.4.tgz#91d4d564b36bcf93b98dac1ab19f07089e670f53" - integrity sha512-Px1iKFooXgGSkk1H8dJxxBIrM3tsc5SIuI4kfKYK2J+4rvCvPGr/cXktxh0e9zIPQ5g09kOMNfHQEmusBUf/ZA== + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.6.tgz#10517b2a628f0409087fbf473db44777d7a04505" + integrity sha512-EjV8aETrsD0wHl7CKMibKwQNQc3gIRBXlTikBmmHUeVMKaPFxdcUIBfoDqTSXDoGJIivAYGqCWVlzCSaVjPQsA== dependencies: - "@jest/core" "^27.0.4" + "@jest/core" "^27.0.6" import-local "^3.0.2" - jest-cli "^27.0.4" + jest-cli "^27.0.6" jju@~1.4.0: version "1.4.0" @@ -10010,15 +9636,6 @@ v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz#9471efa3ef9128d2f7c6a7ca39c4dd6b5055b132" integrity sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q== -v8-to-istanbul@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.0.tgz#5b95cef45c0f83217ec79f8fc7ee1c8b486aee07" - integrity sha512-uXUVqNUCLa0AH1vuVxzi+MI4RfxEOKt9pBgKwHbgH7st8Kv2P1m+jvWNnektzBh5QShF3ODgKmUFCf38LnVz1g== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - source-map "^0.7.3" - v8-to-istanbul@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.0.0.tgz#4229f2a99e367f3f018fa1d5c2b8ec684667c69c" From 93acf387f2d430b17cc623311deb53f9d1b076d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 02:42:09 -0700 Subject: [PATCH 263/473] chore: bump @types/glob from 7.1.3 to 7.1.4 (#3681) Bumps [@types/glob](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/glob) from 7.1.3 to 7.1.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/glob) --- updated-dependencies: - dependency-name: "@types/glob" dependency-type: direct:development update-type: version-update:semver-patch ... 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 90548d6f9734..4876045b828a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2116,9 +2116,9 @@ integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== "@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.3": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" - integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== + version "7.1.4" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.4.tgz#ea59e21d2ee5c517914cb4bc8e4153b99e566672" + integrity sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA== dependencies: "@types/minimatch" "*" "@types/node" "*" From 36be4927a186a49ed71dcf99383701924a05d37b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 14:42:32 -0700 Subject: [PATCH 264/473] chore: bump @nrwl/cli from 12.6.0 to 12.6.3 (#3683) Bumps [@nrwl/cli](https://github.com/nrwl/nx) from 12.6.0 to 12.6.3. - [Release notes](https://github.com/nrwl/nx/releases) - [Commits](https://github.com/nrwl/nx/compare/12.6.0...12.6.3) --- updated-dependencies: - dependency-name: "@nrwl/cli" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 34 +--------------------------------- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index 3ff7d527d5c3..c303198c8aa7 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "@commitlint/cli": "^13.1.0", "@commitlint/config-conventional": "^12.1.4", "@commitlint/config-lerna-scopes": "^13.1.0", - "@nrwl/cli": "12.6.0", + "@nrwl/cli": "12.6.3", "@nrwl/nx-cloud": "12.3.0", "@nrwl/tao": "12.6.3", "@nrwl/workspace": "12.6.3", diff --git a/yarn.lock b/yarn.lock index 4876045b828a..92c87babbfc4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1743,17 +1743,6 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@nrwl/cli@12.6.0": - version "12.6.0" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.6.0.tgz#c5104bbe7b7c5fa8674e53858e21c9022eff7d58" - integrity sha512-gzQ2QWUCTxC2tNVg+9gPAGxO9RVrF+35Q1SidC4I8VxXh7uhzEp5aweWnfTHSBuefPzqpKDxsjco4070z0c3zQ== - dependencies: - "@nrwl/tao" "12.6.0" - chalk "4.1.0" - v8-compile-cache "2.3.0" - yargs "15.4.1" - yargs-parser "20.0.0" - "@nrwl/cli@12.6.3": version "12.6.3" resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.6.3.tgz#d74a0a639698d0b8c9347e0679ef9e8ba97182a4" @@ -1816,22 +1805,6 @@ strip-json-comments "^3.1.1" tar "5.0.5" -"@nrwl/tao@12.6.0": - version "12.6.0" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.6.0.tgz#b0ef91cbc0a8b7747407d1f25b0be669d9a8ddc7" - integrity sha512-h6X+mqmTlZjA9nqlyPAu9TFNORHAMcC1BD8H8kA8lTHN1nktLHQ266qpHVLsxcqww2EYsVqQaKaOpUacck49+w== - dependencies: - chalk "4.1.0" - enquirer "~2.3.6" - fs-extra "^9.1.0" - jsonc-parser "3.0.0" - rxjs "^6.5.4" - rxjs-for-await "0.0.2" - semver "7.3.4" - tmp "~0.2.1" - tslib "^2.0.0" - yargs-parser "20.0.0" - "@nrwl/tao@12.6.3": version "12.6.3" resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.6.3.tgz#3eee7eee4d18a0580eee30fe3e3df0193195bc07" @@ -9626,16 +9599,11 @@ uuid@^3.0.1, uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -v8-compile-cache@2.3.0: +v8-compile-cache@2.3.0, v8-compile-cache@^2.0.3: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== -v8-compile-cache@^2.0.3: - version "2.2.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz#9471efa3ef9128d2f7c6a7ca39c4dd6b5055b132" - integrity sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q== - v8-to-istanbul@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.0.0.tgz#4229f2a99e367f3f018fa1d5c2b8ec684667c69c" From 959284297ef81b61a1356918f816c6bb8c632403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sun, 1 Aug 2021 23:44:05 +0200 Subject: [PATCH 265/473] chore: only run CI publish step on official repo (#3687) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca2816fa5baf..70c540bb07dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -292,7 +292,7 @@ jobs: name: Publish the latest code as a canary version runs-on: ubuntu-latest needs: [typecheck, test_on_primary_node_version, unit_tests_on_other_node_versions, linting_and_style, integration_tests] - if: github.ref == 'refs/heads/master' + if: github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v2 # Fetch all history for all tags and branches in this job because lerna needs it From fc8089fa6987dbe1f8e5ed11923fb37608ceb175 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 15:12:17 -0700 Subject: [PATCH 266/473] chore: bump @commitlint/config-conventional from 12.1.4 to 13.1.0 (#3680) Bumps [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint) from 12.1.4 to 13.1.0. - [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.1.4...v13.1.0) --- updated-dependencies: - dependency-name: "@commitlint/config-conventional" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c303198c8aa7..d83335407070 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "@babel/parser": "^7.14.6", "@babel/types": "^7.14.4", "@commitlint/cli": "^13.1.0", - "@commitlint/config-conventional": "^12.1.4", + "@commitlint/config-conventional": "^13.1.0", "@commitlint/config-lerna-scopes": "^13.1.0", "@nrwl/cli": "12.6.3", "@nrwl/nx-cloud": "12.3.0", diff --git a/yarn.lock b/yarn.lock index 92c87babbfc4..52015d51cb6e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -328,10 +328,10 @@ resolve-global "1.0.0" yargs "^17.0.0" -"@commitlint/config-conventional@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-12.1.4.tgz#95bbab622f117a8a3e49f95917b08655040c66a8" - integrity sha512-ZIdzmdy4o4WyqywMEpprRCrehjCSQrHkaRTVZV411GyLigFQHlEBSJITAihLAWe88Qy/8SyoIe5uKvAsV5vRqQ== +"@commitlint/config-conventional@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-13.1.0.tgz#f02871d50c73db0a31b777231f49203b964d9d59" + integrity sha512-zukJXqdr6jtMiVRy3tTHmwgKcUMGfqKDEskRigc5W3k2aYF4gBAtCEjMAJGZgSQE4DMcHeok0pEV2ANmTpb0cw== dependencies: conventional-changelog-conventionalcommits "^4.3.1" From 1c3b71b2cc5fb1f1e6ae560251e34bbb77ee2dbf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 15:12:29 -0700 Subject: [PATCH 267/473] chore: bump @types/json-schema from 7.0.7 to 7.0.8 (#3685) Bumps [@types/json-schema](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/json-schema) from 7.0.7 to 7.0.8. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/json-schema) --- updated-dependencies: - dependency-name: "@types/json-schema" dependency-type: direct:production update-type: version-update:semver-patch ... 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 52015d51cb6e..0840afc1f200 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2143,9 +2143,9 @@ pretty-format "^26.0.0" "@types/json-schema@^7.0.7": - version "7.0.7" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" - integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== + version "7.0.8" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.8.tgz#edf1bf1dbf4e04413ca8e5b17b3b7d7d54b59818" + integrity sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg== "@types/json5@^0.0.29": version "0.0.29" From a13b10c68cc691aa20d55aa228c9935c76cedbaa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 15:12:36 -0700 Subject: [PATCH 268/473] chore: bump debug from 4.3.1 to 4.3.2 (#3688) Bumps [debug](https://github.com/visionmedia/debug) from 4.3.1 to 4.3.2. - [Release notes](https://github.com/visionmedia/debug/releases) - [Commits](https://github.com/visionmedia/debug/compare/4.3.1...4.3.2) --- updated-dependencies: - dependency-name: debug dependency-type: direct:production update-type: version-update:semver-patch ... 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 0840afc1f200..f428c8f807e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3651,9 +3651,9 @@ debug@3.1.0: ms "2.0.0" debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + version "4.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== dependencies: ms "2.1.2" From 7a6e32c4bd9e93a5b4dd37cf54ae380132914da7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 15:12:44 -0700 Subject: [PATCH 269/473] chore: bump eslint-plugin-eslint-plugin from 3.1.0 to 3.5.3 (#3684) Bumps [eslint-plugin-eslint-plugin](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin) from 3.1.0 to 3.5.3. - [Release notes](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/releases) - [Changelog](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/compare/v3.1.0...v3.5.3) --- updated-dependencies: - dependency-name: eslint-plugin-eslint-plugin dependency-type: direct:development update-type: version-update:semver-minor ... 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 f428c8f807e8..3dd88452d90b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4074,9 +4074,9 @@ eslint-plugin-eslint-comments@^3.2.0: ignore "^5.0.5" eslint-plugin-eslint-plugin@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.1.0.tgz#1d5c54f30b1bddf9b34b1f1dc1a4dff0efec4f79" - integrity sha512-Czb+Dx7ktQ3fFocksu9mF1xBhEzqMhu8g9eaaxpMlnrcDPE7kwIrDo0ttpCDsVEFH9FHWbZ3EzSnQG2gb5miHg== + version "3.5.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.5.3.tgz#6cac958e944b820962a4cf9e65cc32a2e0415eaf" + integrity sha512-8LnYyjIOLS0gqh3QFVBkahYzkFd5UaMZkkeEvqReSjIBgajYyZaMElU8szHhqDrqr0rWkkZk33j9e4qnFN3x2A== dependencies: eslint-utils "^2.1.0" From dad6db0e53bd1efed80e78090926e2ec32d7d5ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 15:57:41 -0700 Subject: [PATCH 270/473] chore: bump husky from 5.2.0 to 7.0.1 (#3689) Bumps [husky](https://github.com/typicode/husky) from 5.2.0 to 7.0.1. - [Release notes](https://github.com/typicode/husky/releases) - [Commits](https://github.com/typicode/husky/compare/v5.2.0...v7.0.1) --- updated-dependencies: - dependency-name: husky dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d83335407070..e3b8356eddb3 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "eslint-plugin-jest": "^24.3.6", "eslint-plugin-simple-import-sort": "^7.0.0", "glob": "^7.1.7", - "husky": "^5.0.9", + "husky": "^7.0.1", "jest": "^27.0.3", "jest-specific-snapshot": "^5.0.0", "lerna": "^3.22.1", diff --git a/yarn.lock b/yarn.lock index 3dd88452d90b..adfc94d4361c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5164,10 +5164,10 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -husky@^5.0.9: - version "5.2.0" - resolved "https://registry.yarnpkg.com/husky/-/husky-5.2.0.tgz#fc5e1c2300d34855d47de4753607d00943fc0802" - integrity sha512-AM8T/auHXRBxlrfPVLKP6jt49GCM2Zz47m8G3FOMsLmTv8Dj/fKVWE0Rh2d4Qrvmy131xEsdQnb3OXRib67PGg== +husky@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.1.tgz#579f4180b5da4520263e8713cc832942b48e1f1c" + integrity sha512-gceRaITVZ+cJH9sNHqx5tFwbzlLCVxtVZcusME8JYQ8Edy5mpGDOqD8QBCdMhpyo9a+JXddnujQ4rpY2Ff9SJA== iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" From 44afa57a0083fec6a43bb89d5e15d6be7835c5ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 15:57:51 -0700 Subject: [PATCH 271/473] chore: bump @types/node-fetch from 2.5.10 to 2.5.12 (#3691) Bumps [@types/node-fetch](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node-fetch) from 2.5.10 to 2.5.12. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node-fetch) --- updated-dependencies: - dependency-name: "@types/node-fetch" dependency-type: direct:development update-type: version-update:semver-patch ... 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 adfc94d4361c..e3e3ddb27a62 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2173,9 +2173,9 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node-fetch@^2.5.10": - version "2.5.10" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.10.tgz#9b4d4a0425562f9fcea70b12cb3fcdd946ca8132" - integrity sha512-IpkX0AasN44hgEad0gEF/V6EgR5n69VEqPEgnmoM8GsIGro3PowbWs4tR6IhxUTyPLpOn+fiGG6nrQhcmoCuIQ== + version "2.5.12" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.12.tgz#8a6f779b1d4e60b7a57fb6fd48d84fb545b9cc66" + integrity sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw== dependencies: "@types/node" "*" form-data "^3.0.0" From 43b09c8adf002d81d4c888c27bbdcf6a78597114 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 15:58:08 -0700 Subject: [PATCH 272/473] chore: bump chalk from 4.1.1 to 4.1.2 (#3692) Bumps [chalk](https://github.com/chalk/chalk) from 4.1.1 to 4.1.2. - [Release notes](https://github.com/chalk/chalk/releases) - [Commits](https://github.com/chalk/chalk/compare/v4.1.1...v4.1.2) --- updated-dependencies: - dependency-name: chalk dependency-type: direct:development update-type: version-update:semver-patch ... 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 e3e3ddb27a62..3b782819b966 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2975,9 +2975,9 @@ chalk@^2.0.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: supports-color "^5.3.0" chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" - integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" From 9ef46f9d2b29a9bd530dfd0f9c6c227e9e4016b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 15:58:13 -0700 Subject: [PATCH 273/473] chore: bump @babel/types from 7.14.8 to 7.14.9 (#3686) Bumps [@babel/types](https://github.com/babel/babel/tree/HEAD/packages/babel-types) from 7.14.8 to 7.14.9. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.14.9/packages/babel-types) --- updated-dependencies: - dependency-name: "@babel/types" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3b782819b966..46bc39f8317b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -141,10 +141,10 @@ dependencies: "@babel/types" "^7.12.13" -"@babel/helper-validator-identifier@^7.14.0", "@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.8": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.8.tgz#32be33a756f29e278a0d644fa08a2c9e0f88a34c" - integrity sha512-ZGy6/XQjllhYQrNw/3zfWRwZCTVSiBLZ9DHVZxn9n2gip/7ab8mv2TWlKPIBk26RwedCBoWdjLmn+t9na2Gcow== +"@babel/helper-validator-identifier@^7.14.0", "@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" + integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== "@babel/helper-validator-option@^7.12.17": version "7.12.17" @@ -301,11 +301,11 @@ globals "^11.1.0" "@babel/types@*", "@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.12", "@babel/types@^7.14.0", "@babel/types@^7.14.2", "@babel/types@^7.14.4", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.8.tgz#38109de8fcadc06415fbd9b74df0065d4d41c728" - integrity sha512-iob4soQa7dZw8nodR/KlOQkPh9S4I8RwCxwRIFuiMRYjOzH/KJzdUfDgz6cGi5dDaclXF4P2PAhCdrBJNIg68Q== + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.9.tgz#f2b19c3f2f77c5708d67fe8f6046e9cea2b5036d" + integrity sha512-u0bLTnv3DFHeaQLYzb7oRJ1JHr1sv/SYDM7JSqHFFLwXG1wTZRughxFI5NCP8qBEo1rVVsn7Yg2Lvw49nne/Ow== dependencies: - "@babel/helper-validator-identifier" "^7.14.8" + "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": From 14d999af4173f96b0c8314fff704553bc0440077 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 16:57:35 -0700 Subject: [PATCH 274/473] chore: bump ts-jest from 27.0.3 to 27.0.4 (#3693) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 27.0.3 to 27.0.4. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v27.0.3...v27.0.4) --- updated-dependencies: - dependency-name: ts-jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/yarn.lock b/yarn.lock index 46bc39f8317b..ef0e4608abe5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6225,7 +6225,7 @@ jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: dependencies: jest-snapshot "^27.0.2" -jest-util@27.0.6, jest-util@^27.0.6: +jest-util@27.0.6, jest-util@^27.0.0, jest-util@^27.0.2, jest-util@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.0.6.tgz#e8e04eec159de2f4d5f57f795df9cdc091e50297" integrity sha512-1JjlaIh+C65H/F7D11GNkGDDZtDfMEM8EBXsvd+l/cxtgQ6QhxuloOaiayt89DxUvDarbVhqI98HhgrM1yliFQ== @@ -6237,18 +6237,6 @@ jest-util@27.0.6, jest-util@^27.0.6: is-ci "^3.0.0" picomatch "^2.2.3" -jest-util@^27.0.0, jest-util@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.0.2.tgz#fc2c7ace3c75ae561cf1e5fdb643bf685a5be7c7" - integrity sha512-1d9uH3a00OFGGWSibpNYr+jojZ6AckOMCXV2Z4K3YXDnzpkAaXQyIpY14FOJPiUmil7CD+A6Qs+lnnh6ctRbIA== - dependencies: - "@jest/types" "^27.0.2" - "@types/node" "*" - chalk "^4.0.0" - graceful-fs "^4.2.4" - is-ci "^3.0.0" - picomatch "^2.2.3" - jest-validate@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.0.2.tgz#7fe2c100089449cd5cbb47a5b0b6cb7cda5beee5" @@ -9302,9 +9290,9 @@ trim-off-newlines@^1.0.0: integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= ts-jest@^27.0.1: - version "27.0.3" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.3.tgz#808492f022296cde19390bb6ad627c8126bf93f8" - integrity sha512-U5rdMjnYam9Ucw+h0QvtNDbc5+88nxt7tbIvqaZUhFrfG4+SkWhMXjejCLVGcpILTPuV+H3W/GZDZrnZFpPeXw== + version "27.0.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.4.tgz#df49683535831560ccb58f94c023d831b1b80df0" + integrity sha512-c4E1ECy9Xz2WGfTMyHbSaArlIva7Wi2p43QOMmCqjSSjHP06KXv+aT+eSY+yZMuqsMi3k7pyGsGj2q5oSl5WfQ== dependencies: bs-logger "0.x" buffer-from "1.x" From b302b88b76c110b6319c148cc097e5bde483f3c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 16:57:50 -0700 Subject: [PATCH 275/473] chore: bump @types/tmp from 0.2.0 to 0.2.1 (#3694) Bumps [@types/tmp](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/tmp) from 0.2.0 to 0.2.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/tmp) --- updated-dependencies: - dependency-name: "@types/tmp" dependency-type: direct:development update-type: version-update:semver-patch ... 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 ef0e4608abe5..f2df69cab7c1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2219,9 +2219,9 @@ integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== "@types/tmp@*", "@types/tmp@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.2.0.tgz#e3f52b4d7397eaa9193592ef3fdd44dc0af4298c" - integrity sha512-flgpHJjntpBAdJD43ShRosQvNC0ME97DCfGvZEDlAThQmnerRXrLbX6YgzRBQCZTthET9eAWFAMaYP0m0Y4HzQ== + version "0.2.1" + resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.2.1.tgz#83ecf4ec22a8c218c71db25f316619fe5b986011" + integrity sha512-7cTXwKP/HLOPVgjg+YhBdQ7bMiobGMuoBmrGmqwIWJv8elC6t1DfVc/mn4fD9UE1IjhwmhaQ5pGVXkmXbH0rhg== "@types/yargs-parser@*": version "20.2.0" From 0e364a1342c76f7d5acf45507c19c4867020c060 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 16:58:03 -0700 Subject: [PATCH 276/473] chore: bump @types/lodash from 4.14.170 to 4.14.171 (#3695) Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.170 to 4.14.171. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) --- updated-dependencies: - dependency-name: "@types/lodash" dependency-type: direct:development update-type: version-update:semver-patch ... 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 f2df69cab7c1..c56dc9bc1438 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2153,9 +2153,9 @@ integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= "@types/lodash@*", "@types/lodash@^4.14.170": - version "4.14.170" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.170.tgz#0d67711d4bf7f4ca5147e9091b847479b87925d6" - integrity sha512-bpcvu/MKHHeYX+qeEN8GE7DIravODWdACVA1ctevD8CN24RhPZIKMn9ntfAsrvLfSX3cR5RrBKAbYm9bGs0A+Q== + version "4.14.171" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.171.tgz#f01b3a5fe3499e34b622c362a46a609fdb23573b" + integrity sha512-7eQ2xYLLI/LsicL2nejW9Wyko3lcpN6O/z0ZLHrEQsg280zIdCv1t/0m6UtBjUHokCGBQ3gYTbHzDkZ1xOBwwg== "@types/marked@*", "@types/marked@^2.0.3": version "2.0.4" From 4b0dbc054715f884526c75e094a99f7103c49465 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 16:58:11 -0700 Subject: [PATCH 277/473] chore: bump @types/debug from 4.1.5 to 4.1.7 (#3696) Bumps [@types/debug](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/debug) from 4.1.5 to 4.1.7. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/debug) --- updated-dependencies: - dependency-name: "@types/debug" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index c56dc9bc1438..b896afe15b71 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2079,9 +2079,11 @@ integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== "@types/debug@*", "@types/debug@^4.1.5": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.5.tgz#b14efa8852b7768d898906613c23f688713e02cd" - integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ== + version "4.1.7" + resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.7.tgz#7cc0ea761509124709b8b2d1090d8f6c17aadb82" + integrity sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg== + dependencies: + "@types/ms" "*" "@types/eslint-visitor-keys@*", "@types/eslint-visitor-keys@^1.0.0": version "1.0.0" @@ -2172,6 +2174,11 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= +"@types/ms@*": + version "0.7.31" + resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" + integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== + "@types/node-fetch@^2.5.10": version "2.5.12" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.12.tgz#8a6f779b1d4e60b7a57fb6fd48d84fb545b9cc66" From f9bd45b3bf80efd7f5c069e8cbc9d865470d323a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 17:39:55 -0700 Subject: [PATCH 278/473] chore: bump markdownlint-cli from 0.27.1 to 0.28.1 (#3699) Bumps [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) from 0.27.1 to 0.28.1. - [Release notes](https://github.com/igorshubovych/markdownlint-cli/releases) - [Commits](https://github.com/igorshubovych/markdownlint-cli/compare/v0.27.1...v0.28.1) --- updated-dependencies: - dependency-name: markdownlint-cli dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 66 ++++++++++++++++++++++++++-------------------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index e3b8356eddb3..8dafcdf40714 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,7 @@ "lerna": "^3.22.1", "lint-staged": "^11.0.0", "make-dir": "^3.1.0", - "markdownlint-cli": "^0.27.1", + "markdownlint-cli": "^0.28.1", "node-fetch": "^2.6.1", "prettier": "2.3.2", "pretty-format": "^27.0.2", diff --git a/yarn.lock b/yarn.lock index b896afe15b71..44cac6567751 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3212,10 +3212,10 @@ commander@^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== +commander@~8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.0.0.tgz#1da2139548caef59bd23e66d18908dfb54b02258" + integrity sha512-Xvf85aAtu6v22+E5hfVoLHqyul/jyxh91zvqk/ioJTQuJR7Z78n7H558vMPKanPSRgIEeZemT92I2g9Y8LPbSQ== comment-json@^4.1.0: version "4.1.0" @@ -4884,7 +4884,7 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@*, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.7, glob@~7.1.6: +glob@*, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.7, glob@~7.1.7: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== @@ -5309,11 +5309,16 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: +ini@^1.3.2, ini@^1.3.4: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +ini@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" + integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== + init-package-json@^1.10.3: version "1.10.3" resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe" @@ -6326,10 +6331,10 @@ js-yaml@^3.13.1, js-yaml@^3.9.0: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" - integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" @@ -6878,17 +6883,17 @@ markdown-it@12.0.4: mdurl "^1.0.1" uc.micro "^1.0.5" -markdownlint-cli@^0.27.1: - version "0.27.1" - resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.27.1.tgz#8fa095eea94936b6dea891f9db7f269c60e6d6fa" - integrity sha512-p1VV6aSbGrDlpUWzHizAnSNEQAweVR3qUI/AIUubxW7BGPXziSXkIED+uRtSohUlRS/jmqp3Wi4es5j6fIrdeQ== +markdownlint-cli@^0.28.1: + version "0.28.1" + resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.28.1.tgz#76f1d8d50f81dce524826c93bf0f95af9cbe9397" + integrity sha512-RBKtRRBzcuAF/H5wMSzb4zvEtbUkyYNEeaDtlQkyH9SoHWPL01emJ2Wrx6NEOa1ZDGwB+seBGvE157Qzc/t/vA== dependencies: - commander "~7.1.0" + commander "~8.0.0" deep-extend "~0.6.0" get-stdin "~8.0.0" - glob "~7.1.6" + glob "~7.1.7" ignore "~5.1.8" - js-yaml "^4.0.0" + js-yaml "^4.1.0" jsonc-parser "~3.0.0" lodash.differencewith "~4.5.0" lodash.flatten "~4.4.0" @@ -6896,7 +6901,7 @@ markdownlint-cli@^0.27.1: markdownlint-rule-helpers "~0.14.0" minimatch "~3.0.4" minimist "~1.2.5" - rc "~1.2.8" + run-con "~1.2.10" markdownlint-rule-helpers@~0.14.0: version "0.14.0" @@ -8068,16 +8073,6 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -rc@~1.2.8: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - react-is@^17.0.1: version "17.0.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" @@ -8444,6 +8439,16 @@ run-async@^2.2.0, run-async@^2.4.0: resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== +run-con@~1.2.10: + version "1.2.10" + resolved "https://registry.yarnpkg.com/run-con/-/run-con-1.2.10.tgz#90de9d43d20274d00478f4c000495bd72f417d22" + integrity sha512-n7PZpYmMM26ZO21dd8y3Yw1TRtGABjRtgPSgFS/nhzfvbJMXFtJhJVyEgayMiP+w/23craJjsnfDvx4W4ue/HQ== + dependencies: + deep-extend "^0.6.0" + ini "~2.0.0" + minimist "^1.2.5" + strip-json-comments "~3.1.1" + run-parallel@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" @@ -9015,11 +9020,6 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1, strip-json-comments@~3.1 resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - strong-log-transformer@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" From 5a8331c996aa38244592eb8cf2c419f76d19fa35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 17:40:05 -0700 Subject: [PATCH 279/473] chore: bump @types/rimraf from 3.0.0 to 3.0.1 (#3700) Bumps [@types/rimraf](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/rimraf) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/rimraf) --- updated-dependencies: - dependency-name: "@types/rimraf" dependency-type: direct:development update-type: version-update:semver-patch ... 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 44cac6567751..ddc2b0534d9e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2208,9 +2208,9 @@ integrity sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog== "@types/rimraf@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.0.tgz#b9d03f090ece263671898d57bb7bb007023ac19f" - integrity sha512-7WhJ0MdpFgYQPXlF4Dx+DhgvlPCfz/x5mHaeDQAKhcenvQP1KCpLQ18JklAqeGMYSAT2PxLpzd0g2/HE7fj7hQ== + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.1.tgz#1bbc106f0978742289103e080d4b41b3b4656e58" + integrity sha512-CAoSlbco40aKZ0CkelBF2g3JeN6aioRaTVnqSX5pWsn/WApm6IDxI4e4tD9D0dY/meCkyyleP1IQDVN13F4maA== dependencies: "@types/glob" "*" "@types/node" "*" From 4921bc3cb0f68ad21e60513a85bbb53efa927d9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 17:40:17 -0700 Subject: [PATCH 280/473] chore: bump eslint-plugin-jest from 24.3.6 to 24.4.0 (#3701) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.3.6 to 24.4.0. - [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.6...v24.4.0) --- updated-dependencies: - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-minor ... 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 ddc2b0534d9e..fc91c3aab9ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4109,9 +4109,9 @@ eslint-plugin-import@^2.23.4: tsconfig-paths "^3.9.0" eslint-plugin-jest@^24.3.6: - version "24.3.6" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.6.tgz#5f0ca019183c3188c5ad3af8e80b41de6c8e9173" - integrity sha512-WOVH4TIaBLIeCX576rLcOgjNXqP+jNlCiEmRgFTfQtJ52DpwnIQKAVGlGPAN7CZ33bW6eNfHD6s8ZbEUTQubJg== + version "24.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.4.0.tgz#fa4b614dbd46a98b652d830377971f097bda9262" + integrity sha512-8qnt/hgtZ94E9dA6viqfViKBfkJwFHXgJmTWlMGDgunw1XJEGqm3eiPjDsTanM3/u/3Az82nyQM9GX7PM/QGmg== dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" From f0861e01ea97798bf4444f56f99f3bdc787174c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Aug 2021 17:40:26 -0700 Subject: [PATCH 281/473] chore: bump @nrwl/nx-cloud from 12.3.0 to 12.3.5 (#3702) Bumps [@nrwl/nx-cloud](https://github.com/nrwl/nx) from 12.3.0 to 12.3.5. - [Release notes](https://github.com/nrwl/nx/releases) - [Commits](https://github.com/nrwl/nx/compare/12.3.0...12.3.5) --- updated-dependencies: - dependency-name: "@nrwl/nx-cloud" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8dafcdf40714..e7e708f0685f 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "@commitlint/config-conventional": "^13.1.0", "@commitlint/config-lerna-scopes": "^13.1.0", "@nrwl/cli": "12.6.3", - "@nrwl/nx-cloud": "12.3.0", + "@nrwl/nx-cloud": "12.3.5", "@nrwl/tao": "12.6.3", "@nrwl/workspace": "12.6.3", "@types/babel__code-frame": "^7.0.2", diff --git a/yarn.lock b/yarn.lock index fc91c3aab9ca..c8cd25cb92f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1793,10 +1793,10 @@ tmp "~0.2.1" tslib "^2.0.0" -"@nrwl/nx-cloud@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.3.0.tgz#2f461d566b98441c585ecf93010faf066e1199bf" - integrity sha512-woWvAqp8fWXSl0a+tijo3FtrrjXvGTir89XNhUdh7jvzq7P4+XiPIt6slgcRD3X3ew3JNkJterzf+188fQH8aQ== +"@nrwl/nx-cloud@12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.3.5.tgz#e2c90e0f572eeddbc495a3bbb3edcfc0f3c1505e" + integrity sha512-4mrDh5vucDFFD9l6e5RROhloE1SFFERYZhpHn1wGV2USlaV2XtRRNfoVqoxqojBTaDHJ7PS4NJc974SzR9YTOw== dependencies: axios "^0.21.1" chalk "4.1.0" From 99eca0d428187d4c29ded9ddd1b57b40ab463c01 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 2 Aug 2021 12:29:09 +0400 Subject: [PATCH 282/473] fix(typescript-estree): ensure --fix works with singleRun mode (#3655) --- packages/typescript-estree/src/index.ts | 10 +++- packages/typescript-estree/src/parser.ts | 48 ++++++++++++++++--- .../tests/lib/semanticInfo-singleRun.test.ts | 8 +++- 3 files changed, 58 insertions(+), 8 deletions(-) diff --git a/packages/typescript-estree/src/index.ts b/packages/typescript-estree/src/index.ts index 5ed06629f17c..a922ef199cf7 100644 --- a/packages/typescript-estree/src/index.ts +++ b/packages/typescript-estree/src/index.ts @@ -1,4 +1,12 @@ -export * from './parser'; +export { + AST, + parse, + parseAndGenerateServices, + parseWithNodeMaps, + ParseAndGenerateServicesResult, + ParseWithNodeMapsResult, + clearProgramCache, +} from './parser'; export { ParserServices, TSESTreeOptions } from './parser-options'; export { simpleTraverse } from './simple-traverse'; export * from './ts-estree'; diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index 69132424ba28..e61b1b69ec2b 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -502,6 +502,12 @@ function parseWithNodeMaps( return parseWithNodeMapsInternal(code, options, true); } +let parseAndGenerateServicesCalls: { [fileName: string]: number } = {}; +// Privately exported utility intended for use in typescript-eslint unit tests only +function clearParseAndGenerateServicesCalls(): void { + parseAndGenerateServicesCalls = {}; +} + function parseAndGenerateServices( code: string, options: T, @@ -572,12 +578,41 @@ function parseAndGenerateServices( */ const shouldProvideParserServices = extra.programs != null || (extra.projects && extra.projects.length > 0); - const { ast, program } = getProgramAndAST( - code, - extra.programs, - shouldProvideParserServices, - extra.createDefaultProgram, - )!; + + /** + * If we are in singleRun mode but the parseAndGenerateServices() function has been called more than once for the current file, + * it must mean that we are in the middle of an ESLint automated fix cycle (in which parsing can be performed up to an additional + * 10 times in order to apply all possible fixes for the file). + * + * In this scenario we cannot rely upon the singleRun AOT compiled programs because the SourceFiles will not contain the source + * with the latest fixes applied. Therefore we fallback to creating the quickest possible isolated program from the updated source. + */ + let ast: ts.SourceFile; + let program: ts.Program; + + if (extra.singleRun && options.filePath) { + parseAndGenerateServicesCalls[options.filePath] = + (parseAndGenerateServicesCalls[options.filePath] || 0) + 1; + } + + if ( + extra.singleRun && + options.filePath && + parseAndGenerateServicesCalls[options.filePath] > 1 + ) { + const isolatedAstAndProgram = createIsolatedProgram(code, extra); + ast = isolatedAstAndProgram.ast; + program = isolatedAstAndProgram.program; + } else { + const astAndProgram = getProgramAndAST( + code, + extra.programs, + shouldProvideParserServices, + extra.createDefaultProgram, + )!; + ast = astAndProgram.ast; + program = astAndProgram.program; + } /** * Convert the TypeScript AST to an ESTree-compatible one, and optionally preserve @@ -620,4 +655,5 @@ export { ParseAndGenerateServicesResult, ParseWithNodeMapsResult, clearProgramCache, + clearParseAndGenerateServicesCalls, }; diff --git a/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts b/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts index b8e778e0fb01..62d7c3a841c9 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts @@ -1,6 +1,10 @@ import glob from 'glob'; import * as path from 'path'; -import { clearProgramCache, parseAndGenerateServices } from '../../src'; +import { + clearProgramCache, + parseAndGenerateServices, + clearParseAndGenerateServicesCalls, +} from '../../src/parser'; import { getCanonicalFileName } from '../../src/create-program/shared'; const mockProgram = { @@ -91,6 +95,8 @@ describe('semanticInfo - singleRun', () => { clearProgramCache(); // ensure invocations of mock are clean for each test (createProgramFromConfigFile as jest.Mock).mockClear(); + // Do not track invocations per file across tests + clearParseAndGenerateServicesCalls(); }); it('should not create any programs ahead of time by default when there is no way to infer singleRun=true', () => { From 4d3ae1375d03c17d1ecd3c41952915a4dedd4828 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 2 Aug 2021 17:03:27 +0000 Subject: [PATCH 283/473] chore: publish v4.29.0 --- CHANGELOG.md | 28 ++++++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 12 +++++++++ packages/ast-spec/package.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 | 22 +++++++++++++++ packages/eslint-plugin/package.json | 6 ++--- packages/experimental-utils/CHANGELOG.md | 16 +++++++++++ packages/experimental-utils/package.json | 8 +++--- packages/parser/CHANGELOG.md | 12 +++++++++ packages/parser/package.json | 10 +++---- packages/scope-manager/CHANGELOG.md | 11 ++++++++ packages/scope-manager/package.json | 8 +++--- packages/shared-fixtures/CHANGELOG.md | 8 ++++++ packages/shared-fixtures/package.json | 2 +- packages/types/CHANGELOG.md | 12 +++++++++ packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 18 +++++++++++++ packages/typescript-estree/package.json | 8 +++--- packages/visitor-keys/CHANGELOG.md | 8 ++++++ packages/visitor-keys/package.json | 4 +-- 24 files changed, 194 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cbb536062bb..46a6bf956ee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Bug Fixes + +* **eslint-plugin:** [no-implied-eval] handle bind on nested member expressions ([#3598](https://github.com/typescript-eslint/typescript-eslint/issues/3598)) ([f5a6806](https://github.com/typescript-eslint/typescript-eslint/commit/f5a6806ae4291f540eef73cd5c182c985c5059e7)) +* **eslint-plugin:** [no-implied-eval] permit more expression types ([#3624](https://github.com/typescript-eslint/typescript-eslint/issues/3624)) ([ca7c549](https://github.com/typescript-eslint/typescript-eslint/commit/ca7c549426d885ecb43cc8fe99518e58041ad152)) +* **eslint-plugin:** [no-unnecessary-boolean-literal-compare] incorrect fix when condition is reversed ([#3581](https://github.com/typescript-eslint/typescript-eslint/issues/3581)) ([b595575](https://github.com/typescript-eslint/typescript-eslint/commit/b595575ccef7bceb04c6317fb903f4bedeb19a69)) +* **eslint-plugin:** [return-await] handle nested functions correctly ([#3601](https://github.com/typescript-eslint/typescript-eslint/issues/3601)) ([4a196b5](https://github.com/typescript-eslint/typescript-eslint/commit/4a196b5818bb8557a7d3c5abae81fbd8021d9cb9)) +* **eslint-plugin:** [return-await] properly handle fixes for `TSAsExpression` ([#3631](https://github.com/typescript-eslint/typescript-eslint/issues/3631)) ([00a4369](https://github.com/typescript-eslint/typescript-eslint/commit/00a436986ceb2520fdeb7efed9ad8b2d866700b7)) +* **experimental-utils:** simplify `eslint-utils`' `findVariable`'s signature in `ast-utils` ([#3574](https://github.com/typescript-eslint/typescript-eslint/issues/3574)) ([3ef5267](https://github.com/typescript-eslint/typescript-eslint/commit/3ef5267b850e1ffb7115e263e89a98c455fd2532)) +* **typescript-estree:** correct tty check ([#3635](https://github.com/typescript-eslint/typescript-eslint/issues/3635)) ([62bcc93](https://github.com/typescript-eslint/typescript-eslint/commit/62bcc937f08cd18296ffbe96a3551ec1fb87aecd)) +* **typescript-estree:** ensure --fix works with singleRun mode ([#3655](https://github.com/typescript-eslint/typescript-eslint/issues/3655)) ([99eca0d](https://github.com/typescript-eslint/typescript-eslint/commit/99eca0d428187d4c29ded9ddd1b57b40ab463c01)) + + +### Features + +* **ast-spec:** extract `ExportKind` & `ImportKind` ([#3564](https://github.com/typescript-eslint/typescript-eslint/issues/3564)) ([120d566](https://github.com/typescript-eslint/typescript-eslint/commit/120d566c980c61d3823fbe8b2db30d76b8c31140)) +* **ast-spec:** make `BaseNode` & `BaseToken` more type-safe ([#3560](https://github.com/typescript-eslint/typescript-eslint/issues/3560)) ([a6c5604](https://github.com/typescript-eslint/typescript-eslint/commit/a6c5604b65b6330d047aa016fc46b8a597a6ae58)) +* **eslint-plugin:** [no-redeclare] ignoreDeclarationMerge of enum+namespace ([#3572](https://github.com/typescript-eslint/typescript-eslint/issues/3572)) ([18e30cb](https://github.com/typescript-eslint/typescript-eslint/commit/18e30cb601ee4e990d6becdfb9d98ae8119b7919)) +* **eslint-plugin:** [prefer-return-this-type] add a new rule ([#3228](https://github.com/typescript-eslint/typescript-eslint/issues/3228)) ([5e1a615](https://github.com/typescript-eslint/typescript-eslint/commit/5e1a61500472ff186eede686b2257464476d3d87)) +* **eslint-plugin:** Catch unused React import with new JSX transform ([#3577](https://github.com/typescript-eslint/typescript-eslint/issues/3577)) ([02998ea](https://github.com/typescript-eslint/typescript-eslint/commit/02998eac510665758b9a093d43afc310f3ac980d)) +* **typescript-estree:** add support for custom module resolution ([#3516](https://github.com/typescript-eslint/typescript-eslint/issues/3516)) ([d48429d](https://github.com/typescript-eslint/typescript-eslint/commit/d48429d97326545bb727f88ce9056270b1599a31)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/typescript-eslint diff --git a/lerna.json b/lerna.json index 0bdd3150c5fd..597602d30961 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.28.5", + "version": "4.29.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index cf8aa62fff49..d883c719512f 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Features + +* **ast-spec:** extract `ExportKind` & `ImportKind` ([#3564](https://github.com/typescript-eslint/typescript-eslint/issues/3564)) ([120d566](https://github.com/typescript-eslint/typescript-eslint/commit/120d566c980c61d3823fbe8b2db30d76b8c31140)) +* **ast-spec:** make `BaseNode` & `BaseToken` more type-safe ([#3560](https://github.com/typescript-eslint/typescript-eslint/issues/3560)) ([a6c5604](https://github.com/typescript-eslint/typescript-eslint/commit/a6c5604b65b6330d047aa016fc46b8a597a6ae58)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 1de0a2fdbcfb..2836f9b404db 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.28.5", + "version": "4.29.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 4ad594f0f09f..340d6d776459 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.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **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 a66619ad72e0..3704cfe5df1c 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.28.5", + "version": "4.29.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.28.5", + "@typescript-eslint/experimental-utils": "4.29.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 6bc3be0b84f9..267da2f340fb 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.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **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 3f8f90c5e985..d6c946d4f05b 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.28.5", + "version": "4.29.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.28.5", + "@typescript-eslint/experimental-utils": "4.29.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.28.5" + "@typescript-eslint/parser": "4.29.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 4409fd54813a..82d712fef935 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Bug Fixes + +* **eslint-plugin:** [no-implied-eval] handle bind on nested member expressions ([#3598](https://github.com/typescript-eslint/typescript-eslint/issues/3598)) ([f5a6806](https://github.com/typescript-eslint/typescript-eslint/commit/f5a6806ae4291f540eef73cd5c182c985c5059e7)) +* **eslint-plugin:** [no-implied-eval] permit more expression types ([#3624](https://github.com/typescript-eslint/typescript-eslint/issues/3624)) ([ca7c549](https://github.com/typescript-eslint/typescript-eslint/commit/ca7c549426d885ecb43cc8fe99518e58041ad152)) +* **eslint-plugin:** [no-unnecessary-boolean-literal-compare] incorrect fix when condition is reversed ([#3581](https://github.com/typescript-eslint/typescript-eslint/issues/3581)) ([b595575](https://github.com/typescript-eslint/typescript-eslint/commit/b595575ccef7bceb04c6317fb903f4bedeb19a69)) +* **eslint-plugin:** [return-await] handle nested functions correctly ([#3601](https://github.com/typescript-eslint/typescript-eslint/issues/3601)) ([4a196b5](https://github.com/typescript-eslint/typescript-eslint/commit/4a196b5818bb8557a7d3c5abae81fbd8021d9cb9)) +* **eslint-plugin:** [return-await] properly handle fixes for `TSAsExpression` ([#3631](https://github.com/typescript-eslint/typescript-eslint/issues/3631)) ([00a4369](https://github.com/typescript-eslint/typescript-eslint/commit/00a436986ceb2520fdeb7efed9ad8b2d866700b7)) + + +### Features + +* **eslint-plugin:** [no-redeclare] ignoreDeclarationMerge of enum+namespace ([#3572](https://github.com/typescript-eslint/typescript-eslint/issues/3572)) ([18e30cb](https://github.com/typescript-eslint/typescript-eslint/commit/18e30cb601ee4e990d6becdfb9d98ae8119b7919)) +* **eslint-plugin:** [prefer-return-this-type] add a new rule ([#3228](https://github.com/typescript-eslint/typescript-eslint/issues/3228)) ([5e1a615](https://github.com/typescript-eslint/typescript-eslint/commit/5e1a61500472ff186eede686b2257464476d3d87)) +* **eslint-plugin:** Catch unused React import with new JSX transform ([#3577](https://github.com/typescript-eslint/typescript-eslint/issues/3577)) ([02998ea](https://github.com/typescript-eslint/typescript-eslint/commit/02998eac510665758b9a093d43afc310f3ac980d)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 52d579430969..7318829850c0 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.28.5", + "version": "4.29.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.28.5", - "@typescript-eslint/scope-manager": "4.28.5", + "@typescript-eslint/experimental-utils": "4.29.0", + "@typescript-eslint/scope-manager": "4.29.0", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 754f93ce147b..985d64275284 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/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.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Bug Fixes + +* **experimental-utils:** simplify `eslint-utils`' `findVariable`'s signature in `ast-utils` ([#3574](https://github.com/typescript-eslint/typescript-eslint/issues/3574)) ([3ef5267](https://github.com/typescript-eslint/typescript-eslint/commit/3ef5267b850e1ffb7115e263e89a98c455fd2532)) + + +### Features + +* **ast-spec:** make `BaseNode` & `BaseToken` more type-safe ([#3560](https://github.com/typescript-eslint/typescript-eslint/issues/3560)) ([a6c5604](https://github.com/typescript-eslint/typescript-eslint/commit/a6c5604b65b6330d047aa016fc46b8a597a6ae58)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **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 5080e90e0da1..b3f1c27d16ff 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.28.5", + "version": "4.29.0", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.28.5", - "@typescript-eslint/types": "4.28.5", - "@typescript-eslint/typescript-estree": "4.28.5", + "@typescript-eslint/scope-manager": "4.29.0", + "@typescript-eslint/types": "4.29.0", + "@typescript-eslint/typescript-estree": "4.29.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 83a7fd33fd15..ab28117c7537 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Features + +* **eslint-plugin:** Catch unused React import with new JSX transform ([#3577](https://github.com/typescript-eslint/typescript-eslint/issues/3577)) ([02998ea](https://github.com/typescript-eslint/typescript-eslint/commit/02998eac510665758b9a093d43afc310f3ac980d)) +* **typescript-estree:** add support for custom module resolution ([#3516](https://github.com/typescript-eslint/typescript-eslint/issues/3516)) ([d48429d](https://github.com/typescript-eslint/typescript-eslint/commit/d48429d97326545bb727f88ce9056270b1599a31)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 0c9f9a129e63..7e60f391a2ce 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.28.5", + "version": "4.29.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.28.5", - "@typescript-eslint/types": "4.28.5", - "@typescript-eslint/typescript-estree": "4.28.5", + "@typescript-eslint/scope-manager": "4.29.0", + "@typescript-eslint/types": "4.29.0", + "@typescript-eslint/typescript-estree": "4.29.0", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.28.5", + "@typescript-eslint/experimental-utils": "4.29.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 2c88e35160d5..679706adae40 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Features + +* **eslint-plugin:** Catch unused React import with new JSX transform ([#3577](https://github.com/typescript-eslint/typescript-eslint/issues/3577)) ([02998ea](https://github.com/typescript-eslint/typescript-eslint/commit/02998eac510665758b9a093d43afc310f3ac980d)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **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 cd220b2e3b37..1ae1b8c8696b 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.28.5", + "version": "4.29.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.28.5", - "@typescript-eslint/visitor-keys": "4.28.5" + "@typescript-eslint/types": "4.29.0", + "@typescript-eslint/visitor-keys": "4.29.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.28.5", + "@typescript-eslint/typescript-estree": "4.29.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 2c4338a53f21..6676a92d868f 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.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **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 d9ee72f1db98..1d36745bf64b 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.28.5", + "version": "4.29.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 9abe57bc44b8..e7555d3a747c 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Features + +* **eslint-plugin:** Catch unused React import with new JSX transform ([#3577](https://github.com/typescript-eslint/typescript-eslint/issues/3577)) ([02998ea](https://github.com/typescript-eslint/typescript-eslint/commit/02998eac510665758b9a093d43afc310f3ac980d)) +* **typescript-estree:** add support for custom module resolution ([#3516](https://github.com/typescript-eslint/typescript-eslint/issues/3516)) ([d48429d](https://github.com/typescript-eslint/typescript-eslint/commit/d48429d97326545bb727f88ce9056270b1599a31)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index c746e3336c43..1509752a2bf2 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.28.5", + "version": "4.29.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 313f0ed9be9b..c15d4985b054 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Bug Fixes + +* **typescript-estree:** correct tty check ([#3635](https://github.com/typescript-eslint/typescript-eslint/issues/3635)) ([62bcc93](https://github.com/typescript-eslint/typescript-eslint/commit/62bcc937f08cd18296ffbe96a3551ec1fb87aecd)) +* **typescript-estree:** ensure --fix works with singleRun mode ([#3655](https://github.com/typescript-eslint/typescript-eslint/issues/3655)) ([99eca0d](https://github.com/typescript-eslint/typescript-eslint/commit/99eca0d428187d4c29ded9ddd1b57b40ab463c01)) + + +### Features + +* **ast-spec:** make `BaseNode` & `BaseToken` more type-safe ([#3560](https://github.com/typescript-eslint/typescript-eslint/issues/3560)) ([a6c5604](https://github.com/typescript-eslint/typescript-eslint/commit/a6c5604b65b6330d047aa016fc46b8a597a6ae58)) +* **typescript-estree:** add support for custom module resolution ([#3516](https://github.com/typescript-eslint/typescript-eslint/issues/3516)) ([d48429d](https://github.com/typescript-eslint/typescript-eslint/commit/d48429d97326545bb727f88ce9056270b1599a31)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **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 00baf7782db7..1bbac1e52287 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.28.5", + "version": "4.29.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.28.5", - "@typescript-eslint/visitor-keys": "4.28.5", + "@typescript-eslint/types": "4.29.0", + "@typescript-eslint/visitor-keys": "4.29.0", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.28.5", + "@typescript-eslint/shared-fixtures": "4.29.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index c147f162a6b9..59dcf6afc862 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.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **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 e7bacdbc4f57..ba6aa2173aa4 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.28.5", + "version": "4.29.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.28.5", + "@typescript-eslint/types": "4.29.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 893130f533173c8f34a15088f7994362d0ffffec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Aug 2021 16:11:08 -0700 Subject: [PATCH 284/473] chore: bump tar from 4.4.13 to 4.4.15 (#3708) Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.15. - [Release notes](https://github.com/npm/node-tar/releases) - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/node-tar/compare/v4.4.13...v4.4.15) --- updated-dependencies: - dependency-name: tar dependency-type: indirect ... 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 c8cd25cb92f4..7bbfb03f87ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9088,9 +9088,9 @@ tar@5.0.5: yallist "^4.0.0" tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: - version "4.4.13" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" - integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== + version "4.4.15" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.15.tgz#3caced4f39ebd46ddda4d6203d48493a919697f8" + integrity sha512-ItbufpujXkry7bHH9NpQyTXPbJ72iTlXgkBAYsAjDXk3Ds8t/3NfO5P4xZGy7u+sYuQUbimgzswX4uQIEeNVOA== dependencies: chownr "^1.1.1" fs-minipass "^1.2.5" From db78642ea3ebd794e7deef767fa2c5195ef7c04c Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 9 Aug 2021 17:03:26 +0000 Subject: [PATCH 285/473] chore: publish v4.29.1 --- CHANGELOG.md | 8 ++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.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 | 8 ++++++++ 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 ++-- 24 files changed, 127 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46a6bf956ee6..4b7e7b3c81fa 100644 --- a/CHANGELOG.md +++ b/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.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + + + + + # [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) diff --git a/lerna.json b/lerna.json index 597602d30961..8bf9caabe7e3 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.29.0", + "version": "4.29.1", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index d883c719512f..4809804ff0da 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + # [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 2836f9b404db..be5d6e25501a 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.29.0", + "version": "4.29.1", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 340d6d776459..6c9adc003f30 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.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) **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 3704cfe5df1c..cac030f61869 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.29.0", + "version": "4.29.1", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.29.0", + "@typescript-eslint/experimental-utils": "4.29.1", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 267da2f340fb..825c52ce6a9c 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.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) **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 d6c946d4f05b..28fbaa0d83ce 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.29.0", + "version": "4.29.1", "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.29.0", + "@typescript-eslint/experimental-utils": "4.29.1", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.29.0" + "@typescript-eslint/parser": "4.29.1" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 82d712fef935..13623a87a343 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/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.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + + + + + # [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 7318829850c0..1a84349d4d00 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.29.0", + "version": "4.29.1", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.29.0", - "@typescript-eslint/scope-manager": "4.29.0", + "@typescript-eslint/experimental-utils": "4.29.1", + "@typescript-eslint/scope-manager": "4.29.1", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 985d64275284..24b072b31d92 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.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + # [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index b3f1c27d16ff..fbbc6b54b140 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.29.0", + "version": "4.29.1", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.29.0", - "@typescript-eslint/types": "4.29.0", - "@typescript-eslint/typescript-estree": "4.29.0", + "@typescript-eslint/scope-manager": "4.29.1", + "@typescript-eslint/types": "4.29.1", + "@typescript-eslint/typescript-estree": "4.29.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index ab28117c7537..b6854957c976 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.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) diff --git a/packages/parser/package.json b/packages/parser/package.json index 7e60f391a2ce..9471fda5957b 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.29.0", + "version": "4.29.1", "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.29.0", - "@typescript-eslint/types": "4.29.0", - "@typescript-eslint/typescript-estree": "4.29.0", + "@typescript-eslint/scope-manager": "4.29.1", + "@typescript-eslint/types": "4.29.1", + "@typescript-eslint/typescript-estree": "4.29.1", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.29.0", + "@typescript-eslint/experimental-utils": "4.29.1", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 679706adae40..d73a25f66f24 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.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 1ae1b8c8696b..148726ed78be 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.29.0", + "version": "4.29.1", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.29.0", - "@typescript-eslint/visitor-keys": "4.29.0" + "@typescript-eslint/types": "4.29.1", + "@typescript-eslint/visitor-keys": "4.29.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.29.0", + "@typescript-eslint/typescript-estree": "4.29.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 6676a92d868f..8c64a52b7878 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.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) **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 1d36745bf64b..92a7634b7c13 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.29.0", + "version": "4.29.1", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index e7555d3a747c..c0f85cb254f0 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.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) diff --git a/packages/types/package.json b/packages/types/package.json index 1509752a2bf2..40ecdd1b457a 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.29.0", + "version": "4.29.1", "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 c15d4985b054..b7658a636aef 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.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + # [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 1bbac1e52287..0f407ecd57f7 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.29.0", + "version": "4.29.1", "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.29.0", - "@typescript-eslint/visitor-keys": "4.29.0", + "@typescript-eslint/types": "4.29.1", + "@typescript-eslint/visitor-keys": "4.29.1", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.29.0", + "@typescript-eslint/shared-fixtures": "4.29.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 59dcf6afc862..3f7eb754bbce 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.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) **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 ba6aa2173aa4..7f973bdb1419 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.29.0", + "version": "4.29.1", "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.29.0", + "@typescript-eslint/types": "4.29.1", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 8c8d695e8295052870133e99fff6642b25e8f793 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 15 Aug 2021 18:56:45 -0700 Subject: [PATCH 286/473] chore: bump @babel/types from 7.14.9 to 7.15.0 (#3715) Bumps [@babel/types](https://github.com/babel/babel/tree/HEAD/packages/babel-types) from 7.14.9 to 7.15.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.15.0/packages/babel-types) --- updated-dependencies: - dependency-name: "@babel/types" dependency-type: direct:development update-type: version-update:semver-minor ... 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 7bbfb03f87ad..b034179c05aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -301,9 +301,9 @@ globals "^11.1.0" "@babel/types@*", "@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.12", "@babel/types@^7.14.0", "@babel/types@^7.14.2", "@babel/types@^7.14.4", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.9.tgz#f2b19c3f2f77c5708d67fe8f6046e9cea2b5036d" - integrity sha512-u0bLTnv3DFHeaQLYzb7oRJ1JHr1sv/SYDM7JSqHFFLwXG1wTZRughxFI5NCP8qBEo1rVVsn7Yg2Lvw49nne/Ow== + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.0.tgz#61af11f2286c4e9c69ca8deb5f4375a73c72dcbd" + integrity sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ== dependencies: "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" From 7240a3eb8b6e441376f6c50d10bd46cc5a3e9d35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 15 Aug 2021 18:56:55 -0700 Subject: [PATCH 287/473] chore: bump eslint-plugin-import from 2.23.4 to 2.24.0 (#3716) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.23.4 to 2.24.0. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/master/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.23.4...v2.24.0) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/yarn.lock b/yarn.lock index b034179c05aa..98df6d7a0c4b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4056,18 +4056,18 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-import-resolver-node@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" - integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== +eslint-import-resolver-node@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.5.tgz#939bbb0f74e179e757ca87f7a4a890dabed18ac4" + integrity sha512-XMoPKjSpXbkeJ7ZZ9icLnJMTY5Mc1kZbCakHquaFsXPpyWOwK0TK6CODO+0ca54UoM9LKOxyUNnoVZRl8TeaAg== dependencies: - debug "^2.6.9" - resolve "^1.13.1" + debug "^3.2.7" + resolve "^1.20.0" -eslint-module-utils@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz#b51be1e473dd0de1c5ea638e22429c2490ea8233" - integrity sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A== +eslint-module-utils@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz#94e5540dd15fe1522e8ffa3ec8db3b7fa7e7a534" + integrity sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q== dependencies: debug "^3.2.7" pkg-dir "^2.0.0" @@ -4088,16 +4088,16 @@ eslint-plugin-eslint-plugin@^3.0.3: eslint-utils "^2.1.0" eslint-plugin-import@^2.23.4: - version "2.23.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz#8dceb1ed6b73e46e50ec9a5bb2411b645e7d3d97" - integrity sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ== + version "2.24.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.24.0.tgz#697ffd263e24da5e84e03b282f5fb62251777177" + integrity sha512-Kc6xqT9hiYi2cgybOc0I2vC9OgAYga5o/rAFinam/yF/t5uBqxQbauNPMC6fgb640T/89P0gFoO27FOilJ/Cqg== dependencies: array-includes "^3.1.3" array.prototype.flat "^1.2.4" debug "^2.6.9" doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.4" - eslint-module-utils "^2.6.1" + eslint-import-resolver-node "^0.3.5" + eslint-module-utils "^2.6.2" find-up "^2.0.0" has "^1.0.3" is-core-module "^2.4.0" @@ -8366,7 +8366,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.20.0, resolve@^1.3.2: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.3.2: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== From e5a398f44c6d244d3516a6c9315a9351ec25b21b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 15 Aug 2021 18:57:23 -0700 Subject: [PATCH 288/473] chore: bump ts-node from 10.1.0 to 10.2.0 (#3718) Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.1.0 to 10.2.0. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v10.1.0...v10.2.0) --- updated-dependencies: - dependency-name: ts-node dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 47 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/yarn.lock b/yarn.lock index 98df6d7a0c4b..1736d44ef68f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -676,6 +676,18 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-typescript/-/dict-typescript-1.0.19.tgz#44f3ad1c93ffc89ebf98fa6964e1634e6612fc30" integrity sha512-qmJApzoVskDeJnLZzZMaafEDGbEg5Elt4c3Mpg49SWzIHm1N4VXCp5CcFfHsOinJ30dGrs3ARAJGJZIw56kK6A== +"@cspotcode/source-map-consumer@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" + integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== + +"@cspotcode/source-map-support@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.6.1.tgz#118511f316e2e87ee4294761868e254d3da47960" + integrity sha512-DX3Z+T5dt1ockmPdobJS/FAsQPW4V4SrWEhD2iYQT2Cb2tQsiMnYxrcUH9By/Z3B+v0S5LMBkQtV/XOBbpLEOg== + dependencies: + "@cspotcode/source-map-consumer" "0.8.0" + "@eslint/eslintrc@^0.4.1": version "0.4.1" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.1.tgz#442763b88cecbe3ee0ec7ca6d6dd6168550cbf14" @@ -2025,10 +2037,10 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.0.tgz#5bd046e508b1ee90bc091766758838741fdefd6e" integrity sha512-RKkL8eTdPv6t5EHgFKIVQgsDapugbuOptNd9OOunN/HAkzmmTnZELx1kNCK0rSdUYGmiFMM3rRQMAWiyp023LQ== -"@tsconfig/node16@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.1.tgz#a6ca6a9a0ff366af433f42f5f0e124794ff6b8f1" - integrity sha512-FTgBI767POY/lKNDNbIzgAX6miIDBs6NTCbdlDb8TrWovHsSvaVIZDlTqym29C6UqhzwcJx4CYr+AlrMywA0cA== +"@tsconfig/node16@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" + integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== "@types/argparse@1.0.38": version "1.0.38" @@ -2287,15 +2299,20 @@ acorn-walk@^7.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== +acorn-walk@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.1.1.tgz#3ddab7f84e4a7e2313f6c414c5b7dac85f4e3ebc" + integrity sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w== + acorn@^7.1.1, acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.2.4: - version "8.2.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.4.tgz#caba24b08185c3b56e3168e97d15ed17f4d31fd0" - integrity sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg== +acorn@^8.2.4, acorn@^8.4.1: + version "8.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" + integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA== agent-base@4, agent-base@^4.3.0: version "4.3.0" @@ -8710,7 +8727,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.17, source-map-support@^0.5.6: +source-map-support@^0.5.6: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== @@ -9313,19 +9330,21 @@ ts-jest@^27.0.1: yargs-parser "20.x" ts-node@^10.0.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.1.0.tgz#e656d8ad3b61106938a867f69c39a8ba6efc966e" - integrity sha512-6szn3+J9WyG2hE+5W8e0ruZrzyk1uFLYye6IGMBadnOzDh8aP7t8CbFpsfCiEx2+wMixAhjFt7lOZC4+l+WbEA== + version "10.2.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.2.0.tgz#f1e88249a00e26aa95e9a93c50f70241a8a1c4bb" + integrity sha512-FstYHtQz6isj8rBtYMN4bZdnXN1vq4HCbqn9vdNQcInRqtB86PePJQIxE6es0PhxKWhj2PHuwbG40H+bxkZPmg== dependencies: + "@cspotcode/source-map-support" "0.6.1" "@tsconfig/node10" "^1.0.7" "@tsconfig/node12" "^1.0.7" "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.1" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" arg "^4.1.0" create-require "^1.1.0" diff "^4.0.1" make-error "^1.1.1" - source-map-support "^0.5.17" yn "3.1.1" tsconfig-paths@^3.9.0: From 593d80933e23dbb9c996bed383af69ee2726a875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 16 Aug 2021 03:58:14 +0200 Subject: [PATCH 289/473] chore: update NX (#3734) --- package.json | 8 ++--- yarn.lock | 82 ++++++++++++++++++++++++++-------------------------- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index e7e708f0685f..70692ebe29f8 100644 --- a/package.json +++ b/package.json @@ -77,10 +77,10 @@ "@commitlint/cli": "^13.1.0", "@commitlint/config-conventional": "^13.1.0", "@commitlint/config-lerna-scopes": "^13.1.0", - "@nrwl/cli": "12.6.3", - "@nrwl/nx-cloud": "12.3.5", - "@nrwl/tao": "12.6.3", - "@nrwl/workspace": "12.6.3", + "@nrwl/cli": "12.7.1", + "@nrwl/nx-cloud": "12.3.10", + "@nrwl/tao": "12.7.1", + "@nrwl/workspace": "12.7.1", "@types/babel__code-frame": "^7.0.2", "@types/debug": "^4.1.5", "@types/eslint-visitor-keys": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 1736d44ef68f..a030e6dfd7e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1755,37 +1755,37 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@nrwl/cli@12.6.3": - version "12.6.3" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.6.3.tgz#d74a0a639698d0b8c9347e0679ef9e8ba97182a4" - integrity sha512-UaVaoknao2+EHWlcyMahNHwelXVdDPDc13ki6T2pFYm9oFj+36YLXexhjwUxafeD/Po8nahaVWhsgqGcjUNgxQ== +"@nrwl/cli@12.7.1": + version "12.7.1" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.7.1.tgz#cd781731c0396975ce44edb6c80b8fccbba4b23e" + integrity sha512-Rjv9Pwv2Bdgztkr0GnKuE/W7DmSTQI/bvdtKOqcOJIsL4i5xJCZDxVDbhmfPoa4NXPIYHeW3EqfFAP4PH1rCKg== dependencies: - "@nrwl/tao" "12.6.3" + "@nrwl/tao" "12.7.1" chalk "4.1.0" v8-compile-cache "2.3.0" yargs "15.4.1" yargs-parser "20.0.0" -"@nrwl/devkit@12.6.3": - version "12.6.3" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.6.3.tgz#990885aef16c6e312de8655ba254b22b6eb21c76" - integrity sha512-HeBYesksZirm85sp5a2F23y/V8z2ajBN+Ej29R9E/hpnhOsZScpLxgxmhl+Cq4bd1omVJ6XRvUDwGwuIf1kQmg== +"@nrwl/devkit@12.7.1": + version "12.7.1" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.7.1.tgz#aea0d8db1663fed44b5189452beae87bf432c60f" + integrity sha512-g88SWsXbiZDvL+4PWCBFlhzsg0niEJCxGDJ1EV+dLexAM3iD1aBn3EK2ygaF1sgabBNlJnUgbpU14/N5SexZuA== dependencies: - "@nrwl/tao" "12.6.3" + "@nrwl/tao" "12.7.1" ejs "^3.1.5" ignore "^5.0.4" rxjs "^6.5.4" semver "7.3.4" tslib "^2.0.0" -"@nrwl/jest@12.6.3": - version "12.6.3" - resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.6.3.tgz#9d020f61a1fbf63280034b7387c9f62bebafc1c6" - integrity sha512-wcWoq0bLFZeYGR7V4oAzzhp3RxnmeNRLJsYFVI7ShWaYW7em2MGyFiqYt6/Vp5lPT0WlgQH7HujDCx5EYCXVPQ== +"@nrwl/jest@12.7.1": + version "12.7.1" + resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.7.1.tgz#1f90c3d032c10e7e5afd736bf74c328002350449" + integrity sha512-+Pg9UimjoDWAJUH2SLqHcdn+6gLvzB6uISDqh4tvzyixiHSUNcY/WMqP1X9qVFfFA4HMwr8YvA7RUFHbSCrcxA== dependencies: "@jest/reporters" "27.0.6" "@jest/test-result" "27.0.6" - "@nrwl/devkit" "12.6.3" + "@nrwl/devkit" "12.7.1" chalk "4.1.0" identity-obj-proxy "3.0.0" jest-config "27.0.6" @@ -1794,33 +1794,33 @@ rxjs "^6.5.4" tslib "^2.0.0" -"@nrwl/linter@12.6.3": - version "12.6.3" - resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.6.3.tgz#f66134a1cea2cf890c3c6e31ca3a3bbbddfaa02d" - integrity sha512-9Dmz7/ke0SMxVJLLdBfqa4U373Hrc7HDrbVPutUImNH/aEybhhYIc6yIURm+kUMswiwYSHvLpbb3QbvsxUZnYQ== +"@nrwl/linter@12.7.1": + version "12.7.1" + resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.7.1.tgz#c5ccd17ade2b3d3f6410d18a4fd0ce8b2d3e5111" + integrity sha512-FUPaUhqDcXUjRW3hKYnkQ9c569TGr+zS3YDoNKSbOFBrr6MCRRPIJMRo6bDS38aMMIpOZ4tSwuvxuoVfOfW1Fg== dependencies: - "@nrwl/devkit" "12.6.3" + "@nrwl/devkit" "12.7.1" glob "7.1.4" minimatch "3.0.4" tmp "~0.2.1" tslib "^2.0.0" -"@nrwl/nx-cloud@12.3.5": - version "12.3.5" - resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.3.5.tgz#e2c90e0f572eeddbc495a3bbb3edcfc0f3c1505e" - integrity sha512-4mrDh5vucDFFD9l6e5RROhloE1SFFERYZhpHn1wGV2USlaV2XtRRNfoVqoxqojBTaDHJ7PS4NJc974SzR9YTOw== +"@nrwl/nx-cloud@12.3.10": + version "12.3.10" + resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.3.10.tgz#ced00d87b584eb40c1732089c1bc2df544b8a2cc" + integrity sha512-5ZychlcrcDrPEdpPOsH1/UcakunK9PzhgCQmrFA+fHXRxzRbLE4K/Mz8dyIs+1aloXhMoYPncHsnRRwxyLhjXQ== dependencies: axios "^0.21.1" chalk "4.1.0" node-machine-id "^1.1.12" rxjs "6.5.5" strip-json-comments "^3.1.1" - tar "5.0.5" + tar "5.0.7" -"@nrwl/tao@12.6.3": - version "12.6.3" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.6.3.tgz#3eee7eee4d18a0580eee30fe3e3df0193195bc07" - integrity sha512-KlVdQEyxi/mk0X9FBY6w72XouiMesD3FCCrqgKx5oShOx2GehuP+LhOOrfnuMOT7WgKBCoHnqhnK1x6X1F5/XQ== +"@nrwl/tao@12.7.1": + version "12.7.1" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.7.1.tgz#467b5b56f8e503d4a6acbd6eecd4ad51042d8d27" + integrity sha512-cQvrFwA+mEAiY3HwIuTjsO/yxgGEoffdUcsH6Oak3dcypkmTf4mVxqmuyzvJ5smt8cggg8qb7BEWowWs31folw== dependencies: chalk "4.1.0" enquirer "~2.3.6" @@ -1833,15 +1833,15 @@ tslib "^2.0.0" yargs-parser "20.0.0" -"@nrwl/workspace@12.6.3": - version "12.6.3" - resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.6.3.tgz#42a0228ae6e6b788055f672e422676a863fbaf46" - integrity sha512-/5bCdRYqn/R50YGjNMZRbnOx7ACKoOsuwW1hpe6in36qNjquT0QXlukSTo72dqCoHgDf5Ha34sgZndsEMSnHPg== +"@nrwl/workspace@12.7.1": + version "12.7.1" + resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.7.1.tgz#b140311473a2a45776674665bffb5eb001ce3465" + integrity sha512-84XRqtRc4pfO8agQqEX984w5HUyN+xWhz3EZv88w8QQfHdIooARj8wRb2lyKu7wHdaKaYNzx0pG9LLuVQYq6GQ== dependencies: - "@nrwl/cli" "12.6.3" - "@nrwl/devkit" "12.6.3" - "@nrwl/jest" "12.6.3" - "@nrwl/linter" "12.6.3" + "@nrwl/cli" "12.7.1" + "@nrwl/devkit" "12.7.1" + "@nrwl/jest" "12.7.1" + "@nrwl/linter" "12.7.1" chalk "4.1.0" chokidar "^3.5.1" cosmiconfig "^4.0.0" @@ -9092,10 +9092,10 @@ table@^6.0.9: string-width "^4.2.0" strip-ansi "^6.0.0" -tar@5.0.5: - version "5.0.5" - resolved "https://registry.yarnpkg.com/tar/-/tar-5.0.5.tgz#03fcdb7105bc8ea3ce6c86642b9c942495b04f93" - integrity sha512-MNIgJddrV2TkuwChwcSNds/5E9VijOiw7kAc1y5hTNJoLDSuIyid2QtLYiCYNnICebpuvjhPQZsXwUL0O3l7OQ== +tar@5.0.7: + version "5.0.7" + resolved "https://registry.yarnpkg.com/tar/-/tar-5.0.7.tgz#42ff8ca3b731a52f4f2be72cc4cdd7688268f2af" + integrity sha512-g0qlHHRtAZAxzkZkJvt0P5C6ODEolw2paouzsSbVqE7l5jKani1m9ogy7VxGp6hEngiKpPCwkh9pX5UH8Wp6QA== dependencies: chownr "^1.1.3" fs-minipass "^2.0.0" From a17f1ef9cf0f86811df0ea7f4f46ce36ff02de0c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 15 Aug 2021 19:38:09 -0700 Subject: [PATCH 290/473] chore: bump @types/json-schema from 7.0.8 to 7.0.9 (#3719) Bumps [@types/json-schema](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/json-schema) from 7.0.8 to 7.0.9. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/json-schema) --- updated-dependencies: - dependency-name: "@types/json-schema" dependency-type: direct:production update-type: version-update:semver-patch ... 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 a030e6dfd7e2..b0c0b88957cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2157,9 +2157,9 @@ pretty-format "^26.0.0" "@types/json-schema@^7.0.7": - version "7.0.8" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.8.tgz#edf1bf1dbf4e04413ca8e5b17b3b7d7d54b59818" - integrity sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg== + version "7.0.9" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== "@types/json5@^0.0.29": version "0.0.29" From a602caa215c7f95fd07ac7756bb5f1c31807a5d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 15 Aug 2021 19:38:19 -0700 Subject: [PATCH 291/473] chore: bump path-parse from 1.0.6 to 1.0.7 (#3726) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... 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 b0c0b88957cf..782575f44ba8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7826,9 +7826,9 @@ path-key@^3.0.0, path-key@^3.1.0: integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-type@^1.0.0: version "1.1.0" From bf402f4a04397943ca916c8333186f539986a247 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 16 Aug 2021 17:03:43 +0000 Subject: [PATCH 292/473] chore: publish v4.29.2 --- CHANGELOG.md | 8 ++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.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 | 8 ++++++++ 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 ++-- 24 files changed, 127 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b7e7b3c81fa..f4276dd49ea6 100644 --- a/CHANGELOG.md +++ b/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.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + + + + + ## [4.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) **Note:** Version bump only for package @typescript-eslint/typescript-eslint diff --git a/lerna.json b/lerna.json index 8bf9caabe7e3..64338d06040a 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.29.1", + "version": "4.29.2", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 4809804ff0da..8fadf03023f8 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + ## [4.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index be5d6e25501a..a2641cd27b7a 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.29.1", + "version": "4.29.2", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 6c9adc003f30..64c182587dff 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.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) **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 cac030f61869..20e9af067ee5 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.29.1", + "version": "4.29.2", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.29.1", + "@typescript-eslint/experimental-utils": "4.29.2", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 825c52ce6a9c..026fa6096893 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.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) **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 28fbaa0d83ce..8c667487a3b5 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.29.1", + "version": "4.29.2", "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.29.1", + "@typescript-eslint/experimental-utils": "4.29.2", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.29.1" + "@typescript-eslint/parser": "4.29.2" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 13623a87a343..d3a5e10bf87e 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/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.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + + + + + ## [4.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 1a84349d4d00..773ba892154b 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.29.1", + "version": "4.29.2", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.29.1", - "@typescript-eslint/scope-manager": "4.29.1", + "@typescript-eslint/experimental-utils": "4.29.2", + "@typescript-eslint/scope-manager": "4.29.2", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 24b072b31d92..6b0761003273 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.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + ## [4.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) **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 fbbc6b54b140..5b3441db43a2 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.29.1", + "version": "4.29.2", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.29.1", - "@typescript-eslint/types": "4.29.1", - "@typescript-eslint/typescript-estree": "4.29.1", + "@typescript-eslint/scope-manager": "4.29.2", + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/typescript-estree": "4.29.2", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index b6854957c976..ee570f030f93 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.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + ## [4.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 9471fda5957b..3e71952d7f3f 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.29.1", + "version": "4.29.2", "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.29.1", - "@typescript-eslint/types": "4.29.1", - "@typescript-eslint/typescript-estree": "4.29.1", + "@typescript-eslint/scope-manager": "4.29.2", + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/typescript-estree": "4.29.2", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.29.1", + "@typescript-eslint/experimental-utils": "4.29.2", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index d73a25f66f24..6441b76b2107 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.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + ## [4.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) **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 148726ed78be..085344a8229f 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.29.1", + "version": "4.29.2", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.29.1", - "@typescript-eslint/visitor-keys": "4.29.1" + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/visitor-keys": "4.29.2" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.29.1", + "@typescript-eslint/typescript-estree": "4.29.2", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 8c64a52b7878..f4eba0cfe4cb 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.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) **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 92a7634b7c13..5d542b8346ee 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.29.1", + "version": "4.29.2", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index c0f85cb254f0..7bae10a74c10 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.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + ## [4.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 40ecdd1b457a..eba3d06dd212 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.29.1", + "version": "4.29.2", "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 b7658a636aef..e4b318434d3c 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.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + ## [4.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) **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 0f407ecd57f7..4e04461b20ad 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.29.1", + "version": "4.29.2", "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.29.1", - "@typescript-eslint/visitor-keys": "4.29.1", + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/visitor-keys": "4.29.2", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.29.1", + "@typescript-eslint/shared-fixtures": "4.29.2", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 3f7eb754bbce..b699c0830d40 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.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.29.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.0...v4.29.1) (2021-08-09) **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 7f973bdb1419..5e47b383d1eb 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.29.1", + "version": "4.29.2", "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.29.1", + "@typescript-eslint/types": "4.29.2", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 6bfe1caad1816ed553c3a2d1a75f210cdb57308f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Aug 2021 11:35:38 -0700 Subject: [PATCH 293/473] chore: bump lint-staged from 11.1.1 to 11.1.2 (#3741) Bumps [lint-staged](https://github.com/okonet/lint-staged) from 11.1.1 to 11.1.2. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](https://github.com/okonet/lint-staged/compare/v11.1.1...v11.1.2) --- updated-dependencies: - dependency-name: lint-staged dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 782575f44ba8..b669a79cb401 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6579,16 +6579,15 @@ linkify-it@^3.0.1: uc.micro "^1.0.1" lint-staged@^11.0.0: - version "11.1.1" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.1.1.tgz#9c2018b872654cf80b2b1ff5a10b6b74aef6e300" - integrity sha512-eTNGe6i78PSUUH2BZi1gZmGmNfb8IeN4z2OzMYxSZ1qnP1WXKn1E7D+OHwLbRDm/wQINnzIj0bsKJ6lLVSuZiQ== + version "11.1.2" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.1.2.tgz#4dd78782ae43ee6ebf2969cad9af67a46b33cd90" + integrity sha512-6lYpNoA9wGqkL6Hew/4n1H6lRqF3qCsujVT0Oq5Z4hiSAM7S6NksPJ3gnr7A7R52xCtiZMcEUNNQ6d6X5Bvh9w== dependencies: chalk "^4.1.1" cli-truncate "^2.1.0" commander "^7.2.0" cosmiconfig "^7.0.0" debug "^4.3.1" - dedent "^0.7.0" enquirer "^2.3.6" execa "^5.0.0" listr2 "^3.8.2" From 389a852a8bffce377e99581ffcad0eb69fae1d2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Aug 2021 11:35:54 -0700 Subject: [PATCH 294/473] chore: bump @microsoft/api-extractor from 7.18.4 to 7.18.5 (#3740) Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack) from 7.18.4 to 7.18.5. - [Release notes](https://github.com/microsoft/rushstack/releases) - [Commits](https://github.com/microsoft/rushstack/compare/@microsoft/api-extractor_v7.18.4...@microsoft/api-extractor_v7.18.5) --- updated-dependencies: - dependency-name: "@microsoft/api-extractor" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/yarn.lock b/yarn.lock index b669a79cb401..e6f5339d644e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1679,24 +1679,24 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@microsoft/api-extractor-model@7.13.4": - version "7.13.4" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.4.tgz#bff4a52a35da5d9896650041d4f7a769c970da60" - integrity sha512-NYaR3hJinh089/Gkee8fvmEFf9zKkoUvNxgkqUlKBCDXH2+Ou4tNDuL8G6zjhKBPicHkp2VcL8l7q9H6txUkjQ== +"@microsoft/api-extractor-model@7.13.5": + version "7.13.5" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.5.tgz#7836a81ba47b9a654062ed0361e4eee69afae51e" + integrity sha512-il6AebNltYo5hEtqXZw4DMvrwBPn6+F58TxwqmsLY+U+sSJNxaYn2jYksArrjErXVPR3gUgRMqD6zsdIkg+WEQ== dependencies: "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.39.1" + "@rushstack/node-core-library" "3.40.0" "@microsoft/api-extractor@^7.15.2": - version "7.18.4" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.4.tgz#2d7641b36d323b4ac710d838a972be7e4f14d32b" - integrity sha512-Wx45VuIAu09Pk9Qwzt0I57OX31BaWO2r6+mfSXqYFsJjYTqwUkdFh92G1GKYgvuR9oF/ai7w10wrFpx5WZYbGg== + version "7.18.5" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.5.tgz#cc2804d7c8b9d0f1e63fd85d0448569b767db102" + integrity sha512-NUGS6WxexziEnroHUOI3KKVmMX02god7SLA8Y4a5GKCL5k7AHuHFqP2bpd5Otx2odfbdj15ObO7FU/XA3Oxh8w== dependencies: - "@microsoft/api-extractor-model" "7.13.4" + "@microsoft/api-extractor-model" "7.13.5" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.39.1" + "@rushstack/node-core-library" "3.40.0" "@rushstack/rig-package" "0.2.13" "@rushstack/ts-command-line" "4.8.1" colors "~1.2.1" @@ -1970,10 +1970,10 @@ dependencies: "@types/node" ">= 8" -"@rushstack/node-core-library@3.39.1": - version "3.39.1" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.39.1.tgz#dd1dc270e3035ac4de270f0ca80c25724ce19cc7" - integrity sha512-HHgMEHZTXQ3NjpQzWd5+fSt2Eod9yFwj6qBPbaeaNtDNkOL8wbLoxVimQNtcH0Qhn4wxF5u2NTDNFsxf2yd1jw== +"@rushstack/node-core-library@3.40.0": + version "3.40.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.40.0.tgz#2551915ea34e34ec2abb7172b9d7f4546144d9d4" + integrity sha512-P6uMPI7cqTdawLSPAG5BQrBu1MHlGRPqecp7ruIRgyukIEzkmh0QAnje4jAL/l1r3hw0qe4e+Dz5ZSnukT/Egg== dependencies: "@types/node" "10.17.13" colors "~1.2.1" From 8a3217a7ec141bdd2b785b71417cafadaf53b305 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Aug 2021 11:36:08 -0700 Subject: [PATCH 295/473] chore: bump cspell from 5.6.6 to 5.7.2 (#3745) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.6.6 to 5.7.2. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/compare/v5.6.6...v5.7.2) --- updated-dependencies: - dependency-name: cspell dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 221 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 116 insertions(+), 105 deletions(-) diff --git a/yarn.lock b/yarn.lock index e6f5339d644e..6f332d75f128 100644 --- a/yarn.lock +++ b/yarn.lock @@ -461,50 +461,51 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.6.6": - version "5.6.6" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.6.6.tgz#17ed23657d4a67fa8e60dacf40bfdff402009dd0" - integrity sha512-am79SwDYrs0g1aLmtoZDWIj/IT070ISPoZabpTqnR58MFn0NGrLlF9yEKy3oVZtJhe10L3WWHreYZkdELLS9Sg== +"@cspell/cspell-bundled-dicts@^5.7.2": + version "5.7.2" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.7.2.tgz#077264d9aeed15e33dda12dcbde441f0e77db63a" + integrity sha512-Vd//xmvA1YeTpyCBbt3fVjYKNbCI6tvS9/Cfjt8PmV91loysX4TWJnI+mRY+2Eltf4WfW6SAtbC7/YUWrvBgQA== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" "@cspell/dict-bash" "^1.0.15" - "@cspell/dict-companies" "^1.0.38" + "@cspell/dict-companies" "^1.0.40" "@cspell/dict-cpp" "^1.1.39" "@cspell/dict-cryptocurrencies" "^1.0.10" "@cspell/dict-csharp" "^1.0.11" - "@cspell/dict-css" "^1.0.11" + "@cspell/dict-css" "^1.0.12" "@cspell/dict-django" "^1.0.26" - "@cspell/dict-dotnet" "^1.0.27" - "@cspell/dict-elixir" "^1.0.24" - "@cspell/dict-en-gb" "^1.1.31" - "@cspell/dict-en_us" "^1.2.44" + "@cspell/dict-dotnet" "^1.0.29" + "@cspell/dict-elixir" "^1.0.25" + "@cspell/dict-en-gb" "^1.1.32" + "@cspell/dict-en_us" "^1.2.45" "@cspell/dict-filetypes" "^1.1.7" "@cspell/dict-fonts" "^1.0.14" "@cspell/dict-fullstack" "^1.0.38" "@cspell/dict-golang" "^1.1.24" "@cspell/dict-haskell" "^1.0.13" - "@cspell/dict-html" "^1.1.7" + "@cspell/dict-html" "^1.1.9" "@cspell/dict-html-symbol-entities" "^1.0.23" - "@cspell/dict-java" "^1.0.22" + "@cspell/dict-java" "^1.0.23" "@cspell/dict-latex" "^1.0.25" "@cspell/dict-lorem-ipsum" "^1.0.22" "@cspell/dict-lua" "^1.0.16" "@cspell/dict-node" "^1.0.12" "@cspell/dict-npm" "^1.0.15" "@cspell/dict-php" "^1.0.24" - "@cspell/dict-powershell" "^1.0.16" - "@cspell/dict-python" "^1.0.35" + "@cspell/dict-powershell" "^1.0.18" + "@cspell/dict-public-licenses" "^1.0.3" + "@cspell/dict-python" "^1.0.37" "@cspell/dict-ruby" "^1.0.14" - "@cspell/dict-rust" "^1.0.22" + "@cspell/dict-rust" "^1.0.23" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.37" + "@cspell/dict-software-terms" "^1.0.40" "@cspell/dict-typescript" "^1.0.19" -"@cspell/cspell-types@^5.6.5": - version "5.6.5" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.6.5.tgz#445e73616e60ea27314595cedd8979dd8cae1091" - integrity sha512-NCcMIelcQFwr2Yu9ma0buVBAFBlqtlxvAurV5UYmdaYyFv6bKO81HN9oMpu5DFev0ntOjZUSYdAGAhCUuikd3w== +"@cspell/cspell-types@^5.7.2": + version "5.7.2" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.7.2.tgz#93c2632cf8ce9ae98f55503380709b13da891b9c" + integrity sha512-hRInos9xQxPk8Wv0Y23UwFddN5RkyKVhqqH6kEeWir1sok2eMy58n/eIJvVPyhx1LVeP4QS4a/n6/OigUQrNVw== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -521,10 +522,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-1.0.15.tgz#ac70ab1572d9b8d0e3cf7777383b6caa2daad022" integrity sha512-rY5Bq4RWTgJTioG8vqFbCmnalc/UEM+iBuAZBYvBfT3nU/6SN00Zjyvlh823ir2ODkUryT29CwRYwXcPnuM04w== -"@cspell/dict-companies@^1.0.38": - version "1.0.38" - resolved "https://registry.yarnpkg.com/@cspell/dict-companies/-/dict-companies-1.0.38.tgz#f915ae1e83de7554875350c19e53e91e948679f2" - integrity sha512-5GzatV4gOAvRW8Hz9T90XMN/svRhmzQecE4C7EcSibZkHZC1o3frTFNuzN2eKzvWb0f9xKuhOBcw9+jm8T9BzQ== +"@cspell/dict-companies@^1.0.40": + version "1.0.40" + resolved "https://registry.yarnpkg.com/@cspell/dict-companies/-/dict-companies-1.0.40.tgz#edd7f47fc683dfa1b02cd48fb12ad732d2eece61" + integrity sha512-Aw07qiTroqSST2P5joSrC4uOA05zTXzI2wMb+me3q4Davv1D9sCkzXY0TGoC2vzhNv5ooemRi9KATGaBSdU1sw== "@cspell/dict-cpp@^1.1.39": version "1.1.39" @@ -541,35 +542,35 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-csharp/-/dict-csharp-1.0.11.tgz#cacdf477a31ca8326c2c91bee0b42b9f6b3c4a7c" integrity sha512-nub+ZCiTgmT87O+swI+FIAzNwaZPWUGckJU4GN402wBq420V+F4ZFqNV7dVALJrGaWH7LvADRtJxi6cZVHJKeA== -"@cspell/dict-css@^1.0.11": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@cspell/dict-css/-/dict-css-1.0.11.tgz#09119e9035137ba98c26c62402237faf3be9ac95" - integrity sha512-2Or5oF5ojaXYD8QbO4Z+QdaNXSp+ZyNLJdeyKfejbxLvpL5feSNB0oYtTNrweFPTAvJKQ4DJsdEXy0/s31haRg== +"@cspell/dict-css@^1.0.12": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@cspell/dict-css/-/dict-css-1.0.12.tgz#ec01cec102c8b128aad5e29c97dfb7a982887e12" + integrity sha512-K6yuxej7n454O7dwKG6lHacHrAOMZ0PhMEbmV6qH2JH0U4TtWXfBASYugHvXZCDDx1UObpiJP+3tQJiBqfGpHA== "@cspell/dict-django@^1.0.26": version "1.0.26" resolved "https://registry.yarnpkg.com/@cspell/dict-django/-/dict-django-1.0.26.tgz#b97ce0112fbe8c3c3ada0387c68971b5e27483ab" integrity sha512-mn9bd7Et1L2zuibc08GVHTiD2Go3/hdjyX5KLukXDklBkq06r+tb0OtKtf1zKodtFDTIaYekGADhNhA6AnKLkg== -"@cspell/dict-dotnet@^1.0.27": - version "1.0.27" - resolved "https://registry.yarnpkg.com/@cspell/dict-dotnet/-/dict-dotnet-1.0.27.tgz#bc1f27799553ac8780f32589e7b17ef9bfa51bf2" - integrity sha512-Ap/qpvZa6JTZI/I4ou3zJHKByjTMA6toaAUXDm4h9xVBiSESD1EkraZ/Z130w/NmJja7Xjv/UurH5IM6xGjTJQ== +"@cspell/dict-dotnet@^1.0.29": + version "1.0.29" + resolved "https://registry.yarnpkg.com/@cspell/dict-dotnet/-/dict-dotnet-1.0.29.tgz#e362a85b28c2862f49da7949a7cc347f872b0df4" + integrity sha512-41fx7YQM986MBAyJpqL0fH6WOKLG/tNev4NbydNy3avYxz/smr+VwIwGN9/GLNORL5hQLiSQxPU5jfpx+bN94g== -"@cspell/dict-elixir@^1.0.24": - version "1.0.24" - resolved "https://registry.yarnpkg.com/@cspell/dict-elixir/-/dict-elixir-1.0.24.tgz#fc5c15b9f66b8aa5e25c98f54103c796fec70aba" - integrity sha512-pEX6GYlEx4Teusw/m+XmqoXzcHOqpcn1ZX4H33ONqR81XdPwbaKorBr1IG23Ic76IhwrFlOqs48tcnxrHYpFnA== +"@cspell/dict-elixir@^1.0.25": + version "1.0.25" + resolved "https://registry.yarnpkg.com/@cspell/dict-elixir/-/dict-elixir-1.0.25.tgz#bec4fd754c99f646e553184df12df88b54da1c04" + integrity sha512-ZmawoBYjM5k+8fNudRMkK+PpHjhyAFAZt2rUu1EGj2rbCvE3Fn2lhRbDjbreN7nWRvcLRTW+xuPXtKP11X0ahQ== -"@cspell/dict-en-gb@^1.1.31": - version "1.1.31" - resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.31.tgz#56a99d9bfec9ded8d6fe456a63c2454f42a97b98" - integrity sha512-4VtiDhMOWrgimmYYHO0oQDSs6izvAnAhpLHoBzFeME6XMpO15XDzMWvd8ICca7kk5hk+XEGnPF4Mpa5aHJh6Pg== +"@cspell/dict-en-gb@^1.1.32": + version "1.1.32" + resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.32.tgz#587057d1cfac67aa3f2a950ec00ec3e33a239689" + integrity sha512-iu83IDyCefo0T4NipEa3jtpJ/WDSr1IWt35kljolj7HFDFrjLr4Y/2t8yqtmB4otturWpa5T/G3/k90y2KU08Q== -"@cspell/dict-en_us@^1.2.44": - version "1.2.44" - resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.44.tgz#1cd016013f069c62c6d37a6d463bae1d6e47461e" - integrity sha512-pdq/HXsrB34VRYZIv7jidikIQBVLSKyCLkRXBvmkbUg4NkfpNcmmA1bVXc3gOhgghDNctGXe5UIIl8hfY1nvEg== +"@cspell/dict-en_us@^1.2.45": + version "1.2.45" + resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.45.tgz#1314a9d81a1fd3cc7ed381dc6a0da10e7c2d02f9" + integrity sha512-UPwR4rfiJCxnS+Py+EK9E4AUj3aPZE4p/yBRSHN+5aBQConlI0lLDtMceH5wlupA/sQTU1ERZGPJA9L96jVSyQ== "@cspell/dict-filetypes@^1.1.7": version "1.1.7" @@ -601,15 +602,15 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-1.0.23.tgz#0efbdbc7712c9fbe545e14acac637226ac948f2d" integrity sha512-PV0UBgcBFbBLf/m1wfkVMM8w96kvfHoiCGLWO6BR3Q9v70IXoE4ae0+T+f0CkxcEkacMqEQk/I7vuE9MzrjaNw== -"@cspell/dict-html@^1.1.7": - version "1.1.7" - resolved "https://registry.yarnpkg.com/@cspell/dict-html/-/dict-html-1.1.7.tgz#723d2c0ef37401d59478685add875d2fa2ae2bad" - integrity sha512-5pea/5fA4iy1s5ko+JvCzNsCO5FGdjT006feVmCIxpUsPdgrV/7ONdm6508XOftot3opRlhEqWq/kB8H+GNdrQ== +"@cspell/dict-html@^1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@cspell/dict-html/-/dict-html-1.1.9.tgz#e506ca550ffcdad820ba0aa157a48be869f23bf2" + integrity sha512-vvnYia0tyIS5Fdoz+gEQm77MGZZE66kOJjuNpIYyRHCXFAhWdYz3SmkRm6YKJSWSvuO+WBJYTKDvkOxSh3Fx/w== -"@cspell/dict-java@^1.0.22": - version "1.0.22" - resolved "https://registry.yarnpkg.com/@cspell/dict-java/-/dict-java-1.0.22.tgz#30e660803922755c314fb61e9c8cd58a1f4bd47e" - integrity sha512-CVAJ29dx1XwwutgsMgaj5eCl1Nc7X7qFhWL2KkAdu78A/NUIaS+1I9KS0hHhdZx/wLke9dH8TR7NyPQGpGxeAw== +"@cspell/dict-java@^1.0.23": + version "1.0.23" + resolved "https://registry.yarnpkg.com/@cspell/dict-java/-/dict-java-1.0.23.tgz#ec95ff2f2c34d5e8e08ba817980b37e387e608cb" + integrity sha512-LcOg9srYLDoNGd8n3kbfDBlZD+LOC9IVcnFCdua1b/luCHNVmlgBx7e677qPu7olpMYOD5TQIVW2OmM1+/6MFA== "@cspell/dict-latex@^1.0.25": version "1.0.25" @@ -641,35 +642,40 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-php/-/dict-php-1.0.24.tgz#40c15a4c5e1e2deba28841e2b498595b13f0ff88" integrity sha512-vHCqETX1idT9tN1plkxUFnXMIHjbbrNOINZh1PYSvVlBrOdahSaL/g6dOJZC5QTaaidoU4WXUlgnNb/7JN4Plg== -"@cspell/dict-powershell@^1.0.16": - version "1.0.16" - resolved "https://registry.yarnpkg.com/@cspell/dict-powershell/-/dict-powershell-1.0.16.tgz#06a2966b2dca7a0d97938ff90fcfc74354cfb7ba" - integrity sha512-cbauyYR6H53gfd/J9B3wgly9kg1joLSVxxqbry+y0BqF7FBtkctnXev2WHRbX68o6X9iQPhUz6+3zGKwFW5Stg== +"@cspell/dict-powershell@^1.0.18": + version "1.0.18" + resolved "https://registry.yarnpkg.com/@cspell/dict-powershell/-/dict-powershell-1.0.18.tgz#c744629a168df008641ed074633a548390bac98f" + integrity sha512-LAfCJBy1hga8/KI/IpAg/GrnoP+b4SbNGdiXiXrejeZ7ZTVfj4qYsTCkZ2p7eYUu92FLyJT4jGex0fGZn/PtVw== -"@cspell/dict-python@^1.0.35": - version "1.0.35" - resolved "https://registry.yarnpkg.com/@cspell/dict-python/-/dict-python-1.0.35.tgz#0f9880626a1422cdd2be39b18086ae0cd59b4c3f" - integrity sha512-vVlx01SG8VjNHAQGaE/OGSShX1CoiXmdmCBsPX2sip6JmBluengGPtRPhpVLQOMxnXvTKg96eGtcnVRrYkVzag== +"@cspell/dict-public-licenses@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@cspell/dict-public-licenses/-/dict-public-licenses-1.0.3.tgz#d02ee79f7b7aecd696695e5aba135e6553e154ec" + integrity sha512-sXjxOHJ9Q4rZvE1UbwpwJQ8EXO3fadKBjJIWmz0z+dZAbvTrmz5Ln1Ef9ruJvLPfwAps8m3TCV6Diz60RAQqHg== + +"@cspell/dict-python@^1.0.37": + version "1.0.37" + resolved "https://registry.yarnpkg.com/@cspell/dict-python/-/dict-python-1.0.37.tgz#59d3f7dbcb759463529817156c5ac09649b54f0b" + integrity sha512-RPeYJxC7t6k9uL4aQp5kLarOddEAqfRw9VBTt+cOVSlMqEtEtxJGm8w91V28fwnRX4hQR0yhiHPEYcdLpMtpfQ== "@cspell/dict-ruby@^1.0.14": version "1.0.14" resolved "https://registry.yarnpkg.com/@cspell/dict-ruby/-/dict-ruby-1.0.14.tgz#6ecbda6e0a01e4692abd4a14b64ff8f61d86e161" integrity sha512-XHBGN4U1y9rjRuqrCA+3yIm2TCdhwwHXpOEcWkNeyXm8K03yPnIrKFS+kap8GTTrLpfNDuFsrmkkQTa7ssXLRA== -"@cspell/dict-rust@^1.0.22": - version "1.0.22" - resolved "https://registry.yarnpkg.com/@cspell/dict-rust/-/dict-rust-1.0.22.tgz#4558e528c1e1aa2b0f1677d5918fa822106013e5" - integrity sha512-7WOIzv0BPiU+MssZbbMk8K+HR/g9Bcvd0+jXJC3/AKT8L6l0Mx0Tr/oF7cJ4xvCYgA84nBz3PhMZkabGSz/Nkg== +"@cspell/dict-rust@^1.0.23": + version "1.0.23" + resolved "https://registry.yarnpkg.com/@cspell/dict-rust/-/dict-rust-1.0.23.tgz#bcef79f74932d90a07f86efa11a8696788079ad8" + integrity sha512-lR4boDzs79YD6+30mmiSGAMMdwh7HTBAPUFSB0obR3Kidibfc3GZ+MHWZXay5dxZ4nBKM06vyjtanF9VJ8q1Iw== "@cspell/dict-scala@^1.0.21": version "1.0.21" resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.37": - version "1.0.37" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.37.tgz#93001d423296cbfd4bf02f14d769c2f4e322ae35" - integrity sha512-dK4vdeohyVw60h4w6j9V4pfgi6Vv4vaxS67X6By7IXPIH+S/mBcHiXhqnGXqWFSfPNB7Oh+GP47nPLAHHFRZRg== +"@cspell/dict-software-terms@^1.0.40": + version "1.0.40" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.40.tgz#b9d02e62b81e8213f3ec8d44227af6610eb8ff30" + integrity sha512-aHEIgjZJwqn4I+tlQ2XvC4l106VS2bSzNU8crRadpcbpuL5UC2nzMgEbEOAHK4gP1P9i009ttFB0PTKTGisKgg== "@cspell/dict-typescript@^1.0.19": version "1.0.19" @@ -2998,7 +3004,7 @@ chalk@^2.0.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -3229,15 +3235,20 @@ commander@^7.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== +commander@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.1.0.tgz#db36e3e66edf24ff591d639862c6ab2c52664362" + integrity sha512-mf45ldcuHSYShkplHHGKWb4TrmwQadxOn7v4WuhDJy0ZVoY5JFajaRDKD0PNe5qXzBX0rhovjTnP6Kz9LETcuA== + commander@~8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.0.0.tgz#1da2139548caef59bd23e66d18908dfb54b02258" integrity sha512-Xvf85aAtu6v22+E5hfVoLHqyul/jyxh91zvqk/ioJTQuJR7Z78n7H558vMPKanPSRgIEeZemT92I2g9Y8LPbSQ== -comment-json@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/comment-json/-/comment-json-4.1.0.tgz#09d08f0fbc4ad5eeccbac20f469adbb967dcbd2c" - integrity sha512-WEghmVYaNq9NlWbrkzQTSsya9ycLyxJxpTQfZEan6a5Jomnjw18zS3Podf8q1Zf9BvonvQd/+Z7Z39L7KKzzdQ== +comment-json@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/comment-json/-/comment-json-4.1.1.tgz#49df4948704bebb1cc0ffa6910e25669b668b7c5" + integrity sha512-v8gmtPvxhBlhdRBLwdHSjGy9BgA23t9H1FctdQKyUrErPjSrJcdDMqBq9B4Irtm7w3TNYLQJNH6ARKnpyag1sA== dependencies: array-timsort "^1.0.3" core-util-is "^1.0.2" @@ -3515,35 +3526,35 @@ 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.6.5: - version "5.6.5" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.6.5.tgz#125818f94903fb070b9bb0f9fdf2488d2a279db7" - integrity sha512-bobER7IoYBJZCXxkiAc5FT1Tb55TFLf1vZSw0ORCFYMeMHlvYktwDx0Wo6/Nkz39MtMQ9nvLrepCMEEZNpKhVw== +cspell-glob@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.7.0.tgz#f14ad50fb469717220fd4e3e92a0174d3e3b31e2" + integrity sha512-A6LlFT1MWLT8bb0o3xDlXysbuYWM/1U1Rt/iOI/Pi3C9Myqig/WHVKEZ/Lmda6ZI5eRLyDhgi+Y90sUwpd9iEQ== dependencies: micromatch "^4.0.4" -cspell-io@^5.6.5: - version "5.6.5" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.6.5.tgz#071dfb9c1d1e38c758d9a5b38d5690142fb2e64f" - integrity sha512-OcnuiOkOetcWtihBF57fefLTNPHgsNEc7+x04U7hto3lwEWe8CFQfnkLbQIZfzXOyiyuPY2yjDO0/Y3oqWrB3A== +cspell-io@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.7.0.tgz#5735893dda2e3e37dd981434553118bcf953843f" + integrity sha512-WOn8KwrYYpTfHJkmNG3fd+pT+NX7D1v6AcjYN6sm99fQtbY6z7xMAnjXcneGabUbQMNhAvaW56sB1pR0ABEvGA== dependencies: iconv-lite "^0.6.3" iterable-to-stream "^2.0.0" -cspell-lib@^5.6.6: - version "5.6.6" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.6.6.tgz#241924d83d9df9714692946246afe37c9074a79b" - integrity sha512-Sum4U7/xWTJm99DeZF0bFBBN5SQ7roArlwnnKMmuRRcYl3s9/3OgtIK2YOOgqoSCxh4G51f7aal+bNAlAnx1bA== +cspell-lib@^5.7.2: + version "5.7.2" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.7.2.tgz#5e2d47bb2a63931abebefd3030ba830de5657314" + integrity sha512-9C0d96+6GeLgyek//lCXcVpk2VeuwBUU4T+0gmnzPGYEOV1uNNK79SspFsSFZvL6+un5ztO+sQ+2MxR9zMF+gw== dependencies: - "@cspell/cspell-bundled-dicts" "^5.6.6" - "@cspell/cspell-types" "^5.6.5" + "@cspell/cspell-bundled-dicts" "^5.7.2" + "@cspell/cspell-types" "^5.7.2" clear-module "^4.1.1" - comment-json "^4.1.0" + comment-json "^4.1.1" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-glob "^5.6.5" - cspell-io "^5.6.5" - cspell-trie-lib "^5.6.5" + cspell-glob "^5.7.0" + cspell-io "^5.7.0" + cspell-trie-lib "^5.7.0" find-up "^5.0.0" fs-extra "^10.0.0" gensequence "^3.1.1" @@ -3552,25 +3563,25 @@ cspell-lib@^5.6.6: resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.6.5: - version "5.6.5" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.6.5.tgz#f0bbb998f62fd2122e1ab10a34ffd1bce9c03ab7" - integrity sha512-x4Ii8LwFp7tt+Ie+5R/a/qgYn43R5RwRfByn3taMy4D++PgF+vHTVZm1yORmUFBPTIT39gFbtkAJR7X0kdBL/w== +cspell-trie-lib@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.7.0.tgz#d80978e3da682290ae8cccb71af9c4455ad3cfca" + integrity sha512-XDJrQG2SuQOJRVj6kNUdehLHJdj+1SGzKEvFJbRAzvIRPW75zDe3+yYHHmNOZgXJXLfe0Vtr3RjSjhaQOWZ42Q== dependencies: fs-extra "^10.0.0" gensequence "^3.1.1" cspell@^5.5.2: - version "5.6.6" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.6.6.tgz#b9af8535b1c5e0ec856d17c98e4b04128feca78b" - integrity sha512-4k3Jcz61mv5SQNjVcrWjARcEVa7gOF8nyg5MPU68AWPoyg5VuE51jgQDr4c01dbG/PGRLtrLwVmr+r6Kh5RDVA== - dependencies: - "@cspell/cspell-types" "^5.6.5" - chalk "^4.1.1" - commander "^7.2.0" - comment-json "^4.1.0" - cspell-glob "^5.6.5" - cspell-lib "^5.6.6" + version "5.7.2" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.7.2.tgz#7218ceaa71e1e87e6d67b375c6371f61940d7ded" + integrity sha512-FJAPt3GkwdVaX6I+GR1A95WsraqHPzYqkBI1rIHNE5JnJIbWW6N+pnlbhDjsUlPWXmQYHXMfUlhFtMVLUVs3mw== + dependencies: + "@cspell/cspell-types" "^5.7.2" + chalk "^4.1.2" + commander "^8.1.0" + comment-json "^4.1.1" + cspell-glob "^5.7.0" + cspell-lib "^5.7.2" fs-extra "^10.0.0" get-stdin "^8.0.0" glob "^7.1.7" From 47811e73020b824b59c85cbc3c2765f667e6931f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Aug 2021 13:24:36 -0700 Subject: [PATCH 296/473] chore: bump @types/lodash from 4.14.171 to 4.14.172 (#3747) Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.171 to 4.14.172. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) --- updated-dependencies: - dependency-name: "@types/lodash" dependency-type: direct:development update-type: version-update:semver-patch ... 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 6f332d75f128..8ecca1636513 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2173,9 +2173,9 @@ integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= "@types/lodash@*", "@types/lodash@^4.14.170": - version "4.14.171" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.171.tgz#f01b3a5fe3499e34b622c362a46a609fdb23573b" - integrity sha512-7eQ2xYLLI/LsicL2nejW9Wyko3lcpN6O/z0ZLHrEQsg280zIdCv1t/0m6UtBjUHokCGBQ3gYTbHzDkZ1xOBwwg== + version "4.14.172" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.172.tgz#aad774c28e7bfd7a67de25408e03ee5a8c3d028a" + integrity sha512-/BHF5HAx3em7/KkzVKm3LrsD6HZAXuXO1AJZQ3cRRBZj4oHZDviWPYu0aEplAqDFNHZPW6d3G7KN+ONcCCC7pw== "@types/marked@*", "@types/marked@^2.0.3": version "2.0.4" From a752638f975935882746ee5ef614ca02f120675d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Aug 2021 13:24:45 -0700 Subject: [PATCH 297/473] chore: bump @types/jest from 26.0.24 to 27.0.1 (#3748) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.24 to 27.0.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) --- updated-dependencies: - dependency-name: "@types/jest" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 70692ebe29f8..0fe544880b6b 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "@types/eslint-visitor-keys": "^1.0.0", "@types/glob": "^7.1.3", "@types/is-glob": "^4.0.1", - "@types/jest": "^26.0.23", + "@types/jest": "^27.0.1", "@types/jest-specific-snapshot": "^0.5.5", "@types/lodash": "^4.14.170", "@types/marked": "^2.0.3", diff --git a/yarn.lock b/yarn.lock index 8ecca1636513..fcc05284ae5a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2154,13 +2154,13 @@ dependencies: "@types/jest" "*" -"@types/jest@*", "@types/jest@^26.0.23": - version "26.0.24" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.24.tgz#943d11976b16739185913a1936e0de0c4a7d595a" - integrity sha512-E/X5Vib8BWqZNRlDxj9vYXhsDwPYbPINqKF9BsnSoon4RQ0D9moEuLD8txgyypFLH7J4+Lho9Nr/c8H0Fi+17w== +"@types/jest@*", "@types/jest@^27.0.1": + version "27.0.1" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.0.1.tgz#fafcc997da0135865311bb1215ba16dba6bdf4ca" + integrity sha512-HTLpVXHrY69556ozYkcq47TtQJXpcWAWfkoqz+ZGz2JnmZhzlRjprCIyFnetSy8gpDWwTTGBcRVv1J1I1vBrHw== dependencies: - jest-diff "^26.0.0" - pretty-format "^26.0.0" + jest-diff "^27.0.0" + pretty-format "^27.0.0" "@types/json-schema@^7.0.7": version "7.0.9" @@ -5875,7 +5875,7 @@ jest-config@27.0.6, jest-config@^27.0.6: micromatch "^4.0.4" pretty-format "^27.0.6" -jest-diff@^26.0.0, jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6: +jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.6.tgz#4a7a19ee6f04ad70e0e3388f35829394a44c7b5e" integrity sha512-Z1mqgkTCSYaFgwTlP/NUiRzdqgxmmhzHY1Tq17zL94morOHfHu3K4bgSgl+CR4GLhpV8VxkuOYuIWnQ9LnFqmg== @@ -7980,7 +7980,7 @@ prettier@2.3.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== -pretty-format@*, pretty-format@^26.0.0, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6: +pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.6.tgz#ab770c47b2c6f893a21aefc57b75da63ef49a11f" integrity sha512-8tGD7gBIENgzqA+UBzObyWqQ5B778VIFZA/S66cclyd5YkFLYs2Js7gxDKf0MXtTc9zcS7t1xhdfcElJ3YIvkQ== From 055add01299eb91c87323677038b5f7d08b448d4 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 23 Aug 2021 17:03:25 +0000 Subject: [PATCH 298/473] chore: publish v4.29.3 --- CHANGELOG.md | 8 ++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.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 | 8 ++++++++ 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 ++-- 24 files changed, 127 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4276dd49ea6..d81bcf51a3fb 100644 --- a/CHANGELOG.md +++ b/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.29.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.2...v4.29.3) (2021-08-23) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + + + + + ## [4.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) **Note:** Version bump only for package @typescript-eslint/typescript-eslint diff --git a/lerna.json b/lerna.json index 64338d06040a..637ecf6da40d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.29.2", + "version": "4.29.3", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 8fadf03023f8..5627acbec6a0 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.29.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.2...v4.29.3) (2021-08-23) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + ## [4.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index a2641cd27b7a..aa6cf9592e0e 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.29.2", + "version": "4.29.3", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 64c182587dff..92750d023fc2 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.29.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.2...v4.29.3) (2021-08-23) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) **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 20e9af067ee5..ef199d652308 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.29.2", + "version": "4.29.3", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.29.2", + "@typescript-eslint/experimental-utils": "4.29.3", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 026fa6096893..0f0390e98a1c 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.29.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.2...v4.29.3) (2021-08-23) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) **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 8c667487a3b5..1eddf7f65397 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.29.2", + "version": "4.29.3", "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.29.2", + "@typescript-eslint/experimental-utils": "4.29.3", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.29.2" + "@typescript-eslint/parser": "4.29.3" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index d3a5e10bf87e..40e0e5d44b59 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/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.29.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.2...v4.29.3) (2021-08-23) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + + + + + ## [4.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 773ba892154b..e820878dc938 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.29.2", + "version": "4.29.3", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.29.2", - "@typescript-eslint/scope-manager": "4.29.2", + "@typescript-eslint/experimental-utils": "4.29.3", + "@typescript-eslint/scope-manager": "4.29.3", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 6b0761003273..c342c557fbad 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.29.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.2...v4.29.3) (2021-08-23) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + ## [4.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) **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 5b3441db43a2..d803137f299b 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.29.2", + "version": "4.29.3", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.29.2", - "@typescript-eslint/types": "4.29.2", - "@typescript-eslint/typescript-estree": "4.29.2", + "@typescript-eslint/scope-manager": "4.29.3", + "@typescript-eslint/types": "4.29.3", + "@typescript-eslint/typescript-estree": "4.29.3", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index ee570f030f93..3d2486446acd 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.29.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.2...v4.29.3) (2021-08-23) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + ## [4.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 3e71952d7f3f..29afe096e674 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.29.2", + "version": "4.29.3", "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.29.2", - "@typescript-eslint/types": "4.29.2", - "@typescript-eslint/typescript-estree": "4.29.2", + "@typescript-eslint/scope-manager": "4.29.3", + "@typescript-eslint/types": "4.29.3", + "@typescript-eslint/typescript-estree": "4.29.3", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.29.2", + "@typescript-eslint/experimental-utils": "4.29.3", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 6441b76b2107..f15ef8da580b 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.29.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.2...v4.29.3) (2021-08-23) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + ## [4.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) **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 085344a8229f..7db0210d405c 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.29.2", + "version": "4.29.3", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.29.2", - "@typescript-eslint/visitor-keys": "4.29.2" + "@typescript-eslint/types": "4.29.3", + "@typescript-eslint/visitor-keys": "4.29.3" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.29.2", + "@typescript-eslint/typescript-estree": "4.29.3", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index f4eba0cfe4cb..9a7b51acca7d 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.29.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.2...v4.29.3) (2021-08-23) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) **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 5d542b8346ee..666d29d0ed59 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.29.2", + "version": "4.29.3", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 7bae10a74c10..e6131eca1229 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.29.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.2...v4.29.3) (2021-08-23) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + ## [4.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index eba3d06dd212..7e46f7704ca6 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.29.2", + "version": "4.29.3", "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 e4b318434d3c..e44dd7584acc 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.29.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.2...v4.29.3) (2021-08-23) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + ## [4.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) **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 4e04461b20ad..a07fedf4db51 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.29.2", + "version": "4.29.3", "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.29.2", - "@typescript-eslint/visitor-keys": "4.29.2", + "@typescript-eslint/types": "4.29.3", + "@typescript-eslint/visitor-keys": "4.29.3", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.29.2", + "@typescript-eslint/shared-fixtures": "4.29.3", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index b699c0830d40..e1913397b9b5 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.29.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.2...v4.29.3) (2021-08-23) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.29.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.1...v4.29.2) (2021-08-16) **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 5e47b383d1eb..d98f1a1f21ab 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.29.2", + "version": "4.29.3", "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.29.2", + "@typescript-eslint/types": "4.29.3", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 043462ef4d8f3aa16c10efb84fea25a193deefac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Tue, 24 Aug 2021 19:40:40 +0200 Subject: [PATCH 299/473] chore: update NX (#3785) --- package.json | 6 ++--- yarn.lock | 64 ++++++++++++++++++++++++++-------------------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index 0fe544880b6b..3939cc2d63a1 100644 --- a/package.json +++ b/package.json @@ -77,10 +77,10 @@ "@commitlint/cli": "^13.1.0", "@commitlint/config-conventional": "^13.1.0", "@commitlint/config-lerna-scopes": "^13.1.0", - "@nrwl/cli": "12.7.1", + "@nrwl/cli": "12.7.2", "@nrwl/nx-cloud": "12.3.10", - "@nrwl/tao": "12.7.1", - "@nrwl/workspace": "12.7.1", + "@nrwl/tao": "12.7.2", + "@nrwl/workspace": "12.7.2", "@types/babel__code-frame": "^7.0.2", "@types/debug": "^4.1.5", "@types/eslint-visitor-keys": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index fcc05284ae5a..95a2b43532c1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1761,37 +1761,37 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@nrwl/cli@12.7.1": - version "12.7.1" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.7.1.tgz#cd781731c0396975ce44edb6c80b8fccbba4b23e" - integrity sha512-Rjv9Pwv2Bdgztkr0GnKuE/W7DmSTQI/bvdtKOqcOJIsL4i5xJCZDxVDbhmfPoa4NXPIYHeW3EqfFAP4PH1rCKg== +"@nrwl/cli@12.7.2": + version "12.7.2" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.7.2.tgz#7a7f0dae1959431763e3c37b54fa368141e549ba" + integrity sha512-MYzHFk/vfgFi6LVbKlBymBIA5fHm72ES9+FvNdYacwiyWlInuBVLAb6McX2zfY6gioxyUOUBPXuBvGxbGtb6qQ== dependencies: - "@nrwl/tao" "12.7.1" + "@nrwl/tao" "12.7.2" chalk "4.1.0" v8-compile-cache "2.3.0" yargs "15.4.1" yargs-parser "20.0.0" -"@nrwl/devkit@12.7.1": - version "12.7.1" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.7.1.tgz#aea0d8db1663fed44b5189452beae87bf432c60f" - integrity sha512-g88SWsXbiZDvL+4PWCBFlhzsg0niEJCxGDJ1EV+dLexAM3iD1aBn3EK2ygaF1sgabBNlJnUgbpU14/N5SexZuA== +"@nrwl/devkit@12.7.2": + version "12.7.2" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.7.2.tgz#3ea39590dc29d6aa6cf970bc195c99641ae0b0ec" + integrity sha512-Uk0DOkQ35sAMSMQPWNo+n4muDAueX651Seb66GSVbeHrFGNGPOM4X1iElYqocXevnMta1Q3xwragudXSdAnHkw== dependencies: - "@nrwl/tao" "12.7.1" + "@nrwl/tao" "12.7.2" ejs "^3.1.5" ignore "^5.0.4" rxjs "^6.5.4" semver "7.3.4" tslib "^2.0.0" -"@nrwl/jest@12.7.1": - version "12.7.1" - resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.7.1.tgz#1f90c3d032c10e7e5afd736bf74c328002350449" - integrity sha512-+Pg9UimjoDWAJUH2SLqHcdn+6gLvzB6uISDqh4tvzyixiHSUNcY/WMqP1X9qVFfFA4HMwr8YvA7RUFHbSCrcxA== +"@nrwl/jest@12.7.2": + version "12.7.2" + resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.7.2.tgz#5aecf205a5d221c7b49dc05825db1bda7e2de3ec" + integrity sha512-kfBgCtdvobkjVqcQMN5NrkZXOVJPxspRtmSpe0o4D5eTgPPYSAAgPhcGZJ5b3RVV7PetqGG75AgNL5L1GtodHA== dependencies: "@jest/reporters" "27.0.6" "@jest/test-result" "27.0.6" - "@nrwl/devkit" "12.7.1" + "@nrwl/devkit" "12.7.2" chalk "4.1.0" identity-obj-proxy "3.0.0" jest-config "27.0.6" @@ -1800,12 +1800,12 @@ rxjs "^6.5.4" tslib "^2.0.0" -"@nrwl/linter@12.7.1": - version "12.7.1" - resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.7.1.tgz#c5ccd17ade2b3d3f6410d18a4fd0ce8b2d3e5111" - integrity sha512-FUPaUhqDcXUjRW3hKYnkQ9c569TGr+zS3YDoNKSbOFBrr6MCRRPIJMRo6bDS38aMMIpOZ4tSwuvxuoVfOfW1Fg== +"@nrwl/linter@12.7.2": + version "12.7.2" + resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.7.2.tgz#db22b83ee74c6ed4bf953d0b833c5a28b20c6d63" + integrity sha512-dHuzxiOML8DvK5ed3o9P2vqyjFnRs+9+oyIC/ODGEupvDEKxDRemybTjuEAM30vMmDIJdHI/NOlEd/nxbW+6JA== dependencies: - "@nrwl/devkit" "12.7.1" + "@nrwl/devkit" "12.7.2" glob "7.1.4" minimatch "3.0.4" tmp "~0.2.1" @@ -1823,10 +1823,10 @@ strip-json-comments "^3.1.1" tar "5.0.7" -"@nrwl/tao@12.7.1": - version "12.7.1" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.7.1.tgz#467b5b56f8e503d4a6acbd6eecd4ad51042d8d27" - integrity sha512-cQvrFwA+mEAiY3HwIuTjsO/yxgGEoffdUcsH6Oak3dcypkmTf4mVxqmuyzvJ5smt8cggg8qb7BEWowWs31folw== +"@nrwl/tao@12.7.2": + version "12.7.2" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.7.2.tgz#73dd6a0bc7f64d9a823560c8aede0953c0a15dd5" + integrity sha512-LnylUSOznJ+EDmJWu7vvQTnAERPTjKRHznShTe6eMoaJUH0ds3WSGMBxLUulzN2P5dWqO9u26GWMZpInYWwkfA== dependencies: chalk "4.1.0" enquirer "~2.3.6" @@ -1839,15 +1839,15 @@ tslib "^2.0.0" yargs-parser "20.0.0" -"@nrwl/workspace@12.7.1": - version "12.7.1" - resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.7.1.tgz#b140311473a2a45776674665bffb5eb001ce3465" - integrity sha512-84XRqtRc4pfO8agQqEX984w5HUyN+xWhz3EZv88w8QQfHdIooARj8wRb2lyKu7wHdaKaYNzx0pG9LLuVQYq6GQ== +"@nrwl/workspace@12.7.2": + version "12.7.2" + resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.7.2.tgz#a1a7af9748db8d5bd4da89746d9ab1314426b246" + integrity sha512-aPlPHG1AmKHP8HiD9VHvkIEUsFZlFmqdm0JwJlv4935C3A8/TIln8thyUdFZDIYkR0jGLBd90RFQcWs2CX+Ocg== dependencies: - "@nrwl/cli" "12.7.1" - "@nrwl/devkit" "12.7.1" - "@nrwl/jest" "12.7.1" - "@nrwl/linter" "12.7.1" + "@nrwl/cli" "12.7.2" + "@nrwl/devkit" "12.7.2" + "@nrwl/jest" "12.7.2" + "@nrwl/linter" "12.7.2" chalk "4.1.0" chokidar "^3.5.1" cosmiconfig "^4.0.0" From f81831bd279a32da6dbab0f1c061053ea43965f6 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sat, 28 Aug 2021 10:37:05 +0900 Subject: [PATCH 300/473] feat(typescript-estree): add support for class static blocks (#3730) --- README.md | 2 +- package.json | 4 +- packages/ast-spec/src/ast-node-types.ts | 1 + .../ast-spec/src/element/StaticBlock/spec.ts | 8 + packages/ast-spec/src/element/spec.ts | 1 + .../PunctuatorToken/PunctuatorTokenToText.ts | 8 +- packages/ast-spec/src/unions/ClassElement.ts | 2 + packages/ast-spec/src/unions/Node.ts | 2 + .../indent-new-do-not-use/OffsetStorage.ts | 6 +- packages/parser/tests/tools/test-utils.ts | 2 +- packages/scope-manager/tests/fixtures.test.ts | 5 +- .../basics/class-static-blocks.src.ts | 8 + packages/typescript-estree/src/convert.ts | 13 +- packages/typescript-estree/src/node-utils.ts | 6 +- packages/typescript-estree/src/parser.ts | 4 +- .../src/ts-estree/estree-to-ts-node-types.ts | 1 + .../src/ts-estree/ts-nodes.ts | 1 + .../tests/ast-alignment/parse.ts | 5 +- .../tests/ast-alignment/utils.ts | 10 + .../tests/ast-fixtures.test.ts | 5 +- .../semantic-diagnostics-enabled.test.ts.snap | 14 +- .../typescript-estree/tests/lib/parse.test.ts | 10 +- ...invalid-mismatched-closing-tag.src.js.shot | 4 +- ...nvalid-mismatched-dot-tag-name.src.js.shot | 4 +- ...valid-mismatched-namespace-tag.src.js.shot | 4 +- .../basics/class-static-blocks.src.ts.shot | 702 ++++++++++++++++++ .../typescript-estree/tools/test-utils.ts | 2 +- packages/visitor-keys/src/visitor-keys.ts | 1 + yarn.lock | 8 +- 29 files changed, 805 insertions(+), 38 deletions(-) create mode 100644 packages/ast-spec/src/element/StaticBlock/spec.ts create mode 100644 packages/shared-fixtures/fixtures/typescript/basics/class-static-blocks.src.ts create mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-static-blocks.src.ts.shot diff --git a/README.md b/README.md index 25a1a58f3eda..2443ba50a162 100644 --- a/README.md +++ b/README.md @@ -233,7 +233,7 @@ The latest version under the `canary` tag **(latest commit to master)** is: ## Supported TypeScript Version -**The version range of TypeScript currently supported by this parser is `>=3.3.1 <4.4.0`.** +**The version range of TypeScript currently supported by this parser is `>=3.3.1 <4.5.0`.** These versions are what we test against. diff --git a/package.json b/package.json index 3939cc2d63a1..2e42c438b868 100644 --- a/package.json +++ b/package.json @@ -121,12 +121,12 @@ "ts-jest": "^27.0.1", "ts-node": "^10.0.0", "tslint": "^6.1.3", - "typescript": ">=3.3.1 <4.4.0" + "typescript": ">=3.3.1 <4.5.0" }, "resolutions": { "@types/node": "^15.6.1", "jest-diff": "^27.0.0", "pretty-format": "^27.0.0", - "typescript": "4.3.5" + "typescript": "4.4.2" } } diff --git a/packages/ast-spec/src/ast-node-types.ts b/packages/ast-spec/src/ast-node-types.ts index 6aa0087d5eb2..90a18ba8d9ed 100644 --- a/packages/ast-spec/src/ast-node-types.ts +++ b/packages/ast-spec/src/ast-node-types.ts @@ -68,6 +68,7 @@ export enum AST_NODE_TYPES { ReturnStatement = 'ReturnStatement', SequenceExpression = 'SequenceExpression', SpreadElement = 'SpreadElement', + StaticBlock = 'StaticBlock', Super = 'Super', SwitchCase = 'SwitchCase', SwitchStatement = 'SwitchStatement', diff --git a/packages/ast-spec/src/element/StaticBlock/spec.ts b/packages/ast-spec/src/element/StaticBlock/spec.ts new file mode 100644 index 000000000000..526a5f65f6d8 --- /dev/null +++ b/packages/ast-spec/src/element/StaticBlock/spec.ts @@ -0,0 +1,8 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; +import type { Statement } from '../../unions/Statement'; + +export interface StaticBlock extends BaseNode { + type: AST_NODE_TYPES.StaticBlock; + body: Statement[]; +} diff --git a/packages/ast-spec/src/element/spec.ts b/packages/ast-spec/src/element/spec.ts index 5ee18d914024..a31caecced39 100644 --- a/packages/ast-spec/src/element/spec.ts +++ b/packages/ast-spec/src/element/spec.ts @@ -2,6 +2,7 @@ export * from './ClassProperty/spec'; export * from './MethodDefinition/spec'; export * from './Property/spec'; export * from './SpreadElement/spec'; +export * from './StaticBlock/spec'; export * from './TSAbstractClassProperty/spec'; export * from './TSAbstractMethodDefinition/spec'; export * from './TSCallSignatureDeclaration/spec'; diff --git a/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts b/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts index 174e98e6c6b0..d15682a4efe7 100644 --- a/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts +++ b/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts @@ -45,7 +45,7 @@ export interface PunctuatorTokenToText { [SyntaxKind.AtToken]: '@'; [SyntaxKind.QuestionQuestionToken]: '??'; [SyntaxKind.BacktickToken]: '`'; - // [SyntaxKind.HashToken]: '#'; // new in PunctuationSyntaxKind in TS 4.4 + [SyntaxKind.HashToken]: '#'; [SyntaxKind.EqualsToken]: '='; [SyntaxKind.PlusEqualsToken]: '+='; [SyntaxKind.MinusEqualsToken]: '-='; @@ -58,8 +58,8 @@ export interface PunctuatorTokenToText { [SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken]: '>>>='; [SyntaxKind.AmpersandEqualsToken]: '&='; [SyntaxKind.BarEqualsToken]: '|='; - [SyntaxKind.BarBarEqualsToken]: '||='; // included in PunctuationSyntaxKind in TS 4.4 - [SyntaxKind.AmpersandAmpersandEqualsToken]: '&&='; // included in PunctuationSyntaxKind in TS 4.4 - [SyntaxKind.QuestionQuestionEqualsToken]: '??='; // included in PunctuationSyntaxKind in TS 4.4 + [SyntaxKind.BarBarEqualsToken]: '||='; + [SyntaxKind.AmpersandAmpersandEqualsToken]: '&&='; + [SyntaxKind.QuestionQuestionEqualsToken]: '??='; [SyntaxKind.CaretEqualsToken]: '^='; } diff --git a/packages/ast-spec/src/unions/ClassElement.ts b/packages/ast-spec/src/unions/ClassElement.ts index a4d986d09c73..c174c4ce6c72 100644 --- a/packages/ast-spec/src/unions/ClassElement.ts +++ b/packages/ast-spec/src/unions/ClassElement.ts @@ -1,5 +1,6 @@ import type { ClassProperty } from '../element/ClassProperty/spec'; import type { MethodDefinition } from '../element/MethodDefinition/spec'; +import type { StaticBlock } from '../element/StaticBlock/spec'; import type { TSAbstractClassProperty } from '../element/TSAbstractClassProperty/spec'; import type { TSAbstractMethodDefinition } from '../element/TSAbstractMethodDefinition/spec'; import type { TSIndexSignature } from '../element/TSIndexSignature/spec'; @@ -7,6 +8,7 @@ import type { TSIndexSignature } from '../element/TSIndexSignature/spec'; export type ClassElement = | ClassProperty | MethodDefinition + | StaticBlock | TSAbstractClassProperty | TSAbstractMethodDefinition | TSIndexSignature; diff --git a/packages/ast-spec/src/unions/Node.ts b/packages/ast-spec/src/unions/Node.ts index 61c943af566a..f0802b3b6850 100644 --- a/packages/ast-spec/src/unions/Node.ts +++ b/packages/ast-spec/src/unions/Node.ts @@ -16,6 +16,7 @@ import type { ClassProperty } from '../element/ClassProperty/spec'; import type { MethodDefinition } from '../element/MethodDefinition/spec'; import type { Property } from '../element/Property/spec'; import type { SpreadElement } from '../element/SpreadElement/spec'; +import type { StaticBlock } from '../element/StaticBlock/spec'; import type { TSAbstractClassProperty } from '../element/TSAbstractClassProperty/spec'; import type { TSAbstractMethodDefinition } from '../element/TSAbstractMethodDefinition/spec'; import type { TSCallSignatureDeclaration } from '../element/TSCallSignatureDeclaration/spec'; @@ -235,6 +236,7 @@ export type Node = | ReturnStatement | SequenceExpression | SpreadElement + | StaticBlock | Super | SwitchCase | SwitchStatement diff --git a/packages/eslint-plugin/src/rules/indent-new-do-not-use/OffsetStorage.ts b/packages/eslint-plugin/src/rules/indent-new-do-not-use/OffsetStorage.ts index c673a7d5af4b..6feea3d95ada 100644 --- a/packages/eslint-plugin/src/rules/indent-new-do-not-use/OffsetStorage.ts +++ b/packages/eslint-plugin/src/rules/indent-new-do-not-use/OffsetStorage.ts @@ -179,7 +179,7 @@ export class OffsetStorage { fromToken.range[1] <= range[1]; // this has to be before the delete + insert below or else you'll get into a cycle const fromTokenDescriptor = fromTokenIsInRange - ? this.getOffsetDescriptor(fromToken!) + ? this.getOffsetDescriptor(fromToken) : null; // First, remove any existing nodes in the range from the tree. @@ -193,8 +193,8 @@ export class OffsetStorage { * even if it's in the current range. */ if (fromTokenIsInRange) { - this.tree.insert(fromToken!.range[0], fromTokenDescriptor!); - this.tree.insert(fromToken!.range[1], descriptorToInsert); + this.tree.insert(fromToken.range[0], fromTokenDescriptor!); + this.tree.insert(fromToken.range[1], descriptorToInsert); } /* diff --git a/packages/parser/tests/tools/test-utils.ts b/packages/parser/tests/tools/test-utils.ts index 575ac1dc5b73..6dd679d1fea2 100644 --- a/packages/parser/tests/tools/test-utils.ts +++ b/packages/parser/tests/tools/test-utils.ts @@ -59,7 +59,7 @@ export function createSnapshotTestBlock( * AST_NODE_TYPE, we rethrow to cause the test to fail */ if (/Unknown AST_NODE_TYPE/.exec((error as Error).message)) { - throw new Error(error); + throw error; } expect(parse).toThrowErrorMatchingSnapshot(); } diff --git a/packages/scope-manager/tests/fixtures.test.ts b/packages/scope-manager/tests/fixtures.test.ts index 69833caa7faa..af327985df3b 100644 --- a/packages/scope-manager/tests/fixtures.test.ts +++ b/packages/scope-manager/tests/fixtures.test.ts @@ -139,7 +139,10 @@ function nestDescribe( try { makeDir.sync(fixture.snapshotPath); - } catch (e) { + } catch ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + e: any + ) { if ('code' in e && e.code === 'EEXIST') { // already exists - ignored } else { diff --git a/packages/shared-fixtures/fixtures/typescript/basics/class-static-blocks.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/class-static-blocks.src.ts new file mode 100644 index 000000000000..21ae81c3aea1 --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/class-static-blocks.src.ts @@ -0,0 +1,8 @@ +class Foo { + static count = 0; + static { + if (someCondition()) { + count++; + } + } +} diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 7f8514d8bc00..8170cedad3c2 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -311,7 +311,11 @@ export class Converter { */ private convertBodyExpressions( nodes: ts.NodeArray, - parent: ts.SourceFile | ts.Block | ts.ModuleBlock, + parent: + | ts.SourceFile + | ts.Block + | ts.ModuleBlock + | ts.ClassStaticBlockDeclaration, ): TSESTree.Statement[] { let allowDirectives = canContainDirective(parent); @@ -2824,6 +2828,13 @@ export class Converter { return result; } + case SyntaxKind.ClassStaticBlockDeclaration: { + return this.createNode(node, { + type: AST_NODE_TYPES.StaticBlock, + body: this.convertBodyExpressions(node.body.statements, node), + }); + } + default: return this.deeplyCopy(node); } diff --git a/packages/typescript-estree/src/node-utils.ts b/packages/typescript-estree/src/node-utils.ts index 8c223ed650a2..82f487b864cc 100644 --- a/packages/typescript-estree/src/node-utils.ts +++ b/packages/typescript-estree/src/node-utils.ts @@ -194,7 +194,11 @@ export function getLocFor( * @returns returns true if node can contain directive */ export function canContainDirective( - node: ts.SourceFile | ts.Block | ts.ModuleBlock, + node: + | ts.SourceFile + | ts.Block + | ts.ModuleBlock + | ts.ClassStaticBlockDeclaration, ): boolean { if (node.kind === ts.SyntaxKind.Block) { switch (node.parent.kind) { diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index e61b1b69ec2b..6cb3a2d6c27b 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -30,12 +30,12 @@ const log = debug('typescript-eslint:typescript-estree:parser'); * This needs to be kept in sync with the top-level README.md in the * typescript-eslint monorepo */ -const SUPPORTED_TYPESCRIPT_VERSIONS = '>=3.3.1 <4.4.0'; +const SUPPORTED_TYPESCRIPT_VERSIONS = '>=3.3.1 <4.5.0'; /* * The semver package will ignore prerelease ranges, and we don't want to explicitly document every one * List them all separately here, so we can automatically create the full string */ -const SUPPORTED_PRERELEASE_RANGES: string[] = ['4.3.0-beta', '4.3.1-rc']; +const SUPPORTED_PRERELEASE_RANGES: string[] = ['4.4.0-beta', '4.4.1-rc']; const ACTIVE_TYPESCRIPT_VERSION = ts.version; const isRunningSupportedTypeScriptVersion = semver.satisfies( ACTIVE_TYPESCRIPT_VERSION, diff --git a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts index 0f74c42ac64f..d5daed093324 100644 --- a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts +++ b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts @@ -135,6 +135,7 @@ export interface EstreeToTsNodeTypes { [AST_NODE_TYPES.ReturnStatement]: ts.ReturnStatement; [AST_NODE_TYPES.SequenceExpression]: ts.BinaryExpression; [AST_NODE_TYPES.SpreadElement]: ts.SpreadElement | ts.SpreadAssignment; + [AST_NODE_TYPES.StaticBlock]: ts.ClassStaticBlockDeclaration; [AST_NODE_TYPES.Super]: ts.SuperExpression; [AST_NODE_TYPES.SwitchCase]: ts.CaseClause | ts.DefaultClause; [AST_NODE_TYPES.SwitchStatement]: ts.SwitchStatement; diff --git a/packages/typescript-estree/src/ts-estree/ts-nodes.ts b/packages/typescript-estree/src/ts-estree/ts-nodes.ts index 80a7b34e0c8b..673dd6f9831c 100644 --- a/packages/typescript-estree/src/ts-estree/ts-nodes.ts +++ b/packages/typescript-estree/src/ts-estree/ts-nodes.ts @@ -43,6 +43,7 @@ export type TSNode = | ts.KeywordTypeNode // TODO: This node is bad, maybe we should report this | ts.ImportTypeNode | ts.ThisTypeNode + | ts.ClassStaticBlockDeclaration // | ts.FunctionOrConstructorTypeNodeBase -> FunctionTypeNode, ConstructorTypeNode | ts.ConstructorTypeNode | ts.FunctionTypeNode diff --git a/packages/typescript-estree/tests/ast-alignment/parse.ts b/packages/typescript-estree/tests/ast-alignment/parse.ts index 7a463d97256b..484c8ef18d1e 100644 --- a/packages/typescript-estree/tests/ast-alignment/parse.ts +++ b/packages/typescript-estree/tests/ast-alignment/parse.ts @@ -26,6 +26,7 @@ function parseWithBabelParser(text: string, jsx = true): File { const plugins: ParserPlugin[] = [ 'classProperties', 'decorators-legacy', + 'classStaticBlock', 'estree', 'typescript', ]; @@ -61,7 +62,7 @@ function parseWithTypeScriptESTree(text: string, jsx = true): parser.AST { jsx, }); return result.ast; - } catch (e) { + } catch (e: any) { throw createError(e.message, e.lineNumber, e.column); } } @@ -97,7 +98,7 @@ export function parse( 'Please provide a valid parser: either "typescript-estree" or "@babel/parser"', ); } - } catch (error) { + } catch (error: any) { const loc = error.loc as TSESTree.LineAndColumnData | undefined; if (loc) { error.codeFrame = codeFrameColumns( diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index 3cecac3f09f6..7427c1b1831d 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -250,6 +250,16 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any { } } }, + /** + * Babel adds a `static` property to the StaticBlock when the + * `typescript` plugin and the `classStaticBlock` plugin are enabled. + * @see https://github.com/babel/babel/issues/13674 + */ + StaticBlock(node: any) { + if (node.static != null) { + delete node.static; + } + }, }, ); } diff --git a/packages/typescript-estree/tests/ast-fixtures.test.ts b/packages/typescript-estree/tests/ast-fixtures.test.ts index 613595e4f8aa..f3ffbabd8098 100644 --- a/packages/typescript-estree/tests/ast-fixtures.test.ts +++ b/packages/typescript-estree/tests/ast-fixtures.test.ts @@ -58,7 +58,10 @@ function nestDescribe( try { makeDir.sync(fixture.snapshotPath); - } catch (e) { + } catch ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + e: any + ) { if ('code' in e && e.code === 'EEXIST') { // already exists - ignored } else { diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap index 7a972315f315..ce8d6b5cc6ec 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap @@ -1408,8 +1408,8 @@ TSError { exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-closing-tag.src 1`] = ` TSError { - "column": 3, - "index": 3, + "column": 5, + "index": 5, "lineNumber": 1, "message": "Expected corresponding JSX closing tag for 'a'.", } @@ -1426,8 +1426,8 @@ TSError { exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-dot-tag-name.src 1`] = ` TSError { - "column": 7, - "index": 7, + "column": 9, + "index": 9, "lineNumber": 1, "message": "Expected corresponding JSX closing tag for 'a.b.c'.", } @@ -1435,8 +1435,8 @@ TSError { exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-namespace-tag.src 1`] = ` TSError { - "column": 5, - "index": 5, + "column": 7, + "index": 7, "lineNumber": 1, "message": "Expected corresponding JSX closing tag for 'a:b'.", } @@ -1742,6 +1742,8 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-multi-line-keyword-declare.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-static-blocks.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-accessibility-modifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-modifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/packages/typescript-estree/tests/lib/parse.test.ts b/packages/typescript-estree/tests/lib/parse.test.ts index aa15fc136c1b..236dc6929ad0 100644 --- a/packages/typescript-estree/tests/lib/parse.test.ts +++ b/packages/typescript-estree/tests/lib/parse.test.ts @@ -50,7 +50,10 @@ describe('parseWithNodeMaps()', () => { it('should have correct column number when strict mode error occurs', () => { try { parser.parseWithNodeMaps('function fn(a, a) {\n}'); - } catch (err) { + } catch ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + err: any + ) { expect(err.column).toEqual(16); } }); @@ -505,7 +508,10 @@ describe('parseAndGenerateServices', () => { /** * Aligns paths between environments, node for windows uses `\`, for linux and mac uses `/` */ - error.message = (error as Error).message.replace(/\\(?!["])/gm, '/'); + (error as Error).message = (error as Error).message.replace( + /\\(?!["])/gm, + '/', + ); throw error; } }; diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-closing-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-closing-tag.src.js.shot index a35f3afd7151..a8788896feb2 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-closing-tag.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-closing-tag.src.js.shot @@ -2,8 +2,8 @@ exports[`jsx invalid-mismatched-closing-tag.src 1`] = ` TSError { - "column": 3, - "index": 3, + "column": 5, + "index": 5, "lineNumber": 1, "message": "Expected corresponding JSX closing tag for 'a'.", } diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-dot-tag-name.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-dot-tag-name.src.js.shot index 77d7e4187c3b..560ee71e7f77 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-dot-tag-name.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-dot-tag-name.src.js.shot @@ -2,8 +2,8 @@ exports[`jsx invalid-mismatched-dot-tag-name.src 1`] = ` TSError { - "column": 7, - "index": 7, + "column": 9, + "index": 9, "lineNumber": 1, "message": "Expected corresponding JSX closing tag for 'a.b.c'.", } diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-namespace-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-namespace-tag.src.js.shot index 1dd65c521056..4e5bac634b93 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-namespace-tag.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-namespace-tag.src.js.shot @@ -2,8 +2,8 @@ exports[`jsx invalid-mismatched-namespace-tag.src 1`] = ` TSError { - "column": 5, - "index": 5, + "column": 7, + "index": 7, "lineNumber": 1, "message": "Expected corresponding JSX closing tag for 'a:b'.", } diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-static-blocks.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-static-blocks.src.ts.shot new file mode 100644 index 000000000000..e370e9e24ea1 --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-static-blocks.src.ts.shot @@ -0,0 +1,702 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics class-static-blocks.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "count", + "range": Array [ + 21, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": false, + "range": Array [ + 14, + 31, + ], + "readonly": undefined, + "static": true, + "type": "ClassProperty", + "value": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + }, + Object { + "body": Array [ + Object { + "alternate": null, + "consequent": Object { + "body": Array [ + Object { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, + }, + "name": "count", + "range": Array [ + 76, + 81, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, + }, + "operator": "++", + "prefix": false, + "range": Array [ + 76, + 83, + ], + "type": "UpdateExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, + }, + "range": Array [ + 76, + 84, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 25, + "line": 4, + }, + }, + "range": Array [ + 68, + 90, + ], + "type": "BlockStatement", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 47, + 90, + ], + "test": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "name": "someCondition", + "range": Array [ + 51, + 64, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "optional": false, + "range": Array [ + 51, + 66, + ], + "type": "CallExpression", + }, + "type": "IfStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 34, + 94, + ], + "type": "StaticBlock", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 96, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 96, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 97, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 21, + 26, + ], + "type": "Identifier", + "value": "count", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 47, + 49, + ], + "type": "Keyword", + "value": "if", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 7, + "line": 4, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "range": Array [ + 51, + 64, + ], + "type": "Identifier", + "value": "someCondition", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 4, + }, + "start": Object { + "column": 21, + "line": 4, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 22, + "line": 4, + }, + }, + "range": Array [ + 65, + 66, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 23, + "line": 4, + }, + }, + "range": Array [ + 66, + 67, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 4, + }, + "start": Object { + "column": 25, + "line": 4, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, + }, + "range": Array [ + 76, + 81, + ], + "type": "Identifier", + "value": "count", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 5, + }, + "start": Object { + "column": 11, + "line": 5, + }, + }, + "range": Array [ + 81, + 83, + ], + "type": "Punctuator", + "value": "++", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 13, + "line": 5, + }, + }, + "range": Array [ + 83, + 84, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 89, + 90, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 7, + }, + }, + "range": Array [ + 93, + 94, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 8, + }, + }, + "range": Array [ + 95, + 96, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tools/test-utils.ts b/packages/typescript-estree/tools/test-utils.ts index 362560bc08cc..c07ab65b831d 100644 --- a/packages/typescript-estree/tools/test-utils.ts +++ b/packages/typescript-estree/tools/test-utils.ts @@ -41,7 +41,7 @@ export function createSnapshotTestBlock( * AST_NODE_TYPE, we rethrow to cause the test to fail */ if (/Unknown AST_NODE_TYPE/.exec((error as Error).message)) { - throw new Error(error); + throw error; } expect(parse).toThrowErrorMatchingSnapshot(); } diff --git a/packages/visitor-keys/src/visitor-keys.ts b/packages/visitor-keys/src/visitor-keys.ts index 1f2363e948ec..63dcdaf5a954 100644 --- a/packages/visitor-keys/src/visitor-keys.ts +++ b/packages/visitor-keys/src/visitor-keys.ts @@ -50,6 +50,7 @@ const additionalKeys: AdditionalKeys = { ObjectPattern: ['decorators', 'properties', 'typeAnnotation'], RestElement: ['decorators', 'argument', 'typeAnnotation'], TaggedTemplateExpression: ['tag', 'typeParameters', 'quasi'], + StaticBlock: [], // JSX JSXOpeningElement: ['name', 'typeParameters', 'attributes'], diff --git a/yarn.lock b/yarn.lock index 95a2b43532c1..0b88e0d193b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9483,10 +9483,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.3.5, "typescript@>=3.3.1 <4.4.0", typescript@^4.1.0-dev.20201026, typescript@~4.3.5: - version "4.3.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" - integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== +typescript@*, typescript@4.4.2, "typescript@>=3.3.1 <4.5.0", typescript@^4.1.0-dev.20201026, typescript@~4.3.5: + version "4.4.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86" + integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" From fa35e22702207baf07acb3eec11d3383721bf6b6 Mon Sep 17 00:00:00 2001 From: Yosuke Ota Date: Mon, 30 Aug 2021 08:28:09 +0900 Subject: [PATCH 301/473] fix(visitor-keys): add key to StaticBlock (v5) (#3812) --- packages/visitor-keys/src/visitor-keys.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/visitor-keys/src/visitor-keys.ts b/packages/visitor-keys/src/visitor-keys.ts index 63dcdaf5a954..efad2828a376 100644 --- a/packages/visitor-keys/src/visitor-keys.ts +++ b/packages/visitor-keys/src/visitor-keys.ts @@ -50,7 +50,7 @@ const additionalKeys: AdditionalKeys = { ObjectPattern: ['decorators', 'properties', 'typeAnnotation'], RestElement: ['decorators', 'argument', 'typeAnnotation'], TaggedTemplateExpression: ['tag', 'typeParameters', 'quasi'], - StaticBlock: [], + StaticBlock: ['body'], // JSX JSXOpeningElement: ['name', 'typeParameters', 'attributes'], From 820965c41c58be918770ff6bbae313c0cfc75d3c Mon Sep 17 00:00:00 2001 From: Minoru Takeuchi <31735614+dora1998@users.noreply.github.com> Date: Mon, 30 Aug 2021 15:18:01 +0900 Subject: [PATCH 302/473] feat(experimental-utils): add literal types to `global` option (#3634) --- packages/experimental-utils/src/ts-eslint/Linter.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/experimental-utils/src/ts-eslint/Linter.ts b/packages/experimental-utils/src/ts-eslint/Linter.ts index 56476834cc03..77c338f5a753 100644 --- a/packages/experimental-utils/src/ts-eslint/Linter.ts +++ b/packages/experimental-utils/src/ts-eslint/Linter.ts @@ -119,6 +119,8 @@ namespace Linter { export type RuleEntry = RuleLevel | RuleLevelAndOptions; export type RulesRecord = Partial>; + export type GlobalVariableOption = 'readonly' | 'writable' | 'off' | boolean; + // https://github.com/eslint/eslint/blob/v6.8.0/conf/config-schema.js interface BaseConfig { $schema?: string; @@ -133,7 +135,7 @@ namespace Linter { /** * The global variable settings. */ - globals?: { [name: string]: boolean }; + globals?: { [name: string]: GlobalVariableOption }; /** * The flag that disables directive comments. */ From 71dd27361a1bc93b5d5eb2279d805922b10002fd Mon Sep 17 00:00:00 2001 From: YeonJuan Date: Mon, 30 Aug 2021 15:22:29 +0900 Subject: [PATCH 303/473] fix(eslint-plugin): [prefer-reduce-type-parameter] handle already existing type params (#3706) --- .../src/rules/prefer-reduce-type-parameter.ts | 41 +++++++++++-------- .../prefer-reduce-type-parameter.test.ts | 17 ++++++++ 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/packages/eslint-plugin/src/rules/prefer-reduce-type-parameter.ts b/packages/eslint-plugin/src/rules/prefer-reduce-type-parameter.ts index 3b1af79ac6e8..8656c8d2376d 100644 --- a/packages/eslint-plugin/src/rules/prefer-reduce-type-parameter.ts +++ b/packages/eslint-plugin/src/rules/prefer-reduce-type-parameter.ts @@ -77,22 +77,31 @@ export default util.createRule({ context.report({ messageId: 'preferTypeParameter', node: secondArg, - fix: fixer => [ - fixer.removeRange([ - secondArg.range[0], - secondArg.expression.range[0], - ]), - fixer.removeRange([ - secondArg.expression.range[1], - secondArg.range[1], - ]), - fixer.insertTextAfter( - callee, - `<${context - .getSourceCode() - .getText(secondArg.typeAnnotation)}>`, - ), - ], + fix: fixer => { + const fixes = [ + fixer.removeRange([ + secondArg.range[0], + secondArg.expression.range[0], + ]), + fixer.removeRange([ + secondArg.expression.range[1], + secondArg.range[1], + ]), + ]; + + if (!callee.parent.typeParameters) { + fixes.push( + fixer.insertTextAfter( + callee, + `<${context + .getSourceCode() + .getText(secondArg.typeAnnotation)}>`, + ), + ); + } + + return fixes; + }, }); return; diff --git a/packages/eslint-plugin/tests/rules/prefer-reduce-type-parameter.test.ts b/packages/eslint-plugin/tests/rules/prefer-reduce-type-parameter.test.ts index a683a4ab0dc4..06613b260f74 100644 --- a/packages/eslint-plugin/tests/rules/prefer-reduce-type-parameter.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-reduce-type-parameter.test.ts @@ -39,6 +39,23 @@ ruleTester.run('prefer-reduce-type-parameter', rule, { '[1, 2, 3]?.reduce((a, s) => a.concat(s * 2), []);', ], invalid: [ + { + code: ` +declare const arr: string[]; +arr.reduce(acc => acc, arr.shift() as string); + `, + output: ` +declare const arr: string[]; +arr.reduce(acc => acc, arr.shift()); + `, + errors: [ + { + messageId: 'preferTypeParameter', + column: 32, + line: 3, + }, + ], + }, { code: '[1, 2, 3].reduce((a, s) => a.concat(s * 2), [] as number[]);', output: '[1, 2, 3].reduce((a, s) => a.concat(s * 2), []);', From c19fc6e03072ed549bc9b35ebe6961e10f8f9b43 Mon Sep 17 00:00:00 2001 From: Daniel Cassidy Date: Mon, 30 Aug 2021 07:23:35 +0100 Subject: [PATCH 304/473] fix(eslint-plugin): [dot-notation] false positive with optional chaining (#3711) closes #3510 --- .../eslint-plugin/src/rules/dot-notation.ts | 7 +++---- .../tests/rules/dot-notation.test.ts | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/packages/eslint-plugin/src/rules/dot-notation.ts b/packages/eslint-plugin/src/rules/dot-notation.ts index d0757f55a084..becc2a92727c 100644 --- a/packages/eslint-plugin/src/rules/dot-notation.ts +++ b/packages/eslint-plugin/src/rules/dot-notation.ts @@ -110,10 +110,9 @@ export default createRule({ const objectType = typeChecker.getTypeAtLocation( esTreeNodeToTSNodeMap.get(node.object), ); - const indexType = typeChecker.getIndexTypeOfType( - objectType, - ts.IndexKind.String, - ); + const indexType = objectType + .getNonNullableType() + .getStringIndexType(); if (indexType != undefined) { return; } diff --git a/packages/eslint-plugin/tests/rules/dot-notation.test.ts b/packages/eslint-plugin/tests/rules/dot-notation.test.ts index cbdb2d523425..fe25e4de1f1d 100644 --- a/packages/eslint-plugin/tests/rules/dot-notation.test.ts +++ b/packages/eslint-plugin/tests/rules/dot-notation.test.ts @@ -99,6 +99,25 @@ x['hello'] = 3; `, options: [{ allowIndexSignaturePropertyAccess: true }], }, + { + code: ` +interface Nested { + property: string; + [key: string]: number | string; +} + +class Dingus { + nested: Nested; +} + +let dingus: Dingus | undefined; + +dingus?.nested.property; +dingus?.nested['hello']; + `, + options: [{ allowIndexSignaturePropertyAccess: true }], + parserOptions: { ecmaVersion: 2020 }, + }, ], invalid: [ { From 921cbca1d51870e33865a2a7ece068a222249c84 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Mon, 30 Aug 2021 11:54:34 +0530 Subject: [PATCH 305/473] docs(eslint-plugin): fix typo (#3725) --- packages/eslint-plugin/docs/rules/require-array-sort-compare.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/require-array-sort-compare.md b/packages/eslint-plugin/docs/rules/require-array-sort-compare.md index 78de19863f0c..7203452b6b59 100644 --- a/packages/eslint-plugin/docs/rules/require-array-sort-compare.md +++ b/packages/eslint-plugin/docs/rules/require-array-sort-compare.md @@ -11,7 +11,7 @@ When sorting numbers, this results in the classic "10 before 2" order: [1, 2, 3, 10, 20, 30].sort(); //→ [1, 10, 2, 20, 3, 30] ``` -This also means that `Array#sort` does not always sort consistently, as elements may have custom `#toString` implementations that are not deterministic; this trap is noted in the noted in the language specification thusly: +This also means that `Array#sort` does not always sort consistently, as elements may have custom `#toString` implementations that are not deterministic; this trap is noted in the language specification thusly: > NOTE 2: Method calls performed by the `ToString` abstract operations in steps 5 and 7 have the potential to cause `SortCompare` to not behave as a consistent comparison function.
> https://www.ecma-international.org/ecma-262/9.0/#sec-sortcompare From 569640739999d85111def13ac7ba1d16e02f10b8 Mon Sep 17 00:00:00 2001 From: Rebecca Stevens Date: Mon, 30 Aug 2021 18:29:11 +1200 Subject: [PATCH 306/473] fix(eslint-plugin): isTypeReadonly error with , ): Readonlyness { function checkTypeArguments(arrayType: ts.TypeReference): Readonlyness { - const typeArguments = checker.getTypeArguments(arrayType); + const typeArguments = + // getTypeArguments was only added in TS3.7 + checker.getTypeArguments + ? checker.getTypeArguments(arrayType) + : arrayType.typeArguments ?? []; + // this shouldn't happen in reality as: // - tuples require at least 1 type argument // - ReadonlyArray requires at least 1 type argument From 26de6459a38389fff86351c1aa0881b11dc2a76a Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 30 Aug 2021 17:03:16 +0000 Subject: [PATCH 307/473] chore: publish v4.30.0 --- CHANGELOG.md | 20 ++++++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 11 +++++++++++ packages/ast-spec/package.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 | 18 ++++++++++++++++++ packages/eslint-plugin/package.json | 6 +++--- packages/experimental-utils/CHANGELOG.md | 11 +++++++++++ packages/experimental-utils/package.json | 8 ++++---- packages/parser/CHANGELOG.md | 11 +++++++++++ packages/parser/package.json | 10 +++++----- packages/scope-manager/CHANGELOG.md | 11 +++++++++++ packages/scope-manager/package.json | 8 ++++---- packages/shared-fixtures/CHANGELOG.md | 11 +++++++++++ packages/shared-fixtures/package.json | 2 +- packages/types/CHANGELOG.md | 8 ++++++++ packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 11 +++++++++++ packages/typescript-estree/package.json | 8 ++++---- packages/visitor-keys/CHANGELOG.md | 16 ++++++++++++++++ packages/visitor-keys/package.json | 4 ++-- 24 files changed, 175 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d81bcf51a3fb..e844a0102464 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,26 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.30.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.3...v4.30.0) (2021-08-30) + + +### Bug Fixes + +* **eslint-plugin:** [dot-notation] false positive with optional chaining ([#3711](https://github.com/typescript-eslint/typescript-eslint/issues/3711)) ([c19fc6e](https://github.com/typescript-eslint/typescript-eslint/commit/c19fc6e03072ed549bc9b35ebe6961e10f8f9b43)), closes [#3510](https://github.com/typescript-eslint/typescript-eslint/issues/3510) +* **eslint-plugin:** [prefer-reduce-type-parameter] handle already existing type params ([#3706](https://github.com/typescript-eslint/typescript-eslint/issues/3706)) ([71dd273](https://github.com/typescript-eslint/typescript-eslint/commit/71dd27361a1bc93b5d5eb2279d805922b10002fd)) +* **eslint-plugin:** isTypeReadonly error with Date: Tue, 31 Aug 2021 17:53:22 -0700 Subject: [PATCH 308/473] chore: bump @microsoft/api-extractor from 7.18.5 to 7.18.7 (#3801) Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack) from 7.18.5 to 7.18.7. - [Release notes](https://github.com/microsoft/rushstack/releases) - [Commits](https://github.com/microsoft/rushstack/compare/@microsoft/api-extractor_v7.18.5...@microsoft/api-extractor_v7.18.7) --- updated-dependencies: - dependency-name: "@microsoft/api-extractor" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0b88e0d193b0..3dd4468a6de5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1695,16 +1695,16 @@ "@rushstack/node-core-library" "3.40.0" "@microsoft/api-extractor@^7.15.2": - version "7.18.5" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.5.tgz#cc2804d7c8b9d0f1e63fd85d0448569b767db102" - integrity sha512-NUGS6WxexziEnroHUOI3KKVmMX02god7SLA8Y4a5GKCL5k7AHuHFqP2bpd5Otx2odfbdj15ObO7FU/XA3Oxh8w== + version "7.18.7" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.7.tgz#851d2413a3c5d696f7cc914eb59de7a7882b2e8b" + integrity sha512-JhtV8LoyLuIecbgCPyZQg08G1kngIRWpai2UzwNil9mGVGYiDZVeeKx8c2phmlPcogmMDm4oQROxyuiYt5sJiw== dependencies: "@microsoft/api-extractor-model" "7.13.5" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" "@rushstack/node-core-library" "3.40.0" - "@rushstack/rig-package" "0.2.13" - "@rushstack/ts-command-line" "4.8.1" + "@rushstack/rig-package" "0.3.0" + "@rushstack/ts-command-line" "4.9.0" colors "~1.2.1" lodash "~4.17.15" resolve "~1.17.0" @@ -1991,18 +1991,18 @@ timsort "~0.3.0" z-schema "~3.18.3" -"@rushstack/rig-package@0.2.13": - version "0.2.13" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.13.tgz#418f0aeb4c9b33bd8bd2547759fc0ae91fd970c7" - integrity sha512-qQMAFKvfb2ooaWU9DrGIK9d8QfyHy/HiuITJbWenlKgzcDXQvQgEduk57YF4Y7LLasDJ5ZzLaaXwlfX8qCRe5Q== +"@rushstack/rig-package@0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.0.tgz#334ad2846797861361b3445d4cc9ae9164b1885c" + integrity sha512-Lj6noF7Q4BBm1hKiBDw94e6uZvq1xlBwM/d2cBFaPqXeGdV+G6r3qaCWfRiSXK0pcHpGGpV5Tb2MdfhVcO6G/g== dependencies: resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.8.1.tgz#c233a0226112338e58e7e4fd219247b4e7cec883" - integrity sha512-rmxvYdCNRbyRs+DYAPye3g6lkCkWHleqO40K8UPvUAzFqEuj6+YCVssBiOmrUDCoM5gaegSNT0wFDYhz24DWtw== +"@rushstack/ts-command-line@4.9.0": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.9.0.tgz#781ba42cff73cae097b6d5241b6441e7cc2fe6e0" + integrity sha512-kmT8t+JfnvphISF1C5WwY56RefjwgajhSjs9J4ckvAFXZDXR6F5cvF5/RTh7fGCzIomg8esy2PHO/b52zFoZvA== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" From e9b1c24a986b55b375f017ca25e8a165b9b59142 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Aug 2021 17:53:30 -0700 Subject: [PATCH 309/473] chore: bump @types/rimraf from 3.0.1 to 3.0.2 (#3782) Bumps [@types/rimraf](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/rimraf) from 3.0.1 to 3.0.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/rimraf) --- updated-dependencies: - dependency-name: "@types/rimraf" dependency-type: direct:development update-type: version-update:semver-patch ... 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 3dd4468a6de5..5e7d8788f163 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2226,9 +2226,9 @@ integrity sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog== "@types/rimraf@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.1.tgz#1bbc106f0978742289103e080d4b41b3b4656e58" - integrity sha512-CAoSlbco40aKZ0CkelBF2g3JeN6aioRaTVnqSX5pWsn/WApm6IDxI4e4tD9D0dY/meCkyyleP1IQDVN13F4maA== + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.2.tgz#a63d175b331748e5220ad48c901d7bbf1f44eef8" + integrity sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ== dependencies: "@types/glob" "*" "@types/node" "*" From 5f2b21f131137b2f6822260523c8e8cf192faac7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Aug 2021 17:53:36 -0700 Subject: [PATCH 310/473] chore: bump eslint-plugin-import from 2.24.0 to 2.24.2 (#3802) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.24.0 to 2.24.2. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.24.0...v2.24.2) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5e7d8788f163..5a91e3e11d52 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4084,10 +4084,10 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-import-resolver-node@^0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.5.tgz#939bbb0f74e179e757ca87f7a4a890dabed18ac4" - integrity sha512-XMoPKjSpXbkeJ7ZZ9icLnJMTY5Mc1kZbCakHquaFsXPpyWOwK0TK6CODO+0ca54UoM9LKOxyUNnoVZRl8TeaAg== +eslint-import-resolver-node@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== dependencies: debug "^3.2.7" resolve "^1.20.0" @@ -4116,25 +4116,25 @@ eslint-plugin-eslint-plugin@^3.0.3: eslint-utils "^2.1.0" eslint-plugin-import@^2.23.4: - version "2.24.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.24.0.tgz#697ffd263e24da5e84e03b282f5fb62251777177" - integrity sha512-Kc6xqT9hiYi2cgybOc0I2vC9OgAYga5o/rAFinam/yF/t5uBqxQbauNPMC6fgb640T/89P0gFoO27FOilJ/Cqg== + version "2.24.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.24.2.tgz#2c8cd2e341f3885918ee27d18479910ade7bb4da" + integrity sha512-hNVtyhiEtZmpsabL4neEj+6M5DCLgpYyG9nzJY8lZQeQXEn5UPW1DpUdsMHMXsq98dbNm7nt1w9ZMSVpfJdi8Q== dependencies: array-includes "^3.1.3" array.prototype.flat "^1.2.4" debug "^2.6.9" doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.5" + eslint-import-resolver-node "^0.3.6" eslint-module-utils "^2.6.2" find-up "^2.0.0" has "^1.0.3" - is-core-module "^2.4.0" + is-core-module "^2.6.0" minimatch "^3.0.4" - object.values "^1.1.3" + object.values "^1.1.4" pkg-up "^2.0.0" read-pkg-up "^3.0.0" resolve "^1.20.0" - tsconfig-paths "^3.9.0" + tsconfig-paths "^3.11.0" eslint-plugin-jest@^24.3.6: version "24.4.0" @@ -5471,10 +5471,10 @@ is-ci@^3.0.0: dependencies: ci-info "^3.1.1" -is-core-module@^2.1.0, is-core-module@^2.2.0, is-core-module@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" - integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A== +is-core-module@^2.1.0, is-core-module@^2.2.0, is-core-module@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.6.0.tgz#d7553b2526fe59b92ba3e40c8df757ec8a709e19" + integrity sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ== dependencies: has "^1.0.3" @@ -7507,7 +7507,7 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.3: +object.values@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.4.tgz#0d273762833e816b693a637d30073e7051535b30" integrity sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg== @@ -9357,10 +9357,10 @@ ts-node@^10.0.0: make-error "^1.1.1" yn "3.1.1" -tsconfig-paths@^3.9.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" - integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== +tsconfig-paths@^3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz#954c1fe973da6339c78e06b03ce2e48810b65f36" + integrity sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA== dependencies: "@types/json5" "^0.0.29" json5 "^1.0.1" From 29a67f2120fbc2b7cc19722689b7485d41badb9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Aug 2021 17:53:45 -0700 Subject: [PATCH 311/473] chore: bump ts-node from 10.2.0 to 10.2.1 (#3781) Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.2.0 to 10.2.1. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v10.2.0...v10.2.1) --- updated-dependencies: - dependency-name: ts-node dependency-type: direct:development update-type: version-update:semver-patch ... 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 5a91e3e11d52..c7593cce0ca0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9340,9 +9340,9 @@ ts-jest@^27.0.1: yargs-parser "20.x" ts-node@^10.0.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.2.0.tgz#f1e88249a00e26aa95e9a93c50f70241a8a1c4bb" - integrity sha512-FstYHtQz6isj8rBtYMN4bZdnXN1vq4HCbqn9vdNQcInRqtB86PePJQIxE6es0PhxKWhj2PHuwbG40H+bxkZPmg== + version "10.2.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.2.1.tgz#4cc93bea0a7aba2179497e65bb08ddfc198b3ab5" + integrity sha512-hCnyOyuGmD5wHleOQX6NIjJtYVIO8bPP8F2acWkB4W06wdlkgyvJtubO/I9NkI88hCFECbsEgoLc0VNkYmcSfw== dependencies: "@cspotcode/source-map-support" "0.6.1" "@tsconfig/node10" "^1.0.7" From cf3b44f4145a5ae76691b661e81dadf5ff7f33e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Aug 2021 17:53:54 -0700 Subject: [PATCH 312/473] chore: bump cspell from 5.7.2 to 5.8.2 (#3803) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.7.2 to 5.8.2. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/compare/v5.7.2...v5.8.2) --- updated-dependencies: - dependency-name: cspell dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 122 +++++++++++++++++++++++++++++------------------------- 1 file changed, 66 insertions(+), 56 deletions(-) diff --git a/yarn.lock b/yarn.lock index c7593cce0ca0..47e7497140da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -461,10 +461,10 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.7.2": - version "5.7.2" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.7.2.tgz#077264d9aeed15e33dda12dcbde441f0e77db63a" - integrity sha512-Vd//xmvA1YeTpyCBbt3fVjYKNbCI6tvS9/Cfjt8PmV91loysX4TWJnI+mRY+2Eltf4WfW6SAtbC7/YUWrvBgQA== +"@cspell/cspell-bundled-dicts@^5.8.2": + version "5.8.2" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.8.2.tgz#8abae7b1181b8300d3baa39833d336ce9f9adc52" + integrity sha512-W4YzuDdMqL6UIgDkocFNzxuLvoiN8sl+Nt+KbEDx0miSkrcP3GabBNNuH1xY/n0QofEhZMSx1cRH9US/ROdHkQ== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" @@ -475,11 +475,11 @@ "@cspell/dict-csharp" "^1.0.11" "@cspell/dict-css" "^1.0.12" "@cspell/dict-django" "^1.0.26" - "@cspell/dict-dotnet" "^1.0.29" + "@cspell/dict-dotnet" "^1.0.30" "@cspell/dict-elixir" "^1.0.25" "@cspell/dict-en-gb" "^1.1.32" "@cspell/dict-en_us" "^1.2.45" - "@cspell/dict-filetypes" "^1.1.7" + "@cspell/dict-filetypes" "^1.1.8" "@cspell/dict-fonts" "^1.0.14" "@cspell/dict-fullstack" "^1.0.38" "@cspell/dict-golang" "^1.1.24" @@ -491,7 +491,7 @@ "@cspell/dict-lorem-ipsum" "^1.0.22" "@cspell/dict-lua" "^1.0.16" "@cspell/dict-node" "^1.0.12" - "@cspell/dict-npm" "^1.0.15" + "@cspell/dict-npm" "^1.0.16" "@cspell/dict-php" "^1.0.24" "@cspell/dict-powershell" "^1.0.18" "@cspell/dict-public-licenses" "^1.0.3" @@ -499,13 +499,13 @@ "@cspell/dict-ruby" "^1.0.14" "@cspell/dict-rust" "^1.0.23" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.40" + "@cspell/dict-software-terms" "^1.0.41" "@cspell/dict-typescript" "^1.0.19" -"@cspell/cspell-types@^5.7.2": - version "5.7.2" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.7.2.tgz#93c2632cf8ce9ae98f55503380709b13da891b9c" - integrity sha512-hRInos9xQxPk8Wv0Y23UwFddN5RkyKVhqqH6kEeWir1sok2eMy58n/eIJvVPyhx1LVeP4QS4a/n6/OigUQrNVw== +"@cspell/cspell-types@^5.8.2": + version "5.8.2" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.8.2.tgz#aeaf780ea0fd8d632b4e02f4d2296e3357a109d0" + integrity sha512-BWih6zBzpyFQiuBHyybByFtLCVfAJNX1G/ZvUgTFWna2xwWS0edQ3qp0H+v+FBRVCo2RHy4cmAfgzyCGtXHOmw== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -552,10 +552,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-django/-/dict-django-1.0.26.tgz#b97ce0112fbe8c3c3ada0387c68971b5e27483ab" integrity sha512-mn9bd7Et1L2zuibc08GVHTiD2Go3/hdjyX5KLukXDklBkq06r+tb0OtKtf1zKodtFDTIaYekGADhNhA6AnKLkg== -"@cspell/dict-dotnet@^1.0.29": - version "1.0.29" - resolved "https://registry.yarnpkg.com/@cspell/dict-dotnet/-/dict-dotnet-1.0.29.tgz#e362a85b28c2862f49da7949a7cc347f872b0df4" - integrity sha512-41fx7YQM986MBAyJpqL0fH6WOKLG/tNev4NbydNy3avYxz/smr+VwIwGN9/GLNORL5hQLiSQxPU5jfpx+bN94g== +"@cspell/dict-dotnet@^1.0.30": + version "1.0.30" + resolved "https://registry.yarnpkg.com/@cspell/dict-dotnet/-/dict-dotnet-1.0.30.tgz#0e80294fe2894b65d059130115a54c33adcb76f8" + integrity sha512-86kC5191GACB95IGtLnmYHZjuNl/Ee7lvZRcwEyvktoYiRAryd1YKSX+c/qU1OEx7Y52FTaEl07tf9uYS1wKNQ== "@cspell/dict-elixir@^1.0.25": version "1.0.25" @@ -572,10 +572,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.45.tgz#1314a9d81a1fd3cc7ed381dc6a0da10e7c2d02f9" integrity sha512-UPwR4rfiJCxnS+Py+EK9E4AUj3aPZE4p/yBRSHN+5aBQConlI0lLDtMceH5wlupA/sQTU1ERZGPJA9L96jVSyQ== -"@cspell/dict-filetypes@^1.1.7": - version "1.1.7" - resolved "https://registry.yarnpkg.com/@cspell/dict-filetypes/-/dict-filetypes-1.1.7.tgz#98c69f006041c145e3205c2f7fa617645a5b78ec" - integrity sha512-b0e+eiBzTiL1yJZgPBGHP8G7Z0Kkpr/35dXlR9LWoP/EnrAlVj0ulXwErPgTwSoFdxWBgbDJjKZsrMdxWCckuA== +"@cspell/dict-filetypes@^1.1.8": + version "1.1.8" + resolved "https://registry.yarnpkg.com/@cspell/dict-filetypes/-/dict-filetypes-1.1.8.tgz#c161ab48667b6539cbc91a70ff0b037fa436a64e" + integrity sha512-EllahNkhzvLWo0ptwu0l3oEeAJOQSUpZnDfnKRIh6mJVehuSovNHwA9vrdZ8jBUjuqcfaN2e7c32zN0D/qvWJQ== "@cspell/dict-fonts@^1.0.14": version "1.0.14" @@ -632,10 +632,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-node/-/dict-node-1.0.12.tgz#a7236be30340ff8fe365f62c8d13121fdbe7f51c" integrity sha512-RPNn/7CSkflAWk0sbSoOkg0ORrgBARUjOW3QjB11KwV1gSu8f5W/ij/S50uIXtlrfoBLqd4OyE04jyON+g/Xfg== -"@cspell/dict-npm@^1.0.15": - version "1.0.15" - resolved "https://registry.yarnpkg.com/@cspell/dict-npm/-/dict-npm-1.0.15.tgz#4eac51a4e5258b48e2fd1af277c12cb1fd189f4d" - integrity sha512-6N1G1rGi5AsCaDu9mu+VmrrAj5S9gHv8TvJlarauDeEMS6uVl+ce2JpzDf7ld3Qu/4Dkr0sKS63OeA0DKeQTkw== +"@cspell/dict-npm@^1.0.16": + version "1.0.16" + resolved "https://registry.yarnpkg.com/@cspell/dict-npm/-/dict-npm-1.0.16.tgz#86870686cd0af6354a206ab297872db1d84e9c1b" + integrity sha512-RwkuZGcYBxL3Yux3cSG/IOWGlQ1e9HLCpHeyMtTVGYKAIkFAVUnGrz20l16/Q7zUG7IEktBz5O42kAozrEnqMQ== "@cspell/dict-php@^1.0.24": version "1.0.24" @@ -672,10 +672,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.40": - version "1.0.40" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.40.tgz#b9d02e62b81e8213f3ec8d44227af6610eb8ff30" - integrity sha512-aHEIgjZJwqn4I+tlQ2XvC4l106VS2bSzNU8crRadpcbpuL5UC2nzMgEbEOAHK4gP1P9i009ttFB0PTKTGisKgg== +"@cspell/dict-software-terms@^1.0.41": + version "1.0.41" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.41.tgz#c8b9ca8e8891e09c2e55afd889bde38f6d7b109a" + integrity sha512-/RWiv99XoDUYh3eCo5PyF2nwDh0U8kuKmSW+UXpzbT4sj7oBl/la19h6Ahgq0Qmr0JGjTF/RxbQkz85Hcp1t5w== "@cspell/dict-typescript@^1.0.19": version "1.0.19" @@ -3496,6 +3496,17 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" +cosmiconfig@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" + integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.2.1" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.10.0" + create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -3526,35 +3537,35 @@ 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.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.7.0.tgz#f14ad50fb469717220fd4e3e92a0174d3e3b31e2" - integrity sha512-A6LlFT1MWLT8bb0o3xDlXysbuYWM/1U1Rt/iOI/Pi3C9Myqig/WHVKEZ/Lmda6ZI5eRLyDhgi+Y90sUwpd9iEQ== +cspell-glob@^5.8.2: + version "5.8.2" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.8.2.tgz#56b301d7cece39f1e9b1b64dbf77f9e1d5c96e00" + integrity sha512-8BUvX0gsLHXx6uAaCO6T2l/U3xBNiFywvnwLK7648Q7IY3TzQV/L01ESbC+DrzT6G2KCA2bvQKByXJraqTTCaw== dependencies: micromatch "^4.0.4" -cspell-io@^5.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.7.0.tgz#5735893dda2e3e37dd981434553118bcf953843f" - integrity sha512-WOn8KwrYYpTfHJkmNG3fd+pT+NX7D1v6AcjYN6sm99fQtbY6z7xMAnjXcneGabUbQMNhAvaW56sB1pR0ABEvGA== +cspell-io@^5.8.2: + version "5.8.2" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.8.2.tgz#66c43830dd28822397a357d9bfa65e2f77c71c26" + integrity sha512-5ejb38VchMml840gigYO5oanOcef681pLstqwQt71yV+CG4YSyJK7RqPTeDHgsXbRkntdUrbydwza0481szVkQ== dependencies: iconv-lite "^0.6.3" iterable-to-stream "^2.0.0" -cspell-lib@^5.7.2: - version "5.7.2" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.7.2.tgz#5e2d47bb2a63931abebefd3030ba830de5657314" - integrity sha512-9C0d96+6GeLgyek//lCXcVpk2VeuwBUU4T+0gmnzPGYEOV1uNNK79SspFsSFZvL6+un5ztO+sQ+2MxR9zMF+gw== +cspell-lib@^5.8.2: + version "5.8.2" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.8.2.tgz#3a91fa2fe3b2c1607d003dbcce0f2ca41c7d613c" + integrity sha512-Z6W+oHnmmUstdEypwMiqlnLOaA68r1T3i5OE2t+t2sxLAUgqCiTFEUQzu/yv/7vAIRKawdHuAq1rqrNKZXulbQ== dependencies: - "@cspell/cspell-bundled-dicts" "^5.7.2" - "@cspell/cspell-types" "^5.7.2" + "@cspell/cspell-bundled-dicts" "^5.8.2" + "@cspell/cspell-types" "^5.8.2" clear-module "^4.1.1" comment-json "^4.1.1" configstore "^5.0.1" - cosmiconfig "^7.0.0" - cspell-glob "^5.7.0" - cspell-io "^5.7.0" - cspell-trie-lib "^5.7.0" + cosmiconfig "^7.0.1" + cspell-glob "^5.8.2" + cspell-io "^5.8.2" + cspell-trie-lib "^5.8.2" find-up "^5.0.0" fs-extra "^10.0.0" gensequence "^3.1.1" @@ -3563,25 +3574,24 @@ cspell-lib@^5.7.2: resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.7.0.tgz#d80978e3da682290ae8cccb71af9c4455ad3cfca" - integrity sha512-XDJrQG2SuQOJRVj6kNUdehLHJdj+1SGzKEvFJbRAzvIRPW75zDe3+yYHHmNOZgXJXLfe0Vtr3RjSjhaQOWZ42Q== +cspell-trie-lib@^5.8.2: + version "5.8.2" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.8.2.tgz#266a58c21c3ead1eb8434accca6cca7d7abd183d" + integrity sha512-gvNwZO8QIqMTek2ZK/CeYYupzdXnIym7ytOgy7ycE/UIeNzJh/STC62Pe44CNvL86Xh1wgS4wFnh0pF6QRkZFw== dependencies: fs-extra "^10.0.0" gensequence "^3.1.1" cspell@^5.5.2: - version "5.7.2" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.7.2.tgz#7218ceaa71e1e87e6d67b375c6371f61940d7ded" - integrity sha512-FJAPt3GkwdVaX6I+GR1A95WsraqHPzYqkBI1rIHNE5JnJIbWW6N+pnlbhDjsUlPWXmQYHXMfUlhFtMVLUVs3mw== + version "5.8.2" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.8.2.tgz#708067660270f3900816d99c6b055dafa8ebd6d0" + integrity sha512-yamhOvEDXq/f0ko1icR3FUH/pfbGnz5LqtnkDKskVhm5tzv2kUxUNbmYwBAYzs7N1igE+AokL1G7D/Rw9LCLBg== dependencies: - "@cspell/cspell-types" "^5.7.2" chalk "^4.1.2" commander "^8.1.0" comment-json "^4.1.1" - cspell-glob "^5.7.0" - cspell-lib "^5.7.2" + cspell-glob "^5.8.2" + cspell-lib "^5.8.2" fs-extra "^10.0.0" get-stdin "^8.0.0" glob "^7.1.7" From 058a6bfc500754be6529400a46f2a83d30c26d14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 01:18:48 +0000 Subject: [PATCH 313/473] chore: bump tar from 4.4.15 to 4.4.19 (#3827) --- yarn.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/yarn.lock b/yarn.lock index 47e7497140da..e643dfff159e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3037,7 +3037,7 @@ chokidar@^3.5.1: optionalDependencies: fsevents "~2.3.2" -chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.3: +chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.3, chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -4688,7 +4688,7 @@ fs-extra@~7.0.1: jsonfile "^4.0.0" universalify "^0.1.0" -fs-minipass@^1.2.5: +fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== @@ -7113,7 +7113,7 @@ minimist@1.2.5, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2 resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: +minipass@^2.3.5, minipass@^2.6.0, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== @@ -7128,7 +7128,7 @@ minipass@^3.0.0: dependencies: yallist "^4.0.0" -minizlib@^1.2.1: +minizlib@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== @@ -7179,7 +7179,7 @@ mkdirp@*, mkdirp@1.x: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3: +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -8517,7 +8517,7 @@ rxjs@^6.4.0, rxjs@^6.5.4, rxjs@^6.6.0, rxjs@^6.6.7: dependencies: tslib "^1.9.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -9125,17 +9125,17 @@ tar@5.0.7: yallist "^4.0.0" tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: - version "4.4.15" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.15.tgz#3caced4f39ebd46ddda4d6203d48493a919697f8" - integrity sha512-ItbufpujXkry7bHH9NpQyTXPbJ72iTlXgkBAYsAjDXk3Ds8t/3NfO5P4xZGy7u+sYuQUbimgzswX4uQIEeNVOA== + version "4.4.19" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" temp-dir@^1.0.0: version "1.0.0" @@ -9926,7 +9926,7 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== From 780548cd616bd239767febd8a652bcc40b3a8c31 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Aug 2021 22:25:46 -0700 Subject: [PATCH 314/473] chore: bump cspell from 5.8.2 to 5.9.0 (#3828) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.8.2 to 5.9.0. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/compare/v5.8.2...v5.9.0) --- updated-dependencies: - dependency-name: cspell dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 98 +++++++++++++++++++++++++++---------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/yarn.lock b/yarn.lock index e643dfff159e..26293b720315 100644 --- a/yarn.lock +++ b/yarn.lock @@ -461,24 +461,24 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.8.2": - version "5.8.2" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.8.2.tgz#8abae7b1181b8300d3baa39833d336ce9f9adc52" - integrity sha512-W4YzuDdMqL6UIgDkocFNzxuLvoiN8sl+Nt+KbEDx0miSkrcP3GabBNNuH1xY/n0QofEhZMSx1cRH9US/ROdHkQ== +"@cspell/cspell-bundled-dicts@^5.9.0": + version "5.9.0" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.9.0.tgz#4afef125ddedf13d43bb4114fdfcc3b42450e91e" + integrity sha512-qI/MVTYjGh0Uhhx2YiqCIodfazHojcwJx6yzNkQQXZN7px0rGUPsRPiPx83LuHl1aE+APc5x8cblCwnnZUbPxg== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" "@cspell/dict-bash" "^1.0.15" "@cspell/dict-companies" "^1.0.40" - "@cspell/dict-cpp" "^1.1.39" + "@cspell/dict-cpp" "^1.1.40" "@cspell/dict-cryptocurrencies" "^1.0.10" "@cspell/dict-csharp" "^1.0.11" "@cspell/dict-css" "^1.0.12" "@cspell/dict-django" "^1.0.26" "@cspell/dict-dotnet" "^1.0.30" "@cspell/dict-elixir" "^1.0.25" - "@cspell/dict-en-gb" "^1.1.32" - "@cspell/dict-en_us" "^1.2.45" + "@cspell/dict-en-gb" "^1.1.33" + "@cspell/dict-en_us" "^2.0.2" "@cspell/dict-filetypes" "^1.1.8" "@cspell/dict-fonts" "^1.0.14" "@cspell/dict-fullstack" "^1.0.38" @@ -502,10 +502,10 @@ "@cspell/dict-software-terms" "^1.0.41" "@cspell/dict-typescript" "^1.0.19" -"@cspell/cspell-types@^5.8.2": - version "5.8.2" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.8.2.tgz#aeaf780ea0fd8d632b4e02f4d2296e3357a109d0" - integrity sha512-BWih6zBzpyFQiuBHyybByFtLCVfAJNX1G/ZvUgTFWna2xwWS0edQ3qp0H+v+FBRVCo2RHy4cmAfgzyCGtXHOmw== +"@cspell/cspell-types@^5.9.0": + version "5.9.0" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.9.0.tgz#1d74c2cb191f9dc7d899364a3ac366d00df181d8" + integrity sha512-S3O/4CNTTljQmWZpbBrG8IHPg9zWQ5rYpQ0tc9zoM1q/RzZev8xc55rggRu3IqtkwzyZUjVFo8apwQF5UZHXMg== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -527,10 +527,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-companies/-/dict-companies-1.0.40.tgz#edd7f47fc683dfa1b02cd48fb12ad732d2eece61" integrity sha512-Aw07qiTroqSST2P5joSrC4uOA05zTXzI2wMb+me3q4Davv1D9sCkzXY0TGoC2vzhNv5ooemRi9KATGaBSdU1sw== -"@cspell/dict-cpp@^1.1.39": - version "1.1.39" - resolved "https://registry.yarnpkg.com/@cspell/dict-cpp/-/dict-cpp-1.1.39.tgz#7e119e2c009f9200127733cbca3435180c405c70" - integrity sha512-zrQjzMaT5YqAa4PMEaLfOWnfyh4uJjW53kwtuTo9nfJPaga2+FfrqdeWD8XYMxvTGCtzjivXhAn4FDIMh+66YQ== +"@cspell/dict-cpp@^1.1.40": + version "1.1.40" + resolved "https://registry.yarnpkg.com/@cspell/dict-cpp/-/dict-cpp-1.1.40.tgz#f9a859e19d31b83f07a106e4c3c8720a2d93595b" + integrity sha512-sscfB3woNDNj60/yGXAdwNtIRWZ89y35xnIaJVDMk5TPMMpaDvuk0a34iOPIq0g4V+Y8e3RyAg71SH6ADwSjGw== "@cspell/dict-cryptocurrencies@^1.0.10": version "1.0.10" @@ -562,15 +562,15 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-elixir/-/dict-elixir-1.0.25.tgz#bec4fd754c99f646e553184df12df88b54da1c04" integrity sha512-ZmawoBYjM5k+8fNudRMkK+PpHjhyAFAZt2rUu1EGj2rbCvE3Fn2lhRbDjbreN7nWRvcLRTW+xuPXtKP11X0ahQ== -"@cspell/dict-en-gb@^1.1.32": - version "1.1.32" - resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.32.tgz#587057d1cfac67aa3f2a950ec00ec3e33a239689" - integrity sha512-iu83IDyCefo0T4NipEa3jtpJ/WDSr1IWt35kljolj7HFDFrjLr4Y/2t8yqtmB4otturWpa5T/G3/k90y2KU08Q== +"@cspell/dict-en-gb@^1.1.33": + version "1.1.33" + resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.33.tgz#7f1fd90fc364a5cb77111b5438fc9fcf9cc6da0e" + integrity sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g== -"@cspell/dict-en_us@^1.2.45": - version "1.2.45" - resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.45.tgz#1314a9d81a1fd3cc7ed381dc6a0da10e7c2d02f9" - integrity sha512-UPwR4rfiJCxnS+Py+EK9E4AUj3aPZE4p/yBRSHN+5aBQConlI0lLDtMceH5wlupA/sQTU1ERZGPJA9L96jVSyQ== +"@cspell/dict-en_us@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-2.0.2.tgz#9087b99ef9efa9e77d1b2546feb454e4067cbaac" + integrity sha512-g6TL4ynWHoxVKvQ0kdiMCbh4+FeXwmHFTL/dWgQbyfy6cqKXjsOqPK0OPVFIbqI5rV8QeBx5IH6ny/q/XQOvXQ== "@cspell/dict-filetypes@^1.1.8": version "1.1.8" @@ -3537,35 +3537,35 @@ 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.8.2: - version "5.8.2" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.8.2.tgz#56b301d7cece39f1e9b1b64dbf77f9e1d5c96e00" - integrity sha512-8BUvX0gsLHXx6uAaCO6T2l/U3xBNiFywvnwLK7648Q7IY3TzQV/L01ESbC+DrzT6G2KCA2bvQKByXJraqTTCaw== +cspell-glob@^5.9.0: + version "5.9.0" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.9.0.tgz#ecb493cd3e12ea9cbefe4aca1cb9e86638825288" + integrity sha512-4yhDg/oJpujKNOIX6EBmeb935vyBVXgd0SVb7AR183En9lTUPkT7PR4lTYKxolNs3/z4Ajx+xwA8DORW7E5Rtw== dependencies: micromatch "^4.0.4" -cspell-io@^5.8.2: - version "5.8.2" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.8.2.tgz#66c43830dd28822397a357d9bfa65e2f77c71c26" - integrity sha512-5ejb38VchMml840gigYO5oanOcef681pLstqwQt71yV+CG4YSyJK7RqPTeDHgsXbRkntdUrbydwza0481szVkQ== +cspell-io@^5.9.0: + version "5.9.0" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.9.0.tgz#f74867e43823965ddd3018920b1dddf71fe27d60" + integrity sha512-T+JO9RZrgW9StS6pg2yVQfNpR503lCzPCLM/24lBykPChaXOk2VTGiBa5TPu7qKRxP9x9p7zHLiawlTkgfIjzQ== dependencies: iconv-lite "^0.6.3" iterable-to-stream "^2.0.0" -cspell-lib@^5.8.2: - version "5.8.2" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.8.2.tgz#3a91fa2fe3b2c1607d003dbcce0f2ca41c7d613c" - integrity sha512-Z6W+oHnmmUstdEypwMiqlnLOaA68r1T3i5OE2t+t2sxLAUgqCiTFEUQzu/yv/7vAIRKawdHuAq1rqrNKZXulbQ== +cspell-lib@^5.9.0: + version "5.9.0" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.9.0.tgz#2efec17a98ac4b7e2da294fac747f236a820a125" + integrity sha512-86SsD7lOAu9ia5j2o7tBUIUrTrAjwEjMgP96+bE8NdSCArjvnY7FiTkes7AHGZ9g3KhluMEaDKhzJhK0TaZenQ== dependencies: - "@cspell/cspell-bundled-dicts" "^5.8.2" - "@cspell/cspell-types" "^5.8.2" + "@cspell/cspell-bundled-dicts" "^5.9.0" + "@cspell/cspell-types" "^5.9.0" clear-module "^4.1.1" comment-json "^4.1.1" configstore "^5.0.1" cosmiconfig "^7.0.1" - cspell-glob "^5.8.2" - cspell-io "^5.8.2" - cspell-trie-lib "^5.8.2" + cspell-glob "^5.9.0" + cspell-io "^5.9.0" + cspell-trie-lib "^5.9.0" find-up "^5.0.0" fs-extra "^10.0.0" gensequence "^3.1.1" @@ -3574,24 +3574,24 @@ cspell-lib@^5.8.2: resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.8.2: - version "5.8.2" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.8.2.tgz#266a58c21c3ead1eb8434accca6cca7d7abd183d" - integrity sha512-gvNwZO8QIqMTek2ZK/CeYYupzdXnIym7ytOgy7ycE/UIeNzJh/STC62Pe44CNvL86Xh1wgS4wFnh0pF6QRkZFw== +cspell-trie-lib@^5.9.0: + version "5.9.0" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.9.0.tgz#ca857a7468fa443bf6a9de4143849e770ca70a48" + integrity sha512-/m0kgxYuLyxeZGjajVC/oxrbi2zpv+1boKSjHBElPrE8MytDgdBgdCojsYAYNAl30QEF4GtxB+q0NlWV4laLdA== dependencies: fs-extra "^10.0.0" gensequence "^3.1.1" cspell@^5.5.2: - version "5.8.2" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.8.2.tgz#708067660270f3900816d99c6b055dafa8ebd6d0" - integrity sha512-yamhOvEDXq/f0ko1icR3FUH/pfbGnz5LqtnkDKskVhm5tzv2kUxUNbmYwBAYzs7N1igE+AokL1G7D/Rw9LCLBg== + version "5.9.0" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.9.0.tgz#2db3c85a9b0bf68bb4d49b0f72e35325a68170c3" + integrity sha512-TrPg5fmdd09S+alS8HjRvYPFBd8Qoxb8XxWGrH3JDsQGA7m6EljGcNjR6Mh19mMP5cQVOv7XmwEMy/EqwaHWTA== dependencies: chalk "^4.1.2" commander "^8.1.0" comment-json "^4.1.1" - cspell-glob "^5.8.2" - cspell-lib "^5.8.2" + cspell-glob "^5.9.0" + cspell-lib "^5.9.0" fs-extra "^10.0.0" get-stdin "^8.0.0" glob "^7.1.7" From f79ae9b58e82f4fddef640a34a1d7ff92b763e65 Mon Sep 17 00:00:00 2001 From: Yasar Siddiqui Date: Fri, 3 Sep 2021 22:59:38 +0530 Subject: [PATCH 315/473] feat(eslint-plugin): add extension rule `padding-line-between-statements` (#3418) --- .../src/unions/LeftHandSideExpression.ts | 2 + packages/eslint-plugin/README.md | 75 +- .../rules/padding-line-between-statements.md | 48 + packages/eslint-plugin/src/configs/all.ts | 2 + packages/eslint-plugin/src/rules/index.ts | 2 + .../rules/padding-line-between-statements.ts | 775 +++ .../padding-line-between-statements.test.ts | 5060 +++++++++++++++++ 7 files changed, 5927 insertions(+), 37 deletions(-) create mode 100644 packages/eslint-plugin/docs/rules/padding-line-between-statements.md create mode 100644 packages/eslint-plugin/src/rules/padding-line-between-statements.ts create mode 100644 packages/eslint-plugin/tests/rules/padding-line-between-statements.test.ts diff --git a/packages/ast-spec/src/unions/LeftHandSideExpression.ts b/packages/ast-spec/src/unions/LeftHandSideExpression.ts index 5d6922ed42d4..fc3a80b23618 100644 --- a/packages/ast-spec/src/unions/LeftHandSideExpression.ts +++ b/packages/ast-spec/src/unions/LeftHandSideExpression.ts @@ -9,6 +9,7 @@ import type { JSXFragment } from '../expression/JSXFragment/spec'; import type { MemberExpression } from '../expression/MemberExpression/spec'; import type { MetaProperty } from '../expression/MetaProperty/spec'; import type { ObjectExpression } from '../expression/ObjectExpression/spec'; +import type { SequenceExpression } from '../expression/spec'; import type { Super } from '../expression/Super/spec'; import type { TaggedTemplateExpression } from '../expression/TaggedTemplateExpression/spec'; import type { ThisExpression } from '../expression/ThisExpression/spec'; @@ -34,6 +35,7 @@ export type LeftHandSideExpression = | MetaProperty | ObjectExpression | ObjectPattern + | SequenceExpression | Super | TaggedTemplateExpression | ThisExpression diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 6f890d272562..a60d885093f0 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -190,43 +190,44 @@ In these cases, we create what we call an extension rule; a rule within our plug **Key**: :white_check_mark: = recommended, :wrench: = fixable, :thought_balloon: = requires type information -| 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: | | -| [`@typescript-eslint/comma-spacing`](./docs/rules/comma-spacing.md) | Enforces consistent spacing before and after commas | | :wrench: | | -| [`@typescript-eslint/default-param-last`](./docs/rules/default-param-last.md) | Enforce default parameters to be last | | | | -| [`@typescript-eslint/dot-notation`](./docs/rules/dot-notation.md) | enforce dot notation whenever possible | | :wrench: | :thought_balloon: | -| [`@typescript-eslint/func-call-spacing`](./docs/rules/func-call-spacing.md) | Require or disallow spacing between function identifiers and their invocations | | :wrench: | | -| [`@typescript-eslint/indent`](./docs/rules/indent.md) | Enforce consistent indentation | | :wrench: | | -| [`@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 | :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 | :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 | :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 | | | | -| [`@typescript-eslint/no-magic-numbers`](./docs/rules/no-magic-numbers.md) | Disallow magic numbers | | | | -| [`@typescript-eslint/no-redeclare`](./docs/rules/no-redeclare.md) | Disallow variable redeclaration | | | | -| [`@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 | :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 | :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: | | -| [`@typescript-eslint/space-infix-ops`](./docs/rules/space-infix-ops.md) | This rule is aimed at ensuring there are spaces around infix operators. | | :wrench: | | +| 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: | | +| [`@typescript-eslint/comma-spacing`](./docs/rules/comma-spacing.md) | Enforces consistent spacing before and after commas | | :wrench: | | +| [`@typescript-eslint/default-param-last`](./docs/rules/default-param-last.md) | Enforce default parameters to be last | | | | +| [`@typescript-eslint/dot-notation`](./docs/rules/dot-notation.md) | enforce dot notation whenever possible | | :wrench: | :thought_balloon: | +| [`@typescript-eslint/func-call-spacing`](./docs/rules/func-call-spacing.md) | Require or disallow spacing between function identifiers and their invocations | | :wrench: | | +| [`@typescript-eslint/indent`](./docs/rules/indent.md) | Enforce consistent indentation | | :wrench: | | +| [`@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 | :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 | :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 | :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 | | | | +| [`@typescript-eslint/no-magic-numbers`](./docs/rules/no-magic-numbers.md) | Disallow magic numbers | | | | +| [`@typescript-eslint/no-redeclare`](./docs/rules/no-redeclare.md) | Disallow variable redeclaration | | | | +| [`@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 | :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/padding-line-between-statements`](./docs/rules/padding-line-between-statements.md) | require or disallow padding lines between statements | | :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 | :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: | | +| [`@typescript-eslint/space-infix-ops`](./docs/rules/space-infix-ops.md) | This rule is aimed at ensuring there are spaces around infix operators. | | :wrench: | | diff --git a/packages/eslint-plugin/docs/rules/padding-line-between-statements.md b/packages/eslint-plugin/docs/rules/padding-line-between-statements.md new file mode 100644 index 000000000000..b23ce702b788 --- /dev/null +++ b/packages/eslint-plugin/docs/rules/padding-line-between-statements.md @@ -0,0 +1,48 @@ +# require or disallow padding lines between statements (`padding-line-between-statements`) + +## Rule Details + +This rule extends the base [`eslint/padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) rule. + +**It adds support for TypeScript constructs such as `interface` and `type`.** + +## How to use + +```jsonc +{ + // note you must disable the base rule as it can report incorrect errors + "padding-line-between-statements": "off", + "@typescript-eslint/padding-line-between-statements": [ + "error", + { + "blankLine": "always", + "prev": "var", + "next": "return" + } + ] +} +``` + +```jsonc +{ + // Example - Add blank lines before interface and type definitions. + // note you must disable the base rule as it can report incorrect errors + "padding-line-between-statements": "off", + "@typescript-eslint/padding-line-between-statements": [ + "error", + { + "blankLine": "always", + "prev": "*", + "next": ["interface", "type"] + } + ] +} +``` + +## Options + +See [`eslint/padding-line-between-statements` options](https://eslint.org/docs/rules/padding-line-between-statements#options). + +**Note** - In addition to options provided by ESLint, we have also added options for `interface` and `type`. + +Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/padding-line-between-statements.md) diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index 66209b806233..4d94a83fa592 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -116,6 +116,8 @@ export = { '@typescript-eslint/non-nullable-type-assertion-style': 'error', 'object-curly-spacing': 'off', '@typescript-eslint/object-curly-spacing': 'error', + 'padding-line-between-statements': 'off', + '@typescript-eslint/padding-line-between-statements': 'error', '@typescript-eslint/prefer-as-const': 'error', '@typescript-eslint/prefer-enum-initializers': 'error', '@typescript-eslint/prefer-for-of': 'error', diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index 1b6fa0f6ea12..54dd9c24ac34 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -81,6 +81,7 @@ import noUselessConstructor from './no-useless-constructor'; import noVarRequires from './no-var-requires'; import nonNullableTypeAssertionStyle from './non-nullable-type-assertion-style'; import objectCurlySpacing from './object-curly-spacing'; +import paddingLineBetweenStatements from './padding-line-between-statements'; import preferAsConst from './prefer-as-const'; import preferEnumInitializers from './prefer-enum-initializers'; import preferForOf from './prefer-for-of'; @@ -200,6 +201,7 @@ export default { 'no-var-requires': noVarRequires, 'non-nullable-type-assertion-style': nonNullableTypeAssertionStyle, 'object-curly-spacing': objectCurlySpacing, + 'padding-line-between-statements': paddingLineBetweenStatements, 'prefer-as-const': preferAsConst, 'prefer-enum-initializers': preferEnumInitializers, 'prefer-for-of': preferForOf, diff --git a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts new file mode 100644 index 000000000000..f686476e5dee --- /dev/null +++ b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts @@ -0,0 +1,775 @@ +import { + AST_NODE_TYPES, + TSESLint, + TSESTree, +} from '@typescript-eslint/experimental-utils'; +import * as util from '../util'; + +/** + * This rule is a replica of padding-line-between-statements. + * + * Ideally we would want to extend the rule support typescript specific support. + * But since not all the state is exposed by the eslint and eslint has frozen stylistic rules, + * (see - https://eslint.org/blog/2020/05/changes-to-rules-policies for details.) + * we are forced to re-implement the rule here. + * + * We have tried to keep the implementation as close as possible to the eslint implementation, to make + * patching easier for future contributors. + * + * Reference rule - https://github.com/eslint/eslint/blob/master/lib/rules/padding-line-between-statements.js + */ + +type NodeTest = ( + node: TSESTree.Node, + sourceCode: TSESLint.SourceCode, +) => boolean; + +interface NodeTestObject { + test: NodeTest; +} + +interface PaddingOption { + blankLine: keyof typeof PaddingTypes; + prev: string | string[]; + next: string | string[]; +} + +type MessageIds = 'expectedBlankLine' | 'unexpectedBlankLine'; +type Options = PaddingOption[]; + +const LT = `[${Array.from( + new Set(['\r\n', '\r', '\n', '\u2028', '\u2029']), +).join('')}]`; +const PADDING_LINE_SEQUENCE = new RegExp( + String.raw`^(\s*?${LT})\s*${LT}(\s*;?)$`, + 'u', +); + +/** + * Creates tester which check if a node starts with specific keyword. + * @param keyword The keyword to test. + * @returns the created tester. + * @private + */ +function newKeywordTester(keyword: string): NodeTestObject { + return { + test(node, sourceCode): boolean { + return sourceCode.getFirstToken(node)?.value === keyword; + }, + }; +} + +/** + * Creates tester which check if a node starts with specific keyword and spans a single line. + * @param keyword The keyword to test. + * @returns the created tester. + * @private + */ +function newSinglelineKeywordTester(keyword: string): NodeTestObject { + return { + test(node, sourceCode): boolean { + return ( + node.loc.start.line === node.loc.end.line && + sourceCode.getFirstToken(node)!.value === keyword + ); + }, + }; +} + +/** + * Creates tester which check if a node starts with specific keyword and spans multiple lines. + * @param keyword The keyword to test. + * @returns the created tester. + * @private + */ +function newMultilineKeywordTester(keyword: string): NodeTestObject { + return { + test(node, sourceCode): boolean { + return ( + node.loc.start.line !== node.loc.end.line && + sourceCode.getFirstToken(node)!.value === keyword + ); + }, + }; +} + +/** + * Creates tester which check if a node is specific type. + * @param type The node type to test. + * @returns the created tester. + * @private + */ +function newNodeTypeTester(type: AST_NODE_TYPES): NodeTestObject { + return { + test: (node): boolean => node.type === type, + }; +} + +/** + * Skips a chain expression node + * @paramnode The node to test + * @returnsA non-chain expression + * @private + */ +function skipChainExpression(node: TSESTree.Node): TSESTree.Node { + return node && node.type === AST_NODE_TYPES.ChainExpression + ? node.expression + : node; +} + +/** + * Checks the given node is an expression statement of IIFE. + * @paramnode The node to check. + * @returns `true` if the node is an expression statement of IIFE. + * @private + */ +function isIIFEStatement(node: TSESTree.Node): boolean { + if (node.type === AST_NODE_TYPES.ExpressionStatement) { + let expression = skipChainExpression(node.expression); + if (expression.type === AST_NODE_TYPES.UnaryExpression) { + expression = skipChainExpression(expression.argument); + } + if (expression.type === AST_NODE_TYPES.CallExpression) { + let node: TSESTree.Node = expression.callee; + while (node.type === AST_NODE_TYPES.SequenceExpression) { + node = node.expressions[node.expressions.length - 1]; + } + return util.isFunction(node); + } + } + return false; +} + +/** + * Checks the given node is a CommonJS require statement + * @paramnode The node to check. + * @returns `true` if the node is a CommonJS require statement. + * @private + */ +function isCJSRequire(node: TSESTree.Node): boolean { + if (node.type === AST_NODE_TYPES.VariableDeclaration) { + const declaration = node.declarations[0]; + if (declaration?.init) { + let call = declaration?.init; + while (call.type === AST_NODE_TYPES.MemberExpression) { + call = call.object; + } + if ( + call.type === AST_NODE_TYPES.CallExpression && + call.callee.type === AST_NODE_TYPES.Identifier + ) { + return call.callee.name === 'require'; + } + } + } + return false; +} + +/** + * Checks whether the given node is a block-like statement. + * This checks the last token of the node is the closing brace of a block. + * @param sourceCode The source code to get tokens. + * @paramnode The node to check. + * @returns `true` if the node is a block-like statement. + * @private + */ +function isBlockLikeStatement( + node: TSESTree.Node, + sourceCode: TSESLint.SourceCode, +): boolean { + // do-while with a block is a block-like statement. + if ( + node.type === AST_NODE_TYPES.DoWhileStatement && + node.body.type === AST_NODE_TYPES.BlockStatement + ) { + return true; + } + + /** + * IIFE is a block-like statement specially from + * JSCS#disallowPaddingNewLinesAfterBlocks. + */ + if (isIIFEStatement(node)) { + return true; + } + + // Checks the last token is a closing brace of blocks. + const lastToken = sourceCode.getLastToken(node, util.isNotSemicolonToken); + const belongingNode = + lastToken && util.isClosingBraceToken(lastToken) + ? sourceCode.getNodeByRangeIndex(lastToken.range[0]) + : null; + + return ( + !!belongingNode && + (belongingNode.type === AST_NODE_TYPES.BlockStatement || + belongingNode.type === AST_NODE_TYPES.SwitchStatement) + ); +} + +/** + * Check whether the given node is a directive or not. + * @paramnode The node to check. + * @param sourceCode The source code object to get tokens. + * @returns `true` if the node is a directive. + */ +function isDirective( + node: TSESTree.Node, + sourceCode: TSESLint.SourceCode, +): boolean { + return ( + node.type === AST_NODE_TYPES.ExpressionStatement && + (node.parent?.type === AST_NODE_TYPES.Program || + (node.parent?.type === AST_NODE_TYPES.BlockStatement && + util.isFunction(node.parent.parent))) && + node.expression.type === AST_NODE_TYPES.Literal && + typeof node.expression.value === 'string' && + !util.isParenthesized(node.expression, sourceCode) + ); +} + +/** + * Check whether the given node is a part of directive prologue or not. + * @paramnode The node to check. + * @param sourceCode The source code object to get tokens. + * @returns `true` if the node is a part of directive prologue. + */ +function isDirectivePrologue( + node: TSESTree.Node, + sourceCode: TSESLint.SourceCode, +): boolean { + if ( + isDirective(node, sourceCode) && + node.parent && + 'body' in node.parent && + Array.isArray(node.parent.body) + ) { + for (const sibling of node.parent.body) { + if (sibling === node) { + break; + } + if (!isDirective(sibling, sourceCode)) { + return false; + } + } + return true; + } + return false; +} + +/** + * Checks the given node is a CommonJS export statement + * @paramnode The node to check. + * @returns `true` if the node is a CommonJS export statement. + * @private + */ +function isCJSExport(node: TSESTree.Node): boolean { + if (node.type === AST_NODE_TYPES.ExpressionStatement) { + const expression = node.expression; + if (expression.type === AST_NODE_TYPES.AssignmentExpression) { + let left = expression.left; + if (left.type === AST_NODE_TYPES.MemberExpression) { + while (left.object.type === AST_NODE_TYPES.MemberExpression) { + left = left.object; + } + return ( + left.object.type === AST_NODE_TYPES.Identifier && + (left.object.name === 'exports' || + (left.object.name === 'module' && + left.property.type === AST_NODE_TYPES.Identifier && + left.property.name === 'exports')) + ); + } + } + } + return false; +} + +/** + * Check whether the given node is an expression + * @paramnode The node to check. + * @param sourceCode The source code object to get tokens. + * @returns `true` if the node is an expression + */ +function isExpression( + node: TSESTree.Node, + sourceCode: TSESLint.SourceCode, +): boolean { + return ( + node.type === AST_NODE_TYPES.ExpressionStatement && + !isDirectivePrologue(node, sourceCode) + ); +} + +/** + * Gets the actual last token. + * + * If a semicolon is semicolon-less style's semicolon, this ignores it. + * For example: + * + * foo() + * ;[1, 2, 3].forEach(bar) + * @param sourceCode The source code to get tokens. + * @paramnode The node to get. + * @returns The actual last token. + * @private + */ +function getActualLastToken( + node: TSESTree.Node, + sourceCode: TSESLint.SourceCode, +): TSESTree.Token | null { + const semiToken = sourceCode.getLastToken(node)!; + const prevToken = sourceCode.getTokenBefore(semiToken); + const nextToken = sourceCode.getTokenAfter(semiToken); + const isSemicolonLessStyle = + prevToken && + nextToken && + prevToken.range[0] >= node.range[0] && + util.isSemicolonToken(semiToken) && + semiToken.loc.start.line !== prevToken.loc.end.line && + semiToken.loc.end.line === nextToken.loc.start.line; + + return isSemicolonLessStyle ? prevToken : semiToken; +} + +/** + * This returns the concatenation of the first 2 captured strings. + * @param _ Unused. Whole matched string. + * @param trailingSpaces The trailing spaces of the first line. + * @param indentSpaces The indentation spaces of the last line. + * @returns The concatenation of trailingSpaces and indentSpaces. + * @private + */ +function replacerToRemovePaddingLines( + _: string, + trailingSpaces: string, + indentSpaces: string, +): string { + return trailingSpaces + indentSpaces; +} + +/** + * Check and report statements for `any` configuration. + * It does nothing. + * + * @private + */ +function verifyForAny(): void { + // Empty +} + +/** + * Check and report statements for `never` configuration. + * This autofix removes blank lines between the given 2 statements. + * However, if comments exist between 2 blank lines, it does not remove those + * blank lines automatically. + * @param context The rule context to report. + * @param_ Unused. The previous node to check. + * @paramnextNode The next node to check. + * @param paddingLines The array of token pairs that blank + * lines exist between the pair. + * + * @private + */ +function verifyForNever( + context: TSESLint.RuleContext, + _: TSESTree.Node, + nextNode: TSESTree.Node, + paddingLines: [TSESTree.Token, TSESTree.Token][], +): void { + if (paddingLines.length === 0) { + return; + } + + context.report({ + node: nextNode, + messageId: 'unexpectedBlankLine', + fix(fixer) { + if (paddingLines.length >= 2) { + return null; + } + + const prevToken = paddingLines[0][0]; + const nextToken = paddingLines[0][1]; + const start = prevToken.range[1]; + const end = nextToken.range[0]; + const text = context + .getSourceCode() + .text.slice(start, end) + .replace(PADDING_LINE_SEQUENCE, replacerToRemovePaddingLines); + + return fixer.replaceTextRange([start, end], text); + }, + }); +} + +/** + * Check and report statements for `always` configuration. + * This autofix inserts a blank line between the given 2 statements. + * If the `prevNode` has trailing comments, it inserts a blank line after the + * trailing comments. + * @param context The rule context to report. + * @paramprevNode The previous node to check. + * @paramnextNode The next node to check. + * @param paddingLines The array of token pairs that blank + * lines exist between the pair. + * + * @private + */ +function verifyForAlways( + context: TSESLint.RuleContext, + prevNode: TSESTree.Node, + nextNode: TSESTree.Node, + paddingLines: [TSESTree.Token, TSESTree.Token][], +): void { + if (paddingLines.length > 0) { + return; + } + + context.report({ + node: nextNode, + messageId: 'expectedBlankLine', + fix(fixer) { + const sourceCode = context.getSourceCode(); + let prevToken = getActualLastToken( + prevNode, + sourceCode, + ) as TSESTree.Token; + const nextToken = + (sourceCode.getFirstTokenBetween(prevToken, nextNode, { + includeComments: true, + + /** + * Skip the trailing comments of the previous node. + * This inserts a blank line after the last trailing comment. + * + * For example: + * + * foo(); // trailing comment. + * // comment. + * bar(); + * + * Get fixed to: + * + * foo(); // trailing comment. + * + * // comment. + * bar(); + * @param token The token to check. + * @returns `true` if the token is not a trailing comment. + * @private + */ + filter(token) { + if (util.isTokenOnSameLine(prevToken, token)) { + prevToken = token; + return false; + } + return true; + }, + }) as TSESTree.Token) || nextNode; + const insertText = util.isTokenOnSameLine(prevToken, nextToken) + ? '\n\n' + : '\n'; + + return fixer.insertTextAfter(prevToken, insertText); + }, + }); +} + +/** + * Types of blank lines. + * `any`, `never`, and `always` are defined. + * Those have `verify` method to check and report statements. + * @private + */ +const PaddingTypes = { + any: { verify: verifyForAny }, + never: { verify: verifyForNever }, + always: { verify: verifyForAlways }, +}; + +/** + * Types of statements. + * Those have `test` method to check it matches to the given statement. + * @private + */ +const StatementTypes: Record = { + '*': { test: (): boolean => true }, + 'block-like': { test: isBlockLikeStatement }, + exports: { test: isCJSExport }, + require: { test: isCJSRequire }, + directive: { test: isDirectivePrologue }, + expression: { test: isExpression }, + iife: { test: isIIFEStatement }, + + 'multiline-block-like': { + test: (node, sourceCode) => + node.loc.start.line !== node.loc.end.line && + isBlockLikeStatement(node, sourceCode), + }, + 'multiline-expression': { + test: (node, sourceCode) => + node.loc.start.line !== node.loc.end.line && + node.type === AST_NODE_TYPES.ExpressionStatement && + !isDirectivePrologue(node, sourceCode), + }, + + 'multiline-const': newMultilineKeywordTester('const'), + 'multiline-let': newMultilineKeywordTester('let'), + 'multiline-var': newMultilineKeywordTester('var'), + 'singleline-const': newSinglelineKeywordTester('const'), + 'singleline-let': newSinglelineKeywordTester('let'), + 'singleline-var': newSinglelineKeywordTester('var'), + + block: newNodeTypeTester(AST_NODE_TYPES.BlockStatement), + empty: newNodeTypeTester(AST_NODE_TYPES.EmptyStatement), + function: newNodeTypeTester(AST_NODE_TYPES.FunctionDeclaration), + + break: newKeywordTester('break'), + case: newKeywordTester('case'), + class: newKeywordTester('class'), + const: newKeywordTester('const'), + continue: newKeywordTester('continue'), + debugger: newKeywordTester('debugger'), + default: newKeywordTester('default'), + do: newKeywordTester('do'), + export: newKeywordTester('export'), + for: newKeywordTester('for'), + if: newKeywordTester('if'), + import: newKeywordTester('import'), + let: newKeywordTester('let'), + return: newKeywordTester('return'), + switch: newKeywordTester('switch'), + throw: newKeywordTester('throw'), + try: newKeywordTester('try'), + var: newKeywordTester('var'), + while: newKeywordTester('while'), + with: newKeywordTester('with'), + + // Additional Typescript constructs + interface: newKeywordTester('interface'), + type: newKeywordTester('type'), +}; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +export default util.createRule({ + name: 'padding-line-between-statements', + meta: { + type: 'layout', + docs: { + description: 'require or disallow padding lines between statements', + category: 'Stylistic Issues', + recommended: false, + extendsBaseRule: true, + }, + fixable: 'whitespace', + schema: { + definitions: { + paddingType: { + enum: Object.keys(PaddingTypes), + }, + statementType: { + anyOf: [ + { enum: Object.keys(StatementTypes) }, + { + type: 'array', + items: { enum: Object.keys(StatementTypes) }, + minItems: 1, + uniqueItems: true, + additionalItems: false, + }, + ], + }, + }, + type: 'array', + items: { + type: 'object', + properties: { + blankLine: { $ref: '#/definitions/paddingType' }, + prev: { $ref: '#/definitions/statementType' }, + next: { $ref: '#/definitions/statementType' }, + }, + additionalProperties: false, + required: ['blankLine', 'prev', 'next'], + }, + additionalItems: false, + }, + messages: { + unexpectedBlankLine: 'Unexpected blank line before this statement.', + expectedBlankLine: 'Expected blank line before this statement.', + }, + }, + defaultOptions: [], + create(context) { + const sourceCode = context.getSourceCode(); + const configureList = context.options || []; + + type Scope = null | { + upper: Scope; + prevNode: TSESTree.Node | null; + }; + + let scopeInfo: Scope = null; + + /** + * Processes to enter to new scope. + * This manages the current previous statement. + * + * @private + */ + function enterScope(): void { + scopeInfo = { + upper: scopeInfo, + prevNode: null, + }; + } + + /** + * Processes to exit from the current scope. + * + * @private + */ + function exitScope(): void { + if (scopeInfo) { + scopeInfo = scopeInfo.upper; + } + } + + /** + * Checks whether the given node matches the given type. + * @paramnode The statement node to check. + * @param type The statement type to check. + * @returns `true` if the statement node matched the type. + * @private + */ + function match(node: TSESTree.Node, type: string | string[]): boolean { + let innerStatementNode = node; + + while (innerStatementNode.type === AST_NODE_TYPES.LabeledStatement) { + innerStatementNode = innerStatementNode.body; + } + + if (Array.isArray(type)) { + return type.some(match.bind(null, innerStatementNode)); + } + + return StatementTypes[type].test(innerStatementNode, sourceCode); + } + + /** + * Finds the last matched configure from configureList. + * @paramprevNode The previous statement to match. + * @paramnextNode The current statement to match. + * @returns The tester of the last matched configure. + * @private + */ + function getPaddingType( + prevNode: TSESTree.Node, + nextNode: TSESTree.Node, + ): typeof PaddingTypes[keyof typeof PaddingTypes] { + for (let i = configureList.length - 1; i >= 0; --i) { + const configure = configureList[i]; + if ( + match(prevNode, configure.prev) && + match(nextNode, configure.next) + ) { + return PaddingTypes[configure.blankLine]; + } + } + return PaddingTypes.any; + } + + /** + * Gets padding line sequences between the given 2 statements. + * Comments are separators of the padding line sequences. + * @paramprevNode The previous statement to count. + * @paramnextNode The current statement to count. + * @returns The array of token pairs. + * @private + */ + function getPaddingLineSequences( + prevNode: TSESTree.Node, + nextNode: TSESTree.Node, + ): [TSESTree.Token, TSESTree.Token][] { + const pairs: [TSESTree.Token, TSESTree.Token][] = []; + let prevToken: TSESTree.Token = getActualLastToken(prevNode, sourceCode)!; + + if (nextNode.loc.start.line - prevToken.loc.end.line >= 2) { + do { + const token: TSESTree.Token = sourceCode.getTokenAfter(prevToken, { + includeComments: true, + })!; + + if (token.loc.start.line - prevToken.loc.end.line >= 2) { + pairs.push([prevToken, token]); + } + prevToken = token; + } while (prevToken.range[0] < nextNode.range[0]); + } + + return pairs; + } + + /** + * Verify padding lines between the given node and the previous node. + * @paramnode The node to verify. + * + * @private + */ + function verify(node: TSESTree.Node): void { + if ( + !node.parent || + ![ + AST_NODE_TYPES.SwitchStatement, + AST_NODE_TYPES.BlockStatement, + AST_NODE_TYPES.Program, + AST_NODE_TYPES.SwitchCase, + ].includes(node.parent.type) + ) { + return; + } + + // Save this node as the current previous statement. + const prevNode = scopeInfo!.prevNode; + + // Verify. + if (prevNode) { + const type = getPaddingType(prevNode, node); + const paddingLines = getPaddingLineSequences(prevNode, node); + + type.verify(context, prevNode, node, paddingLines); + } + + scopeInfo!.prevNode = node; + } + + /** + * Verify padding lines between the given node and the previous node. + * Then process to enter to new scope. + * @paramnode The node to verify. + * + * @private + */ + function verifyThenEnterScope(node: TSESTree.Node): void { + verify(node); + enterScope(); + } + + return { + Program: enterScope, + BlockStatement: enterScope, + SwitchStatement: enterScope, + 'Program:exit': exitScope, + 'BlockStatement:exit': exitScope, + 'SwitchStatement:exit': exitScope, + + ':statement': verify, + + SwitchCase: verifyThenEnterScope, + 'SwitchCase:exit': exitScope, + }; + }, +}); diff --git a/packages/eslint-plugin/tests/rules/padding-line-between-statements.test.ts b/packages/eslint-plugin/tests/rules/padding-line-between-statements.test.ts new file mode 100644 index 000000000000..d018f189929f --- /dev/null +++ b/packages/eslint-plugin/tests/rules/padding-line-between-statements.test.ts @@ -0,0 +1,5060 @@ +/* eslint-disable eslint-comments/no-use */ +// this rule tests new lines which prettier tries to fix, breaking the tests +/* eslint "@typescript-eslint/internal/plugin-test-formatting": ["error", { formatWithPrettier: false }] */ +/* eslint-enable eslint-comments/no-use */ + +import rule from '../../src/rules/padding-line-between-statements'; +import { RuleTester } from '../RuleTester'; + +//------------------------------------------------------------------------------ +// Tests +//------------------------------------------------------------------------------ + +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', +}); + +ruleTester.run('padding-line-between-statements', rule, { + valid: [ + // do nothing if no options. + "'use strict'; foo(); if (a) { bar(); }", + + // do nothing for single statement. + { + code: 'foo()', + options: [{ blankLine: 'never', prev: '*', next: '*' }], + }, + { + code: 'foo()', + options: [{ blankLine: 'always', prev: '*', next: '*' }], + }, + + //---------------------------------------------------------------------- + // wildcard + //---------------------------------------------------------------------- + + { + code: 'foo();bar();', + options: [{ blankLine: 'never', prev: '*', next: '*' }], + }, + { + code: 'foo();\nbar();', + options: [{ blankLine: 'never', prev: '*', next: '*' }], + }, + { + code: 'foo();\n//comment\nbar();', + options: [{ blankLine: 'never', prev: '*', next: '*' }], + }, + { + code: 'foo();\n/*comment*/\nbar();', + options: [{ blankLine: 'never', prev: '*', next: '*' }], + }, + { + code: 'foo();\n\nbar();', + options: [{ blankLine: 'always', prev: '*', next: '*' }], + }, + { + code: 'foo();\n\n//comment\nbar();', + options: [{ blankLine: 'always', prev: '*', next: '*' }], + }, + { + code: 'foo();\n//comment\n\nbar();', + options: [{ blankLine: 'always', prev: '*', next: '*' }], + }, + { + code: 'foo();\n//comment\n\n//comment\nbar();', + options: [{ blankLine: 'always', prev: '*', next: '*' }], + }, + { + code: 'if(a){}\n\n;[].map(b)', + options: [ + { blankLine: 'always', prev: 'if', next: '*' }, + { blankLine: 'never', prev: 'empty', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // block-like + //---------------------------------------------------------------------- + + { + code: 'foo();\n\n{ foo() }\n\nfoo();', + options: [ + { blankLine: 'always', prev: '*', next: '*' }, + { blankLine: 'never', prev: 'block-like', next: 'block-like' }, + ], + }, + { + code: '{ foo() } { foo() }', + options: [ + { blankLine: 'always', prev: '*', next: '*' }, + { blankLine: 'never', prev: 'block-like', next: 'block-like' }, + ], + }, + { + code: '{ foo() }\n{ foo() }', + options: [ + { blankLine: 'always', prev: '*', next: '*' }, + { blankLine: 'never', prev: 'block-like', next: 'block-like' }, + ], + }, + { + code: '{ foo() }\n\n{ foo() }', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block-like', next: 'block-like' }, + ], + }, + { + code: '{ foo() }\n\n//comment\n{ foo() }', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block-like', next: 'block-like' }, + ], + }, + { + code: 'if(a);\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block-like', next: '*' }, + ], + }, + { + code: 'do;while(a);\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block-like', next: '*' }, + ], + }, + { + code: 'do{}while(a);\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block-like', next: '*' }, + ], + }, + { + code: 'a={}\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block-like', next: '*' }, + ], + }, + { + code: 'let a={}\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block-like', next: '*' }, + ], + }, + { + code: 'foo(function(){})\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block-like', next: '*' }, + ], + }, + { + code: '(function(){})()\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block-like', next: '*' }, + ], + }, + { + code: '!function(){}()\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block-like', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // exports + //---------------------------------------------------------------------- + + { + code: 'module.exports=1', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'exports', next: '*' }, + ], + }, + { + code: 'module.exports=1\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'exports', next: '*' }, + ], + }, + { + code: 'module.exports.foo=1\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'exports', next: '*' }, + ], + }, + { + code: 'exports.foo=1\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'exports', next: '*' }, + ], + }, + { + code: 'm.exports=1\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'exports', next: '*' }, + ], + }, + { + code: 'module.foo=1\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'exports', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // require + //---------------------------------------------------------------------- + + { + code: 'foo=require("foo")\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'require', next: '*' }, + ], + }, + { + code: 'const foo=a.require("foo")\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'require', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // directive + //---------------------------------------------------------------------- + + { + code: '"use strict"\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'directive', next: '*' }, + ], + }, + { + code: 'function foo(){"use strict"\n\nfoo()}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'directive', next: '*' }, + ], + }, + { + code: '(function foo(){"use strict"\n\nfoo()})', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'directive', next: '*' }, + ], + }, + { + code: '(()=>{"use strict"\n\nfoo()})', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'directive', next: '*' }, + ], + }, + { + code: "'use strict'\n\nfoo()", + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'directive', next: '*' }, + ], + }, + { + code: 'foo("use strict")\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'directive', next: '*' }, + ], + }, + { + code: '`use strict`\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'directive', next: '*' }, + ], + }, + { + code: '("use strict")\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'directive', next: '*' }, + ], + }, + { + code: "'use '+'strict'\nfoo()", + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'directive', next: '*' }, + ], + }, + { + code: 'foo()\n"use strict"\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'directive', next: '*' }, + ], + }, + { + code: '{"use strict"\nfoo()}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'directive', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // multiline-block-like + //---------------------------------------------------------------------- + + { + code: '{}\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + { + code: 'if(a){}\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + { + code: 'while(a){}\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + { + code: '{\n}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + { + code: 'if(a){\n}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + { + code: 'while(a){\n}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + { + code: 'do{\n}while(a)\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + { + code: 'for(;;){\n}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + { + code: 'for(a in b){\n}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + { + code: 'for(a of b){\n}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + { + code: 'switch(a){\n}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + { + code: 'function foo(a){\n}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + { + code: 'var a=function foo(a){\n}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // block + //---------------------------------------------------------------------- + + { + code: '{}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block', next: '*' }, + ], + }, + { + code: '{\n}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block', next: '*' }, + ], + }, + { + code: '{\nfoo()\n}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block', next: '*' }, + ], + }, + { + code: 'if(a){}\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block', next: '*' }, + ], + }, + { + code: 'a={}\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'block', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // empty + //---------------------------------------------------------------------- + + { + code: ';\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'empty', next: '*' }, + ], + }, + { + code: '1;\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'empty', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // expression + //---------------------------------------------------------------------- + + { + code: 'foo()\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'expression', next: '*' }, + ], + }, + { + code: 'a=b+c\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'expression', next: '*' }, + ], + }, + { + code: 'var a=1\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'expression', next: '*' }, + ], + }, + { + code: "'use strict'\nfoo()", + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'expression', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // multiline-expression + //---------------------------------------------------------------------- + + { + code: 'foo()\n\nfoo(\n\tx,\n\ty\n)', + options: [ + { blankLine: 'always', prev: '*', next: 'multiline-expression' }, + ], + }, + { + code: 'foo()\nfoo()', + options: [ + { blankLine: 'always', prev: '*', next: 'multiline-expression' }, + ], + }, + { + code: '() => {\n\tsomeArray.forEach(x => doSomething(x));\n\treturn theThing;\n}', + options: [ + { blankLine: 'always', prev: 'multiline-expression', next: 'return' }, + ], + }, + { + code: '() => {\n\tsomeArray.forEach(\n\t\tx => doSomething(x)\n\t);\n\n\treturn theThing;\n}', + options: [ + { blankLine: 'always', prev: 'multiline-expression', next: 'return' }, + ], + }, + + //---------------------------------------------------------------------- + // break + //---------------------------------------------------------------------- + + { + code: 'A:{break A\n\nfoo()}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'break', next: '*' }, + ], + }, + { + code: 'while(a){break\n\nfoo()}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'break', next: '*' }, + ], + }, + { + code: 'switch(a){case 0:break\n\nfoo()}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'break', next: '*' }, + ], + }, + { + code: 'switch(a){case 0:break\ncase 1:break}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'break', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // case + //---------------------------------------------------------------------- + + { + code: 'switch(a){case 0:\nfoo()\n\ncase 1:\nfoo()}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'case', next: '*' }, + ], + }, + { + code: 'switch(a){case 0:\nfoo()\n\ndefault:\nfoo()}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'case', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // class + //---------------------------------------------------------------------- + + { + code: 'class A{}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'class', next: '*' }, + ], + }, + { + code: 'var A = class{}\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'class', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // const + //---------------------------------------------------------------------- + + { + code: 'const a=1\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'const', next: '*' }, + ], + }, + { + code: 'let a=1\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'const', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // type + //---------------------------------------------------------------------- + + { + code: 'type a=number\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'type', next: '*' }, + ], + }, + { + code: 'let a=number\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'type', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // interface + //---------------------------------------------------------------------- + + { + code: 'interface Test{\na:number;\n}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'interface', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // continue + //---------------------------------------------------------------------- + + { + code: 'while(a){continue\n\nfoo()}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'continue', next: '*' }, + ], + }, + { + code: 'while(a){break\nfoo()}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'continue', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // debugger + //---------------------------------------------------------------------- + + { + code: 'debugger\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'debugger', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // default + //---------------------------------------------------------------------- + + { + code: 'switch(a){default:\nfoo()\n\ncase 0:\nfoo()\ncase 1:}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'default', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // do + //---------------------------------------------------------------------- + + { + code: 'do;while(a)\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'do', next: '*' }, + ], + }, + { + code: 'while(a);\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'do', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // export + //---------------------------------------------------------------------- + + { + code: 'export default 1\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'export', next: '*' }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + { + code: 'export let a=1\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'export', next: '*' }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + { + code: 'var a = 0; export {a}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'export', next: '*' }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + { + code: 'exports.foo=1\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'export', next: '*' }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + { + code: 'module.exports={}\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'export', next: '*' }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + + //---------------------------------------------------------------------- + // for + //---------------------------------------------------------------------- + + { + code: 'for(;;);\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'for', next: '*' }, + ], + }, + { + code: 'for(a in b);\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'for', next: '*' }, + ], + }, + { + code: 'for(a of b);\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'for', next: '*' }, + ], + }, + { + code: 'while(a);\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'for', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // function + //---------------------------------------------------------------------- + + { + code: 'function foo(){}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'function', next: '*' }, + ], + }, + { + code: 'var foo=function(){}\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'function', next: '*' }, + ], + }, + { + code: 'async function foo(){}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'function', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // if + //---------------------------------------------------------------------- + + { + code: 'if(a);\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'if', next: '*' }, + ], + }, + { + code: 'if(a);else;\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'if', next: '*' }, + ], + }, + { + code: 'if(a);else if(b);else;\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'if', next: '*' }, + ], + }, + { + code: 'for(;;);\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'if', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // iife + //---------------------------------------------------------------------- + + { + code: '(function(){\n})()\n\nvar a = 2;', + options: [{ blankLine: 'always', prev: 'iife', next: '*' }], + }, + { + code: '+(function(){\n})()\n\nvar a = 2;', + options: [{ blankLine: 'always', prev: 'iife', next: '*' }], + }, + { + code: '(function(){\n})()\nvar a = 2;', + options: [{ blankLine: 'never', prev: 'iife', next: '*' }], + }, + { + code: '+(function(){\n})()\nvar a = 2;', + options: [{ blankLine: 'never', prev: 'iife', next: '*' }], + }, + { + code: '(1, 2, 3, function(){\n})()\n\nvar a = 2;', + options: [{ blankLine: 'always', prev: 'iife', next: '*' }], + }, + + //---------------------------------------------------------------------- + // import + //---------------------------------------------------------------------- + + { + code: "import 'a'\n\nfoo()", + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'import', next: '*' }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + { + code: "import a from 'a'\n\nfoo()", + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'import', next: '*' }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + { + code: "import * as a from 'a'\n\nfoo()", + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'import', next: '*' }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + { + code: "import {a} from 'a'\n\nfoo()", + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'import', next: '*' }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + { + code: "const a=require('a')\nfoo()", + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'import', next: '*' }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + + //---------------------------------------------------------------------- + // let + //---------------------------------------------------------------------- + + { + code: 'let a=1\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'let', next: '*' }, + ], + }, + { + code: 'var a=1\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'let', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // return + //---------------------------------------------------------------------- + + { + code: 'function foo(){return\n\nfoo()}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'return', next: '*' }, + ], + }, + { + code: 'throw a\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'return', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // switch + //---------------------------------------------------------------------- + + { + code: 'switch(a){}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'switch', next: '*' }, + ], + }, + { + code: 'if(a){}\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'switch', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // throw + //---------------------------------------------------------------------- + + { + code: 'throw a\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'throw', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // try + //---------------------------------------------------------------------- + + { + code: 'try{}catch(e){}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'try', next: '*' }, + ], + }, + { + code: 'try{}finally{}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'try', next: '*' }, + ], + }, + { + code: 'try{}catch(e){}finally{}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'try', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // var + //---------------------------------------------------------------------- + + { + code: 'var a=1\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'var', next: '*' }, + ], + }, + { + code: 'const a=1\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'var', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // while + //---------------------------------------------------------------------- + + { + code: 'while(a);\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'while', next: '*' }, + ], + }, + { + code: 'do;while(a)\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'while', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // with + //---------------------------------------------------------------------- + + { + code: 'with(a);\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'with', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // multiline-const + //---------------------------------------------------------------------- + + { + code: 'const a={\nb:1,\nc:2\n}\n\nconst d=3', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-const', next: '*' }, + ], + }, + { + code: 'const a=1\n\nconst b={\nc:2,\nd:3\n}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: '*', next: 'multiline-const' }, + ], + }, + { + code: 'const a=1\nconst b=2', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-const', next: '*' }, + ], + }, + { + code: 'const a=1\nconst b=2', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: '*', next: 'multiline-const' }, + ], + }, + + //---------------------------------------------------------------------- + // multiline-let + //---------------------------------------------------------------------- + + { + code: 'let a={\nb:1,\nc:2\n}\n\nlet d=3', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-let', next: '*' }, + ], + }, + { + code: 'let a=1\n\nlet b={\nc:2,\nd:3\n}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: '*', next: 'multiline-let' }, + ], + }, + { + code: 'let a=1\nlet b=2', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-let', next: '*' }, + ], + }, + { + code: 'let a=1\nlet b=2', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: '*', next: 'multiline-let' }, + ], + }, + + //---------------------------------------------------------------------- + // multiline-var + //---------------------------------------------------------------------- + + { + code: 'var a={\nb:1,\nc:2\n}\n\nvar d=3', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-var', next: '*' }, + ], + }, + { + code: 'var a=1\n\nvar b={\nc:2,\nd:3\n}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: '*', next: 'multiline-var' }, + ], + }, + { + code: 'var a=1\nvar b=2', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'multiline-var', next: '*' }, + ], + }, + { + code: 'var a=1\nvar b=2', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: '*', next: 'multiline-var' }, + ], + }, + + //---------------------------------------------------------------------- + // single line const + //---------------------------------------------------------------------- + + { + code: 'const a=1\n\nconst b=2', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'singleline-const', next: '*' }, + ], + }, + { + code: 'const a=1\n\nconst b=2', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: '*', next: 'singleline-const' }, + ], + }, + { + code: 'const a={\nb:1,\nc:2\n}\nconst d={\ne:3,\nf:4\n}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'singleline-const', next: '*' }, + ], + }, + { + code: 'const a={\nb:1,\nc:2\n}\nconst d={\ne:3,\nf:4\n}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: '*', next: 'singleline-const' }, + ], + }, + + //---------------------------------------------------------------------- + // single line let + //---------------------------------------------------------------------- + + { + code: 'let a=1\n\nlet b=2', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'singleline-let', next: '*' }, + ], + }, + { + code: 'let a=1\n\nlet b=2', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: '*', next: 'singleline-let' }, + ], + }, + { + code: 'let a={\nb:1,\nc:2\n}\nlet d={\ne:3,\nf:4\n}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'singleline-let', next: '*' }, + ], + }, + { + code: 'let a={\nb:1,\nc:2\n}\nlet d={\ne:3,\nf:4\n}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: '*', next: 'singleline-let' }, + ], + }, + + //---------------------------------------------------------------------- + // single line var + //---------------------------------------------------------------------- + + { + code: 'var a=1\n\nvar b=2', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'singleline-var', next: '*' }, + ], + }, + { + code: 'var a=1\n\nvar b=2', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: '*', next: 'singleline-var' }, + ], + }, + { + code: 'var a={\nb:1,\nc:2\n}\nvar d={\ne:3,\nf:4\n}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'singleline-var', next: '*' }, + ], + }, + { + code: 'var a={\nb:1,\nc:2\n}\nvar d={\ne:3,\nf:4\n}', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: '*', next: 'singleline-var' }, + ], + }, + + //---------------------------------------------------------------------- + // Tests from newline-after-var + //---------------------------------------------------------------------- + + // should skip rule entirely + { + code: 'console.log(greet);', + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'console.log(greet);', + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should ignore a `var` with no following token + { + code: "var greet = 'hello';", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello';", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should allow no line break in "never" mode + { + code: "var greet = 'hello';console.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should allow no blank line in "never" mode + { + code: "var greet = 'hello';\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should allow one blank line in "always" mode + { + code: "var greet = 'hello';\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should allow two or more blank lines in "always" mode + { + code: "var greet = 'hello';\n\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello';\n\n\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should allow trailing whitespace after the `var` + { + code: "var greet = 'hello'; \n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello'; \nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should allow inline comments after the `var` + { + code: "var greet = 'hello'; // inline comment\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello'; // inline comment\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should allow a comment on the next line in "never" mode + { + code: "var greet = 'hello';\n// next-line comment\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello';\n/* block comment\nblock comment */\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should allow comments on the next line followed by a blank in "always" mode + { + code: "var greet = 'hello';\n// next-line comment\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello';\n/* block comment\nblock comment */\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello';\n// next-line comment\n// second-line comment\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should allow comments on the next line followed by no blank in "never" mode + { + code: "var greet = 'hello';\n// next-line comment\n// second-line comment\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello';\n// next-line comment\n/* block comment\nblock comment */\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should allow another `var` statement to follow without blank line + { + code: "var greet = 'hello';var name = 'world';console.log(greet, name);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello';\nvar name = 'world';\nconsole.log(greet, name);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello';\nvar name = 'world';\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should allow a comment directly between `var` statements + { + code: "var greet = 'hello';\n// inline comment\nvar name = 'world';\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello';\n/* block comment\nblock comment */\nvar name = 'world';\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello';\n// inline comment\nvar name = 'world';\nconsole.log(greet, name);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello';\n/* block comment\nblock comment */\nvar name = 'world';\nconsole.log(greet, name);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should handle single `var` statement with multiple declarations + { + code: "var greet = 'hello', name = 'world';console.log(greet, name);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello', name = 'world';\nconsole.log(greet, name);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello', name = 'world';\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should handle single `var` statement with multi-line declaration + { + code: "var greet = 'hello',\nname = 'world';\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello',\nname = 'world';\nconsole.log(greet, name);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello', // inline comment\nname = 'world'; // inline comment\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello', // inline comment\nname = 'world'; // inline comment\nconsole.log(greet, name);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello',\nname = 'world';\n// next-line comment\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var greet = 'hello',\nname = 'world';\n/* block comment\nblock comment */\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should handle ES6 `let` block binding + { + code: "let greet = 'hello';\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "let greet = 'hello';\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should handle ES6 `const` block binding + { + code: "const greet = 'hello';\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "const greet = 'hello';\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should handle a mix of `var`, `let`, or `const` + { + code: "let greet = 'hello';\nvar name = 'world';\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "const greet = 'hello';\nvar name = 'world';\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "let greet = 'hello';\nconst name = 'world';\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should handle a mix of `var` or `let` inside for variations + { + code: 'for(let a = 1; a < 1; a++){\n break;\n}', + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'for(var a = 1; a < 1; a++){\n break;\n}', + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'for(let a = 1; a < 1; a++){\n break;\n}', + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'for(var a = 1; a < 1; a++){\n break;\n}', + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'for(let a in obj){\n break;\n}', + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'for(var a in obj){\n break;\n}', + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'for(let a in obj){\n break;\n}', + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'for(var a in obj){\n break;\n}', + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should handle export specifiers + { + code: 'export let a = 1;\nexport let b = 2;', + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + { + code: 'export let a = 1;\nexport let b = 2;', + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + { + code: 'export var a = 1;\nexport var b = 2;', + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + { + code: 'export var a = 1;\nexport var b = 2;', + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + { + code: 'export const a = 1;\nexport const b = 2;', + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + { + code: 'export const a = 1;\nexport const b = 2;', + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + }, + + // should allow no blank line at end of block + { + code: "function example() {\nvar greet = 'hello'\n}", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "function example() {\nvar greet = 'hello'\n}", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "function example() {\nvar greet = 'hello';\nconsole.log(greet);\n}", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var f = function() {\nvar greet = 'hello'\n};", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var f = function() {\nvar greet = 'hello'\n};", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "var f = function() {\nvar greet = 'hello';\nconsole.log(greet);\n};", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "() => {\nvar greet = 'hello';\n}", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "() => {\nvar greet = 'hello';\n}", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: "() => {\nvar greet = 'hello';\nconsole.log(greet);\n}", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: '{\nvar foo;\n}', + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: '{\nvar foo;\n}', + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'if(true) {\nvar foo;\n}', + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'if(true) {\nvar foo;\n}', + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'switch(a) {\ncase 0:\nvar foo;\n}', + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'switch(a) {\ncase 0:\nvar foo;\n}', + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // should handle one/no blank before case. + { + code: 'switch(a) {\ncase 0:\nvar foo;\n\ncase 1:}', + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'switch(a) {\ncase 0:\nvar foo;\ncase 1:}', + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + // https://github.com/eslint/eslint/issues/6834 + { + code: ` +var a = 1 + +;(b || c).doSomething() + `, + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: ` +var a = 1 +;(b || c).doSomething() + `, + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: ` +var a = 1 +; +(b || c).doSomething(); + `, + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + { + code: 'switch(a) {\ncase 0:\nvar foo;\n\ncase 1:}', + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: 'switch(a) {\ncase 0:\nvar foo;\ncase 1:}', + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + { + code: ` +var a = 1 + +; +(b || c).doSomething(); + `, + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + }, + + //---------------------------------------------------------------------- + // Tests from newline-before-return + //---------------------------------------------------------------------- + + { + code: 'function a() {\nreturn;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\n\nreturn;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nvar b;\n\nreturn;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) return;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) { return; }\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) {\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) {\n\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) {\nreturn;\n}\n\nreturn c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) {\n\nreturn;\n}\n\nreturn c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (!b) {\nreturn;\n} else {\nreturn b;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (!b) {\nreturn;\n} else {\n\nreturn b;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) {\nreturn b;\n} else if (c) {\nreturn c;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) {\nreturn b;\n} else if (c) {\nreturn c;\n} else {\nreturn d;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) {\nreturn b;\n} else if (c) {\nreturn c;\n} else {\nreturn d;\n}\n\nreturn a;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) return b;\nelse if (c) return c;\nelse return d;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) return b;\nelse if (c) return c;\nelse {\nreturn d;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) return b;\nelse if (c) return c;\nelse {\ne();\n\nreturn d;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nwhile (b) return;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\n while (b) \nreturn;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\n while (b) { return; }\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\n while (b) {\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\n while (b) {\nc();\n\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nvar c;\nwhile (b) {\n c = d; //comment\n}\n\nreturn c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\ndo return;\nwhile (b);\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\ndo \nreturn;\nwhile (b);\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\ndo { return; } while (b);\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\ndo { return; }\nwhile (b);\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\ndo {\nreturn;\n} while (b);\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\ndo {\nc();\n\nreturn;\n} while (b);\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nfor (var b; b < c; b++) return;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nfor (var b; b < c; b++)\nreturn;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nfor (var b; b < c; b++) {\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nfor (var b; b < c; b++) {\nc();\n\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nfor (var b; b < c; b++) {\nif (d) {\nbreak; //comment\n}\n\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nfor (b in c)\nreturn;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nfor (b in c) { return; }\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nfor (b in c) {\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nfor (b in c) {\nd();\n\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nfor (b of c) return;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nfor (b of c)\nreturn;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nfor (b of c) {\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nfor (b of c) {\nd();\n\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: "function a() {\nswitch (b) {\ncase 'b': return;\n}\n}", + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: "function a() {\nswitch (b) {\ncase 'b':\nreturn;\n}\n}", + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: "function a() {\nswitch (b) {\ncase 'b': {\nreturn;\n}\n}\n}", + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\n//comment\nreturn b;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\n{\n//comment\n}\n\nreturn\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nvar b = {\n//comment\n};\n\nreturn;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {/*multi-line\ncomment*/return b;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\n/*comment\ncomment*/\n//comment\nreturn b;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\n/*comment\ncomment*/\n//comment\nif (b) return;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\n/*comment\ncomment*/\n//comment\nif (b) {\nc();\n\nreturn b;\n} else {\n//comment\nreturn d;\n}\n\n/*multi-line\ncomment*/\nreturn e;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) { //comment\nreturn;\n}\n\nreturn c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) { return; } //comment\n\nreturn c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) { return; } /*multi-line\ncomment*/\n\nreturn c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'function a() {\nif (b) { return; }\n\n/*multi-line\ncomment*/ return c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + }, + { + code: 'return;', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + parserOptions: { ecmaFeatures: { globalReturn: true } }, + }, + { + code: 'var a;\n\nreturn;', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + parserOptions: { ecmaFeatures: { globalReturn: true } }, + }, + { + code: '// comment\nreturn;', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + parserOptions: { ecmaFeatures: { globalReturn: true } }, + }, + { + code: '/* comment */\nreturn;', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + parserOptions: { ecmaFeatures: { globalReturn: true } }, + }, + { + code: '/* multi-line\ncomment */\nreturn;', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + parserOptions: { ecmaFeatures: { globalReturn: true } }, + }, + + //---------------------------------------------------------------------- + // From JSCS disallowPaddingNewLinesAfterBlocks + // https://github.com/jscs-dev/node-jscs/blob/44f9b86eb0757fd4ca05a81a50450c5f1b25c37b/test/specs/rules/disallow-padding-newlines-after-blocks.js + //---------------------------------------------------------------------- + + { + code: 'if(true){}', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true){}\n', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true){}\nvar a = 2;', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true){\nif(true) {}\n}', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + { + code: 'var a = {\nfoo: function() {\n},\nbar: function() {\n}}', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + { + code: '(function(){\n})()\nvar a = 2;', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true) {\n}\nelse\n{\n}', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true) {\n} else {\n var a = 2; }', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true) {\n}\nelse if(true)\n{\n}\nelse {\n}', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + { + code: 'do{\n}\nwhile(true)', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + { + code: 'try{\n}\ncatch(e) {}', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + { + code: 'try{\n}\nfinally {}', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + { + code: 'try{\n}\ncatch(e) {\n}\nfinally {\n}', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + { + code: '[].map(function() {})\n.filter(function(){})', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + }, + + //---------------------------------------------------------------------- + // From JSCS disallowPaddingNewLinesBeforeExport + // https://github.com/jscs-dev/node-jscs/blob/44f9b86eb0757fd4ca05a81a50450c5f1b25c37b/test/specs/rules/disallow-padding-newlines-before-export.js + //---------------------------------------------------------------------- + + { + code: 'var a = 2;\nmodule.exports = a;', + options: [{ blankLine: 'never', prev: '*', next: 'exports' }], + }, + { + code: 'module.exports = 2;', + options: [{ blankLine: 'never', prev: '*', next: 'exports' }], + }, + { + code: 'var a = 2;\n// foo\nmodule.exports = a;', + options: [{ blankLine: 'never', prev: '*', next: 'exports' }], + }, + + /* + * TODO: May it need an option to ignore blank lines followed by comments? + * { + * code: "var a = 2;\n\n// foo\nmodule.exports = a;", + * options: [ + * { blankLine: "never", prev: "*", next: "exports" } + * ] + * }, + */ + { + code: 'var a = 2;\n\nfoo.exports = a;', + options: [{ blankLine: 'never', prev: '*', next: 'exports' }], + }, + { + code: 'var a = 2;\n\nmodule.foo = a;', + options: [{ blankLine: 'never', prev: '*', next: 'exports' }], + }, + { + code: 'var a = 2;\n\nfoo = a;', + options: [{ blankLine: 'never', prev: '*', next: 'exports' }], + }, + + //---------------------------------------------------------------------- + // From JSCS requirePaddingNewLinesAfterBlocks + // https://github.com/jscs-dev/node-jscs/blob/44f9b86eb0757fd4ca05a81a50450c5f1b25c37b/test/specs/rules/require-padding-newlines-after-blocks.js + //---------------------------------------------------------------------- + + { + code: '{}', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true){}', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true){}\n', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true){}\n\nvar a = 2;', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true){}\n\n\nvar a = 2;', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true){\nif(true) {}\n}', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'var a = {\nfoo: function() {\n},\n\nbar: function() {\n}}', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: '(function(){\n})()\n\nvar a = 2;', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true) {\n}\nelse\n{\n}', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true) {\n} else {\n var a = 2; }', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'if(true) {\n}\nelse if(true)\n{\n}\nelse {\n}', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'do{\n}\nwhile(true)', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'try{\n}\ncatch(e) {}', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'try{\n}\nfinally {}', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'try{\n}\ncatch(e) {\n}\nfinally {\n}', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: '[].map(function() {})\n.filter(function(){})', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'func(\n2,\n3,\nfunction() {\n}\n)', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: '[\n2,\n3,\nfunction() {\n}\n]', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'a(res => {\n})\n.b();', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + }, + { + code: 'var foo = (\n\nfoo\n\n);', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + parserOptions: { ecmaFeatures: { jsx: true } }, + }, + { + code: 'var i = 0;\nwhile (i < 100) {\nif(i % 2 === 0) {continue;}\n++i;\n}', + options: [ + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + { + code: 'var i = 0;\nwhile (i < 100) {\nif(i % 2 === 0) {if(i === 4) {continue;}}\n++i;\n}', + options: [ + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + }, + + //---------------------------------------------------------------------- + // From JSCS requirePaddingNewLinesBeforeExport + // https://github.com/jscs-dev/node-jscs/blob/44f9b86eb0757fd4ca05a81a50450c5f1b25c37b/test/specs/rules/require-padding-newlines-before-export.js + //---------------------------------------------------------------------- + + { + code: 'module.exports = 2;', + options: [{ blankLine: 'always', prev: '*', next: 'exports' }], + }, + { + code: 'var a = 2;\n\nmodule.exports = a;', + options: [{ blankLine: 'always', prev: '*', next: 'exports' }], + }, + { + code: 'var a = 2;\nfoo.exports = a;', + options: [{ blankLine: 'always', prev: '*', next: 'exports' }], + }, + { + code: 'var a = 2;\nmodule.foo = a;', + options: [{ blankLine: 'always', prev: '*', next: 'exports' }], + }, + { + code: 'if (true) {\nmodule.exports = a;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'exports' }], + }, + + //---------------------------------------------------------------------- + // From JSCS requirePaddingNewlinesBeforeKeywords + // https://github.com/jscs-dev/node-jscs/blob/44f9b86eb0757fd4ca05a81a50450c5f1b25c37b/test/specs/rules/require-padding-newlines-before-keywords.js + //---------------------------------------------------------------------- + + { + code: 'function x() { return; }', + options: [ + { + blankLine: 'always', + prev: '*', + next: [ + 'if', + 'for', + 'return', + 'switch', + 'case', + 'break', + 'throw', + 'while', + 'default', + ], + }, + ], + }, + { + code: 'if (true) {} else if (false) {}', + options: [ + { + blankLine: 'always', + prev: '*', + next: [ + 'if', + 'for', + 'return', + 'switch', + 'case', + 'break', + 'throw', + 'while', + 'default', + ], + }, + ], + }, + { + code: 'function x() { var a = true; do { a = !a; } while (a); }', + options: [ + { + blankLine: 'always', + prev: '*', + next: [ + 'if', + 'for', + 'return', + 'switch', + 'case', + 'break', + 'throw', + 'while', + 'default', + ], + }, + ], + }, + { + code: 'function x() { if (true) return; }', + options: [ + { + blankLine: 'always', + prev: '*', + next: [ + 'if', + 'for', + 'return', + 'switch', + 'case', + 'break', + 'throw', + 'while', + 'default', + ], + }, + ], + }, + { + code: 'function test() {};', + options: [ + { blankLine: 'always', prev: 'block-like', next: 'block-like' }, + ], + }, + ], + invalid: [ + //---------------------------------------------------------------------- + // wildcard + //---------------------------------------------------------------------- + + { + code: 'foo();\n\nfoo();', + output: 'foo();\nfoo();', + options: [{ blankLine: 'never', prev: '*', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'foo();\n\n//comment\nfoo();', + output: 'foo();\n//comment\nfoo();', + options: [{ blankLine: 'never', prev: '*', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: ' foo();\n \n //comment\n foo();', + output: ' foo();\n //comment\n foo();', + options: [{ blankLine: 'never', prev: '*', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'if (a) {}\n\nfor (;;) {}', + output: 'if (a) {}\nfor (;;) {}', + options: [{ blankLine: 'never', prev: '*', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'foo();\nfoo();', + output: 'foo();\n\nfoo();', + options: [{ blankLine: 'always', prev: '*', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: ' function a() {}\n do {} while (a)', + output: ' function a() {}\n\n do {} while (a)', + options: [{ blankLine: 'always', prev: '*', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'foo();//trailing-comment\n//comment\n//comment\nfoo();', + output: 'foo();//trailing-comment\n\n//comment\n//comment\nfoo();', + options: [{ blankLine: 'always', prev: '*', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // block-like + //---------------------------------------------------------------------- + + { + code: '{}\n\nfoo()', + output: '{}\nfoo()', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: '{}\nfoo()', + output: '{}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'if(a){}\nfoo()', + output: 'if(a){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'if(a){}else{}\nfoo()', + output: 'if(a){}else{}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'if(a){}else if(b){}\nfoo()', + output: 'if(a){}else if(b){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'if(a){}else if(b){}else{}\nfoo()', + output: 'if(a){}else if(b){}else{}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'switch(a){}\nfoo()', + output: 'switch(a){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'switch(a){case 0:}\nfoo()', + output: 'switch(a){case 0:}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'try{}catch(e){}\nfoo()', + output: 'try{}catch(e){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'try{}finally{}\nfoo()', + output: 'try{}finally{}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'try{}catch(e){}finally{}\nfoo()', + output: 'try{}catch(e){}finally{}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'while(a){}\nfoo()', + output: 'while(a){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'do{}while(a)\nfoo()', + output: 'do{}while(a)\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'for(;;){}\nfoo()', + output: 'for(;;){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'for(a in b){}\nfoo()', + output: 'for(a in b){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'for(a of b){}\nfoo()', + output: 'for(a of b){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'a=function(){}\nfoo()', + output: 'a=function(){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'a=()=>{}\nfoo()', + output: 'a=()=>{}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a(){}\nfoo()', + output: 'function a(){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'let a=function(){}\nfoo()', + output: 'let a=function(){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // exports + //---------------------------------------------------------------------- + + { + code: 'module.exports=1\n\nfoo()', + output: 'module.exports=1\nfoo()', + options: [{ blankLine: 'never', prev: 'exports', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'module.exports=1\nfoo()', + output: 'module.exports=1\n\nfoo()', + options: [{ blankLine: 'always', prev: 'exports', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'module.exports.foo=1\nfoo()', + output: 'module.exports.foo=1\n\nfoo()', + options: [{ blankLine: 'always', prev: 'exports', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'module.exports[foo]=1\nfoo()', + output: 'module.exports[foo]=1\n\nfoo()', + options: [{ blankLine: 'always', prev: 'exports', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'exports.foo=1\nfoo()', + output: 'exports.foo=1\n\nfoo()', + options: [{ blankLine: 'always', prev: 'exports', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'exports[foo]=1\nfoo()', + output: 'exports[foo]=1\n\nfoo()', + options: [{ blankLine: 'always', prev: 'exports', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // require + //---------------------------------------------------------------------- + + { + code: 'const foo=require("foo")\n\nfoo()', + output: 'const foo=require("foo")\nfoo()', + options: [{ blankLine: 'never', prev: 'require', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'const foo=require("foo")\nfoo()', + output: 'const foo=require("foo")\n\nfoo()', + options: [{ blankLine: 'always', prev: 'require', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'const foo=require("foo").Foo\nfoo()', + output: 'const foo=require("foo").Foo\n\nfoo()', + options: [{ blankLine: 'always', prev: 'require', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'const foo=require("foo")[a]\nfoo()', + output: 'const foo=require("foo")[a]\n\nfoo()', + options: [{ blankLine: 'always', prev: 'require', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // directive + //---------------------------------------------------------------------- + + { + code: '"use strict"\n\nfoo()', + output: '"use strict"\nfoo()', + options: [{ blankLine: 'never', prev: 'directive', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: '"use strict"\nfoo()', + output: '"use strict"\n\nfoo()', + options: [{ blankLine: 'always', prev: 'directive', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "'use strict'\nfoo()", + output: "'use strict'\n\nfoo()", + options: [{ blankLine: 'always', prev: 'directive', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "'use asm'\nfoo()", + output: "'use asm'\n\nfoo()", + options: [{ blankLine: 'always', prev: 'directive', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // multiline-block-like + //---------------------------------------------------------------------- + + { + code: '{\n}\n\nfoo()', + output: '{\n}\nfoo()', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: '{\n}\nfoo()', + output: '{\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'if(a){\n}\nfoo()', + output: 'if(a){\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'if(a){\n}else{\n}\nfoo()', + output: 'if(a){\n}else{\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'if(a){\n}else if(b){\n}\nfoo()', + output: 'if(a){\n}else if(b){\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'if(a){\n}else if(b){\n}else{\n}\nfoo()', + output: 'if(a){\n}else if(b){\n}else{\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'switch(a){\n}\nfoo()', + output: 'switch(a){\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'try{\n}catch(e){\n}\nfoo()', + output: 'try{\n}catch(e){\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'try{\n}finally{\n}\nfoo()', + output: 'try{\n}finally{\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'try{\n}catch(e){\n}finally{\n}\nfoo()', + output: 'try{\n}catch(e){\n}finally{\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'while(a){\n}\nfoo()', + output: 'while(a){\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'do{\n}while(a)\nfoo()', + output: 'do{\n}while(a)\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'for(;;){\n}\nfoo()', + output: 'for(;;){\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'for(a in b){\n}\nfoo()', + output: 'for(a in b){\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'for(a of b){\n}\nfoo()', + output: 'for(a of b){\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'a=function(){\n}\nfoo()', + output: 'a=function(){\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'a=()=>{\n}\nfoo()', + output: 'a=()=>{\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a(){\n}\nfoo()', + output: 'function a(){\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'let a=function(){\n}\nfoo()', + output: 'let a=function(){\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // block + //---------------------------------------------------------------------- + + { + code: '{}\n\nfoo()', + output: '{}\nfoo()', + options: [{ blankLine: 'never', prev: 'block', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: '{}\nfoo()', + output: '{}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'block', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // empty + //---------------------------------------------------------------------- + + { + code: ';\n\nfoo()', + output: ';\nfoo()', + options: [{ blankLine: 'never', prev: 'empty', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: ';\nfoo()', + output: ';\n\nfoo()', + options: [{ blankLine: 'always', prev: 'empty', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // expression + //---------------------------------------------------------------------- + + { + code: 'foo()\n\nfoo()', + output: 'foo()\nfoo()', + options: [{ blankLine: 'never', prev: 'expression', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'foo()\nfoo()', + output: 'foo()\n\nfoo()', + options: [{ blankLine: 'always', prev: 'expression', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // multiline-expression + //---------------------------------------------------------------------- + + { + code: 'foo()\n\nfoo(\n\tx,\n\ty\n)', + output: 'foo()\nfoo(\n\tx,\n\ty\n)', + options: [ + { blankLine: 'never', prev: '*', next: 'multiline-expression' }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'foo()\nfoo(\n\tx,\n\ty\n)', + output: 'foo()\n\nfoo(\n\tx,\n\ty\n)', + options: [ + { blankLine: 'always', prev: '*', next: 'multiline-expression' }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: '() => {\n\tsomeArray.forEach(\n\t\tx => doSomething(x)\n\t);\n\treturn theThing;\n}', + output: + '() => {\n\tsomeArray.forEach(\n\t\tx => doSomething(x)\n\t);\n\n\treturn theThing;\n}', + options: [ + { blankLine: 'always', prev: 'multiline-expression', next: 'return' }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // break + //---------------------------------------------------------------------- + + { + code: 'while(a){break\n\nfoo()}', + output: 'while(a){break\nfoo()}', + options: [{ blankLine: 'never', prev: 'break', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'switch(a){case 0:break\n\nfoo()}', + output: 'switch(a){case 0:break\nfoo()}', + options: [{ blankLine: 'never', prev: 'break', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'while(a){break\nfoo()}', + output: 'while(a){break\n\nfoo()}', + options: [{ blankLine: 'always', prev: 'break', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'switch(a){case 0:break\nfoo()}', + output: 'switch(a){case 0:break\n\nfoo()}', + options: [{ blankLine: 'always', prev: 'break', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // case + //---------------------------------------------------------------------- + + { + code: 'switch(a){case 0:\nfoo()\n\ndefault:}', + output: 'switch(a){case 0:\nfoo()\ndefault:}', + options: [{ blankLine: 'never', prev: 'case', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'switch(a){case 0:\nfoo()\ndefault:}', + output: 'switch(a){case 0:\nfoo()\n\ndefault:}', + options: [{ blankLine: 'always', prev: 'case', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // class + //---------------------------------------------------------------------- + + { + code: 'class A{}\n\nfoo()', + output: 'class A{}\nfoo()', + options: [{ blankLine: 'never', prev: 'class', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'class A{}\nfoo()', + output: 'class A{}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'class', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // const + //---------------------------------------------------------------------- + + { + code: 'const a=1\n\nfoo()', + output: 'const a=1\nfoo()', + options: [{ blankLine: 'never', prev: 'const', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'const a=1\nfoo()', + output: 'const a=1\n\nfoo()', + options: [{ blankLine: 'always', prev: 'const', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // type + //---------------------------------------------------------------------- + + { + code: 'type a=number\n\nfoo()', + output: 'type a=number\nfoo()', + options: [{ blankLine: 'never', prev: 'type', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'type a=number\nfoo()', + output: 'type a=number\n\nfoo()', + options: [{ blankLine: 'always', prev: 'type', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // interface + //---------------------------------------------------------------------- + + { + code: 'interface Test{\na:number;\n}\nfoo()', + output: 'interface Test{\na:number;\n}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'interface', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // continue + //---------------------------------------------------------------------- + + { + code: 'while(a){continue\n\nfoo()}', + output: 'while(a){continue\nfoo()}', + options: [{ blankLine: 'never', prev: 'continue', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'while(a){continue\nfoo()}', + output: 'while(a){continue\n\nfoo()}', + options: [{ blankLine: 'always', prev: 'continue', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // debugger + //---------------------------------------------------------------------- + + { + code: 'debugger\n\nfoo()', + output: 'debugger\nfoo()', + options: [{ blankLine: 'never', prev: 'debugger', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'debugger\nfoo()', + output: 'debugger\n\nfoo()', + options: [{ blankLine: 'always', prev: 'debugger', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // default + //---------------------------------------------------------------------- + + { + code: 'switch(a){default:\nfoo()\n\ncase 0:}', + output: 'switch(a){default:\nfoo()\ncase 0:}', + options: [{ blankLine: 'never', prev: 'default', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'switch(a){default:\nfoo()\ncase 0:}', + output: 'switch(a){default:\nfoo()\n\ncase 0:}', + options: [{ blankLine: 'always', prev: 'default', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // do + //---------------------------------------------------------------------- + + { + code: 'do;while(a)\n\nfoo()', + output: 'do;while(a)\nfoo()', + options: [{ blankLine: 'never', prev: 'do', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'do;while(a)\nfoo()', + output: 'do;while(a)\n\nfoo()', + options: [{ blankLine: 'always', prev: 'do', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // export + //---------------------------------------------------------------------- + + { + code: 'export default 1\n\nfoo()', + output: 'export default 1\nfoo()', + options: [{ blankLine: 'never', prev: 'export', next: '*' }], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'export let a=1\n\nfoo()', + output: 'export let a=1\nfoo()', + options: [{ blankLine: 'never', prev: 'export', next: '*' }], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'var a = 0;export {a}\n\nfoo()', + output: 'var a = 0;export {a}\nfoo()', + options: [{ blankLine: 'never', prev: 'export', next: '*' }], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'export default 1\nfoo()', + output: 'export default 1\n\nfoo()', + options: [{ blankLine: 'always', prev: 'export', next: '*' }], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'export let a=1\nfoo()', + output: 'export let a=1\n\nfoo()', + options: [{ blankLine: 'always', prev: 'export', next: '*' }], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'var a = 0;export {a}\nfoo()', + output: 'var a = 0;export {a}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'export', next: '*' }], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // for + //---------------------------------------------------------------------- + + { + code: 'for(;;);\n\nfoo()', + output: 'for(;;);\nfoo()', + options: [{ blankLine: 'never', prev: 'for', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'for(a in b);\n\nfoo()', + output: 'for(a in b);\nfoo()', + options: [{ blankLine: 'never', prev: 'for', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'for(a of b);\n\nfoo()', + output: 'for(a of b);\nfoo()', + options: [{ blankLine: 'never', prev: 'for', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'for(;;);\nfoo()', + output: 'for(;;);\n\nfoo()', + options: [{ blankLine: 'always', prev: 'for', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'for(a in b);\nfoo()', + output: 'for(a in b);\n\nfoo()', + options: [{ blankLine: 'always', prev: 'for', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'for(a of b);\nfoo()', + output: 'for(a of b);\n\nfoo()', + options: [{ blankLine: 'always', prev: 'for', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // function + //---------------------------------------------------------------------- + + { + code: 'function foo(){}\n\nfoo()', + output: 'function foo(){}\nfoo()', + options: [{ blankLine: 'never', prev: 'function', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'function foo(){}\nfoo()', + output: 'function foo(){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'function', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'async function foo(){}\nfoo()', + output: 'async function foo(){}\n\nfoo()', + options: [ + { blankLine: 'never', prev: '*', next: '*' }, + { blankLine: 'always', prev: 'function', next: '*' }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // if + //---------------------------------------------------------------------- + + { + code: 'if(a);\n\nfoo()', + output: 'if(a);\nfoo()', + options: [{ blankLine: 'never', prev: 'if', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'if(a);else;\n\nfoo()', + output: 'if(a);else;\nfoo()', + options: [{ blankLine: 'never', prev: 'if', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'if(a);\nfoo()', + output: 'if(a);\n\nfoo()', + options: [{ blankLine: 'always', prev: 'if', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'if(a);else;\nfoo()', + output: 'if(a);else;\n\nfoo()', + options: [{ blankLine: 'always', prev: 'if', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // iife + //---------------------------------------------------------------------- + + { + code: '(function(){\n})()\n\nvar a = 2;', + output: '(function(){\n})()\nvar a = 2;', + options: [{ blankLine: 'never', prev: 'iife', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: '+(function(){\n})()\n\nvar a = 2;', + output: '+(function(){\n})()\nvar a = 2;', + options: [{ blankLine: 'never', prev: 'iife', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: '(function(){\n})()\nvar a = 2;', + output: '(function(){\n})()\n\nvar a = 2;', + options: [{ blankLine: 'always', prev: 'iife', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: '+(function(){\n})()\nvar a = 2;', + output: '+(function(){\n})()\n\nvar a = 2;', + options: [{ blankLine: 'always', prev: 'iife', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + // Optional chaining + { + code: '(function(){\n})?.()\nvar a = 2;', + output: '(function(){\n})?.()\n\nvar a = 2;', + options: [{ blankLine: 'always', prev: 'iife', next: '*' }], + parserOptions: { ecmaVersion: 2020 }, + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'void (function(){\n})?.()\nvar a = 2;', + output: 'void (function(){\n})?.()\n\nvar a = 2;', + options: [{ blankLine: 'always', prev: 'iife', next: '*' }], + parserOptions: { ecmaVersion: 2020 }, + errors: [{ messageId: 'expectedBlankLine' }], + }, + + // Sequenced function + { + code: '(1,2,3,function(){\n})()\nvar a = 2;', + output: '(1,2,3,function(){\n})()\n\nvar a = 2;', + options: [{ blankLine: 'always', prev: 'iife', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // import + //---------------------------------------------------------------------- + + { + code: "import a from 'a'\n\nfoo()", + output: "import a from 'a'\nfoo()", + options: [{ blankLine: 'never', prev: 'import', next: '*' }], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: "import * as a from 'a'\n\nfoo()", + output: "import * as a from 'a'\nfoo()", + options: [{ blankLine: 'never', prev: 'import', next: '*' }], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: "import {a} from 'a'\n\nfoo()", + output: "import {a} from 'a'\nfoo()", + options: [{ blankLine: 'never', prev: 'import', next: '*' }], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: "import a from 'a'\nfoo()", + output: "import a from 'a'\n\nfoo()", + options: [{ blankLine: 'always', prev: 'import', next: '*' }], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "import * as a from 'a'\nfoo()", + output: "import * as a from 'a'\n\nfoo()", + options: [{ blankLine: 'always', prev: 'import', next: '*' }], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "import {a} from 'a'\nfoo()", + output: "import {a} from 'a'\n\nfoo()", + options: [{ blankLine: 'always', prev: 'import', next: '*' }], + parserOptions: { ecmaVersion: 6, sourceType: 'module' }, + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // let + //---------------------------------------------------------------------- + + { + code: 'let a\n\nfoo()', + output: 'let a\nfoo()', + options: [{ blankLine: 'never', prev: 'let', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'let a\nfoo()', + output: 'let a\n\nfoo()', + options: [{ blankLine: 'always', prev: 'let', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // return + //---------------------------------------------------------------------- + + { + code: 'function foo(){return\n\nfoo()}', + output: 'function foo(){return\nfoo()}', + options: [{ blankLine: 'never', prev: 'return', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'function foo(){return\nfoo()}', + output: 'function foo(){return\n\nfoo()}', + options: [{ blankLine: 'always', prev: 'return', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // switch + //---------------------------------------------------------------------- + + { + code: 'switch(a){}\n\nfoo()', + output: 'switch(a){}\nfoo()', + options: [{ blankLine: 'never', prev: 'switch', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'switch(a){}\nfoo()', + output: 'switch(a){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'switch', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // throw + //---------------------------------------------------------------------- + + { + code: 'throw a\n\nfoo()', + output: 'throw a\nfoo()', + options: [{ blankLine: 'never', prev: 'throw', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'throw a\nfoo()', + output: 'throw a\n\nfoo()', + options: [{ blankLine: 'always', prev: 'throw', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // try + //---------------------------------------------------------------------- + + { + code: 'try{}catch(e){}\n\nfoo()', + output: 'try{}catch(e){}\nfoo()', + options: [{ blankLine: 'never', prev: 'try', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'try{}finally{}\n\nfoo()', + output: 'try{}finally{}\nfoo()', + options: [{ blankLine: 'never', prev: 'try', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'try{}catch(e){}finally{}\n\nfoo()', + output: 'try{}catch(e){}finally{}\nfoo()', + options: [{ blankLine: 'never', prev: 'try', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'try{}catch(e){}\nfoo()', + output: 'try{}catch(e){}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'try', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'try{}finally{}\nfoo()', + output: 'try{}finally{}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'try', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'try{}catch(e){}finally{}\nfoo()', + output: 'try{}catch(e){}finally{}\n\nfoo()', + options: [{ blankLine: 'always', prev: 'try', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // var + //---------------------------------------------------------------------- + + { + code: 'var a\n\nfoo()', + output: 'var a\nfoo()', + options: [{ blankLine: 'never', prev: 'var', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'var a\nfoo()', + output: 'var a\n\nfoo()', + options: [{ blankLine: 'always', prev: 'var', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // while + //---------------------------------------------------------------------- + + { + code: 'while(a);\n\nfoo()', + output: 'while(a);\nfoo()', + options: [{ blankLine: 'never', prev: 'while', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'while(a);\nfoo()', + output: 'while(a);\n\nfoo()', + options: [{ blankLine: 'always', prev: 'while', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // with + //---------------------------------------------------------------------- + + { + code: 'with(a);\n\nfoo()', + output: 'with(a);\nfoo()', + options: [{ blankLine: 'never', prev: 'with', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'with(a);\nfoo()', + output: 'with(a);\n\nfoo()', + options: [{ blankLine: 'always', prev: 'with', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // multiline-const + //---------------------------------------------------------------------- + + { + code: 'const a={\nb:1,\nc:2\n}\n\nconst d=3', + output: 'const a={\nb:1,\nc:2\n}\nconst d=3', + options: [{ blankLine: 'never', prev: 'multiline-const', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'const a={\nb:1,\nc:2\n}\nconst d=3', + output: 'const a={\nb:1,\nc:2\n}\n\nconst d=3', + options: [{ blankLine: 'always', prev: 'multiline-const', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'const a=1\n\nconst b={\nc:2,\nd:3\n}', + output: 'const a=1\nconst b={\nc:2,\nd:3\n}', + options: [{ blankLine: 'never', prev: '*', next: 'multiline-const' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'const a=1\nconst b={\nc:2,\nd:3\n}', + output: 'const a=1\n\nconst b={\nc:2,\nd:3\n}', + options: [{ blankLine: 'always', prev: '*', next: 'multiline-const' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // multiline-let + //---------------------------------------------------------------------- + + { + code: 'let a={\nb:1,\nc:2\n}\n\nlet d=3', + output: 'let a={\nb:1,\nc:2\n}\nlet d=3', + options: [{ blankLine: 'never', prev: 'multiline-let', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'let a={\nb:1,\nc:2\n}\nlet d=3', + output: 'let a={\nb:1,\nc:2\n}\n\nlet d=3', + options: [{ blankLine: 'always', prev: 'multiline-let', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'let a=1\n\nlet b={\nc:2,\nd:3\n}', + output: 'let a=1\nlet b={\nc:2,\nd:3\n}', + options: [{ blankLine: 'never', prev: '*', next: 'multiline-let' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'let a=1\nlet b={\nc:2,\nd:3\n}', + output: 'let a=1\n\nlet b={\nc:2,\nd:3\n}', + options: [{ blankLine: 'always', prev: '*', next: 'multiline-let' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // multiline-var + //---------------------------------------------------------------------- + + { + code: 'var a={\nb:1,\nc:2\n}\n\nvar d=3', + output: 'var a={\nb:1,\nc:2\n}\nvar d=3', + options: [{ blankLine: 'never', prev: 'multiline-var', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'var a={\nb:1,\nc:2\n}\nvar d=3', + output: 'var a={\nb:1,\nc:2\n}\n\nvar d=3', + options: [{ blankLine: 'always', prev: 'multiline-var', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'var a=1\n\nvar b={\nc:2,\nd:3\n}', + output: 'var a=1\nvar b={\nc:2,\nd:3\n}', + options: [{ blankLine: 'never', prev: '*', next: 'multiline-var' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'var a=1\nvar b={\nc:2,\nd:3\n}', + output: 'var a=1\n\nvar b={\nc:2,\nd:3\n}', + options: [{ blankLine: 'always', prev: '*', next: 'multiline-var' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // single line const + //---------------------------------------------------------------------- + + { + code: 'const a=1\n\nconst b=2', + output: 'const a=1\nconst b=2', + options: [{ blankLine: 'never', prev: 'singleline-const', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'const a=1\nconst b=2', + output: 'const a=1\n\nconst b=2', + options: [{ blankLine: 'always', prev: 'singleline-const', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'const a=1\n\nconst b=2', + output: 'const a=1\nconst b=2', + options: [{ blankLine: 'never', prev: '*', next: 'singleline-const' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'const a=1\nconst b=2', + output: 'const a=1\n\nconst b=2', + options: [{ blankLine: 'always', prev: '*', next: 'singleline-const' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // single line let + //---------------------------------------------------------------------- + + { + code: 'let a=1\n\nlet b=2', + output: 'let a=1\nlet b=2', + options: [{ blankLine: 'never', prev: 'singleline-let', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'let a=1\nlet b=2', + output: 'let a=1\n\nlet b=2', + options: [{ blankLine: 'always', prev: 'singleline-let', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'let a=1\n\nlet b=2', + output: 'let a=1\nlet b=2', + options: [{ blankLine: 'never', prev: '*', next: 'singleline-let' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'let a=1\nlet b=2', + output: 'let a=1\n\nlet b=2', + options: [{ blankLine: 'always', prev: '*', next: 'singleline-let' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // single line var + //---------------------------------------------------------------------- + + { + code: 'var a=1\n\nvar b=2', + output: 'var a=1\nvar b=2', + options: [{ blankLine: 'never', prev: 'singleline-var', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'var a=1\nvar b=2', + output: 'var a=1\n\nvar b=2', + options: [{ blankLine: 'always', prev: 'singleline-var', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'var a=1\n\nvar b=2', + output: 'var a=1\nvar b=2', + options: [{ blankLine: 'never', prev: '*', next: 'singleline-var' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'var a=1\nvar b=2', + output: 'var a=1\n\nvar b=2', + options: [{ blankLine: 'always', prev: '*', next: 'singleline-var' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // Tests from newline-after-var + //---------------------------------------------------------------------- + + // should disallow no line break in "always" mode + { + code: "var greet = 'hello';console.log(greet);", + output: "var greet = 'hello';\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "var greet = 'hello';var name = 'world';console.log(greet, name);", + output: + "var greet = 'hello';var name = 'world';\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "var greet = 'hello', name = 'world';console.log(greet, name);", + output: + "var greet = 'hello', name = 'world';\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + // should disallow no blank line in "always" mode + { + code: "var greet = 'hello';\nconsole.log(greet);", + output: "var greet = 'hello';\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "var greet = 'hello'; \nconsole.log(greet);", + output: "var greet = 'hello';\n \nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "var greet = 'hello'; // inline comment\nconsole.log(greet);", + output: "var greet = 'hello'; // inline comment\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "var greet = 'hello';\nvar name = 'world';\nconsole.log(greet, name);", + output: + "var greet = 'hello';\nvar name = 'world';\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "var greet = 'hello', name = 'world';\nconsole.log(greet, name);", + output: + "var greet = 'hello', name = 'world';\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "var greet = 'hello',\nname = 'world';\nconsole.log(greet, name);", + output: + "var greet = 'hello',\nname = 'world';\n\nconsole.log(greet, name);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "let greet = 'hello';\nconsole.log(greet);", + output: "let greet = 'hello';\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "const greet = 'hello';\nconsole.log(greet);", + output: "const greet = 'hello';\n\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "function example() {\nvar greet = 'hello';\nconsole.log(greet);\n}", + output: + "function example() {\nvar greet = 'hello';\n\nconsole.log(greet);\n}", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "var f = function() {\nvar greet = 'hello';\nconsole.log(greet);\n};", + output: + "var f = function() {\nvar greet = 'hello';\n\nconsole.log(greet);\n};", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "() => {\nvar greet = 'hello';\nconsole.log(greet);\n}", + output: "() => {\nvar greet = 'hello';\n\nconsole.log(greet);\n}", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + // should disallow blank lines in "never" mode + { + code: "var greet = 'hello';\n\nconsole.log(greet);", + output: "var greet = 'hello';\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: "var greet = 'hello';\n\n\nconsole.log(greet);", + output: "var greet = 'hello';\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: "var greet = 'hello';\n\n\n\nconsole.log(greet);", + output: "var greet = 'hello';\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: "var greet = 'hello'; \n\nconsole.log(greet);", + output: "var greet = 'hello'; \nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: "var greet = 'hello'; // inline comment\n\nconsole.log(greet);", + output: "var greet = 'hello'; // inline comment\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: "var greet = 'hello';\nvar name = 'world';\n\nconsole.log(greet, name);", + output: + "var greet = 'hello';\nvar name = 'world';\nconsole.log(greet, name);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: "var greet = 'hello', name = 'world';\n\nconsole.log(greet, name);", + output: "var greet = 'hello', name = 'world';\nconsole.log(greet, name);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: "var greet = 'hello',\nname = 'world';\n\nconsole.log(greet, name);", + output: + "var greet = 'hello',\nname = 'world';\nconsole.log(greet, name);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: "var greet = 'hello', // inline comment\nname = 'world'; // inline comment\n\nconsole.log(greet, name);", + output: + "var greet = 'hello', // inline comment\nname = 'world'; // inline comment\nconsole.log(greet, name);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: "let greet = 'hello';\n\nconsole.log(greet);", + output: "let greet = 'hello';\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: "const greet = 'hello';\n\nconsole.log(greet);", + output: "const greet = 'hello';\nconsole.log(greet);", + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + + // should disallow a comment on the next line that's not in turn followed by a blank in "always" mode + { + code: "var greet = 'hello';\n// next-line comment\nconsole.log(greet);", + output: + "var greet = 'hello';\n\n// next-line comment\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "var greet = 'hello';\n/* block comment\nblock comment */\nconsole.log(greet);", + output: + "var greet = 'hello';\n\n/* block comment\nblock comment */\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "var greet = 'hello',\nname = 'world';\n// next-line comment\nconsole.log(greet);", + output: + "var greet = 'hello',\nname = 'world';\n\n// next-line comment\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "var greet = 'hello',\nname = 'world';\n/* block comment\nblock comment */\nconsole.log(greet);", + output: + "var greet = 'hello',\nname = 'world';\n\n/* block comment\nblock comment */\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "var greet = 'hello';\n// next-line comment\n// second-line comment\nconsole.log(greet);", + output: + "var greet = 'hello';\n\n// next-line comment\n// second-line comment\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: "var greet = 'hello';\n// next-line comment\n/* block comment\nblock comment */\nconsole.log(greet);", + output: + "var greet = 'hello';\n\n// next-line comment\n/* block comment\nblock comment */\nconsole.log(greet);", + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + // https://github.com/eslint/eslint/issues/6834 + { + code: ` +var a = 1 +;(b || c).doSomething() + `, + output: ` +var a = 1 + +;(b || c).doSomething() + `, + options: [ + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: ` +var a = 1 + +;(b || c).doSomething() + `, + output: ` +var a = 1 +;(b || c).doSomething() + `, + options: [ + { blankLine: 'never', prev: ['const', 'let', 'var'], next: '*' }, + { + blankLine: 'any', + prev: ['const', 'let', 'var'], + next: ['const', 'let', 'var'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // Tests from newline-before-return + //---------------------------------------------------------------------- + + { + code: 'function a() {\nvar b; return;\n}', + output: 'function a() {\nvar b;\n\n return;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nvar b;\nreturn;\n}', + output: 'function a() {\nvar b;\n\nreturn;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nif (b) return b;\nelse if (c) return c;\nelse {\ne();\nreturn d;\n}\n}', + output: + 'function a() {\nif (b) return b;\nelse if (c) return c;\nelse {\ne();\n\nreturn d;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nif (b) return b;\nelse if (c) return c;\nelse {\ne(); return d;\n}\n}', + output: + 'function a() {\nif (b) return b;\nelse if (c) return c;\nelse {\ne();\n\n return d;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\n while (b) {\nc();\nreturn;\n}\n}', + output: 'function a() {\n while (b) {\nc();\n\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\ndo {\nc();\nreturn;\n} while (b);\n}', + output: 'function a() {\ndo {\nc();\n\nreturn;\n} while (b);\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nfor (var b; b < c; b++) {\nc();\nreturn;\n}\n}', + output: + 'function a() {\nfor (var b; b < c; b++) {\nc();\n\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nfor (b in c) {\nd();\nreturn;\n}\n}', + output: 'function a() {\nfor (b in c) {\nd();\n\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nfor (b of c) {\nd();\nreturn;\n}\n}', + output: 'function a() {\nfor (b of c) {\nd();\n\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nif (b) {\nc();\n}\n//comment\nreturn b;\n}', + output: 'function a() {\nif (b) {\nc();\n}\n\n//comment\nreturn b;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\n/*comment\ncomment*/\nif (b) {\nc();\nreturn b;\n} else {\n//comment\n\nreturn d;\n}\n/*multi-line\ncomment*/\nreturn e;\n}', + output: + 'function a() {\n/*comment\ncomment*/\nif (b) {\nc();\n\nreturn b;\n} else {\n//comment\n\nreturn d;\n}\n\n/*multi-line\ncomment*/\nreturn e;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [ + { messageId: 'expectedBlankLine' }, + { messageId: 'expectedBlankLine' }, + ], + }, + { + code: 'function a() {\nif (b) { return; } //comment\nreturn c;\n}', + output: 'function a() {\nif (b) { return; } //comment\n\nreturn c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nif (b) { return; } /*multi-line\ncomment*/\nreturn c;\n}', + output: + 'function a() {\nif (b) { return; } /*multi-line\ncomment*/\n\nreturn c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nif (b) { return; }\n/*multi-line\ncomment*/ return c;\n}', + output: + 'function a() {\nif (b) { return; }\n\n/*multi-line\ncomment*/ return c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nif (b) { return; } /*multi-line\ncomment*/ return c;\n}', + output: + 'function a() {\nif (b) { return; } /*multi-line\ncomment*/\n\n return c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'var a;\nreturn;', + output: 'var a;\n\nreturn;', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + parserOptions: { ecmaFeatures: { globalReturn: true } }, + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'var a; return;', + output: 'var a;\n\n return;', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + parserOptions: { ecmaFeatures: { globalReturn: true } }, + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\n{\n//comment\n}\nreturn\n}', + output: 'function a() {\n{\n//comment\n}\n\nreturn\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\n{\n//comment\n} return\n}', + output: 'function a() {\n{\n//comment\n}\n\n return\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nvar c;\nwhile (b) {\n c = d; //comment\n}\nreturn c;\n}', + output: + 'function a() {\nvar c;\nwhile (b) {\n c = d; //comment\n}\n\nreturn c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nfor (var b; b < c; b++) {\nif (d) {\nbreak; //comment\n}\nreturn;\n}\n}', + output: + 'function a() {\nfor (var b; b < c; b++) {\nif (d) {\nbreak; //comment\n}\n\nreturn;\n}\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nvar b; /*multi-line\ncomment*/\nreturn c;\n}', + output: 'function a() {\nvar b; /*multi-line\ncomment*/\n\nreturn c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nvar b;\n/*multi-line\ncomment*/ return c;\n}', + output: 'function a() {\nvar b;\n\n/*multi-line\ncomment*/ return c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nvar b; /*multi-line\ncomment*/ return c;\n}', + output: 'function a() {\nvar b; /*multi-line\ncomment*/\n\n return c;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nvar b;\n//comment\nreturn;\n}', + output: 'function a() {\nvar b;\n\n//comment\nreturn;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nvar b; //comment\nreturn;\n}', + output: 'function a() {\nvar b; //comment\n\nreturn;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nvar b;\n/* comment */ return;\n}', + output: 'function a() {\nvar b;\n\n/* comment */ return;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nvar b;\n//comment\n/* comment */ return;\n}', + output: 'function a() {\nvar b;\n\n//comment\n/* comment */ return;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nvar b; /* comment */ return;\n}', + output: 'function a() {\nvar b; /* comment */\n\n return;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nvar b; /* comment */\nreturn;\n}', + output: 'function a() {\nvar b; /* comment */\n\nreturn;\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nvar b;\nreturn; //comment\n}', + output: 'function a() {\nvar b;\n\nreturn; //comment\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function a() {\nvar b; return; //comment\n}', + output: 'function a() {\nvar b;\n\n return; //comment\n}', + options: [{ blankLine: 'always', prev: '*', next: 'return' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // From JSCS disallowPaddingNewLinesAfterBlocks + // https://github.com/jscs-dev/node-jscs/blob/44f9b86eb0757fd4ca05a81a50450c5f1b25c37b/test/specs/rules/disallow-padding-newlines-after-blocks.js + //---------------------------------------------------------------------- + + { + code: 'if(true){}\n\nvar a = 2;', + output: 'if(true){}\nvar a = 2;', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'if(true){\nif(true) {}\n\nvar a = 2;}', + output: 'if(true){\nif(true) {}\nvar a = 2;}', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: '(function(){\n})()\n\nvar a = 2;', + output: '(function(){\n})()\nvar a = 2;', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: '+(function(){\n})()\n\nvar a = 2;', + output: '+(function(){\n})()\nvar a = 2;', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'var a = function() {};\n\nvar b = 2;', + output: 'var a = function() {};\nvar b = 2;', + options: [{ blankLine: 'never', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // From JSCS disallowPaddingNewLinesBeforeExport + // https://github.com/jscs-dev/node-jscs/blob/44f9b86eb0757fd4ca05a81a50450c5f1b25c37b/test/specs/rules/disallow-padding-newlines-before-export.js + //---------------------------------------------------------------------- + + { + code: 'var a = 2;\n\nmodule.exports = a;', + output: 'var a = 2;\nmodule.exports = a;', + options: [{ blankLine: 'never', prev: '*', next: 'exports' }], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // From JSCS disallowPaddingNewLinesBeforeExport + // https://github.com/jscs-dev/node-jscs/blob/44f9b86eb0757fd4ca05a81a50450c5f1b25c37b/test/specs/rules/disallow-padding-newlines-before-keywords.js + //---------------------------------------------------------------------- + + { + code: 'function x() { var a;\n\nreturn; }', + output: 'function x() { var a;\nreturn; }', + options: [ + { + blankLine: 'never', + prev: '*', + next: ['if', 'for', 'return', 'switch', 'case', 'break', 'throw'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'function x() { var a = true;\n\nif (a) { a = !a; }; }', + output: 'function x() { var a = true;\nif (a) { a = !a; }; }', + options: [ + { + blankLine: 'never', + prev: '*', + next: ['if', 'for', 'return', 'switch', 'case', 'break', 'throw'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'function x() { var a = true;\n\nfor (var i = 0; i < 10; i++) { a = !a; }; }', + output: + 'function x() { var a = true;\nfor (var i = 0; i < 10; i++) { a = !a; }; }', + options: [ + { + blankLine: 'never', + prev: '*', + next: ['if', 'for', 'return', 'switch', 'case', 'break', 'throw'], + }, + ], + errors: [{ messageId: 'unexpectedBlankLine' }], + }, + { + code: 'function x() { var y = true;\n\nswitch ("Oranges") { case "Oranges": y = !y;\n\nbreak;\n\ncase "Apples": y = !y;\n\nbreak; default: y = !y; } }', + output: + 'function x() { var y = true;\nswitch ("Oranges") { case "Oranges": y = !y;\nbreak;\ncase "Apples": y = !y;\nbreak; default: y = !y; } }', + options: [ + { + blankLine: 'never', + prev: '*', + next: ['if', 'for', 'return', 'switch', 'case', 'break', 'throw'], + }, + ], + errors: [ + { messageId: 'unexpectedBlankLine' }, + { messageId: 'unexpectedBlankLine' }, + { messageId: 'unexpectedBlankLine' }, + { messageId: 'unexpectedBlankLine' }, + ], + }, + { + code: 'function x() {try { var a;\n\nthrow 0; } catch (e) { var b = 0;\n\nthrow e; } }', + output: + 'function x() {try { var a;\nthrow 0; } catch (e) { var b = 0;\nthrow e; } }', + options: [ + { + blankLine: 'never', + prev: '*', + next: ['if', 'for', 'return', 'switch', 'case', 'break', 'throw'], + }, + ], + errors: [ + { messageId: 'unexpectedBlankLine' }, + { messageId: 'unexpectedBlankLine' }, + ], + }, + { + code: 'function x(a) { var b = 0;\n\nif (!a) { return false; };\n\nfor (var i = 0; i < b; i++) { if (!a[i]) return false; }\n\nreturn true; }', + output: + 'function x(a) { var b = 0;\nif (!a) { return false; };\nfor (var i = 0; i < b; i++) { if (!a[i]) return false; }\nreturn true; }', + options: [ + { + blankLine: 'never', + prev: '*', + next: ['if', 'for', 'return', 'switch', 'case', 'break', 'throw'], + }, + ], + errors: [ + { messageId: 'unexpectedBlankLine' }, + { messageId: 'unexpectedBlankLine' }, + { messageId: 'unexpectedBlankLine' }, + ], + }, + + //---------------------------------------------------------------------- + // From JSCS requirePaddingNewLinesAfterBlocks + // https://github.com/jscs-dev/node-jscs/blob/44f9b86eb0757fd4ca05a81a50450c5f1b25c37b/test/specs/rules/require-padding-newlines-after-blocks.js + //---------------------------------------------------------------------- + + { + code: 'if(true){}\nvar a = 2;', + output: 'if(true){}\n\nvar a = 2;', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'var a = function() {\n};\nvar b = 2;', + output: 'var a = function() {\n};\n\nvar b = 2;', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'if(true){\nif(true) {}\nvar a = 2;}', + output: 'if(true){\nif(true) {}\n\nvar a = 2;}', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: '(function(){\n})()\nvar a = 2;', + output: '(function(){\n})()\n\nvar a = 2;', + options: [{ blankLine: 'always', prev: 'block-like', next: '*' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'var a = function() {\n};\nvar b = 2;', + output: 'var a = function() {\n};\n\nvar b = 2;', + options: [ + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: '(function(){\n})()\nvar a = 2;', + output: '(function(){\n})()\n\nvar a = 2;', + options: [ + { blankLine: 'always', prev: 'multiline-block-like', next: '*' }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // From JSCS requirePaddingNewLinesBeforeExport + // https://github.com/jscs-dev/node-jscs/blob/44f9b86eb0757fd4ca05a81a50450c5f1b25c37b/test/specs/rules/require-padding-newlines-before-export.js + //---------------------------------------------------------------------- + + { + code: 'var a = 2;\nmodule.exports = a;', + output: 'var a = 2;\n\nmodule.exports = a;', + options: [{ blankLine: 'always', prev: '*', next: 'exports' }], + errors: [{ messageId: 'expectedBlankLine' }], + }, + + //---------------------------------------------------------------------- + // From JSCS requirePaddingNewlinesBeforeKeywords + // https://github.com/jscs-dev/node-jscs/blob/44f9b86eb0757fd4ca05a81a50450c5f1b25c37b/test/specs/rules/require-padding-newlines-before-keywords.js + //---------------------------------------------------------------------- + + { + code: 'function x() { var a; return; }', + output: 'function x() { var a;\n\n return; }', + options: [ + { + blankLine: 'always', + prev: '*', + next: [ + 'if', + 'for', + 'return', + 'switch', + 'case', + 'break', + 'throw', + 'while', + 'default', + ], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function x() { var a = true; for (var i = 0; i < 10; i++) { a = !a; }; }', + output: + 'function x() { var a = true;\n\n for (var i = 0; i < 10; i++) { a = !a; }; }', + options: [ + { + blankLine: 'always', + prev: '*', + next: [ + 'if', + 'for', + 'return', + 'switch', + 'case', + 'break', + 'throw', + 'while', + 'default', + ], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function x() { var y = true; switch ("Oranges") { case "Oranges": y = !y; break; case "Apples": y = !y; break; default: y = !y; } }', + output: + 'function x() { var y = true;\n\n switch ("Oranges") { case "Oranges": y = !y;\n\n break;\n\n case "Apples": y = !y;\n\n break;\n\n default: y = !y; } }', + options: [ + { + blankLine: 'always', + prev: '*', + next: [ + 'if', + 'for', + 'return', + 'switch', + 'case', + 'break', + 'throw', + 'while', + 'default', + ], + }, + ], + errors: [ + { messageId: 'expectedBlankLine' }, + { messageId: 'expectedBlankLine' }, + { messageId: 'expectedBlankLine' }, + { messageId: 'expectedBlankLine' }, + { messageId: 'expectedBlankLine' }, + ], + }, + { + code: 'function x() { var a = true; while (!a) { a = !a; }; }', + output: 'function x() { var a = true;\n\n while (!a) { a = !a; }; }', + options: [ + { + blankLine: 'always', + prev: '*', + next: [ + 'if', + 'for', + 'return', + 'switch', + 'case', + 'break', + 'throw', + 'while', + 'default', + ], + }, + ], + errors: [{ messageId: 'expectedBlankLine' }], + }, + { + code: 'function x() {try { var a; throw 0; } catch (e) { var b = 0; throw e; } }', + output: + 'function x() {try { var a;\n\n throw 0; } catch (e) { var b = 0;\n\n throw e; } }', + options: [ + { + blankLine: 'always', + prev: '*', + next: [ + 'if', + 'for', + 'return', + 'switch', + 'case', + 'break', + 'throw', + 'while', + 'default', + ], + }, + ], + errors: [ + { messageId: 'expectedBlankLine' }, + { messageId: 'expectedBlankLine' }, + ], + }, + { + code: 'function x(a) { var b = 0; if (!a) { return false; }; for (var i = 0; i < b; i++) { if (!a[i]) return false; } return true; }', + output: + 'function x(a) { var b = 0;\n\n if (!a) { return false; };\n\n for (var i = 0; i < b; i++) { if (!a[i]) return false; }\n\n return true; }', + options: [ + { + blankLine: 'always', + prev: '*', + next: [ + 'if', + 'for', + 'return', + 'switch', + 'case', + 'break', + 'throw', + 'while', + 'default', + ], + }, + ], + errors: [ + { messageId: 'expectedBlankLine' }, + { messageId: 'expectedBlankLine' }, + { messageId: 'expectedBlankLine' }, + ], + }, + ], +}); From ea40ab659351ae7cf7235ea063d42ac155b11e5f Mon Sep 17 00:00:00 2001 From: Jacob Bandes-Storch Date: Fri, 3 Sep 2021 10:41:35 -0700 Subject: [PATCH 316/473] feat(eslint-plugin): add `no-meaningless-void-operator` rule (#3641) --- packages/eslint-plugin/README.md | 1 + .../rules/no-meaningless-void-operator.md | 50 +++++++++ packages/eslint-plugin/src/configs/all.ts | 1 + packages/eslint-plugin/src/rules/index.ts | 2 + .../src/rules/no-meaningless-void-operator.ts | 100 ++++++++++++++++++ .../no-meaningless-void-operator.test.ts | 90 ++++++++++++++++ 6 files changed, 244 insertions(+) create mode 100644 packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md create mode 100644 packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts create mode 100644 packages/eslint-plugin/tests/rules/no-meaningless-void-operator.test.ts diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index a60d885093f0..5b32c4ef29e7 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -128,6 +128,7 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@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 | :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-meaningless-void-operator`](./docs/rules/no-meaningless-void-operator.md) | Disallow the `void` operator except when used to discard a value | | :wrench: | :thought_balloon: | | [`@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: | | | diff --git a/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md b/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md new file mode 100644 index 000000000000..4aa69e5714b5 --- /dev/null +++ b/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md @@ -0,0 +1,50 @@ +# Disallow the `void` operator except when used to discard a value (`no-meaningless-void-operator`) + +Disallow the `void` operator when its argument is already of type `void` or `undefined`. + +## Rule Details + +The `void` operator is a useful tool to convey the programmer's intent to discard a value. For example, it is recommended as one way of suppressing [`@typescript-eslint/no-floating-promises`](./no-floating-promises.md) instead of adding `.catch()` to a promise. + +This rule helps an author catch API changes where previously a value was being discarded at a call site, but the callee changed so it no longer returns a value. When combined with [no-unused-expressions](https://eslint.org/docs/rules/no-unused-expressions), it also helps _readers_ of the code by ensuring consistency: a statement that looks like `void foo();` is **always** discarding a return value, and a statement that looks like `foo();` is **never** discarding a return value. + +Examples of **incorrect** code for this rule: + +```ts +void (() => {})(); + +function foo() {} +void foo(); +``` + +Examples of **correct** code for this rule: + +```ts +(() => {})(); + +function foo() {} +foo(); // nothing to discard + +function bar(x: number) { + void x; // discarding a number + return 2; +} +void bar(); // discarding a number +``` + +### Options + +This rule accepts a single object option with the following default configuration: + +```json +{ + "@typescript-eslint/no-meaningless-void-operator": [ + "error", + { + "checkNever": false + } + ] +} +``` + +- `checkNever: true` will suggest removing `void` when the argument has type `never`. diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index 4d94a83fa592..9d7fde81314f 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -78,6 +78,7 @@ export = { '@typescript-eslint/no-loss-of-precision': 'error', 'no-magic-numbers': 'off', '@typescript-eslint/no-magic-numbers': 'error', + '@typescript-eslint/no-meaningless-void-operator': 'error', '@typescript-eslint/no-misused-new': 'error', '@typescript-eslint/no-misused-promises': 'error', '@typescript-eslint/no-namespace': 'error', diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index 54dd9c24ac34..1f6aa56c7cba 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -50,6 +50,7 @@ import noInvalidVoidType from './no-invalid-void-type'; import noLoopFunc from './no-loop-func'; import noLossOfPrecision from './no-loss-of-precision'; import noMagicNumbers from './no-magic-numbers'; +import noMeaninglessVoidOperator from './no-meaningless-void-operator'; import noMisusedNew from './no-misused-new'; import noMisusedPromises from './no-misused-promises'; import noNamespace from './no-namespace'; @@ -170,6 +171,7 @@ export default { 'no-loop-func': noLoopFunc, 'no-loss-of-precision': noLossOfPrecision, 'no-magic-numbers': noMagicNumbers, + 'no-meaningless-void-operator': noMeaninglessVoidOperator, 'no-misused-new': noMisusedNew, 'no-misused-promises': noMisusedPromises, 'no-namespace': noNamespace, diff --git a/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts b/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts new file mode 100644 index 000000000000..3640cb34630b --- /dev/null +++ b/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts @@ -0,0 +1,100 @@ +import { + ESLintUtils, + TSESLint, + TSESTree, +} from '@typescript-eslint/experimental-utils'; +import * as tsutils from 'tsutils'; +import * as util from '../util'; +import * as ts from 'typescript'; + +type Options = [ + { + checkNever: boolean; + }, +]; + +export default util.createRule< + Options, + 'meaninglessVoidOperator' | 'removeVoid' +>({ + name: 'no-meaningless-void-operator', + meta: { + type: 'suggestion', + docs: { + description: + 'Disallow the `void` operator except when used to discard a value', + category: 'Best Practices', + recommended: false, + suggestion: true, + requiresTypeChecking: true, + }, + fixable: 'code', + messages: { + meaninglessVoidOperator: + "void operator shouldn't be used on {{type}}; it should convey that a return value is being ignored", + removeVoid: "Remove 'void'", + }, + schema: [ + { + type: 'object', + properties: { + checkNever: { + type: 'boolean', + default: false, + }, + }, + additionalProperties: false, + }, + ], + }, + defaultOptions: [{ checkNever: false }], + + create(context, [{ checkNever }]) { + const parserServices = ESLintUtils.getParserServices(context); + const checker = parserServices.program.getTypeChecker(); + const sourceCode = context.getSourceCode(); + + return { + 'UnaryExpression[operator="void"]'(node: TSESTree.UnaryExpression): void { + const fix = (fixer: TSESLint.RuleFixer): TSESLint.RuleFix => { + return fixer.removeRange([ + sourceCode.getTokens(node)[0].range[0], + sourceCode.getTokens(node)[1].range[0], + ]); + }; + + const argTsNode = parserServices.esTreeNodeToTSNodeMap.get( + node.argument, + ); + const argType = checker.getTypeAtLocation(argTsNode); + const unionParts = tsutils.unionTypeParts(argType); + if ( + unionParts.every( + part => part.flags & (ts.TypeFlags.Void | ts.TypeFlags.Undefined), + ) + ) { + context.report({ + node, + messageId: 'meaninglessVoidOperator', + data: { type: checker.typeToString(argType) }, + fix, + }); + } else if ( + checkNever && + unionParts.every( + part => + part.flags & + (ts.TypeFlags.Void | ts.TypeFlags.Undefined | ts.TypeFlags.Never), + ) + ) { + context.report({ + node, + messageId: 'meaninglessVoidOperator', + data: { type: checker.typeToString(argType) }, + suggest: [{ messageId: 'removeVoid', fix }], + }); + } + }, + }; + }, +}); diff --git a/packages/eslint-plugin/tests/rules/no-meaningless-void-operator.test.ts b/packages/eslint-plugin/tests/rules/no-meaningless-void-operator.test.ts new file mode 100644 index 000000000000..5e034f2904b0 --- /dev/null +++ b/packages/eslint-plugin/tests/rules/no-meaningless-void-operator.test.ts @@ -0,0 +1,90 @@ +import rule from '../../src/rules/no-meaningless-void-operator'; +import { RuleTester, getFixturesRootDir } from '../RuleTester'; + +const rootDir = getFixturesRootDir(); + +const ruleTester = new RuleTester({ + parserOptions: { + ecmaVersion: 2018, + tsconfigRootDir: rootDir, + project: './tsconfig.json', + }, + parser: '@typescript-eslint/parser', +}); + +ruleTester.run('no-meaningless-void-operator', rule, { + valid: [ + ` +(() => {})(); + +function foo() {} +foo(); // nothing to discard + +function bar(x: number) { + void x; + return 2; +} +void bar(); // discarding a number + `, + ` +function bar(x: never) { + void x; +} + `, + ], + invalid: [ + { + code: 'void (() => {})();', + output: '(() => {})();', + errors: [ + { + messageId: 'meaninglessVoidOperator', + line: 1, + column: 1, + }, + ], + }, + { + code: ` +function foo() {} +void foo(); + `, + output: ` +function foo() {} +foo(); + `, + errors: [ + { + messageId: 'meaninglessVoidOperator', + line: 3, + column: 1, + }, + ], + }, + { + options: [{ checkNever: true }], + code: ` +function bar(x: never) { + void x; +} + `.trimRight(), + errors: [ + { + messageId: 'meaninglessVoidOperator', + line: 3, + column: 3, + suggestions: [ + { + messageId: 'removeVoid', + output: ` +function bar(x: never) { + x; +} + `.trimRight(), + }, + ], + }, + ], + }, + ], +}); From 4bfa4375aff8f65057d4aa116e435803cbc6b464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Fri, 3 Sep 2021 19:43:05 +0200 Subject: [PATCH 317/473] feat(experimental-utils): extract `isNodeOfType` out of `ast-utils`' `predicates` (#3677) --- .../src/ast-utils/predicates.ts | 37 ++++++------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/predicates.ts index 919820d7653d..7a7bcf520b1a 100644 --- a/packages/experimental-utils/src/ast-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/predicates.ts @@ -1,5 +1,12 @@ import { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree } from '../ts-estree'; +const isNodeOfType = + (nodeType: NodeType) => + ( + node: TSESTree.Node | null | undefined, + ): node is TSESTree.Node & { type: NodeType } => + node?.type === nodeType; + function isOptionalChainPunctuator( token: TSESTree.Token, ): token is TSESTree.PunctuatorToken & { value: '?.' } { @@ -69,11 +76,7 @@ function isTypeAssertion( ); } -function isVariableDeclarator( - node: TSESTree.Node | undefined, -): node is TSESTree.VariableDeclarator { - return node?.type === AST_NODE_TYPES.VariableDeclarator; -} +const isVariableDeclarator = isNodeOfType(AST_NODE_TYPES.VariableDeclarator); function isFunction( node: TSESTree.Node | undefined, @@ -130,17 +133,9 @@ function isFunctionOrFunctionType( return isFunction(node) || isFunctionType(node); } -function isTSFunctionType( - node: TSESTree.Node | undefined, -): node is TSESTree.TSFunctionType { - return node?.type === AST_NODE_TYPES.TSFunctionType; -} +const isTSFunctionType = isNodeOfType(AST_NODE_TYPES.TSFunctionType); -function isTSConstructorType( - node: TSESTree.Node | undefined, -): node is TSESTree.TSConstructorType { - return node?.type === AST_NODE_TYPES.TSConstructorType; -} +const isTSConstructorType = isNodeOfType(AST_NODE_TYPES.TSConstructorType); function isClassOrTypeElement( node: TSESTree.Node | undefined, @@ -193,20 +188,12 @@ function isSetter( ); } -function isIdentifier( - node: TSESTree.Node | undefined, -): node is TSESTree.Identifier { - return node?.type === AST_NODE_TYPES.Identifier; -} +const isIdentifier = isNodeOfType(AST_NODE_TYPES.Identifier); /** * Checks if a node represents an `await …` expression. */ -function isAwaitExpression( - node: TSESTree.Node | undefined | null, -): node is TSESTree.AwaitExpression { - return node?.type === AST_NODE_TYPES.AwaitExpression; -} +const isAwaitExpression = isNodeOfType(AST_NODE_TYPES.AwaitExpression); /** * Checks if a possible token is the `await` keyword. From 363b3dc4dd0dc343311c729d75935b10f9d2fd5e Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 3 Sep 2021 20:44:40 +0300 Subject: [PATCH 318/473] feat(eslint-plugin): [restrict-template-expressions] add option to allow RegExp (#3709) --- .../rules/restrict-template-expressions.md | 17 ++++ .../rules/restrict-template-expressions.ts | 9 +++ .../restrict-template-expressions.test.ts | 79 ++++++++++++++++++- 3 files changed, 103 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/restrict-template-expressions.md b/packages/eslint-plugin/docs/rules/restrict-template-expressions.md index 0ee7427ddac1..e567b6571b66 100644 --- a/packages/eslint-plugin/docs/rules/restrict-template-expressions.md +++ b/packages/eslint-plugin/docs/rules/restrict-template-expressions.md @@ -35,6 +35,8 @@ type Options = { allowAny?: boolean; // if true, also allow null and undefined in template expressions allowNullish?: boolean; + // if true, also allow RegExp in template expressions + allowRegExp?: boolean; }; const defaults = { @@ -42,6 +44,7 @@ const defaults = { allowBoolean: false, allowAny: false, allowNullish: false, + allowRegExp: false, }; ``` @@ -83,3 +86,17 @@ Examples of additional **correct** code for this rule with `{ allowNullish: true const arg = condition ? 'ok' : null; const msg1 = `arg = ${arg}`; ``` + +### `allowRegExp` + +Examples of additional **correct** code for this rule with `{ allowRegExp: true }`: + +```ts +const arg = new RegExp('foo'); +const msg1 = `arg = ${arg}`; +``` + +```ts +const arg = /foo/; +const msg1 = `arg = ${arg}`; +``` diff --git a/packages/eslint-plugin/src/rules/restrict-template-expressions.ts b/packages/eslint-plugin/src/rules/restrict-template-expressions.ts index a4756266ffca..b20bd5c62bc2 100644 --- a/packages/eslint-plugin/src/rules/restrict-template-expressions.ts +++ b/packages/eslint-plugin/src/rules/restrict-template-expressions.ts @@ -11,6 +11,7 @@ type Options = [ allowBoolean?: boolean; allowAny?: boolean; allowNullish?: boolean; + allowRegExp?: boolean; }, ]; @@ -37,6 +38,7 @@ export default util.createRule({ allowBoolean: { type: 'boolean' }, allowAny: { type: 'boolean' }, allowNullish: { type: 'boolean' }, + allowRegExp: { type: 'boolean' }, }, }, ], @@ -76,6 +78,13 @@ export default util.createRule({ return true; } + if ( + options.allowRegExp && + util.getTypeName(typeChecker, type) === 'RegExp' + ) { + return true; + } + if ( options.allowNullish && util.isTypeFlagSet(type, ts.TypeFlags.Null | ts.TypeFlags.Undefined) diff --git a/packages/eslint-plugin/tests/rules/restrict-template-expressions.test.ts b/packages/eslint-plugin/tests/rules/restrict-template-expressions.test.ts index df5d5aefb259..fea8b82501ae 100644 --- a/packages/eslint-plugin/tests/rules/restrict-template-expressions.test.ts +++ b/packages/eslint-plugin/tests/rules/restrict-template-expressions.test.ts @@ -189,11 +189,56 @@ ruleTester.run('restrict-template-expressions', rule, { } `, }, + // allowRegExp + { + options: [{ allowRegExp: true }], + code: ` + const arg = new RegExp('foo'); + const msg = \`arg = \${arg}\`; + `, + }, + { + options: [{ allowRegExp: true }], + code: ` + const arg = /foo/; + const msg = \`arg = \${arg}\`; + `, + }, + { + options: [{ allowRegExp: true }], + code: ` + declare const arg: string | RegExp; + const msg = \`arg = \${arg}\`; + `, + }, + { + options: [{ allowRegExp: true }], + code: ` + function test(arg: T) { + return \`arg = \${arg}\`; + } + `, + }, + { + options: [{ allowRegExp: true }], + code: ` + function test(arg: T) { + return \`arg = \${arg}\`; + } + `, + }, // allow ALL { - options: [{ allowNumber: true, allowBoolean: true, allowNullish: true }], + options: [ + { + allowNumber: true, + allowBoolean: true, + allowNullish: true, + allowRegExp: true, + }, + ], code: ` - type All = string | number | boolean | null | undefined; + type All = string | number | boolean | null | undefined | RegExp; function test(arg: T) { return \`arg = \${arg}\`; } @@ -338,6 +383,36 @@ ruleTester.run('restrict-template-expressions', rule, { }, ], }, + { + options: [{ allowRegExp: false }], + code: ` + const arg = new RegExp('foo'); + const msg = \`arg = \${arg}\`; + `, + errors: [ + { + messageId: 'invalidType', + data: { type: 'RegExp' }, + line: 3, + column: 30, + }, + ], + }, + { + options: [{ allowRegExp: false }], + code: ` + const arg = /foo/; + const msg = \`arg = \${arg}\`; + `, + errors: [ + { + messageId: 'invalidType', + data: { type: 'RegExp' }, + line: 3, + column: 30, + }, + ], + }, // TS 3.9 change { options: [{ allowAny: true }], From a46e3182c8a0b07c914605d6d9fe28ef36a7c32a Mon Sep 17 00:00:00 2001 From: Rebecca Stevens Date: Sat, 4 Sep 2021 05:46:35 +1200 Subject: [PATCH 319/473] feat(eslint-plugin): [prefer-readonly-parameter-types] add option treatMethodsAsReadonly (#3733) --- .../rules/prefer-readonly-parameter-types.md | 41 +++++++++ .../rules/prefer-readonly-parameter-types.ts | 12 ++- .../eslint-plugin/src/util/isTypeReadonly.ts | 68 +++++++++++++-- .../prefer-readonly-parameter-types.test.ts | 86 +++++++++++++++++++ 4 files changed, 196 insertions(+), 11 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md b/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md index 34544456f09e..3b6f1346d7c9 100644 --- a/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +++ b/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md @@ -130,6 +130,7 @@ interface Options { const defaultOptions: Options = { checkParameterProperties: true, ignoreInferredTypes: false, + treatMethodsAsReadonly: false, }; ``` @@ -214,3 +215,43 @@ export const acceptsCallback: AcceptsCallback; ``` + +### `treatMethodsAsReadonly` + +This option allows you to treat all mutable methods as though they were readonly. This may be desirable in when you are never reassigning methods. + +Examples of **incorrect** code for this rule with `{treatMethodsAsReadonly: false}`: + +```ts +type MyType = { + readonly prop: string; + method(): string; // note: this method is mutable +}; +function foo(arg: MyType) {} +``` + +Examples of **correct** code for this rule with `{treatMethodsAsReadonly: false}`: + +```ts +type MyType = Readonly<{ + prop: string; + method(): string; +}>; +function foo(arg: MyType) {} + +type MyOtherType = { + readonly prop: string; + readonly method: () => string; +}; +function bar(arg: MyOtherType) {} +``` + +Examples of **correct** code for this rule with `{treatMethodsAsReadonly: true}`: + +```ts +type MyType = { + readonly prop: string; + method(): string; // note: this method is mutable +}; +function foo(arg: MyType) {} +``` diff --git a/packages/eslint-plugin/src/rules/prefer-readonly-parameter-types.ts b/packages/eslint-plugin/src/rules/prefer-readonly-parameter-types.ts index a36020e93d3c..fdf48395eae5 100644 --- a/packages/eslint-plugin/src/rules/prefer-readonly-parameter-types.ts +++ b/packages/eslint-plugin/src/rules/prefer-readonly-parameter-types.ts @@ -8,7 +8,7 @@ type Options = [ { checkParameterProperties?: boolean; ignoreInferredTypes?: boolean; - }, + } & util.ReadonlynessOptions, ]; type MessageIds = 'shouldBeReadonly'; @@ -34,6 +34,7 @@ export default util.createRule({ ignoreInferredTypes: { type: 'boolean', }, + ...util.readonlynessOptionsSchema.properties, }, }, ], @@ -45,10 +46,13 @@ export default util.createRule({ { checkParameterProperties: true, ignoreInferredTypes: false, + ...util.readonlynessOptionsDefaults, }, ], create(context, options) { - const [{ checkParameterProperties, ignoreInferredTypes }] = options; + const [ + { checkParameterProperties, ignoreInferredTypes, treatMethodsAsReadonly }, + ] = options; const { esTreeNodeToTSNodeMap, program } = util.getParserServices(context); const checker = program.getTypeChecker(); @@ -94,7 +98,9 @@ export default util.createRule({ const tsNode = esTreeNodeToTSNodeMap.get(actualParam); const type = checker.getTypeAtLocation(tsNode); - const isReadOnly = util.isTypeReadonly(checker, type); + const isReadOnly = util.isTypeReadonly(checker, type, { + treatMethodsAsReadonly: treatMethodsAsReadonly!, + }); if (!isReadOnly) { context.report({ diff --git a/packages/eslint-plugin/src/util/isTypeReadonly.ts b/packages/eslint-plugin/src/util/isTypeReadonly.ts index 4a42c90c1e05..8b3efc27856e 100644 --- a/packages/eslint-plugin/src/util/isTypeReadonly.ts +++ b/packages/eslint-plugin/src/util/isTypeReadonly.ts @@ -4,6 +4,7 @@ import { isUnionOrIntersectionType, unionTypeParts, isPropertyReadonlyInType, + isSymbolFlagSet, } from 'tsutils'; import * as ts from 'typescript'; import { getTypeOfPropertyOfType, nullThrows, NullThrowsReasons } from '.'; @@ -17,9 +18,32 @@ const enum Readonlyness { Readonly = 3, } +export interface ReadonlynessOptions { + readonly treatMethodsAsReadonly?: boolean; +} + +export const readonlynessOptionsSchema = { + type: 'object', + additionalProperties: false, + properties: { + treatMethodsAsReadonly: { + type: 'boolean', + }, + }, +}; + +export const readonlynessOptionsDefaults: ReadonlynessOptions = { + treatMethodsAsReadonly: false, +}; + +function hasSymbol(node: ts.Node): node is ts.Node & { symbol: ts.Symbol } { + return Object.prototype.hasOwnProperty.call(node, 'symbol'); +} + function isTypeReadonlyArrayOrTuple( checker: ts.TypeChecker, type: ts.Type, + options: ReadonlynessOptions, seenTypes: Set, ): Readonlyness { function checkTypeArguments(arrayType: ts.TypeReference): Readonlyness { @@ -40,7 +64,7 @@ function isTypeReadonlyArrayOrTuple( if ( typeArguments.some( typeArg => - isTypeReadonlyRecurser(checker, typeArg, seenTypes) === + isTypeReadonlyRecurser(checker, typeArg, options, seenTypes) === Readonlyness.Mutable, ) ) { @@ -76,6 +100,7 @@ function isTypeReadonlyArrayOrTuple( function isTypeReadonlyObject( checker: ts.TypeChecker, type: ts.Type, + options: ReadonlynessOptions, seenTypes: Set, ): Readonlyness { function checkIndexSignature(kind: ts.IndexKind): Readonlyness { @@ -93,7 +118,18 @@ function isTypeReadonlyObject( if (properties.length) { // ensure the properties are marked as readonly for (const property of properties) { - if (!isPropertyReadonlyInType(type, property.getEscapedName(), checker)) { + if ( + !( + isPropertyReadonlyInType(type, property.getEscapedName(), checker) || + (options.treatMethodsAsReadonly && + property.valueDeclaration !== undefined && + hasSymbol(property.valueDeclaration) && + isSymbolFlagSet( + property.valueDeclaration.symbol, + ts.SymbolFlags.Method, + )) + ) + ) { return Readonlyness.Mutable; } } @@ -117,7 +153,7 @@ function isTypeReadonlyObject( } if ( - isTypeReadonlyRecurser(checker, propertyType, seenTypes) === + isTypeReadonlyRecurser(checker, propertyType, options, seenTypes) === Readonlyness.Mutable ) { return Readonlyness.Mutable; @@ -142,6 +178,7 @@ function isTypeReadonlyObject( function isTypeReadonlyRecurser( checker: ts.TypeChecker, type: ts.Type, + options: ReadonlynessOptions, seenTypes: Set, ): Readonlyness.Readonly | Readonlyness.Mutable { seenTypes.add(type); @@ -149,7 +186,7 @@ function isTypeReadonlyRecurser( if (isUnionType(type)) { // all types in the union must be readonly const result = unionTypeParts(type).every(t => - isTypeReadonlyRecurser(checker, t, seenTypes), + isTypeReadonlyRecurser(checker, t, options, seenTypes), ); const readonlyness = result ? Readonlyness.Readonly : Readonlyness.Mutable; return readonlyness; @@ -169,12 +206,22 @@ function isTypeReadonlyRecurser( return Readonlyness.Readonly; } - const isReadonlyArray = isTypeReadonlyArrayOrTuple(checker, type, seenTypes); + const isReadonlyArray = isTypeReadonlyArrayOrTuple( + checker, + type, + options, + seenTypes, + ); if (isReadonlyArray !== Readonlyness.UnknownType) { return isReadonlyArray; } - const isReadonlyObject = isTypeReadonlyObject(checker, type, seenTypes); + const isReadonlyObject = isTypeReadonlyObject( + checker, + type, + options, + seenTypes, + ); /* istanbul ignore else */ if ( isReadonlyObject !== Readonlyness.UnknownType ) { @@ -187,9 +234,14 @@ function isTypeReadonlyRecurser( /** * Checks if the given type is readonly */ -function isTypeReadonly(checker: ts.TypeChecker, type: ts.Type): boolean { +function isTypeReadonly( + checker: ts.TypeChecker, + type: ts.Type, + options: ReadonlynessOptions, +): boolean { return ( - isTypeReadonlyRecurser(checker, type, new Set()) === Readonlyness.Readonly + isTypeReadonlyRecurser(checker, type, options, new Set()) === + Readonlyness.Readonly ); } diff --git a/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts b/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts index 9278420a7647..0a6ee1038073 100644 --- a/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts @@ -154,6 +154,74 @@ ruleTester.run('prefer-readonly-parameter-types', rule, { } function foo(arg: Readonly) {} `, + // immutable methods + ` + type MyType = Readonly<{ + prop: string; + method(): string; + }>; + function foo(arg: MyType) {} + `, + ` + type MyType = { + readonly prop: string; + readonly method: () => string; + }; + function bar(arg: MyType) {} + `, + // methods treated as readonly + { + code: ` + type MyType = { + readonly prop: string; + method(): string; + }; + function foo(arg: MyType) {} + `, + options: [ + { + treatMethodsAsReadonly: true, + }, + ], + }, + { + code: ` + class Foo { + method() {} + } + function foo(arg: Foo) {} + `, + options: [ + { + treatMethodsAsReadonly: true, + }, + ], + }, + { + code: ` + interface Foo { + method(): void; + } + function foo(arg: Foo) {} + `, + options: [ + { + treatMethodsAsReadonly: true, + }, + ], + }, + // ReadonlySet and ReadonlyMap are seen as readonly when methods are treated as readonly + { + code: ` + function foo(arg: ReadonlySet) {} + function bar(arg: ReadonlyMap) {} + `, + options: [ + { + treatMethodsAsReadonly: true, + }, + ], + }, // parameter properties should work fine { @@ -715,5 +783,23 @@ ruleTester.run('prefer-readonly-parameter-types', rule, { }, ], }, + // Mutable methods. + { + code: ` + type MyType = { + readonly prop: string; + method(): string; + }; + function foo(arg: MyType) {} + `, + errors: [ + { + messageId: 'shouldBeReadonly', + line: 6, + column: 22, + endColumn: 33, + }, + ], + }, ], }); From f62baec3a6a848739fddbcb2c4073c5ab5f7f774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Fri, 3 Sep 2021 19:47:26 +0200 Subject: [PATCH 320/473] chore(ast-spec): simplify `Literal` types (#3769) --- packages/ast-spec/src/base/LiteralBase.ts | 2 ++ packages/ast-spec/src/expression/literal/BigIntLiteral/spec.ts | 2 -- packages/ast-spec/src/expression/literal/BooleanLiteral/spec.ts | 2 -- packages/ast-spec/src/expression/literal/NullLiteral/spec.ts | 2 -- packages/ast-spec/src/expression/literal/NumberLiteral/spec.ts | 2 -- packages/ast-spec/src/expression/literal/RegExpLiteral/spec.ts | 2 -- packages/ast-spec/src/expression/literal/StringLiteral/spec.ts | 2 -- 7 files changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/ast-spec/src/base/LiteralBase.ts b/packages/ast-spec/src/base/LiteralBase.ts index 01a480ddc3cb..c878fe7b7aa5 100644 --- a/packages/ast-spec/src/base/LiteralBase.ts +++ b/packages/ast-spec/src/base/LiteralBase.ts @@ -1,6 +1,8 @@ +import type { AST_NODE_TYPES } from '../ast-node-types'; import type { BaseNode } from './BaseNode'; export interface LiteralBase extends BaseNode { + type: AST_NODE_TYPES.Literal; raw: string; value: RegExp | bigint | boolean | number | string | null; } diff --git a/packages/ast-spec/src/expression/literal/BigIntLiteral/spec.ts b/packages/ast-spec/src/expression/literal/BigIntLiteral/spec.ts index c27a85543ff8..2df33369cf74 100644 --- a/packages/ast-spec/src/expression/literal/BigIntLiteral/spec.ts +++ b/packages/ast-spec/src/expression/literal/BigIntLiteral/spec.ts @@ -1,8 +1,6 @@ -import type { AST_NODE_TYPES } from '../../../ast-node-types'; import type { LiteralBase } from '../../../base/LiteralBase'; export interface BigIntLiteral extends LiteralBase { - type: AST_NODE_TYPES.Literal; value: bigint | null; bigint: string; } diff --git a/packages/ast-spec/src/expression/literal/BooleanLiteral/spec.ts b/packages/ast-spec/src/expression/literal/BooleanLiteral/spec.ts index a2310a698d02..be7477f015cb 100644 --- a/packages/ast-spec/src/expression/literal/BooleanLiteral/spec.ts +++ b/packages/ast-spec/src/expression/literal/BooleanLiteral/spec.ts @@ -1,8 +1,6 @@ -import type { AST_NODE_TYPES } from '../../../ast-node-types'; import type { LiteralBase } from '../../../base/LiteralBase'; export interface BooleanLiteral extends LiteralBase { - type: AST_NODE_TYPES.Literal; value: boolean; raw: 'false' | 'true'; } diff --git a/packages/ast-spec/src/expression/literal/NullLiteral/spec.ts b/packages/ast-spec/src/expression/literal/NullLiteral/spec.ts index f520b7b3d454..03ff8a43c866 100644 --- a/packages/ast-spec/src/expression/literal/NullLiteral/spec.ts +++ b/packages/ast-spec/src/expression/literal/NullLiteral/spec.ts @@ -1,8 +1,6 @@ -import type { AST_NODE_TYPES } from '../../../ast-node-types'; import type { LiteralBase } from '../../../base/LiteralBase'; export interface NullLiteral extends LiteralBase { - type: AST_NODE_TYPES.Literal; value: null; raw: 'null'; } diff --git a/packages/ast-spec/src/expression/literal/NumberLiteral/spec.ts b/packages/ast-spec/src/expression/literal/NumberLiteral/spec.ts index 8155bb45cafc..5a6cc12a59c1 100644 --- a/packages/ast-spec/src/expression/literal/NumberLiteral/spec.ts +++ b/packages/ast-spec/src/expression/literal/NumberLiteral/spec.ts @@ -1,7 +1,5 @@ -import type { AST_NODE_TYPES } from '../../../ast-node-types'; import type { LiteralBase } from '../../../base/LiteralBase'; export interface NumberLiteral extends LiteralBase { - type: AST_NODE_TYPES.Literal; value: number; } diff --git a/packages/ast-spec/src/expression/literal/RegExpLiteral/spec.ts b/packages/ast-spec/src/expression/literal/RegExpLiteral/spec.ts index ab45f651b768..f72b53c7956b 100644 --- a/packages/ast-spec/src/expression/literal/RegExpLiteral/spec.ts +++ b/packages/ast-spec/src/expression/literal/RegExpLiteral/spec.ts @@ -1,8 +1,6 @@ -import type { AST_NODE_TYPES } from '../../../ast-node-types'; import type { LiteralBase } from '../../../base/LiteralBase'; export interface RegExpLiteral extends LiteralBase { - type: AST_NODE_TYPES.Literal; value: RegExp | null; regex: { pattern: string; diff --git a/packages/ast-spec/src/expression/literal/StringLiteral/spec.ts b/packages/ast-spec/src/expression/literal/StringLiteral/spec.ts index de83d9d20e1d..32734f443e29 100644 --- a/packages/ast-spec/src/expression/literal/StringLiteral/spec.ts +++ b/packages/ast-spec/src/expression/literal/StringLiteral/spec.ts @@ -1,7 +1,5 @@ -import type { AST_NODE_TYPES } from '../../../ast-node-types'; import type { LiteralBase } from '../../../base/LiteralBase'; export interface StringLiteral extends LiteralBase { - type: AST_NODE_TYPES.Literal; value: string; } From 463e768978731d019345f6552d7fd7a073a80192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Fri, 3 Sep 2021 19:47:46 +0200 Subject: [PATCH 321/473] fix(ast-spec): remove duplicate union types from `Expression` (#3770) --- packages/ast-spec/src/unions/Expression.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/ast-spec/src/unions/Expression.ts b/packages/ast-spec/src/unions/Expression.ts index fd1a14b114e2..5359dc9c69c7 100644 --- a/packages/ast-spec/src/unions/Expression.ts +++ b/packages/ast-spec/src/unions/Expression.ts @@ -50,10 +50,8 @@ export type Expression = | CallExpression | ChainExpression | ClassExpression - | ClassExpression | ConditionalExpression | FunctionExpression - | FunctionExpression | Identifier | ImportExpression | JSXElement From bb72fd64157260289dd6941da122d6c2ae91bba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Strnad?= <43024885+vostrnad@users.noreply.github.com> Date: Fri, 3 Sep 2021 19:52:47 +0200 Subject: [PATCH 322/473] chore(eslint-plugin): fix missing periods in rule messages (#3789) --- .../src/rules/consistent-indexed-object-style.ts | 2 +- .../src/rules/consistent-type-imports.ts | 11 ++++++----- .../src/rules/no-confusing-non-null-assertion.ts | 10 +++++----- .../src/rules/no-confusing-void-expression.ts | 2 +- .../eslint-plugin/src/rules/no-duplicate-imports.ts | 8 ++++---- .../eslint-plugin/src/rules/no-implicit-any-catch.ts | 4 ++-- .../eslint-plugin/src/rules/no-invalid-void-type.ts | 10 +++++----- .../src/rules/no-unnecessary-condition.ts | 8 ++++---- .../src/rules/prefer-enum-initializers.ts | 2 +- .../src/rules/prefer-return-this-type.ts | 2 +- 10 files changed, 30 insertions(+), 29 deletions(-) diff --git a/packages/eslint-plugin/src/rules/consistent-indexed-object-style.ts b/packages/eslint-plugin/src/rules/consistent-indexed-object-style.ts index a30102dd123e..fcce191b2b53 100644 --- a/packages/eslint-plugin/src/rules/consistent-indexed-object-style.ts +++ b/packages/eslint-plugin/src/rules/consistent-indexed-object-style.ts @@ -19,7 +19,7 @@ export default createRule({ recommended: false, }, messages: { - preferRecord: 'A record is preferred over an index signature', + preferRecord: 'A record is preferred over an index signature.', preferIndexSignature: 'An index signature is preferred over a record.', }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/consistent-type-imports.ts b/packages/eslint-plugin/src/rules/consistent-type-imports.ts index 795014507d06..34f264ff0c7d 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-imports.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-imports.ts @@ -61,13 +61,14 @@ export default util.createRule({ }, messages: { typeOverValue: - 'All imports in the declaration are only used as types. Use `import type`', - someImportsAreOnlyTypes: 'Imports {{typeImports}} are only used as types', - aImportIsOnlyTypes: 'Import {{typeImports}} is only used as types', + 'All imports in the declaration are only used as types. Use `import type`.', + someImportsAreOnlyTypes: + 'Imports {{typeImports}} are only used as types.', + aImportIsOnlyTypes: 'Import {{typeImports}} is only used as types.', someImportsInDecoMeta: - 'Type imports {{typeImports}} are used by decorator metadata', + 'Type imports {{typeImports}} are used by decorator metadata.', aImportInDecoMeta: - 'Type import {{typeImports}} is used by decorator metadata', + 'Type import {{typeImports}} is used by decorator metadata.', valueOverType: 'Use an `import` instead of an `import type`.', noImportTypeAnnotations: '`import()` type annotations are forbidden.', }, diff --git a/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts b/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts index bcf561b58562..446bdd25932b 100644 --- a/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts @@ -19,14 +19,14 @@ export default util.createRule({ fixable: 'code', messages: { confusingEqual: - 'Confusing combinations of non-null assertion and equal test like "a! == b", which looks very similar to not equal "a !== b"', + 'Confusing combinations of non-null assertion and equal test like "a! == b", which looks very similar to not equal "a !== b".', confusingAssign: - 'Confusing combinations of non-null assertion and equal test like "a! = b", which looks very similar to not equal "a != b"', - notNeedInEqualTest: 'Unnecessary non-null assertion (!) in equal test', + 'Confusing combinations of non-null assertion and equal test like "a! = b", which looks very similar to not equal "a != b".', + notNeedInEqualTest: 'Unnecessary non-null assertion (!) in equal test.', notNeedInAssign: - 'Unnecessary non-null assertion (!) in assignment left hand', + 'Unnecessary non-null assertion (!) in assignment left hand.', wrapUpLeft: - 'Wrap up left hand to avoid putting non-null assertion "!" and "=" together', + 'Wrap up left hand to avoid putting non-null assertion "!" and "=" together.', }, schema: [], }, diff --git a/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts b/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts index a9b715350e99..fd4e97e7360a 100644 --- a/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts +++ b/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts @@ -57,7 +57,7 @@ export default util.createRule({ invalidVoidExprReturnWrapVoid: 'Void expressions returned from a function ' + 'must be marked explicitly with the `void` operator.', - voidExprWrapVoid: 'Mark with an explicit `void` operator', + voidExprWrapVoid: 'Mark with an explicit `void` operator.', }, schema: [ { diff --git a/packages/eslint-plugin/src/rules/no-duplicate-imports.ts b/packages/eslint-plugin/src/rules/no-duplicate-imports.ts index a6f368902e38..f58ef76e5fcf 100644 --- a/packages/eslint-plugin/src/rules/no-duplicate-imports.ts +++ b/packages/eslint-plugin/src/rules/no-duplicate-imports.ts @@ -21,10 +21,10 @@ export default util.createRule({ schema: baseRule.meta.schema, messages: { ...baseRule.meta.messages, - importType: '{{module}} type import is duplicated', - importTypeAs: '{{module}} type import is duplicated as type export', - exportType: '{{module}} type export is duplicated', - exportTypeAs: '{{module}} type export is duplicated as type import', + importType: '{{module}} type import is duplicated.', + importTypeAs: '{{module}} type import is duplicated as type export.', + exportType: '{{module}} type export is duplicated.', + exportTypeAs: '{{module}} type export is duplicated as type import.', }, }, defaultOptions: [ diff --git a/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts b/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts index aed526f8ab01..fbbdf59eb31a 100644 --- a/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts +++ b/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts @@ -26,8 +26,8 @@ export default util.createRule({ }, fixable: 'code', messages: { - implicitAnyInCatch: 'Implicit any in catch clause', - explicitAnyInCatch: 'Explicit any in catch clause', + implicitAnyInCatch: 'Implicit any in catch clause.', + explicitAnyInCatch: 'Explicit any in catch clause.', suggestExplicitUnknown: 'Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct.', }, diff --git a/packages/eslint-plugin/src/rules/no-invalid-void-type.ts b/packages/eslint-plugin/src/rules/no-invalid-void-type.ts index 0dff489e585f..62c1aa679cf1 100644 --- a/packages/eslint-plugin/src/rules/no-invalid-void-type.ts +++ b/packages/eslint-plugin/src/rules/no-invalid-void-type.ts @@ -28,14 +28,14 @@ export default util.createRule<[Options], MessageIds>({ }, messages: { invalidVoidForGeneric: - '{{ generic }} may not have void as a type variable', + '{{ generic }} may not have void as a type variable.', invalidVoidNotReturnOrGeneric: - 'void is only valid as a return type or generic type variable', - invalidVoidNotReturn: 'void is only valid as a return type', + 'void is only valid as a return type or generic type variable.', + invalidVoidNotReturn: 'void is only valid as a return type.', invalidVoidNotReturnOrThisParam: - 'void is only valid as return type or type of `this` parameter', + 'void is only valid as return type or type of `this` parameter.', invalidVoidNotReturnOrThisParamOrGeneric: - 'void is only valid as a return type or generic type variable or the type of a `this` parameter', + 'void is only valid as a return type or generic type variable or the type of a `this` parameter.', }, schema: [ { diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts index 9079769c216e..5ae3f93408a5 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts @@ -121,11 +121,11 @@ export default createRule({ alwaysNullish: 'Unnecessary conditional, left-hand side of `??` operator is always `null` or `undefined`.', literalBooleanExpression: - 'Unnecessary conditional, both sides of the expression are literal values', + 'Unnecessary conditional, both sides of the expression are literal values.', noOverlapBooleanExpression: - 'Unnecessary conditional, the types have no overlap', - never: 'Unnecessary conditional, value is `never`', - neverOptionalChain: 'Unnecessary optional chain on a non-nullish value', + 'Unnecessary conditional, the types have no overlap.', + never: 'Unnecessary conditional, value is `never`.', + neverOptionalChain: 'Unnecessary optional chain on a non-nullish value.', noStrictNullCheck: 'This rule requires the `strictNullChecks` compiler option to be turned on to function correctly.', }, diff --git a/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts b/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts index 1a5c1248c89a..d87b38f7d3a6 100644 --- a/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts +++ b/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts @@ -16,7 +16,7 @@ export default util.createRule<[], MessageIds>({ }, messages: { defineInitializer: - "The value of the member '{{ name }}' should be explicitly defined", + "The value of the member '{{ name }}' should be explicitly defined.", defineInitializerSuggestion: 'Can be fixed to {{ name }} = {{ suggested }}', }, diff --git a/packages/eslint-plugin/src/rules/prefer-return-this-type.ts b/packages/eslint-plugin/src/rules/prefer-return-this-type.ts index 4287d6c5dfaa..5a41a29d0a04 100644 --- a/packages/eslint-plugin/src/rules/prefer-return-this-type.ts +++ b/packages/eslint-plugin/src/rules/prefer-return-this-type.ts @@ -27,7 +27,7 @@ export default createRule({ requiresTypeChecking: true, }, messages: { - useThisType: 'use `this` type instead.', + useThisType: 'Use `this` type instead.', }, schema: [], fixable: 'code', From b33a2ea55babc573d88d844177f4db8696f651ac Mon Sep 17 00:00:00 2001 From: Edmundo Santos Date: Fri, 3 Sep 2021 14:54:22 -0300 Subject: [PATCH 323/473] docs(typescript-estree): fix plural name for parserOptions.programs option (#3799) --- packages/typescript-estree/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/typescript-estree/README.md b/packages/typescript-estree/README.md index 9cbcb2727cfc..605836b3c692 100644 --- a/packages/typescript-estree/README.md +++ b/packages/typescript-estree/README.md @@ -209,11 +209,11 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { tsconfigRootDir?: string; /** - * Instance of a TypeScript Program object to be used for type information. + * An array of one or more instances of TypeScript Program objects to be used for type information. * This overrides any program or programs that would have been computed from the `project` option. - * All linted files must be part of the provided program. + * All linted files must be part of the provided program(s). */ - program?: import('typescript').Program; + programs?: Program[]; /** *************************************************************************************** @@ -333,7 +333,7 @@ Types for the AST produced by the parse functions. #### `createProgram(configFile, projectDirectory)` -This serves as a utility method for users of the `ParseOptions.program` feature to create a TypeScript program instance from a config file. +This serves as a utility method for users of the `ParseOptions.programs` feature to create a TypeScript program instance from a config file. ```ts declare function createProgram( From e59a17c076ea3803507369116ad15191e1e3ada8 Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Fri, 3 Sep 2021 14:55:16 -0300 Subject: [PATCH 324/473] docs(eslint-plugin): fix incorrect quote (#3810) --- .../eslint-plugin/docs/rules/no-unnecessary-type-assertion.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md index 4464b6483ef1..2851791f0b05 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md @@ -70,4 +70,4 @@ If you don't care about having no-op type assertions in your code, then you can ## Related to -- TSLint: ['no-unnecessary-type-assertion`](https://palantir.github.io/tslint/rules/no-unnecessary-type-assertion/) +- TSLint: [`no-unnecessary-type-assertion`](https://palantir.github.io/tslint/rules/no-unnecessary-type-assertion/) From 8218055d6dfd94c9e6c8645848f981d9d51ce08c Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Fri, 3 Sep 2021 14:57:19 -0300 Subject: [PATCH 325/473] fix(utils): support immutable arrays in `ReportFixFunction` (#3830) --- packages/eslint-plugin/src/rules/no-explicit-any.ts | 8 ++++---- .../eslint-plugin/src/rules/prefer-enum-initializers.ts | 3 +-- packages/experimental-utils/src/ts-eslint/Rule.ts | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-explicit-any.ts b/packages/eslint-plugin/src/rules/no-explicit-any.ts index 4e6b8c34fc1d..9df51ba3d520 100644 --- a/packages/eslint-plugin/src/rules/no-explicit-any.ts +++ b/packages/eslint-plugin/src/rules/no-explicit-any.ts @@ -1,9 +1,9 @@ import { - TSESTree, AST_NODE_TYPES, + TSESLint, + TSESTree, } from '@typescript-eslint/experimental-utils'; import * as util from '../util'; -import { TSESLint } from '@typescript-eslint/experimental-utils'; export type Options = [ { @@ -199,8 +199,8 @@ export default util.createRule({ }; if (fixToUnknown) { - fixOrSuggest.fix = (fixer => - fixer.replaceText(node, 'unknown')) as TSESLint.ReportFixFunction; + fixOrSuggest.fix = (fixer): TSESLint.RuleFix => + fixer.replaceText(node, 'unknown'); } context.report({ diff --git a/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts b/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts index d87b38f7d3a6..663caa5bedda 100644 --- a/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts +++ b/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts @@ -1,6 +1,5 @@ -import { TSESTree } from '@typescript-eslint/experimental-utils'; +import { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; import * as util from '../util'; -import { TSESLint } from '@typescript-eslint/experimental-utils'; type MessageIds = 'defineInitializer' | 'defineInitializerSuggestion'; diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index f813b9d17309..24b8fd4fa114 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -114,7 +114,7 @@ interface RuleFixer { type ReportFixFunction = ( fixer: RuleFixer, -) => null | RuleFix | RuleFix[] | IterableIterator; +) => null | RuleFix | readonly RuleFix[] | IterableIterator; type ReportSuggestionArray = ReportDescriptorBase[]; From 4a88de2c621ae645c070d995768006df8cb7e4df Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 6 Sep 2021 17:03:22 +0000 Subject: [PATCH 326/473] chore: publish v4.31.0 --- CHANGELOG.md | 21 ++++++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 16 +++++++++++++++ packages/ast-spec/package.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 | 19 ++++++++++++++++++ packages/eslint-plugin/package.json | 6 +++--- packages/experimental-utils/CHANGELOG.md | 16 +++++++++++++++ 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 ++-- 24 files changed, 167 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e844a0102464..587bb83aa715 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) + + +### Bug Fixes + +* **ast-spec:** remove duplicate union types from `Expression` ([#3770](https://github.com/typescript-eslint/typescript-eslint/issues/3770)) ([463e768](https://github.com/typescript-eslint/typescript-eslint/commit/463e768978731d019345f6552d7fd7a073a80192)) +* **utils:** support immutable arrays in `ReportFixFunction` ([#3830](https://github.com/typescript-eslint/typescript-eslint/issues/3830)) ([8218055](https://github.com/typescript-eslint/typescript-eslint/commit/8218055d6dfd94c9e6c8645848f981d9d51ce08c)) + + +### Features + +* **eslint-plugin:** [prefer-readonly-parameter-types] add option treatMethodsAsReadonly ([#3733](https://github.com/typescript-eslint/typescript-eslint/issues/3733)) ([a46e318](https://github.com/typescript-eslint/typescript-eslint/commit/a46e3182c8a0b07c914605d6d9fe28ef36a7c32a)) +* **eslint-plugin:** [restrict-template-expressions] add option to allow RegExp ([#3709](https://github.com/typescript-eslint/typescript-eslint/issues/3709)) ([363b3dc](https://github.com/typescript-eslint/typescript-eslint/commit/363b3dc4dd0dc343311c729d75935b10f9d2fd5e)) +* **eslint-plugin:** add `no-meaningless-void-operator` rule ([#3641](https://github.com/typescript-eslint/typescript-eslint/issues/3641)) ([ea40ab6](https://github.com/typescript-eslint/typescript-eslint/commit/ea40ab659351ae7cf7235ea063d42ac155b11e5f)) +* **eslint-plugin:** add extension rule `padding-line-between-statements` ([#3418](https://github.com/typescript-eslint/typescript-eslint/issues/3418)) ([f79ae9b](https://github.com/typescript-eslint/typescript-eslint/commit/f79ae9b58e82f4fddef640a34a1d7ff92b763e65)) +* **experimental-utils:** extract `isNodeOfType` out of `ast-utils`' `predicates` ([#3677](https://github.com/typescript-eslint/typescript-eslint/issues/3677)) ([4bfa437](https://github.com/typescript-eslint/typescript-eslint/commit/4bfa4375aff8f65057d4aa116e435803cbc6b464)) + + + + + # [4.30.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.3...v4.30.0) (2021-08-30) diff --git a/lerna.json b/lerna.json index 9a59e7c6919a..bcd9745966f0 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.30.0", + "version": "4.31.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index bec6a7f1f74b..9383371e9b2f 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) + + +### Bug Fixes + +* **ast-spec:** remove duplicate union types from `Expression` ([#3770](https://github.com/typescript-eslint/typescript-eslint/issues/3770)) ([463e768](https://github.com/typescript-eslint/typescript-eslint/commit/463e768978731d019345f6552d7fd7a073a80192)) + + +### Features + +* **eslint-plugin:** add extension rule `padding-line-between-statements` ([#3418](https://github.com/typescript-eslint/typescript-eslint/issues/3418)) ([f79ae9b](https://github.com/typescript-eslint/typescript-eslint/commit/f79ae9b58e82f4fddef640a34a1d7ff92b763e65)) + + + + + # [4.30.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.3...v4.30.0) (2021-08-30) diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index b0af29d0e957..b9b92b3361f6 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.30.0", + "version": "4.31.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index a704b20f06e4..73b587a00800 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.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.30.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.3...v4.30.0) (2021-08-30) **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 2b6a5a56a690..0364bccbc9bc 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.30.0", + "version": "4.31.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.30.0", + "@typescript-eslint/experimental-utils": "4.31.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index ef836910ccfd..c5e66c769339 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.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.30.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.3...v4.30.0) (2021-08-30) **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 df35db555106..5f0f25a2d312 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.30.0", + "version": "4.31.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.30.0", + "@typescript-eslint/experimental-utils": "4.31.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.30.0" + "@typescript-eslint/parser": "4.31.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index a433e2fc77eb..caae41c1f917 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) + + +### Bug Fixes + +* **utils:** support immutable arrays in `ReportFixFunction` ([#3830](https://github.com/typescript-eslint/typescript-eslint/issues/3830)) ([8218055](https://github.com/typescript-eslint/typescript-eslint/commit/8218055d6dfd94c9e6c8645848f981d9d51ce08c)) + + +### Features + +* **eslint-plugin:** [prefer-readonly-parameter-types] add option treatMethodsAsReadonly ([#3733](https://github.com/typescript-eslint/typescript-eslint/issues/3733)) ([a46e318](https://github.com/typescript-eslint/typescript-eslint/commit/a46e3182c8a0b07c914605d6d9fe28ef36a7c32a)) +* **eslint-plugin:** [restrict-template-expressions] add option to allow RegExp ([#3709](https://github.com/typescript-eslint/typescript-eslint/issues/3709)) ([363b3dc](https://github.com/typescript-eslint/typescript-eslint/commit/363b3dc4dd0dc343311c729d75935b10f9d2fd5e)) +* **eslint-plugin:** add `no-meaningless-void-operator` rule ([#3641](https://github.com/typescript-eslint/typescript-eslint/issues/3641)) ([ea40ab6](https://github.com/typescript-eslint/typescript-eslint/commit/ea40ab659351ae7cf7235ea063d42ac155b11e5f)) +* **eslint-plugin:** add extension rule `padding-line-between-statements` ([#3418](https://github.com/typescript-eslint/typescript-eslint/issues/3418)) ([f79ae9b](https://github.com/typescript-eslint/typescript-eslint/commit/f79ae9b58e82f4fddef640a34a1d7ff92b763e65)) + + + + + # [4.30.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.3...v4.30.0) (2021-08-30) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 9ac333083e52..c5c4b6a76808 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.30.0", + "version": "4.31.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.30.0", - "@typescript-eslint/scope-manager": "4.30.0", + "@typescript-eslint/experimental-utils": "4.31.0", + "@typescript-eslint/scope-manager": "4.31.0", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 6c7d3f4676f0..4124025771ad 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/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.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) + + +### Bug Fixes + +* **utils:** support immutable arrays in `ReportFixFunction` ([#3830](https://github.com/typescript-eslint/typescript-eslint/issues/3830)) ([8218055](https://github.com/typescript-eslint/typescript-eslint/commit/8218055d6dfd94c9e6c8645848f981d9d51ce08c)) + + +### Features + +* **experimental-utils:** extract `isNodeOfType` out of `ast-utils`' `predicates` ([#3677](https://github.com/typescript-eslint/typescript-eslint/issues/3677)) ([4bfa437](https://github.com/typescript-eslint/typescript-eslint/commit/4bfa4375aff8f65057d4aa116e435803cbc6b464)) + + + + + # [4.30.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.3...v4.30.0) (2021-08-30) diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 779d7f1e61b6..911ef7112905 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.30.0", + "version": "4.31.0", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.30.0", - "@typescript-eslint/types": "4.30.0", - "@typescript-eslint/typescript-estree": "4.30.0", + "@typescript-eslint/scope-manager": "4.31.0", + "@typescript-eslint/types": "4.31.0", + "@typescript-eslint/typescript-estree": "4.31.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 5f6f603f8148..42187282c959 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.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.30.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.3...v4.30.0) (2021-08-30) diff --git a/packages/parser/package.json b/packages/parser/package.json index 5e802a17872b..b5847320a1b0 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.30.0", + "version": "4.31.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.30.0", - "@typescript-eslint/types": "4.30.0", - "@typescript-eslint/typescript-estree": "4.30.0", + "@typescript-eslint/scope-manager": "4.31.0", + "@typescript-eslint/types": "4.31.0", + "@typescript-eslint/typescript-estree": "4.31.0", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.30.0", + "@typescript-eslint/experimental-utils": "4.31.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 23932d879409..f7221c1ec4c5 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.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [4.30.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.3...v4.30.0) (2021-08-30) diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 63d3a69cecbb..bf054505fe23 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.30.0", + "version": "4.31.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.30.0", - "@typescript-eslint/visitor-keys": "4.30.0" + "@typescript-eslint/types": "4.31.0", + "@typescript-eslint/visitor-keys": "4.31.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.30.0", + "@typescript-eslint/typescript-estree": "4.31.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 52a786b215ff..8c0f70d151ad 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.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [4.30.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.3...v4.30.0) (2021-08-30) diff --git a/packages/shared-fixtures/package.json b/packages/shared-fixtures/package.json index b5610cdd4378..83939580e4ea 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.30.0", + "version": "4.31.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index cb86be96ec30..50538a768c59 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.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [4.30.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.3...v4.30.0) (2021-08-30) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 6e23a521e748..18aba8b01bcd 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.30.0", + "version": "4.31.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 94a9165463b9..7406d424d1ed 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.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + # [4.30.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.3...v4.30.0) (2021-08-30) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 4366789dfa39..dbe7db1d75f0 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.30.0", + "version": "4.31.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.30.0", - "@typescript-eslint/visitor-keys": "4.30.0", + "@typescript-eslint/types": "4.31.0", + "@typescript-eslint/visitor-keys": "4.31.0", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.30.0", + "@typescript-eslint/shared-fixtures": "4.31.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 8b1f5b13d4d0..6d2b3716988a 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.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.30.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.29.3...v4.30.0) (2021-08-30) diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 90167ed5d1be..58334b5bc78c 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.30.0", + "version": "4.31.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.30.0", + "@typescript-eslint/types": "4.31.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 2006056ad32093dce292e4f02a74a1a94dbb3a0f Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 13 Sep 2021 17:03:54 +0000 Subject: [PATCH 327/473] chore: publish v4.31.1 --- CHANGELOG.md | 8 ++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.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 | 8 ++++++++ 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 ++-- 24 files changed, 127 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 587bb83aa715..ef51a83fea15 100644 --- a/CHANGELOG.md +++ b/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.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + + + + + # [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) diff --git a/lerna.json b/lerna.json index bcd9745966f0..65deabfa8f21 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.31.0", + "version": "4.31.1", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 9383371e9b2f..a38c0525db54 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + # [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index b9b92b3361f6..6e0158309241 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.31.0", + "version": "4.31.1", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 73b587a00800..0cd686727c19 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.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) **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 0364bccbc9bc..010b39765fff 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.31.0", + "version": "4.31.1", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.31.0", + "@typescript-eslint/experimental-utils": "4.31.1", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index c5e66c769339..17fa3ed37fbd 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.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) **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 5f0f25a2d312..49fab650b199 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.31.0", + "version": "4.31.1", "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.31.0", + "@typescript-eslint/experimental-utils": "4.31.1", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.31.0" + "@typescript-eslint/parser": "4.31.1" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index caae41c1f917..df1210803281 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/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.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + + + + + # [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index c5c4b6a76808..18c8e6b30f88 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.31.0", + "version": "4.31.1", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.31.0", - "@typescript-eslint/scope-manager": "4.31.0", + "@typescript-eslint/experimental-utils": "4.31.1", + "@typescript-eslint/scope-manager": "4.31.1", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 4124025771ad..d3a9c6318de3 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.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + # [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 911ef7112905..391a2e88e832 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.31.0", + "version": "4.31.1", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.31.0", - "@typescript-eslint/types": "4.31.0", - "@typescript-eslint/typescript-estree": "4.31.0", + "@typescript-eslint/scope-manager": "4.31.1", + "@typescript-eslint/types": "4.31.1", + "@typescript-eslint/typescript-estree": "4.31.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 42187282c959..839834ebfcf8 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.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index b5847320a1b0..4724d71c7d6d 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.31.0", + "version": "4.31.1", "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.31.0", - "@typescript-eslint/types": "4.31.0", - "@typescript-eslint/typescript-estree": "4.31.0", + "@typescript-eslint/scope-manager": "4.31.1", + "@typescript-eslint/types": "4.31.1", + "@typescript-eslint/typescript-estree": "4.31.1", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.31.0", + "@typescript-eslint/experimental-utils": "4.31.1", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index f7221c1ec4c5..43b8a27b23fa 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.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) **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 bf054505fe23..912d8d15ed2c 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.31.0", + "version": "4.31.1", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.31.0", - "@typescript-eslint/visitor-keys": "4.31.0" + "@typescript-eslint/types": "4.31.1", + "@typescript-eslint/visitor-keys": "4.31.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.31.0", + "@typescript-eslint/typescript-estree": "4.31.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 8c0f70d151ad..aff024cacfe4 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.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) **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 83939580e4ea..0ee5082c1803 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.31.0", + "version": "4.31.1", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 50538a768c59..2729069e0cd5 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.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 18aba8b01bcd..ff5870fb2af7 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.31.0", + "version": "4.31.1", "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 7406d424d1ed..2d33cea79f11 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.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + # [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) **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 dbe7db1d75f0..4dc0c2d9f760 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.31.0", + "version": "4.31.1", "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.31.0", - "@typescript-eslint/visitor-keys": "4.31.0", + "@typescript-eslint/types": "4.31.1", + "@typescript-eslint/visitor-keys": "4.31.1", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.31.0", + "@typescript-eslint/shared-fixtures": "4.31.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 6d2b3716988a..da1c6a27ec96 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.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.30.0...v4.31.0) (2021-09-06) **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 58334b5bc78c..55ade238f3e1 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.31.0", + "version": "4.31.1", "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.31.0", + "@typescript-eslint/types": "4.31.1", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From d8fe91a84105a67e12fa35d81c28f155ea43ef78 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Sep 2021 10:48:35 -0700 Subject: [PATCH 328/473] chore: bump husky from 7.0.1 to 7.0.2 (#3847) Bumps [husky](https://github.com/typicode/husky) from 7.0.1 to 7.0.2. - [Release notes](https://github.com/typicode/husky/releases) - [Commits](https://github.com/typicode/husky/compare/v7.0.1...v7.0.2) --- updated-dependencies: - dependency-name: husky dependency-type: direct:development update-type: version-update:semver-patch ... 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 26293b720315..e80c1ce0844e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5210,9 +5210,9 @@ humanize-ms@^1.2.1: ms "^2.0.0" husky@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.1.tgz#579f4180b5da4520263e8713cc832942b48e1f1c" - integrity sha512-gceRaITVZ+cJH9sNHqx5tFwbzlLCVxtVZcusME8JYQ8Edy5mpGDOqD8QBCdMhpyo9a+JXddnujQ4rpY2Ff9SJA== + version "7.0.2" + resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.2.tgz#21900da0f30199acca43a46c043c4ad84ae88dff" + integrity sha512-8yKEWNX4z2YsofXAMT7KvA1g8p+GxtB1ffV8XtpAEGuXNAbCV5wdNKH+qTpw8SM9fh4aMPDR+yQuKfgnreyZlg== iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" From c025a840bf236125b76fc7a7870fe21af1d934d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Sep 2021 10:48:47 -0700 Subject: [PATCH 329/473] chore: bump ts-jest from 27.0.4 to 27.0.5 (#3845) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 27.0.4 to 27.0.5. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v27.0.4...v27.0.5) --- updated-dependencies: - dependency-name: ts-jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/yarn.lock b/yarn.lock index e80c1ce0844e..4bb37a32ad03 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2828,7 +2828,7 @@ btoa-lite@^1.0.0: resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= -buffer-from@1.x, buffer-from@^1.0.0: +buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== @@ -7174,7 +7174,7 @@ mkdirp-promise@^5.0.1: dependencies: mkdirp "*" -mkdirp@*, mkdirp@1.x: +mkdirp@*: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -9334,18 +9334,16 @@ trim-off-newlines@^1.0.0: integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= ts-jest@^27.0.1: - version "27.0.4" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.4.tgz#df49683535831560ccb58f94c023d831b1b80df0" - integrity sha512-c4E1ECy9Xz2WGfTMyHbSaArlIva7Wi2p43QOMmCqjSSjHP06KXv+aT+eSY+yZMuqsMi3k7pyGsGj2q5oSl5WfQ== + version "27.0.5" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.5.tgz#0b0604e2271167ec43c12a69770f0bb65ad1b750" + integrity sha512-lIJApzfTaSSbtlksfFNHkWOzLJuuSm4faFAfo5kvzOiRAuoN4/eKxVJ2zEAho8aecE04qX6K1pAzfH5QHL1/8w== dependencies: bs-logger "0.x" - buffer-from "1.x" fast-json-stable-stringify "2.x" jest-util "^27.0.0" json5 "2.x" lodash "4.x" make-error "1.x" - mkdirp "1.x" semver "7.x" yargs-parser "20.x" From faa10e33f2aa78ff39e2dd0e1b65297dac44c6d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Sep 2021 10:48:53 -0700 Subject: [PATCH 330/473] chore: bump jest from 27.0.6 to 27.2.0 (#3880) Bumps [jest](https://github.com/facebook/jest) from 27.0.6 to 27.2.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/compare/v27.0.6...v27.2.0) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 598 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 540 insertions(+), 58 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4bb37a32ad03..086cd12260d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -811,35 +811,47 @@ jest-util "^27.0.6" slash "^3.0.0" -"@jest/core@^27.0.6": - version "27.0.6" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.6.tgz#c5f642727a0b3bf0f37c4b46c675372d0978d4a1" - integrity sha512-SsYBm3yhqOn5ZLJCtccaBcvD/ccTLCeuDv8U41WJH/V1MW5eKUkeMHT9U+Pw/v1m1AIWlnIW/eM2XzQr0rEmow== +"@jest/console@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.2.0.tgz#57f702837ec52899be58c3794dce5941c77a8b63" + integrity sha512-35z+RqsK2CCgNxn+lWyK8X4KkaDtfL4BggT7oeZ0JffIiAiEYFYPo5B67V50ZubqDS1ehBrdCR2jduFnIrZOYw== dependencies: - "@jest/console" "^27.0.6" - "@jest/reporters" "^27.0.6" - "@jest/test-result" "^27.0.6" - "@jest/transform" "^27.0.6" - "@jest/types" "^27.0.6" + "@jest/types" "^27.1.1" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^27.2.0" + jest-util "^27.2.0" + slash "^3.0.0" + +"@jest/core@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.2.0.tgz#61fc27b244e9709170ed9ffe41b006add569f1b3" + integrity sha512-E/2NHhq+VMo18DpKkoty8Sjey8Kps5Cqa88A8NP757s6JjYqPdioMuyUBhDiIOGCdQByEp0ou3jskkTszMS0nw== + dependencies: + "@jest/console" "^27.2.0" + "@jest/reporters" "^27.2.0" + "@jest/test-result" "^27.2.0" + "@jest/transform" "^27.2.0" + "@jest/types" "^27.1.1" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^27.0.6" - jest-config "^27.0.6" - jest-haste-map "^27.0.6" - jest-message-util "^27.0.6" + jest-changed-files "^27.1.1" + jest-config "^27.2.0" + jest-haste-map "^27.2.0" + jest-message-util "^27.2.0" jest-regex-util "^27.0.6" - jest-resolve "^27.0.6" - jest-resolve-dependencies "^27.0.6" - jest-runner "^27.0.6" - jest-runtime "^27.0.6" - jest-snapshot "^27.0.6" - jest-util "^27.0.6" - jest-validate "^27.0.6" - jest-watcher "^27.0.6" + jest-resolve "^27.2.0" + jest-resolve-dependencies "^27.2.0" + jest-runner "^27.2.0" + jest-runtime "^27.2.0" + jest-snapshot "^27.2.0" + jest-util "^27.2.0" + jest-validate "^27.2.0" + jest-watcher "^27.2.0" micromatch "^4.0.4" p-each-series "^2.1.0" rimraf "^3.0.0" @@ -856,6 +868,16 @@ "@types/node" "*" jest-mock "^27.0.6" +"@jest/environment@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.2.0.tgz#48d1dbfa65f8e4a5a5c6cbeb9c59d1a5c2776f6b" + integrity sha512-iPWmQI0wRIYSZX3wKu4FXHK4eIqkfq6n1DCDJS+v3uby7SOXrHvX4eiTBuEdSvtDRMTIH2kjrSkjHf/F9JIYyQ== + dependencies: + "@jest/fake-timers" "^27.2.0" + "@jest/types" "^27.1.1" + "@types/node" "*" + jest-mock "^27.1.1" + "@jest/fake-timers@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.0.6.tgz#cbad52f3fe6abe30e7acb8cd5fa3466b9588e3df" @@ -868,6 +890,18 @@ jest-mock "^27.0.6" jest-util "^27.0.6" +"@jest/fake-timers@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.2.0.tgz#560841bc21ae7fbeff0cbff8de8f5cf43ad3561d" + integrity sha512-gSu3YHvQOoVaTWYGgHFB7IYFtcF2HBzX4l7s47VcjvkUgL4/FBnE20x7TNLa3W6ABERtGd5gStSwsA8bcn+c4w== + dependencies: + "@jest/types" "^27.1.1" + "@sinonjs/fake-timers" "^7.0.2" + "@types/node" "*" + jest-message-util "^27.2.0" + jest-mock "^27.1.1" + jest-util "^27.2.0" + "@jest/globals@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.0.6.tgz#48e3903f99a4650673d8657334d13c9caf0e8f82" @@ -877,7 +911,16 @@ "@jest/types" "^27.0.6" expect "^27.0.6" -"@jest/reporters@27.0.6", "@jest/reporters@^27.0.6": +"@jest/globals@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.0.tgz#4d7085f51df5ac70c8240eb3501289676503933d" + integrity sha512-raqk9Gf9WC3hlBa57rmRmJfRl9hom2b+qEE/ifheMtwn5USH5VZxzrHHOZg0Zsd/qC2WJ8UtyTwHKQAnNlDMdg== + dependencies: + "@jest/environment" "^27.2.0" + "@jest/types" "^27.1.1" + expect "^27.2.0" + +"@jest/reporters@27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.6.tgz#91e7f2d98c002ad5df94d5b5167c1eb0b9fd5b00" integrity sha512-TIkBt09Cb2gptji3yJXb3EE+eVltW6BjO7frO7NEfjI9vSIYoISi5R3aI3KpEDXlB1xwB+97NXIqz84qYeYsfA== @@ -907,6 +950,36 @@ terminal-link "^2.0.0" v8-to-istanbul "^8.0.0" +"@jest/reporters@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.0.tgz#629886d9a42218e504a424889a293abb27919e25" + integrity sha512-7wfkE3iRTLaT0F51h1mnxH3nQVwDCdbfgXiLuCcNkF1FnxXLH9utHqkSLIiwOTV1AtmiE0YagHbOvx4rnMP/GA== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^27.2.0" + "@jest/test-result" "^27.2.0" + "@jest/transform" "^27.2.0" + "@jest/types" "^27.1.1" + chalk "^4.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.2" + graceful-fs "^4.2.4" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^4.0.3" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.0.2" + jest-haste-map "^27.2.0" + jest-resolve "^27.2.0" + jest-util "^27.2.0" + jest-worker "^27.2.0" + slash "^3.0.0" + source-map "^0.6.0" + string-length "^4.0.1" + terminal-link "^2.0.0" + v8-to-istanbul "^8.0.0" + "@jest/source-map@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.0.6.tgz#be9e9b93565d49b0548b86e232092491fb60551f" @@ -926,6 +999,16 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" +"@jest/test-result@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.2.0.tgz#377b46a41a6415dd4839fd0bed67b89fecea6b20" + integrity sha512-JPPqn8h0RGr4HyeY1Km+FivDIjTFzDROU46iAvzVjD42ooGwYoqYO/MQTilhfajdz6jpVnnphFrKZI5OYrBONA== + dependencies: + "@jest/console" "^27.2.0" + "@jest/types" "^27.1.1" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + "@jest/test-sequencer@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.6.tgz#80a913ed7a1130545b1cd777ff2735dd3af5d34b" @@ -936,6 +1019,16 @@ jest-haste-map "^27.0.6" jest-runtime "^27.0.6" +"@jest/test-sequencer@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.2.0.tgz#b02b507687825af2fdc84e90c539d36fd8cf7bc9" + integrity sha512-PrqarcpzOU1KSAK7aPwfL8nnpaqTMwPe7JBPnaOYRDSe/C6AoJiL5Kbnonqf1+DregxZIRAoDg69R9/DXMGqXA== + dependencies: + "@jest/test-result" "^27.2.0" + graceful-fs "^4.2.4" + jest-haste-map "^27.2.0" + jest-runtime "^27.2.0" + "@jest/transform@^27.0.2": version "27.0.2" resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.0.2.tgz#b073b7c589e3f4b842102468875def2bb722d6b5" @@ -978,6 +1071,27 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" +"@jest/transform@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.2.0.tgz#e7e6e49d2591792db2385c33cdbb4379d407068d" + integrity sha512-Q8Q/8xXIZYllk1AF7Ou5sV3egOZsdY/Wlv09CSbcexBRcC1Qt6lVZ7jRFAZtbHsEEzvOCyFEC4PcrwKwyjXtCg== + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^27.1.1" + babel-plugin-istanbul "^6.0.0" + chalk "^4.0.0" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.2.4" + jest-haste-map "^27.2.0" + jest-regex-util "^27.0.6" + jest-util "^27.2.0" + micromatch "^4.0.4" + pirates "^4.0.1" + slash "^3.0.0" + source-map "^0.6.1" + write-file-atomic "^3.0.0" + "@jest/types@^27.0.2": version "27.0.2" resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.0.2.tgz#e153d6c46bda0f2589f0702b071f9898c7bbd37e" @@ -1000,6 +1114,17 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" +"@jest/types@^27.1.1": + version "27.1.1" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.1.1.tgz#77a3fc014f906c65752d12123a0134359707c0ad" + integrity sha512-yqJPDDseb0mXgKqmNqypCsb85C22K1aY5+LUxh7syIM9n/b0AsaltxNy+o6tt29VcfGDpYEve175bm3uOhcehA== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^16.0.0" + chalk "^4.0.0" + "@lerna/add@3.21.0": version "3.21.0" resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.21.0.tgz#27007bde71cc7b0a2969ab3c2f0ae41578b4577b" @@ -2675,6 +2800,20 @@ babel-jest@^27.0.6: graceful-fs "^4.2.4" slash "^3.0.0" +babel-jest@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.2.0.tgz#c0f129a81f1197028aeb4447acbc04564c8bfc52" + integrity sha512-bS2p+KGGVVmWXBa8+i6SO/xzpiz2Q/2LnqLbQknPKefWXVZ67YIjA4iXup/jMOEZplga9PpWn+wrdb3UdDwRaA== + dependencies: + "@jest/transform" "^27.2.0" + "@jest/types" "^27.1.1" + "@types/babel__core" "^7.1.14" + babel-plugin-istanbul "^6.0.0" + babel-preset-jest "^27.2.0" + chalk "^4.0.0" + graceful-fs "^4.2.4" + slash "^3.0.0" + babel-plugin-istanbul@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765" @@ -2696,6 +2835,16 @@ babel-plugin-jest-hoist@^27.0.6: "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" +babel-plugin-jest-hoist@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.2.0.tgz#79f37d43f7e5c4fdc4b2ca3e10cc6cf545626277" + integrity sha512-TOux9khNKdi64mW+0OIhcmbAn75tTlzKhxmiNXevQaPbrBYK7YKjP1jl6NHTJ6XR5UgUrJbCnWlKVnJn29dfjw== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.0.0" + "@types/babel__traverse" "^7.0.6" + babel-preset-current-node-syntax@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" @@ -2722,6 +2871,14 @@ babel-preset-jest@^27.0.6: babel-plugin-jest-hoist "^27.0.6" babel-preset-current-node-syntax "^1.0.0" +babel-preset-jest@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.2.0.tgz#556bbbf340608fed5670ab0ea0c8ef2449fba885" + integrity sha512-z7MgQ3peBwN5L5aCqBKnF6iqdlvZvFUQynEhu0J+X9nHLU72jO3iY331lcYrg+AssJ8q7xsv5/3AICzVmJ/wvg== + dependencies: + babel-plugin-jest-hoist "^27.2.0" + babel-preset-current-node-syntax "^1.0.0" + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -4360,6 +4517,18 @@ expect@^27.0.6: jest-message-util "^27.0.6" jest-regex-util "^27.0.6" +expect@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.0.tgz#40eb89a492afb726a3929ccf3611ee0799ab976f" + integrity sha512-oOTbawMQv7AK1FZURbPTgGSzmhxkjFzoARSvDjOMnOpeWuYQx1tP6rXu9MIX5mrACmyCAM7fSNP8IJO2f1p0CQ== + dependencies: + "@jest/types" "^27.1.1" + ansi-styles "^5.0.0" + jest-get-type "^27.0.6" + jest-matcher-utils "^27.2.0" + jest-message-util "^27.2.0" + jest-regex-util "^27.0.6" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -5806,12 +5975,12 @@ jake@^10.6.1: filelist "^1.0.1" minimatch "^3.0.4" -jest-changed-files@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.0.6.tgz#bed6183fcdea8a285482e3b50a9a7712d49a7a8b" - integrity sha512-BuL/ZDauaq5dumYh5y20sn4IISnf1P9A0TDswTxUi84ORGtVa86ApuBHqICL0vepqAnZiY6a7xeSPWv2/yy4eA== +jest-changed-files@^27.1.1: + version "27.1.1" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.1.1.tgz#9b3f67a34cc58e3e811e2e1e21529837653e4200" + integrity sha512-5TV9+fYlC2A6hu3qtoyGHprBwCAn0AuGA77bZdUgYvVlRMjHXo063VcWTEAyx6XAZ85DYHqp0+aHKbPlfRDRvA== dependencies: - "@jest/types" "^27.0.6" + "@jest/types" "^27.1.1" execa "^5.0.0" throat "^6.0.1" @@ -5840,25 +6009,50 @@ jest-circus@^27.0.6: stack-utils "^2.0.3" throat "^6.0.1" -jest-cli@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.6.tgz#d021e5f4d86d6a212450d4c7b86cb219f1e6864f" - integrity sha512-qUUVlGb9fdKir3RDE+B10ULI+LQrz+MCflEH2UJyoUjoHHCbxDrMxSzjQAPUMsic4SncI62ofYCcAvW6+6rhhg== +jest-circus@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.2.0.tgz#ad0d6d75514050f539d422bae41344224d2328f9" + integrity sha512-WwENhaZwOARB1nmcboYPSv/PwHBUGRpA4MEgszjr9DLCl97MYw0qZprBwLb7rNzvMwfIvNGG7pefQ5rxyBlzIA== dependencies: - "@jest/core" "^27.0.6" - "@jest/test-result" "^27.0.6" - "@jest/types" "^27.0.6" + "@jest/environment" "^27.2.0" + "@jest/test-result" "^27.2.0" + "@jest/types" "^27.1.1" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + dedent "^0.7.0" + expect "^27.2.0" + is-generator-fn "^2.0.0" + jest-each "^27.2.0" + jest-matcher-utils "^27.2.0" + jest-message-util "^27.2.0" + jest-runtime "^27.2.0" + jest-snapshot "^27.2.0" + jest-util "^27.2.0" + pretty-format "^27.2.0" + slash "^3.0.0" + stack-utils "^2.0.3" + throat "^6.0.1" + +jest-cli@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.2.0.tgz#6da5ecca5bd757e20449f5ec1f1cad5b0303d16b" + integrity sha512-bq1X/B/b1kT9y1zIFMEW3GFRX1HEhFybiqKdbxM+j11XMMYSbU9WezfyWIhrSOmPT+iODLATVjfsCnbQs7cfIA== + dependencies: + "@jest/core" "^27.2.0" + "@jest/test-result" "^27.2.0" + "@jest/types" "^27.1.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.0.6" - jest-util "^27.0.6" - jest-validate "^27.0.6" + jest-config "^27.2.0" + jest-util "^27.2.0" + jest-validate "^27.2.0" prompts "^2.0.1" yargs "^16.0.3" -jest-config@27.0.6, jest-config@^27.0.6: +jest-config@27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.6.tgz#119fb10f149ba63d9c50621baa4f1f179500277f" integrity sha512-JZRR3I1Plr2YxPBhgqRspDE2S5zprbga3swYNrvY3HfQGu7p/GjyLOqwrYad97tX3U3mzT53TPHVmozacfP/3w== @@ -5885,7 +6079,34 @@ jest-config@27.0.6, jest-config@^27.0.6: micromatch "^4.0.4" pretty-format "^27.0.6" -jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6: +jest-config@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.2.0.tgz#d1c359253927005c53d11ab3e50d3b2f402a673a" + integrity sha512-Z1romHpxeNwLxQtouQ4xt07bY6HSFGKTo0xJcvOK3u6uJHveA4LB2P+ty9ArBLpTh3AqqPxsyw9l9GMnWBYS9A== + dependencies: + "@babel/core" "^7.1.0" + "@jest/test-sequencer" "^27.2.0" + "@jest/types" "^27.1.1" + babel-jest "^27.2.0" + chalk "^4.0.0" + deepmerge "^4.2.2" + glob "^7.1.1" + graceful-fs "^4.2.4" + is-ci "^3.0.0" + jest-circus "^27.2.0" + jest-environment-jsdom "^27.2.0" + jest-environment-node "^27.2.0" + jest-get-type "^27.0.6" + jest-jasmine2 "^27.2.0" + jest-regex-util "^27.0.6" + jest-resolve "^27.2.0" + jest-runner "^27.2.0" + jest-util "^27.2.0" + jest-validate "^27.2.0" + micromatch "^4.0.4" + pretty-format "^27.2.0" + +jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6, jest-diff@^27.2.0: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.6.tgz#4a7a19ee6f04ad70e0e3388f35829394a44c7b5e" integrity sha512-Z1mqgkTCSYaFgwTlP/NUiRzdqgxmmhzHY1Tq17zL94morOHfHu3K4bgSgl+CR4GLhpV8VxkuOYuIWnQ9LnFqmg== @@ -5913,6 +6134,17 @@ jest-each@^27.0.6: jest-util "^27.0.6" pretty-format "^27.0.6" +jest-each@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.2.0.tgz#4c531c7223de289429fc7b2473a86e653c86d61f" + integrity sha512-biDmmUQjg+HZOB7MfY2RHSFL3j418nMoC3TK3pGAj880fQQSxvQe1y2Wy23JJJNUlk6YXiGU0yWy86Le1HBPmA== + dependencies: + "@jest/types" "^27.1.1" + chalk "^4.0.0" + jest-get-type "^27.0.6" + jest-util "^27.2.0" + pretty-format "^27.2.0" + jest-environment-jsdom@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.0.6.tgz#f66426c4c9950807d0a9f209c590ce544f73291f" @@ -5926,6 +6158,19 @@ jest-environment-jsdom@^27.0.6: jest-util "^27.0.6" jsdom "^16.6.0" +jest-environment-jsdom@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.2.0.tgz#c654dfae50ca2272c2a2e2bb95ff0af298283a3c" + integrity sha512-wNQJi6Rd/AkUWqTc4gWhuTIFPo7tlMK0RPZXeM6AqRHZA3D3vwvTa9ktAktyVyWYmUoXdYstOfyYMG3w4jt7eA== + dependencies: + "@jest/environment" "^27.2.0" + "@jest/fake-timers" "^27.2.0" + "@jest/types" "^27.1.1" + "@types/node" "*" + jest-mock "^27.1.1" + jest-util "^27.2.0" + jsdom "^16.6.0" + jest-environment-node@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.0.6.tgz#a6699b7ceb52e8d68138b9808b0c404e505f3e07" @@ -5938,6 +6183,18 @@ jest-environment-node@^27.0.6: jest-mock "^27.0.6" jest-util "^27.0.6" +jest-environment-node@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.2.0.tgz#73ef2151cb62206669becb94cd84f33276252de5" + integrity sha512-WbW+vdM4u88iy6Q3ftUEQOSgMPtSgjm3qixYYK2AKEuqmFO2zmACTw1vFUB0qI/QN88X6hA6ZkVKIdIWWzz+yg== + dependencies: + "@jest/environment" "^27.2.0" + "@jest/fake-timers" "^27.2.0" + "@jest/types" "^27.1.1" + "@types/node" "*" + jest-mock "^27.1.1" + jest-util "^27.2.0" + jest-get-type@^27.0.1: version "27.0.1" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.1.tgz#34951e2b08c8801eb28559d7eb732b04bbcf7815" @@ -5988,6 +6245,26 @@ jest-haste-map@^27.0.6: optionalDependencies: fsevents "^2.3.2" +jest-haste-map@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.2.0.tgz#703b3a473e3f2e27d75ab07864ffd7bbaad0d75e" + integrity sha512-laFet7QkNlWjwZtMGHCucLvF8o9PAh2cgePRck1+uadSM4E4XH9J4gnx4do+a6do8ZV5XHNEAXEkIoNg5XUH2Q== + dependencies: + "@jest/types" "^27.1.1" + "@types/graceful-fs" "^4.1.2" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.4" + jest-regex-util "^27.0.6" + jest-serializer "^27.0.6" + jest-util "^27.2.0" + jest-worker "^27.2.0" + micromatch "^4.0.4" + walker "^1.0.7" + optionalDependencies: + fsevents "^2.3.2" + jest-jasmine2@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.6.tgz#fd509a9ed3d92bd6edb68a779f4738b100655b37" @@ -6012,6 +6289,30 @@ jest-jasmine2@^27.0.6: pretty-format "^27.0.6" throat "^6.0.1" +jest-jasmine2@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.2.0.tgz#1ece0ee37c348b59ed3dfcfe509fc24e3377b12d" + integrity sha512-NcPzZBk6IkDW3Z2V8orGueheGJJYfT5P0zI/vTO/Jp+R9KluUdgFrgwfvZ0A34Kw6HKgiWFILZmh3oQ/eS+UxA== + dependencies: + "@babel/traverse" "^7.1.0" + "@jest/environment" "^27.2.0" + "@jest/source-map" "^27.0.6" + "@jest/test-result" "^27.2.0" + "@jest/types" "^27.1.1" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + expect "^27.2.0" + is-generator-fn "^2.0.0" + jest-each "^27.2.0" + jest-matcher-utils "^27.2.0" + jest-message-util "^27.2.0" + jest-runtime "^27.2.0" + jest-snapshot "^27.2.0" + jest-util "^27.2.0" + pretty-format "^27.2.0" + throat "^6.0.1" + jest-leak-detector@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.0.6.tgz#545854275f85450d4ef4b8fe305ca2a26450450f" @@ -6020,6 +6321,14 @@ jest-leak-detector@^27.0.6: jest-get-type "^27.0.6" pretty-format "^27.0.6" +jest-leak-detector@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.2.0.tgz#9a7ca2dad1a21c4e49ad2a8ad7f1214ffdb86a28" + integrity sha512-e91BIEmbZw5+MHkB4Hnrq7S86coTxUMCkz4n7DLmQYvl9pEKmRx9H/JFH87bBqbIU5B2Ju1soKxRWX6/eGFGpA== + dependencies: + jest-get-type "^27.0.6" + pretty-format "^27.2.0" + jest-matcher-utils@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.0.2.tgz#f14c060605a95a466cdc759acc546c6f4cbfc4f0" @@ -6040,6 +6349,16 @@ jest-matcher-utils@^27.0.6: jest-get-type "^27.0.6" pretty-format "^27.0.6" +jest-matcher-utils@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.2.0.tgz#b4d224ab88655d5fab64b96b989ac349e2f5da43" + integrity sha512-F+LG3iTwJ0gPjxBX6HCyrARFXq6jjiqhwBQeskkJQgSLeF1j6ui1RTV08SR7O51XTUhtc8zqpDj8iCG4RGmdKw== + dependencies: + chalk "^4.0.0" + jest-diff "^27.2.0" + jest-get-type "^27.0.6" + pretty-format "^27.2.0" + jest-message-util@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.0.2.tgz#181c9b67dff504d8f4ad15cba10d8b80f272048c" @@ -6070,6 +6389,21 @@ jest-message-util@^27.0.6: slash "^3.0.0" stack-utils "^2.0.3" +jest-message-util@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.2.0.tgz#2f65c71df55267208686b1d7514e18106c91ceaf" + integrity sha512-y+sfT/94CiP8rKXgwCOzO1mUazIEdEhrLjuiu+RKmCP+8O/TJTSne9dqQRbFIHBtlR2+q7cddJlWGir8UATu5w== + dependencies: + "@babel/code-frame" "^7.12.13" + "@jest/types" "^27.1.1" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.4" + micromatch "^4.0.4" + pretty-format "^27.2.0" + slash "^3.0.0" + stack-utils "^2.0.3" + jest-mock@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.0.6.tgz#0efdd40851398307ba16778728f6d34d583e3467" @@ -6078,6 +6412,14 @@ jest-mock@^27.0.6: "@jest/types" "^27.0.6" "@types/node" "*" +jest-mock@^27.1.1: + version "27.1.1" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.1.1.tgz#c7a2e81301fdcf3dab114931d23d89ec9d0c3a82" + integrity sha512-SClsFKuYBf+6SSi8jtAYOuPw8DDMsTElUWEae3zq7vDhH01ayVSIHUSIa8UgbDOUalCFp6gNsaikN0rbxN4dbw== + dependencies: + "@jest/types" "^27.1.1" + "@types/node" "*" + jest-pnp-resolver@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" @@ -6093,14 +6435,14 @@ jest-regex-util@^27.0.6: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5" integrity sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ== -jest-resolve-dependencies@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.6.tgz#3e619e0ef391c3ecfcf6ef4056207a3d2be3269f" - integrity sha512-mg9x9DS3BPAREWKCAoyg3QucCr0n6S8HEEsqRCKSPjPcu9HzRILzhdzY3imsLoZWeosEbJZz6TKasveczzpJZA== +jest-resolve-dependencies@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.2.0.tgz#b56a1aab95b0fd21e0a69a15fda985c05f902b8a" + integrity sha512-EY5jc/Y0oxn+oVEEldTidmmdVoZaknKPyDORA012JUdqPyqPL+lNdRyI3pGti0RCydds6coaw6xt4JQY54dKsg== dependencies: - "@jest/types" "^27.0.6" + "@jest/types" "^27.1.1" jest-regex-util "^27.0.6" - jest-snapshot "^27.0.6" + jest-snapshot "^27.2.0" jest-resolve@27.0.6, jest-resolve@^27.0.6: version "27.0.6" @@ -6132,6 +6474,22 @@ jest-resolve@^27.0.2: resolve "^1.20.0" slash "^3.0.0" +jest-resolve@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.2.0.tgz#f5d053693ab3806ec2f778e6df8b0aa4cfaef95f" + integrity sha512-v09p9Ib/VtpHM6Cz+i9lEAv1Z/M5NVxsyghRHRMEUOqwPQs3zwTdwp1xS3O/k5LocjKiGS0OTaJoBSpjbM2Jlw== + dependencies: + "@jest/types" "^27.1.1" + chalk "^4.0.0" + escalade "^3.1.1" + graceful-fs "^4.2.4" + jest-haste-map "^27.2.0" + jest-pnp-resolver "^1.2.2" + jest-util "^27.2.0" + jest-validate "^27.2.0" + resolve "^1.20.0" + slash "^3.0.0" + jest-runner@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.6.tgz#1325f45055539222bbc7256a6976e993ad2f9520" @@ -6160,6 +6518,34 @@ jest-runner@^27.0.6: source-map-support "^0.5.6" throat "^6.0.1" +jest-runner@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.2.0.tgz#281b255d88a473aebc0b5cb46e58a83a1251cab3" + integrity sha512-Cl+BHpduIc0cIVTjwoyx0pQk4Br8gn+wkr35PmKCmzEdOUnQ2wN7QVXA8vXnMQXSlFkN/+KWnk20TAVBmhgrww== + dependencies: + "@jest/console" "^27.2.0" + "@jest/environment" "^27.2.0" + "@jest/test-result" "^27.2.0" + "@jest/transform" "^27.2.0" + "@jest/types" "^27.1.1" + "@types/node" "*" + chalk "^4.0.0" + emittery "^0.8.1" + exit "^0.1.2" + graceful-fs "^4.2.4" + jest-docblock "^27.0.6" + jest-environment-jsdom "^27.2.0" + jest-environment-node "^27.2.0" + jest-haste-map "^27.2.0" + jest-leak-detector "^27.2.0" + jest-message-util "^27.2.0" + jest-resolve "^27.2.0" + jest-runtime "^27.2.0" + jest-util "^27.2.0" + jest-worker "^27.2.0" + source-map-support "^0.5.6" + throat "^6.0.1" + jest-runtime@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.6.tgz#45877cfcd386afdd4f317def551fc369794c27c9" @@ -6192,6 +6578,39 @@ jest-runtime@^27.0.6: strip-bom "^4.0.0" yargs "^16.0.3" +jest-runtime@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.2.0.tgz#998295ccd80008b3031eeb5cc60e801e8551024b" + integrity sha512-6gRE9AVVX49hgBbWQ9PcNDeM4upMUXzTpBs0kmbrjyotyUyIJixLPsYjpeTFwAA07PVLDei1iAm2chmWycdGdQ== + dependencies: + "@jest/console" "^27.2.0" + "@jest/environment" "^27.2.0" + "@jest/fake-timers" "^27.2.0" + "@jest/globals" "^27.2.0" + "@jest/source-map" "^27.0.6" + "@jest/test-result" "^27.2.0" + "@jest/transform" "^27.2.0" + "@jest/types" "^27.1.1" + "@types/yargs" "^16.0.0" + chalk "^4.0.0" + cjs-module-lexer "^1.0.0" + collect-v8-coverage "^1.0.0" + execa "^5.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.4" + jest-haste-map "^27.2.0" + jest-message-util "^27.2.0" + jest-mock "^27.1.1" + jest-regex-util "^27.0.6" + jest-resolve "^27.2.0" + jest-snapshot "^27.2.0" + jest-util "^27.2.0" + jest-validate "^27.2.0" + slash "^3.0.0" + strip-bom "^4.0.0" + yargs "^16.0.3" + jest-serializer@^27.0.1: version "27.0.1" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.0.1.tgz#2464d04dcc33fb71dc80b7c82e3c5e8a08cb1020" @@ -6268,6 +6687,36 @@ jest-snapshot@^27.0.6: pretty-format "^27.0.6" semver "^7.3.2" +jest-snapshot@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.2.0.tgz#7961e7107ac666a46fbb23e7bb48ce0b8c6a9285" + integrity sha512-MukJvy3KEqemCT2FoT3Gum37CQqso/62PKTfIzWmZVTsLsuyxQmJd2PI5KPcBYFqLlA8LgZLHM8ZlazkVt8LsQ== + dependencies: + "@babel/core" "^7.7.2" + "@babel/generator" "^7.7.2" + "@babel/parser" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/traverse" "^7.7.2" + "@babel/types" "^7.0.0" + "@jest/transform" "^27.2.0" + "@jest/types" "^27.1.1" + "@types/babel__traverse" "^7.0.4" + "@types/prettier" "^2.1.5" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^27.2.0" + graceful-fs "^4.2.4" + jest-diff "^27.2.0" + jest-get-type "^27.0.6" + jest-haste-map "^27.2.0" + jest-matcher-utils "^27.2.0" + jest-message-util "^27.2.0" + jest-resolve "^27.2.0" + jest-util "^27.2.0" + natural-compare "^1.4.0" + pretty-format "^27.2.0" + semver "^7.3.2" + jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/jest-specific-snapshot/-/jest-specific-snapshot-5.0.0.tgz#48f72d5613af7f3e30df75b6b3534db6bab32ea0" @@ -6287,6 +6736,18 @@ jest-util@27.0.6, jest-util@^27.0.0, jest-util@^27.0.2, jest-util@^27.0.6: is-ci "^3.0.0" picomatch "^2.2.3" +jest-util@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.2.0.tgz#bfccb85cfafae752257319e825a5b8d4ada470dc" + integrity sha512-T5ZJCNeFpqcLBpx+Hl9r9KoxBCUqeWlJ1Htli+vryigZVJ1vuLB9j35grEBASp4R13KFkV7jM52bBGnArpJN6A== + dependencies: + "@jest/types" "^27.1.1" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^3.0.0" + picomatch "^2.2.3" + jest-validate@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.0.2.tgz#7fe2c100089449cd5cbb47a5b0b6cb7cda5beee5" @@ -6311,17 +6772,29 @@ jest-validate@^27.0.6: leven "^3.1.0" pretty-format "^27.0.6" -jest-watcher@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.0.6.tgz#89526f7f9edf1eac4e4be989bcb6dec6b8878d9c" - integrity sha512-/jIoKBhAP00/iMGnTwUBLgvxkn7vsOweDrOTSPzc7X9uOyUtJIDthQBTI1EXz90bdkrxorUZVhJwiB69gcHtYQ== +jest-validate@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.2.0.tgz#b7535f12d95dd3b4382831f4047384ca098642ab" + integrity sha512-uIEZGkFKk3+4liA81Xu0maG5aGDyPLdp+4ed244c+Ql0k3aLWQYcMbaMLXOIFcb83LPHzYzqQ8hwNnIxTqfAGQ== dependencies: - "@jest/test-result" "^27.0.6" - "@jest/types" "^27.0.6" + "@jest/types" "^27.1.1" + camelcase "^6.2.0" + chalk "^4.0.0" + jest-get-type "^27.0.6" + leven "^3.1.0" + pretty-format "^27.2.0" + +jest-watcher@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.2.0.tgz#dc2eef4c13c6d41cebf3f1fc5f900a54b51c2ea0" + integrity sha512-SjRWhnr+qO8aBsrcnYIyF+qRxNZk6MZH8TIDgvi+VlsyrvOyqg0d+Rm/v9KHiTtC9mGGeFi9BFqgavyWib6xLg== + dependencies: + "@jest/test-result" "^27.2.0" + "@jest/types" "^27.1.1" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.0.6" + jest-util "^27.2.0" string-length "^4.0.1" jest-worker@^27.0.2: @@ -6342,14 +6815,23 @@ jest-worker@^27.0.6: merge-stream "^2.0.0" supports-color "^8.0.0" +jest-worker@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.2.0.tgz#11eef39f1c88f41384ca235c2f48fe50bc229bc0" + integrity sha512-laB0ZVIBz+voh/QQy9dmUuuDsadixeerrKqyVpgPz+CCWiOYjOBabUXHIXZhsdvkWbLqSHbgkAHWl5cg24Q6RA== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + jest@^27.0.3: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.6.tgz#10517b2a628f0409087fbf473db44777d7a04505" - integrity sha512-EjV8aETrsD0wHl7CKMibKwQNQc3gIRBXlTikBmmHUeVMKaPFxdcUIBfoDqTSXDoGJIivAYGqCWVlzCSaVjPQsA== + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-27.2.0.tgz#3bc329287d699d26361e2094919630eefdf1ac0d" + integrity sha512-oUqVXyvh5YwEWl263KWdPUAqEzBFzGHdFLQ05hUnITr1tH+9SscEI9A/GH9eBClA+Nw1ct+KNuuOV6wlnmBPcg== dependencies: - "@jest/core" "^27.0.6" + "@jest/core" "^27.2.0" import-local "^3.0.2" - jest-cli "^27.0.6" + jest-cli "^27.2.0" jju@~1.4.0: version "1.4.0" @@ -7990,7 +8472,7 @@ prettier@2.3.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== -pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6: +pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6, pretty-format@^27.2.0: version "27.0.6" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.6.tgz#ab770c47b2c6f893a21aefc57b75da63ef49a11f" integrity sha512-8tGD7gBIENgzqA+UBzObyWqQ5B778VIFZA/S66cclyd5YkFLYs2Js7gxDKf0MXtTc9zcS7t1xhdfcElJ3YIvkQ== From d9c518d4690af11ecca74b607b7ff087cb2d11fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Sep 2021 10:49:01 -0700 Subject: [PATCH 331/473] chore: bump axios from 0.21.1 to 0.21.4 (#3879) Bumps [axios](https://github.com/axios/axios) from 0.21.1 to 0.21.4. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.21.1...v0.21.4) --- updated-dependencies: - dependency-name: axios dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 086cd12260d2..5ba007683326 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2780,11 +2780,11 @@ aws4@^1.8.0: integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== axios@^0.21.1: - version "0.21.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" - integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== dependencies: - follow-redirects "^1.10.0" + follow-redirects "^1.14.0" babel-jest@^27.0.6: version "27.0.6" @@ -4772,10 +4772,10 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" -follow-redirects@^1.10.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43" - integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg== +follow-redirects@^1.14.0: + version "1.14.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.3.tgz#6ada78118d8d24caee595595accdc0ac6abd022e" + integrity sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw== for-in@^1.0.2: version "1.0.2" From b1df8179c64ce9b013f751eb6281b2ffac0229af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Sep 2021 10:49:10 -0700 Subject: [PATCH 332/473] chore: bump @babel/types from 7.15.0 to 7.15.6 (#3876) Bumps [@babel/types](https://github.com/babel/babel/tree/HEAD/packages/babel-types) from 7.15.0 to 7.15.6. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.15.6/packages/babel-types) --- updated-dependencies: - dependency-name: "@babel/types" dependency-type: direct:development update-type: version-update:semver-patch ... 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 5ba007683326..b999c1b3b091 100644 --- a/yarn.lock +++ b/yarn.lock @@ -301,9 +301,9 @@ globals "^11.1.0" "@babel/types@*", "@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.12", "@babel/types@^7.14.0", "@babel/types@^7.14.2", "@babel/types@^7.14.4", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.0.tgz#61af11f2286c4e9c69ca8deb5f4375a73c72dcbd" - integrity sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ== + version "7.15.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.6.tgz#99abdc48218b2881c058dd0a7ab05b99c9be758f" + integrity sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig== dependencies: "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" From eee47d0f90d84cbc0deef1601097e88728945ab1 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 20 Sep 2021 17:03:51 +0000 Subject: [PATCH 333/473] chore: publish v4.31.2 --- CHANGELOG.md | 8 ++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.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 | 8 ++++++++ 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 ++-- 24 files changed, 127 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef51a83fea15..d94553bb0936 100644 --- a/CHANGELOG.md +++ b/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.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + + + + + ## [4.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) **Note:** Version bump only for package @typescript-eslint/typescript-eslint diff --git a/lerna.json b/lerna.json index 65deabfa8f21..b2c599ea7509 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.31.1", + "version": "4.31.2", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index a38c0525db54..62a359784061 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + ## [4.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 6e0158309241..4dc5ed6e7313 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.31.1", + "version": "4.31.2", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 0cd686727c19..8ebd34fe72d1 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.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) **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 010b39765fff..672744314a49 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.31.1", + "version": "4.31.2", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.31.1", + "@typescript-eslint/experimental-utils": "4.31.2", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 17fa3ed37fbd..ef2a3e4042cb 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.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) **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 49fab650b199..da344e836d93 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.31.1", + "version": "4.31.2", "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.31.1", + "@typescript-eslint/experimental-utils": "4.31.2", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.31.1" + "@typescript-eslint/parser": "4.31.2" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index df1210803281..8c99e9fce56b 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/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.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + + + + + ## [4.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 18c8e6b30f88..0235818f1663 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.31.1", + "version": "4.31.2", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.31.1", - "@typescript-eslint/scope-manager": "4.31.1", + "@typescript-eslint/experimental-utils": "4.31.2", + "@typescript-eslint/scope-manager": "4.31.2", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index d3a9c6318de3..0b8fafa0d2be 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.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + ## [4.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) **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 391a2e88e832..5f011a169ee7 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.31.1", + "version": "4.31.2", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.31.1", - "@typescript-eslint/types": "4.31.1", - "@typescript-eslint/typescript-estree": "4.31.1", + "@typescript-eslint/scope-manager": "4.31.2", + "@typescript-eslint/types": "4.31.2", + "@typescript-eslint/typescript-estree": "4.31.2", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 839834ebfcf8..efb5da204891 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.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + ## [4.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 4724d71c7d6d..8a463e8cec9c 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.31.1", + "version": "4.31.2", "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.31.1", - "@typescript-eslint/types": "4.31.1", - "@typescript-eslint/typescript-estree": "4.31.1", + "@typescript-eslint/scope-manager": "4.31.2", + "@typescript-eslint/types": "4.31.2", + "@typescript-eslint/typescript-estree": "4.31.2", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.31.1", + "@typescript-eslint/experimental-utils": "4.31.2", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 43b8a27b23fa..5662feb7769e 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.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + ## [4.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) **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 912d8d15ed2c..c83b24422aa9 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.31.1", + "version": "4.31.2", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.31.1", - "@typescript-eslint/visitor-keys": "4.31.1" + "@typescript-eslint/types": "4.31.2", + "@typescript-eslint/visitor-keys": "4.31.2" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.31.1", + "@typescript-eslint/typescript-estree": "4.31.2", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index aff024cacfe4..c4af0f153f0e 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.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) **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 0ee5082c1803..ccad5ff03a23 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.31.1", + "version": "4.31.2", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 2729069e0cd5..f9567e3da2ac 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.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + ## [4.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index ff5870fb2af7..99ae47c74284 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.31.1", + "version": "4.31.2", "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 2d33cea79f11..8c0ced40e8c1 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.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + ## [4.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) **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 4dc0c2d9f760..6dd84a221247 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.31.1", + "version": "4.31.2", "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.31.1", - "@typescript-eslint/visitor-keys": "4.31.1", + "@typescript-eslint/types": "4.31.2", + "@typescript-eslint/visitor-keys": "4.31.2", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.31.1", + "@typescript-eslint/shared-fixtures": "4.31.2", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index da1c6a27ec96..ab8eb606e431 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.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.31.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.0...v4.31.1) (2021-09-13) **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 55ade238f3e1..6b99e6cc6121 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.31.1", + "version": "4.31.2", "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.31.1", + "@typescript-eslint/types": "4.31.2", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From cf1e49b08fd5d6648536c8e4a3742a174c6e94f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 10:35:38 -0700 Subject: [PATCH 334/473] chore: bump cspell from 5.9.0 to 5.10.1 (#3902) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.9.0 to 5.10.1. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/compare/v5.9.0...v5.10.1) --- updated-dependencies: - dependency-name: cspell dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 118 +++++++++++++++++++++++++----------------------------- 1 file changed, 55 insertions(+), 63 deletions(-) diff --git a/yarn.lock b/yarn.lock index b999c1b3b091..0073378806a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -461,10 +461,10 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.9.0": - version "5.9.0" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.9.0.tgz#4afef125ddedf13d43bb4114fdfcc3b42450e91e" - integrity sha512-qI/MVTYjGh0Uhhx2YiqCIodfazHojcwJx6yzNkQQXZN7px0rGUPsRPiPx83LuHl1aE+APc5x8cblCwnnZUbPxg== +"@cspell/cspell-bundled-dicts@^5.10.1": + version "5.10.1" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.10.1.tgz#31108cf2ef630d28601113191bc00a5278650900" + integrity sha512-4NXeyTMXsl0bV6tIG7N6LAeATkBIGCjQEuh9fNjGduOYCXn3HgTSNgOSdgdlLnnLt2zwvoFtwHDU1vXCDN8IrQ== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" @@ -475,10 +475,10 @@ "@cspell/dict-csharp" "^1.0.11" "@cspell/dict-css" "^1.0.12" "@cspell/dict-django" "^1.0.26" - "@cspell/dict-dotnet" "^1.0.30" + "@cspell/dict-dotnet" "^1.0.31" "@cspell/dict-elixir" "^1.0.25" "@cspell/dict-en-gb" "^1.1.33" - "@cspell/dict-en_us" "^2.0.2" + "@cspell/dict-en_us" "^2.1.1" "@cspell/dict-filetypes" "^1.1.8" "@cspell/dict-fonts" "^1.0.14" "@cspell/dict-fullstack" "^1.0.38" @@ -499,13 +499,13 @@ "@cspell/dict-ruby" "^1.0.14" "@cspell/dict-rust" "^1.0.23" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.41" + "@cspell/dict-software-terms" "^1.0.42" "@cspell/dict-typescript" "^1.0.19" -"@cspell/cspell-types@^5.9.0": - version "5.9.0" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.9.0.tgz#1d74c2cb191f9dc7d899364a3ac366d00df181d8" - integrity sha512-S3O/4CNTTljQmWZpbBrG8IHPg9zWQ5rYpQ0tc9zoM1q/RzZev8xc55rggRu3IqtkwzyZUjVFo8apwQF5UZHXMg== +"@cspell/cspell-types@^5.10.0": + version "5.10.0" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.10.0.tgz#edf94262b763be67ca5e0b870930604bcc1de413" + integrity sha512-jssGvbGGfAKwrCetyBuFHrSC/8OIYF4fNXLkUQDiftHj/V5YOpAuRE57EzH2nGLkQ1pGGD5fjvLuYYDU1ZcioQ== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -552,10 +552,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-django/-/dict-django-1.0.26.tgz#b97ce0112fbe8c3c3ada0387c68971b5e27483ab" integrity sha512-mn9bd7Et1L2zuibc08GVHTiD2Go3/hdjyX5KLukXDklBkq06r+tb0OtKtf1zKodtFDTIaYekGADhNhA6AnKLkg== -"@cspell/dict-dotnet@^1.0.30": - version "1.0.30" - resolved "https://registry.yarnpkg.com/@cspell/dict-dotnet/-/dict-dotnet-1.0.30.tgz#0e80294fe2894b65d059130115a54c33adcb76f8" - integrity sha512-86kC5191GACB95IGtLnmYHZjuNl/Ee7lvZRcwEyvktoYiRAryd1YKSX+c/qU1OEx7Y52FTaEl07tf9uYS1wKNQ== +"@cspell/dict-dotnet@^1.0.31": + version "1.0.31" + resolved "https://registry.yarnpkg.com/@cspell/dict-dotnet/-/dict-dotnet-1.0.31.tgz#31d2f2602ddd6be038e00148860162d2b44d56e0" + integrity sha512-65yZTMcEdYkNx9sNs18OxcE0zfbZ5VsAZ0KgDvl/1YCkTomxr9vmtnrzFz4+vxfjV4eSuaL1SPRMZODaM7SSTg== "@cspell/dict-elixir@^1.0.25": version "1.0.25" @@ -567,10 +567,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.33.tgz#7f1fd90fc364a5cb77111b5438fc9fcf9cc6da0e" integrity sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g== -"@cspell/dict-en_us@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-2.0.2.tgz#9087b99ef9efa9e77d1b2546feb454e4067cbaac" - integrity sha512-g6TL4ynWHoxVKvQ0kdiMCbh4+FeXwmHFTL/dWgQbyfy6cqKXjsOqPK0OPVFIbqI5rV8QeBx5IH6ny/q/XQOvXQ== +"@cspell/dict-en_us@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-2.1.1.tgz#3db0fec45a821ad66747e42d303d2448d37a158e" + integrity sha512-7kHOqve9DVFsb1e/wKME3CZhj48zOqvXNaA1Cd82ZkaHf3aL7pUBx3cxI7Xopj/dcK1ZkhUKh+2nBxPIWIibNg== "@cspell/dict-filetypes@^1.1.8": version "1.1.8" @@ -672,10 +672,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.41": - version "1.0.41" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.41.tgz#c8b9ca8e8891e09c2e55afd889bde38f6d7b109a" - integrity sha512-/RWiv99XoDUYh3eCo5PyF2nwDh0U8kuKmSW+UXpzbT4sj7oBl/la19h6Ahgq0Qmr0JGjTF/RxbQkz85Hcp1t5w== +"@cspell/dict-software-terms@^1.0.42": + version "1.0.42" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.42.tgz#748b7d4b33182b2fbf51924f3242e3b9c03affb4" + integrity sha512-VRIq7b6NnWVHeO0pzpHT10btQNYcRCyiSZc162xGlyO8+IMXq9Noemyqv+POS9oRknhtlF0rL1Hrg4ypHP3B+w== "@cspell/dict-typescript@^1.0.19": version "1.0.19" @@ -3392,10 +3392,10 @@ commander@^7.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -commander@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-8.1.0.tgz#db36e3e66edf24ff591d639862c6ab2c52664362" - integrity sha512-mf45ldcuHSYShkplHHGKWb4TrmwQadxOn7v4WuhDJy0ZVoY5JFajaRDKD0PNe5qXzBX0rhovjTnP6Kz9LETcuA== +commander@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.2.0.tgz#37fe2bde301d87d47a53adeff8b5915db1381ca8" + integrity sha512-LLKxDvHeL91/8MIyTAD5BFMNtoIwztGPMiM/7Bl8rIPmHCZXRxmSWr91h57dpOpnQ6jIUqEWdXE/uBYMfiVZDA== commander@~8.0.0: version "8.0.0" @@ -3694,35 +3694,32 @@ 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.9.0: - version "5.9.0" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.9.0.tgz#ecb493cd3e12ea9cbefe4aca1cb9e86638825288" - integrity sha512-4yhDg/oJpujKNOIX6EBmeb935vyBVXgd0SVb7AR183En9lTUPkT7PR4lTYKxolNs3/z4Ajx+xwA8DORW7E5Rtw== +cspell-glob@^5.10.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.10.0.tgz#04c1ed153fedc2b9bfaafbef4efb4865fbd65893" + integrity sha512-aMt4OxvrdP1QM7rhsOvmkmdKmMY1oq11iHwEf/e/XCezmkab61QJaSM+oGk2Io+xKjdJrJVKOnkikxfQtyP6vw== dependencies: micromatch "^4.0.4" -cspell-io@^5.9.0: - version "5.9.0" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.9.0.tgz#f74867e43823965ddd3018920b1dddf71fe27d60" - integrity sha512-T+JO9RZrgW9StS6pg2yVQfNpR503lCzPCLM/24lBykPChaXOk2VTGiBa5TPu7qKRxP9x9p7zHLiawlTkgfIjzQ== - dependencies: - iconv-lite "^0.6.3" - iterable-to-stream "^2.0.0" +cspell-io@^5.10.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.10.0.tgz#5bfe04d5c924aa808d5129034e572b587ada90ef" + integrity sha512-vOJ44cGueqd6GWCmJSAeZ/GbmgJiZdGcvS0mkDhBW3CS5+L8ZH3NItSiH70H/zZUAPCelkyqoJP2zj0MxSVqXA== -cspell-lib@^5.9.0: - version "5.9.0" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.9.0.tgz#2efec17a98ac4b7e2da294fac747f236a820a125" - integrity sha512-86SsD7lOAu9ia5j2o7tBUIUrTrAjwEjMgP96+bE8NdSCArjvnY7FiTkes7AHGZ9g3KhluMEaDKhzJhK0TaZenQ== +cspell-lib@^5.10.1: + version "5.10.1" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.10.1.tgz#e91ac9caa4101c62634b6be149041e1f41c0bf60" + integrity sha512-Oaa+jP90dP1ipeRqoYIGCkgiVg4O4ZzGQr9qGHY1QMu62aknIURo2tzkH6HHtofRRodazGxW0VYl9XAscvOLAA== dependencies: - "@cspell/cspell-bundled-dicts" "^5.9.0" - "@cspell/cspell-types" "^5.9.0" + "@cspell/cspell-bundled-dicts" "^5.10.1" + "@cspell/cspell-types" "^5.10.0" clear-module "^4.1.1" comment-json "^4.1.1" configstore "^5.0.1" cosmiconfig "^7.0.1" - cspell-glob "^5.9.0" - cspell-io "^5.9.0" - cspell-trie-lib "^5.9.0" + cspell-glob "^5.10.0" + cspell-io "^5.10.0" + cspell-trie-lib "^5.10.1" find-up "^5.0.0" fs-extra "^10.0.0" gensequence "^3.1.1" @@ -3731,24 +3728,24 @@ cspell-lib@^5.9.0: resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.9.0: - version "5.9.0" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.9.0.tgz#ca857a7468fa443bf6a9de4143849e770ca70a48" - integrity sha512-/m0kgxYuLyxeZGjajVC/oxrbi2zpv+1boKSjHBElPrE8MytDgdBgdCojsYAYNAl30QEF4GtxB+q0NlWV4laLdA== +cspell-trie-lib@^5.10.1: + version "5.10.1" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.10.1.tgz#5c083e108bc054cb40093698cf61235bc1097188" + integrity sha512-pDlMM4aNBA8pwc6aZTtClr//e2kwyl7bLBRJ8aG608EICzHphfH8Hl0qopnFWCGvr3h52slYyOVuQ/frAcC4dg== dependencies: fs-extra "^10.0.0" gensequence "^3.1.1" cspell@^5.5.2: - version "5.9.0" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.9.0.tgz#2db3c85a9b0bf68bb4d49b0f72e35325a68170c3" - integrity sha512-TrPg5fmdd09S+alS8HjRvYPFBd8Qoxb8XxWGrH3JDsQGA7m6EljGcNjR6Mh19mMP5cQVOv7XmwEMy/EqwaHWTA== + version "5.10.1" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.10.1.tgz#dfbada1536db121342a4606d9a027e3839844be4" + integrity sha512-jTj8gErwM+B0VnB2YULQ2ABHEc4Ch2udSnFoVRBGWRYKVqXYuRdqpX58j/UA9ByeDqXhx7Hoqg/1Q6vsHAJdZQ== dependencies: chalk "^4.1.2" - commander "^8.1.0" + commander "^8.2.0" comment-json "^4.1.1" - cspell-glob "^5.9.0" - cspell-lib "^5.9.0" + cspell-glob "^5.10.0" + cspell-lib "^5.10.1" fs-extra "^10.0.0" get-stdin "^8.0.0" glob "^7.1.7" @@ -5390,7 +5387,7 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.6.2, iconv-lite@^0.6.3: +iconv-lite@^0.6.2: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== @@ -5960,11 +5957,6 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -iterable-to-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/iterable-to-stream/-/iterable-to-stream-2.0.0.tgz#8cc654ab9b1011dc138e681fee2c0f0bb3cc7e3c" - integrity sha512-efkLePxXjJk92hvN+2rS3tGJTRn8/tqXjmZvPI6LQ29xCj2sUF4zW8hkMsVe3jpTkxtMZ89xsKnz9FaRqNWM6g== - jake@^10.6.1: version "10.8.2" resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.2.tgz#ebc9de8558160a66d82d0eadc6a2e58fbc500a7b" From 0877adc200482c8b453581575173d18fa234a617 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 10:35:51 -0700 Subject: [PATCH 335/473] chore: bump node-fetch from 2.6.1 to 3.0.0 (#3905) Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 3.0.0. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md) - [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v3.0.0) --- updated-dependencies: - dependency-name: node-fetch dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2e42c438b868..3020db95dc4f 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,7 @@ "lint-staged": "^11.0.0", "make-dir": "^3.1.0", "markdownlint-cli": "^0.28.1", - "node-fetch": "^2.6.1", + "node-fetch": "^3.0.0", "prettier": "2.3.2", "pretty-format": "^27.0.2", "rimraf": "^3.0.2", diff --git a/yarn.lock b/yarn.lock index 0073378806a2..621cecc0bfc2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3828,6 +3828,11 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +data-uri-to-buffer@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" + integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== + data-urls@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -4632,6 +4637,13 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +fetch-blob@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.1.2.tgz#6bc438675f3851ecea51758ac91f6a1cd1bacabd" + integrity sha512-hunJbvy/6OLjCD0uuhLdp0mMPzP/yd2ssd1t2FCJsaA7wkWhpbp9xfuNVpv7Ll4jFhzp6T4LAupSiV9uOeg0VQ== + dependencies: + web-streams-polyfill "^3.0.3" + figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.2" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" @@ -7757,11 +7769,19 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" -node-fetch@^2.3.0, node-fetch@^2.5.0, node-fetch@^2.6.0, node-fetch@^2.6.1: +node-fetch@^2.3.0, node-fetch@^2.5.0, node-fetch@^2.6.0: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== +node-fetch@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.0.0.tgz#79da7146a520036f2c5f644e4a26095f17e411ea" + integrity sha512-bKMI+C7/T/SPU1lKnbQbwxptpCrG9ashG+VkytmXCPZyuM9jB6VU+hY0oi4lC8LxTtAeWdckNCTa3nrGsAdA3Q== + dependencies: + data-uri-to-buffer "^3.0.1" + fetch-blob "^3.1.2" + node-gyp@^5.0.2: version "5.1.1" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e" @@ -10181,6 +10201,11 @@ wcwidth@^1.0.0: dependencies: defaults "^1.0.3" +web-streams-polyfill@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.1.1.tgz#1516f2d4ea8f1bdbfed15eb65cb2df87098c8364" + integrity sha512-Czi3fG883e96T4DLEPRvufrF2ydhOOW1+1a6c3gNjH2aIh50DNFBdfwh2AKoOf1rXvpvavAoA11Qdq9+BKjE0Q== + webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" From 5c74b1b174696e540d50bd3e8f71e31246061206 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 10:36:03 -0700 Subject: [PATCH 336/473] chore: bump @types/lodash from 4.14.172 to 4.14.173 (#3904) Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.172 to 4.14.173. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) --- updated-dependencies: - dependency-name: "@types/lodash" dependency-type: direct:development update-type: version-update:semver-patch ... 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 621cecc0bfc2..f87b7ffb3e23 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2298,9 +2298,9 @@ integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= "@types/lodash@*", "@types/lodash@^4.14.170": - version "4.14.172" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.172.tgz#aad774c28e7bfd7a67de25408e03ee5a8c3d028a" - integrity sha512-/BHF5HAx3em7/KkzVKm3LrsD6HZAXuXO1AJZQ3cRRBZj4oHZDviWPYu0aEplAqDFNHZPW6d3G7KN+ONcCCC7pw== + version "4.14.173" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.173.tgz#9d3b674c67a26cf673756f6aca7b429f237f91ed" + integrity sha512-vv0CAYoaEjCw/mLy96GBTnRoZrSxkGE0BKzKimdR8P3OzrNYNvBgtW7p055A+E8C31vXNUhWKoFCbhq7gbyhFg== "@types/marked@*", "@types/marked@^2.0.3": version "2.0.4" From aee798205e72398bc496c78a8a5dc376d6ae9ae9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 12:08:17 -0700 Subject: [PATCH 337/473] chore: bump @microsoft/api-extractor from 7.18.7 to 7.18.9 (#3908) Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack) from 7.18.7 to 7.18.9. - [Release notes](https://github.com/microsoft/rushstack/releases) - [Commits](https://github.com/microsoft/rushstack/compare/@microsoft/api-extractor_v7.18.7...@microsoft/api-extractor_v7.18.9) --- updated-dependencies: - dependency-name: "@microsoft/api-extractor" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/yarn.lock b/yarn.lock index f87b7ffb3e23..fe936b8fca19 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1810,24 +1810,24 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@microsoft/api-extractor-model@7.13.5": - version "7.13.5" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.5.tgz#7836a81ba47b9a654062ed0361e4eee69afae51e" - integrity sha512-il6AebNltYo5hEtqXZw4DMvrwBPn6+F58TxwqmsLY+U+sSJNxaYn2jYksArrjErXVPR3gUgRMqD6zsdIkg+WEQ== +"@microsoft/api-extractor-model@7.13.7": + version "7.13.7" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.7.tgz#2ae0948cb7458b336694c458675717ef8a9dcc85" + integrity sha512-emwhcaSF/h3WdqBWps4UU0RtGOGzy53IsplxuoLwtCuMAx3namYvJSfUGa5ajGPBao4MCyRYGsMc3EZ6IdR8cQ== dependencies: "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.40.0" + "@rushstack/node-core-library" "3.40.2" "@microsoft/api-extractor@^7.15.2": - version "7.18.7" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.7.tgz#851d2413a3c5d696f7cc914eb59de7a7882b2e8b" - integrity sha512-JhtV8LoyLuIecbgCPyZQg08G1kngIRWpai2UzwNil9mGVGYiDZVeeKx8c2phmlPcogmMDm4oQROxyuiYt5sJiw== + version "7.18.9" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.9.tgz#82f50f8791bfacd5e3dd5d9400cdb6d69a499249" + integrity sha512-N+fbG+6SwA1i6EW3iGRp/nAT8vQpRSDvZ1DzBUr8xIS7tNfJ0C75ndPPziUT8EmalhLixRnIw6Ncmur8AFELRg== dependencies: - "@microsoft/api-extractor-model" "7.13.5" + "@microsoft/api-extractor-model" "7.13.7" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.40.0" + "@rushstack/node-core-library" "3.40.2" "@rushstack/rig-package" "0.3.0" "@rushstack/ts-command-line" "4.9.0" colors "~1.2.1" @@ -2101,10 +2101,10 @@ dependencies: "@types/node" ">= 8" -"@rushstack/node-core-library@3.40.0": - version "3.40.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.40.0.tgz#2551915ea34e34ec2abb7172b9d7f4546144d9d4" - integrity sha512-P6uMPI7cqTdawLSPAG5BQrBu1MHlGRPqecp7ruIRgyukIEzkmh0QAnje4jAL/l1r3hw0qe4e+Dz5ZSnukT/Egg== +"@rushstack/node-core-library@3.40.2": + version "3.40.2" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.40.2.tgz#71d92180f14bafd212f720b2cfe8892e688159b6" + integrity sha512-wzcRucwnhOENTfx6hZ2M+CA1Zmp8Dr572mFFtjxmcQzBWTbNFRB1Mi1wLb7DLza+69OUBoSZcHUqydlwL+gvSA== dependencies: "@types/node" "10.17.13" colors "~1.2.1" From 3f038bf90f0c3d2e884c2d70bf90f44d26e69fe0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 12:08:26 -0700 Subject: [PATCH 338/473] chore: bump jest from 27.2.0 to 27.2.1 (#3911) Bumps [jest](https://github.com/facebook/jest) from 27.2.0 to 27.2.1. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/compare/v27.2.0...v27.2.1) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 194 +++++++++++++++++++++++++++--------------------------- 1 file changed, 97 insertions(+), 97 deletions(-) diff --git a/yarn.lock b/yarn.lock index fe936b8fca19..bcff08ea2c33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -823,15 +823,15 @@ jest-util "^27.2.0" slash "^3.0.0" -"@jest/core@^27.2.0": - version "27.2.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.2.0.tgz#61fc27b244e9709170ed9ffe41b006add569f1b3" - integrity sha512-E/2NHhq+VMo18DpKkoty8Sjey8Kps5Cqa88A8NP757s6JjYqPdioMuyUBhDiIOGCdQByEp0ou3jskkTszMS0nw== +"@jest/core@^27.2.1": + version "27.2.1" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.2.1.tgz#93dc50e2aaba2c944e5765cf658dcd98d804c970" + integrity sha512-XcGt9UgPyzylThvezwUIMCNVp8xxN78Ic3WwhJZehZt4n2hPHR6Bd85A1nKFZBeqW58Vd+Cx/LaN6YL4n58KlA== dependencies: "@jest/console" "^27.2.0" - "@jest/reporters" "^27.2.0" + "@jest/reporters" "^27.2.1" "@jest/test-result" "^27.2.0" - "@jest/transform" "^27.2.0" + "@jest/transform" "^27.2.1" "@jest/types" "^27.1.1" "@types/node" "*" ansi-escapes "^4.2.1" @@ -840,15 +840,15 @@ exit "^0.1.2" graceful-fs "^4.2.4" jest-changed-files "^27.1.1" - jest-config "^27.2.0" + jest-config "^27.2.1" jest-haste-map "^27.2.0" jest-message-util "^27.2.0" jest-regex-util "^27.0.6" jest-resolve "^27.2.0" - jest-resolve-dependencies "^27.2.0" - jest-runner "^27.2.0" - jest-runtime "^27.2.0" - jest-snapshot "^27.2.0" + jest-resolve-dependencies "^27.2.1" + jest-runner "^27.2.1" + jest-runtime "^27.2.1" + jest-snapshot "^27.2.1" jest-util "^27.2.0" jest-validate "^27.2.0" jest-watcher "^27.2.0" @@ -911,14 +911,14 @@ "@jest/types" "^27.0.6" expect "^27.0.6" -"@jest/globals@^27.2.0": - version "27.2.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.0.tgz#4d7085f51df5ac70c8240eb3501289676503933d" - integrity sha512-raqk9Gf9WC3hlBa57rmRmJfRl9hom2b+qEE/ifheMtwn5USH5VZxzrHHOZg0Zsd/qC2WJ8UtyTwHKQAnNlDMdg== +"@jest/globals@^27.2.1": + version "27.2.1" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.1.tgz#6842c70b6713fbe2fcaf89eac20d77eeeb0e282c" + integrity sha512-4P46Zr4cckSitsWtOMRvgMMn7mOKbBsQdYxHeGSIG3kpI4gNR2vk51balPulZHnBQCQb/XBptprtoSv1REfaew== dependencies: "@jest/environment" "^27.2.0" "@jest/types" "^27.1.1" - expect "^27.2.0" + expect "^27.2.1" "@jest/reporters@27.0.6": version "27.0.6" @@ -950,15 +950,15 @@ terminal-link "^2.0.0" v8-to-istanbul "^8.0.0" -"@jest/reporters@^27.2.0": - version "27.2.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.0.tgz#629886d9a42218e504a424889a293abb27919e25" - integrity sha512-7wfkE3iRTLaT0F51h1mnxH3nQVwDCdbfgXiLuCcNkF1FnxXLH9utHqkSLIiwOTV1AtmiE0YagHbOvx4rnMP/GA== +"@jest/reporters@^27.2.1": + version "27.2.1" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.1.tgz#2e43361b962e26975d40eafd7b4f14c70b4fe9a0" + integrity sha512-ILqR+bIIBlhaHjDtQR/0Z20YkKAQVM+NVRuJLaWFCoRx/rKQQSxG01ZLiLV0MsA6wkBHf6J9fzFuXp0k5l7epw== dependencies: "@bcoe/v8-coverage" "^0.2.3" "@jest/console" "^27.2.0" "@jest/test-result" "^27.2.0" - "@jest/transform" "^27.2.0" + "@jest/transform" "^27.2.1" "@jest/types" "^27.1.1" chalk "^4.0.0" collect-v8-coverage "^1.0.0" @@ -1019,15 +1019,15 @@ jest-haste-map "^27.0.6" jest-runtime "^27.0.6" -"@jest/test-sequencer@^27.2.0": - version "27.2.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.2.0.tgz#b02b507687825af2fdc84e90c539d36fd8cf7bc9" - integrity sha512-PrqarcpzOU1KSAK7aPwfL8nnpaqTMwPe7JBPnaOYRDSe/C6AoJiL5Kbnonqf1+DregxZIRAoDg69R9/DXMGqXA== +"@jest/test-sequencer@^27.2.1": + version "27.2.1" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.2.1.tgz#1682cd3a16198fa358ff9565b0d2792919f36562" + integrity sha512-fWcEgWQXgvU4DFY5YHfQsGwqfJWyuCUzdOzLZTYtyLB3WK1mFPQGYAszM7mCEZjyVon5XRuCa+2/+hif/uMucQ== dependencies: "@jest/test-result" "^27.2.0" graceful-fs "^4.2.4" jest-haste-map "^27.2.0" - jest-runtime "^27.2.0" + jest-runtime "^27.2.1" "@jest/transform@^27.0.2": version "27.0.2" @@ -1071,10 +1071,10 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/transform@^27.2.0": - version "27.2.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.2.0.tgz#e7e6e49d2591792db2385c33cdbb4379d407068d" - integrity sha512-Q8Q/8xXIZYllk1AF7Ou5sV3egOZsdY/Wlv09CSbcexBRcC1Qt6lVZ7jRFAZtbHsEEzvOCyFEC4PcrwKwyjXtCg== +"@jest/transform@^27.2.1": + version "27.2.1" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.2.1.tgz#743443adb84b3b7419951fc702515ce20ba6285e" + integrity sha512-xmB5vh81KK8DiiCMtI5vI59mP+GggNmc9BiN+fg4mKdQHV369+WuZc1Lq2xWFCOCsRPHt24D9h7Idp4YaMB1Ww== dependencies: "@babel/core" "^7.1.0" "@jest/types" "^27.1.1" @@ -2800,12 +2800,12 @@ babel-jest@^27.0.6: graceful-fs "^4.2.4" slash "^3.0.0" -babel-jest@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.2.0.tgz#c0f129a81f1197028aeb4447acbc04564c8bfc52" - integrity sha512-bS2p+KGGVVmWXBa8+i6SO/xzpiz2Q/2LnqLbQknPKefWXVZ67YIjA4iXup/jMOEZplga9PpWn+wrdb3UdDwRaA== +babel-jest@^27.2.1: + version "27.2.1" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.2.1.tgz#48edfa5cf8d59ab293da94321a369ccc7b67a4b1" + integrity sha512-kkaekSJHew1zfDW3cA2QiSBPg4uiLpiW0OwJKqFv0r2/mFgym/IBn7hxPntL6FvS66G/ROh+lz4pRiCJAH1/UQ== dependencies: - "@jest/transform" "^27.2.0" + "@jest/transform" "^27.2.1" "@jest/types" "^27.1.1" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.0.0" @@ -4519,10 +4519,10 @@ expect@^27.0.6: jest-message-util "^27.0.6" jest-regex-util "^27.0.6" -expect@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.0.tgz#40eb89a492afb726a3929ccf3611ee0799ab976f" - integrity sha512-oOTbawMQv7AK1FZURbPTgGSzmhxkjFzoARSvDjOMnOpeWuYQx1tP6rXu9MIX5mrACmyCAM7fSNP8IJO2f1p0CQ== +expect@^27.2.1: + version "27.2.1" + resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.1.tgz#5f882b308716618613f0106a488b46c303908157" + integrity sha512-ekOA2mBtT2phxcoPVHCXIzbJxCvRXhx2fr7m28IgGdZxUOh8UvxvoRz1FcPlfgZMpE92biHB6woIcAKXqR28hA== dependencies: "@jest/types" "^27.1.1" ansi-styles "^5.0.0" @@ -6013,10 +6013,10 @@ jest-circus@^27.0.6: stack-utils "^2.0.3" throat "^6.0.1" -jest-circus@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.2.0.tgz#ad0d6d75514050f539d422bae41344224d2328f9" - integrity sha512-WwENhaZwOARB1nmcboYPSv/PwHBUGRpA4MEgszjr9DLCl97MYw0qZprBwLb7rNzvMwfIvNGG7pefQ5rxyBlzIA== +jest-circus@^27.2.1: + version "27.2.1" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.2.1.tgz#c5166052b328c0df932cdaf89f5982085e7b4812" + integrity sha512-9q/8X8DgJmW8IqXsJNnS2E28iarx990hf6D+frS3P0lB+avhFDD33alLwZzKgm45u0wvEi6iFh43WjNbp5fhjw== dependencies: "@jest/environment" "^27.2.0" "@jest/test-result" "^27.2.0" @@ -6025,32 +6025,32 @@ jest-circus@^27.2.0: chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" - expect "^27.2.0" + expect "^27.2.1" is-generator-fn "^2.0.0" jest-each "^27.2.0" jest-matcher-utils "^27.2.0" jest-message-util "^27.2.0" - jest-runtime "^27.2.0" - jest-snapshot "^27.2.0" + jest-runtime "^27.2.1" + jest-snapshot "^27.2.1" jest-util "^27.2.0" pretty-format "^27.2.0" slash "^3.0.0" stack-utils "^2.0.3" throat "^6.0.1" -jest-cli@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.2.0.tgz#6da5ecca5bd757e20449f5ec1f1cad5b0303d16b" - integrity sha512-bq1X/B/b1kT9y1zIFMEW3GFRX1HEhFybiqKdbxM+j11XMMYSbU9WezfyWIhrSOmPT+iODLATVjfsCnbQs7cfIA== +jest-cli@^27.2.1: + version "27.2.1" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.2.1.tgz#031e887245945864cc6ed8605c939f1937858c09" + integrity sha512-IfxuGkBZS/ogY7yFvvD1dFidzQRXlSBHtUZQ3UTIHydzNMF4/ZRTdGFso6HkbCkemwLh4hnNybONexEqWmYwjw== dependencies: - "@jest/core" "^27.2.0" + "@jest/core" "^27.2.1" "@jest/test-result" "^27.2.0" "@jest/types" "^27.1.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.2.0" + jest-config "^27.2.1" jest-util "^27.2.0" jest-validate "^27.2.0" prompts "^2.0.1" @@ -6083,28 +6083,28 @@ jest-config@27.0.6: micromatch "^4.0.4" pretty-format "^27.0.6" -jest-config@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.2.0.tgz#d1c359253927005c53d11ab3e50d3b2f402a673a" - integrity sha512-Z1romHpxeNwLxQtouQ4xt07bY6HSFGKTo0xJcvOK3u6uJHveA4LB2P+ty9ArBLpTh3AqqPxsyw9l9GMnWBYS9A== +jest-config@^27.2.1: + version "27.2.1" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.2.1.tgz#2e727e023fc4b77a9f067a40c5448a939aa8386b" + integrity sha512-BAOemP8udmFw9nkgaLAac7vXORdvrt4yrJWoh7uYb0nPZeSsu0kGwJU18SwtY4paq9fed5OgAssC3A+Bf4WMQA== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.2.0" + "@jest/test-sequencer" "^27.2.1" "@jest/types" "^27.1.1" - babel-jest "^27.2.0" + babel-jest "^27.2.1" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" is-ci "^3.0.0" - jest-circus "^27.2.0" + jest-circus "^27.2.1" jest-environment-jsdom "^27.2.0" jest-environment-node "^27.2.0" jest-get-type "^27.0.6" - jest-jasmine2 "^27.2.0" + jest-jasmine2 "^27.2.1" jest-regex-util "^27.0.6" jest-resolve "^27.2.0" - jest-runner "^27.2.0" + jest-runner "^27.2.1" jest-util "^27.2.0" jest-validate "^27.2.0" micromatch "^4.0.4" @@ -6293,10 +6293,10 @@ jest-jasmine2@^27.0.6: pretty-format "^27.0.6" throat "^6.0.1" -jest-jasmine2@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.2.0.tgz#1ece0ee37c348b59ed3dfcfe509fc24e3377b12d" - integrity sha512-NcPzZBk6IkDW3Z2V8orGueheGJJYfT5P0zI/vTO/Jp+R9KluUdgFrgwfvZ0A34Kw6HKgiWFILZmh3oQ/eS+UxA== +jest-jasmine2@^27.2.1: + version "27.2.1" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.2.1.tgz#30ee71f38670a621ecf3b6dcb89875933f780de6" + integrity sha512-3vytj3+S49+XYsxGJyjlchDo4xblYzjDY4XK7pV2IAdspbMFOpmeNMOeDonYuvlbUtcV8yrFLA6XtliXapDmMA== dependencies: "@babel/traverse" "^7.1.0" "@jest/environment" "^27.2.0" @@ -6306,13 +6306,13 @@ jest-jasmine2@^27.2.0: "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^27.2.0" + expect "^27.2.1" is-generator-fn "^2.0.0" jest-each "^27.2.0" jest-matcher-utils "^27.2.0" jest-message-util "^27.2.0" - jest-runtime "^27.2.0" - jest-snapshot "^27.2.0" + jest-runtime "^27.2.1" + jest-snapshot "^27.2.1" jest-util "^27.2.0" pretty-format "^27.2.0" throat "^6.0.1" @@ -6439,14 +6439,14 @@ jest-regex-util@^27.0.6: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5" integrity sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ== -jest-resolve-dependencies@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.2.0.tgz#b56a1aab95b0fd21e0a69a15fda985c05f902b8a" - integrity sha512-EY5jc/Y0oxn+oVEEldTidmmdVoZaknKPyDORA012JUdqPyqPL+lNdRyI3pGti0RCydds6coaw6xt4JQY54dKsg== +jest-resolve-dependencies@^27.2.1: + version "27.2.1" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.2.1.tgz#239be969ece749d4dc2e1efcf3d2b86c99525c2e" + integrity sha512-9bKEwmz4YshGPjGZAVZOVw6jt7pq2/FjWJmyhnWhvDuiRCHVZBcJhycinX+e/EJ7jafsq26bTpzBIQas3xql1g== dependencies: "@jest/types" "^27.1.1" jest-regex-util "^27.0.6" - jest-snapshot "^27.2.0" + jest-snapshot "^27.2.1" jest-resolve@27.0.6, jest-resolve@^27.0.6: version "27.0.6" @@ -6522,15 +6522,15 @@ jest-runner@^27.0.6: source-map-support "^0.5.6" throat "^6.0.1" -jest-runner@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.2.0.tgz#281b255d88a473aebc0b5cb46e58a83a1251cab3" - integrity sha512-Cl+BHpduIc0cIVTjwoyx0pQk4Br8gn+wkr35PmKCmzEdOUnQ2wN7QVXA8vXnMQXSlFkN/+KWnk20TAVBmhgrww== +jest-runner@^27.2.1: + version "27.2.1" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.2.1.tgz#3443b1fc08b8a50f305dfc2d41dd2badf335843b" + integrity sha512-USHitkUUzcB3Y5mRdzlp+KHgRRR2VsXDq5OeATuDmq1qXfT/RwwnQykUhn+KVx3FotxK3pID74UY7o6HYIR8vA== dependencies: "@jest/console" "^27.2.0" "@jest/environment" "^27.2.0" "@jest/test-result" "^27.2.0" - "@jest/transform" "^27.2.0" + "@jest/transform" "^27.2.1" "@jest/types" "^27.1.1" "@types/node" "*" chalk "^4.0.0" @@ -6544,7 +6544,7 @@ jest-runner@^27.2.0: jest-leak-detector "^27.2.0" jest-message-util "^27.2.0" jest-resolve "^27.2.0" - jest-runtime "^27.2.0" + jest-runtime "^27.2.1" jest-util "^27.2.0" jest-worker "^27.2.0" source-map-support "^0.5.6" @@ -6582,18 +6582,18 @@ jest-runtime@^27.0.6: strip-bom "^4.0.0" yargs "^16.0.3" -jest-runtime@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.2.0.tgz#998295ccd80008b3031eeb5cc60e801e8551024b" - integrity sha512-6gRE9AVVX49hgBbWQ9PcNDeM4upMUXzTpBs0kmbrjyotyUyIJixLPsYjpeTFwAA07PVLDei1iAm2chmWycdGdQ== +jest-runtime@^27.2.1: + version "27.2.1" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.2.1.tgz#db506f679356f5b94b7be20e770f2541b7c2b339" + integrity sha512-QJNnwL4iteDE/Jq4TfQK7AjhPoUZflBKTtUIkRnFYFkTAZTP/o8k7ekaROiVjmo+NYop5+DQPqX6pz4vWbZSOQ== dependencies: "@jest/console" "^27.2.0" "@jest/environment" "^27.2.0" "@jest/fake-timers" "^27.2.0" - "@jest/globals" "^27.2.0" + "@jest/globals" "^27.2.1" "@jest/source-map" "^27.0.6" "@jest/test-result" "^27.2.0" - "@jest/transform" "^27.2.0" + "@jest/transform" "^27.2.1" "@jest/types" "^27.1.1" "@types/yargs" "^16.0.0" chalk "^4.0.0" @@ -6608,7 +6608,7 @@ jest-runtime@^27.2.0: jest-mock "^27.1.1" jest-regex-util "^27.0.6" jest-resolve "^27.2.0" - jest-snapshot "^27.2.0" + jest-snapshot "^27.2.1" jest-util "^27.2.0" jest-validate "^27.2.0" slash "^3.0.0" @@ -6691,10 +6691,10 @@ jest-snapshot@^27.0.6: pretty-format "^27.0.6" semver "^7.3.2" -jest-snapshot@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.2.0.tgz#7961e7107ac666a46fbb23e7bb48ce0b8c6a9285" - integrity sha512-MukJvy3KEqemCT2FoT3Gum37CQqso/62PKTfIzWmZVTsLsuyxQmJd2PI5KPcBYFqLlA8LgZLHM8ZlazkVt8LsQ== +jest-snapshot@^27.2.1: + version "27.2.1" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.2.1.tgz#385accf3bb71ac84e9a6bda4fc9bb458d53abb35" + integrity sha512-8CTg2YrgZuQbPHW7G0YvLTj4yTRXLmSeEO+ka3eC5lbu5dsTRyoDNS1L7x7EFUTyYQhFH9HQG1/TNlbUgR9Lug== dependencies: "@babel/core" "^7.7.2" "@babel/generator" "^7.7.2" @@ -6702,13 +6702,13 @@ jest-snapshot@^27.2.0: "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.0.0" - "@jest/transform" "^27.2.0" + "@jest/transform" "^27.2.1" "@jest/types" "^27.1.1" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^27.2.0" + expect "^27.2.1" graceful-fs "^4.2.4" jest-diff "^27.2.0" jest-get-type "^27.0.6" @@ -6829,13 +6829,13 @@ jest-worker@^27.2.0: supports-color "^8.0.0" jest@^27.0.3: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.2.0.tgz#3bc329287d699d26361e2094919630eefdf1ac0d" - integrity sha512-oUqVXyvh5YwEWl263KWdPUAqEzBFzGHdFLQ05hUnITr1tH+9SscEI9A/GH9eBClA+Nw1ct+KNuuOV6wlnmBPcg== + version "27.2.1" + resolved "https://registry.yarnpkg.com/jest/-/jest-27.2.1.tgz#9263102056fe152fd2478d181cf9bbbd2a6a8da4" + integrity sha512-0MyvNS7J1HbkeotYaqKNGioN+p1/AAPtI1Z8iwMtCBE+PwBT+M4l25D9Pve8/KdhktYLgZaGyyj9CoDytD+R2Q== dependencies: - "@jest/core" "^27.2.0" + "@jest/core" "^27.2.1" import-local "^3.0.2" - jest-cli "^27.2.0" + jest-cli "^27.2.1" jju@~1.4.0: version "1.4.0" From cc777175b9c6e0c67f6f7a038feb2cb721f45d15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 12:08:34 -0700 Subject: [PATCH 339/473] chore: bump eslint-plugin-jest from 24.4.0 to 24.4.2 (#3909) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.4.0 to 24.4.2. - [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.4.0...v24.4.2) --- updated-dependencies: - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-patch ... 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 bcff08ea2c33..45e65e3c6b2b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4306,9 +4306,9 @@ eslint-plugin-import@^2.23.4: tsconfig-paths "^3.11.0" eslint-plugin-jest@^24.3.6: - version "24.4.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.4.0.tgz#fa4b614dbd46a98b652d830377971f097bda9262" - integrity sha512-8qnt/hgtZ94E9dA6viqfViKBfkJwFHXgJmTWlMGDgunw1XJEGqm3eiPjDsTanM3/u/3Az82nyQM9GX7PM/QGmg== + version "24.4.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.4.2.tgz#9e8cf05ee6a0e3025e6149df2f36950abfa8d5bf" + integrity sha512-jNMnqwX75z0RXRMXkxwb/+9ylKJYJLJ8nT8nBT0XFM5qx4IQGxP4edMawa0qGkSbHae0BDPBmi8I2QF0/F04XQ== dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" From ec5e08bd38f28b2cb7862bd39def16e44e228da2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 12:08:43 -0700 Subject: [PATCH 340/473] chore: bump pretty-format from 27.0.6 to 27.2.0 (#3912) Bumps [pretty-format](https://github.com/facebook/jest/tree/HEAD/packages/pretty-format) from 27.0.6 to 27.2.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v27.2.0/packages/pretty-format) --- updated-dependencies: - dependency-name: pretty-format dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/yarn.lock b/yarn.lock index 45e65e3c6b2b..3ba1089dcc48 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1092,29 +1092,7 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^27.0.2": - version "27.0.2" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.0.2.tgz#e153d6c46bda0f2589f0702b071f9898c7bbd37e" - integrity sha512-XpjCtJ/99HB4PmyJ2vgmN7vT+JLP7RW1FBT9RgnMFS4Dt7cvIyBee8O3/j98aUZ34ZpenPZFqmaaObWSeL65dg== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - -"@jest/types@^27.0.6": - version "27.0.6" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.0.6.tgz#9a992bc517e0c49f035938b8549719c2de40706b" - integrity sha512-aSquT1qa9Pik26JK5/3rvnYb4bGtm1VFNesHKmNTwmPIgOrixvhL2ghIvFRNEpzy3gU+rUgjIF/KodbkFAl++g== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - -"@jest/types@^27.1.1": +"@jest/types@^27.0.2", "@jest/types@^27.0.6", "@jest/types@^27.1.1": version "27.1.1" resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.1.1.tgz#77a3fc014f906c65752d12123a0134359707c0ad" integrity sha512-yqJPDDseb0mXgKqmNqypCsb85C22K1aY5+LUxh7syIM9n/b0AsaltxNy+o6tt29VcfGDpYEve175bm3uOhcehA== @@ -8485,11 +8463,11 @@ prettier@2.3.2: integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6, pretty-format@^27.2.0: - version "27.0.6" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.6.tgz#ab770c47b2c6f893a21aefc57b75da63ef49a11f" - integrity sha512-8tGD7gBIENgzqA+UBzObyWqQ5B778VIFZA/S66cclyd5YkFLYs2Js7gxDKf0MXtTc9zcS7t1xhdfcElJ3YIvkQ== + version "27.2.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.0.tgz#ee37a94ce2a79765791a8649ae374d468c18ef19" + integrity sha512-KyJdmgBkMscLqo8A7K77omgLx5PWPiXJswtTtFV7XgVZv2+qPk6UivpXXO+5k6ZEbWIbLoKdx1pZ6ldINzbwTA== dependencies: - "@jest/types" "^27.0.6" + "@jest/types" "^27.1.1" ansi-regex "^5.0.0" ansi-styles "^5.0.0" react-is "^17.0.1" From 0bb96ca2a8e626f0e4f0751f01674442b508c016 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 12:12:24 -0700 Subject: [PATCH 341/473] chore: bump @types/node-fetch from 2.5.12 to 3.0.3 (#3910) Bumps [@types/node-fetch](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node-fetch) from 2.5.12 to 3.0.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node-fetch) --- updated-dependencies: - dependency-name: "@types/node-fetch" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 3020db95dc4f..510b822b1f6c 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "@types/lodash": "^4.14.170", "@types/marked": "^2.0.3", "@types/node": "^15.6.1", - "@types/node-fetch": "^2.5.10", + "@types/node-fetch": "^3.0.3", "@types/prettier": "^2.2.3", "@types/rimraf": "^3.0.0", "@types/semver": "^7.3.6", diff --git a/yarn.lock b/yarn.lock index 3ba1089dcc48..9c9beda2b505 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2300,13 +2300,12 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== -"@types/node-fetch@^2.5.10": - version "2.5.12" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.12.tgz#8a6f779b1d4e60b7a57fb6fd48d84fb545b9cc66" - integrity sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw== +"@types/node-fetch@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-3.0.3.tgz#9d969c9a748e841554a40ee435d26e53fa3ee899" + integrity sha512-HhggYPH5N+AQe/OmN6fmhKmRRt2XuNJow+R3pQwJxOOF9GuwM7O2mheyGeIrs5MOIeNjDEdgdoyHBOrFeJBR3g== dependencies: - "@types/node" "*" - form-data "^3.0.0" + node-fetch "*" "@types/node@*", "@types/node@10.17.13", "@types/node@>= 8", "@types/node@^15.6.1": version "15.12.2" @@ -7747,12 +7746,7 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" -node-fetch@^2.3.0, node-fetch@^2.5.0, node-fetch@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -node-fetch@^3.0.0: +node-fetch@*, node-fetch@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.0.0.tgz#79da7146a520036f2c5f644e4a26095f17e411ea" integrity sha512-bKMI+C7/T/SPU1lKnbQbwxptpCrG9ashG+VkytmXCPZyuM9jB6VU+hY0oi4lC8LxTtAeWdckNCTa3nrGsAdA3Q== @@ -7760,6 +7754,11 @@ node-fetch@^3.0.0: data-uri-to-buffer "^3.0.1" fetch-blob "^3.1.2" +node-fetch@^2.3.0, node-fetch@^2.5.0, node-fetch@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + node-gyp@^5.0.2: version "5.1.1" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e" From 4e999614e9761f6dc7e5aa0c5bad76ab164ab3fb Mon Sep 17 00:00:00 2001 From: Jonas <13821543+sonallux@users.noreply.github.com> Date: Mon, 20 Sep 2021 21:55:42 +0200 Subject: [PATCH 342/473] feat(eslint-plugin): add `no-non-null-asserted-nullish-coalescing` rule (#3349) --- packages/eslint-plugin/README.md | 169 ++++----- ...no-non-null-asserted-nullish-coalescing.md | 49 +++ packages/eslint-plugin/src/configs/all.ts | 1 + packages/eslint-plugin/src/rules/index.ts | 2 + ...no-non-null-asserted-nullish-coalescing.ts | 108 ++++++ ...n-null-asserted-nullish-coalescing.test.ts | 332 ++++++++++++++++++ 6 files changed, 577 insertions(+), 84 deletions(-) create mode 100644 packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md create mode 100644 packages/eslint-plugin/src/rules/no-non-null-asserted-nullish-coalescing.ts create mode 100644 packages/eslint-plugin/tests/rules/no-non-null-asserted-nullish-coalescing.test.ts diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 5b32c4ef29e7..5eab0bedddaa 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -95,90 +95,91 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int **Key**: :white_check_mark: = recommended, :wrench: = fixable, :thought_balloon: = requires type information -| 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 | :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 | :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 | :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 | | | | -| [`@typescript-eslint/consistent-type-definitions`](./docs/rules/consistent-type-definitions.md) | Consistent with type definition either `interface` or `type` | | :wrench: | | -| [`@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 | :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: | | -| [`@typescript-eslint/naming-convention`](./docs/rules/naming-convention.md) | Enforces naming conventions for everything across a codebase | | | :thought_balloon: | -| [`@typescript-eslint/no-base-to-string`](./docs/rules/no-base-to-string.md) | Requires that `.toString()` is only called on objects which provide useful information when stringified | | | :thought_balloon: | -| [`@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 | :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 | :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 | :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-meaningless-void-operator`](./docs/rules/no-meaningless-void-operator.md) | Disallow the `void` operator except when used to discard a value | | :wrench: | :thought_balloon: | -| [`@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` | :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 | :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 | :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 | :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 | :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 | :white_check_mark: | :wrench: | :thought_balloon: | -| [`@typescript-eslint/prefer-return-this-type`](./docs/rules/prefer-return-this-type.md) | Enforce that `this` is used when only `this` type is returned | | :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: | -| [`@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 | :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 | :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 | :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 | | | | +| 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 | :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 | :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 | :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 | | | | +| [`@typescript-eslint/consistent-type-definitions`](./docs/rules/consistent-type-definitions.md) | Consistent with type definition either `interface` or `type` | | :wrench: | | +| [`@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 | :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: | | +| [`@typescript-eslint/naming-convention`](./docs/rules/naming-convention.md) | Enforces naming conventions for everything across a codebase | | | :thought_balloon: | +| [`@typescript-eslint/no-base-to-string`](./docs/rules/no-base-to-string.md) | Requires that `.toString()` is only called on objects which provide useful information when stringified | | | :thought_balloon: | +| [`@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 | :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 | :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 | :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-meaningless-void-operator`](./docs/rules/no-meaningless-void-operator.md) | Disallow the `void` operator except when used to discard a value | | :wrench: | :thought_balloon: | +| [`@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-nullish-coalescing`](./docs/rules/no-non-null-asserted-nullish-coalescing.md) | Disallows using a non-null assertion in the left operand of the nullish coalescing operator | | | | +| [`@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` | :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 | :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 | :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 | :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 | :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 | :white_check_mark: | :wrench: | :thought_balloon: | +| [`@typescript-eslint/prefer-return-this-type`](./docs/rules/prefer-return-this-type.md) | Enforce that `this` is used when only `this` type is returned | | :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: | +| [`@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 | :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 | :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 | :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 | | | | diff --git a/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md b/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md new file mode 100644 index 000000000000..799100f29939 --- /dev/null +++ b/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md @@ -0,0 +1,49 @@ +# Disallows using a non-null assertion in the left operand of the nullish coalescing operator (`no-non-null-asserted-nullish-coalescing`) + +## Rule Details + +The nullish coalescing operator is designed to provide a default value when dealing with `null` or `undefined`. +Using non-null assertions in the left operand of the nullish coalescing operator is redundant. + +Examples of **incorrect** code for this rule: + +```ts +/* eslint @typescript-eslint/no-non-null-asserted-nullish-coalescing: "error" */ + +foo! ?? bar; +foo.bazz! ?? bar; +foo!.bazz! ?? bar; +foo()! ?? bar; + +let x!: string; +x! ?? ''; + +let x: string; +x = foo(); +x! ?? ''; +``` + +Examples of **correct** code for this rule: + +```ts +/* eslint @typescript-eslint/no-non-null-asserted-nullish-coalescing: "error" */ + +foo ?? bar; +foo ?? bar!; +foo!.bazz ?? bar; +foo!.bazz ?? bar!; +foo() ?? bar; + +// This is considered correct code because because there's no way for the user to satisfy it. +let x: string; +x! ?? ''; +``` + +## When Not To Use It + +If you are not using TypeScript 3.7 (or greater), then you will not need to use this rule, as the nullish coalescing operator is not supported. + +## Further Reading + +- [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html) +- [Nullish Coalescing Proposal](https://github.com/tc39/proposal-nullish-coalescing) diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index 9d7fde81314f..efff21f2fead 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -82,6 +82,7 @@ export = { '@typescript-eslint/no-misused-new': 'error', '@typescript-eslint/no-misused-promises': 'error', '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error', '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', '@typescript-eslint/no-non-null-assertion': 'error', '@typescript-eslint/no-parameter-properties': 'error', diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index 1f6aa56c7cba..62996110d982 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -54,6 +54,7 @@ import noMeaninglessVoidOperator from './no-meaningless-void-operator'; import noMisusedNew from './no-misused-new'; import noMisusedPromises from './no-misused-promises'; import noNamespace from './no-namespace'; +import noNonNullAssertedNullishCoalescing from './no-non-null-asserted-nullish-coalescing'; import noNonNullAssertedOptionalChain from './no-non-null-asserted-optional-chain'; import noNonNullAssertion from './no-non-null-assertion'; import noParameterProperties from './no-parameter-properties'; @@ -175,6 +176,7 @@ export default { 'no-misused-new': noMisusedNew, 'no-misused-promises': noMisusedPromises, 'no-namespace': noNamespace, + 'no-non-null-asserted-nullish-coalescing': noNonNullAssertedNullishCoalescing, 'no-non-null-asserted-optional-chain': noNonNullAssertedOptionalChain, 'no-non-null-assertion': noNonNullAssertion, 'no-parameter-properties': noParameterProperties, diff --git a/packages/eslint-plugin/src/rules/no-non-null-asserted-nullish-coalescing.ts b/packages/eslint-plugin/src/rules/no-non-null-asserted-nullish-coalescing.ts new file mode 100644 index 000000000000..b7619f1a82b5 --- /dev/null +++ b/packages/eslint-plugin/src/rules/no-non-null-asserted-nullish-coalescing.ts @@ -0,0 +1,108 @@ +import { + ASTUtils, + TSESTree, + TSESLint, +} from '@typescript-eslint/experimental-utils'; +import { Definition, DefinitionType } from '@typescript-eslint/scope-manager'; +import * as util from '../util'; + +function hasAssignmentBeforeNode( + variable: TSESLint.Scope.Variable, + node: TSESTree.Node, +): boolean { + return ( + variable.references.some( + ref => ref.isWrite() && ref.identifier.range[1] < node.range[1], + ) || + variable.defs.some( + def => + isDefinitionWithAssignment(def) && def.node.range[1] < node.range[1], + ) + ); +} + +function isDefinitionWithAssignment(definition: Definition): boolean { + if (definition.type !== DefinitionType.Variable) { + return false; + } + + const variableDeclarator = definition.node; + return ( + variableDeclarator.definite === true || variableDeclarator.init !== null + ); +} + +export default util.createRule({ + name: 'no-non-null-asserted-nullish-coalescing', + meta: { + type: 'problem', + docs: { + description: + 'Disallows using a non-null assertion in the left operand of the nullish coalescing operator', + category: 'Possible Errors', + recommended: false, + suggestion: true, + }, + messages: { + noNonNullAssertedNullishCoalescing: + 'The nullish coalescing operator is designed to handle undefined and null - using a non-null assertion is not needed.', + suggestRemovingNonNull: 'Remove the non-null assertion.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + return { + 'LogicalExpression[operator = "??"] > TSNonNullExpression.left'( + node: TSESTree.TSNonNullExpression, + ): void { + if (node.expression.type === TSESTree.AST_NODE_TYPES.Identifier) { + const scope = context.getScope(); + const identifier = node.expression; + const variable = ASTUtils.findVariable(scope, identifier.name); + if (variable && !hasAssignmentBeforeNode(variable, node)) { + return; + } + } + + const sourceCode = context.getSourceCode(); + + context.report({ + node, + messageId: 'noNonNullAssertedNullishCoalescing', + /* + Use a suggestion instead of a fixer, because this can break type checks. + The resulting type of the nullish coalesce is only influenced by the right operand if the left operand can be `null` or `undefined`. + After removing the non-null assertion the type of the left operand might contain `null` or `undefined` and then the type of the right operand + might change the resulting type of the nullish coalesce. + See the following example: + + function test(x?: string): string { + const bar = x! ?? false; // type analysis reports `bar` has type `string` + // x ?? false; // type analysis reports `bar` has type `string | false` + return bar; + } + */ + suggest: [ + { + messageId: 'suggestRemovingNonNull', + fix(fixer): TSESLint.RuleFix { + const exclamationMark = util.nullThrows( + sourceCode.getLastToken( + node, + ASTUtils.isNonNullAssertionPunctuator, + ), + util.NullThrowsReasons.MissingToken( + '!', + 'Non-null Assertion', + ), + ); + return fixer.remove(exclamationMark); + }, + }, + ], + }); + }, + }; + }, +}); diff --git a/packages/eslint-plugin/tests/rules/no-non-null-asserted-nullish-coalescing.test.ts b/packages/eslint-plugin/tests/rules/no-non-null-asserted-nullish-coalescing.test.ts new file mode 100644 index 000000000000..3b47a3c2bf00 --- /dev/null +++ b/packages/eslint-plugin/tests/rules/no-non-null-asserted-nullish-coalescing.test.ts @@ -0,0 +1,332 @@ +import rule from '../../src/rules/no-non-null-asserted-nullish-coalescing'; +import { RuleTester, noFormat } from '../RuleTester'; + +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', +}); + +ruleTester.run('no-non-null-asserted-nullish-coalescing', rule, { + valid: [ + 'foo ?? bar;', + 'foo ?? bar!;', + 'foo.bazz ?? bar;', + 'foo.bazz ?? bar!;', + 'foo!.bazz ?? bar;', + 'foo!.bazz ?? bar!;', + 'foo() ?? bar;', + 'foo() ?? bar!;', + '(foo ?? bar)!;', + ` + let x: string; + x! ?? ''; + `, + ` + let x: string; + x ?? ''; + `, + ` + let x!: string; + x ?? ''; + `, + ` + let x: string; + foo(x); + x! ?? ''; + `, + ` + let x: string; + x! ?? ''; + x = foo(); + `, + ` + let x: string; + foo(x); + x! ?? ''; + x = foo(); + `, + ` + let x = foo(); + x ?? ''; + `, + ` + function foo() { + let x: string; + return x ?? ''; + } + `, + ` + let x: string; + function foo() { + return x ?? ''; + } + `, + ], + invalid: [ + { + code: 'foo! ?? bar;', + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: 'foo ?? bar;', + }, + ], + }, + ], + }, + { + code: 'foo! ?? bar!;', + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: 'foo ?? bar!;', + }, + ], + }, + ], + }, + { + code: 'foo.bazz! ?? bar;', + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: 'foo.bazz ?? bar;', + }, + ], + }, + ], + }, + { + code: 'foo.bazz! ?? bar!;', + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: 'foo.bazz ?? bar!;', + }, + ], + }, + ], + }, + { + code: 'foo!.bazz! ?? bar;', + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: 'foo!.bazz ?? bar;', + }, + ], + }, + ], + }, + { + code: 'foo!.bazz! ?? bar!;', + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: 'foo!.bazz ?? bar!;', + }, + ], + }, + ], + }, + { + code: 'foo()! ?? bar;', + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: 'foo() ?? bar;', + }, + ], + }, + ], + }, + { + code: 'foo()! ?? bar!;', + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: 'foo() ?? bar!;', + }, + ], + }, + ], + }, + { + code: ` +let x!: string; +x! ?? ''; + `.trimRight(), + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: ` +let x!: string; +x ?? ''; + `.trimRight(), + }, + ], + }, + ], + }, + { + code: ` +let x: string; +x = foo(); +x! ?? ''; + `.trimRight(), + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: ` +let x: string; +x = foo(); +x ?? ''; + `.trimRight(), + }, + ], + }, + ], + }, + { + code: ` +let x: string; +x = foo(); +x! ?? ''; +x = foo(); + `.trimRight(), + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: ` +let x: string; +x = foo(); +x ?? ''; +x = foo(); + `.trimRight(), + }, + ], + }, + ], + }, + { + code: ` +let x = foo(); +x! ?? ''; + `.trimRight(), + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: ` +let x = foo(); +x ?? ''; + `.trimRight(), + }, + ], + }, + ], + }, + { + code: ` +function foo() { + let x!: string; + return x! ?? ''; +} + `.trimRight(), + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: ` +function foo() { + let x!: string; + return x ?? ''; +} + `.trimRight(), + }, + ], + }, + ], + }, + { + code: ` +let x!: string; +function foo() { + return x! ?? ''; +} + `.trimRight(), + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: ` +let x!: string; +function foo() { + return x ?? ''; +} + `.trimRight(), + }, + ], + }, + ], + }, + { + code: noFormat` +let x = foo(); +x ! ?? ''; + `.trimRight(), + errors: [ + { + messageId: 'noNonNullAssertedNullishCoalescing', + suggestions: [ + { + messageId: 'suggestRemovingNonNull', + output: noFormat` +let x = foo(); +x ?? ''; + `.trimRight(), + }, + ], + }, + ], + }, + ], +}); From bdb8f0be1466e4a4b713e91199be91030650ed01 Mon Sep 17 00:00:00 2001 From: Yuya Tanaka Date: Tue, 21 Sep 2021 05:22:24 +0900 Subject: [PATCH 343/473] fix(eslint-plugin): false-positive/negative with array index in no-unnecessary-condition (#3805) * fix: false negative with always nullish after array index access * fix: false positive with nullish + optional array index * fix: false negative with optional chain after array index --- .../src/rules/no-unnecessary-condition.ts | 28 +++++++++------- .../rules/no-unnecessary-condition.test.ts | 33 +++++++++++++++++++ 2 files changed, 50 insertions(+), 11 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts index 5ae3f93408a5..caca4f8bedb9 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts @@ -261,12 +261,6 @@ export default createRule({ } function checkNodeForNullish(node: TSESTree.Expression): void { - // Since typescript array index signature types don't represent the - // possibility of out-of-bounds access, if we're indexing into an array - // just skip the check, to avoid false positives - if (isArrayIndexExpression(node)) { - return; - } const type = getNodeType(node); // Conditional is always necessary if it involves `any` or `unknown` if (isTypeAnyType(type) || isTypeUnknownType(type)) { @@ -277,7 +271,19 @@ export default createRule({ if (isTypeFlagSet(type, ts.TypeFlags.Never)) { messageId = 'never'; } else if (!isPossiblyNullish(type)) { - messageId = 'neverNullish'; + // Since typescript array index signature types don't represent the + // possibility of out-of-bounds access, if we're indexing into an array + // just skip the check, to avoid false positives + if ( + !isArrayIndexExpression(node) && + !( + node.type === AST_NODE_TYPES.ChainExpression && + node.expression.type !== AST_NODE_TYPES.TSNonNullExpression && + optionChainContainsOptionArrayIndex(node.expression) + ) + ) { + messageId = 'neverNullish'; + } } else if (isAlwaysNullish(type)) { messageId = 'alwaysNullish'; } @@ -477,19 +483,19 @@ export default createRule({ // ?.x // type is {y: "z"} // ?.y // This access is considered "unnecessary" according to the types // ``` - function optionChainContainsArrayIndex( + function optionChainContainsOptionArrayIndex( node: TSESTree.MemberExpression | TSESTree.CallExpression, ): boolean { const lhsNode = node.type === AST_NODE_TYPES.CallExpression ? node.callee : node.object; - if (isArrayIndexExpression(lhsNode)) { + if (node.optional && isArrayIndexExpression(lhsNode)) { return true; } if ( lhsNode.type === AST_NODE_TYPES.MemberExpression || lhsNode.type === AST_NODE_TYPES.CallExpression ) { - return optionChainContainsArrayIndex(lhsNode); + return optionChainContainsOptionArrayIndex(lhsNode); } return false; } @@ -584,7 +590,7 @@ export default createRule({ // Since typescript array index signature types don't represent the // possibility of out-of-bounds access, if we're indexing into an array // just skip the check, to avoid false positives - if (optionChainContainsArrayIndex(node)) { + if (optionChainContainsOptionArrayIndex(node)) { return; } diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts index 2658061a3572..82196fbc8a1e 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts @@ -315,6 +315,11 @@ returnsArr?.()[42]?.toUpperCase(); ` declare const arr: string[][]; arr[x] ?? []; + `, + // nullish + optional array index + ` +declare const arr: { foo: number }[]; +const bar = arr[42]?.foo ?? 0; `, // Doesn't check the right-hand side of a logical expression // in a non-conditional context @@ -751,6 +756,15 @@ function test(a: string) { code: ` function test(a: string | false) { return a ?? 'default'; +} + `, + errors: [ruleError(3, 10, 'neverNullish')], + }, + // nullish + array index without optional chaining + { + code: ` +function test(a: { foo: string }[]) { + return a[0].foo ?? 'default'; } `, errors: [ruleError(3, 10, 'neverNullish')], @@ -765,6 +779,14 @@ function test(a: null) { }, { code: ` +function test(a: null[]) { + return a[0] ?? 'default'; +} + `, + errors: [ruleError(3, 10, 'alwaysNullish')], + }, + { + code: ` function test(a: never) { return a ?? 'default'; } @@ -1315,6 +1337,17 @@ foo?.fooOrBar.baz?.qux; }, { code: ` +declare const x: { a: { b: number } }[]; +x[0].a?.b; + `, + output: ` +declare const x: { a: { b: number } }[]; +x[0].a.b; + `, + errors: [ruleError(3, 7, 'neverOptionalChain')], + }, + { + code: ` type Foo = { [key: string]: string; foo: 'foo'; bar: 'bar' } | null; type Key = 'bar' | 'foo'; declare const foo: Foo; From 1bee15cb6bd4c1e24d6fabdc5df07882e3d28d8e Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Tue, 21 Sep 2021 05:22:55 +0900 Subject: [PATCH 344/473] test(typescript-estree): update `@babel/parser` to 7.15.4 (#3833) * chore: install new babel/parser * test: ignore fixitures related to TS 4.4 * test: remove AST transform for static blocks * chore: update to 7.15.6 --- package.json | 2 +- .../tests/ast-alignment/fixtures-to-test.ts | 8 ++++++++ .../typescript-estree/tests/ast-alignment/utils.ts | 10 ---------- yarn.lock | 10 +++++----- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 510b822b1f6c..5e93f9be4ca3 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ }, "devDependencies": { "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.14.6", + "@babel/parser": "^7.15.6", "@babel/types": "^7.14.4", "@commitlint/cli": "^13.1.0", "@commitlint/config-conventional": "^13.1.0", diff --git a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts index cab81a426fe1..a3400b97d336 100644 --- a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts +++ b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts @@ -386,6 +386,14 @@ tester.addFixturePatternConfig('typescript/basics', { * This is intentional; babel is not checking types */ 'catch-clause-with-invalid-annotation', + /** + * [TS-ESTREE ERRORED, BUT BABEL DID NOT] + * TypeScript 4.4 new feature + * @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-4.html#abstract-properties-do-not-allow-initializers + */ + 'abstract-class-with-abstract-readonly-property', + 'abstract-class-with-abstract-properties', + 'abstract-class-with-override-property', ], ignoreSourceType: [ /** diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index 7427c1b1831d..3cecac3f09f6 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -250,16 +250,6 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any { } } }, - /** - * Babel adds a `static` property to the StaticBlock when the - * `typescript` plugin and the `classStaticBlock` plugin are enabled. - * @see https://github.com/babel/babel/issues/13674 - */ - StaticBlock(node: any) { - if (node.static != null) { - delete node.static; - } - }, }, ); } diff --git a/yarn.lock b/yarn.lock index 9c9beda2b505..8908c7fa9232 100644 --- a/yarn.lock +++ b/yarn.lock @@ -169,16 +169,16 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@*", "@babel/parser@^7.14.6": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.6.tgz#d85cc68ca3cac84eae384c06f032921f5227f4b2" - integrity sha512-oG0ej7efjEXxb4UgE+klVx+3j4MVo+A2vCzm7OUN4CLo6WhQ+vSOD2yJ8m7B+DghObxtLxt3EfgMWpq+AsWehQ== - "@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.14.2", "@babel/parser@^7.14.3", "@babel/parser@^7.7.2": version "7.14.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.4.tgz#a5c560d6db6cd8e6ed342368dea8039232cbab18" integrity sha512-ArliyUsWDUqEGfWcmzpGUzNfLxTdTp6WU4IuP6QFSp9gGfWS6boxFCkJSJ/L4+RG8z/FnIU3WxCk6hPL9SSWeA== +"@babel/parser@^7.15.6", "@babel/parser@*": + version "7.15.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.6.tgz#043b9aa3c303c0722e5377fef9197f4cf1796549" + integrity sha512-S/TSCcsRuCkmpUuoWijua0Snt+f3ewU/8spLo+4AXJCZfT0bVCzLD5MuOKdrx0mlAptbKzn5AdgEIIKXxXkz9Q== + "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" From a40cfc481730edf5964cfcdd034248402698dfdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 20 Sep 2021 22:32:28 +0200 Subject: [PATCH 345/473] refactor(eslint-plugin): use `ast-utils`' `isConstructor` instead of redeclaring it in `prefer-readonly` rule (#3838) --- .../eslint-plugin/src/rules/prefer-readonly.ts | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/packages/eslint-plugin/src/rules/prefer-readonly.ts b/packages/eslint-plugin/src/rules/prefer-readonly.ts index 56ab8265a9a0..36c6c7ea81a6 100644 --- a/packages/eslint-plugin/src/rules/prefer-readonly.ts +++ b/packages/eslint-plugin/src/rules/prefer-readonly.ts @@ -3,12 +3,12 @@ import * as ts from 'typescript'; import * as util from '../util'; import { typeIsOrHasBaseType } from '../util'; import { - TSESTree, + ASTUtils, AST_NODE_TYPES, + TSESTree, } from '@typescript-eslint/experimental-utils'; type MessageIds = 'preferReadonly'; - type Options = [ { onlyInlineLambdas?: boolean; @@ -135,15 +135,6 @@ export default util.createRule({ return false; } - function isConstructor( - node: TSESTree.Node, - ): node is TSESTree.MethodDefinition { - return ( - node.type === AST_NODE_TYPES.MethodDefinition && - node.kind === 'constructor' - ); - } - function isFunctionScopeBoundaryInStack( node: | TSESTree.ArrowFunctionExpression @@ -231,7 +222,7 @@ export default util.createRule({ | TSESTree.FunctionExpression | TSESTree.MethodDefinition, ): void { - if (isConstructor(node)) { + if (ASTUtils.isConstructor(node)) { classScopeStack[classScopeStack.length - 1].enterConstructor( parserServices.esTreeNodeToTSNodeMap.get(node), ); @@ -246,7 +237,7 @@ export default util.createRule({ | TSESTree.FunctionExpression | TSESTree.MethodDefinition, ): void { - if (isConstructor(node)) { + if (ASTUtils.isConstructor(node)) { classScopeStack[classScopeStack.length - 1].exitConstructor(); } else if (isFunctionScopeBoundaryInStack(node)) { classScopeStack[classScopeStack.length - 1].exitNonConstructor(); From b01a6999fcd6bed66fe4dceb9c54e0a5194f7c97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 13:48:10 -0700 Subject: [PATCH 346/473] chore: bump @types/marked from 2.0.4 to 2.0.5 (#3914) Bumps [@types/marked](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/marked) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/marked) --- updated-dependencies: - dependency-name: "@types/marked" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8908c7fa9232..c08b85941776 100644 --- a/yarn.lock +++ b/yarn.lock @@ -169,16 +169,16 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/parser@*", "@babel/parser@^7.15.6": + version "7.15.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.6.tgz#043b9aa3c303c0722e5377fef9197f4cf1796549" + integrity sha512-S/TSCcsRuCkmpUuoWijua0Snt+f3ewU/8spLo+4AXJCZfT0bVCzLD5MuOKdrx0mlAptbKzn5AdgEIIKXxXkz9Q== + "@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.14.2", "@babel/parser@^7.14.3", "@babel/parser@^7.7.2": version "7.14.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.4.tgz#a5c560d6db6cd8e6ed342368dea8039232cbab18" integrity sha512-ArliyUsWDUqEGfWcmzpGUzNfLxTdTp6WU4IuP6QFSp9gGfWS6boxFCkJSJ/L4+RG8z/FnIU3WxCk6hPL9SSWeA== -"@babel/parser@^7.15.6", "@babel/parser@*": - version "7.15.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.6.tgz#043b9aa3c303c0722e5377fef9197f4cf1796549" - integrity sha512-S/TSCcsRuCkmpUuoWijua0Snt+f3ewU/8spLo+4AXJCZfT0bVCzLD5MuOKdrx0mlAptbKzn5AdgEIIKXxXkz9Q== - "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" @@ -2281,9 +2281,9 @@ integrity sha512-vv0CAYoaEjCw/mLy96GBTnRoZrSxkGE0BKzKimdR8P3OzrNYNvBgtW7p055A+E8C31vXNUhWKoFCbhq7gbyhFg== "@types/marked@*", "@types/marked@^2.0.3": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.4.tgz#34a0ea548afe6e0c01095229d47b48b2af650613" - integrity sha512-L9VRSe0Id8xbPL99mUo/4aKgD7ZoRwFZqUQScNKHi2pFjF9ZYSMNShUHD6VlMT6J/prQq0T1mxuU25m3R7dFzg== + version "2.0.5" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.5.tgz#453e27f1e97199d45bb25297b0dd2b9bbc1e05ea" + integrity sha512-shRZ7XnYFD/8n8zSjKvFdto1QNSf4tONZIlNEZGrJe8GsOE8DL/hG1Hbl8gZlfLnjS7+f5tZGIaTgfpyW38h4w== "@types/minimatch@*": version "3.0.4" From 5ec9c33505c9106f60610e13532a473d80f9cf81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 14:05:25 -0700 Subject: [PATCH 347/473] chore: bump tmpl from 1.0.4 to 1.0.5 (#3915) Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5. - [Release notes](https://github.com/daaku/nodejs-tmpl/releases) - [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5) --- updated-dependencies: - dependency-name: tmpl dependency-type: indirect ... 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 c08b85941776..4504cec2beee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9712,9 +9712,9 @@ tmp@^0.2.1, tmp@~0.2.1: rimraf "^3.0.0" tmpl@1.0.x: - version "1.0.4" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" - integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= + version "1.0.5" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== to-fast-properties@^2.0.0: version "2.0.0" From 955d7a62b2e88d9396f7f7b6ce46da6418aea374 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 20 Sep 2021 17:07:56 -0400 Subject: [PATCH 348/473] chore: enabled restrict-template-expressions internally (#3854) --- .eslintrc.js | 12 ++++++++++-- .../src/rules/switch-exhaustiveness-check.ts | 2 +- packages/scope-manager/tests/fixtures.test.ts | 2 +- .../tests/util/serializers/TSESTreeNode.ts | 3 ++- .../tests/util/serializers/baseSerializer.ts | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index df695f85e94c..1ef4f373c8d4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -59,13 +59,21 @@ module.exports = { '@typescript-eslint/prefer-optional-chain': 'error', '@typescript-eslint/unbound-method': 'off', '@typescript-eslint/prefer-as-const': 'error', + '@typescript-eslint/restrict-template-expressions': [ + 'error', + { + allowNumber: true, + allowBoolean: true, + allowAny: true, + allowNullish: true, + allowRegExp: true, + }, + ], '@typescript-eslint/no-unused-vars': [ 'warn', { varsIgnorePattern: '^_', argsIgnorePattern: '^_' }, ], - // TODO - enable these new recommended rules - '@typescript-eslint/restrict-template-expressions': 'off', // TODO - enable this '@typescript-eslint/naming-convention': 'off', diff --git a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts index 8881473da051..7535aa6dc54a 100644 --- a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts +++ b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts @@ -144,7 +144,7 @@ export default createRule({ missingBranches: missingBranchTypes .map(missingType => isTypeFlagSet(missingType, ts.TypeFlags.ESSymbolLike) - ? `typeof ${missingType.getSymbol()?.escapedName}` + ? `typeof ${missingType.getSymbol()?.escapedName as string}` : checker.typeToString(missingType), ) .join(' | '), diff --git a/packages/scope-manager/tests/fixtures.test.ts b/packages/scope-manager/tests/fixtures.test.ts index af327985df3b..b504710c4cfd 100644 --- a/packages/scope-manager/tests/fixtures.test.ts +++ b/packages/scope-manager/tests/fixtures.test.ts @@ -124,7 +124,7 @@ function nestDescribe( throw new Error( `Expected value for ${key} to be one of (${Array.from(type[1]).join( ' | ', - )}), but got ${value}`, + )}), but got ${value as string}`, ); } diff --git a/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts b/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts index 8a75e729fd86..806ad70a8b2d 100644 --- a/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts +++ b/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts @@ -14,6 +14,7 @@ const EXCLUDED_KEYS = new Set([ const generator = createIdGenerator(); type Node = Record & { type: AST_NODE_TYPES }; +type Identifier = Node & { name: string; type: AST_NODE_TYPES.Identifier }; const SEEN_NODES = new Map(); const serializer: NewPlugin = { @@ -29,7 +30,7 @@ const serializer: NewPlugin = { }, serialize(node: Node): string { if (node.type === AST_NODE_TYPES.Identifier) { - return `Identifier<"${node.name}">`; + return `Identifier<"${(node as Identifier).name}">`; } const keys = Object.keys(node).filter(k => !EXCLUDED_KEYS.has(k)); diff --git a/packages/scope-manager/tests/util/serializers/baseSerializer.ts b/packages/scope-manager/tests/util/serializers/baseSerializer.ts index 7d5718030677..a5d11b2a9f33 100644 --- a/packages/scope-manager/tests/util/serializers/baseSerializer.ts +++ b/packages/scope-manager/tests/util/serializers/baseSerializer.ts @@ -62,7 +62,7 @@ function createSerializer( } outputLines.push( - `${childIndentation}${key}: ${printer( + `${childIndentation}${key as string}: ${printer( value, config, childIndentation, From ec5d50696b249a207d322e4a2fc66582122eb010 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Tue, 21 Sep 2021 06:34:11 +0900 Subject: [PATCH 349/473] feat(eslint-plugin): add new extended rule `no-restricted-imports` (#3775) --- packages/eslint-plugin/README.md | 1 + .../docs/rules/no-restricted-imports.md | 64 ++ packages/eslint-plugin/package.json | 3 +- packages/eslint-plugin/src/configs/all.ts | 2 + packages/eslint-plugin/src/rules/index.ts | 2 + .../src/rules/no-restricted-imports.ts | 191 ++++++ .../tests/rules/no-restricted-imports.test.ts | 546 ++++++++++++++++++ .../eslint-plugin/typings/eslint-rules.d.ts | 48 ++ yarn.lock | 2 +- 9 files changed, 857 insertions(+), 2 deletions(-) create mode 100644 packages/eslint-plugin/docs/rules/no-restricted-imports.md create mode 100644 packages/eslint-plugin/src/rules/no-restricted-imports.ts create mode 100644 packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 5eab0bedddaa..c8c783dba6f0 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -216,6 +216,7 @@ In these cases, we create what we call an extension rule; a rule within our plug | [`@typescript-eslint/no-loss-of-precision`](./docs/rules/no-loss-of-precision.md) | Disallow literal numbers that lose precision | | | | | [`@typescript-eslint/no-magic-numbers`](./docs/rules/no-magic-numbers.md) | Disallow magic numbers | | | | | [`@typescript-eslint/no-redeclare`](./docs/rules/no-redeclare.md) | Disallow variable redeclaration | | | | +| [`@typescript-eslint/no-restricted-imports`](./docs/rules/no-restricted-imports.md) | Disallow specified modules when loaded by `import` | | | | | [`@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 | | | | diff --git a/packages/eslint-plugin/docs/rules/no-restricted-imports.md b/packages/eslint-plugin/docs/rules/no-restricted-imports.md new file mode 100644 index 000000000000..6e2e8d3e3dc1 --- /dev/null +++ b/packages/eslint-plugin/docs/rules/no-restricted-imports.md @@ -0,0 +1,64 @@ +# Disallow specified modules when loaded by `import` (`no-restricted-imports`) + +## Rule Details + +This rule extends the base [`eslint/no-restricted-imports`](https://eslint.org/docs/rules/no-restricted-imports) rule. + +## How to use + +```jsonc +{ + // note you must disable the base rule as it can report incorrect errors + "no-restricted-imports": "off", + "@typescript-eslint/no-restricted-imports": "off" +} +``` + +## Options + +See [`eslint/no-restricted-imports` options](https://eslint.org/docs/rules/no-restricted-imports#options). +This rule adds the following options: + +### `allowTypeImports` + +(default: `false`) + +You can specify this option for a specific path or pattern as follows: + +```jsonc +"@typescript-eslint/no-restricted-imports": ["error", { + "paths": [{ + "name": "import-foo", + "message": "Please use import-bar instead.", + "allowTypeImports": true + }, { + "name": "import-baz", + "message": "Please use import-quux instead.", + "allowTypeImports": true + }] +}] +``` + +When set to `true`, the rule will allow [Type-Only Imports](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export). + +Examples of **correct** code with the above config: + +```ts +import { foo } from 'other-module'; + +import type foo from 'import-foo'; +export type { Foo } from 'import-foo'; + +import type baz from 'import-baz'; +export type { Baz } from 'import-baz'; +``` + +Example of **incorrect** code with the above config: + +```ts +import foo from 'import-foo'; +export { Foo } from 'import-foo'; + +import baz from 'import-baz'; +export { Baz } from 'import-baz'; +``` diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 0235818f1663..f08809f82950 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -50,7 +50,8 @@ "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", "semver": "^7.3.5", - "tsutils": "^3.21.0" + "tsutils": "^3.21.0", + "ignore": "^5.1.8" }, "devDependencies": { "@types/debug": "*", diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index efff21f2fead..eff553b5b9b7 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -89,6 +89,8 @@ export = { 'no-redeclare': 'off', '@typescript-eslint/no-redeclare': 'error', '@typescript-eslint/no-require-imports': 'error', + 'no-restricted-imports': 'off', + '@typescript-eslint/no-restricted-imports': 'error', 'no-shadow': 'off', '@typescript-eslint/no-shadow': 'error', '@typescript-eslint/no-this-alias': 'error', diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index 62996110d982..3ab88b478e2d 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -60,6 +60,7 @@ import noNonNullAssertion from './no-non-null-assertion'; import noParameterProperties from './no-parameter-properties'; import noRedeclare from './no-redeclare'; import noRequireImports from './no-require-imports'; +import noRestrictedImports from './no-restricted-imports'; import noShadow from './no-shadow'; import noThisAlias from './no-this-alias'; import noThrowLiteral from './no-throw-literal'; @@ -182,6 +183,7 @@ export default { 'no-parameter-properties': noParameterProperties, 'no-redeclare': noRedeclare, 'no-require-imports': noRequireImports, + 'no-restricted-imports': noRestrictedImports, 'no-shadow': noShadow, 'no-this-alias': noThisAlias, 'no-throw-literal': noThrowLiteral, diff --git a/packages/eslint-plugin/src/rules/no-restricted-imports.ts b/packages/eslint-plugin/src/rules/no-restricted-imports.ts new file mode 100644 index 000000000000..2a01a54c62ec --- /dev/null +++ b/packages/eslint-plugin/src/rules/no-restricted-imports.ts @@ -0,0 +1,191 @@ +import { AST_NODE_TYPES } from '@typescript-eslint/experimental-utils'; +import baseRule, { + ArrayOfStringOrObjectPatterns, + ArrayOfStringOrObject, +} from 'eslint/lib/rules/no-restricted-imports'; +import ignore, { Ignore } from 'ignore'; +import { + InferOptionsTypeFromRule, + InferMessageIdsTypeFromRule, + createRule, + deepMerge, +} from '../util'; + +export type Options = InferOptionsTypeFromRule; +export type MessageIds = InferMessageIdsTypeFromRule; + +const allowTypeImportsOptionSchema = { + allowTypeImports: { + type: 'boolean', + default: false, + }, +}; +const schemaForMergeArrayOfStringsOrObjects = { + items: { + anyOf: [ + {}, + { + properties: allowTypeImportsOptionSchema, + }, + ], + }, +}; +const schemaForMergeArrayOfStringsOrObjectPatterns = { + anyOf: [ + {}, + { + items: { + properties: allowTypeImportsOptionSchema, + }, + }, + ], +}; +const schema = deepMerge( + { ...baseRule.meta.schema }, + { + anyOf: [ + schemaForMergeArrayOfStringsOrObjects, + { + items: { + properties: { + paths: schemaForMergeArrayOfStringsOrObjects, + patterns: schemaForMergeArrayOfStringsOrObjectPatterns, + }, + }, + }, + ], + }, +); + +function isObjectOfPaths( + obj: unknown, +): obj is { paths: ArrayOfStringOrObject } { + return Object.prototype.hasOwnProperty.call(obj, 'paths'); +} + +function isObjectOfPatterns( + obj: unknown, +): obj is { patterns: ArrayOfStringOrObjectPatterns } { + return Object.prototype.hasOwnProperty.call(obj, 'patterns'); +} + +function isOptionsArrayOfStringOrObject( + options: Options, +): options is ArrayOfStringOrObject { + if (isObjectOfPaths(options[0])) { + return false; + } + if (isObjectOfPatterns(options[0])) { + return false; + } + return true; +} + +function getRestrictedPaths(options: Options): ArrayOfStringOrObject { + if (isOptionsArrayOfStringOrObject(options)) { + return options; + } + if (isObjectOfPaths(options[0])) { + return options[0].paths; + } + return []; +} + +function getRestrictedPatterns( + options: Options, +): ArrayOfStringOrObjectPatterns { + if (isObjectOfPatterns(options[0])) { + return options[0].patterns; + } + return []; +} + +export default createRule({ + name: 'no-restricted-imports', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow specified modules when loaded by `import`', + category: 'Best Practices', + recommended: false, + extendsBaseRule: true, + }, + messages: baseRule.meta.messages, + fixable: baseRule.meta.fixable, + schema, + }, + defaultOptions: [], + create(context) { + const rules = baseRule.create(context); + const { options } = context; + + const restrictedPaths = getRestrictedPaths(options); + const allowedTypeImportPathNameSet: Set = new Set(); + for (const restrictedPath of restrictedPaths) { + if ( + typeof restrictedPath === 'object' && + restrictedPath.allowTypeImports + ) { + allowedTypeImportPathNameSet.add(restrictedPath.name); + } + } + function isAllowedTypeImportPath(importSource: string): boolean { + return allowedTypeImportPathNameSet.has(importSource); + } + + const restrictedPatterns = getRestrictedPatterns(options); + const allowedImportTypeMatchers: Ignore[] = []; + for (const restrictedPattern of restrictedPatterns) { + if ( + typeof restrictedPattern === 'object' && + restrictedPattern.allowTypeImports + ) { + allowedImportTypeMatchers.push(ignore().add(restrictedPattern.group)); + } + } + function isAllowedTypeImportPattern(importSource: string): boolean { + return allowedImportTypeMatchers.every(matcher => { + return matcher.ignores(importSource); + }); + } + + return { + ImportDeclaration(node): void { + if (typeof node.source.value !== 'string') { + return; + } + if (node.importKind === 'type') { + const importSource = node.source.value.trim(); + if ( + !isAllowedTypeImportPath(importSource) && + !isAllowedTypeImportPattern(importSource) + ) { + return rules.ImportDeclaration(node); + } + } else { + return rules.ImportDeclaration(node); + } + }, + ExportNamedDeclaration(node): void { + if ( + node.source?.type !== AST_NODE_TYPES.Literal || + typeof node.source.value !== 'string' + ) { + return; + } + if (node.exportKind === 'type') { + const importSource = node.source.value.trim(); + if ( + !isAllowedTypeImportPath(importSource) && + !isAllowedTypeImportPattern(importSource) + ) { + return rules.ExportNamedDeclaration(node); + } + } else { + return rules.ExportNamedDeclaration(node); + } + }, + ExportAllDeclaration: rules.ExportAllDeclaration, + }; + }, +}); diff --git a/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts b/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts new file mode 100644 index 000000000000..a2c5951a8d14 --- /dev/null +++ b/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts @@ -0,0 +1,546 @@ +import { AST_NODE_TYPES } from '@typescript-eslint/experimental-utils'; +import rule from '../../src/rules/no-restricted-imports'; +import { RuleTester } from '../RuleTester'; + +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', +}); + +ruleTester.run('no-restricted-imports', rule, { + valid: [ + { + code: "import foo from 'foo';", + options: ['import1', 'import2'], + }, + { + code: "export { foo } from 'foo';", + options: ['import1', 'import2'], + }, + { + code: "import foo from 'foo';", + options: [{ paths: ['import1', 'import2'] }], + }, + { + code: "export { foo } from 'foo';", + options: [{ paths: ['import1', 'import2'] }], + }, + { + code: "import foo from 'foo';", + options: [ + { + paths: ['import1', 'import2'], + patterns: ['import1/private/*', 'import2/*', '!import2/good'], + }, + ], + }, + { + code: "export { foo } from 'foo';", + options: [ + { + paths: ['import1', 'import2'], + patterns: ['import1/private/*', 'import2/*', '!import2/good'], + }, + ], + }, + { + code: "import foo from 'foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + message: 'Please use import-bar instead.', + }, + { + name: 'import-baz', + message: 'Please use import-quux instead.', + }, + ], + }, + ], + }, + { + code: "export { foo } from 'foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + message: 'Please use import-bar instead.', + }, + { + name: 'import-baz', + message: 'Please use import-quux instead.', + }, + ], + }, + ], + }, + { + code: "import foo from 'foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + importNames: ['Bar'], + message: 'Please use Bar from /import-bar/baz/ instead.', + }, + ], + }, + ], + }, + { + code: "export { foo } from 'foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + importNames: ['Bar'], + message: 'Please use Bar from /import-bar/baz/ instead.', + }, + ], + }, + ], + }, + { + code: "import foo from 'foo';", + options: [ + { + patterns: [ + { + group: ['import1/private/*'], + message: 'usage of import1 private modules not allowed.', + }, + { + group: ['import2/*', '!import2/good'], + message: + 'import2 is deprecated, except the modules in import2/good.', + }, + ], + }, + ], + }, + { + code: "export { foo } from 'foo';", + options: [ + { + patterns: [ + { + group: ['import1/private/*'], + message: 'usage of import1 private modules not allowed.', + }, + { + group: ['import2/*', '!import2/good'], + message: + 'import2 is deprecated, except the modules in import2/good.', + }, + ], + }, + ], + }, + { + code: "import type foo from 'import-foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + message: 'Please use import-bar instead.', + allowTypeImports: true, + }, + ], + }, + ], + }, + { + code: "import type { Bar } from 'import-foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + importNames: ['Bar'], + message: 'Please use Bar from /import-bar/baz/ instead.', + allowTypeImports: true, + }, + ], + }, + ], + }, + { + code: "export type { Bar } from 'import-foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + importNames: ['Bar'], + message: 'Please use Bar from /import-bar/baz/ instead.', + allowTypeImports: true, + }, + ], + }, + ], + }, + { + code: "import type foo from 'import1/private/bar';", + options: [ + { + patterns: [ + { + group: ['import1/private/*'], + message: 'usage of import1 private modules not allowed.', + allowTypeImports: true, + }, + ], + }, + ], + }, + { + code: "export type { foo } from 'import1/private/bar';", + options: [ + { + patterns: [ + { + group: ['import1/private/*'], + message: 'usage of import1 private modules not allowed.', + allowTypeImports: true, + }, + ], + }, + ], + }, + { + code: "export * from 'foo';", + options: ['import1'], + }, + { + code: 'export { foo } from foo;', + options: ['import1', 'import2'], + }, + { + code: 'import { foo } from foo;', + options: ['import1', 'import2'], + }, + ], + invalid: [ + { + code: "import foo from 'import1';", + options: ['import1', 'import2'], + errors: [ + { + messageId: 'path', + type: AST_NODE_TYPES.ImportDeclaration, + }, + ], + }, + { + code: "export { foo } from 'import1';", + options: ['import1', 'import2'], + errors: [ + { + messageId: 'path', + type: AST_NODE_TYPES.ExportNamedDeclaration, + }, + ], + }, + { + code: "import foo from 'import1';", + options: [{ paths: ['import1', 'import2'] }], + errors: [ + { + messageId: 'path', + type: AST_NODE_TYPES.ImportDeclaration, + }, + ], + }, + { + code: "export { foo } from 'import1';", + options: [{ paths: ['import1', 'import2'] }], + errors: [ + { + messageId: 'path', + type: AST_NODE_TYPES.ExportNamedDeclaration, + }, + ], + }, + { + code: "import foo from 'import1/private/foo';", + options: [ + { + paths: ['import1', 'import2'], + patterns: ['import1/private/*', 'import2/*', '!import2/good'], + }, + ], + errors: [ + { + messageId: 'patterns', + type: AST_NODE_TYPES.ImportDeclaration, + }, + ], + }, + { + code: "export { foo } from 'import1/private/foo';", + options: [ + { + paths: ['import1', 'import2'], + patterns: ['import1/private/*', 'import2/*', '!import2/good'], + }, + ], + errors: [ + { + messageId: 'patterns', + type: AST_NODE_TYPES.ExportNamedDeclaration, + }, + ], + }, + { + code: "import foo from 'import-foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + message: 'Please use import-bar instead.', + }, + { + name: 'import-baz', + message: 'Please use import-quux instead.', + }, + ], + }, + ], + errors: [ + { + messageId: 'pathWithCustomMessage', + type: AST_NODE_TYPES.ImportDeclaration, + }, + ], + }, + { + code: "export { foo } from 'import-foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + message: 'Please use import-bar instead.', + }, + { + name: 'import-baz', + message: 'Please use import-quux instead.', + }, + ], + }, + ], + errors: [ + { + messageId: 'pathWithCustomMessage', + type: AST_NODE_TYPES.ExportNamedDeclaration, + }, + ], + }, + { + code: "import { Bar } from 'import-foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + importNames: ['Bar'], + message: 'Please use Bar from /import-bar/baz/ instead.', + }, + ], + }, + ], + errors: [ + { + messageId: 'importNameWithCustomMessage', + type: AST_NODE_TYPES.ImportDeclaration, + }, + ], + }, + { + code: "export { Bar } from 'import-foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + importNames: ['Bar'], + message: 'Please use Bar from /import-bar/baz/ instead.', + }, + ], + }, + ], + errors: [ + { + messageId: 'importNameWithCustomMessage', + type: AST_NODE_TYPES.ExportNamedDeclaration, + }, + ], + }, + { + code: "import foo from 'import1/private/foo';", + options: [ + { + patterns: [ + { + group: ['import1/private/*'], + message: 'usage of import1 private modules not allowed.', + }, + { + group: ['import2/*', '!import2/good'], + message: + 'import2 is deprecated, except the modules in import2/good.', + }, + ], + }, + ], + errors: [ + { + messageId: 'patternWithCustomMessage', + type: AST_NODE_TYPES.ImportDeclaration, + }, + ], + }, + { + code: "export { foo } from 'import1/private/foo';", + options: [ + { + patterns: [ + { + group: ['import1/private/*'], + message: 'usage of import1 private modules not allowed.', + }, + { + group: ['import2/*', '!import2/good'], + message: + 'import2 is deprecated, except the modules in import2/good.', + }, + ], + }, + ], + errors: [ + { + messageId: 'patternWithCustomMessage', + type: AST_NODE_TYPES.ExportNamedDeclaration, + }, + ], + }, + { + code: "import foo from 'import-foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + message: 'Please use import-bar instead.', + allowTypeImports: true, + }, + ], + }, + ], + errors: [ + { + messageId: 'pathWithCustomMessage', + type: AST_NODE_TYPES.ImportDeclaration, + }, + ], + }, + { + code: "import { Bar } from 'import-foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + importNames: ['Bar'], + message: 'Please use Bar from /import-bar/baz/ instead.', + allowTypeImports: true, + }, + ], + }, + ], + errors: [ + { + messageId: 'importNameWithCustomMessage', + type: AST_NODE_TYPES.ImportDeclaration, + }, + ], + }, + { + code: "export { Bar } from 'import-foo';", + options: [ + { + paths: [ + { + name: 'import-foo', + importNames: ['Bar'], + message: 'Please use Bar from /import-bar/baz/ instead.', + allowTypeImports: true, + }, + ], + }, + ], + errors: [ + { + messageId: 'importNameWithCustomMessage', + type: AST_NODE_TYPES.ExportNamedDeclaration, + }, + ], + }, + { + code: "import foo from 'import1/private/bar';", + options: [ + { + patterns: [ + { + group: ['import1/private/*'], + message: 'usage of import1 private modules not allowed.', + allowTypeImports: true, + }, + ], + }, + ], + errors: [ + { + messageId: 'patternWithCustomMessage', + type: AST_NODE_TYPES.ImportDeclaration, + }, + ], + }, + { + code: "export { foo } from 'import1/private/bar';", + options: [ + { + patterns: [ + { + group: ['import1/private/*'], + message: 'usage of import1 private modules not allowed.', + allowTypeImports: true, + }, + ], + }, + ], + errors: [ + { + messageId: 'patternWithCustomMessage', + type: AST_NODE_TYPES.ExportNamedDeclaration, + }, + ], + }, + { + code: "export * from 'import1';", + options: ['import1'], + errors: [ + { + messageId: 'path', + type: AST_NODE_TYPES.ExportAllDeclaration, + }, + ], + }, + ], +}); diff --git a/packages/eslint-plugin/typings/eslint-rules.d.ts b/packages/eslint-plugin/typings/eslint-rules.d.ts index d6677e9dc93a..ada68c89a769 100644 --- a/packages/eslint-plugin/typings/eslint-rules.d.ts +++ b/packages/eslint-plugin/typings/eslint-rules.d.ts @@ -860,3 +860,51 @@ declare module 'eslint/lib/rules/object-curly-spacing' { >; export = rule; } + +declare module 'eslint/lib/rules/no-restricted-imports' { + import { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; + + namespace rule { + export type ArrayOfStringOrObject = ( + | string + | { + name: string; + message?: string; + importNames?: string[]; + // extended + allowTypeImports?: boolean; + } + )[]; + export type ArrayOfStringOrObjectPatterns = + | string[] + | { + group: string[]; + message?: string; + // extended + allowTypeImports?: boolean; + }[]; + } + + interface ObjectOfPathsAndPatterns { + paths?: rule.ArrayOfStringOrObject; + patterns?: rule.ArrayOfStringOrObjectPatterns; + } + + const rule: TSESLint.RuleModule< + | 'path' + | 'pathWithCustomMessage' + | 'patterns' + | 'patternWithCustomMessage' + | 'everything' + | 'everythingWithCustomMessage' + | 'importName' + | 'importNameWithCustomMessage', + rule.ArrayOfStringOrObject | [ObjectOfPathsAndPatterns], + { + ImportDeclaration(node: TSESTree.ImportDeclaration): void; + ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void; + ExportAllDeclaration(node: TSESTree.ExportAllDeclaration): void; + } + >; + export = rule; +} diff --git a/yarn.lock b/yarn.lock index 4504cec2beee..8483f61f60ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5407,7 +5407,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.0.4, ignore@^5.0.5, ignore@^5.1.4, ignore@~5.1.8: +ignore@^5.0.4, ignore@^5.0.5, ignore@^5.1.4, ignore@^5.1.8, ignore@~5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== From 186135698b40b510ffff6a2402aa34f2726596ea Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Mon, 20 Sep 2021 18:38:48 -0300 Subject: [PATCH 350/473] fix(eslint-plugin): [padding-line-between-statements] problems within namespaces not being reported (#3869) --- .../rules/padding-line-between-statements.ts | 3 +- .../padding-line-between-statements.test.ts | 40 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts index f686476e5dee..2da4042fbf08 100644 --- a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts +++ b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts @@ -723,10 +723,11 @@ export default util.createRule({ if ( !node.parent || ![ - AST_NODE_TYPES.SwitchStatement, AST_NODE_TYPES.BlockStatement, AST_NODE_TYPES.Program, AST_NODE_TYPES.SwitchCase, + AST_NODE_TYPES.SwitchStatement, + AST_NODE_TYPES.TSModuleBlock, ].includes(node.parent.type) ) { return; diff --git a/packages/eslint-plugin/tests/rules/padding-line-between-statements.test.ts b/packages/eslint-plugin/tests/rules/padding-line-between-statements.test.ts index d018f189929f..c55a85de08b4 100644 --- a/packages/eslint-plugin/tests/rules/padding-line-between-statements.test.ts +++ b/packages/eslint-plugin/tests/rules/padding-line-between-statements.test.ts @@ -5056,5 +5056,45 @@ var a = 1 { messageId: 'expectedBlankLine' }, ], }, + { + // https://github.com/typescript-eslint/typescript-eslint/issues/3863 + code: ` +declare namespace Types { + type Foo = string; + type Bar = string; + interface FooBar { + [key: string]: string; + } + interface BarBaz { + [key: string]: string; + } +} + `, + output: ` +declare namespace Types { + type Foo = string; + + type Bar = string; + + interface FooBar { + [key: string]: string; + } + + interface BarBaz { + [key: string]: string; + } +} + + `, + options: [ + { blankLine: 'always', prev: '*', next: ['interface', 'type'] }, + ], + errors: [ + { messageId: 'expectedBlankLine' }, + { messageId: 'expectedBlankLine' }, + { messageId: 'expectedBlankLine' }, + { messageId: 'expectedBlankLine' }, + ], + }, ], }); From ed5e45983fa052accf3a7b5fcdbfcb15ed09490f Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Mon, 20 Sep 2021 18:39:56 -0300 Subject: [PATCH 351/473] fix(eslint-plugin): [no-var-requires] report problems within `NewExpression` (#3884) --- .../src/rules/no-var-requires.ts | 20 +++++++++++-------- .../tests/rules/no-var-requires.test.ts | 19 ++++++++++++++++++ 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-var-requires.ts b/packages/eslint-plugin/src/rules/no-var-requires.ts index 26c49cc9dd2f..d7ed1d16f7fb 100644 --- a/packages/eslint-plugin/src/rules/no-var-requires.ts +++ b/packages/eslint-plugin/src/rules/no-var-requires.ts @@ -25,20 +25,24 @@ export default util.createRule({ defaultOptions: [], create(context) { return { - CallExpression(node: TSESTree.CallExpression): void { + 'CallExpression[callee.name="require"]'( + node: TSESTree.CallExpression, + ): void { const parent = node.parent?.type === AST_NODE_TYPES.ChainExpression ? node.parent.parent : node.parent; + if ( - node.callee.type === AST_NODE_TYPES.Identifier && - node.callee.name === 'require' && parent && - (parent.type === AST_NODE_TYPES.VariableDeclarator || - parent.type === AST_NODE_TYPES.CallExpression || - parent.type === AST_NODE_TYPES.TSAsExpression || - parent.type === AST_NODE_TYPES.TSTypeAssertion || - parent.type === AST_NODE_TYPES.MemberExpression) + [ + AST_NODE_TYPES.CallExpression, + AST_NODE_TYPES.MemberExpression, + AST_NODE_TYPES.NewExpression, + AST_NODE_TYPES.TSAsExpression, + AST_NODE_TYPES.TSTypeAssertion, + AST_NODE_TYPES.VariableDeclarator, + ].includes(parent.type) ) { context.report({ node, diff --git a/packages/eslint-plugin/tests/rules/no-var-requires.test.ts b/packages/eslint-plugin/tests/rules/no-var-requires.test.ts index 688b010e4178..8c6ef638a16c 100644 --- a/packages/eslint-plugin/tests/rules/no-var-requires.test.ts +++ b/packages/eslint-plugin/tests/rules/no-var-requires.test.ts @@ -132,5 +132,24 @@ ruleTester.run('no-var-requires', rule, { }, ], }, + { + // https://github.com/typescript-eslint/typescript-eslint/issues/3883 + code: ` +const configValidator = new Validator(require('./a.json')); +configValidator.addSchema(require('./a.json')); + `, + errors: [ + { + messageId: 'noVarReqs', + line: 2, + column: 39, + }, + { + messageId: 'noVarReqs', + line: 3, + column: 27, + }, + ], + }, ], }); From 806eaac6af5325664634690e9ebd7ffaed276549 Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Mon, 20 Sep 2021 18:40:38 -0300 Subject: [PATCH 352/473] fix(experimental-utils): add missing signature for `isParenthesized` (#3887) --- .../ast-utils/eslint-utils/astUtilities.ts | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/astUtilities.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/astUtilities.ts index a7db43689a7b..8666ba8704de 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/astUtilities.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/astUtilities.ts @@ -1,6 +1,6 @@ import * as eslintUtils from 'eslint-utils'; -import { TSESTree } from '../../ts-estree'; import * as TSESLint from '../../ts-eslint'; +import { TSESTree } from '../../ts-estree'; /** * Get the proper location of a given function node to report. @@ -101,19 +101,23 @@ const hasSideEffect = eslintUtils.hasSideEffect as ( }, ) => boolean; -/** - * Check whether a given node is parenthesized or not. - * This function detects it correctly even if it's parenthesized by specific syntax. - * - * @see {@link https://eslint-utils.mysticatea.dev/api/ast-utils.html#isparenthesized} - * @returns `true` if the node is parenthesized. - * If `times` was given, it returns `true` only if the node is parenthesized the `times` times. - * For example, `isParenthesized(2, node, sourceCode)` returns true for `((foo))`, but not for `(foo)`. - */ -const isParenthesized = eslintUtils.isParenthesized as ( - node: TSESTree.Node, - sourceCode: TSESLint.SourceCode, -) => boolean; +const isParenthesized = eslintUtils.isParenthesized as { + /** + * Check whether a given node is parenthesized or not. + * This function detects it correctly even if it's parenthesized by specific syntax. + * + * @see {@link https://eslint-utils.mysticatea.dev/api/ast-utils.html#isparenthesized} + * @returns `true` if the node is parenthesized. + * If `times` was given, it returns `true` only if the node is parenthesized the `times` times. + * For example, `isParenthesized(2, node, sourceCode)` returns true for `((foo))`, but not for `(foo)`. + */ + (node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean; + ( + times: number, + node: TSESTree.Node, + sourceCode: TSESLint.SourceCode, + ): boolean; +}; export { getFunctionHeadLocation, From ebb33ed8bc29f69ca2a657ec5b31857c0aeb4b56 Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Mon, 20 Sep 2021 18:48:27 -0300 Subject: [PATCH 353/473] fix(eslint-plugin): [consistent-type-definitions] correct fix for `export default` (#3899) --- .../src/rules/consistent-type-definitions.ts | 13 ++++++++++ .../rules/consistent-type-definitions.test.ts | 26 ++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/src/rules/consistent-type-definitions.ts b/packages/eslint-plugin/src/rules/consistent-type-definitions.ts index f5b2c48a44f4..07d848db298a 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-definitions.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-definitions.ts @@ -122,6 +122,19 @@ export default util.createRule({ }); } + if ( + node.parent?.type === + AST_NODE_TYPES.ExportDefaultDeclaration + ) { + fixes.push( + fixer.removeRange([node.parent.range[0], node.range[0]]), + fixer.insertTextAfter( + node.body, + `\nexport default ${node.id.name}`, + ), + ); + } + return fixes; }, }); diff --git a/packages/eslint-plugin/tests/rules/consistent-type-definitions.test.ts b/packages/eslint-plugin/tests/rules/consistent-type-definitions.test.ts index 105c25724c23..f96672a213fc 100644 --- a/packages/eslint-plugin/tests/rules/consistent-type-definitions.test.ts +++ b/packages/eslint-plugin/tests/rules/consistent-type-definitions.test.ts @@ -1,5 +1,5 @@ import rule from '../../src/rules/consistent-type-definitions'; -import { RuleTester, noFormat } from '../RuleTester'; +import { noFormat, RuleTester } from '../RuleTester'; const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', @@ -281,5 +281,29 @@ declare global { }, ], }, + { + // https://github.com/typescript-eslint/typescript-eslint/issues/3894 + code: ` +export default interface Test { + bar(): string; + foo(): number; +} + `, + output: noFormat` +type Test = { + bar(): string; + foo(): number; +} +export default Test + `, + options: ['type'], + errors: [ + { + messageId: 'typeOverInterface', + line: 2, + column: 26, + }, + ], + }, ], }); From 477b0c72749f60f18d9d0b47a8e25da4241e7641 Mon Sep 17 00:00:00 2001 From: James Bromwell <943160+thw0rted@users.noreply.github.com> Date: Tue, 21 Sep 2021 01:43:14 +0200 Subject: [PATCH 354/473] docs(eslint-plugin): [no-misused-promises] improve examples (#3898) * Improve no-misused-promises docs Fixes #3892 * formatting Co-authored-by: Brad Zacher --- .../docs/rules/no-misused-promises.md | 65 ++++++++++++++----- 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/no-misused-promises.md b/packages/eslint-plugin/docs/rules/no-misused-promises.md index 6a4c2a557921..0d908890eda5 100644 --- a/packages/eslint-plugin/docs/rules/no-misused-promises.md +++ b/packages/eslint-plugin/docs/rules/no-misused-promises.md @@ -23,6 +23,25 @@ while (promise) { } ``` +Examples of **correct** code with `checksConditionals: true`: + +```ts +const promise = Promise.resolve('value'); + +// Always `await` the Promise in a conditional +if (await promise) { + // Do something +} + +const val = (await promise) ? 123 : 456; + +while (await promise) { + // Do something +} +``` + +--- + Examples of **incorrect** code for this rule with `checksVoidReturn: true`: ```ts @@ -37,37 +56,51 @@ new Promise(async (resolve, reject) => { const eventEmitter = new EventEmitter(); eventEmitter.on('some-event', async () => { + synchronousCall(); await doSomething(); + otherSynchronousCall(); }); ``` -Examples of **correct** code for this rule: +Examples of **correct** code with `checksVoidReturn: true`: ```ts -const promise = Promise.resolve('value'); - -if (await promise) { - // Do something -} - -const val = (await promise) ? 123 : 456; - -while (await promise) { - // Do something -} - +// for-of puts `await` in outer context for (const value of [1, 2, 3]) { await doSomething(value); } +// If outer context is not `async`, handle error explicitly +Promise.all( + [1, 2, 3].map(async value => { + await doSomething(value); + }), +).catch(handleError); + +// Use an async IIFE wrapper new Promise((resolve, reject) => { - // Do something - resolve(); + // combine with `void` keyword to tell `no-floating-promises` rule to ignore unhandled rejection + void (async () => { + await doSomething(); + resolve(); + })(); }); +// Name the async wrapper to call it later const eventEmitter = new EventEmitter(); eventEmitter.on('some-event', () => { - doSomething(); + const handler = async () => { + await doSomething(); + otherSynchronousCall(); + }; + + try { + synchronousCall(); + } catch (err) { + handleSpecificError(err); + } + + handler().catch(handleError); }); ``` From 25a42c0bbe92d1ecbc2e8ff9ef3a3ef413f728b0 Mon Sep 17 00:00:00 2001 From: Hirotaka Tagawa / wafuwafu13 Date: Tue, 21 Sep 2021 09:20:21 +0900 Subject: [PATCH 355/473] feat: Support `'latest'` as `ecmaVersion` (#3873) * feat: support latest ecmaversion * docs: add comment about ecmaVersion --- packages/parser/README.md | 11 ++++++----- packages/parser/src/parser.ts | 2 +- packages/parser/tests/lib/parser.ts | 5 +++++ packages/scope-manager/README.md | 3 ++- packages/scope-manager/src/analyze.ts | 9 +++++++-- .../tests/eslint-scope/map-ecma-version.test.ts | 5 +++++ packages/types/src/parser-options.ts | 8 ++++++-- 7 files changed, 32 insertions(+), 11 deletions(-) diff --git a/packages/parser/README.md b/packages/parser/README.md index d76219e1ae9f..f928738ceb22 100644 --- a/packages/parser/README.md +++ b/packages/parser/README.md @@ -53,7 +53,7 @@ interface ParserOptions { jsx?: boolean; globalReturn?: boolean; }; - ecmaVersion?: number; + ecmaVersion?: number | 'latest'; jsxPragma?: string | null; jsxFragmentName?: string | null; @@ -97,12 +97,13 @@ This options allows you to tell the parser if you want to allow global `return` Default `2018`. -Accepts any valid ECMAScript version number: +Accepts any valid ECMAScript version number or `'latest'`: -- A version: es3, es5, es6, es7, es8, es9, es10, es11, ..., or -- A year: es2015, es2016, es2017, es2018, es2019, es2020, ... +- A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, ..., or +- A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, ..., or +- `'latest'` -The value **must** be a number - so do not include the `es` prefix. +When it's a version or a year, the value **must** be a number - so do not include the `es` prefix. Specifies the version of ECMAScript syntax you want to use. This is used by the parser to determine how to perform scope analysis, and it affects the default diff --git a/packages/parser/src/parser.ts b/packages/parser/src/parser.ts index f304a837d8b6..bbb0e3a04d71 100644 --- a/packages/parser/src/parser.ts +++ b/packages/parser/src/parser.ts @@ -102,7 +102,7 @@ function parseForESLint( jsx: validateBoolean(options.ecmaFeatures.jsx), }); const analyzeOptions: AnalyzeOptions = { - ecmaVersion: options.ecmaVersion, + ecmaVersion: options.ecmaVersion === 'latest' ? 1e8 : options.ecmaVersion, globalReturn: options.ecmaFeatures.globalReturn, jsxPragma: options.jsxPragma, jsxFragmentName: options.jsxFragmentName, diff --git a/packages/parser/tests/lib/parser.ts b/packages/parser/tests/lib/parser.ts index 41e22a911f9b..0432c94252e5 100644 --- a/packages/parser/tests/lib/parser.ts +++ b/packages/parser/tests/lib/parser.ts @@ -18,6 +18,11 @@ describe('parser', () => { expect(() => parseForESLint(code, null)).not.toThrow(); }); + it("parseForESLint() should work if options.ecmaVersion is `'latest'`", () => { + const code = 'const valid = true;'; + expect(() => parseForESLint(code, { ecmaVersion: 'latest' })).not.toThrow(); + }); + it('parseAndGenerateServices() should be called with options', () => { const code = 'const valid = true;'; const spy = jest.spyOn(typescriptESTree, 'parseAndGenerateServices'); diff --git a/packages/scope-manager/README.md b/packages/scope-manager/README.md index 7671214e8d7c..5e62019ba877 100644 --- a/packages/scope-manager/README.md +++ b/packages/scope-manager/README.md @@ -39,8 +39,9 @@ interface AnalyzeOptions { /** * Which ECMAScript version is considered. * Defaults to `2018`. + * `'latest'` is converted to 1e8 at parser. */ - ecmaVersion?: EcmaVersion; + ecmaVersion?: EcmaVersion | 1e8; /** * Whether the whole script is executed under node.js environment. diff --git a/packages/scope-manager/src/analyze.ts b/packages/scope-manager/src/analyze.ts index 9845a3c17505..febd7a26652f 100644 --- a/packages/scope-manager/src/analyze.ts +++ b/packages/scope-manager/src/analyze.ts @@ -17,8 +17,9 @@ interface AnalyzeOptions { /** * Which ECMAScript version is considered. * Defaults to `2018`. + * `'latest'` is converted to 1e8 at parser. */ - ecmaVersion?: EcmaVersion; + ecmaVersion?: EcmaVersion | 1e8; /** * Whether the whole script is executed under node.js environment. @@ -81,7 +82,11 @@ const DEFAULT_OPTIONS: Required = { emitDecoratorMetadata: false, }; -function mapEcmaVersion(version: EcmaVersion | undefined): Lib { +/** + * Convert ecmaVersion to lib. + * `'latest'` is converted to 1e8 at parser. + */ +function mapEcmaVersion(version: EcmaVersion | 1e8 | undefined): Lib { if (version == null || version === 3 || version === 5) { return 'es5'; } diff --git a/packages/scope-manager/tests/eslint-scope/map-ecma-version.test.ts b/packages/scope-manager/tests/eslint-scope/map-ecma-version.test.ts index d8646fbb3539..9cf4cfab3d77 100644 --- a/packages/scope-manager/tests/eslint-scope/map-ecma-version.test.ts +++ b/packages/scope-manager/tests/eslint-scope/map-ecma-version.test.ts @@ -31,6 +31,11 @@ describe('ecma version mapping', () => { it("should map to 'es2018' when undefined", () => { expectMapping(undefined, 'es2018'); }); + + it("should map to 'esnext' when 'latest'", () => { + // `'latest'` is converted to 1e8 at parser. + expectMapping(1e8, 'esnext'); + }); }); const fakeNode = {} as unknown as TSESTree.Node; diff --git a/packages/types/src/parser-options.ts b/packages/types/src/parser-options.ts index 9a761a37b97d..18ecbee7943f 100644 --- a/packages/types/src/parser-options.ts +++ b/packages/types/src/parser-options.ts @@ -12,12 +12,16 @@ type EcmaVersion = | 9 | 10 | 11 + | 12 + | 13 | 2015 | 2016 | 2017 | 2018 | 2019 - | 2020; + | 2020 + | 2021 + | 2022; type SourceType = 'script' | 'module'; @@ -26,7 +30,7 @@ interface ParserOptions { globalReturn?: boolean; jsx?: boolean; }; - ecmaVersion?: EcmaVersion; + ecmaVersion?: EcmaVersion | 'latest'; // scope-manager specific jsxPragma?: string | null; From 41959199735a6d4fe3ae7825f3087e8fb249be9f Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Tue, 21 Sep 2021 10:23:54 +1000 Subject: [PATCH 356/473] feat(eslint-plugin): [no-type-alias]: add allowGenerics option (#3865) --- .../eslint-plugin/docs/rules/no-type-alias.md | 23 +++++++++++++++++++ .../eslint-plugin/src/rules/no-type-alias.ts | 17 ++++++++++++++ .../tests/rules/no-type-alias.test.ts | 17 ++++++++++++++ 3 files changed, 57 insertions(+) diff --git a/packages/eslint-plugin/docs/rules/no-type-alias.md b/packages/eslint-plugin/docs/rules/no-type-alias.md index 5b720b2f331d..a3b61f1da446 100644 --- a/packages/eslint-plugin/docs/rules/no-type-alias.md +++ b/packages/eslint-plugin/docs/rules/no-type-alias.md @@ -89,6 +89,7 @@ or more of the following you may pass an object with the options set as follows: - `allowLiterals` set to `"always"` will allow you to use type aliases with literal objects (Defaults to `"never"`) - `allowMappedTypes` set to `"always"` will allow you to use type aliases as mapping tools (Defaults to `"never"`) - `allowTupleTypes` set to `"always"` will allow you to use type aliases with tuples (Defaults to `"never"`) +- `allowGenerics` set to `"always"` will allow you to use type aliases with generics (Defaults to `"never"`) ### `allowAliases` @@ -555,6 +556,28 @@ type Foo = [number] & [number, number]; type Foo = [string] | [number]; ``` +### `allowGenerics` + +This applies to generic types, including TypeScript provided global utility types (`type Foo = Record`). + +The setting accepts the following options: + +- `"always"` or `"never"` to active or deactivate the feature. + +Examples of **correct** code for the `{ "allowGenerics": "always" }` options: + +```ts +type Foo = Bar; + +type Foo = Record; + +type Foo = Readonly; + +type Foo = Partial; + +type Foo = Omit; +``` + ## When Not To Use It When you can't express some shape with an interface or you need to use a union, tuple type, diff --git a/packages/eslint-plugin/src/rules/no-type-alias.ts b/packages/eslint-plugin/src/rules/no-type-alias.ts index 3e93a995e64d..6cd149dd77c7 100644 --- a/packages/eslint-plugin/src/rules/no-type-alias.ts +++ b/packages/eslint-plugin/src/rules/no-type-alias.ts @@ -27,6 +27,7 @@ type Options = [ allowLiterals?: Values; allowMappedTypes?: Values; allowTupleTypes?: Values; + allowGenerics?: 'always' | 'never'; }, ]; type MessageIds = 'noTypeAlias' | 'noCompositionAlias'; @@ -79,6 +80,9 @@ export default util.createRule({ allowTupleTypes: { enum: enumValues, }, + allowGenerics: { + enum: ['always', 'never'], + }, }, additionalProperties: false, }, @@ -93,6 +97,7 @@ export default util.createRule({ allowLiterals: 'never', allowMappedTypes: 'never', allowTupleTypes: 'never', + allowGenerics: 'never', }, ], create( @@ -106,6 +111,7 @@ export default util.createRule({ allowLiterals, allowMappedTypes, allowTupleTypes, + allowGenerics, }, ], ) { @@ -203,6 +209,13 @@ export default util.createRule({ return false; }; + const isValidGeneric = (type: TypeWithLabel): boolean => { + return ( + type.node.type === AST_NODE_TYPES.TSTypeReference && + type.node.typeParameters !== undefined + ); + }; + const checkAndReport = ( optionValue: Values, isTopLevel: boolean, @@ -260,6 +273,10 @@ export default util.createRule({ } else if (isValidTupleType(type)) { // tuple types checkAndReport(allowTupleTypes!, isTopLevel, type, 'Tuple Types'); + } else if (isValidGeneric(type)) { + if (allowGenerics === 'never') { + reportError(type.node, type.compositionType, isTopLevel, 'Generics'); + } } else if ( // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum type.node.type.endsWith('Keyword') || diff --git a/packages/eslint-plugin/tests/rules/no-type-alias.test.ts b/packages/eslint-plugin/tests/rules/no-type-alias.test.ts index 1f44675a8515..06d06f7672ec 100644 --- a/packages/eslint-plugin/tests/rules/no-type-alias.test.ts +++ b/packages/eslint-plugin/tests/rules/no-type-alias.test.ts @@ -481,6 +481,10 @@ type KeyNames = keyof typeof SCALARS; code: 'type Foo = new (bar: number) => string | null;', options: [{ allowConstructors: 'always' }], }, + { + code: 'type Foo = Record;', + options: [{ allowGenerics: 'always' }], + }, ], invalid: [ { @@ -3329,5 +3333,18 @@ type Foo = { }, ], }, + { + code: 'type Foo = Record;', + errors: [ + { + messageId: 'noTypeAlias', + data: { + alias: 'generics', + }, + line: 1, + column: 12, + }, + ], + }, ], }); From ffdb5ff9900e07374a2f3686447e3e2c78fbc38a Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Tue, 21 Sep 2021 03:37:47 -0300 Subject: [PATCH 357/473] fix(eslint-plugin): [prefer-regexp-exec] respect flags when using `RegExp` (#3855) --- .../src/rules/prefer-regexp-exec.ts | 27 +++++++-- .../tests/rules/prefer-regexp-exec.test.ts | 58 ++++++++++++++++++- 2 files changed, 80 insertions(+), 5 deletions(-) diff --git a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts index 0d6693715bac..ebb92364e464 100644 --- a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts +++ b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts @@ -75,13 +75,31 @@ export default createRule({ return result; } + function isLikelyToContainGlobalFlag( + node: TSESTree.CallExpressionArgument, + ): boolean { + if ( + node.type === AST_NODE_TYPES.CallExpression || + node.type === AST_NODE_TYPES.NewExpression + ) { + const [, flags] = node.arguments; + return ( + flags.type === AST_NODE_TYPES.Literal && + typeof flags.value === 'string' && + flags.value.includes('g') + ); + } + + return node.type === AST_NODE_TYPES.Identifier; + } + return { "CallExpression[arguments.length=1] > MemberExpression.callee[property.name='match'][computed=false]"( memberNode: TSESTree.MemberExpression, ): void { const objectNode = memberNode.object; const callNode = memberNode.parent as TSESTree.CallExpression; - const argumentNode = callNode.arguments[0]; + const [argumentNode] = callNode.arguments; const argumentValue = getStaticValue(argumentNode, globalScope); if ( @@ -96,9 +114,10 @@ export default createRule({ // Don't report regular expressions with global flag. if ( - argumentValue && - argumentValue.value instanceof RegExp && - argumentValue.value.flags.includes('g') + (!argumentValue && isLikelyToContainGlobalFlag(argumentNode)) || + (argumentValue && + argumentValue.value instanceof RegExp && + argumentValue.value.flags.includes('g')) ) { return; } 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 b45935108071..8a5bdfd099db 100644 --- a/packages/eslint-plugin/tests/rules/prefer-regexp-exec.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-regexp-exec.test.ts @@ -1,5 +1,5 @@ import rule from '../../src/rules/prefer-regexp-exec'; -import { RuleTester, getFixturesRootDir } from '../RuleTester'; +import { getFixturesRootDir, RuleTester } from '../RuleTester'; const rootPath = getFixturesRootDir(); @@ -56,6 +56,24 @@ const matchers = [{ match: (s: RegExp) => false }]; const file = ''; matchers.some(matcher => !!file.match(matcher)); `, + // https://github.com/typescript-eslint/typescript-eslint/issues/3477 + ` +function test(pattern: string) { + 'hello hello'.match(RegExp(pattern, 'g'))?.reduce(() => []); +} + `, + // https://github.com/typescript-eslint/typescript-eslint/issues/3477 + ` +function test(pattern: string) { + 'hello hello'.match(new RegExp(pattern, 'gi'))?.reduce(() => []); +} + `, + // https://github.com/typescript-eslint/typescript-eslint/issues/3477 + ` +const matchCount = (str: string, re: RegExp) => { + return (str.match(re) || []).length; +}; + `, ], invalid: [ { @@ -174,6 +192,44 @@ function f(s: T) { output: ` function f(s: T) { /thing/.exec(s); +} + `, + }, + { + code: ` +const text = 'something'; +const search = new RegExp('test', ''); +text.match(search); + `, + errors: [ + { + messageId: 'regExpExecOverStringMatch', + line: 4, + column: 6, + }, + ], + output: ` +const text = 'something'; +const search = new RegExp('test', ''); +search.exec(text); + `, + }, + { + code: ` +function test(pattern: string) { + 'check'.match(new RegExp(pattern, undefined)); +} + `, + errors: [ + { + messageId: 'regExpExecOverStringMatch', + line: 3, + column: 11, + }, + ], + output: ` +function test(pattern: string) { + new RegExp(pattern, undefined).exec('check'); } `, }, From 9e98b8f43ca6aadc9758a4e9a0d1d3c250af6cca Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Tue, 21 Sep 2021 03:42:54 -0300 Subject: [PATCH 358/473] fix(eslint-plugin): [prefer-return-this-type] handle generics properly in fixer (#3852) --- .../src/rules/prefer-return-this-type.ts | 24 ++++++--------- .../rules/prefer-return-this-type.test.ts | 29 ++++++++++++++++++- 2 files changed, 37 insertions(+), 16 deletions(-) diff --git a/packages/eslint-plugin/src/rules/prefer-return-this-type.ts b/packages/eslint-plugin/src/rules/prefer-return-this-type.ts index 5a41a29d0a04..9fcfcb042006 100644 --- a/packages/eslint-plugin/src/rules/prefer-return-this-type.ts +++ b/packages/eslint-plugin/src/rules/prefer-return-this-type.ts @@ -1,9 +1,9 @@ import { - TSESTree, AST_NODE_TYPES, + TSESTree, } from '@typescript-eslint/experimental-utils'; -import { createRule, forEachReturnStatement, getParserServices } from '../util'; import * as ts from 'typescript'; +import { createRule, forEachReturnStatement, getParserServices } from '../util'; type ClassLikeDeclaration = | TSESTree.ClassDeclaration @@ -40,13 +40,13 @@ export default createRule({ function tryGetNameInType( name: string, typeNode: TSESTree.TypeNode, - ): TSESTree.Identifier | undefined { + ): TSESTree.TSTypeReference | undefined { if ( typeNode.type === AST_NODE_TYPES.TSTypeReference && typeNode.typeName.type === AST_NODE_TYPES.Identifier && typeNode.typeName.name === name ) { - return typeNode.typeName; + return typeNode; } if (typeNode.type === AST_NODE_TYPES.TSUnionType) { @@ -130,29 +130,23 @@ export default createRule({ originalClass: ClassLikeDeclaration, ): void { const className = originalClass.id?.name; - if (!className) { - return; - } - - if (!originalFunc.returnType) { + if (!className || !originalFunc.returnType) { return; } - const classNameRef = tryGetNameInType( + const node = tryGetNameInType( className, originalFunc.returnType.typeAnnotation, ); - if (!classNameRef) { + if (!node) { return; } if (isFunctionReturningThis(originalFunc, originalClass)) { context.report({ - node: classNameRef, + node, messageId: 'useThisType', - fix(fixer) { - return fixer.replaceText(classNameRef, 'this'); - }, + fix: fixer => fixer.replaceText(node, 'this'), }); } } diff --git a/packages/eslint-plugin/tests/rules/prefer-return-this-type.test.ts b/packages/eslint-plugin/tests/rules/prefer-return-this-type.test.ts index 67864d22b6c8..a93590dfec04 100644 --- a/packages/eslint-plugin/tests/rules/prefer-return-this-type.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-return-this-type.test.ts @@ -1,5 +1,5 @@ import rule from '../../src/rules/prefer-return-this-type'; -import { RuleTester, getFixturesRootDir } from '../RuleTester'; +import { getFixturesRootDir, RuleTester } from '../RuleTester'; const rootPath = getFixturesRootDir(); @@ -281,6 +281,33 @@ class Foo { return this; } } +} + `, + }, + { + // https://github.com/typescript-eslint/typescript-eslint/issues/3842 + code: ` +class Animal { + eat(): Animal { + console.log("I'm moving!"); + return this; + } +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 10, + endColumn: 19, + }, + ], + output: ` +class Animal { + eat(): this { + console.log("I'm moving!"); + return this; + } } `, }, From 8aa87a136e7cd7b40fbf09fcfa26bf04d1c6d5fe Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Tue, 21 Sep 2021 03:44:58 -0300 Subject: [PATCH 359/473] fix(eslint-plugin): [no-require-imports] report only global `require` (#3871) --- .../src/rules/no-require-imports.ts | 20 ++++++++++++------- .../tests/rules/no-require-imports.test.ts | 5 +++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-require-imports.ts b/packages/eslint-plugin/src/rules/no-require-imports.ts index 91d81e0d8c53..9aa4b685dd22 100644 --- a/packages/eslint-plugin/src/rules/no-require-imports.ts +++ b/packages/eslint-plugin/src/rules/no-require-imports.ts @@ -1,4 +1,4 @@ -import { TSESTree } from '@typescript-eslint/experimental-utils'; +import { ASTUtils, TSESTree } from '@typescript-eslint/experimental-utils'; import * as util from '../util'; export default util.createRule({ @@ -18,13 +18,19 @@ export default util.createRule({ defaultOptions: [], create(context) { return { - 'CallExpression > Identifier[name="require"]'( - node: TSESTree.Identifier, + 'CallExpression[callee.name="require"]'( + node: TSESTree.CallExpression, ): void { - context.report({ - node: node.parent!, - messageId: 'noRequireImports', - }); + const variable = ASTUtils.findVariable(context.getScope(), 'require'); + + // ignore non-global require usage as it's something user-land custom instead + // of the commonjs standard + if (!variable?.identifiers.length) { + context.report({ + node, + messageId: 'noRequireImports', + }); + } }, TSExternalModuleReference(node): void { context.report({ diff --git a/packages/eslint-plugin/tests/rules/no-require-imports.test.ts b/packages/eslint-plugin/tests/rules/no-require-imports.test.ts index 606e4c47ce22..d884c77a6d65 100644 --- a/packages/eslint-plugin/tests/rules/no-require-imports.test.ts +++ b/packages/eslint-plugin/tests/rules/no-require-imports.test.ts @@ -17,6 +17,11 @@ ruleTester.run('no-require-imports', rule, { 'import lib9 = lib2.anotherSubImport;', "import lib10 from 'lib10';", "var lib3 = load?.('not_an_import');", + ` +import { createRequire } from 'module'; +const require = createRequire(); +require('remark-preset-prettier'); + `, ], invalid: [ { From dda9cee68a5cd78b358a854027999c739ac623e9 Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Tue, 21 Sep 2021 03:54:56 -0300 Subject: [PATCH 360/473] fix(eslint-plugin): [no-shadow] ignore type-only imports properly (#3868) --- packages/eslint-plugin/src/rules/no-shadow.ts | 25 ++++++++-- .../tests/rules/no-shadow.test.ts | 46 ++++++++++++++++++- 2 files changed, 66 insertions(+), 5 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-shadow.ts b/packages/eslint-plugin/src/rules/no-shadow.ts index 6eb2ef38f7c8..ea27f87e0831 100644 --- a/packages/eslint-plugin/src/rules/no-shadow.ts +++ b/packages/eslint-plugin/src/rules/no-shadow.ts @@ -1,9 +1,14 @@ import { - TSESTree, - TSESLint, AST_NODE_TYPES, + TSESLint, + TSESTree, } from '@typescript-eslint/experimental-utils'; -import { ScopeType } from '@typescript-eslint/scope-manager'; +import { + Definition, + DefinitionType, + ImportBindingDefinition, + ScopeType, +} from '@typescript-eslint/scope-manager'; import * as util from '../util'; type MessageIds = 'noShadow'; @@ -85,6 +90,15 @@ export default util.createRule({ return variable.defs[0].type === 'Parameter' && variable.name === 'this'; } + function isTypeImport( + definition: Definition, + ): definition is ImportBindingDefinition { + return ( + definition.type === DefinitionType.ImportBinding && + definition.parent.importKind === 'type' + ); + } + function isTypeValueShadow( variable: TSESLint.Scope.Variable, shadowed: TSESLint.Scope.Variable, @@ -98,8 +112,11 @@ export default util.createRule({ return false; } + const [firstDefinition] = shadowed.defs; const isShadowedValue = - 'isValueVariable' in shadowed ? shadowed.isValueVariable : true; + !('isValueVariable' in shadowed) || + !firstDefinition || + (!isTypeImport(firstDefinition) && shadowed.isValueVariable); return variable.isValueVariable !== isShadowedValue; } diff --git a/packages/eslint-plugin/tests/rules/no-shadow.test.ts b/packages/eslint-plugin/tests/rules/no-shadow.test.ts index f48adfc1b57c..c3e5a09f3441 100644 --- a/packages/eslint-plugin/tests/rules/no-shadow.test.ts +++ b/packages/eslint-plugin/tests/rules/no-shadow.test.ts @@ -1,6 +1,6 @@ +import { AST_NODE_TYPES } from '@typescript-eslint/experimental-utils'; import rule from '../../src/rules/no-shadow'; import { RuleTester } from '../RuleTester'; -import { AST_NODE_TYPES } from '@typescript-eslint/experimental-utils'; const ruleTester = new RuleTester({ parserOptions: { @@ -172,6 +172,18 @@ export class Wrapper { } } `, + { + // https://github.com/typescript-eslint/typescript-eslint/issues/3862 + code: ` +import type { foo } from './foo'; +type bar = number; + +// 'foo' is already declared in the upper scope +// 'bar' is fine +function doThing(foo: number, bar: number) {} + `, + options: [{ ignoreTypeValueShadow: true }], + }, ], invalid: [ { @@ -1398,5 +1410,37 @@ function foo(cb) { }, ], }, + { + code: ` +import type { foo } from './foo'; +function doThing(foo: number, bar: number) {} + `, + options: [{ ignoreTypeValueShadow: false }], + errors: [ + { + messageId: 'noShadow', + data: { name: 'foo' }, + type: AST_NODE_TYPES.Identifier, + line: 3, + column: 18, + }, + ], + }, + { + code: ` +import { foo } from './foo'; +function doThing(foo: number, bar: number) {} + `, + options: [{ ignoreTypeValueShadow: true }], + errors: [ + { + messageId: 'noShadow', + data: { name: 'foo' }, + type: AST_NODE_TYPES.Identifier, + line: 3, + column: 18, + }, + ], + }, ], }); From 13b7de508e0f8eac492879ff9ab99acd8d3e977e Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Tue, 21 Sep 2021 04:04:43 -0300 Subject: [PATCH 361/473] feat(eslint-plugin-internal): [prefer-ast-types-enum] add `DefinitionType` enum (#3916) --- packages/eslint-plugin-internal/package.json | 1 + .../src/rules/no-poorly-typed-ts-props.ts | 3 ++- .../src/rules/prefer-ast-types-enum.ts | 11 ++++++++--- .../tests/rules/no-poorly-typed-ts-props.test.ts | 3 ++- .../tests/rules/prefer-ast-types-enum.test.ts | 11 ++++++++++- .../src/rules/explicit-module-boundary-types.ts | 14 ++++++++------ .../eslint-plugin/src/rules/no-inferrable-types.ts | 3 +-- packages/eslint-plugin/src/rules/no-shadow.ts | 7 +++++-- packages/eslint-plugin/src/rules/no-type-alias.ts | 4 ++-- .../src/rules/no-unused-vars-experimental.ts | 4 +--- .../src/rules/no-use-before-define.ts | 13 +++++++------ .../eslint-plugin/tests/rules/ban-types.test.ts | 12 ++---------- .../tests/rules/naming-convention.test.ts | 5 +++-- .../rules/no-unused-vars-experimental.test.ts | 6 +++--- .../scope-manager/src/definition/DefinitionType.ts | 1 - .../tests/eslint-scope/references.test.ts | 1 + 16 files changed, 56 insertions(+), 43 deletions(-) diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 672744314a49..9d073886f83e 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -15,6 +15,7 @@ "dependencies": { "@types/prettier": "*", "@typescript-eslint/experimental-utils": "4.31.2", + "@typescript-eslint/scope-manager": "^4.31.2", "prettier": "*" } } diff --git a/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts b/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts index d5554ec57d54..96c1405c73f0 100644 --- a/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts +++ b/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts @@ -1,7 +1,7 @@ import { - TSESTree, ESLintUtils, TSESLint, + TSESTree, } from '@typescript-eslint/experimental-utils'; import { createRule } from '../util'; @@ -24,6 +24,7 @@ const BANNED_PROPERTIES = [ fixWith: 'getDeclarations()', }, { + // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum type: 'Type', property: 'symbol', fixWith: 'getSymbol()', diff --git a/packages/eslint-plugin-internal/src/rules/prefer-ast-types-enum.ts b/packages/eslint-plugin-internal/src/rules/prefer-ast-types-enum.ts index 8a5ec63bb4eb..c4a95695d967 100755 --- a/packages/eslint-plugin-internal/src/rules/prefer-ast-types-enum.ts +++ b/packages/eslint-plugin-internal/src/rules/prefer-ast-types-enum.ts @@ -3,6 +3,7 @@ import { AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/experimental-utils'; +import { DefinitionType } from '@typescript-eslint/scope-manager'; import { createRule } from '../util'; const isStringLiteral = ( @@ -17,7 +18,7 @@ export default createRule({ category: 'Best Practices', recommended: 'error', description: - 'Ensures consistent usage of AST_NODE_TYPES & AST_TOKEN_TYPES enums.', + 'Ensures consistent usage of `AST_NODE_TYPES`, `AST_TOKEN_TYPES` and `DefinitionType` enums.', }, messages: { preferEnum: 'Prefer {{ enumName }}.{{ literal }} over raw literal', @@ -28,7 +29,7 @@ export default createRule({ defaultOptions: [], create(context) { const report = ( - enumName: 'AST_NODE_TYPES' | 'AST_TOKEN_TYPES', + enumName: 'AST_NODE_TYPES' | 'AST_TOKEN_TYPES' | 'DefinitionType', literal: TSESTree.StringLiteral, ): void => context.report({ @@ -44,7 +45,7 @@ export default createRule({ if ( node.parent?.type === AST_NODE_TYPES.TSEnumMember && node.parent.parent?.type === AST_NODE_TYPES.TSEnumDeclaration && - ['AST_NODE_TYPES', 'AST_TOKEN_TYPES'].includes( + ['AST_NODE_TYPES', 'AST_TOKEN_TYPES', 'DefinitionType'].includes( node.parent.parent.id.name, ) ) { @@ -64,6 +65,10 @@ export default createRule({ if (Object.prototype.hasOwnProperty.call(AST_TOKEN_TYPES, value)) { report('AST_TOKEN_TYPES', node); } + + if (Object.prototype.hasOwnProperty.call(DefinitionType, value)) { + report('DefinitionType', node); + } }, }; }, diff --git a/packages/eslint-plugin-internal/tests/rules/no-poorly-typed-ts-props.test.ts b/packages/eslint-plugin-internal/tests/rules/no-poorly-typed-ts-props.test.ts index 8fe109ee3d13..4c9751489bd9 100644 --- a/packages/eslint-plugin-internal/tests/rules/no-poorly-typed-ts-props.test.ts +++ b/packages/eslint-plugin-internal/tests/rules/no-poorly-typed-ts-props.test.ts @@ -1,5 +1,6 @@ +/* eslint-disable @typescript-eslint/internal/prefer-ast-types-enum */ import rule from '../../src/rules/no-poorly-typed-ts-props'; -import { RuleTester, getFixturesRootDir } from '../RuleTester'; +import { getFixturesRootDir, RuleTester } from '../RuleTester'; const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', diff --git a/packages/eslint-plugin-internal/tests/rules/prefer-ast-types-enum.test.ts b/packages/eslint-plugin-internal/tests/rules/prefer-ast-types-enum.test.ts index c2ffd8e489e0..94f8830a04ed 100644 --- a/packages/eslint-plugin-internal/tests/rules/prefer-ast-types-enum.test.ts +++ b/packages/eslint-plugin-internal/tests/rules/prefer-ast-types-enum.test.ts @@ -2,8 +2,9 @@ import { AST_NODE_TYPES, AST_TOKEN_TYPES, } from '@typescript-eslint/experimental-utils'; +import { DefinitionType } from '@typescript-eslint/scope-manager'; import rule from '../../src/rules/prefer-ast-types-enum'; -import { RuleTester, batchedSingleLineTests } from '../RuleTester'; +import { batchedSingleLineTests, RuleTester } from '../RuleTester'; const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', @@ -17,6 +18,7 @@ ruleTester.run('prefer-ast-types-enum', rule, { "node.type === 'constructor';", 'node.type === AST_NODE_TYPES.Literal;', 'node.type === AST_TOKEN_TYPES.Keyword;', + 'node.type === DefinitionType.Parameter;', 'node.type === 1;', ` enum MY_ENUM { @@ -33,10 +35,12 @@ ruleTester.run('prefer-ast-types-enum', rule, { code: ` node.type === 'Literal'; node.type === 'Keyword'; +node.type === 'Parameter'; `, output: ` node.type === AST_NODE_TYPES.Literal; node.type === AST_TOKEN_TYPES.Keyword; +node.type === DefinitionType.Parameter; `, errors: [ { @@ -49,6 +53,11 @@ node.type === AST_TOKEN_TYPES.Keyword; messageId: 'preferEnum', line: 3, }, + { + data: { enumName: 'DefinitionType', literal: DefinitionType.Parameter }, + messageId: 'preferEnum', + line: 4, + }, ], }), }); diff --git a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts index bdcd9750c887..33caf65f19b4 100644 --- a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts +++ b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts @@ -1,7 +1,8 @@ import { - TSESTree, AST_NODE_TYPES, + TSESTree, } from '@typescript-eslint/experimental-utils'; +import { DefinitionType } from '@typescript-eslint/scope-manager'; import * as util from '../util'; import { checkFunctionExpressionReturnType, @@ -294,11 +295,12 @@ export default util.createRule({ for (const definition of variable.defs) { // cases we don't care about in this rule if ( - definition.type === 'ImplicitGlobalVariable' || - definition.type === 'ImportBinding' || - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum - definition.type === 'CatchClause' || - definition.type === 'Parameter' + [ + DefinitionType.ImplicitGlobalVariable, + DefinitionType.ImportBinding, + DefinitionType.CatchClause, + DefinitionType.Parameter, + ].includes(definition.type) ) { continue; } diff --git a/packages/eslint-plugin/src/rules/no-inferrable-types.ts b/packages/eslint-plugin/src/rules/no-inferrable-types.ts index 110bda41aea6..4edcf69c9758 100644 --- a/packages/eslint-plugin/src/rules/no-inferrable-types.ts +++ b/packages/eslint-plugin/src/rules/no-inferrable-types.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/internal/prefer-ast-types-enum */ import { AST_NODE_TYPES, TSESTree, @@ -129,7 +130,6 @@ export default util.createRule({ case AST_NODE_TYPES.TSBooleanKeyword: return ( hasUnaryPrefix(init, '!') || - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum isFunctionCall(init, 'Boolean') || isLiteral(init, 'boolean') ); @@ -151,7 +151,6 @@ export default util.createRule({ case AST_NODE_TYPES.TSStringKeyword: return ( - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum isFunctionCall(init, 'String') || isLiteral(init, 'string') || init.type === AST_NODE_TYPES.TemplateLiteral diff --git a/packages/eslint-plugin/src/rules/no-shadow.ts b/packages/eslint-plugin/src/rules/no-shadow.ts index ea27f87e0831..61a34c231d05 100644 --- a/packages/eslint-plugin/src/rules/no-shadow.ts +++ b/packages/eslint-plugin/src/rules/no-shadow.ts @@ -87,7 +87,10 @@ export default util.createRule({ * Check if variable is a `this` parameter. */ function isThisParam(variable: TSESLint.Scope.Variable): boolean { - return variable.defs[0].type === 'Parameter' && variable.name === 'this'; + return ( + variable.defs[0].type === DefinitionType.Parameter && + variable.name === 'this' + ); } function isTypeImport( @@ -293,7 +296,7 @@ export default util.createRule({ inner && outer[0] < inner[0] && inner[1] < outer[1] && - ((innerDef.type === 'FunctionName' && + ((innerDef.type === DefinitionType.FunctionName && innerDef.node.type === AST_NODE_TYPES.FunctionExpression) || innerDef.node.type === AST_NODE_TYPES.ClassExpression) && outerScope === innerScope.upper diff --git a/packages/eslint-plugin/src/rules/no-type-alias.ts b/packages/eslint-plugin/src/rules/no-type-alias.ts index 6cd149dd77c7..cf56745ca903 100644 --- a/packages/eslint-plugin/src/rules/no-type-alias.ts +++ b/packages/eslint-plugin/src/rules/no-type-alias.ts @@ -1,5 +1,6 @@ import { AST_NODE_TYPES, + AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/experimental-utils'; import * as util from '../util'; @@ -278,8 +279,7 @@ export default util.createRule({ reportError(type.node, type.compositionType, isTopLevel, 'Generics'); } } else if ( - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum - type.node.type.endsWith('Keyword') || + type.node.type.endsWith(AST_TOKEN_TYPES.Keyword) || aliasTypes.has(type.node.type) || (type.node.type === AST_NODE_TYPES.TSTypeOperator && (type.node.operator === 'keyof' || diff --git a/packages/eslint-plugin/src/rules/no-unused-vars-experimental.ts b/packages/eslint-plugin/src/rules/no-unused-vars-experimental.ts index 0aedd20cbb20..751543295229 100644 --- a/packages/eslint-plugin/src/rules/no-unused-vars-experimental.ts +++ b/packages/eslint-plugin/src/rules/no-unused-vars-experimental.ts @@ -1,5 +1,4 @@ -/* eslint-disable no-fallthrough */ - +/* eslint-disable @typescript-eslint/internal/prefer-ast-types-enum, no-fallthrough */ import { TSESTree } from '@typescript-eslint/experimental-utils'; import * as ts from 'typescript'; import * as util from '../util'; @@ -161,7 +160,6 @@ export default util.createRule({ break; case ts.SyntaxKind.PropertyDeclaration: - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum report('Property'); break; diff --git a/packages/eslint-plugin/src/rules/no-use-before-define.ts b/packages/eslint-plugin/src/rules/no-use-before-define.ts index 59680863c9bc..ef39ec9a5b7c 100644 --- a/packages/eslint-plugin/src/rules/no-use-before-define.ts +++ b/packages/eslint-plugin/src/rules/no-use-before-define.ts @@ -3,6 +3,7 @@ import { TSESLint, TSESTree, } from '@typescript-eslint/experimental-utils'; +import { DefinitionType } from '@typescript-eslint/scope-manager'; import * as util from '../util'; const SENTINEL_TYPE = @@ -44,14 +45,14 @@ function parseOptions(options: string | Config | null): Required { * Checks whether or not a given variable is a function declaration. */ function isFunction(variable: TSESLint.Scope.Variable): boolean { - return variable.defs[0].type === 'FunctionName'; + return variable.defs[0].type === DefinitionType.FunctionName; } /** * Checks whether or not a given variable is a type declaration. */ function isTypedef(variable: TSESLint.Scope.Variable): boolean { - return variable.defs[0].type === 'Type'; + return variable.defs[0].type === DefinitionType.Type; } /** @@ -62,7 +63,7 @@ function isOuterEnum( reference: TSESLint.Scope.Reference, ): boolean { return ( - variable.defs[0].type == 'TSEnumName' && + variable.defs[0].type == DefinitionType.TSEnumName && variable.scope.variableScope !== reference.from.variableScope ); } @@ -75,7 +76,7 @@ function isOuterClass( reference: TSESLint.Scope.Reference, ): boolean { return ( - variable.defs[0].type === 'ClassName' && + variable.defs[0].type === DefinitionType.ClassName && variable.scope.variableScope !== reference.from.variableScope ); } @@ -88,7 +89,7 @@ function isOuterVariable( reference: TSESLint.Scope.Reference, ): boolean { return ( - variable.defs[0].type === 'Variable' && + variable.defs[0].type === DefinitionType.Variable && variable.scope.variableScope !== reference.from.variableScope ); } @@ -142,7 +143,7 @@ function isClassRefInClassDecorator( variable: TSESLint.Scope.Variable, reference: TSESLint.Scope.Reference, ): boolean { - if (variable.defs[0].type !== 'ClassName') { + if (variable.defs[0].type !== DefinitionType.ClassName) { return false; } diff --git a/packages/eslint-plugin/tests/rules/ban-types.test.ts b/packages/eslint-plugin/tests/rules/ban-types.test.ts index 27743ecc5a3a..9dbd5344be50 100644 --- a/packages/eslint-plugin/tests/rules/ban-types.test.ts +++ b/packages/eslint-plugin/tests/rules/ban-types.test.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/internal/prefer-ast-types-enum */ import { TSESLint } from '@typescript-eslint/experimental-utils'; import rule, { MessageIds, @@ -5,7 +6,7 @@ import rule, { TYPE_KEYWORDS, } from '../../src/rules/ban-types'; import { objectReduceKey } from '../../src/util'; -import { RuleTester, noFormat } from '../RuleTester'; +import { noFormat, RuleTester } from '../RuleTester'; const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', @@ -163,7 +164,6 @@ ruleTester.run('ban-types', rule, { { messageId: 'bannedTypeMessage', data: { - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum name: 'String', customMessage: ' Use string instead.', }, @@ -180,7 +180,6 @@ ruleTester.run('ban-types', rule, { { messageId: 'bannedTypeMessage', data: { - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum name: 'String', customMessage: ' Use string instead.', }, @@ -197,7 +196,6 @@ ruleTester.run('ban-types', rule, { { messageId: 'bannedTypeMessage', data: { - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum name: 'String', customMessage: ' Use string instead.', }, @@ -242,7 +240,6 @@ class Foo extends Bar implements Baz { { messageId: 'bannedTypeMessage', data: { - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum name: 'String', customMessage: ' Use string instead.', }, @@ -252,7 +249,6 @@ class Foo extends Bar implements Baz { { messageId: 'bannedTypeMessage', data: { - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum name: 'String', customMessage: ' Use string instead.', }, @@ -271,7 +267,6 @@ class Foo extends Bar implements Baz { { messageId: 'bannedTypeMessage', data: { - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum name: 'String', customMessage: ' Use string instead.', }, @@ -296,7 +291,6 @@ class Foo extends Bar implements Baz { { messageId: 'bannedTypeMessage', data: { - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum name: 'String', customMessage: ' Use string instead.', }, @@ -306,7 +300,6 @@ class Foo extends Bar implements Baz { { messageId: 'bannedTypeMessage', data: { - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum name: 'String', customMessage: ' Use string instead.', }, @@ -316,7 +309,6 @@ class Foo extends Bar implements Baz { { messageId: 'bannedTypeMessage', data: { - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum name: 'String', customMessage: ' Use string instead.', }, diff --git a/packages/eslint-plugin/tests/rules/naming-convention.test.ts b/packages/eslint-plugin/tests/rules/naming-convention.test.ts index 5aa1606eaff9..1c693b4fde09 100644 --- a/packages/eslint-plugin/tests/rules/naming-convention.test.ts +++ b/packages/eslint-plugin/tests/rules/naming-convention.test.ts @@ -1,11 +1,12 @@ +/* eslint-disable @typescript-eslint/internal/prefer-ast-types-enum */ import { TSESLint } from '@typescript-eslint/experimental-utils'; import rule, { MessageIds, Options } from '../../src/rules/naming-convention'; import { PredefinedFormatsString, - selectorTypeToMessageString, Selector, + selectorTypeToMessageString, } from '../../src/rules/naming-convention-utils'; -import { RuleTester, getFixturesRootDir } from '../RuleTester'; +import { getFixturesRootDir, RuleTester } from '../RuleTester'; const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', diff --git a/packages/eslint-plugin/tests/rules/no-unused-vars-experimental.test.ts b/packages/eslint-plugin/tests/rules/no-unused-vars-experimental.test.ts index 67b9d22c86f5..6beaa6f0a0a6 100644 --- a/packages/eslint-plugin/tests/rules/no-unused-vars-experimental.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unused-vars-experimental.test.ts @@ -1,13 +1,14 @@ +/* eslint-disable @typescript-eslint/internal/prefer-ast-types-enum */ import { InvalidTestCase, ValidTestCase, } from '@typescript-eslint/experimental-utils/dist/ts-eslint'; import rule, { DEFAULT_IGNORED_REGEX_STRING, - Options, MessageIds, + Options, } from '../../src/rules/no-unused-vars-experimental'; -import { RuleTester, getFixturesRootDir } from '../RuleTester'; +import { getFixturesRootDir, RuleTester } from '../RuleTester'; const rootDir = getFixturesRootDir(); const ruleTester = new RuleTester({ @@ -544,7 +545,6 @@ export class Foo { messageId: 'unusedWithIgnorePattern', data: { name: 'foo', - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum type: 'Property', pattern: DEFAULT_IGNORED_REGEX, }, diff --git a/packages/scope-manager/src/definition/DefinitionType.ts b/packages/scope-manager/src/definition/DefinitionType.ts index 7f689d45ed54..5b01718ce7fa 100644 --- a/packages/scope-manager/src/definition/DefinitionType.ts +++ b/packages/scope-manager/src/definition/DefinitionType.ts @@ -1,5 +1,4 @@ enum DefinitionType { - // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum CatchClause = 'CatchClause', ClassName = 'ClassName', FunctionName = 'FunctionName', diff --git a/packages/scope-manager/tests/eslint-scope/references.test.ts b/packages/scope-manager/tests/eslint-scope/references.test.ts index 5f07dd671e93..8458fbfe657d 100644 --- a/packages/scope-manager/tests/eslint-scope/references.test.ts +++ b/packages/scope-manager/tests/eslint-scope/references.test.ts @@ -643,6 +643,7 @@ describe('References:', () => { expect(constructorParamTypeRef1.isValueReference).toBe(true); const setterParamTypeRef3 = classBScope.childScopes[1].references[0]; + // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum expect(setterParamTypeRef3.identifier.name).toBe('Type'); expect(setterParamTypeRef3.isTypeReference).toBe(true); expect(setterParamTypeRef3.isValueReference).toBe(false); From 9b13a86025860c71c4d805178833ec0902320d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Wed, 22 Sep 2021 08:50:28 +0200 Subject: [PATCH 362/473] refactor(eslint-plugin): remove unnecessary `if`-statements in `explicitReturnTypeUtils` (#3839) --- .../src/util/explicitReturnTypeUtils.ts | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts b/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts index c05d6c6dab35..881102b7e848 100644 --- a/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts +++ b/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts @@ -225,15 +225,11 @@ function isValidFunctionExpressionReturnType( } // https://github.com/typescript-eslint/typescript-eslint/issues/653 - if ( - options.allowDirectConstAssertionInArrowFunctions && + return ( + options.allowDirectConstAssertionInArrowFunctions === true && node.type === AST_NODE_TYPES.ArrowFunctionExpression && returnsConstAssertionDirectly(node) - ) { - return true; - } - - return false; + ); } /** @@ -250,11 +246,11 @@ function isValidFunctionReturnType( return true; } - if (node.returnType || isConstructor(node.parent) || isSetter(node.parent)) { - return true; - } - - return false; + return ( + node.returnType != null || + isConstructor(node.parent) || + isSetter(node.parent) + ); } /** From 02c6ff3c5a558f9308d7166d524156dc12e32759 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 27 Sep 2021 17:03:32 +0000 Subject: [PATCH 363/473] chore: publish v4.32.0 --- CHANGELOG.md | 28 ++++++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++ packages/ast-spec/package.json | 2 +- packages/eslint-plugin-internal/CHANGELOG.md | 11 ++++++++ packages/eslint-plugin-internal/package.json | 6 ++--- packages/eslint-plugin-tslint/CHANGELOG.md | 8 ++++++ packages/eslint-plugin-tslint/package.json | 6 ++--- packages/eslint-plugin/CHANGELOG.md | 26 ++++++++++++++++++ packages/eslint-plugin/package.json | 10 +++---- packages/experimental-utils/CHANGELOG.md | 11 ++++++++ packages/experimental-utils/package.json | 8 +++--- packages/parser/CHANGELOG.md | 11 ++++++++ packages/parser/package.json | 10 +++---- packages/scope-manager/CHANGELOG.md | 12 +++++++++ packages/scope-manager/package.json | 8 +++--- packages/shared-fixtures/CHANGELOG.md | 8 ++++++ packages/shared-fixtures/package.json | 2 +- packages/types/CHANGELOG.md | 11 ++++++++ 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 +-- 24 files changed, 184 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d94553bb0936..05027c8584c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) + + +### Bug Fixes + +* **eslint-plugin:** [consistent-type-definitions] correct fix for `export default` ([#3899](https://github.com/typescript-eslint/typescript-eslint/issues/3899)) ([ebb33ed](https://github.com/typescript-eslint/typescript-eslint/commit/ebb33ed8bc29f69ca2a657ec5b31857c0aeb4b56)) +* **eslint-plugin:** [no-require-imports] report only global `require` ([#3871](https://github.com/typescript-eslint/typescript-eslint/issues/3871)) ([8aa87a1](https://github.com/typescript-eslint/typescript-eslint/commit/8aa87a136e7cd7b40fbf09fcfa26bf04d1c6d5fe)) +* **eslint-plugin:** [no-shadow] ignore type-only imports properly ([#3868](https://github.com/typescript-eslint/typescript-eslint/issues/3868)) ([dda9cee](https://github.com/typescript-eslint/typescript-eslint/commit/dda9cee68a5cd78b358a854027999c739ac623e9)) +* **eslint-plugin:** [no-var-requires] report problems within `NewExpression` ([#3884](https://github.com/typescript-eslint/typescript-eslint/issues/3884)) ([ed5e459](https://github.com/typescript-eslint/typescript-eslint/commit/ed5e45983fa052accf3a7b5fcdbfcb15ed09490f)) +* **eslint-plugin:** [padding-line-between-statements] problems within namespaces not being reported ([#3869](https://github.com/typescript-eslint/typescript-eslint/issues/3869)) ([1861356](https://github.com/typescript-eslint/typescript-eslint/commit/186135698b40b510ffff6a2402aa34f2726596ea)) +* **eslint-plugin:** [prefer-regexp-exec] respect flags when using `RegExp` ([#3855](https://github.com/typescript-eslint/typescript-eslint/issues/3855)) ([ffdb5ff](https://github.com/typescript-eslint/typescript-eslint/commit/ffdb5ff9900e07374a2f3686447e3e2c78fbc38a)) +* **eslint-plugin:** [prefer-return-this-type] handle generics properly in fixer ([#3852](https://github.com/typescript-eslint/typescript-eslint/issues/3852)) ([9e98b8f](https://github.com/typescript-eslint/typescript-eslint/commit/9e98b8f43ca6aadc9758a4e9a0d1d3c250af6cca)) +* **eslint-plugin:** false-positive/negative with array index in no-unnecessary-condition ([#3805](https://github.com/typescript-eslint/typescript-eslint/issues/3805)) ([bdb8f0b](https://github.com/typescript-eslint/typescript-eslint/commit/bdb8f0be1466e4a4b713e91199be91030650ed01)) +* **experimental-utils:** add missing signature for `isParenthesized` ([#3887](https://github.com/typescript-eslint/typescript-eslint/issues/3887)) ([806eaac](https://github.com/typescript-eslint/typescript-eslint/commit/806eaac6af5325664634690e9ebd7ffaed276549)) + + +### Features + +* **eslint-plugin:** [no-type-alias]: add allowGenerics option ([#3865](https://github.com/typescript-eslint/typescript-eslint/issues/3865)) ([4195919](https://github.com/typescript-eslint/typescript-eslint/commit/41959199735a6d4fe3ae7825f3087e8fb249be9f)) +* **eslint-plugin:** add `no-non-null-asserted-nullish-coalescing` rule ([#3349](https://github.com/typescript-eslint/typescript-eslint/issues/3349)) ([4e99961](https://github.com/typescript-eslint/typescript-eslint/commit/4e999614e9761f6dc7e5aa0c5bad76ab164ab3fb)) +* **eslint-plugin:** add new extended rule `no-restricted-imports` ([#3775](https://github.com/typescript-eslint/typescript-eslint/issues/3775)) ([ec5d506](https://github.com/typescript-eslint/typescript-eslint/commit/ec5d50696b249a207d322e4a2fc66582122eb010)) +* **eslint-plugin-internal:** [prefer-ast-types-enum] add `DefinitionType` enum ([#3916](https://github.com/typescript-eslint/typescript-eslint/issues/3916)) ([13b7de5](https://github.com/typescript-eslint/typescript-eslint/commit/13b7de508e0f8eac492879ff9ab99acd8d3e977e)) +* Support `'latest'` as `ecmaVersion` ([#3873](https://github.com/typescript-eslint/typescript-eslint/issues/3873)) ([25a42c0](https://github.com/typescript-eslint/typescript-eslint/commit/25a42c0bbe92d1ecbc2e8ff9ef3a3ef413f728b0)) + + + + + ## [4.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) **Note:** Version bump only for package @typescript-eslint/typescript-eslint diff --git a/lerna.json b/lerna.json index b2c599ea7509..3a7290b4fef3 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.31.2", + "version": "4.32.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 62a359784061..2ad145708ec7 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + ## [4.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 4dc5ed6e7313..b0732df28fc3 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.31.2", + "version": "4.32.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 8ebd34fe72d1..ec3c822bf3be 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) + + +### Features + +* **eslint-plugin-internal:** [prefer-ast-types-enum] add `DefinitionType` enum ([#3916](https://github.com/typescript-eslint/typescript-eslint/issues/3916)) ([13b7de5](https://github.com/typescript-eslint/typescript-eslint/commit/13b7de508e0f8eac492879ff9ab99acd8d3e977e)) + + + + + ## [4.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) **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 9d073886f83e..6ee03af9082a 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.31.2", + "version": "4.32.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,8 +14,8 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.31.2", - "@typescript-eslint/scope-manager": "^4.31.2", + "@typescript-eslint/experimental-utils": "4.32.0", + "@typescript-eslint/scope-manager": "4.32.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index ef2a3e4042cb..78d7fdab633c 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.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) **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 da344e836d93..ba8dcac39f7b 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.31.2", + "version": "4.32.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.31.2", + "@typescript-eslint/experimental-utils": "4.32.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.31.2" + "@typescript-eslint/parser": "4.32.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 8c99e9fce56b..dc0cf8d25991 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,32 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) + + +### Bug Fixes + +* **eslint-plugin:** [consistent-type-definitions] correct fix for `export default` ([#3899](https://github.com/typescript-eslint/typescript-eslint/issues/3899)) ([ebb33ed](https://github.com/typescript-eslint/typescript-eslint/commit/ebb33ed8bc29f69ca2a657ec5b31857c0aeb4b56)) +* **eslint-plugin:** [no-require-imports] report only global `require` ([#3871](https://github.com/typescript-eslint/typescript-eslint/issues/3871)) ([8aa87a1](https://github.com/typescript-eslint/typescript-eslint/commit/8aa87a136e7cd7b40fbf09fcfa26bf04d1c6d5fe)) +* **eslint-plugin:** [no-shadow] ignore type-only imports properly ([#3868](https://github.com/typescript-eslint/typescript-eslint/issues/3868)) ([dda9cee](https://github.com/typescript-eslint/typescript-eslint/commit/dda9cee68a5cd78b358a854027999c739ac623e9)) +* **eslint-plugin:** [no-var-requires] report problems within `NewExpression` ([#3884](https://github.com/typescript-eslint/typescript-eslint/issues/3884)) ([ed5e459](https://github.com/typescript-eslint/typescript-eslint/commit/ed5e45983fa052accf3a7b5fcdbfcb15ed09490f)) +* **eslint-plugin:** [padding-line-between-statements] problems within namespaces not being reported ([#3869](https://github.com/typescript-eslint/typescript-eslint/issues/3869)) ([1861356](https://github.com/typescript-eslint/typescript-eslint/commit/186135698b40b510ffff6a2402aa34f2726596ea)) +* **eslint-plugin:** [prefer-regexp-exec] respect flags when using `RegExp` ([#3855](https://github.com/typescript-eslint/typescript-eslint/issues/3855)) ([ffdb5ff](https://github.com/typescript-eslint/typescript-eslint/commit/ffdb5ff9900e07374a2f3686447e3e2c78fbc38a)) +* **eslint-plugin:** [prefer-return-this-type] handle generics properly in fixer ([#3852](https://github.com/typescript-eslint/typescript-eslint/issues/3852)) ([9e98b8f](https://github.com/typescript-eslint/typescript-eslint/commit/9e98b8f43ca6aadc9758a4e9a0d1d3c250af6cca)) +* **eslint-plugin:** false-positive/negative with array index in no-unnecessary-condition ([#3805](https://github.com/typescript-eslint/typescript-eslint/issues/3805)) ([bdb8f0b](https://github.com/typescript-eslint/typescript-eslint/commit/bdb8f0be1466e4a4b713e91199be91030650ed01)) + + +### Features + +* **eslint-plugin:** [no-type-alias]: add allowGenerics option ([#3865](https://github.com/typescript-eslint/typescript-eslint/issues/3865)) ([4195919](https://github.com/typescript-eslint/typescript-eslint/commit/41959199735a6d4fe3ae7825f3087e8fb249be9f)) +* **eslint-plugin:** add `no-non-null-asserted-nullish-coalescing` rule ([#3349](https://github.com/typescript-eslint/typescript-eslint/issues/3349)) ([4e99961](https://github.com/typescript-eslint/typescript-eslint/commit/4e999614e9761f6dc7e5aa0c5bad76ab164ab3fb)) +* **eslint-plugin:** add new extended rule `no-restricted-imports` ([#3775](https://github.com/typescript-eslint/typescript-eslint/issues/3775)) ([ec5d506](https://github.com/typescript-eslint/typescript-eslint/commit/ec5d50696b249a207d322e4a2fc66582122eb010)) +* **eslint-plugin-internal:** [prefer-ast-types-enum] add `DefinitionType` enum ([#3916](https://github.com/typescript-eslint/typescript-eslint/issues/3916)) ([13b7de5](https://github.com/typescript-eslint/typescript-eslint/commit/13b7de508e0f8eac492879ff9ab99acd8d3e977e)) + + + + + ## [4.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index f08809f82950..eb7f95c789f7 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.31.2", + "version": "4.32.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,14 +44,14 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.31.2", - "@typescript-eslint/scope-manager": "4.31.2", + "@typescript-eslint/experimental-utils": "4.32.0", + "@typescript-eslint/scope-manager": "4.32.0", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", "regexpp": "^3.1.0", "semver": "^7.3.5", - "tsutils": "^3.21.0", - "ignore": "^5.1.8" + "tsutils": "^3.21.0" }, "devDependencies": { "@types/debug": "*", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 0b8fafa0d2be..ef9ae813f915 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) + + +### Bug Fixes + +* **experimental-utils:** add missing signature for `isParenthesized` ([#3887](https://github.com/typescript-eslint/typescript-eslint/issues/3887)) ([806eaac](https://github.com/typescript-eslint/typescript-eslint/commit/806eaac6af5325664634690e9ebd7ffaed276549)) + + + + + ## [4.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) **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 5f011a169ee7..d7a11ad73137 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.31.2", + "version": "4.32.0", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.31.2", - "@typescript-eslint/types": "4.31.2", - "@typescript-eslint/typescript-estree": "4.31.2", + "@typescript-eslint/scope-manager": "4.32.0", + "@typescript-eslint/types": "4.32.0", + "@typescript-eslint/typescript-estree": "4.32.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index efb5da204891..210eae073dac 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) + + +### Features + +* Support `'latest'` as `ecmaVersion` ([#3873](https://github.com/typescript-eslint/typescript-eslint/issues/3873)) ([25a42c0](https://github.com/typescript-eslint/typescript-eslint/commit/25a42c0bbe92d1ecbc2e8ff9ef3a3ef413f728b0)) + + + + + ## [4.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 8a463e8cec9c..f5ad76b71eaf 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.31.2", + "version": "4.32.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.31.2", - "@typescript-eslint/types": "4.31.2", - "@typescript-eslint/typescript-estree": "4.31.2", + "@typescript-eslint/scope-manager": "4.32.0", + "@typescript-eslint/types": "4.32.0", + "@typescript-eslint/typescript-estree": "4.32.0", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.31.2", + "@typescript-eslint/experimental-utils": "4.32.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 5662feb7769e..d3e5bac3b5d6 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) + + +### Features + +* **eslint-plugin-internal:** [prefer-ast-types-enum] add `DefinitionType` enum ([#3916](https://github.com/typescript-eslint/typescript-eslint/issues/3916)) ([13b7de5](https://github.com/typescript-eslint/typescript-eslint/commit/13b7de508e0f8eac492879ff9ab99acd8d3e977e)) +* Support `'latest'` as `ecmaVersion` ([#3873](https://github.com/typescript-eslint/typescript-eslint/issues/3873)) ([25a42c0](https://github.com/typescript-eslint/typescript-eslint/commit/25a42c0bbe92d1ecbc2e8ff9ef3a3ef413f728b0)) + + + + + ## [4.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) **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 c83b24422aa9..ad4cdea5cdfe 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.31.2", + "version": "4.32.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.31.2", - "@typescript-eslint/visitor-keys": "4.31.2" + "@typescript-eslint/types": "4.32.0", + "@typescript-eslint/visitor-keys": "4.32.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.31.2", + "@typescript-eslint/typescript-estree": "4.32.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index c4af0f153f0e..8210405eac66 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.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) **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 ccad5ff03a23..7f854b6450b0 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.31.2", + "version": "4.32.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index f9567e3da2ac..ad7cce491e25 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) + + +### Features + +* Support `'latest'` as `ecmaVersion` ([#3873](https://github.com/typescript-eslint/typescript-eslint/issues/3873)) ([25a42c0](https://github.com/typescript-eslint/typescript-eslint/commit/25a42c0bbe92d1ecbc2e8ff9ef3a3ef413f728b0)) + + + + + ## [4.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 99ae47c74284..b91fad4c218c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.31.2", + "version": "4.32.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 8c0ced40e8c1..3c059a4cd53e 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.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + ## [4.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) **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 6dd84a221247..d6ab57be6f25 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.31.2", + "version": "4.32.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.31.2", - "@typescript-eslint/visitor-keys": "4.31.2", + "@typescript-eslint/types": "4.32.0", + "@typescript-eslint/visitor-keys": "4.32.0", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.31.2", + "@typescript-eslint/shared-fixtures": "4.32.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index ab8eb606e431..d5b551708430 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.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.31.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.1...v4.31.2) (2021-09-20) **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 6b99e6cc6121..155fd9be2a4e 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.31.2", + "version": "4.32.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.31.2", + "@typescript-eslint/types": "4.32.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 7e4f775ceb6f0415eb7263a1e5ddb20897c37137 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Oct 2021 14:19:56 -0700 Subject: [PATCH 364/473] chore: bump pretty-format from 27.2.0 to 27.2.2 (#3927) Bumps [pretty-format](https://github.com/facebook/jest/tree/HEAD/packages/pretty-format) from 27.2.0 to 27.2.2. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v27.2.2/packages/pretty-format) --- updated-dependencies: - dependency-name: pretty-format dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8483f61f60ab..61e1607d7ccc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2526,10 +2526,10 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== +ansi-regex@^5.0.0, ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" @@ -8462,12 +8462,12 @@ prettier@2.3.2: integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6, pretty-format@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.0.tgz#ee37a94ce2a79765791a8649ae374d468c18ef19" - integrity sha512-KyJdmgBkMscLqo8A7K77omgLx5PWPiXJswtTtFV7XgVZv2+qPk6UivpXXO+5k6ZEbWIbLoKdx1pZ6ldINzbwTA== + version "27.2.2" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.2.tgz#c080f1ab7ac64302e4d438f208596fc649dbeeb3" + integrity sha512-+DdLh+rtaElc2SQOE/YPH8k2g3Rf2OXWEpy06p8Szs3hdVSYD87QOOlYRHWAeb/59XTmeVmRKvDD0svHqf6ycA== dependencies: "@jest/types" "^27.1.1" - ansi-regex "^5.0.0" + ansi-regex "^5.0.1" ansi-styles "^5.0.0" react-is "^17.0.1" From 18aafdae03e1454992638b26a0279e8dcf0cac6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Oct 2021 14:20:12 -0700 Subject: [PATCH 365/473] chore: bump @types/prettier from 2.3.2 to 2.4.0 (#3931) Bumps [@types/prettier](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/prettier) from 2.3.2 to 2.4.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/prettier) --- updated-dependencies: - dependency-name: "@types/prettier" dependency-type: direct:production update-type: version-update:semver-minor ... 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 61e1607d7ccc..14de7e27ece7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2323,9 +2323,9 @@ integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== "@types/prettier@*", "@types/prettier@^2.1.5", "@types/prettier@^2.2.3": - version "2.3.2" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.2.tgz#fc8c2825e4ed2142473b4a81064e6e081463d1b3" - integrity sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog== + version "2.4.0" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.0.tgz#900b13362610ccd3570fb6eefb911a6732973d00" + integrity sha512-WHRsy5nMpjXfU9B0LqOqPT06EI2+8Xv5NERy0pLxJLbU98q7uhcGogQzfX+rXpU7S5mgHsLxHrLCufZcV/P8TQ== "@types/rimraf@^3.0.0": version "3.0.2" From a689d0977f6f38b5e5da367dc6e04f11a4817170 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Oct 2021 14:20:20 -0700 Subject: [PATCH 366/473] chore: bump @microsoft/api-extractor from 7.18.9 to 7.18.11 (#3930) Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack) from 7.18.9 to 7.18.11. - [Release notes](https://github.com/microsoft/rushstack/releases) - [Commits](https://github.com/microsoft/rushstack/compare/@microsoft/api-extractor_v7.18.9...@microsoft/api-extractor_v7.18.11) --- updated-dependencies: - dependency-name: "@microsoft/api-extractor" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 56 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/yarn.lock b/yarn.lock index 14de7e27ece7..f28fc504164f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1788,32 +1788,32 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@microsoft/api-extractor-model@7.13.7": - version "7.13.7" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.7.tgz#2ae0948cb7458b336694c458675717ef8a9dcc85" - integrity sha512-emwhcaSF/h3WdqBWps4UU0RtGOGzy53IsplxuoLwtCuMAx3namYvJSfUGa5ajGPBao4MCyRYGsMc3EZ6IdR8cQ== +"@microsoft/api-extractor-model@7.13.9": + version "7.13.9" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.9.tgz#018fb37ac0147595832e13db17509f6adafbad9c" + integrity sha512-t/XKTr8MlHRWgDr1fkyCzTQRR5XICf/WzIFs8yw1JLU8Olw99M3by4/dtpOZNskfqoW+J8NwOxovduU2csi4Ww== dependencies: "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.40.2" + "@rushstack/node-core-library" "3.41.0" "@microsoft/api-extractor@^7.15.2": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.9.tgz#82f50f8791bfacd5e3dd5d9400cdb6d69a499249" - integrity sha512-N+fbG+6SwA1i6EW3iGRp/nAT8vQpRSDvZ1DzBUr8xIS7tNfJ0C75ndPPziUT8EmalhLixRnIw6Ncmur8AFELRg== + version "7.18.11" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.11.tgz#24910c2432362b09900b493a0713919b662cdb0f" + integrity sha512-WfN5MZry4TrF60OOcGadFDsGECF9JNKNT+8P/8crYAumAYQRitI2cUiQRlCWrgmFgCWNezsNZeI/2BggdnUqcg== dependencies: - "@microsoft/api-extractor-model" "7.13.7" + "@microsoft/api-extractor-model" "7.13.9" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.40.2" - "@rushstack/rig-package" "0.3.0" - "@rushstack/ts-command-line" "4.9.0" + "@rushstack/node-core-library" "3.41.0" + "@rushstack/rig-package" "0.3.1" + "@rushstack/ts-command-line" "4.9.1" colors "~1.2.1" lodash "~4.17.15" resolve "~1.17.0" semver "~7.3.0" source-map "~0.6.1" - typescript "~4.3.5" + typescript "~4.4.2" "@microsoft/tsdoc-config@~0.15.2": version "0.15.2" @@ -2079,12 +2079,12 @@ dependencies: "@types/node" ">= 8" -"@rushstack/node-core-library@3.40.2": - version "3.40.2" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.40.2.tgz#71d92180f14bafd212f720b2cfe8892e688159b6" - integrity sha512-wzcRucwnhOENTfx6hZ2M+CA1Zmp8Dr572mFFtjxmcQzBWTbNFRB1Mi1wLb7DLza+69OUBoSZcHUqydlwL+gvSA== +"@rushstack/node-core-library@3.41.0": + version "3.41.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.41.0.tgz#36f79ecf1a3c9b417690d95bbfcdf40390bf5f51" + integrity sha512-JxdmqR+SHU04jTDaZhltMZL3/XTz2ZZM47DTN+FSPUGUVp6WmxLlvJnT5FoHrOZWUjL/FoIlZUdUPTSXjTjIcg== dependencies: - "@types/node" "10.17.13" + "@types/node" "12.20.24" colors "~1.2.1" fs-extra "~7.0.1" import-lazy "~4.0.0" @@ -2094,18 +2094,18 @@ timsort "~0.3.0" z-schema "~3.18.3" -"@rushstack/rig-package@0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.0.tgz#334ad2846797861361b3445d4cc9ae9164b1885c" - integrity sha512-Lj6noF7Q4BBm1hKiBDw94e6uZvq1xlBwM/d2cBFaPqXeGdV+G6r3qaCWfRiSXK0pcHpGGpV5Tb2MdfhVcO6G/g== +"@rushstack/rig-package@0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.1.tgz#b70ab9ffe3b6347eb799f5c6c5b6f5882039a60f" + integrity sha512-DXQmrPWOCNoE2zPzHCShE1y47FlgbAg48wpaY058Qo/yKDzL0GlEGf5Ra2NIt22pMcp0R/HHh+kZGbqTnF4CrA== dependencies: resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.9.0": - version "4.9.0" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.9.0.tgz#781ba42cff73cae097b6d5241b6441e7cc2fe6e0" - integrity sha512-kmT8t+JfnvphISF1C5WwY56RefjwgajhSjs9J4ckvAFXZDXR6F5cvF5/RTh7fGCzIomg8esy2PHO/b52zFoZvA== +"@rushstack/ts-command-line@4.9.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.9.1.tgz#9fe594a408c7ef1b67f57b41ba931ecd3f420e92" + integrity sha512-zzoWB6OqVbMjnxlxbAUqbZqDWITUSHqwFCx7JbH5CVrjR9kcsB4NeWkN1I8GcR92beiOGvO3yPlB2NRo5Ugh+A== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" @@ -2307,7 +2307,7 @@ dependencies: node-fetch "*" -"@types/node@*", "@types/node@10.17.13", "@types/node@>= 8", "@types/node@^15.6.1": +"@types/node@*", "@types/node@12.20.24", "@types/node@>= 8", "@types/node@^15.6.1": version "15.12.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.2.tgz#1f2b42c4be7156ff4a6f914b2fb03d05fa84e38d" integrity sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww== @@ -9962,7 +9962,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.4.2, "typescript@>=3.3.1 <4.5.0", typescript@^4.1.0-dev.20201026, typescript@~4.3.5: +typescript@*, typescript@4.4.2, "typescript@>=3.3.1 <4.5.0", typescript@^4.1.0-dev.20201026, typescript@~4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86" integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ== From 184137a867590aa77cab53bff939b68b8fc9935f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Oct 2021 14:20:26 -0700 Subject: [PATCH 367/473] chore: bump @types/jest from 27.0.1 to 27.0.2 (#3928) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 27.0.1 to 27.0.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) --- updated-dependencies: - dependency-name: "@types/jest" dependency-type: direct:development update-type: version-update:semver-patch ... 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 f28fc504164f..05e95dbeadc8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2258,9 +2258,9 @@ "@types/jest" "*" "@types/jest@*", "@types/jest@^27.0.1": - version "27.0.1" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.0.1.tgz#fafcc997da0135865311bb1215ba16dba6bdf4ca" - integrity sha512-HTLpVXHrY69556ozYkcq47TtQJXpcWAWfkoqz+ZGz2JnmZhzlRjprCIyFnetSy8gpDWwTTGBcRVv1J1I1vBrHw== + version "27.0.2" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.0.2.tgz#ac383c4d4aaddd29bbf2b916d8d105c304a5fcd7" + integrity sha512-4dRxkS/AFX0c5XW6IPMNOydLn2tEhNhJV7DnYK+0bjoJZ+QTmfucBlihX7aoEsh/ocYtkLC73UbnBXBXIxsULA== dependencies: jest-diff "^27.0.0" pretty-format "^27.0.0" From 08d303a83b3f28b7d162eb6856bac26e86384fd1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Oct 2021 14:20:38 -0700 Subject: [PATCH 368/473] chore: bump is-glob from 4.0.1 to 4.0.2 (#3929) Bumps [is-glob](https://github.com/micromatch/is-glob) from 4.0.1 to 4.0.2. - [Release notes](https://github.com/micromatch/is-glob/releases) - [Commits](https://github.com/micromatch/is-glob/compare/4.0.1...4.0.2) --- updated-dependencies: - dependency-name: is-glob dependency-type: direct:production update-type: version-update:semver-patch ... 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 05e95dbeadc8..75487f7091f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5742,9 +5742,9 @@ is-glob@^3.1.0: is-extglob "^2.1.0" is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + version "4.0.2" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.2.tgz#859fc2e731e58c902f99fcabccb75a7dd07d29d8" + integrity sha512-ZZTOjRcDjuAAAv2cTBQP/lL59ZTArx77+7UzHdWW/XB1mrfp7DEaVpKmZ0XIzx+M7AxfhKcqV+nMetUQmFifwg== dependencies: is-extglob "^2.1.1" From 5a05362836a2680615d45cd853141c70232a1752 Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Sun, 3 Oct 2021 23:30:43 +0200 Subject: [PATCH 369/473] chore: add issue template to propose new rules (#3925) --- .../eslint-plugin-typescript.yml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/eslint-plugin-typescript.yml diff --git a/.github/ISSUE_TEMPLATE/eslint-plugin-typescript.yml b/.github/ISSUE_TEMPLATE/eslint-plugin-typescript.yml new file mode 100644 index 000000000000..36ab5d7985f9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/eslint-plugin-typescript.yml @@ -0,0 +1,41 @@ +name: Rule proposal +description: "Propose a new rule for the '@typescript-eslint/eslint-plugin' package" +title: "Rule proposal: " +labels: + - "enhancement: new base rule extension" + - "package: eslint-plugin" + - triage +body: + - type: markdown + attributes: + value: | + Before opening a new issue: + - Look for existing [open or closed rule proposals](https://github.com/typescript-eslint/typescript-eslint/issues?q=label%3A%22enhancement%3A+new+base+rule+extension%22) + - Look for [existing rules](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin) + - Ensure that the rule you want to propose is related to types. If not, consider looking into [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) + - type: textarea + validations: + required: true + attributes: + label: Description + description: Explain here why this rule would be beneficial + - type: textarea + validations: + required: true + attributes: + label: Fail + description: Specify an example of code that should be detected + value: | + ```ts + var replace = 'me'; + ``` + - type: textarea + validations: + required: true + attributes: + label: Pass + description: Specify an example of code that would be accepted in its place + value: | + ```ts + const replace = 'me'; + ``` From 214f898178ba593146d06a444487d32ec3363854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sun, 3 Oct 2021 23:32:27 +0200 Subject: [PATCH 370/473] feat(experimental-utils): extract `isNodeOfTypeWithConditions` out of `ast-utils`' `predicates` (#3837) --- .../src/ast-utils/predicates.ts | 61 +++++++++++-------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/predicates.ts index 7a7bcf520b1a..566cfbda493a 100644 --- a/packages/experimental-utils/src/ast-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/predicates.ts @@ -7,6 +7,28 @@ const isNodeOfType = ): node is TSESTree.Node & { type: NodeType } => node?.type === nodeType; +type ObjectEntry = [keyof BaseType, BaseType[keyof BaseType]]; +type ObjectEntries = Array>; +const isNodeOfTypeWithConditions = < + NodeType extends AST_NODE_TYPES, + Conditions extends Partial, +>( + nodeType: NodeType, + conditions: Conditions, +): (( + node: TSESTree.Node | null | undefined, +) => node is TSESTree.Node & { type: NodeType } & Conditions) => { + const entries = Object.entries(conditions) as ObjectEntries< + TSESTree.Node & { type: NodeType } + >; + + return ( + node: TSESTree.Node | null | undefined, + ): node is TSESTree.Node & { type: NodeType } & Conditions => + node?.type === nodeType && + entries.every(([key, value]) => node[key] === value); +}; + function isOptionalChainPunctuator( token: TSESTree.Token, ): token is TSESTree.PunctuatorToken & { value: '?.' } { @@ -35,27 +57,20 @@ function isNotNonNullAssertionPunctuator( /** * Returns true if and only if the node represents: foo?.() or foo.bar?.() */ -function isOptionalCallExpression( - node: TSESTree.Node, -): node is TSESTree.CallExpression & { optional: true } { - return ( - node.type === AST_NODE_TYPES.CallExpression && - // this flag means the call expression itself is option - // i.e. it is foo.bar?.() and not foo?.bar() - node.optional - ); -} +const isOptionalCallExpression = isNodeOfTypeWithConditions( + AST_NODE_TYPES.CallExpression, + // this flag means the call expression itself is option + // i.e. it is foo.bar?.() and not foo?.bar() + { optional: true }, +); /** * Returns true if and only if the node represents logical OR */ -function isLogicalOrOperator( - node: TSESTree.Node, -): node is TSESTree.LogicalExpression & { operator: '||' } { - return ( - node.type === AST_NODE_TYPES.LogicalExpression && node.operator === '||' - ); -} +const isLogicalOrOperator = isNodeOfTypeWithConditions( + AST_NODE_TYPES.LogicalExpression, + { operator: '||' }, +); /** * Checks if a node is a type assertion: @@ -165,14 +180,10 @@ function isClassOrTypeElement( /** * Checks if a node is a constructor method. */ -function isConstructor( - node: TSESTree.Node | undefined, -): node is TSESTree.MethodDefinition { - return ( - node?.type === AST_NODE_TYPES.MethodDefinition && - node.kind === 'constructor' - ); -} +const isConstructor = isNodeOfTypeWithConditions( + AST_NODE_TYPES.MethodDefinition, + { kind: 'constructor' }, +); /** * Checks if a node is a setter method. From 3c773e475b21e0fec28529ba6b6d36b6fddf6a55 Mon Sep 17 00:00:00 2001 From: Lucas Genzelis Date: Sun, 3 Oct 2021 18:48:34 -0300 Subject: [PATCH 371/473] docs(eslint-plugin): [no-unsafe-argument] fix grammar (#3889) * Update no-unsafe-argument.md fixed grammar * chore: fixes grammar error --- packages/eslint-plugin/README.md | 2 +- packages/eslint-plugin/docs/rules/no-unsafe-argument.md | 2 +- packages/eslint-plugin/src/rules/no-unsafe-argument.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index c8c783dba6f0..87ed9c2a276d 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -145,7 +145,7 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@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 | :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-argument`](./docs/rules/no-unsafe-argument.md) | Disallows calling a 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 | :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: | diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-argument.md b/packages/eslint-plugin/docs/rules/no-unsafe-argument.md index d8e3456d18a8..8065f838462e 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-argument.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-argument.md @@ -1,4 +1,4 @@ -# Disallows calling an function with an any type value (`no-unsafe-argument`) +# Disallows calling a function with an any type value (`no-unsafe-argument`) Despite your best intentions, the `any` type can sometimes leak into your codebase. Call a function with `any` typed argument are not checked at all by TypeScript, so it creates a potential safety hole, and source of bugs in your codebase. diff --git a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts index aef8f927bea9..053485f9228f 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts @@ -137,7 +137,7 @@ export default util.createRule<[], MessageIds>({ meta: { type: 'problem', docs: { - description: 'Disallows calling an function with an any type value', + description: 'Disallows calling a function with an any type value', category: 'Possible Errors', // TODO - enable this with next breaking recommended: false, From 35a8acfc5225ff6a493b2aad28849d2b736f13e6 Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Sun, 3 Oct 2021 18:49:18 -0300 Subject: [PATCH 372/473] refactor(eslint-plugin): [no-shadow] use `findVariable` from utils (#3921) --- packages/eslint-plugin/src/rules/no-shadow.ts | 30 +++---------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-shadow.ts b/packages/eslint-plugin/src/rules/no-shadow.ts index 61a34c231d05..a49afd502cfe 100644 --- a/packages/eslint-plugin/src/rules/no-shadow.ts +++ b/packages/eslint-plugin/src/rules/no-shadow.ts @@ -1,4 +1,5 @@ import { + ASTUtils, AST_NODE_TYPES, TSESLint, TSESTree, @@ -340,31 +341,6 @@ export default util.createRule({ ); } - /** - * Finds the variable by a given name in a given scope and its upper scopes. - * @param initScope A scope to start find. - * @param name A variable name to find. - * @returns A found variable or `null`. - */ - function getVariableByName( - initScope: TSESLint.Scope.Scope | null, - name: string, - ): TSESLint.Scope.Variable | null { - let scope = initScope; - - while (scope) { - const variable = scope.set.get(name); - - if (variable) { - return variable; - } - - scope = scope.upper; - } - - return null; - } - /** * Checks the current context for shadowed variables. * @param {Scope} scope Fixme @@ -404,7 +380,9 @@ export default util.createRule({ } // Gets shadowed variable. - const shadowed = getVariableByName(scope.upper, variable.name); + const shadowed = scope.upper + ? ASTUtils.findVariable(scope.upper, variable.name) + : null; if (!shadowed) { continue; } From ee5dfd4989ab465d65ba3424e36b7f0964558191 Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 3 Oct 2021 21:50:20 +0000 Subject: [PATCH 373/473] fix(experimental-utils): add `getPhysicalFilename()` to `RuleContext` (#3934) --- packages/experimental-utils/src/ts-eslint/Rule.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index 24b8fd4fa114..544428ea963e 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -230,6 +230,13 @@ interface RuleContext< */ getFilename(): string; + /** + * Returns the full path of the file on disk without any code block information (unlike `getFilename()`). + * This was added in v7.28.0 + * @since 7.28.0 + */ + getPhysicalFilename?(): string; + /** * Returns the scope of the currently-traversed node. * This information can be used track references to variables. From 972e2c20bfe58f5243ea7132fd4c205bd4c93317 Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 3 Oct 2021 21:51:10 +0000 Subject: [PATCH 374/473] chore: update nx to 12.9 and leverage NX_CLOUD_ENV_NAME (#3935) * chore: update nx to 12.9 and leverage NX_CLOUD_ENV_NAME * chore: cannot reference other env variables in env --- .github/workflows/ci.yml | 5 ++ package.json | 8 +-- yarn.lock | 110 ++++++++++++++++++++++----------------- 3 files changed, 71 insertions(+), 52 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70c540bb07dd..680e6437cceb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,8 @@ env: PRIMARY_NODE_VERSION: 12 NX_BRANCH: ${{ github.event.number }} NX_RUN_GROUP: ${{ github.run_id }} + # Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app + NX_CLOUD_ENV_NAME: "Node 12.x -" jobs: typecheck: @@ -223,6 +225,9 @@ jobs: strategy: matrix: node-version: [10.x, 14.x] + env: + # Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app + NX_CLOUD_ENV_NAME: "Node ${{ matrix.node-version }} -" steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} diff --git a/package.json b/package.json index 5e93f9be4ca3..b677dcf76ed3 100644 --- a/package.json +++ b/package.json @@ -77,10 +77,10 @@ "@commitlint/cli": "^13.1.0", "@commitlint/config-conventional": "^13.1.0", "@commitlint/config-lerna-scopes": "^13.1.0", - "@nrwl/cli": "12.7.2", - "@nrwl/nx-cloud": "12.3.10", - "@nrwl/tao": "12.7.2", - "@nrwl/workspace": "12.7.2", + "@nrwl/cli": "12.9.0", + "@nrwl/nx-cloud": "12.3.13", + "@nrwl/tao": "12.9.0", + "@nrwl/workspace": "12.9.0", "@types/babel__code-frame": "^7.0.2", "@types/debug": "^4.1.5", "@types/eslint-visitor-keys": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 75487f7091f0..964af57c3f5a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1864,37 +1864,37 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@nrwl/cli@12.7.2": - version "12.7.2" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.7.2.tgz#7a7f0dae1959431763e3c37b54fa368141e549ba" - integrity sha512-MYzHFk/vfgFi6LVbKlBymBIA5fHm72ES9+FvNdYacwiyWlInuBVLAb6McX2zfY6gioxyUOUBPXuBvGxbGtb6qQ== +"@nrwl/cli@*", "@nrwl/cli@12.9.0": + version "12.9.0" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.9.0.tgz#f5fccd973006ad2802d7c823b28820ac1fa6c27c" + integrity sha512-YKTZ3G07f6Y4MedOOkBmCi1Y72gu3ssCk2J50wL76SaiSjJTUSAz1NkKLsPwO6S8/QloMSR71tI42HJG2bbpwQ== dependencies: - "@nrwl/tao" "12.7.2" + "@nrwl/tao" "12.9.0" chalk "4.1.0" v8-compile-cache "2.3.0" yargs "15.4.1" yargs-parser "20.0.0" -"@nrwl/devkit@12.7.2": - version "12.7.2" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.7.2.tgz#3ea39590dc29d6aa6cf970bc195c99641ae0b0ec" - integrity sha512-Uk0DOkQ35sAMSMQPWNo+n4muDAueX651Seb66GSVbeHrFGNGPOM4X1iElYqocXevnMta1Q3xwragudXSdAnHkw== +"@nrwl/devkit@12.9.0": + version "12.9.0" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.9.0.tgz#fbf6eb715d1deb22fa919bceb3dff7a5c990d415" + integrity sha512-mobW2XKmQicTdhn0XQStNnYmhMC0Aj7qqX9lS/8IX561PtgocR0MPH9rTWOfNECpwHhj2YwTRTHjQfgv29btxw== dependencies: - "@nrwl/tao" "12.7.2" + "@nrwl/tao" "12.9.0" ejs "^3.1.5" ignore "^5.0.4" rxjs "^6.5.4" semver "7.3.4" tslib "^2.0.0" -"@nrwl/jest@12.7.2": - version "12.7.2" - resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.7.2.tgz#5aecf205a5d221c7b49dc05825db1bda7e2de3ec" - integrity sha512-kfBgCtdvobkjVqcQMN5NrkZXOVJPxspRtmSpe0o4D5eTgPPYSAAgPhcGZJ5b3RVV7PetqGG75AgNL5L1GtodHA== +"@nrwl/jest@12.9.0": + version "12.9.0" + resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.9.0.tgz#fb20631274c2462b73a0cb88d73ba7897c35e303" + integrity sha512-PHPG6DlwNgrT4+uplJqM814k+gqNV/m85FIes6JkzRO8XMK9jmqF0hwJvyymCZHDmGXMqwa0muoxkjoJs2CI/A== dependencies: "@jest/reporters" "27.0.6" "@jest/test-result" "27.0.6" - "@nrwl/devkit" "12.7.2" + "@nrwl/devkit" "12.9.0" chalk "4.1.0" identity-obj-proxy "3.0.0" jest-config "27.0.6" @@ -1903,38 +1903,40 @@ rxjs "^6.5.4" tslib "^2.0.0" -"@nrwl/linter@12.7.2": - version "12.7.2" - resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.7.2.tgz#db22b83ee74c6ed4bf953d0b833c5a28b20c6d63" - integrity sha512-dHuzxiOML8DvK5ed3o9P2vqyjFnRs+9+oyIC/ODGEupvDEKxDRemybTjuEAM30vMmDIJdHI/NOlEd/nxbW+6JA== +"@nrwl/linter@12.9.0": + version "12.9.0" + resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.9.0.tgz#1633045cb64871fb89eaced8c5b66664211237c6" + integrity sha512-8acZTT0nkwi914uJ6fMhZT6fZMMKOUGGjEWhvw9D3Lhe0aACsnXXSB+hJh+E8qchcGMYliqXuSi3X4Liq/fUFw== dependencies: - "@nrwl/devkit" "12.7.2" + "@nrwl/devkit" "12.9.0" + "@nrwl/jest" "12.9.0" glob "7.1.4" minimatch "3.0.4" tmp "~0.2.1" tslib "^2.0.0" -"@nrwl/nx-cloud@12.3.10": - version "12.3.10" - resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.3.10.tgz#ced00d87b584eb40c1732089c1bc2df544b8a2cc" - integrity sha512-5ZychlcrcDrPEdpPOsH1/UcakunK9PzhgCQmrFA+fHXRxzRbLE4K/Mz8dyIs+1aloXhMoYPncHsnRRwxyLhjXQ== +"@nrwl/nx-cloud@12.3.13": + version "12.3.13" + resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.3.13.tgz#f2ebf28ab918af8cc61e9d45f070c4459ba42703" + integrity sha512-t+msfqNhhIvYMSdsh5WMcgpggHjX+RkORboNyGZS1KA6iL9mFABYxroiOeB9JxwGiA4HMjejyOVu0CzKfB8pyw== dependencies: axios "^0.21.1" chalk "4.1.0" node-machine-id "^1.1.12" rxjs "6.5.5" strip-json-comments "^3.1.1" - tar "5.0.7" + tar "6.1.11" -"@nrwl/tao@12.7.2": - version "12.7.2" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.7.2.tgz#73dd6a0bc7f64d9a823560c8aede0953c0a15dd5" - integrity sha512-LnylUSOznJ+EDmJWu7vvQTnAERPTjKRHznShTe6eMoaJUH0ds3WSGMBxLUulzN2P5dWqO9u26GWMZpInYWwkfA== +"@nrwl/tao@12.9.0": + version "12.9.0" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.9.0.tgz#f8470ac0dccd5df414afc244fbbf37c23eb75764" + integrity sha512-a97JYoLohhBRthnWAGMh3++8Ri/yvCQUG/INBAYxW6sWAk2owJ6DIEIERP4yhIW29HPdqZ/fA2k9iqU6EgIAew== dependencies: chalk "4.1.0" enquirer "~2.3.6" fs-extra "^9.1.0" jsonc-parser "3.0.0" + nx "12.9.0" rxjs "^6.5.4" rxjs-for-await "0.0.2" semver "7.3.4" @@ -1942,15 +1944,15 @@ tslib "^2.0.0" yargs-parser "20.0.0" -"@nrwl/workspace@12.7.2": - version "12.7.2" - resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.7.2.tgz#a1a7af9748db8d5bd4da89746d9ab1314426b246" - integrity sha512-aPlPHG1AmKHP8HiD9VHvkIEUsFZlFmqdm0JwJlv4935C3A8/TIln8thyUdFZDIYkR0jGLBd90RFQcWs2CX+Ocg== +"@nrwl/workspace@12.9.0": + version "12.9.0" + resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.9.0.tgz#218ac0bba8f1cd84235bc636ed6a928ec3550f86" + integrity sha512-P8jab7DebwU1fMnpA9A+7oBXNLxVYPqdGPIusOsvpRaJ9tjzhXhVM4OCYu3ZnmcpHboskmSwUMcIvOARRcwWLg== dependencies: - "@nrwl/cli" "12.7.2" - "@nrwl/devkit" "12.7.2" - "@nrwl/jest" "12.7.2" - "@nrwl/linter" "12.7.2" + "@nrwl/cli" "12.9.0" + "@nrwl/devkit" "12.9.0" + "@nrwl/jest" "12.9.0" + "@nrwl/linter" "12.9.0" chalk "4.1.0" chokidar "^3.5.1" cosmiconfig "^4.0.0" @@ -3171,11 +3173,16 @@ chokidar@^3.5.1: optionalDependencies: fsevents "~2.3.2" -chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.3, chownr@^1.1.4: +chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" @@ -7598,7 +7605,7 @@ minizlib@^1.3.3: dependencies: minipass "^2.9.0" -minizlib@^2.1.0: +minizlib@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== @@ -7637,12 +7644,12 @@ mkdirp-promise@^5.0.1: dependencies: mkdirp "*" -mkdirp@*: +mkdirp@*, mkdirp@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5: +mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -7927,6 +7934,13 @@ nwsapi@^2.2.0: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== +nx@12.9.0: + version "12.9.0" + resolved "https://registry.yarnpkg.com/nx/-/nx-12.9.0.tgz#8553ce806fd19181ad8f81395f7812ab9fe5d4e2" + integrity sha512-AOyMJPpioeMtY1UJ2Zgxyjfsc6rg31uztqiCZIQEOLwXoYIYiPuz54IhTngW7c1MjtxDl8B62G8xCjlRv2zjhw== + dependencies: + "@nrwl/cli" "*" + oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" @@ -9583,16 +9597,16 @@ table@^6.0.9: string-width "^4.2.0" strip-ansi "^6.0.0" -tar@5.0.7: - version "5.0.7" - resolved "https://registry.yarnpkg.com/tar/-/tar-5.0.7.tgz#42ff8ca3b731a52f4f2be72cc4cdd7688268f2af" - integrity sha512-g0qlHHRtAZAxzkZkJvt0P5C6ODEolw2paouzsSbVqE7l5jKani1m9ogy7VxGp6hEngiKpPCwkh9pX5UH8Wp6QA== +tar@6.1.11: + version "6.1.11" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" + integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== dependencies: - chownr "^1.1.3" + chownr "^2.0.0" fs-minipass "^2.0.0" minipass "^3.0.0" - minizlib "^2.1.0" - mkdirp "^0.5.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" yallist "^4.0.0" tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: From c40dd13df76b77052c85254622df5533307dc07e Mon Sep 17 00:00:00 2001 From: Evgeny Stepanovych Date: Mon, 4 Oct 2021 00:52:15 +0300 Subject: [PATCH 375/473] fix(eslint-plugin): [no-confusing-void-expression] support optional chaining (#3937) --- .../src/rules/no-confusing-void-expression.ts | 5 +++++ .../no-confusing-void-expression.test.ts | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts b/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts index fd4e97e7360a..0579fb442541 100644 --- a/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts +++ b/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts @@ -268,6 +268,11 @@ export default util.createRule({ } } + if (parent.type === AST_NODE_TYPES.ChainExpression) { + // e.g. `console?.log('foo')` + return findInvalidAncestor(parent); + } + // any other parent is invalid return parent; } diff --git a/packages/eslint-plugin/tests/rules/no-confusing-void-expression.test.ts b/packages/eslint-plugin/tests/rules/no-confusing-void-expression.test.ts index 3586c3388f4f..e0bdd183a0ee 100644 --- a/packages/eslint-plugin/tests/rules/no-confusing-void-expression.test.ts +++ b/packages/eslint-plugin/tests/rules/no-confusing-void-expression.test.ts @@ -27,6 +27,7 @@ ruleTester.run('no-confusing-void-expression', rule, { foo && console.log(foo); foo || console.log(foo); foo ? console.log(true) : console.log(false); + console?.log('foo'); `, }), @@ -61,6 +62,7 @@ ruleTester.run('no-confusing-void-expression', rule, { ...batchedSingleLineTests({ code: ` const x = console.log('foo'); + const x = console?.log('foo'); console.error(console.log('foo')); [console.log('foo')]; ({ x: console.log('foo') }); @@ -72,14 +74,15 @@ ruleTester.run('no-confusing-void-expression', rule, { `, errors: [ { line: 2, column: 11, messageId: 'invalidVoidExpr' }, - { line: 3, column: 23, messageId: 'invalidVoidExpr' }, - { line: 4, column: 10, messageId: 'invalidVoidExpr' }, - { line: 5, column: 15, messageId: 'invalidVoidExpr' }, - { line: 6, column: 14, messageId: 'invalidVoidExpr' }, - { line: 7, column: 9, messageId: 'invalidVoidExpr' }, - { line: 8, column: 10, messageId: 'invalidVoidExpr' }, - { line: 9, column: 18, messageId: 'invalidVoidExpr' }, - { line: 10, column: 10, messageId: 'invalidVoidExpr' }, + { line: 3, column: 19, messageId: 'invalidVoidExpr' }, + { line: 4, column: 23, messageId: 'invalidVoidExpr' }, + { line: 5, column: 10, messageId: 'invalidVoidExpr' }, + { line: 6, column: 15, messageId: 'invalidVoidExpr' }, + { line: 7, column: 14, messageId: 'invalidVoidExpr' }, + { line: 8, column: 9, messageId: 'invalidVoidExpr' }, + { line: 9, column: 10, messageId: 'invalidVoidExpr' }, + { line: 10, column: 18, messageId: 'invalidVoidExpr' }, + { line: 11, column: 10, messageId: 'invalidVoidExpr' }, ], }), From 40760f98da0d23c7bce3da04cf37a56c10447bde Mon Sep 17 00:00:00 2001 From: Flo Edelmann Date: Sun, 3 Oct 2021 23:53:52 +0200 Subject: [PATCH 376/473] fix(eslint-plugin): [non-nullable-type-assertion-style] false-positive with non-nullish `as` assertions and types (#3940) --- .../src/rules/non-nullable-type-assertion-style.ts | 4 ++++ .../tests/rules/non-nullable-type-assertion-style.test.ts | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts b/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts index eef8c58445f2..647fbcddd4c5 100644 --- a/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts +++ b/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts @@ -57,6 +57,10 @@ export default util.createRule({ type.flags !== ts.TypeFlags.Undefined, ); + if (nonNullishOriginalTypes.length === originalTypes.length) { + return false; + } + for (const assertedType of assertedTypes) { if (!nonNullishOriginalTypes.includes(assertedType)) { return false; diff --git a/packages/eslint-plugin/tests/rules/non-nullable-type-assertion-style.test.ts b/packages/eslint-plugin/tests/rules/non-nullable-type-assertion-style.test.ts index 33c603135f5f..fadd5064abd1 100644 --- a/packages/eslint-plugin/tests/rules/non-nullable-type-assertion-style.test.ts +++ b/packages/eslint-plugin/tests/rules/non-nullable-type-assertion-style.test.ts @@ -54,6 +54,13 @@ const y = x as NonNullable; ` const foo = [] as const; `, + ` +const x = 1 as 1; + `, + ` +declare function foo(): T; +const bar = foo() as number; + `, ], invalid: [ From 240fc65c307769eae9b35e611fca74ba4c35a025 Mon Sep 17 00:00:00 2001 From: Mikhail Menshikov Date: Mon, 4 Oct 2021 00:55:09 +0300 Subject: [PATCH 377/473] fix(eslint-plugin): [lines-between-class-members] fix `exceptAfterOverload` for abstract methods (#3943) --- .../src/rules/lines-between-class-members.ts | 3 ++- .../tests/rules/lines-between-class-members.test.ts | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/src/rules/lines-between-class-members.ts b/packages/eslint-plugin/src/rules/lines-between-class-members.ts index fc89f43c15c8..7317b37c5988 100644 --- a/packages/eslint-plugin/src/rules/lines-between-class-members.ts +++ b/packages/eslint-plugin/src/rules/lines-between-class-members.ts @@ -51,7 +51,8 @@ export default util.createRule({ function isOverload(node: TSESTree.Node): boolean { return ( - node.type === AST_NODE_TYPES.MethodDefinition && + (node.type === AST_NODE_TYPES.TSAbstractMethodDefinition || + node.type === AST_NODE_TYPES.MethodDefinition) && node.value.type === AST_NODE_TYPES.TSEmptyBodyFunctionExpression ); } diff --git a/packages/eslint-plugin/tests/rules/lines-between-class-members.test.ts b/packages/eslint-plugin/tests/rules/lines-between-class-members.test.ts index b25b0ca6b3ce..bb55bbbf3468 100644 --- a/packages/eslint-plugin/tests/rules/lines-between-class-members.test.ts +++ b/packages/eslint-plugin/tests/rules/lines-between-class-members.test.ts @@ -120,6 +120,15 @@ qux() { } { exceptAfterOverload: true, exceptAfterSingleLine: true }, ], }, + { + code: ` +abstract class foo { +abstract bar(a: string): void; +abstract bar(a: string, b: string): void; +}; + `, + options: ['always'], + }, ], invalid: [ { From f8f534e42b0ec517274442422c37ab019cf3c200 Mon Sep 17 00:00:00 2001 From: Joseph Zidell Date: Sun, 3 Oct 2021 17:56:10 -0400 Subject: [PATCH 378/473] fix(eslint-plugin): [padding-line-between-statements] TSModuleBlock should change scope (#3944) --- .../eslint-plugin/src/rules/padding-line-between-statements.ts | 2 ++ .../tests/rules/padding-line-between-statements.test.ts | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts index 2da4042fbf08..e99b0e493460 100644 --- a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts +++ b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts @@ -763,9 +763,11 @@ export default util.createRule({ Program: enterScope, BlockStatement: enterScope, SwitchStatement: enterScope, + TSModuleBlock: enterScope, 'Program:exit': exitScope, 'BlockStatement:exit': exitScope, 'SwitchStatement:exit': exitScope, + 'TSModuleBlock:exit': exitScope, ':statement': verify, diff --git a/packages/eslint-plugin/tests/rules/padding-line-between-statements.test.ts b/packages/eslint-plugin/tests/rules/padding-line-between-statements.test.ts index c55a85de08b4..8021b4a650ef 100644 --- a/packages/eslint-plugin/tests/rules/padding-line-between-statements.test.ts +++ b/packages/eslint-plugin/tests/rules/padding-line-between-statements.test.ts @@ -5084,7 +5084,6 @@ declare namespace Types { [key: string]: string; } } - `, options: [ { blankLine: 'always', prev: '*', next: ['interface', 'type'] }, @@ -5093,7 +5092,6 @@ declare namespace Types { { messageId: 'expectedBlankLine' }, { messageId: 'expectedBlankLine' }, { messageId: 'expectedBlankLine' }, - { messageId: 'expectedBlankLine' }, ], }, ], From 0868725713e8102e8932303d4c680340688e1fa9 Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Sun, 3 Oct 2021 18:57:03 -0300 Subject: [PATCH 379/473] fix(eslint-plugin): [prefer-regexp-exec] check `RegExp` without flags (#3946) --- .../src/rules/prefer-regexp-exec.ts | 1 + .../tests/rules/prefer-regexp-exec.test.ts | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts index ebb92364e464..bbb7d9aac746 100644 --- a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts +++ b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts @@ -84,6 +84,7 @@ export default createRule({ ) { const [, flags] = node.arguments; return ( + flags && flags.type === AST_NODE_TYPES.Literal && typeof flags.value === 'string' && flags.value.includes('g') 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 8a5bdfd099db..2ac3c7a07ba7 100644 --- a/packages/eslint-plugin/tests/rules/prefer-regexp-exec.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-regexp-exec.test.ts @@ -230,6 +230,33 @@ function test(pattern: string) { output: ` function test(pattern: string) { new RegExp(pattern, undefined).exec('check'); +} + `, + }, + { + // https://github.com/typescript-eslint/typescript-eslint/issues/3941 + code: ` +function temp(text: string): void { + text.match(new RegExp(\`\${'hello'}\`)); + text.match(new RegExp(\`\${'hello'.toString()}\`)); +} + `, + errors: [ + { + messageId: 'regExpExecOverStringMatch', + line: 3, + column: 8, + }, + { + messageId: 'regExpExecOverStringMatch', + line: 4, + column: 8, + }, + ], + output: ` +function temp(text: string): void { + new RegExp(\`\${'hello'}\`).exec(text); + new RegExp(\`\${'hello'.toString()}\`).exec(text); } `, }, From edaa3c10eb67bb89f9c6a78bd1ed593925c33f16 Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Sun, 3 Oct 2021 18:58:11 -0300 Subject: [PATCH 380/473] fix(eslint-plugin): [no-restricted-imports] fix crash when no options given (#3947) --- .../eslint-plugin/src/rules/no-restricted-imports.ts | 10 +++++++--- .../tests/rules/no-restricted-imports.test.ts | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-restricted-imports.ts b/packages/eslint-plugin/src/rules/no-restricted-imports.ts index 2a01a54c62ec..994b9ddba737 100644 --- a/packages/eslint-plugin/src/rules/no-restricted-imports.ts +++ b/packages/eslint-plugin/src/rules/no-restricted-imports.ts @@ -1,14 +1,14 @@ import { AST_NODE_TYPES } from '@typescript-eslint/experimental-utils'; import baseRule, { - ArrayOfStringOrObjectPatterns, ArrayOfStringOrObject, + ArrayOfStringOrObjectPatterns, } from 'eslint/lib/rules/no-restricted-imports'; import ignore, { Ignore } from 'ignore'; import { - InferOptionsTypeFromRule, - InferMessageIdsTypeFromRule, createRule, deepMerge, + InferMessageIdsTypeFromRule, + InferOptionsTypeFromRule, } from '../util'; export type Options = InferOptionsTypeFromRule; @@ -119,6 +119,10 @@ export default createRule({ const rules = baseRule.create(context); const { options } = context; + if (options.length === 0) { + return {}; + } + const restrictedPaths = getRestrictedPaths(options); const allowedTypeImportPathNameSet: Set = new Set(); for (const restrictedPath of restrictedPaths) { diff --git a/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts b/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts index a2c5951a8d14..8f7cb1f88bf4 100644 --- a/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts +++ b/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts @@ -8,6 +8,7 @@ const ruleTester = new RuleTester({ ruleTester.run('no-restricted-imports', rule, { valid: [ + "import foo from 'foo';", { code: "import foo from 'foo';", options: ['import1', 'import2'], From f022fb14c71dad25be2314252eb751964f34fcb8 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Sun, 3 Oct 2021 22:58:41 +0100 Subject: [PATCH 381/473] fix(experimental-utils): require fix in suggestions (#3949) --- packages/experimental-utils/src/ts-eslint/Rule.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index 544428ea963e..f9b5c01576bf 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -112,11 +112,16 @@ interface RuleFixer { replaceTextRange(range: AST.Range, text: string): RuleFix; } +interface SuggestionReportDescriptor + extends Omit, 'fix'> { + readonly fix: ReportFixFunction; +} + type ReportFixFunction = ( fixer: RuleFixer, ) => null | RuleFix | readonly RuleFix[] | IterableIterator; type ReportSuggestionArray = - ReportDescriptorBase[]; + SuggestionReportDescriptor[]; interface ReportDescriptorBase { /** From 07b9b7fb7ac0a1ebe18c649c34b671e21e5cb4b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Oct 2021 18:17:06 -0700 Subject: [PATCH 382/473] chore: bump is-glob from 4.0.1 to 4.0.3 (#3951) Bumps [is-glob](https://github.com/micromatch/is-glob) from 4.0.1 to 4.0.3. - [Release notes](https://github.com/micromatch/is-glob/releases) - [Commits](https://github.com/micromatch/is-glob/compare/4.0.1...v4.0.3) --- updated-dependencies: - dependency-name: is-glob dependency-type: direct:production update-type: version-update:semver-patch ... 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 964af57c3f5a..e8248b1bd885 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5749,9 +5749,9 @@ is-glob@^3.1.0: is-extglob "^2.1.0" is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.2.tgz#859fc2e731e58c902f99fcabccb75a7dd07d29d8" - integrity sha512-ZZTOjRcDjuAAAv2cTBQP/lL59ZTArx77+7UzHdWW/XB1mrfp7DEaVpKmZ0XIzx+M7AxfhKcqV+nMetUQmFifwg== + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" From 7bf8c9cb0235e225aab08b7793ff17f6ab1dc52e Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 4 Oct 2021 17:03:21 +0000 Subject: [PATCH 383/473] chore: publish v4.33.0 --- CHANGELOG.md | 23 ++++++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 +++++++ packages/ast-spec/package.json | 2 +- packages/eslint-plugin-internal/CHANGELOG.md | 8 +++++++ packages/eslint-plugin-internal/package.json | 6 ++--- 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 | 17 +++++++++++++++ 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 ++-- 24 files changed, 160 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05027c8584c3..362f124346f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) + + +### Bug Fixes + +* **eslint-plugin:** [lines-between-class-members] fix `exceptAfterOverload` for abstract methods ([#3943](https://github.com/typescript-eslint/typescript-eslint/issues/3943)) ([240fc65](https://github.com/typescript-eslint/typescript-eslint/commit/240fc65c307769eae9b35e611fca74ba4c35a025)) +* **eslint-plugin:** [no-confusing-void-expression] support optional chaining ([#3937](https://github.com/typescript-eslint/typescript-eslint/issues/3937)) ([c40dd13](https://github.com/typescript-eslint/typescript-eslint/commit/c40dd13df76b77052c85254622df5533307dc07e)) +* **eslint-plugin:** [no-restricted-imports] fix crash when no options given ([#3947](https://github.com/typescript-eslint/typescript-eslint/issues/3947)) ([edaa3c1](https://github.com/typescript-eslint/typescript-eslint/commit/edaa3c10eb67bb89f9c6a78bd1ed593925c33f16)) +* **eslint-plugin:** [non-nullable-type-assertion-style] false-positive with non-nullish `as` assertions and types ([#3940](https://github.com/typescript-eslint/typescript-eslint/issues/3940)) ([40760f9](https://github.com/typescript-eslint/typescript-eslint/commit/40760f98da0d23c7bce3da04cf37a56c10447bde)) +* **eslint-plugin:** [padding-line-between-statements] TSModuleBlock should change scope ([#3944](https://github.com/typescript-eslint/typescript-eslint/issues/3944)) ([f8f534e](https://github.com/typescript-eslint/typescript-eslint/commit/f8f534e42b0ec517274442422c37ab019cf3c200)) +* **eslint-plugin:** [prefer-regexp-exec] check `RegExp` without flags ([#3946](https://github.com/typescript-eslint/typescript-eslint/issues/3946)) ([0868725](https://github.com/typescript-eslint/typescript-eslint/commit/0868725713e8102e8932303d4c680340688e1fa9)) +* **experimental-utils:** add `getPhysicalFilename()` to `RuleContext` ([#3934](https://github.com/typescript-eslint/typescript-eslint/issues/3934)) ([ee5dfd4](https://github.com/typescript-eslint/typescript-eslint/commit/ee5dfd4989ab465d65ba3424e36b7f0964558191)) +* **experimental-utils:** require fix in suggestions ([#3949](https://github.com/typescript-eslint/typescript-eslint/issues/3949)) ([f022fb1](https://github.com/typescript-eslint/typescript-eslint/commit/f022fb14c71dad25be2314252eb751964f34fcb8)) + + +### Features + +* **experimental-utils:** extract `isNodeOfTypeWithConditions` out of `ast-utils`' `predicates` ([#3837](https://github.com/typescript-eslint/typescript-eslint/issues/3837)) ([214f898](https://github.com/typescript-eslint/typescript-eslint/commit/214f898178ba593146d06a444487d32ec3363854)) + + + + + # [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) diff --git a/lerna.json b/lerna.json index 3a7290b4fef3..2eb92dc282ad 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.32.0", + "version": "4.33.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 2ad145708ec7..d26fe52ec222 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + # [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index b0732df28fc3..1f08d71f2a81 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.32.0", + "version": "4.33.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index ec3c822bf3be..d93af7147d11 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.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 6ee03af9082a..f5d325e44d05 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.32.0", + "version": "4.33.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,8 +14,8 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.32.0", - "@typescript-eslint/scope-manager": "4.32.0", + "@typescript-eslint/experimental-utils": "4.33.0", + "@typescript-eslint/scope-manager": "4.33.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 78d7fdab633c..c63718c8350f 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.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) **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 ba8dcac39f7b..571092f90253 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.32.0", + "version": "4.33.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.32.0", + "@typescript-eslint/experimental-utils": "4.33.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.32.0" + "@typescript-eslint/parser": "4.33.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index dc0cf8d25991..fb68903babc0 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.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) + + +### Bug Fixes + +* **eslint-plugin:** [lines-between-class-members] fix `exceptAfterOverload` for abstract methods ([#3943](https://github.com/typescript-eslint/typescript-eslint/issues/3943)) ([240fc65](https://github.com/typescript-eslint/typescript-eslint/commit/240fc65c307769eae9b35e611fca74ba4c35a025)) +* **eslint-plugin:** [no-confusing-void-expression] support optional chaining ([#3937](https://github.com/typescript-eslint/typescript-eslint/issues/3937)) ([c40dd13](https://github.com/typescript-eslint/typescript-eslint/commit/c40dd13df76b77052c85254622df5533307dc07e)) +* **eslint-plugin:** [no-restricted-imports] fix crash when no options given ([#3947](https://github.com/typescript-eslint/typescript-eslint/issues/3947)) ([edaa3c1](https://github.com/typescript-eslint/typescript-eslint/commit/edaa3c10eb67bb89f9c6a78bd1ed593925c33f16)) +* **eslint-plugin:** [non-nullable-type-assertion-style] false-positive with non-nullish `as` assertions and types ([#3940](https://github.com/typescript-eslint/typescript-eslint/issues/3940)) ([40760f9](https://github.com/typescript-eslint/typescript-eslint/commit/40760f98da0d23c7bce3da04cf37a56c10447bde)) +* **eslint-plugin:** [padding-line-between-statements] TSModuleBlock should change scope ([#3944](https://github.com/typescript-eslint/typescript-eslint/issues/3944)) ([f8f534e](https://github.com/typescript-eslint/typescript-eslint/commit/f8f534e42b0ec517274442422c37ab019cf3c200)) +* **eslint-plugin:** [prefer-regexp-exec] check `RegExp` without flags ([#3946](https://github.com/typescript-eslint/typescript-eslint/issues/3946)) ([0868725](https://github.com/typescript-eslint/typescript-eslint/commit/0868725713e8102e8932303d4c680340688e1fa9)) + + + + + # [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index eb7f95c789f7..5109b38af545 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.32.0", + "version": "4.33.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.32.0", - "@typescript-eslint/scope-manager": "4.32.0", + "@typescript-eslint/experimental-utils": "4.33.0", + "@typescript-eslint/scope-manager": "4.33.0", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index ef9ae813f915..4fc1e388ede2 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) + + +### Bug Fixes + +* **experimental-utils:** add `getPhysicalFilename()` to `RuleContext` ([#3934](https://github.com/typescript-eslint/typescript-eslint/issues/3934)) ([ee5dfd4](https://github.com/typescript-eslint/typescript-eslint/commit/ee5dfd4989ab465d65ba3424e36b7f0964558191)) +* **experimental-utils:** require fix in suggestions ([#3949](https://github.com/typescript-eslint/typescript-eslint/issues/3949)) ([f022fb1](https://github.com/typescript-eslint/typescript-eslint/commit/f022fb14c71dad25be2314252eb751964f34fcb8)) + + +### Features + +* **experimental-utils:** extract `isNodeOfTypeWithConditions` out of `ast-utils`' `predicates` ([#3837](https://github.com/typescript-eslint/typescript-eslint/issues/3837)) ([214f898](https://github.com/typescript-eslint/typescript-eslint/commit/214f898178ba593146d06a444487d32ec3363854)) + + + + + # [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index d7a11ad73137..932a98f8cf57 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.32.0", + "version": "4.33.0", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.32.0", - "@typescript-eslint/types": "4.32.0", - "@typescript-eslint/typescript-estree": "4.32.0", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 210eae073dac..892b55f89f56 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.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) diff --git a/packages/parser/package.json b/packages/parser/package.json index f5ad76b71eaf..b3e78b7fb870 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.32.0", + "version": "4.33.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.32.0", - "@typescript-eslint/types": "4.32.0", - "@typescript-eslint/typescript-estree": "4.32.0", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.32.0", + "@typescript-eslint/experimental-utils": "4.33.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index d3e5bac3b5d6..7d0ddf98816f 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.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index ad4cdea5cdfe..121285aa5ad4 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.32.0", + "version": "4.33.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.32.0", - "@typescript-eslint/visitor-keys": "4.32.0" + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.32.0", + "@typescript-eslint/typescript-estree": "4.33.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 8210405eac66..b4e3999eac20 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.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) **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 7f854b6450b0..ecbb220c80f1 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.32.0", + "version": "4.33.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index ad7cce491e25..215fa2e52936 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.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) diff --git a/packages/types/package.json b/packages/types/package.json index b91fad4c218c..f8e56a099e0c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.32.0", + "version": "4.33.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 3c059a4cd53e..f957fb3ba982 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.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + # [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) **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 d6ab57be6f25..726092aeda45 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.32.0", + "version": "4.33.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.32.0", - "@typescript-eslint/visitor-keys": "4.32.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.32.0", + "@typescript-eslint/shared-fixtures": "4.33.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index d5b551708430..0376970754eb 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.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [4.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.31.2...v4.32.0) (2021-09-27) **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 155fd9be2a4e..a4863ea2ad17 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.32.0", + "version": "4.33.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.32.0", + "@typescript-eslint/types": "4.33.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { From 11b3698c6c3ea350e323f02505e5d7ca2ef02236 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 10:57:47 -0700 Subject: [PATCH 384/473] chore: bump jest from 27.2.1 to 27.2.4 (#3952) Bumps [jest](https://github.com/facebook/jest) from 27.2.1 to 27.2.4. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/compare/v27.2.1...v27.2.4) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 649 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 335 insertions(+), 314 deletions(-) diff --git a/yarn.lock b/yarn.lock index e8248b1bd885..7a60b2bd464e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -811,49 +811,48 @@ jest-util "^27.0.6" slash "^3.0.0" -"@jest/console@^27.2.0": - version "27.2.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.2.0.tgz#57f702837ec52899be58c3794dce5941c77a8b63" - integrity sha512-35z+RqsK2CCgNxn+lWyK8X4KkaDtfL4BggT7oeZ0JffIiAiEYFYPo5B67V50ZubqDS1ehBrdCR2jduFnIrZOYw== +"@jest/console@^27.2.4": + version "27.2.4" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.2.4.tgz#2f1a4bf82b9940065d4818fac271def99ec55e5e" + integrity sha512-94znCKynPZpDpYHQ6esRJSc11AmONrVkBOBZiD7S+bSubHhrUfbS95EY5HIOxhm4PQO7cnvZkL3oJcY0oMA+Wg== dependencies: - "@jest/types" "^27.1.1" + "@jest/types" "^27.2.4" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^27.2.0" - jest-util "^27.2.0" + jest-message-util "^27.2.4" + jest-util "^27.2.4" slash "^3.0.0" -"@jest/core@^27.2.1": - version "27.2.1" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.2.1.tgz#93dc50e2aaba2c944e5765cf658dcd98d804c970" - integrity sha512-XcGt9UgPyzylThvezwUIMCNVp8xxN78Ic3WwhJZehZt4n2hPHR6Bd85A1nKFZBeqW58Vd+Cx/LaN6YL4n58KlA== +"@jest/core@^27.2.4": + version "27.2.4" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.2.4.tgz#0b932da787d64848eab720dbb88e5b7a3f86e539" + integrity sha512-UNQLyy+rXoojNm2MGlapgzWhZD1CT1zcHZQYeiD0xE7MtJfC19Q6J5D/Lm2l7i4V97T30usKDoEtjI8vKwWcLg== dependencies: - "@jest/console" "^27.2.0" - "@jest/reporters" "^27.2.1" - "@jest/test-result" "^27.2.0" - "@jest/transform" "^27.2.1" - "@jest/types" "^27.1.1" + "@jest/console" "^27.2.4" + "@jest/reporters" "^27.2.4" + "@jest/test-result" "^27.2.4" + "@jest/transform" "^27.2.4" + "@jest/types" "^27.2.4" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^27.1.1" - jest-config "^27.2.1" - jest-haste-map "^27.2.0" - jest-message-util "^27.2.0" + jest-changed-files "^27.2.4" + jest-config "^27.2.4" + jest-haste-map "^27.2.4" + jest-message-util "^27.2.4" jest-regex-util "^27.0.6" - jest-resolve "^27.2.0" - jest-resolve-dependencies "^27.2.1" - jest-runner "^27.2.1" - jest-runtime "^27.2.1" - jest-snapshot "^27.2.1" - jest-util "^27.2.0" - jest-validate "^27.2.0" - jest-watcher "^27.2.0" + jest-resolve "^27.2.4" + jest-resolve-dependencies "^27.2.4" + jest-runner "^27.2.4" + jest-runtime "^27.2.4" + jest-snapshot "^27.2.4" + jest-util "^27.2.4" + jest-validate "^27.2.4" + jest-watcher "^27.2.4" micromatch "^4.0.4" - p-each-series "^2.1.0" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" @@ -868,15 +867,15 @@ "@types/node" "*" jest-mock "^27.0.6" -"@jest/environment@^27.2.0": - version "27.2.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.2.0.tgz#48d1dbfa65f8e4a5a5c6cbeb9c59d1a5c2776f6b" - integrity sha512-iPWmQI0wRIYSZX3wKu4FXHK4eIqkfq6n1DCDJS+v3uby7SOXrHvX4eiTBuEdSvtDRMTIH2kjrSkjHf/F9JIYyQ== +"@jest/environment@^27.2.4": + version "27.2.4" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.2.4.tgz#db3e60f7dd30ab950f6ce2d6d7293ed9a6b7cbcd" + integrity sha512-wkuui5yr3SSQW0XD0Qm3TATUbL/WE3LDEM3ulC+RCQhMf2yxhci8x7svGkZ4ivJ6Pc94oOzpZ6cdHBAMSYd1ew== dependencies: - "@jest/fake-timers" "^27.2.0" - "@jest/types" "^27.1.1" + "@jest/fake-timers" "^27.2.4" + "@jest/types" "^27.2.4" "@types/node" "*" - jest-mock "^27.1.1" + jest-mock "^27.2.4" "@jest/fake-timers@^27.0.6": version "27.0.6" @@ -890,17 +889,17 @@ jest-mock "^27.0.6" jest-util "^27.0.6" -"@jest/fake-timers@^27.2.0": - version "27.2.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.2.0.tgz#560841bc21ae7fbeff0cbff8de8f5cf43ad3561d" - integrity sha512-gSu3YHvQOoVaTWYGgHFB7IYFtcF2HBzX4l7s47VcjvkUgL4/FBnE20x7TNLa3W6ABERtGd5gStSwsA8bcn+c4w== +"@jest/fake-timers@^27.2.4": + version "27.2.4" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.2.4.tgz#00df08bd60332bd59503cb5b6db21e4903785f86" + integrity sha512-cs/TzvwWUM7kAA6Qm/890SK6JJ2pD5RfDNM3SSEom6BmdyV6OiWP1qf/pqo6ts6xwpcM36oN0wSEzcZWc6/B6w== dependencies: - "@jest/types" "^27.1.1" - "@sinonjs/fake-timers" "^7.0.2" + "@jest/types" "^27.2.4" + "@sinonjs/fake-timers" "^8.0.1" "@types/node" "*" - jest-message-util "^27.2.0" - jest-mock "^27.1.1" - jest-util "^27.2.0" + jest-message-util "^27.2.4" + jest-mock "^27.2.4" + jest-util "^27.2.4" "@jest/globals@^27.0.6": version "27.0.6" @@ -911,14 +910,14 @@ "@jest/types" "^27.0.6" expect "^27.0.6" -"@jest/globals@^27.2.1": - version "27.2.1" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.1.tgz#6842c70b6713fbe2fcaf89eac20d77eeeb0e282c" - integrity sha512-4P46Zr4cckSitsWtOMRvgMMn7mOKbBsQdYxHeGSIG3kpI4gNR2vk51balPulZHnBQCQb/XBptprtoSv1REfaew== +"@jest/globals@^27.2.4": + version "27.2.4" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.4.tgz#0aeb22b011f8c8c4b8ff3b4dbd1ee0392fe0dd8a" + integrity sha512-DRsRs5dh0i+fA9mGHylTU19+8fhzNJoEzrgsu+zgJoZth3x8/0juCQ8nVVdW1er4Cqifb/ET7/hACYVPD0dBEA== dependencies: - "@jest/environment" "^27.2.0" - "@jest/types" "^27.1.1" - expect "^27.2.1" + "@jest/environment" "^27.2.4" + "@jest/types" "^27.2.4" + expect "^27.2.4" "@jest/reporters@27.0.6": version "27.0.6" @@ -950,16 +949,16 @@ terminal-link "^2.0.0" v8-to-istanbul "^8.0.0" -"@jest/reporters@^27.2.1": - version "27.2.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.1.tgz#2e43361b962e26975d40eafd7b4f14c70b4fe9a0" - integrity sha512-ILqR+bIIBlhaHjDtQR/0Z20YkKAQVM+NVRuJLaWFCoRx/rKQQSxG01ZLiLV0MsA6wkBHf6J9fzFuXp0k5l7epw== +"@jest/reporters@^27.2.4": + version "27.2.4" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.4.tgz#1482ff007f2e919d85c54b1563abb8b2ea2d5198" + integrity sha512-LHeSdDnDZkDnJ8kvnjcqV8P1Yv/32yL4d4XfR5gBiy3xGO0onwll1QEbvtW96fIwhx2nejug0GTaEdNDoyr3fQ== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.2.0" - "@jest/test-result" "^27.2.0" - "@jest/transform" "^27.2.1" - "@jest/types" "^27.1.1" + "@jest/console" "^27.2.4" + "@jest/test-result" "^27.2.4" + "@jest/transform" "^27.2.4" + "@jest/types" "^27.2.4" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -970,15 +969,15 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^27.2.0" - jest-resolve "^27.2.0" - jest-util "^27.2.0" - jest-worker "^27.2.0" + jest-haste-map "^27.2.4" + jest-resolve "^27.2.4" + jest-util "^27.2.4" + jest-worker "^27.2.4" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" terminal-link "^2.0.0" - v8-to-istanbul "^8.0.0" + v8-to-istanbul "^8.1.0" "@jest/source-map@^27.0.6": version "27.0.6" @@ -999,13 +998,13 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^27.2.0": - version "27.2.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.2.0.tgz#377b46a41a6415dd4839fd0bed67b89fecea6b20" - integrity sha512-JPPqn8h0RGr4HyeY1Km+FivDIjTFzDROU46iAvzVjD42ooGwYoqYO/MQTilhfajdz6jpVnnphFrKZI5OYrBONA== +"@jest/test-result@^27.2.4": + version "27.2.4" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.2.4.tgz#d1ca8298d168f1b0be834bfb543b1ac0294c05d7" + integrity sha512-eU+PRo0+lIS01b0dTmMdVZ0TtcRSxEaYquZTRFMQz6CvsehGhx9bRzi9Zdw6VROviJyv7rstU+qAMX5pNBmnfQ== dependencies: - "@jest/console" "^27.2.0" - "@jest/types" "^27.1.1" + "@jest/console" "^27.2.4" + "@jest/types" "^27.2.4" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" @@ -1019,15 +1018,15 @@ jest-haste-map "^27.0.6" jest-runtime "^27.0.6" -"@jest/test-sequencer@^27.2.1": - version "27.2.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.2.1.tgz#1682cd3a16198fa358ff9565b0d2792919f36562" - integrity sha512-fWcEgWQXgvU4DFY5YHfQsGwqfJWyuCUzdOzLZTYtyLB3WK1mFPQGYAszM7mCEZjyVon5XRuCa+2/+hif/uMucQ== +"@jest/test-sequencer@^27.2.4": + version "27.2.4" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.2.4.tgz#df66422a3e9e7440ce8b7498e255fa6b52c0bc03" + integrity sha512-fpk5eknU3/DXE2QCCG1wv/a468+cfPo3Asu6d6yUtM9LOPh709ubZqrhuUOYfM8hXMrIpIdrv1CdCrWWabX0rQ== dependencies: - "@jest/test-result" "^27.2.0" + "@jest/test-result" "^27.2.4" graceful-fs "^4.2.4" - jest-haste-map "^27.2.0" - jest-runtime "^27.2.1" + jest-haste-map "^27.2.4" + jest-runtime "^27.2.4" "@jest/transform@^27.0.2": version "27.0.2" @@ -1071,21 +1070,21 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/transform@^27.2.1": - version "27.2.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.2.1.tgz#743443adb84b3b7419951fc702515ce20ba6285e" - integrity sha512-xmB5vh81KK8DiiCMtI5vI59mP+GggNmc9BiN+fg4mKdQHV369+WuZc1Lq2xWFCOCsRPHt24D9h7Idp4YaMB1Ww== +"@jest/transform@^27.2.4": + version "27.2.4" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.2.4.tgz#2fe5b6836895f7a1b8bdec442c51e83943c62733" + integrity sha512-n5FlX2TH0oQGwyVDKPxdJ5nI2sO7TJBFe3u3KaAtt7TOiV4yL+Y+rSFDl+Ic5MpbiA/eqXmLAQxjnBmWgS2rEA== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^27.1.1" + "@jest/types" "^27.2.4" babel-plugin-istanbul "^6.0.0" chalk "^4.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.4" - jest-haste-map "^27.2.0" + jest-haste-map "^27.2.4" jest-regex-util "^27.0.6" - jest-util "^27.2.0" + jest-util "^27.2.4" micromatch "^4.0.4" pirates "^4.0.1" slash "^3.0.0" @@ -1103,6 +1102,17 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" +"@jest/types@^27.2.4": + version "27.2.4" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.2.4.tgz#2430042a66e00dc5b140c3636f4474d464c21ee8" + integrity sha512-IDO2ezTxeMvQAHxzG/ZvEyA47q0aVfzT95rGFl7bZs/Go0aIucvfDbS2rmnoEdXxlLQhcolmoG/wvL/uKx4tKA== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^16.0.0" + chalk "^4.0.0" + "@lerna/add@3.21.0": version "3.21.0" resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.21.0.tgz#27007bde71cc7b0a2969ab3c2f0ae41578b4577b" @@ -2128,6 +2138,13 @@ dependencies: "@sinonjs/commons" "^1.7.0" +"@sinonjs/fake-timers@^8.0.1": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-8.0.1.tgz#1c1c9a91419f804e59ae8df316a07dd1c3a76b94" + integrity sha512-AU7kwFxreVd6OAXcAFlKSmZquiRUU0FvYm44k1Y1QbK7Co4m0aqfGMhjykIeQp/H6rcl+nFmj0zfdUcGVs9Dew== + dependencies: + "@sinonjs/commons" "^1.7.0" + "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" @@ -2779,13 +2796,13 @@ babel-jest@^27.0.6: graceful-fs "^4.2.4" slash "^3.0.0" -babel-jest@^27.2.1: - version "27.2.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.2.1.tgz#48edfa5cf8d59ab293da94321a369ccc7b67a4b1" - integrity sha512-kkaekSJHew1zfDW3cA2QiSBPg4uiLpiW0OwJKqFv0r2/mFgym/IBn7hxPntL6FvS66G/ROh+lz4pRiCJAH1/UQ== +babel-jest@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.2.4.tgz#21ed6729d51bdd75470bbbf3c8b08d86209fb0dc" + integrity sha512-f24OmxyWymk5jfgLdlCMu4fTs4ldxFBIdn5sJdhvGC1m08rSkJ5hYbWkNmfBSvE/DjhCVNSHXepxsI6THGfGsg== dependencies: - "@jest/transform" "^27.2.1" - "@jest/types" "^27.1.1" + "@jest/transform" "^27.2.4" + "@jest/types" "^27.2.4" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.0.0" babel-preset-jest "^27.2.0" @@ -4503,16 +4520,16 @@ expect@^27.0.6: jest-message-util "^27.0.6" jest-regex-util "^27.0.6" -expect@^27.2.1: - version "27.2.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.1.tgz#5f882b308716618613f0106a488b46c303908157" - integrity sha512-ekOA2mBtT2phxcoPVHCXIzbJxCvRXhx2fr7m28IgGdZxUOh8UvxvoRz1FcPlfgZMpE92biHB6woIcAKXqR28hA== +expect@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.4.tgz#4debf546050bcdad8914a8c95fec7662e02bf67c" + integrity sha512-gOtuonQ8TCnbNNCSw2fhVzRf8EFYDII4nB5NmG4IEV0rbUnW1I5zXvoTntU4iicB/Uh0oZr20NGlOLdJiwsOZA== dependencies: - "@jest/types" "^27.1.1" + "@jest/types" "^27.2.4" ansi-styles "^5.0.0" jest-get-type "^27.0.6" - jest-matcher-utils "^27.2.0" - jest-message-util "^27.2.0" + jest-matcher-utils "^27.2.4" + jest-message-util "^27.2.4" jest-regex-util "^27.0.6" extend-shallow@^2.0.1: @@ -5963,12 +5980,12 @@ jake@^10.6.1: filelist "^1.0.1" minimatch "^3.0.4" -jest-changed-files@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.1.1.tgz#9b3f67a34cc58e3e811e2e1e21529837653e4200" - integrity sha512-5TV9+fYlC2A6hu3qtoyGHprBwCAn0AuGA77bZdUgYvVlRMjHXo063VcWTEAyx6XAZ85DYHqp0+aHKbPlfRDRvA== +jest-changed-files@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.2.4.tgz#d7de46e90e5a599c47e260760f5ab53516e835e6" + integrity sha512-eeO1C1u4ex7pdTroYXezr+rbr957myyVoKGjcY4R1TJi3A+9v+4fu1Iv9J4eLq1bgFyT3O3iRWU9lZsEE7J72Q== dependencies: - "@jest/types" "^27.1.1" + "@jest/types" "^27.2.4" execa "^5.0.0" throat "^6.0.1" @@ -5997,48 +6014,48 @@ jest-circus@^27.0.6: stack-utils "^2.0.3" throat "^6.0.1" -jest-circus@^27.2.1: - version "27.2.1" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.2.1.tgz#c5166052b328c0df932cdaf89f5982085e7b4812" - integrity sha512-9q/8X8DgJmW8IqXsJNnS2E28iarx990hf6D+frS3P0lB+avhFDD33alLwZzKgm45u0wvEi6iFh43WjNbp5fhjw== +jest-circus@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.2.4.tgz#3bd898a29dcaf6a506f3f1b780dff5f67ca83c23" + integrity sha512-TtheheTElrGjlsY9VxkzUU1qwIx05ItIusMVKnvNkMt4o/PeegLRcjq3Db2Jz0GGdBalJdbzLZBgeulZAJxJWA== dependencies: - "@jest/environment" "^27.2.0" - "@jest/test-result" "^27.2.0" - "@jest/types" "^27.1.1" + "@jest/environment" "^27.2.4" + "@jest/test-result" "^27.2.4" + "@jest/types" "^27.2.4" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" - expect "^27.2.1" + expect "^27.2.4" is-generator-fn "^2.0.0" - jest-each "^27.2.0" - jest-matcher-utils "^27.2.0" - jest-message-util "^27.2.0" - jest-runtime "^27.2.1" - jest-snapshot "^27.2.1" - jest-util "^27.2.0" - pretty-format "^27.2.0" + jest-each "^27.2.4" + jest-matcher-utils "^27.2.4" + jest-message-util "^27.2.4" + jest-runtime "^27.2.4" + jest-snapshot "^27.2.4" + jest-util "^27.2.4" + pretty-format "^27.2.4" slash "^3.0.0" stack-utils "^2.0.3" throat "^6.0.1" -jest-cli@^27.2.1: - version "27.2.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.2.1.tgz#031e887245945864cc6ed8605c939f1937858c09" - integrity sha512-IfxuGkBZS/ogY7yFvvD1dFidzQRXlSBHtUZQ3UTIHydzNMF4/ZRTdGFso6HkbCkemwLh4hnNybONexEqWmYwjw== +jest-cli@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.2.4.tgz#acda7f367aa6e674723fc1a7334e0ae1799448d2" + integrity sha512-4kpQQkg74HYLaXo3nzwtg4PYxSLgL7puz1LXHj5Tu85KmlIpxQFjRkXlx4V47CYFFIDoyl3rHA/cXOxUWyMpNg== dependencies: - "@jest/core" "^27.2.1" - "@jest/test-result" "^27.2.0" - "@jest/types" "^27.1.1" + "@jest/core" "^27.2.4" + "@jest/test-result" "^27.2.4" + "@jest/types" "^27.2.4" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.2.1" - jest-util "^27.2.0" - jest-validate "^27.2.0" + jest-config "^27.2.4" + jest-util "^27.2.4" + jest-validate "^27.2.4" prompts "^2.0.1" - yargs "^16.0.3" + yargs "^16.2.0" jest-config@27.0.6: version "27.0.6" @@ -6067,34 +6084,34 @@ jest-config@27.0.6: micromatch "^4.0.4" pretty-format "^27.0.6" -jest-config@^27.2.1: - version "27.2.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.2.1.tgz#2e727e023fc4b77a9f067a40c5448a939aa8386b" - integrity sha512-BAOemP8udmFw9nkgaLAac7vXORdvrt4yrJWoh7uYb0nPZeSsu0kGwJU18SwtY4paq9fed5OgAssC3A+Bf4WMQA== +jest-config@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.2.4.tgz#0204969f5ae2e5190d47be2c14c04d631b7836e2" + integrity sha512-tWy0UxhdzqiKyp4l5Vq4HxLyD+gH5td+GCF3c22/DJ0bYAOsMo+qi2XtbJI6oYMH5JOJQs9nLW/r34nvFCehjA== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.2.1" - "@jest/types" "^27.1.1" - babel-jest "^27.2.1" + "@jest/test-sequencer" "^27.2.4" + "@jest/types" "^27.2.4" + babel-jest "^27.2.4" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" is-ci "^3.0.0" - jest-circus "^27.2.1" - jest-environment-jsdom "^27.2.0" - jest-environment-node "^27.2.0" + jest-circus "^27.2.4" + jest-environment-jsdom "^27.2.4" + jest-environment-node "^27.2.4" jest-get-type "^27.0.6" - jest-jasmine2 "^27.2.1" + jest-jasmine2 "^27.2.4" jest-regex-util "^27.0.6" - jest-resolve "^27.2.0" - jest-runner "^27.2.1" - jest-util "^27.2.0" - jest-validate "^27.2.0" + jest-resolve "^27.2.4" + jest-runner "^27.2.4" + jest-util "^27.2.4" + jest-validate "^27.2.4" micromatch "^4.0.4" - pretty-format "^27.2.0" + pretty-format "^27.2.4" -jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6, jest-diff@^27.2.0: +jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6, jest-diff@^27.2.4: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.6.tgz#4a7a19ee6f04ad70e0e3388f35829394a44c7b5e" integrity sha512-Z1mqgkTCSYaFgwTlP/NUiRzdqgxmmhzHY1Tq17zL94morOHfHu3K4bgSgl+CR4GLhpV8VxkuOYuIWnQ9LnFqmg== @@ -6122,16 +6139,16 @@ jest-each@^27.0.6: jest-util "^27.0.6" pretty-format "^27.0.6" -jest-each@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.2.0.tgz#4c531c7223de289429fc7b2473a86e653c86d61f" - integrity sha512-biDmmUQjg+HZOB7MfY2RHSFL3j418nMoC3TK3pGAj880fQQSxvQe1y2Wy23JJJNUlk6YXiGU0yWy86Le1HBPmA== +jest-each@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.2.4.tgz#b4f280aafd63129ba82e345f0e74c5a10200aeef" + integrity sha512-w9XVc+0EDBUTJS4xBNJ7N2JCcWItFd006lFjz77OarAQcQ10eFDBMrfDv2GBJMKlXe9aq0HrIIF51AXcZrRJyg== dependencies: - "@jest/types" "^27.1.1" + "@jest/types" "^27.2.4" chalk "^4.0.0" jest-get-type "^27.0.6" - jest-util "^27.2.0" - pretty-format "^27.2.0" + jest-util "^27.2.4" + pretty-format "^27.2.4" jest-environment-jsdom@^27.0.6: version "27.0.6" @@ -6146,17 +6163,17 @@ jest-environment-jsdom@^27.0.6: jest-util "^27.0.6" jsdom "^16.6.0" -jest-environment-jsdom@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.2.0.tgz#c654dfae50ca2272c2a2e2bb95ff0af298283a3c" - integrity sha512-wNQJi6Rd/AkUWqTc4gWhuTIFPo7tlMK0RPZXeM6AqRHZA3D3vwvTa9ktAktyVyWYmUoXdYstOfyYMG3w4jt7eA== +jest-environment-jsdom@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.2.4.tgz#39ae80bbb8675306bfaf0440be1e5f877554539a" + integrity sha512-X70pTXFSypD7AIzKT1mLnDi5hP9w9mdTRcOGOmoDoBrNyNEg4rYm6d4LQWFLc9ps1VnMuDOkFSG0wjSNYGjkng== dependencies: - "@jest/environment" "^27.2.0" - "@jest/fake-timers" "^27.2.0" - "@jest/types" "^27.1.1" + "@jest/environment" "^27.2.4" + "@jest/fake-timers" "^27.2.4" + "@jest/types" "^27.2.4" "@types/node" "*" - jest-mock "^27.1.1" - jest-util "^27.2.0" + jest-mock "^27.2.4" + jest-util "^27.2.4" jsdom "^16.6.0" jest-environment-node@^27.0.6: @@ -6171,17 +6188,17 @@ jest-environment-node@^27.0.6: jest-mock "^27.0.6" jest-util "^27.0.6" -jest-environment-node@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.2.0.tgz#73ef2151cb62206669becb94cd84f33276252de5" - integrity sha512-WbW+vdM4u88iy6Q3ftUEQOSgMPtSgjm3qixYYK2AKEuqmFO2zmACTw1vFUB0qI/QN88X6hA6ZkVKIdIWWzz+yg== +jest-environment-node@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.2.4.tgz#b79f98cb36e0c9111aac859c9c99f04eb2f74ff6" + integrity sha512-ZbVbFSnbzTvhLOIkqh5lcLuGCCFvtG4xTXIRPK99rV2KzQT3kNg16KZwfTnLNlIiWCE8do960eToeDfcqmpSAw== dependencies: - "@jest/environment" "^27.2.0" - "@jest/fake-timers" "^27.2.0" - "@jest/types" "^27.1.1" + "@jest/environment" "^27.2.4" + "@jest/fake-timers" "^27.2.4" + "@jest/types" "^27.2.4" "@types/node" "*" - jest-mock "^27.1.1" - jest-util "^27.2.0" + jest-mock "^27.2.4" + jest-util "^27.2.4" jest-get-type@^27.0.1: version "27.0.1" @@ -6233,12 +6250,12 @@ jest-haste-map@^27.0.6: optionalDependencies: fsevents "^2.3.2" -jest-haste-map@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.2.0.tgz#703b3a473e3f2e27d75ab07864ffd7bbaad0d75e" - integrity sha512-laFet7QkNlWjwZtMGHCucLvF8o9PAh2cgePRck1+uadSM4E4XH9J4gnx4do+a6do8ZV5XHNEAXEkIoNg5XUH2Q== +jest-haste-map@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.2.4.tgz#f8974807bedf07348ca9fd24e5861ab7c8e61aba" + integrity sha512-bkJ4bT00T2K+1NZXbRcyKnbJ42I6QBvoDNMTAQQDBhaGNnZreiQKUNqax0e6hLTx7E75pKDeltVu3V1HAdu+YA== dependencies: - "@jest/types" "^27.1.1" + "@jest/types" "^27.2.4" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" @@ -6246,8 +6263,8 @@ jest-haste-map@^27.2.0: graceful-fs "^4.2.4" jest-regex-util "^27.0.6" jest-serializer "^27.0.6" - jest-util "^27.2.0" - jest-worker "^27.2.0" + jest-util "^27.2.4" + jest-worker "^27.2.4" micromatch "^4.0.4" walker "^1.0.7" optionalDependencies: @@ -6277,28 +6294,28 @@ jest-jasmine2@^27.0.6: pretty-format "^27.0.6" throat "^6.0.1" -jest-jasmine2@^27.2.1: - version "27.2.1" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.2.1.tgz#30ee71f38670a621ecf3b6dcb89875933f780de6" - integrity sha512-3vytj3+S49+XYsxGJyjlchDo4xblYzjDY4XK7pV2IAdspbMFOpmeNMOeDonYuvlbUtcV8yrFLA6XtliXapDmMA== +jest-jasmine2@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.2.4.tgz#4a1608133dbdb4d68b5929bfd785503ed9c9ba51" + integrity sha512-fcffjO/xLWLVnW2ct3No4EksxM5RyPwHDYu9QU+90cC+/eSMLkFAxS55vkqsxexOO5zSsZ3foVpMQcg/amSeIQ== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^27.2.0" + "@jest/environment" "^27.2.4" "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.2.0" - "@jest/types" "^27.1.1" + "@jest/test-result" "^27.2.4" + "@jest/types" "^27.2.4" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^27.2.1" + expect "^27.2.4" is-generator-fn "^2.0.0" - jest-each "^27.2.0" - jest-matcher-utils "^27.2.0" - jest-message-util "^27.2.0" - jest-runtime "^27.2.1" - jest-snapshot "^27.2.1" - jest-util "^27.2.0" - pretty-format "^27.2.0" + jest-each "^27.2.4" + jest-matcher-utils "^27.2.4" + jest-message-util "^27.2.4" + jest-runtime "^27.2.4" + jest-snapshot "^27.2.4" + jest-util "^27.2.4" + pretty-format "^27.2.4" throat "^6.0.1" jest-leak-detector@^27.0.6: @@ -6309,13 +6326,13 @@ jest-leak-detector@^27.0.6: jest-get-type "^27.0.6" pretty-format "^27.0.6" -jest-leak-detector@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.2.0.tgz#9a7ca2dad1a21c4e49ad2a8ad7f1214ffdb86a28" - integrity sha512-e91BIEmbZw5+MHkB4Hnrq7S86coTxUMCkz4n7DLmQYvl9pEKmRx9H/JFH87bBqbIU5B2Ju1soKxRWX6/eGFGpA== +jest-leak-detector@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.2.4.tgz#9bb7eab26a73bb280e9298be8d80f389288ec8f1" + integrity sha512-SrcHWbe0EHg/bw2uBjVoHacTo5xosl068x2Q0aWsjr2yYuW2XwqrSkZV4lurUop0jhv1709ymG4or+8E4sH27Q== dependencies: jest-get-type "^27.0.6" - pretty-format "^27.2.0" + pretty-format "^27.2.4" jest-matcher-utils@^27.0.2: version "27.0.2" @@ -6337,15 +6354,15 @@ jest-matcher-utils@^27.0.6: jest-get-type "^27.0.6" pretty-format "^27.0.6" -jest-matcher-utils@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.2.0.tgz#b4d224ab88655d5fab64b96b989ac349e2f5da43" - integrity sha512-F+LG3iTwJ0gPjxBX6HCyrARFXq6jjiqhwBQeskkJQgSLeF1j6ui1RTV08SR7O51XTUhtc8zqpDj8iCG4RGmdKw== +jest-matcher-utils@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.2.4.tgz#008fff018151415ad1b6cfc083fd70fe1e012525" + integrity sha512-nQeLfFAIPPkyhkDfifAPfP/U5wm1x0fLtAzqXZSSKckXDNuk2aaOfQiDYv1Mgf5GY6yOsxfUnvNm3dDjXM+BXw== dependencies: chalk "^4.0.0" - jest-diff "^27.2.0" + jest-diff "^27.2.4" jest-get-type "^27.0.6" - pretty-format "^27.2.0" + pretty-format "^27.2.4" jest-message-util@^27.0.2: version "27.0.2" @@ -6377,18 +6394,18 @@ jest-message-util@^27.0.6: slash "^3.0.0" stack-utils "^2.0.3" -jest-message-util@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.2.0.tgz#2f65c71df55267208686b1d7514e18106c91ceaf" - integrity sha512-y+sfT/94CiP8rKXgwCOzO1mUazIEdEhrLjuiu+RKmCP+8O/TJTSne9dqQRbFIHBtlR2+q7cddJlWGir8UATu5w== +jest-message-util@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.2.4.tgz#667e8c0f2b973156d1bac7398a7f677705cafaca" + integrity sha512-wbKT/BNGnBVB9nzi+IoaLkXt6fbSvqUxx+IYY66YFh96J3goY33BAaNG3uPqaw/Sh/FR9YpXGVDfd5DJdbh4nA== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.1.1" + "@jest/types" "^27.2.4" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" micromatch "^4.0.4" - pretty-format "^27.2.0" + pretty-format "^27.2.4" slash "^3.0.0" stack-utils "^2.0.3" @@ -6400,12 +6417,12 @@ jest-mock@^27.0.6: "@jest/types" "^27.0.6" "@types/node" "*" -jest-mock@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.1.1.tgz#c7a2e81301fdcf3dab114931d23d89ec9d0c3a82" - integrity sha512-SClsFKuYBf+6SSi8jtAYOuPw8DDMsTElUWEae3zq7vDhH01ayVSIHUSIa8UgbDOUalCFp6gNsaikN0rbxN4dbw== +jest-mock@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.2.4.tgz#c8f0ef33f73d8ff53e3f60b16d59f1128f4072ae" + integrity sha512-iVRU905rutaAoUcrt5Tm1JoHHWi24YabqEGXjPJI4tAyA6wZ7mzDi3GrZ+M7ebgWBqUkZE93GAx1STk7yCMIQA== dependencies: - "@jest/types" "^27.1.1" + "@jest/types" "^27.2.4" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -6423,14 +6440,14 @@ jest-regex-util@^27.0.6: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5" integrity sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ== -jest-resolve-dependencies@^27.2.1: - version "27.2.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.2.1.tgz#239be969ece749d4dc2e1efcf3d2b86c99525c2e" - integrity sha512-9bKEwmz4YshGPjGZAVZOVw6jt7pq2/FjWJmyhnWhvDuiRCHVZBcJhycinX+e/EJ7jafsq26bTpzBIQas3xql1g== +jest-resolve-dependencies@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.2.4.tgz#20c41cc02b66aa45169b282356ec73b133013089" + integrity sha512-i5s7Uh9B3Q6uwxLpMhNKlgBf6pcemvWaORxsW1zNF/YCY3jd5EftvnGBI+fxVwJ1CBxkVfxqCvm1lpZkbaoGmg== dependencies: - "@jest/types" "^27.1.1" + "@jest/types" "^27.2.4" jest-regex-util "^27.0.6" - jest-snapshot "^27.2.1" + jest-snapshot "^27.2.4" jest-resolve@27.0.6, jest-resolve@^27.0.6: version "27.0.6" @@ -6462,19 +6479,19 @@ jest-resolve@^27.0.2: resolve "^1.20.0" slash "^3.0.0" -jest-resolve@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.2.0.tgz#f5d053693ab3806ec2f778e6df8b0aa4cfaef95f" - integrity sha512-v09p9Ib/VtpHM6Cz+i9lEAv1Z/M5NVxsyghRHRMEUOqwPQs3zwTdwp1xS3O/k5LocjKiGS0OTaJoBSpjbM2Jlw== +jest-resolve@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.2.4.tgz#d3b999f073ff84a8ae109ce99ff7f3223048701a" + integrity sha512-IsAO/3+3BZnKjI2I4f3835TBK/90dxR7Otgufn3mnrDFTByOSXclDi3G2XJsawGV4/18IMLARJ+V7Wm7t+J89Q== dependencies: - "@jest/types" "^27.1.1" + "@jest/types" "^27.2.4" chalk "^4.0.0" escalade "^3.1.1" graceful-fs "^4.2.4" - jest-haste-map "^27.2.0" + jest-haste-map "^27.2.4" jest-pnp-resolver "^1.2.2" - jest-util "^27.2.0" - jest-validate "^27.2.0" + jest-util "^27.2.4" + jest-validate "^27.2.4" resolve "^1.20.0" slash "^3.0.0" @@ -6506,31 +6523,31 @@ jest-runner@^27.0.6: source-map-support "^0.5.6" throat "^6.0.1" -jest-runner@^27.2.1: - version "27.2.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.2.1.tgz#3443b1fc08b8a50f305dfc2d41dd2badf335843b" - integrity sha512-USHitkUUzcB3Y5mRdzlp+KHgRRR2VsXDq5OeATuDmq1qXfT/RwwnQykUhn+KVx3FotxK3pID74UY7o6HYIR8vA== +jest-runner@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.2.4.tgz#d816f4cb4af04f3cba703afcf5a35a335b77cad4" + integrity sha512-hIo5PPuNUyVDidZS8EetntuuJbQ+4IHWxmHgYZz9FIDbG2wcZjrP6b52uMDjAEQiHAn8yn8ynNe+TL8UuGFYKg== dependencies: - "@jest/console" "^27.2.0" - "@jest/environment" "^27.2.0" - "@jest/test-result" "^27.2.0" - "@jest/transform" "^27.2.1" - "@jest/types" "^27.1.1" + "@jest/console" "^27.2.4" + "@jest/environment" "^27.2.4" + "@jest/test-result" "^27.2.4" + "@jest/transform" "^27.2.4" + "@jest/types" "^27.2.4" "@types/node" "*" chalk "^4.0.0" emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" jest-docblock "^27.0.6" - jest-environment-jsdom "^27.2.0" - jest-environment-node "^27.2.0" - jest-haste-map "^27.2.0" - jest-leak-detector "^27.2.0" - jest-message-util "^27.2.0" - jest-resolve "^27.2.0" - jest-runtime "^27.2.1" - jest-util "^27.2.0" - jest-worker "^27.2.0" + jest-environment-jsdom "^27.2.4" + jest-environment-node "^27.2.4" + jest-haste-map "^27.2.4" + jest-leak-detector "^27.2.4" + jest-message-util "^27.2.4" + jest-resolve "^27.2.4" + jest-runtime "^27.2.4" + jest-util "^27.2.4" + jest-worker "^27.2.4" source-map-support "^0.5.6" throat "^6.0.1" @@ -6566,19 +6583,19 @@ jest-runtime@^27.0.6: strip-bom "^4.0.0" yargs "^16.0.3" -jest-runtime@^27.2.1: - version "27.2.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.2.1.tgz#db506f679356f5b94b7be20e770f2541b7c2b339" - integrity sha512-QJNnwL4iteDE/Jq4TfQK7AjhPoUZflBKTtUIkRnFYFkTAZTP/o8k7ekaROiVjmo+NYop5+DQPqX6pz4vWbZSOQ== +jest-runtime@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.2.4.tgz#170044041e5d30625ab8d753516bbe503f213a5c" + integrity sha512-ICKzzYdjIi70P17MZsLLIgIQFCQmIjMFf+xYww3aUySiUA/QBPUTdUqo5B2eg4HOn9/KkUsV0z6GVgaqAPBJvg== dependencies: - "@jest/console" "^27.2.0" - "@jest/environment" "^27.2.0" - "@jest/fake-timers" "^27.2.0" - "@jest/globals" "^27.2.1" + "@jest/console" "^27.2.4" + "@jest/environment" "^27.2.4" + "@jest/fake-timers" "^27.2.4" + "@jest/globals" "^27.2.4" "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.2.0" - "@jest/transform" "^27.2.1" - "@jest/types" "^27.1.1" + "@jest/test-result" "^27.2.4" + "@jest/transform" "^27.2.4" + "@jest/types" "^27.2.4" "@types/yargs" "^16.0.0" chalk "^4.0.0" cjs-module-lexer "^1.0.0" @@ -6587,17 +6604,17 @@ jest-runtime@^27.2.1: exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-haste-map "^27.2.0" - jest-message-util "^27.2.0" - jest-mock "^27.1.1" + jest-haste-map "^27.2.4" + jest-message-util "^27.2.4" + jest-mock "^27.2.4" jest-regex-util "^27.0.6" - jest-resolve "^27.2.0" - jest-snapshot "^27.2.1" - jest-util "^27.2.0" - jest-validate "^27.2.0" + jest-resolve "^27.2.4" + jest-snapshot "^27.2.4" + jest-util "^27.2.4" + jest-validate "^27.2.4" slash "^3.0.0" strip-bom "^4.0.0" - yargs "^16.0.3" + yargs "^16.2.0" jest-serializer@^27.0.1: version "27.0.1" @@ -6675,10 +6692,10 @@ jest-snapshot@^27.0.6: pretty-format "^27.0.6" semver "^7.3.2" -jest-snapshot@^27.2.1: - version "27.2.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.2.1.tgz#385accf3bb71ac84e9a6bda4fc9bb458d53abb35" - integrity sha512-8CTg2YrgZuQbPHW7G0YvLTj4yTRXLmSeEO+ka3eC5lbu5dsTRyoDNS1L7x7EFUTyYQhFH9HQG1/TNlbUgR9Lug== +jest-snapshot@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.2.4.tgz#277b2269437e3ffcb91d95a73b24becf33c5a871" + integrity sha512-5DFxK31rYS8X8C6WXsFx8XxrxW3PGa6+9IrUcZdTLg1aEyXDGIeiBh4jbwvh655bg/9vTETbEj/njfZicHTZZw== dependencies: "@babel/core" "^7.7.2" "@babel/generator" "^7.7.2" @@ -6686,23 +6703,23 @@ jest-snapshot@^27.2.1: "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.0.0" - "@jest/transform" "^27.2.1" - "@jest/types" "^27.1.1" + "@jest/transform" "^27.2.4" + "@jest/types" "^27.2.4" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^27.2.1" + expect "^27.2.4" graceful-fs "^4.2.4" - jest-diff "^27.2.0" + jest-diff "^27.2.4" jest-get-type "^27.0.6" - jest-haste-map "^27.2.0" - jest-matcher-utils "^27.2.0" - jest-message-util "^27.2.0" - jest-resolve "^27.2.0" - jest-util "^27.2.0" + jest-haste-map "^27.2.4" + jest-matcher-utils "^27.2.4" + jest-message-util "^27.2.4" + jest-resolve "^27.2.4" + jest-util "^27.2.4" natural-compare "^1.4.0" - pretty-format "^27.2.0" + pretty-format "^27.2.4" semver "^7.3.2" jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: @@ -6724,12 +6741,12 @@ jest-util@27.0.6, jest-util@^27.0.0, jest-util@^27.0.2, jest-util@^27.0.6: is-ci "^3.0.0" picomatch "^2.2.3" -jest-util@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.2.0.tgz#bfccb85cfafae752257319e825a5b8d4ada470dc" - integrity sha512-T5ZJCNeFpqcLBpx+Hl9r9KoxBCUqeWlJ1Htli+vryigZVJ1vuLB9j35grEBASp4R13KFkV7jM52bBGnArpJN6A== +jest-util@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.2.4.tgz#3d7ce081b2e7f4cfe0156452ac01f3cb456cc656" + integrity sha512-mW++4u+fSvAt3YBWm5IpbmRAceUqa2B++JlUZTiuEt2AmNYn0Yw5oay4cP17TGsMINRNPSGiJ2zNnX60g+VbFg== dependencies: - "@jest/types" "^27.1.1" + "@jest/types" "^27.2.4" "@types/node" "*" chalk "^4.0.0" graceful-fs "^4.2.4" @@ -6760,29 +6777,29 @@ jest-validate@^27.0.6: leven "^3.1.0" pretty-format "^27.0.6" -jest-validate@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.2.0.tgz#b7535f12d95dd3b4382831f4047384ca098642ab" - integrity sha512-uIEZGkFKk3+4liA81Xu0maG5aGDyPLdp+4ed244c+Ql0k3aLWQYcMbaMLXOIFcb83LPHzYzqQ8hwNnIxTqfAGQ== +jest-validate@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.2.4.tgz#b66d462b2fb93d7e16a47d1aa8763d5600bf2cfa" + integrity sha512-VMtbxbkd7LHnIH7PChdDtrluCFRJ4b1YV2YJzNwwsASMWftq/HgqiqjvptBOWyWOtevgO3f14wPxkPcLlVBRog== dependencies: - "@jest/types" "^27.1.1" + "@jest/types" "^27.2.4" camelcase "^6.2.0" chalk "^4.0.0" jest-get-type "^27.0.6" leven "^3.1.0" - pretty-format "^27.2.0" + pretty-format "^27.2.4" -jest-watcher@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.2.0.tgz#dc2eef4c13c6d41cebf3f1fc5f900a54b51c2ea0" - integrity sha512-SjRWhnr+qO8aBsrcnYIyF+qRxNZk6MZH8TIDgvi+VlsyrvOyqg0d+Rm/v9KHiTtC9mGGeFi9BFqgavyWib6xLg== +jest-watcher@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.2.4.tgz#b1d5c39ab94f59f4f35f66cc96f7761a10e0cfc4" + integrity sha512-LXC/0+dKxhK7cfF7reflRYlzDIaQE+fL4ynhKhzg8IMILNMuI4xcjXXfUJady7OR4/TZeMg7X8eHx8uan9vqaQ== dependencies: - "@jest/test-result" "^27.2.0" - "@jest/types" "^27.1.1" + "@jest/test-result" "^27.2.4" + "@jest/types" "^27.2.4" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.2.0" + jest-util "^27.2.4" string-length "^4.0.1" jest-worker@^27.0.2: @@ -6803,23 +6820,23 @@ jest-worker@^27.0.6: merge-stream "^2.0.0" supports-color "^8.0.0" -jest-worker@^27.2.0: - version "27.2.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.2.0.tgz#11eef39f1c88f41384ca235c2f48fe50bc229bc0" - integrity sha512-laB0ZVIBz+voh/QQy9dmUuuDsadixeerrKqyVpgPz+CCWiOYjOBabUXHIXZhsdvkWbLqSHbgkAHWl5cg24Q6RA== +jest-worker@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.2.4.tgz#881455df75e22e7726a53f43703ab74d6b36f82d" + integrity sha512-Zq9A2Pw59KkVjBBKD1i3iE2e22oSjXhUKKuAK1HGX8flGwkm6NMozyEYzKd41hXc64dbd/0eWFeEEuxqXyhM+g== dependencies: "@types/node" "*" merge-stream "^2.0.0" supports-color "^8.0.0" jest@^27.0.3: - version "27.2.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.2.1.tgz#9263102056fe152fd2478d181cf9bbbd2a6a8da4" - integrity sha512-0MyvNS7J1HbkeotYaqKNGioN+p1/AAPtI1Z8iwMtCBE+PwBT+M4l25D9Pve8/KdhktYLgZaGyyj9CoDytD+R2Q== + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest/-/jest-27.2.4.tgz#70e27bef873138afc123aa4769f7124c50ad3efb" + integrity sha512-h4uqb1EQLfPulWyUFFWv9e9Nn8sCqsJ/j3wk/KCY0p4s4s0ICCfP3iMf6hRf5hEhsDyvyrCgKiZXma63gMz16A== dependencies: - "@jest/core" "^27.2.1" + "@jest/core" "^27.2.4" import-local "^3.0.2" - jest-cli "^27.2.1" + jest-cli "^27.2.4" jju@~1.4.0: version "1.4.0" @@ -8095,11 +8112,6 @@ osenv@^0.1.4, osenv@^0.1.5: os-homedir "^1.0.0" os-tmpdir "^1.0.0" -p-each-series@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.2.0.tgz#105ab0357ce72b202a8a8b94933672657b5e2a9a" - integrity sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA== - p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -8475,7 +8487,7 @@ prettier@2.3.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== -pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6, pretty-format@^27.2.0: +pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6, pretty-format@^27.2.4: version "27.2.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.2.tgz#c080f1ab7ac64302e4d438f208596fc649dbeeb3" integrity sha512-+DdLh+rtaElc2SQOE/YPH8k2g3Rf2OXWEpy06p8Szs3hdVSYD87QOOlYRHWAeb/59XTmeVmRKvDD0svHqf6ycA== @@ -10130,6 +10142,15 @@ v8-to-istanbul@^8.0.0: convert-source-map "^1.6.0" source-map "^0.7.3" +v8-to-istanbul@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz#0aeb763894f1a0a1676adf8a8b7612a38902446c" + integrity sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^1.6.0" + source-map "^0.7.3" + validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -10489,7 +10510,7 @@ yargs@^14.2.2: y18n "^4.0.0" yargs-parser "^15.0.1" -yargs@^16.0.3: +yargs@^16.0.3, yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== From 6dc71ca0c7f8b5828570bd5d394e9a871060c619 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 10:57:57 -0700 Subject: [PATCH 385/473] chore: bump @commitlint/config-lerna-scopes from 13.1.0 to 13.2.0 (#3953) Bumps [@commitlint/config-lerna-scopes](https://github.com/conventional-changelog/commitlint) from 13.1.0 to 13.2.0. - [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/v13.1.0...v13.2.0) --- updated-dependencies: - dependency-name: "@commitlint/config-lerna-scopes" dependency-type: direct:development update-type: version-update:semver-minor ... 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 7a60b2bd464e..89d74239d82a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -336,9 +336,9 @@ conventional-changelog-conventionalcommits "^4.3.1" "@commitlint/config-lerna-scopes@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-lerna-scopes/-/config-lerna-scopes-13.1.0.tgz#c30006ff60a2a625184b9c37bc2ba8ce44ff0d60" - integrity sha512-/OTFM75GYHFRm5m1TKOpHsLvAUuGL6GYnA5xJDT4fe2vPIGqgBYVL9hEolKYTJfDtviBq4fEkEWZQjQF5e4KgA== + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-lerna-scopes/-/config-lerna-scopes-13.2.0.tgz#5382831c6562bb94ad889799fa24cf540a79a652" + integrity sha512-d2VqA1EX+G+XvEWIr3B37bydtMm+UHvmAWU6z0v5oOgUvBwZcNMzvTrwdZB6524YCmspi2q+kwgimMR+sBilXQ== dependencies: globby "^11.0.1" import-from "4.0.0" From 0d229e34c61ea04294443fb077f2601823c65921 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 10:58:02 -0700 Subject: [PATCH 386/473] chore: bump cspell from 5.10.1 to 5.11.1 (#3954) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.10.1 to 5.11.1. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/compare/v5.10.1...v5.11.1) --- updated-dependencies: - dependency-name: cspell dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 129 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 72 insertions(+), 57 deletions(-) diff --git a/yarn.lock b/yarn.lock index 89d74239d82a..309bd1614c22 100644 --- a/yarn.lock +++ b/yarn.lock @@ -461,10 +461,10 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.10.1": - version "5.10.1" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.10.1.tgz#31108cf2ef630d28601113191bc00a5278650900" - integrity sha512-4NXeyTMXsl0bV6tIG7N6LAeATkBIGCjQEuh9fNjGduOYCXn3HgTSNgOSdgdlLnnLt2zwvoFtwHDU1vXCDN8IrQ== +"@cspell/cspell-bundled-dicts@^5.11.1": + version "5.11.1" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.11.1.tgz#3cc1c81b446eb5efc25e60921edb30a23a4dd672" + integrity sha512-i/xbEfAP162BeZRftS+1l/BnOgoyBLauzGLp7c9MgBrB6hJf0fWjYndyLsKKXmHNRjPzqA8C6BHJRQh4ZSXi4g== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" @@ -495,17 +495,17 @@ "@cspell/dict-php" "^1.0.24" "@cspell/dict-powershell" "^1.0.18" "@cspell/dict-public-licenses" "^1.0.3" - "@cspell/dict-python" "^1.0.37" + "@cspell/dict-python" "^2.0.3" "@cspell/dict-ruby" "^1.0.14" "@cspell/dict-rust" "^1.0.23" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.42" + "@cspell/dict-software-terms" "^1.0.45" "@cspell/dict-typescript" "^1.0.19" -"@cspell/cspell-types@^5.10.0": - version "5.10.0" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.10.0.tgz#edf94262b763be67ca5e0b870930604bcc1de413" - integrity sha512-jssGvbGGfAKwrCetyBuFHrSC/8OIYF4fNXLkUQDiftHj/V5YOpAuRE57EzH2nGLkQ1pGGD5fjvLuYYDU1ZcioQ== +"@cspell/cspell-types@^5.11.1": + version "5.11.1" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.11.1.tgz#61e744782acb8f1fd21a44f0aa59de0572c6ccab" + integrity sha512-QSPqbrzbGOWDCibFirDQwheNyf0RIO4+GgYN5CQWis0y4ZY9GIBkQkxaqbgLQEu/lTRNyVhg+m/Y9yNv73t59A== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -652,10 +652,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-public-licenses/-/dict-public-licenses-1.0.3.tgz#d02ee79f7b7aecd696695e5aba135e6553e154ec" integrity sha512-sXjxOHJ9Q4rZvE1UbwpwJQ8EXO3fadKBjJIWmz0z+dZAbvTrmz5Ln1Ef9ruJvLPfwAps8m3TCV6Diz60RAQqHg== -"@cspell/dict-python@^1.0.37": - version "1.0.37" - resolved "https://registry.yarnpkg.com/@cspell/dict-python/-/dict-python-1.0.37.tgz#59d3f7dbcb759463529817156c5ac09649b54f0b" - integrity sha512-RPeYJxC7t6k9uL4aQp5kLarOddEAqfRw9VBTt+cOVSlMqEtEtxJGm8w91V28fwnRX4hQR0yhiHPEYcdLpMtpfQ== +"@cspell/dict-python@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@cspell/dict-python/-/dict-python-2.0.3.tgz#c0d98903c1242a621d89162e82583597541c08cc" + integrity sha512-b15Dk/nDzeB5mbTSXx4RGKgmM9AW5BpaHyZoUZNUOdPfQbcd02hVblro/MXMw45SvQ3Wr/VFJx32skwuRkvFPg== "@cspell/dict-ruby@^1.0.14": version "1.0.14" @@ -672,10 +672,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.42": - version "1.0.42" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.42.tgz#748b7d4b33182b2fbf51924f3242e3b9c03affb4" - integrity sha512-VRIq7b6NnWVHeO0pzpHT10btQNYcRCyiSZc162xGlyO8+IMXq9Noemyqv+POS9oRknhtlF0rL1Hrg4ypHP3B+w== +"@cspell/dict-software-terms@^1.0.45": + version "1.0.46" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.46.tgz#edbb4d0585252e1f3deb14ffdacc9d12917118c5" + integrity sha512-W4Lf0AmWo7V/tS0kXKsTUW/edfYOQ7QTVisuuQM7bnttrykhlNuNrmcSSYNg5xn46H6MlaZvk3+oz4tHH30nbg== "@cspell/dict-typescript@^1.0.19": version "1.0.19" @@ -2545,7 +2545,7 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-regex@^5.0.0, ansi-regex@^5.0.1: +ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== @@ -3695,32 +3695,32 @@ 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.10.0: - version "5.10.0" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.10.0.tgz#04c1ed153fedc2b9bfaafbef4efb4865fbd65893" - integrity sha512-aMt4OxvrdP1QM7rhsOvmkmdKmMY1oq11iHwEf/e/XCezmkab61QJaSM+oGk2Io+xKjdJrJVKOnkikxfQtyP6vw== +cspell-glob@^5.11.1: + version "5.11.1" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.11.1.tgz#c8d26a77f9769a291f16288776f3f544ea165d61" + integrity sha512-1/X8ZkC7bMh8kb5RjkIzlfktz4asGfIUHbLm85nXO7wRYFZ/spK11YrPsRNXoEJsoDUkElDUvgN3pJFd9tM3vw== dependencies: micromatch "^4.0.4" -cspell-io@^5.10.0: - version "5.10.0" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.10.0.tgz#5bfe04d5c924aa808d5129034e572b587ada90ef" - integrity sha512-vOJ44cGueqd6GWCmJSAeZ/GbmgJiZdGcvS0mkDhBW3CS5+L8ZH3NItSiH70H/zZUAPCelkyqoJP2zj0MxSVqXA== +cspell-io@^5.11.1: + version "5.11.1" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.11.1.tgz#375c5db629c143aec3e4ecb576a53ad0c3e21176" + integrity sha512-FWCNq1dY6MO1Y494ou3Qdvm1fcWGte6bLLYycgz1CLwU42VAzOTMDzzR53+BExRb4HExp3penmIHGrwwG+BZHQ== -cspell-lib@^5.10.1: - version "5.10.1" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.10.1.tgz#e91ac9caa4101c62634b6be149041e1f41c0bf60" - integrity sha512-Oaa+jP90dP1ipeRqoYIGCkgiVg4O4ZzGQr9qGHY1QMu62aknIURo2tzkH6HHtofRRodazGxW0VYl9XAscvOLAA== +cspell-lib@^5.11.1: + version "5.11.1" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.11.1.tgz#68aa5b51a3f449fe1e60b65ff38cb0bfe52f8244" + integrity sha512-4o0umOGIdhx8pWqhVbminW14kwAoPOxiBmMUNwttZQ1kQw3WgT/6LwlFHbNL4pEIAgbMAnt4IX7IbTPL1Z+xDw== dependencies: - "@cspell/cspell-bundled-dicts" "^5.10.1" - "@cspell/cspell-types" "^5.10.0" + "@cspell/cspell-bundled-dicts" "^5.11.1" + "@cspell/cspell-types" "^5.11.1" clear-module "^4.1.1" comment-json "^4.1.1" configstore "^5.0.1" cosmiconfig "^7.0.1" - cspell-glob "^5.10.0" - cspell-io "^5.10.0" - cspell-trie-lib "^5.10.1" + cspell-glob "^5.11.1" + cspell-io "^5.11.1" + cspell-trie-lib "^5.11.1" find-up "^5.0.0" fs-extra "^10.0.0" gensequence "^3.1.1" @@ -3729,28 +3729,31 @@ cspell-lib@^5.10.1: resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.10.1: - version "5.10.1" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.10.1.tgz#5c083e108bc054cb40093698cf61235bc1097188" - integrity sha512-pDlMM4aNBA8pwc6aZTtClr//e2kwyl7bLBRJ8aG608EICzHphfH8Hl0qopnFWCGvr3h52slYyOVuQ/frAcC4dg== +cspell-trie-lib@^5.11.1: + version "5.11.1" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.11.1.tgz#041742b39fd9fbc596a3d0aafc13b697a42b85f2" + integrity sha512-2VQqKT+a5YKRy1CDrJOxtwUaPKCugMzg+tgZT0ft+CXZ7dzIxqi1RsC63eDpKVPx06WwTFYMx9FvtVCzU+2LNQ== dependencies: fs-extra "^10.0.0" gensequence "^3.1.1" cspell@^5.5.2: - version "5.10.1" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.10.1.tgz#dfbada1536db121342a4606d9a027e3839844be4" - integrity sha512-jTj8gErwM+B0VnB2YULQ2ABHEc4Ch2udSnFoVRBGWRYKVqXYuRdqpX58j/UA9ByeDqXhx7Hoqg/1Q6vsHAJdZQ== + version "5.11.1" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.11.1.tgz#654bfec3ce1356282a479544f59caf313c6f734e" + integrity sha512-VO+zPnl7KtGcQICe6dSeCRTT6tODnr79Mm39iY4VXDYKf0q5CtzAbABMiFIwMKD2vuCnc3kCl+1nwHYLjqRJHg== dependencies: chalk "^4.1.2" commander "^8.2.0" comment-json "^4.1.1" - cspell-glob "^5.10.0" - cspell-lib "^5.10.1" + cspell-glob "^5.11.1" + cspell-lib "^5.11.1" + fast-json-stable-stringify "^2.1.0" + file-entry-cache "^6.0.1" fs-extra "^10.0.0" get-stdin "^8.0.0" - glob "^7.1.7" - strip-ansi "^6.0.0" + glob "^7.2.0" + imurmurhash "^0.1.4" + strip-ansi "^6.0.1" vscode-uri "^3.0.2" cssom@^0.4.4: @@ -4614,7 +4617,7 @@ fast-glob@^3.1.1: micromatch "^4.0.2" picomatch "^2.2.1" -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -5101,10 +5104,10 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@*, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.7, glob@~7.1.7: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== +glob@*, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.7, glob@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -5125,6 +5128,18 @@ glob@7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" +glob@~7.1.7: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-dirs@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -9491,12 +9506,12 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: - ansi-regex "^5.0.0" + ansi-regex "^5.0.1" strip-bom@4.0.0, strip-bom@^4.0.0: version "4.0.0" From 90cf56268f5299c3ea0f2a29fb9d629beda9dc1d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 10:58:23 -0700 Subject: [PATCH 387/473] chore: bump @commitlint/cli from 13.1.0 to 13.2.0 (#3955) Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint) from 13.1.0 to 13.2.0. - [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/v13.1.0...v13.2.0) --- updated-dependencies: - dependency-name: "@commitlint/cli" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 289 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 201 insertions(+), 88 deletions(-) diff --git a/yarn.lock b/yarn.lock index 309bd1614c22..04a6879fbea7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -314,15 +314,15 @@ integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== "@commitlint/cli@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-13.1.0.tgz#3608bb24dbef41aaa0729ffe65c7f9b57409626a" - integrity sha512-xN/uNYWtGTva5OMSd+xA6e6/c2jk8av7MUbdd6w2cw89u6z3fAWoyiH87X0ewdSMNYmW/6B3L/2dIVGHRDID5w== - dependencies: - "@commitlint/format" "^13.1.0" - "@commitlint/lint" "^13.1.0" - "@commitlint/load" "^13.1.0" - "@commitlint/read" "^13.1.0" - "@commitlint/types" "^13.1.0" + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-13.2.0.tgz#9e85756b0d0ee06c34b5635d7ef42d7a6c72bd6f" + integrity sha512-RqG0cxxiwaL9OgQbA2ZEfZaVIRJmbtsZgnj5G07AjN7///s/40grSN4/kDl8YjUgvAZskPfJRoGGYNvHJ4zHWA== + dependencies: + "@commitlint/format" "^13.2.0" + "@commitlint/lint" "^13.2.0" + "@commitlint/load" "^13.2.0" + "@commitlint/read" "^13.2.0" + "@commitlint/types" "^13.2.0" lodash "^4.17.19" resolve-from "5.0.0" resolve-global "1.0.0" @@ -345,119 +345,120 @@ resolve-pkg "2.0.0" semver "7.3.5" -"@commitlint/ensure@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-13.1.0.tgz#057a325b54f104cbeed2a26bacb5eec29298e7d5" - integrity sha512-NRGyjOdZQnlYwm9it//BZJ2Vm+4x7G9rEnHpLCvNKYY0c6RA8Qf7hamLAB8dWO12RLuFt06JaOpHZoTt/gHutA== +"@commitlint/ensure@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-13.2.0.tgz#990c24f753781d1f14c1647c52d34a5730892e3d" + integrity sha512-rqhT62RehdLTRBu8OrPHnRCCd/7RmHEE4TiTlT4BLlr5ls5jlZhecOQWJ8np872uCNirrJ5NFjnjYYdbkNoW9Q== dependencies: - "@commitlint/types" "^13.1.0" + "@commitlint/types" "^13.2.0" lodash "^4.17.19" -"@commitlint/execute-rule@^13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-13.0.0.tgz#7823303b82b5d86dac46e67cfa005f4433476981" - integrity sha512-lBz2bJhNAgkkU/rFMAw3XBNujbxhxlaFHY3lfKB/MxpAa+pIfmWB3ig9i1VKe0wCvujk02O0WiMleNaRn2KJqw== +"@commitlint/execute-rule@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-13.2.0.tgz#e112159d6647bc5afe2f77c2080ef0f615fd541f" + integrity sha512-6nPwpN0hwTYmsH3WM4hCdN+NrMopgRIuQ0aqZa+jnwMoS/g6ljliQNYfL+m5WO306BaIu1W3yYpbW5aI8gEr0g== -"@commitlint/format@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-13.1.0.tgz#915570d958d83bae5fa645de6b1e6c9dd1362ec0" - integrity sha512-n46rYvzf+6Sm99TJjTLjJBkjm6JVcklt31lDO5Q+pCIV0NnJ4qIUcwa6wIL9a9Vqb1XzlMgtp27E0zyYArkvSg== +"@commitlint/format@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-13.2.0.tgz#eccfff0a09ced8533afb21b2b3a1e28176b109d5" + integrity sha512-yNBQJe6YFhM1pJAta4LvzQxccSKof6axJH7ALYjuhQqfT8AKlad7Y/2SuJ07ioyreNIqwOTuF2UfU8yJ7JzEIQ== dependencies: - "@commitlint/types" "^13.1.0" + "@commitlint/types" "^13.2.0" chalk "^4.0.0" -"@commitlint/is-ignored@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-13.1.0.tgz#88a5dfbc8f9ea91e860323af6681aa131322b0c4" - integrity sha512-P6zenLE5Tn3FTNjRzmL9+/KooTXEI0khA2TmUbuei9KiycemeO4q7Xk7w7aXwFPNAbN0O9oI7z3z7cFpzKJWmQ== +"@commitlint/is-ignored@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-13.2.0.tgz#532ddfb5d62a489ff4d3ad88bcbee44e8c7d2c8f" + integrity sha512-onnx4WctHFPPkHGFFAZBIWRSaNwuhixIIfbwPhcZ6IewwQX5n4jpjwM1GokA7vhlOnQ57W7AavbKUGjzIVtnRQ== dependencies: - "@commitlint/types" "^13.1.0" + "@commitlint/types" "^13.2.0" semver "7.3.5" -"@commitlint/lint@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-13.1.0.tgz#ea56ce0970f9b75ffe7bd2c9968f4f1d4461ba3a" - integrity sha512-qH9AYSQDDTaSWSdtOvB3G1RdPpcYSgddAdFYqpFewlKQ1GJj/L+sM7vwqCG7/ip6AiM04Sry1sgmFzaEoFREUA== +"@commitlint/lint@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-13.2.0.tgz#b568c96bd21c8fa8eec359a5e21d22743206761f" + integrity sha512-5XYkh0e9ehHjA7BxAHFpjPgr1qqbFY8OFG1wpBiAhycbYBtJnQmculA2wcwqTM40YCUBqEvWFdq86jTG8fbkMw== dependencies: - "@commitlint/is-ignored" "^13.1.0" - "@commitlint/parse" "^13.1.0" - "@commitlint/rules" "^13.1.0" - "@commitlint/types" "^13.1.0" + "@commitlint/is-ignored" "^13.2.0" + "@commitlint/parse" "^13.2.0" + "@commitlint/rules" "^13.2.0" + "@commitlint/types" "^13.2.0" -"@commitlint/load@>6.1.1", "@commitlint/load@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-13.1.0.tgz#d6c9b547551f2216586d6c1964d93f92e7b04277" - integrity sha512-zlZbjJCWnWmBOSwTXis8H7I6pYk6JbDwOCuARA6B9Y/qt2PD+NCo0E/7EuaaFoxjHl+o56QR5QttuMBrf+BJzg== +"@commitlint/load@>6.1.1", "@commitlint/load@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-13.2.0.tgz#6bd90b803f7fd102766731dad207cca075b67a4a" + integrity sha512-Nhkv+hwWCCxWGjmE9jd1U8kfGGCkZVpwzlTtdKxpY+Aj2VCFg3BjY+qA81pMF3oAsIpxchSaZG5llb8kduVjYg== dependencies: - "@commitlint/execute-rule" "^13.0.0" - "@commitlint/resolve-extends" "^13.0.0" - "@commitlint/types" "^13.1.0" + "@commitlint/execute-rule" "^13.2.0" + "@commitlint/resolve-extends" "^13.2.0" + "@commitlint/types" "^13.2.0" + "@endemolshinegroup/cosmiconfig-typescript-loader" "^3.0.2" chalk "^4.0.0" cosmiconfig "^7.0.0" lodash "^4.17.19" resolve-from "^5.0.0" -"@commitlint/message@^13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-13.0.0.tgz#4f8d56b59e9cee8b37b8db6b48c26d7faf33762f" - integrity sha512-W/pxhesVEk8747BEWJ+VGQ9ILHmCV27/pEwJ0hGny1wqVquUR8SxvScRCbUjHCB1YtWX4dEnOPXOS9CLH/CX7A== +"@commitlint/message@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-13.2.0.tgz#1a60f578551750a8d6b533be8a40541fc2e928a8" + integrity sha512-+LlErJj2F2AC86xJb33VJIvSt25xqSF1I0b0GApSgoUtQBeJhx4SxIj1BLvGcLVmbRmbgTzAFq/QylwLId7EhA== -"@commitlint/parse@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-13.1.0.tgz#b88764be36527a468531e1b8dd2d95693ff9ba34" - integrity sha512-xFybZcqBiKVjt6vTStvQkySWEUYPI0AcO4QQELyy29o8EzYZqWkhUfrb7K61fWiHsplWL1iL6F3qCLoxSgTcrg== +"@commitlint/parse@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-13.2.0.tgz#48054602bd73dccbffee4f9ba8b2549c857ba0b7" + integrity sha512-AtfKSQJQADbDhW+kuC5PxOyBANsYCuuJlZRZ2PYslOz2rvWwZ93zt+nKjM4g7C9ETbz0uq4r7/EoOsTJ2nJqfQ== dependencies: - "@commitlint/types" "^13.1.0" + "@commitlint/types" "^13.2.0" conventional-changelog-angular "^5.0.11" - conventional-commits-parser "^3.0.0" + conventional-commits-parser "^3.2.2" -"@commitlint/read@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-13.1.0.tgz#ccb65426b1228b8a598ed36966722d19756eea41" - integrity sha512-NrVe23GMKyL6i1yDJD8IpqCBzhzoS3wtLfDj8QBzc01Ov1cYBmDojzvBklypGb+MLJM1NbzmRM4PR5pNX0U/NQ== +"@commitlint/read@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-13.2.0.tgz#2af580322ec6297478aba84fa8ec24fd27c35a54" + integrity sha512-7db5e1Bn3re6hQN0SqygTMF/QX6/MQauoJn3wJiUHE93lvwO6aFQxT3qAlYeyBPwfWsmDz/uSH454jtrSsv3Uw== dependencies: - "@commitlint/top-level" "^13.0.0" - "@commitlint/types" "^13.1.0" + "@commitlint/top-level" "^13.2.0" + "@commitlint/types" "^13.2.0" fs-extra "^10.0.0" git-raw-commits "^2.0.0" -"@commitlint/resolve-extends@^13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-13.0.0.tgz#a38fcd2474483bf9ec6e1e901b27b8a23abe7d73" - integrity sha512-1SyaE+UOsYTkQlTPUOoj4NwxQhGFtYildVS/d0TJuK8a9uAJLw7bhCLH2PEeH5cC2D1do4Eqhx/3bLDrSLH3hg== +"@commitlint/resolve-extends@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-13.2.0.tgz#74f48512eb1785abe07336a5208225fdf7fec327" + integrity sha512-HLCMkqMKtvl1yYLZ1Pm0UpFvd0kYjsm1meLOGZ7VkOd9G/XX+Fr1S2G5AT2zeiDw7WUVYK8lGVMNa319bnV+aw== dependencies: import-fresh "^3.0.0" lodash "^4.17.19" resolve-from "^5.0.0" resolve-global "^1.0.0" -"@commitlint/rules@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-13.1.0.tgz#04f5aaf952884364ebf4e899ec440e3985f0e580" - integrity sha512-b6F+vBqEXsHVghrhomG0Y6YJimHZqkzZ0n5QEpk03dpBXH2OnsezpTw5e+GvbyYCc7PutGbYVQkytuv+7xCxYA== +"@commitlint/rules@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-13.2.0.tgz#e272fbd4099c2fe98bca1277d7f8caa3578b8f43" + integrity sha512-O3A9S7blOzvHfzrJrUQe9JxdtGy154ol/GXHwvd8WfMJ10y5ryBB4b6+0YZ1XhItWzrEASOfOKbD++EdLV90dQ== dependencies: - "@commitlint/ensure" "^13.1.0" - "@commitlint/message" "^13.0.0" - "@commitlint/to-lines" "^13.0.0" - "@commitlint/types" "^13.1.0" + "@commitlint/ensure" "^13.2.0" + "@commitlint/message" "^13.2.0" + "@commitlint/to-lines" "^13.2.0" + "@commitlint/types" "^13.2.0" execa "^5.0.0" -"@commitlint/to-lines@^13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-13.0.0.tgz#5937dd287e3a4f984580ea94bdb994132169a780" - integrity sha512-mzxWwCio1M4/kG9/69TTYqrraQ66LmtJCYTzAZdZ2eJX3I5w52pSjyP/DJzAUVmmJCYf2Kw3s+RtNVShtnZ+Rw== +"@commitlint/to-lines@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-13.2.0.tgz#e65d16340f353b496e90609b452f23f4b0be0b6a" + integrity sha512-ZfWZix2y/CzewReCrj5g0nKOEfj5HW9eBMDrqjJJMPApve00CWv0tYrFCGXuGlv244lW4uvWJt6J/0HLRWsfyg== -"@commitlint/top-level@^13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-13.0.0.tgz#f8e1d1425240cd72c600e4da5716418c4ea0bda2" - integrity sha512-baBy3MZBF28sR93yFezd4a5TdHsbXaakeladfHK9dOcGdXo9oQe3GS5hP3BmlN680D6AiQSN7QPgEJgrNUWUCg== +"@commitlint/top-level@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-13.2.0.tgz#869814e8ac0fec6a6e1f2e9665a318e4dc979e1e" + integrity sha512-knBvWYbIq6VV6VPHrVeDsxDiJq4Zq6cv5NIYU3iesKAsmK2KlLfsZPa+Ig96Y4AqAPU3zNJwjHxYkz9qxdBbfA== dependencies: find-up "^5.0.0" -"@commitlint/types@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-13.1.0.tgz#12cfb6e932372b1816af8900e2d10694add28191" - integrity sha512-zcVjuT+OfKt8h91vhBxt05RMcTGEx6DM7Q9QZeuMbXFk6xgbsSEDMMapbJPA1bCZ81fa/1OQBijSYPrKvtt06g== +"@commitlint/types@^13.2.0": + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-13.2.0.tgz#ed8128f9e41383f8f0ee1b0370c724826821e581" + integrity sha512-RRVHEqmk1qn/dIaSQhvuca6k/6Z54G+r/KyimZ8gnAFielGiGUpsFRhIY3qhd5rXClVxDaa3nlcyTWckSccotQ== dependencies: chalk "^4.0.0" @@ -694,6 +695,16 @@ dependencies: "@cspotcode/source-map-consumer" "0.8.0" +"@endemolshinegroup/cosmiconfig-typescript-loader@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@endemolshinegroup/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-3.0.2.tgz#eea4635828dde372838b0909693ebd9aafeec22d" + integrity sha512-QRVtqJuS1mcT56oHpVegkKBlgtWjXw/gHNWO3eL9oyB5Sc7HBoc2OLG/nYpVfT/Jejvo3NUrD0Udk7XgoyDKkA== + dependencies: + lodash.get "^4" + make-error "^1" + ts-node "^9" + tslib "^2" + "@eslint/eslintrc@^0.4.1": version "0.4.1" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.1.tgz#442763b88cecbe3ee0ec7ca6d6dd6168550cbf14" @@ -3567,7 +3578,7 @@ conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.6: lodash.ismatch "^4.4.0" modify-values "^1.0.0" -conventional-commits-parser@^3.0.0, conventional-commits-parser@^3.0.3: +conventional-commits-parser@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.1.0.tgz#10140673d5e7ef5572633791456c5d03b69e8be4" integrity sha512-RSo5S0WIwXZiRxUGTPuYFbqvrR4vpJ1BDdTlthFgvHt5kEdnd1+pdvwWphWn57/oIl4V72NMmOocFqqJ8mFFhA== @@ -3580,6 +3591,18 @@ conventional-commits-parser@^3.0.0, conventional-commits-parser@^3.0.3: through2 "^3.0.0" trim-off-newlines "^1.0.0" +conventional-commits-parser@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.2.tgz#190fb9900c6e02be0c0bca9b03d57e24982639fd" + integrity sha512-Jr9KAKgqAkwXMRHjxDwO/zOCDKod1XdAESHAGuJX38iZ7ZzVti/tvVoysO0suMsdAObp9NQ2rHSsSbnAqZ5f5g== + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.1" + lodash "^4.17.15" + meow "^8.0.0" + split2 "^3.0.0" + through2 "^4.0.0" + conventional-recommended-bump@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-5.0.1.tgz#5af63903947b6e089e77767601cb592cabb106ba" @@ -5332,6 +5355,13 @@ hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== +hosted-git-info@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.0.2.tgz#5e425507eede4fea846b7262f0838456c4209961" + integrity sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg== + dependencies: + lru-cache "^6.0.0" + html-encoding-sniffer@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" @@ -5682,6 +5712,13 @@ is-core-module@^2.1.0, is-core-module@^2.2.0, is-core-module@^2.6.0: dependencies: has "^1.0.3" +is-core-module@^2.5.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.7.0.tgz#3c0ef7d31b4acfc574f80c58409d568a836848e3" + integrity sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -7218,7 +7255,7 @@ lodash.flatten@~4.4.0: resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= -lodash.get@^4.0.0, lodash.get@^4.4.2: +lodash.get@^4, lodash.get@^4.0.0, lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= @@ -7355,7 +7392,7 @@ make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-error@1.x, make-error@^1.1.1: +make-error@1.x, make-error@^1, make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -7517,6 +7554,23 @@ meow@^7.0.0: type-fest "^0.13.1" yargs-parser "^18.1.3" +meow@^8.0.0: + version "8.1.2" + resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" + integrity sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q== + dependencies: + "@types/minimist" "^1.2.0" + camelcase-keys "^6.2.2" + decamelize-keys "^1.1.0" + hard-rejection "^2.1.0" + minimist-options "4.1.0" + normalize-package-data "^3.0.0" + read-pkg-up "^7.0.1" + redent "^3.0.0" + trim-newlines "^3.0.0" + type-fest "^0.18.0" + yargs-parser "^20.2.3" + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -7853,6 +7907,16 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package- semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" +normalize-package-data@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" + integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== + dependencies: + hosted-git-info "^4.0.1" + is-core-module "^2.5.0" + semver "^7.3.4" + validate-npm-package-license "^3.0.1" + normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -8726,7 +8790,7 @@ read@1, read@~1.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@^3.0.2: +"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -9075,7 +9139,7 @@ semver@7.3.4: dependencies: lru-cache "^6.0.0" -semver@7.3.5, semver@7.x, semver@^7.2.1, semver@^7.3.2, semver@^7.3.5, semver@~7.3.0: +semver@7.3.5, semver@7.x, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@~7.3.0: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -9259,6 +9323,14 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" +source-map-support@^0.5.17: + version "0.5.20" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.20.tgz#12166089f8f5e5e8c56926b377633392dd2cb6c9" + integrity sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-support@^0.5.6: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" @@ -9327,6 +9399,13 @@ split2@^2.0.0: dependencies: through2 "^2.0.2" +split2@^3.0.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" + integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== + dependencies: + readable-stream "^3.0.0" + split@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" @@ -9728,6 +9807,13 @@ through2@^3.0.0: inherits "^2.0.4" readable-stream "2 || 3" +through2@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-4.0.2.tgz#a7ce3ac2a7a8b0b966c80e7c49f0484c3b239764" + integrity sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw== + dependencies: + readable-stream "3" + through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -9877,6 +9963,18 @@ ts-node@^10.0.0: make-error "^1.1.1" yn "3.1.1" +ts-node@^9: + version "9.1.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" + integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== + dependencies: + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + tsconfig-paths@^3.11.0: version "3.11.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz#954c1fe973da6339c78e06b03ce2e48810b65f36" @@ -9892,6 +9990,11 @@ tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== +tslib@^2: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + tslib@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" @@ -9971,6 +10074,11 @@ type-fest@^0.13.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== +type-fest@^0.18.0: + version "0.18.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" + integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== + type-fest@^0.20.2: version "0.20.2" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" @@ -10491,6 +10599,11 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^20.2.3: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + yargs@15.4.1, yargs@^15.0.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" From bbbef82df5a488fd5d5128c9ab47dc5af07d08e5 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Mon, 4 Oct 2021 11:02:53 -0700 Subject: [PATCH 388/473] docs(eslint-plugin): [consistent-type-imports] remove out-of-date note about decorator inlining --- packages/eslint-plugin/docs/rules/consistent-type-imports.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/consistent-type-imports.md b/packages/eslint-plugin/docs/rules/consistent-type-imports.md index a5808b455788..3d3acbeca272 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-imports.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-imports.md @@ -61,6 +61,4 @@ const x: import('Bar') = 1; ## When Not To Use It - If you are not using TypeScript 3.8 (or greater), then you will not be able to use this rule, as type-only imports are not allowed. -- Certain libraries use the non-inlined imports to infer information about the variables. For example, for dependency injection.
- type-only imports cannot be used with these libraries. See [#2559](https://github.com/typescript-eslint/typescript-eslint/issues/2559#issuecomment-692780580) - If you specifically want to use both import kinds for stylistic reasons, you can disable this rule. From 836be6ef454e4b0104167a660acacea5502d2743 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 18:46:28 -0700 Subject: [PATCH 389/473] chore: bump @microsoft/api-extractor from 7.18.11 to 7.18.12 (#3960) Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack) from 7.18.11 to 7.18.12. - [Release notes](https://github.com/microsoft/rushstack/releases) - [Commits](https://github.com/microsoft/rushstack/compare/@microsoft/api-extractor_v7.18.11...@microsoft/api-extractor_v7.18.12) --- updated-dependencies: - dependency-name: "@microsoft/api-extractor" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 04a6879fbea7..2c0e571048c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1819,16 +1819,16 @@ "@rushstack/node-core-library" "3.41.0" "@microsoft/api-extractor@^7.15.2": - version "7.18.11" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.11.tgz#24910c2432362b09900b493a0713919b662cdb0f" - integrity sha512-WfN5MZry4TrF60OOcGadFDsGECF9JNKNT+8P/8crYAumAYQRitI2cUiQRlCWrgmFgCWNezsNZeI/2BggdnUqcg== + version "7.18.12" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.12.tgz#22644d43dd5c056fbc3d2db9fc692d67ed109e20" + integrity sha512-rFwsegenBjjce09uUr4wK9L9K5y1Lcm1eCHHKbI4w44ZoHdZOQlAGfl16I7pl0AEfkmhJUEcqWixRh07un3XJA== dependencies: "@microsoft/api-extractor-model" "7.13.9" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" "@rushstack/node-core-library" "3.41.0" "@rushstack/rig-package" "0.3.1" - "@rushstack/ts-command-line" "4.9.1" + "@rushstack/ts-command-line" "4.10.0" colors "~1.2.1" lodash "~4.17.15" resolve "~1.17.0" @@ -2125,10 +2125,10 @@ resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.9.1.tgz#9fe594a408c7ef1b67f57b41ba931ecd3f420e92" - integrity sha512-zzoWB6OqVbMjnxlxbAUqbZqDWITUSHqwFCx7JbH5CVrjR9kcsB4NeWkN1I8GcR92beiOGvO3yPlB2NRo5Ugh+A== +"@rushstack/ts-command-line@4.10.0": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.10.0.tgz#6ddc939bb16410078379956dd97c14020b71b236" + integrity sha512-BRF7O4XQKmrZz8GZ6b/+0+4elrnY2kjZsLrUOJ1dwJZxAR0I1+G0/GD66RVPi0ku1qN4A6t+HrB5p2Nxc9ECrA== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" From 27f9674a64589a0ade0902bb343b77d4cdaeeee3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 18:47:08 -0700 Subject: [PATCH 390/473] chore: bump @types/lodash from 4.14.173 to 4.14.175 (#3961) Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.173 to 4.14.175. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) --- updated-dependencies: - dependency-name: "@types/lodash" dependency-type: direct:development update-type: version-update:semver-patch ... 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 2c0e571048c0..77ac2f98964f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2306,9 +2306,9 @@ integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= "@types/lodash@*", "@types/lodash@^4.14.170": - version "4.14.173" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.173.tgz#9d3b674c67a26cf673756f6aca7b429f237f91ed" - integrity sha512-vv0CAYoaEjCw/mLy96GBTnRoZrSxkGE0BKzKimdR8P3OzrNYNvBgtW7p055A+E8C31vXNUhWKoFCbhq7gbyhFg== + version "4.14.175" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.175.tgz#b78dfa959192b01fae0ad90e166478769b215f45" + integrity sha512-XmdEOrKQ8a1Y/yxQFOMbC47G/V2VDO1GvMRnl4O75M4GW/abC5tnfzadQYkqEveqRM1dEJGFFegfPNA2vvx2iw== "@types/marked@*", "@types/marked@^2.0.3": version "2.0.5" From 6d7478e3712ba9bb33d74ea37a68af7d82db0c88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 18:47:18 -0700 Subject: [PATCH 391/473] chore: bump eslint-plugin-eslint-plugin from 3.5.3 to 3.6.1 (#3962) Bumps [eslint-plugin-eslint-plugin](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin) from 3.5.3 to 3.6.1. - [Release notes](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/releases) - [Changelog](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/compare/v3.5.3...v3.6.1) --- updated-dependencies: - dependency-name: eslint-plugin-eslint-plugin dependency-type: direct:development update-type: version-update:semver-minor ... 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 77ac2f98964f..ffc3470c393d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4305,9 +4305,9 @@ eslint-plugin-eslint-comments@^3.2.0: ignore "^5.0.5" eslint-plugin-eslint-plugin@^3.0.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.5.3.tgz#6cac958e944b820962a4cf9e65cc32a2e0415eaf" - integrity sha512-8LnYyjIOLS0gqh3QFVBkahYzkFd5UaMZkkeEvqReSjIBgajYyZaMElU8szHhqDrqr0rWkkZk33j9e4qnFN3x2A== + version "3.6.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.6.1.tgz#6c93655c9345f36874cc4f8aba4f89c81d47b8fe" + integrity sha512-SOE0aoS2+lvtcEbJmy98gEKaxcpkQdxDtqvqE0VQSiGEFme8yTNjpLAjMqPDmmj8KGTwIFd+cYnVykz+9HAIiw== dependencies: eslint-utils "^2.1.0" From 05b0d71b7256c8e65f003c90dab56bb60f312e36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 18:47:30 -0700 Subject: [PATCH 392/473] chore: bump @types/prettier from 2.4.0 to 2.4.1 (#3963) Bumps [@types/prettier](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/prettier) from 2.4.0 to 2.4.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/prettier) --- updated-dependencies: - dependency-name: "@types/prettier" dependency-type: direct:production update-type: version-update:semver-patch ... 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 ffc3470c393d..89794b9870fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2353,9 +2353,9 @@ integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== "@types/prettier@*", "@types/prettier@^2.1.5", "@types/prettier@^2.2.3": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.0.tgz#900b13362610ccd3570fb6eefb911a6732973d00" - integrity sha512-WHRsy5nMpjXfU9B0LqOqPT06EI2+8Xv5NERy0pLxJLbU98q7uhcGogQzfX+rXpU7S5mgHsLxHrLCufZcV/P8TQ== + version "2.4.1" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.1.tgz#e1303048d5389563e130f5bdd89d37a99acb75eb" + integrity sha512-Fo79ojj3vdEZOHg3wR9ksAMRz4P3S5fDB5e/YWZiFnyFQI1WY2Vftu9XoXVVtJfxB7Bpce/QTqWSSntkz2Znrw== "@types/rimraf@^3.0.0": version "3.0.2" From c2373ae1783c123bafeee86302202d34959f2e1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 18:47:41 -0700 Subject: [PATCH 393/473] chore: bump eslint-plugin-jest from 24.4.2 to 24.5.2 (#3964) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.4.2 to 24.5.2. - [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.4.2...v24.5.2) --- updated-dependencies: - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-minor ... 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 89794b9870fd..6a403c3585fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4333,9 +4333,9 @@ eslint-plugin-import@^2.23.4: tsconfig-paths "^3.11.0" eslint-plugin-jest@^24.3.6: - version "24.4.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.4.2.tgz#9e8cf05ee6a0e3025e6149df2f36950abfa8d5bf" - integrity sha512-jNMnqwX75z0RXRMXkxwb/+9ylKJYJLJ8nT8nBT0XFM5qx4IQGxP4edMawa0qGkSbHae0BDPBmi8I2QF0/F04XQ== + version "24.5.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.5.2.tgz#f71f98f27fd18b50f55246ca090f36d1730e36a6" + integrity sha512-lrI3sGAyZi513RRmP08sIW241Ti/zMnn/6wbE4ZBhb3M2pJ9ztaZMnSKSKKBUfotVdwqU8W1KtD8ao2/FR8DIg== dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" From 0cc509b61df248cfb4b42fe64ec800f3cac69c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Tue, 5 Oct 2021 19:14:19 +0200 Subject: [PATCH 394/473] feat(experimental-utils): extract `isNodeOfTypes` out of `ast-utils`' `predicates` (#3836) --- .../src/ast-utils/predicates.ts | 148 ++++++------------ 1 file changed, 50 insertions(+), 98 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/predicates.ts index 566cfbda493a..059437ae1665 100644 --- a/packages/experimental-utils/src/ast-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/predicates.ts @@ -6,6 +6,12 @@ const isNodeOfType = node: TSESTree.Node | null | undefined, ): node is TSESTree.Node & { type: NodeType } => node?.type === nodeType; +const isNodeOfTypes = + (nodeTypes: NodeTypes) => + ( + node: TSESTree.Node | null | undefined, + ): node is TSESTree.Node & { type: NodeTypes[number] } => + !!node && nodeTypes.includes(node.type); type ObjectEntry = [keyof BaseType, BaseType[keyof BaseType]]; type ObjectEntries = Array>; @@ -93,89 +99,48 @@ function isTypeAssertion( const isVariableDeclarator = isNodeOfType(AST_NODE_TYPES.VariableDeclarator); -function isFunction( - node: TSESTree.Node | undefined, -): node is - | TSESTree.ArrowFunctionExpression - | TSESTree.FunctionDeclaration - | TSESTree.FunctionExpression { - if (!node) { - return false; - } - - return [ - AST_NODE_TYPES.ArrowFunctionExpression, - AST_NODE_TYPES.FunctionDeclaration, - AST_NODE_TYPES.FunctionExpression, - ].includes(node.type); -} - -function isFunctionType( - node: TSESTree.Node | undefined, -): node is - | TSESTree.TSCallSignatureDeclaration - | TSESTree.TSConstructorType - | TSESTree.TSConstructSignatureDeclaration - | TSESTree.TSEmptyBodyFunctionExpression - | TSESTree.TSFunctionType - | TSESTree.TSMethodSignature { - if (!node) { - return false; - } - - return [ - AST_NODE_TYPES.TSCallSignatureDeclaration, - AST_NODE_TYPES.TSConstructorType, - AST_NODE_TYPES.TSConstructSignatureDeclaration, - AST_NODE_TYPES.TSEmptyBodyFunctionExpression, - AST_NODE_TYPES.TSFunctionType, - AST_NODE_TYPES.TSMethodSignature, - ].includes(node.type); -} - -function isFunctionOrFunctionType( - node: TSESTree.Node | undefined, -): node is - | TSESTree.ArrowFunctionExpression - | TSESTree.FunctionDeclaration - | TSESTree.FunctionExpression - | TSESTree.TSCallSignatureDeclaration - | TSESTree.TSConstructorType - | TSESTree.TSConstructSignatureDeclaration - | TSESTree.TSEmptyBodyFunctionExpression - | TSESTree.TSFunctionType - | TSESTree.TSMethodSignature { - return isFunction(node) || isFunctionType(node); -} +const functionTypes = [ + AST_NODE_TYPES.ArrowFunctionExpression, + AST_NODE_TYPES.FunctionDeclaration, + AST_NODE_TYPES.FunctionExpression, +] as const; +const isFunction = isNodeOfTypes(functionTypes); + +const functionTypeTypes = [ + AST_NODE_TYPES.TSCallSignatureDeclaration, + AST_NODE_TYPES.TSConstructorType, + AST_NODE_TYPES.TSConstructSignatureDeclaration, + AST_NODE_TYPES.TSEmptyBodyFunctionExpression, + AST_NODE_TYPES.TSFunctionType, + AST_NODE_TYPES.TSMethodSignature, +] as const; +const isFunctionType = isNodeOfTypes(functionTypeTypes); + +const isFunctionOrFunctionType = isNodeOfTypes([ + ...functionTypes, + ...functionTypeTypes, +] as const); const isTSFunctionType = isNodeOfType(AST_NODE_TYPES.TSFunctionType); const isTSConstructorType = isNodeOfType(AST_NODE_TYPES.TSConstructorType); -function isClassOrTypeElement( - node: TSESTree.Node | undefined, -): node is TSESTree.ClassElement | TSESTree.TypeElement { - if (!node) { - return false; - } - - return [ - // ClassElement - AST_NODE_TYPES.ClassProperty, - AST_NODE_TYPES.FunctionExpression, - AST_NODE_TYPES.MethodDefinition, - AST_NODE_TYPES.TSAbstractClassProperty, - AST_NODE_TYPES.TSAbstractMethodDefinition, - AST_NODE_TYPES.TSEmptyBodyFunctionExpression, - AST_NODE_TYPES.TSIndexSignature, - // TypeElement - AST_NODE_TYPES.TSCallSignatureDeclaration, - AST_NODE_TYPES.TSConstructSignatureDeclaration, - // AST_NODE_TYPES.TSIndexSignature, - AST_NODE_TYPES.TSMethodSignature, - AST_NODE_TYPES.TSPropertySignature, - ].includes(node.type); -} +const isClassOrTypeElement = isNodeOfTypes([ + // ClassElement + AST_NODE_TYPES.ClassProperty, + AST_NODE_TYPES.FunctionExpression, + AST_NODE_TYPES.MethodDefinition, + AST_NODE_TYPES.TSAbstractClassProperty, + AST_NODE_TYPES.TSAbstractMethodDefinition, + AST_NODE_TYPES.TSEmptyBodyFunctionExpression, + AST_NODE_TYPES.TSIndexSignature, + // TypeElement + AST_NODE_TYPES.TSCallSignatureDeclaration, + AST_NODE_TYPES.TSConstructSignatureDeclaration, + // AST_NODE_TYPES.TSIndexSignature, + AST_NODE_TYPES.TSMethodSignature, + AST_NODE_TYPES.TSPropertySignature, +] as const); /** * Checks if a node is a constructor method. @@ -215,26 +180,13 @@ function isAwaitKeyword( return node?.type === AST_TOKEN_TYPES.Identifier && node.value === 'await'; } -function isLoop( - node: TSESTree.Node | undefined | null, -): node is - | TSESTree.DoWhileStatement - | TSESTree.ForStatement - | TSESTree.ForInStatement - | TSESTree.ForOfStatement - | TSESTree.WhileStatement { - if (!node) { - return false; - } - - return ( - node.type === AST_NODE_TYPES.DoWhileStatement || - node.type === AST_NODE_TYPES.ForStatement || - node.type === AST_NODE_TYPES.ForInStatement || - node.type === AST_NODE_TYPES.ForOfStatement || - node.type === AST_NODE_TYPES.WhileStatement - ); -} +const isLoop = isNodeOfTypes([ + AST_NODE_TYPES.DoWhileStatement, + AST_NODE_TYPES.ForStatement, + AST_NODE_TYPES.ForInStatement, + AST_NODE_TYPES.ForOfStatement, + AST_NODE_TYPES.WhileStatement, +] as const); export { isAwaitExpression, From 021ed2f72c42e48555648e3979293dc78ac55fe4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Oct 2021 10:14:32 -0700 Subject: [PATCH 395/473] chore: bump @commitlint/config-conventional from 13.1.0 to 13.2.0 (#3967) Bumps [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint) from 13.1.0 to 13.2.0. - [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/v13.1.0...v13.2.0) --- updated-dependencies: - dependency-name: "@commitlint/config-conventional" dependency-type: direct:development update-type: version-update:semver-minor ... 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 6a403c3585fe..e4db107245e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -329,9 +329,9 @@ yargs "^17.0.0" "@commitlint/config-conventional@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-13.1.0.tgz#f02871d50c73db0a31b777231f49203b964d9d59" - integrity sha512-zukJXqdr6jtMiVRy3tTHmwgKcUMGfqKDEskRigc5W3k2aYF4gBAtCEjMAJGZgSQE4DMcHeok0pEV2ANmTpb0cw== + version "13.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-13.2.0.tgz#2ad24fecc56ae9619dbe0934b98a98b18ace0bec" + integrity sha512-7u7DdOiF+3qSdDlbQGfpvCH8DCQdLFvnI2+VucYmmV7E92iD6t9PBj+UjIoSQCaMAzYp27Vkall78AkcXBh6Xw== dependencies: conventional-changelog-conventionalcommits "^4.3.1" From 131cfbe6db4aa91051eeb9443aa47713a215a60e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Oct 2021 10:14:41 -0700 Subject: [PATCH 396/473] chore: bump pretty-format from 27.2.2 to 27.2.4 (#3968) Bumps [pretty-format](https://github.com/facebook/jest/tree/HEAD/packages/pretty-format) from 27.2.2 to 27.2.4. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v27.2.4/packages/pretty-format) --- updated-dependencies: - dependency-name: pretty-format dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/yarn.lock b/yarn.lock index e4db107245e5..642c168c06cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1102,18 +1102,7 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^27.0.2", "@jest/types@^27.0.6", "@jest/types@^27.1.1": - version "27.1.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.1.1.tgz#77a3fc014f906c65752d12123a0134359707c0ad" - integrity sha512-yqJPDDseb0mXgKqmNqypCsb85C22K1aY5+LUxh7syIM9n/b0AsaltxNy+o6tt29VcfGDpYEve175bm3uOhcehA== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - -"@jest/types@^27.2.4": +"@jest/types@^27.0.2", "@jest/types@^27.0.6", "@jest/types@^27.2.4": version "27.2.4" resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.2.4.tgz#2430042a66e00dc5b140c3636f4474d464c21ee8" integrity sha512-IDO2ezTxeMvQAHxzG/ZvEyA47q0aVfzT95rGFl7bZs/Go0aIucvfDbS2rmnoEdXxlLQhcolmoG/wvL/uKx4tKA== @@ -8567,11 +8556,11 @@ prettier@2.3.2: integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6, pretty-format@^27.2.4: - version "27.2.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.2.tgz#c080f1ab7ac64302e4d438f208596fc649dbeeb3" - integrity sha512-+DdLh+rtaElc2SQOE/YPH8k2g3Rf2OXWEpy06p8Szs3hdVSYD87QOOlYRHWAeb/59XTmeVmRKvDD0svHqf6ycA== + version "27.2.4" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.4.tgz#08ea39c5eab41b082852d7093059a091f6ddc748" + integrity sha512-NUjw22WJHldzxyps2YjLZkUj6q1HvjqFezkB9Y2cklN8NtVZN/kZEXGZdFw4uny3oENzV5EEMESrkI0YDUH8vg== dependencies: - "@jest/types" "^27.1.1" + "@jest/types" "^27.2.4" ansi-regex "^5.0.1" ansi-styles "^5.0.0" react-is "^17.0.1" From 88964645b3426eb4b34a06fe4ab447c624101140 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Oct 2021 11:59:34 -0700 Subject: [PATCH 397/473] chore: bump lint-staged from 11.1.2 to 11.2.0 (#3969) Bumps [lint-staged](https://github.com/okonet/lint-staged) from 11.1.2 to 11.2.0. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](https://github.com/okonet/lint-staged/compare/v11.1.2...v11.2.0) --- updated-dependencies: - dependency-name: lint-staged dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 105 +++++++++++++++++++----------------------------------- 1 file changed, 37 insertions(+), 68 deletions(-) diff --git a/yarn.lock b/yarn.lock index 642c168c06cc..8232ff7dee26 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3252,7 +3252,7 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-truncate@^2.1.0: +cli-truncate@2.1.0, cli-truncate@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== @@ -3358,10 +3358,10 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" - integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== +colorette@^1.2.2, colorette@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" + integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== colors@~1.2.1: version "1.2.5" @@ -3388,11 +3388,6 @@ commander@^2.12.1, commander@^2.7.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -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@^8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.2.0.tgz#37fe2bde301d87d47a53adeff8b5915db1381ca8" @@ -3655,18 +3650,7 @@ cosmiconfig@^5.1.0: js-yaml "^3.13.1" parse-json "^4.0.0" -cosmiconfig@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" - integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - -cosmiconfig@^7.0.1: +cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== @@ -3870,7 +3854,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== @@ -4471,10 +4455,10 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" - integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ== +execa@^5.0.0, execa@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== dependencies: cross-spawn "^7.0.3" get-stream "^6.0.0" @@ -4672,7 +4656,7 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" -figures@^3.0.0, figures@^3.2.0: +figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== @@ -5921,11 +5905,6 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - is-utf8@^0.2.0, is-utf8@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" @@ -7128,34 +7107,32 @@ linkify-it@^3.0.1: uc.micro "^1.0.1" lint-staged@^11.0.0: - version "11.1.2" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.1.2.tgz#4dd78782ae43ee6ebf2969cad9af67a46b33cd90" - integrity sha512-6lYpNoA9wGqkL6Hew/4n1H6lRqF3qCsujVT0Oq5Z4hiSAM7S6NksPJ3gnr7A7R52xCtiZMcEUNNQ6d6X5Bvh9w== + version "11.2.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.2.0.tgz#6b9774a74b3eb4bef5c59fb6475bff84d6853008" + integrity sha512-0KIcRuO4HQS2Su7qWtjrfTXgSklvyIb9Fk9qVWRZkGHa5S81Vj6WBbs+ogQBvHUwLJYq1eQ4R+H82GSak4OM7w== dependencies: - chalk "^4.1.1" - cli-truncate "^2.1.0" - commander "^7.2.0" - cosmiconfig "^7.0.0" - debug "^4.3.1" + cli-truncate "2.1.0" + colorette "^1.4.0" + commander "^8.2.0" + cosmiconfig "^7.0.1" + debug "^4.3.2" enquirer "^2.3.6" - execa "^5.0.0" - listr2 "^3.8.2" - log-symbols "^4.1.0" + execa "^5.1.1" + listr2 "^3.12.2" micromatch "^4.0.4" normalize-path "^3.0.0" please-upgrade-node "^3.2.0" string-argv "0.3.1" - stringify-object "^3.3.0" + stringify-object "3.3.0" + supports-color "8.1.1" -listr2@^3.8.2: - version "3.8.2" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.8.2.tgz#99b138ad1cfb08f1b0aacd422972e49b2d814b99" - integrity sha512-E28Fw7Zd3HQlCJKzb9a8C8M0HtFWQeucE+S8YrSrqZObuCLPRHMRrR8gNmYt65cU9orXYHwvN5agXC36lYt7VQ== +listr2@^3.12.2: + version "3.12.2" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.12.2.tgz#2d55cc627111603ad4768a9e87c9c7bb9b49997e" + integrity sha512-64xC2CJ/As/xgVI3wbhlPWVPx0wfTqbUAkpb7bjDi0thSWMqrf07UFhrfsGoo8YSXmF049Rp9C0cjLC8rZxK9A== dependencies: - chalk "^4.1.1" cli-truncate "^2.1.0" - figures "^3.2.0" - indent-string "^4.0.0" + colorette "^1.4.0" log-update "^4.0.0" p-map "^4.0.0" rxjs "^6.6.7" @@ -7309,14 +7286,6 @@ lodash@4.x, lodash@^4.11.2, lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, l resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - log-update@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" @@ -9544,7 +9513,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -stringify-object@^3.3.0: +stringify-object@3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw== @@ -9646,6 +9615,13 @@ strong-log-transformer@^2.0.0: minimist "^1.2.0" through "^2.3.4" +supports-color@8.1.1, supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -9660,13 +9636,6 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - supports-hyperlinks@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz#f663df252af5f37c5d49bbd7eeefa9e0b9e59e47" From d2568561d0417fdfbdfd964ad942f9d00434af73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 7 Oct 2021 06:25:09 +0200 Subject: [PATCH 398/473] fix(experimental-utils): fix `isSetter`'s return type (#3975) --- packages/experimental-utils/src/ast-utils/predicates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/experimental-utils/src/ast-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/predicates.ts index 059437ae1665..9c274e09c82b 100644 --- a/packages/experimental-utils/src/ast-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/predicates.ts @@ -155,7 +155,7 @@ const isConstructor = isNodeOfTypeWithConditions( */ function isSetter( node: TSESTree.Node | undefined, -): node is TSESTree.MethodDefinition | TSESTree.Property { +): node is (TSESTree.MethodDefinition | TSESTree.Property) & { kind: 'set' } { return ( !!node && (node.type === AST_NODE_TYPES.MethodDefinition || From 9aea46abcf867f3512ccb0c182fa3ff8284b3c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 7 Oct 2021 06:26:40 +0200 Subject: [PATCH 399/473] chore(experimental-utils): simplify `isTypeAssertion` predicate (#3973) --- .../src/ast-utils/predicates.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/predicates.ts index 9c274e09c82b..5044dfcca6ef 100644 --- a/packages/experimental-utils/src/ast-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/predicates.ts @@ -6,6 +6,7 @@ const isNodeOfType = node: TSESTree.Node | null | undefined, ): node is TSESTree.Node & { type: NodeType } => node?.type === nodeType; + const isNodeOfTypes = (nodeTypes: NodeTypes) => ( @@ -85,17 +86,10 @@ const isLogicalOrOperator = isNodeOfTypeWithConditions( * x * ``` */ -function isTypeAssertion( - node: TSESTree.Node | undefined | null, -): node is TSESTree.TSAsExpression | TSESTree.TSTypeAssertion { - if (!node) { - return false; - } - return ( - node.type === AST_NODE_TYPES.TSAsExpression || - node.type === AST_NODE_TYPES.TSTypeAssertion - ); -} +const isTypeAssertion = isNodeOfTypes([ + AST_NODE_TYPES.TSAsExpression, + AST_NODE_TYPES.TSTypeAssertion, +] as const); const isVariableDeclarator = isNodeOfType(AST_NODE_TYPES.VariableDeclarator); From 0acfafcc655e28dcfc05a5caa567c0d0217ee7ad Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 21 Aug 2021 18:20:55 -0400 Subject: [PATCH 400/473] feat(eslint-plugin): [comma-dangle] align schema with ESLint v8 (#3768) --- packages/eslint-plugin/src/rules/comma-dangle.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/eslint-plugin/src/rules/comma-dangle.ts b/packages/eslint-plugin/src/rules/comma-dangle.ts index e0e06a6711d7..1e5049e3fea5 100644 --- a/packages/eslint-plugin/src/rules/comma-dangle.ts +++ b/packages/eslint-plugin/src/rules/comma-dangle.ts @@ -80,6 +80,7 @@ export default util.createRule({ ], }, ], + additionalProperties: false, }, fixable: 'code', messages: baseRule.meta.messages, From b63013adf0239d98ca9368d73fda057f3b0e57f9 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 21 Aug 2021 18:39:56 -0400 Subject: [PATCH 401/473] chore: bump Node to ESLint 8.0 ranges (#3767) --- .github/workflows/ci.yml | 15 +++++++++++---- package.json | 2 +- packages/ast-spec/package.json | 2 +- packages/eslint-plugin-tslint/package.json | 2 +- packages/eslint-plugin/package.json | 2 +- packages/experimental-utils/package.json | 2 +- packages/parser/package.json | 2 +- packages/scope-manager/package.json | 2 +- packages/types/package.json | 2 +- packages/typescript-estree/package.json | 2 +- packages/visitor-keys/package.json | 2 +- 11 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 680e6437cceb..c77329b856db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ env: NX_BRANCH: ${{ github.event.number }} NX_RUN_GROUP: ${{ github.run_id }} # Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app - NX_CLOUD_ENV_NAME: "Node 12.x -" + NX_CLOUD_ENV_NAME: 'Node 12.x -' jobs: typecheck: @@ -224,10 +224,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [10.x, 14.x] + node-version: [12.x, 14.x, 16.x] env: # Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app - NX_CLOUD_ENV_NAME: "Node ${{ matrix.node-version }} -" + NX_CLOUD_ENV_NAME: 'Node ${{ matrix.node-version }} -' steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} @@ -296,7 +296,14 @@ jobs: publish_canary_version: name: Publish the latest code as a canary version runs-on: ubuntu-latest - needs: [typecheck, test_on_primary_node_version, unit_tests_on_other_node_versions, linting_and_style, integration_tests] + needs: + [ + typecheck, + test_on_primary_node_version, + unit_tests_on_other_node_versions, + linting_and_style, + integration_tests, + ] if: github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v2 diff --git a/package.json b/package.json index b677dcf76ed3..0a006d6cc617 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ } }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "devDependencies": { "@babel/code-frame": "^7.12.13", diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 1f08d71f2a81..ccc66b7116f3 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -9,7 +9,7 @@ "estree" ], "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "files": [ "dist", diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 571092f90253..2a1a36de35ed 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -11,7 +11,7 @@ "tslint" ], "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "files": [ "dist", diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 5109b38af545..d968a0caf9bf 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -9,7 +9,7 @@ "typescript" ], "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "files": [ "dist", diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 932a98f8cf57..ed9b0d3dc914 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -8,7 +8,7 @@ "estree" ], "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "files": [ "dist", diff --git a/packages/parser/package.json b/packages/parser/package.json index b3e78b7fb870..080af86165f0 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -10,7 +10,7 @@ "LICENSE" ], "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "repository": { "type": "git", diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 121285aa5ad4..ac2c2a335f9b 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -8,7 +8,7 @@ "estree" ], "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "files": [ "dist", diff --git a/packages/types/package.json b/packages/types/package.json index f8e56a099e0c..4cb0ba110bda 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -8,7 +8,7 @@ "estree" ], "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "files": [ "dist", diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 726092aeda45..2d70c3f50cd1 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -10,7 +10,7 @@ "LICENSE" ], "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "repository": { "type": "git", diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index a4863ea2ad17..aed915b8613d 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -8,7 +8,7 @@ "estree" ], "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "files": [ "dist", From dc5a0f5104b400f4422b8d67ecfc6cc7a32613a2 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sun, 22 Aug 2021 09:35:58 +0900 Subject: [PATCH 402/473] fix(typescript-estree): change `source` of ExportNamedDeclaration to Literal from Expression (#3763) * fix(typescript-estree): change of ExportNamedDeclaration to Literal from Expression * fix(typescript-estree): add assertion for module specifier --- .../ExportNamedDeclaration/spec.ts | 4 +- .../invalid-export-module-specifier.src.js | 1 + packages/typescript-estree/src/convert.ts | 21 +- .../semantic-diagnostics-enabled.test.ts.snap | 21 +- ...nvalid-export-module-specifier.src.js.shot | 10 + ...mport-default-module-specifier.src.js.shot | 190 +-------------- ...nvalid-import-module-specifier.src.js.shot | 227 +----------------- 7 files changed, 58 insertions(+), 416 deletions(-) create mode 100644 packages/shared-fixtures/fixtures/javascript/modules/invalid-export-module-specifier.src.js create mode 100644 packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-module-specifier.src.js.shot diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts index bf4d9ea86d2c..a8f476477a7b 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts @@ -2,13 +2,13 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; import type { ExportSpecifier } from '../../special/ExportSpecifier/spec'; import type { ExportDeclaration } from '../../unions/ExportDeclaration'; -import type { Expression } from '../../unions/Expression'; +import type { Literal } from '../../unions/Literal'; import type { ExportKind } from '../ExportAndImportKind'; export interface ExportNamedDeclaration extends BaseNode { type: AST_NODE_TYPES.ExportNamedDeclaration; declaration: ExportDeclaration | null; specifiers: ExportSpecifier[]; - source: Expression | null; + source: Literal | null; exportKind: ExportKind; } diff --git a/packages/shared-fixtures/fixtures/javascript/modules/invalid-export-module-specifier.src.js b/packages/shared-fixtures/fixtures/javascript/modules/invalid-export-module-specifier.src.js new file mode 100644 index 000000000000..29faf851822c --- /dev/null +++ b/packages/shared-fixtures/fixtures/javascript/modules/invalid-export-module-specifier.src.js @@ -0,0 +1 @@ +export { foo } from bar; diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 8170cedad3c2..86ade612d16a 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -728,6 +728,21 @@ export class Converter { } } + private assertModuleSpecifier( + node: ts.ExportDeclaration | ts.ImportDeclaration, + ): void { + if ( + node.moduleSpecifier && + node.moduleSpecifier.kind !== SyntaxKind.StringLiteral + ) { + throw createError( + this.ast, + node.moduleSpecifier.pos, + 'Module specifier must be a string literal.', + ); + } + } + /** * Converts a TypeScript node into an ESTree node. * The core of the conversion logic: @@ -1694,6 +1709,8 @@ export class Converter { }); case SyntaxKind.ImportDeclaration: { + this.assertModuleSpecifier(node); + const result = this.createNode(node, { type: AST_NODE_TYPES.ImportDeclaration, source: this.convertChild(node.moduleSpecifier), @@ -1752,7 +1769,8 @@ export class Converter { }); } - case SyntaxKind.ExportDeclaration: + case SyntaxKind.ExportDeclaration: { + this.assertModuleSpecifier(node); if (node.exportClause?.kind === SyntaxKind.NamedExports) { return this.createNode(node, { type: AST_NODE_TYPES.ExportNamedDeclaration, @@ -1779,6 +1797,7 @@ export class Converter { : null, }); } + } case SyntaxKind.ExportSpecifier: return this.createNode(node, { diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap index ce8d6b5cc6ec..031e7f61e120 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap @@ -908,6 +908,15 @@ TSError { } `; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-module-specifier.src 1`] = ` +TSError { + "column": 19, + "index": 19, + "lineNumber": 1, + "message": "Module specifier must be a string literal.", +} +`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-extra-comma.src 1`] = ` @@ -966,10 +975,10 @@ TSError { exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-module-specifier.src 1`] = ` TSError { - "column": 16, - "index": 16, + "column": 15, + "index": 15, "lineNumber": 1, - "message": "String literal expected.", + "message": "Module specifier must be a string literal.", } `; @@ -984,10 +993,10 @@ TSError { exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-module-specifier.src 1`] = ` TSError { - "column": 18, - "index": 18, + "column": 17, + "index": 17, "lineNumber": 1, - "message": "String literal expected.", + "message": "Module specifier must be a string literal.", } `; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-module-specifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-module-specifier.src.js.shot new file mode 100644 index 000000000000..5467f678c18f --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-module-specifier.src.js.shot @@ -0,0 +1,10 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`javascript modules invalid-export-module-specifier.src 1`] = ` +TSError { + "column": 19, + "index": 19, + "lineNumber": 1, + "message": "Module specifier must be a string literal.", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-module-specifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-module-specifier.src.js.shot index 11bb8f0abb0c..0754b716ae59 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-module-specifier.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-module-specifier.src.js.shot @@ -1,190 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-default-module-specifier.src 1`] = ` -Object { - "body": Array [ - Object { - "importKind": "value", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - }, - "range": Array [ - 7, - 10, - ], - "type": "ImportDefaultSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 15, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", +TSError { + "column": 15, + "index": 15, + "lineNumber": 1, + "message": "Module specifier must be a string literal.", } `; diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-module-specifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-module-specifier.src.js.shot index f810bb25d0c6..d456d2e46791 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-module-specifier.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-module-specifier.src.js.shot @@ -1,227 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-module-specifier.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": null, - "exportKind": "value", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 21, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - }, - "specifiers": Array [ - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 11, - ], - "type": "ExportSpecifier", - }, - ], - "type": "ExportNamedDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 17, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - "value": "bar", - }, - ], - "type": "Program", +TSError { + "column": 17, + "index": 17, + "lineNumber": 1, + "message": "Module specifier must be a string literal.", } `; From 165a507970d8e4a0ed12abdd5f0d892f7de83ffe Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 21 Aug 2021 20:37:20 -0400 Subject: [PATCH 403/473] feat(experimental-utils): remove `getComments` from `ESLint` `SourceCode` types (#3766) --- packages/experimental-utils/src/ts-eslint/SourceCode.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/experimental-utils/src/ts-eslint/SourceCode.ts b/packages/experimental-utils/src/ts-eslint/SourceCode.ts index 582f643311ad..669ad7113c92 100644 --- a/packages/experimental-utils/src/ts-eslint/SourceCode.ts +++ b/packages/experimental-utils/src/ts-eslint/SourceCode.ts @@ -245,15 +245,6 @@ declare class SourceCodeBase extends TokenStore { * @returns An array of comment nodes. */ getAllComments(): TSESTree.Comment[]; - /** - * Gets all comments for the given node. - * @param node The AST node to get the comments for. - * @returns An object containing a leading and trailing array of comments indexed by their position. - */ - getComments(node: TSESTree.Node): { - leading: TSESTree.Comment[]; - trailing: TSESTree.Comment[]; - }; /** * Converts a (line, column) pair into a range index. * @param loc A line/column location From 4ca62aee6681d706e762a8db727541ca204364f2 Mon Sep 17 00:00:00 2001 From: Yosuke Ota Date: Sun, 22 Aug 2021 09:59:02 +0900 Subject: [PATCH 404/473] feat: support ESLint v8 (#3737) --- .cspell.json | 1 + .eslintrc.js | 2 +- .github/workflows/ci.yml | 24 ++ package.json | 6 +- .../eslint-plugin-internal/jest.config.js | 1 + .../src/rules/no-poorly-typed-ts-props.ts | 1 + packages/eslint-plugin-tslint/jest.config.js | 1 + packages/eslint-plugin-tslint/package.json | 2 +- packages/eslint-plugin/jest.config.js | 1 + packages/eslint-plugin/package.json | 2 +- .../eslint-plugin/src/rules/brace-style.ts | 5 +- .../eslint-plugin/src/rules/comma-dangle.ts | 5 +- .../eslint-plugin/src/rules/dot-notation.ts | 5 +- packages/eslint-plugin/src/rules/indent.ts | 5 +- .../src/rules/init-declarations.ts | 5 +- .../src/rules/keyword-spacing.ts | 5 +- .../src/rules/lines-between-class-members.ts | 5 +- .../rules/no-confusing-non-null-assertion.ts | 1 + .../src/rules/no-confusing-void-expression.ts | 1 + .../src/rules/no-dupe-class-members.ts | 42 +++- .../src/rules/no-duplicate-imports.ts | 5 +- .../src/rules/no-empty-function.ts | 5 +- .../src/rules/no-empty-interface.ts | 1 + .../src/rules/no-explicit-any.ts | 1 + .../src/rules/no-extra-parens.ts | 5 +- .../eslint-plugin/src/rules/no-extra-semi.ts | 13 +- .../src/rules/no-floating-promises.ts | 1 + .../src/rules/no-implicit-any-catch.ts | 1 + .../src/rules/no-invalid-this.ts | 5 +- .../eslint-plugin/src/rules/no-loop-func.ts | 5 +- .../src/rules/no-loss-of-precision.ts | 20 +- .../src/rules/no-magic-numbers.ts | 5 +- .../no-non-null-asserted-optional-chain.ts | 1 + .../src/rules/no-non-null-assertion.ts | 1 + .../src/rules/no-unused-expressions.ts | 5 +- .../src/rules/no-useless-constructor.ts | 5 +- .../src/rules/object-curly-spacing.ts | 4 +- .../src/rules/prefer-as-const.ts | 1 + .../src/rules/prefer-enum-initializers.ts | 1 + .../src/rules/prefer-nullish-coalescing.ts | 1 + .../src/rules/prefer-optional-chain.ts | 1 + packages/eslint-plugin/src/rules/quotes.ts | 5 +- .../eslint-plugin/src/rules/return-await.ts | 1 + packages/eslint-plugin/src/rules/semi.ts | 5 +- .../sort-type-union-intersection-members.ts | 1 + .../src/rules/space-infix-ops.ts | 5 +- .../src/rules/strict-boolean-expressions.ts | 1 + .../src/rules/switch-exhaustiveness-check.ts | 1 + .../src/util/collectUnusedVariables.ts | 2 +- .../src/util/getESLintCoreRule.ts | 62 +++++ .../tests/eslint-rules/arrow-parens.test.ts | 4 +- .../tests/eslint-rules/no-dupe-args.test.ts | 4 +- .../eslint-rules/no-implicit-globals.test.ts | 3 +- .../no-restricted-globals.test.ts | 4 +- .../tests/eslint-rules/no-undef.test.ts | 4 +- .../tests/eslint-rules/prefer-const.test.ts | 4 +- .../tests/eslint-rules/strict.test.ts | 4 +- .../tests/rules/array-type.test.ts | 2 +- .../tests/rules/no-duplicate-imports.test.ts | 8 - .../tests/rules/require-await.test.ts | 2 +- .../eslint-plugin/typings/eslint-rules.d.ts | 18 +- packages/experimental-utils/jest.config.js | 1 + .../eslint-utils/batchedSingleLineTests.ts | 2 +- .../src/ts-eslint/CLIEngine.ts | 4 +- .../experimental-utils/src/ts-eslint/Rule.ts | 4 + packages/parser/jest.config.js | 3 + packages/parser/package.json | 2 +- patches/eslint-plugin-import+2.24.2.patch | 14 ++ patches/eslint-plugin-jest+24.4.0.patch | 48 ++++ tests/jest-resolver.js | 15 ++ tsconfig.eslint.json | 7 +- yarn.lock | 221 +++++++++++------- 72 files changed, 508 insertions(+), 160 deletions(-) create mode 100644 packages/eslint-plugin/src/util/getESLintCoreRule.ts create mode 100644 patches/eslint-plugin-import+2.24.2.patch create mode 100644 patches/eslint-plugin-jest+24.4.0.patch create mode 100644 tests/jest-resolver.js diff --git a/.cspell.json b/.cspell.json index c74d69186b91..c4de52f54328 100644 --- a/.cspell.json +++ b/.cspell.json @@ -47,6 +47,7 @@ "bigint", "bivariant", "blockless", + "camelcase", "codebases", "Codecov", "contravariant", diff --git a/.eslintrc.js b/.eslintrc.js index 1ef4f373c8d4..1f053bd17d76 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -86,7 +86,7 @@ module.exports = { '@typescript-eslint/internal/prefer-ast-types-enum': 'error', // - // eslint base + // eslint-base // curly: ['error', 'all'], diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c77329b856db..3ce54875bc2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,10 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts yarn check-clean-workspace-after-install + - name: Patch Dependencies + run: | + yarn patch-package + - name: Build run: | yarn build @@ -89,6 +93,10 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts yarn check-clean-workspace-after-install + - name: Patch Dependencies + run: | + yarn patch-package + - name: Build run: | yarn build @@ -167,6 +175,10 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts yarn check-clean-workspace-after-install + - name: Patch Dependencies + run: | + yarn patch-package + - name: Build run: | yarn build @@ -210,6 +222,10 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts yarn check-clean-workspace-after-install + - name: Patch Dependencies + run: | + yarn patch-package + - name: Build run: | yarn build @@ -252,6 +268,10 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts yarn check-clean-workspace-after-install + - name: Patch Dependencies + run: | + yarn patch-package + - name: Build run: | yarn build @@ -334,6 +354,10 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts yarn check-clean-workspace-after-install + - name: Patch Dependencies + run: | + yarn patch-package + - name: Build run: | yarn build diff --git a/package.json b/package.json index 0a006d6cc617..a6b365cfc54a 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "lint-markdown-fix": "yarn lint-markdown --fix", "lint-markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore", "lint": "eslint . --ext .js,.ts", - "postinstall": "yarn husky install && yarn build", + "postinstall": "patch-package && yarn husky install && yarn build", "pre-commit": "yarn lint-staged", "pre-push": "yarn check-format", "test": "nx run-many --target=test --all --parallel", @@ -100,7 +100,8 @@ "cspell": "^5.5.2", "cz-conventional-changelog": "^3.3.0", "downlevel-dts": "^0.7.0", - "eslint": "^7.27.0", + "enhanced-resolve": "^5.8.2", + "eslint": "^8.0.0-0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-plugin": "^3.0.3", "eslint-plugin-import": "^2.23.4", @@ -115,6 +116,7 @@ "make-dir": "^3.1.0", "markdownlint-cli": "^0.28.1", "node-fetch": "^3.0.0", + "patch-package": "^6.4.7", "prettier": "2.3.2", "pretty-format": "^27.0.2", "rimraf": "^3.0.2", diff --git a/packages/eslint-plugin-internal/jest.config.js b/packages/eslint-plugin-internal/jest.config.js index cce8d6c61baf..bf4e270e3760 100644 --- a/packages/eslint-plugin-internal/jest.config.js +++ b/packages/eslint-plugin-internal/jest.config.js @@ -3,6 +3,7 @@ // @ts-check /** @type {import('@jest/types').Config.InitialOptions} */ module.exports = { + resolver: '/../../tests/jest-resolver.js', globals: { 'ts-jest': { isolatedModules: true, diff --git a/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts b/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts index 96c1405c73f0..8ce331b4dad1 100644 --- a/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts +++ b/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts @@ -44,6 +44,7 @@ export default createRule({ requiresTypeChecking: true, }, fixable: 'code', + hasSuggestions: true, schema: [], messages: { doNotUse: 'Do not use {{type}}.{{property}} because it is poorly typed.', diff --git a/packages/eslint-plugin-tslint/jest.config.js b/packages/eslint-plugin-tslint/jest.config.js index 76cf71504591..37b87a10d75b 100644 --- a/packages/eslint-plugin-tslint/jest.config.js +++ b/packages/eslint-plugin-tslint/jest.config.js @@ -3,6 +3,7 @@ // @ts-check /** @type {import('@jest/types').Config.InitialOptions} */ module.exports = { + resolver: '/../../tests/jest-resolver.js', globals: { 'ts-jest': { isolatedModules: true, diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 2a1a36de35ed..0df408974e52 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -42,7 +42,7 @@ "lodash": "^4.17.21" }, "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0", + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0", "tslint": "^5.0.0 || ^6.0.0", "typescript": "*" }, diff --git a/packages/eslint-plugin/jest.config.js b/packages/eslint-plugin/jest.config.js index cce8d6c61baf..bf4e270e3760 100644 --- a/packages/eslint-plugin/jest.config.js +++ b/packages/eslint-plugin/jest.config.js @@ -3,6 +3,7 @@ // @ts-check /** @type {import('@jest/types').Config.InitialOptions} */ module.exports = { + resolver: '/../../tests/jest-resolver.js', globals: { 'ts-jest': { isolatedModules: true, diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index d968a0caf9bf..0546e3d3b09d 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -64,7 +64,7 @@ }, "peerDependencies": { "@typescript-eslint/parser": "^4.0.0", - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" }, "peerDependenciesMeta": { "typescript": { diff --git a/packages/eslint-plugin/src/rules/brace-style.ts b/packages/eslint-plugin/src/rules/brace-style.ts index 4d981763cf48..8bd77aa12ff0 100644 --- a/packages/eslint-plugin/src/rules/brace-style.ts +++ b/packages/eslint-plugin/src/rules/brace-style.ts @@ -1,5 +1,5 @@ import { TSESTree } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/brace-style'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import { InferOptionsTypeFromRule, InferMessageIdsTypeFromRule, @@ -7,6 +7,8 @@ import { isTokenOnSameLine, } from '../util'; +const baseRule = getESLintCoreRule('brace-style'); + export type Options = InferOptionsTypeFromRule; export type MessageIds = InferMessageIdsTypeFromRule; @@ -22,6 +24,7 @@ export default createRule({ }, messages: baseRule.meta.messages, fixable: baseRule.meta.fixable, + hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, }, defaultOptions: ['1tbs'], diff --git a/packages/eslint-plugin/src/rules/comma-dangle.ts b/packages/eslint-plugin/src/rules/comma-dangle.ts index 1e5049e3fea5..9c212cca47e8 100644 --- a/packages/eslint-plugin/src/rules/comma-dangle.ts +++ b/packages/eslint-plugin/src/rules/comma-dangle.ts @@ -1,10 +1,12 @@ import * as util from '../util'; -import baseRule from 'eslint/lib/rules/comma-dangle'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import { TSESTree, AST_NODE_TYPES, } from '@typescript-eslint/experimental-utils'; +const baseRule = getESLintCoreRule('comma-dangle'); + export type Options = util.InferOptionsTypeFromRule; export type MessageIds = util.InferMessageIdsTypeFromRule; @@ -83,6 +85,7 @@ export default util.createRule({ additionalProperties: false, }, fixable: 'code', + hasSuggestions: baseRule.meta.hasSuggestions, messages: baseRule.meta.messages, }, defaultOptions: ['never'], diff --git a/packages/eslint-plugin/src/rules/dot-notation.ts b/packages/eslint-plugin/src/rules/dot-notation.ts index becc2a92727c..9d5284b4aa63 100644 --- a/packages/eslint-plugin/src/rules/dot-notation.ts +++ b/packages/eslint-plugin/src/rules/dot-notation.ts @@ -1,7 +1,7 @@ import { TSESTree } from '@typescript-eslint/experimental-utils'; import * as ts from 'typescript'; import * as tsutils from 'tsutils'; -import baseRule from 'eslint/lib/rules/dot-notation'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import { createRule, getParserServices, @@ -9,6 +9,8 @@ import { InferOptionsTypeFromRule, } from '../util'; +const baseRule = getESLintCoreRule('dot-notation'); + export type Options = InferOptionsTypeFromRule; export type MessageIds = InferMessageIdsTypeFromRule; @@ -52,6 +54,7 @@ export default createRule({ }, ], fixable: baseRule.meta.fixable, + hasSuggestions: baseRule.meta.hasSuggestions, messages: baseRule.meta.messages, }, defaultOptions: [ diff --git a/packages/eslint-plugin/src/rules/indent.ts b/packages/eslint-plugin/src/rules/indent.ts index b25586a0e8b6..129754543c8f 100644 --- a/packages/eslint-plugin/src/rules/indent.ts +++ b/packages/eslint-plugin/src/rules/indent.ts @@ -9,9 +9,11 @@ import { TSESTree, AST_NODE_TYPES, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/indent'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('indent'); + type Options = util.InferOptionsTypeFromRule; type MessageIds = util.InferMessageIdsTypeFromRule; @@ -96,6 +98,7 @@ export default util.createRule({ extendsBaseRule: true, }, fixable: 'whitespace', + hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, messages: baseRule.meta.messages ?? { wrongIndentation: diff --git a/packages/eslint-plugin/src/rules/init-declarations.ts b/packages/eslint-plugin/src/rules/init-declarations.ts index 5706006852b2..4557faeb7d77 100644 --- a/packages/eslint-plugin/src/rules/init-declarations.ts +++ b/packages/eslint-plugin/src/rules/init-declarations.ts @@ -2,13 +2,15 @@ import { TSESTree, AST_NODE_TYPES, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/init-declarations'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import { InferOptionsTypeFromRule, InferMessageIdsTypeFromRule, createRule, } from '../util'; +const baseRule = getESLintCoreRule('init-declarations'); + export type Options = InferOptionsTypeFromRule; export type MessageIds = InferMessageIdsTypeFromRule; @@ -23,6 +25,7 @@ export default createRule({ recommended: false, extendsBaseRule: true, }, + hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, messages: baseRule.meta.messages ?? { initialized: diff --git a/packages/eslint-plugin/src/rules/keyword-spacing.ts b/packages/eslint-plugin/src/rules/keyword-spacing.ts index 2265b2604436..f7bedfc11943 100644 --- a/packages/eslint-plugin/src/rules/keyword-spacing.ts +++ b/packages/eslint-plugin/src/rules/keyword-spacing.ts @@ -1,7 +1,9 @@ import { AST_TOKEN_TYPES } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/keyword-spacing'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('keyword-spacing'); + export type Options = util.InferOptionsTypeFromRule; export type MessageIds = util.InferMessageIdsTypeFromRule; @@ -16,6 +18,7 @@ export default util.createRule({ extendsBaseRule: true, }, fixable: 'whitespace', + hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, messages: baseRule.meta.messages ?? { expectedBefore: 'Expected space(s) before "{{value}}".', diff --git a/packages/eslint-plugin/src/rules/lines-between-class-members.ts b/packages/eslint-plugin/src/rules/lines-between-class-members.ts index 7317b37c5988..0cca8619c0a5 100644 --- a/packages/eslint-plugin/src/rules/lines-between-class-members.ts +++ b/packages/eslint-plugin/src/rules/lines-between-class-members.ts @@ -2,9 +2,11 @@ import { AST_NODE_TYPES, TSESTree, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/lines-between-class-members'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('lines-between-class-members'); + type Options = util.InferOptionsTypeFromRule; type MessageIds = util.InferMessageIdsTypeFromRule; @@ -31,6 +33,7 @@ export default util.createRule({ extendsBaseRule: true, }, fixable: 'whitespace', + hasSuggestions: baseRule.meta.hasSuggestions, schema, messages: baseRule.meta.messages ?? { never: 'Unexpected blank line between class members.', diff --git a/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts b/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts index 446bdd25932b..281c2f9c4632 100644 --- a/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts @@ -17,6 +17,7 @@ export default util.createRule({ recommended: false, }, fixable: 'code', + hasSuggestions: true, messages: { confusingEqual: 'Confusing combinations of non-null assertion and equal test like "a! == b", which looks very similar to not equal "a !== b".', diff --git a/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts b/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts index 0579fb442541..1ddb60bf73dc 100644 --- a/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts +++ b/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts @@ -71,6 +71,7 @@ export default util.createRule({ ], type: 'problem', fixable: 'code', + hasSuggestions: true, }, defaultOptions: [{}], diff --git a/packages/eslint-plugin/src/rules/no-dupe-class-members.ts b/packages/eslint-plugin/src/rules/no-dupe-class-members.ts index bc48b2a843e8..0756e135fc96 100644 --- a/packages/eslint-plugin/src/rules/no-dupe-class-members.ts +++ b/packages/eslint-plugin/src/rules/no-dupe-class-members.ts @@ -1,7 +1,12 @@ -import { AST_NODE_TYPES } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/no-dupe-class-members'; +import { + AST_NODE_TYPES, + TSESTree, +} from '@typescript-eslint/experimental-utils'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('no-dupe-class-members'); + type Options = util.InferOptionsTypeFromRule; type MessageIds = util.InferMessageIdsTypeFromRule; @@ -15,6 +20,7 @@ export default util.createRule({ recommended: false, extendsBaseRule: true, }, + hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, messages: baseRule.meta.messages, }, @@ -22,9 +28,10 @@ export default util.createRule({ create(context) { const rules = baseRule.create(context); - return { - ...rules, - MethodDefinition(node): void { + function wrapMemberDefinitionListener( + coreListener: (node: TSESTree.MethodDefinition) => void, + ): (node: TSESTree.MethodDefinition) => void { + return (node: TSESTree.MethodDefinition): void => { if (node.computed) { return; } @@ -33,8 +40,29 @@ export default util.createRule({ return; } - return rules.MethodDefinition(node); - }, + return coreListener(node); + }; + } + + return { + ...rules, + // for ESLint <= v7 + ...(rules.MethodDefinition + ? { + MethodDefinition: wrapMemberDefinitionListener( + rules.MethodDefinition, + ), + } + : {}), + // for ESLint v8 + ...(rules['MethodDefinition, PropertyDefinition'] + ? { + 'MethodDefinition, PropertyDefinition': + wrapMemberDefinitionListener( + rules['MethodDefinition, PropertyDefinition'], + ), + } + : {}), }; }, }); diff --git a/packages/eslint-plugin/src/rules/no-duplicate-imports.ts b/packages/eslint-plugin/src/rules/no-duplicate-imports.ts index f58ef76e5fcf..773402e18d4b 100644 --- a/packages/eslint-plugin/src/rules/no-duplicate-imports.ts +++ b/packages/eslint-plugin/src/rules/no-duplicate-imports.ts @@ -2,9 +2,11 @@ import { AST_NODE_TYPES, TSESTree, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/no-duplicate-imports'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('no-duplicate-imports'); + type Options = util.InferOptionsTypeFromRule; type MessageIds = util.InferMessageIdsTypeFromRule; @@ -18,6 +20,7 @@ export default util.createRule({ recommended: false, extendsBaseRule: true, }, + hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, messages: { ...baseRule.meta.messages, diff --git a/packages/eslint-plugin/src/rules/no-empty-function.ts b/packages/eslint-plugin/src/rules/no-empty-function.ts index 246680c60e34..d34618e0354a 100644 --- a/packages/eslint-plugin/src/rules/no-empty-function.ts +++ b/packages/eslint-plugin/src/rules/no-empty-function.ts @@ -2,9 +2,11 @@ import { AST_NODE_TYPES, TSESTree, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/no-empty-function'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('no-empty-function'); + type Options = util.InferOptionsTypeFromRule; type MessageIds = util.InferMessageIdsTypeFromRule; @@ -47,6 +49,7 @@ export default util.createRule({ recommended: 'error', extendsBaseRule: true, }, + hasSuggestions: baseRule.meta.hasSuggestions, schema: [schema], messages: baseRule.meta.messages, }, diff --git a/packages/eslint-plugin/src/rules/no-empty-interface.ts b/packages/eslint-plugin/src/rules/no-empty-interface.ts index 11ed8582c75b..d9c8c2477b8a 100644 --- a/packages/eslint-plugin/src/rules/no-empty-interface.ts +++ b/packages/eslint-plugin/src/rules/no-empty-interface.ts @@ -19,6 +19,7 @@ export default util.createRule({ suggestion: true, }, fixable: 'code', + hasSuggestions: true, messages: { noEmpty: 'An empty interface is equivalent to `{}`.', noEmptyWithSuper: diff --git a/packages/eslint-plugin/src/rules/no-explicit-any.ts b/packages/eslint-plugin/src/rules/no-explicit-any.ts index 9df51ba3d520..71f052923276 100644 --- a/packages/eslint-plugin/src/rules/no-explicit-any.ts +++ b/packages/eslint-plugin/src/rules/no-explicit-any.ts @@ -24,6 +24,7 @@ export default util.createRule({ suggestion: true, }, fixable: 'code', + hasSuggestions: true, messages: { unexpectedAny: 'Unexpected any. Specify a different type.', suggestUnknown: diff --git a/packages/eslint-plugin/src/rules/no-extra-parens.ts b/packages/eslint-plugin/src/rules/no-extra-parens.ts index 774fb44b389a..6aa540a9be56 100644 --- a/packages/eslint-plugin/src/rules/no-extra-parens.ts +++ b/packages/eslint-plugin/src/rules/no-extra-parens.ts @@ -6,9 +6,11 @@ import { TSESTree, TSESLint, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/no-extra-parens'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('no-extra-parens'); + type Options = util.InferOptionsTypeFromRule; type MessageIds = util.InferMessageIdsTypeFromRule; @@ -23,6 +25,7 @@ export default util.createRule({ extendsBaseRule: true, }, fixable: 'code', + hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, messages: baseRule.meta.messages, }, diff --git a/packages/eslint-plugin/src/rules/no-extra-semi.ts b/packages/eslint-plugin/src/rules/no-extra-semi.ts index d1ffdf61d8d4..d8db4ba7904b 100644 --- a/packages/eslint-plugin/src/rules/no-extra-semi.ts +++ b/packages/eslint-plugin/src/rules/no-extra-semi.ts @@ -1,6 +1,8 @@ -import baseRule from 'eslint/lib/rules/no-extra-semi'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('no-extra-semi'); + type Options = util.InferOptionsTypeFromRule; type MessageIds = util.InferMessageIdsTypeFromRule; @@ -15,6 +17,7 @@ export default util.createRule({ extendsBaseRule: true, }, fixable: 'code', + hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, messages: baseRule.meta.messages, }, @@ -25,7 +28,13 @@ export default util.createRule({ return { ...rules, ClassProperty(node): void { - rules.MethodDefinition(node as never); + if (rules.MethodDefinition) { + // for ESLint <= v7 + rules.MethodDefinition(node as never); + } else { + // for ESLint v8 + rules['MethodDefinition, PropertyDefinition']?.(node as never); + } }, }; }, diff --git a/packages/eslint-plugin/src/rules/no-floating-promises.ts b/packages/eslint-plugin/src/rules/no-floating-promises.ts index 905dfd06fcff..ae196cf52889 100644 --- a/packages/eslint-plugin/src/rules/no-floating-promises.ts +++ b/packages/eslint-plugin/src/rules/no-floating-promises.ts @@ -27,6 +27,7 @@ export default util.createRule({ suggestion: true, requiresTypeChecking: true, }, + hasSuggestions: true, messages: { floating: 'Promises must be handled appropriately.', floatingVoid: diff --git a/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts b/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts index fbbdf59eb31a..85cdd7fd8fc9 100644 --- a/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts +++ b/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts @@ -25,6 +25,7 @@ export default util.createRule({ suggestion: true, }, fixable: 'code', + hasSuggestions: true, messages: { implicitAnyInCatch: 'Implicit any in catch clause.', explicitAnyInCatch: 'Explicit any in catch clause.', diff --git a/packages/eslint-plugin/src/rules/no-invalid-this.ts b/packages/eslint-plugin/src/rules/no-invalid-this.ts index 5d056308771f..2d802cdba04d 100644 --- a/packages/eslint-plugin/src/rules/no-invalid-this.ts +++ b/packages/eslint-plugin/src/rules/no-invalid-this.ts @@ -2,13 +2,15 @@ import { TSESTree, AST_NODE_TYPES, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/no-invalid-this'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import { InferOptionsTypeFromRule, createRule, InferMessageIdsTypeFromRule, } from '../util'; +const baseRule = getESLintCoreRule('no-invalid-this'); + export type Options = InferOptionsTypeFromRule; export type MessageIds = InferMessageIdsTypeFromRule; @@ -26,6 +28,7 @@ export default createRule({ messages: baseRule.meta.messages ?? { unexpectedThis: "Unexpected 'this'.", }, + hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, }, defaultOptions: [{ capIsConstructor: true }], diff --git a/packages/eslint-plugin/src/rules/no-loop-func.ts b/packages/eslint-plugin/src/rules/no-loop-func.ts index 44d0178e8670..5560acf0952d 100644 --- a/packages/eslint-plugin/src/rules/no-loop-func.ts +++ b/packages/eslint-plugin/src/rules/no-loop-func.ts @@ -3,9 +3,11 @@ import { TSESLint, TSESTree, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/no-loop-func'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('no-loop-func'); + type Options = util.InferOptionsTypeFromRule; type MessageIds = util.InferMessageIdsTypeFromRule; @@ -20,6 +22,7 @@ export default util.createRule({ recommended: false, extendsBaseRule: true, }, + hasSuggestions: baseRule.meta.hasSuggestions, schema: [], messages: baseRule?.meta.messages ?? { unsafeRefs: diff --git a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts index e9d52852668f..3b53661a0266 100644 --- a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts +++ b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts @@ -1,20 +1,13 @@ import { TSESTree } from '@typescript-eslint/experimental-utils'; -import BaseRule from 'eslint/lib/rules/no-loss-of-precision'; import * as util from '../util'; +import { maybeGetESLintCoreRule } from '../util/getESLintCoreRule'; -const baseRule = ((): typeof BaseRule | null => { - try { - return require('eslint/lib/rules/no-loss-of-precision') as - | typeof BaseRule - | null; - } catch { - /* istanbul ignore next */ - return null; - } -})(); +const baseRule = maybeGetESLintCoreRule('no-loss-of-precision'); -type Options = util.InferOptionsTypeFromRule; -type MessageIds = util.InferMessageIdsTypeFromRule; +type Options = util.InferOptionsTypeFromRule>; +type MessageIds = util.InferMessageIdsTypeFromRule< + NonNullable +>; export default util.createRule({ name: 'no-loss-of-precision', @@ -26,6 +19,7 @@ export default util.createRule({ recommended: false, extendsBaseRule: true, }, + hasSuggestions: baseRule?.meta.hasSuggestions, schema: [], messages: baseRule?.meta.messages ?? { noLossOfPrecision: '' }, }, diff --git a/packages/eslint-plugin/src/rules/no-magic-numbers.ts b/packages/eslint-plugin/src/rules/no-magic-numbers.ts index 1f45a489d357..20d06f05f563 100644 --- a/packages/eslint-plugin/src/rules/no-magic-numbers.ts +++ b/packages/eslint-plugin/src/rules/no-magic-numbers.ts @@ -2,9 +2,11 @@ import { TSESTree, AST_NODE_TYPES, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/no-magic-numbers'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('no-magic-numbers'); + type Options = util.InferOptionsTypeFromRule; type MessageIds = util.InferMessageIdsTypeFromRule; @@ -22,6 +24,7 @@ export default util.createRule({ recommended: false, extendsBaseRule: true, }, + hasSuggestions: baseRule.meta.hasSuggestions, // Extend base schema with additional property to ignore TS numeric literal types schema: [ { diff --git a/packages/eslint-plugin/src/rules/no-non-null-asserted-optional-chain.ts b/packages/eslint-plugin/src/rules/no-non-null-asserted-optional-chain.ts index f5652b257c14..1d9c8f4aabc2 100644 --- a/packages/eslint-plugin/src/rules/no-non-null-asserted-optional-chain.ts +++ b/packages/eslint-plugin/src/rules/no-non-null-asserted-optional-chain.ts @@ -26,6 +26,7 @@ export default util.createRule({ recommended: 'error', suggestion: true, }, + hasSuggestions: true, messages: { noNonNullOptionalChain: 'Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong.', diff --git a/packages/eslint-plugin/src/rules/no-non-null-assertion.ts b/packages/eslint-plugin/src/rules/no-non-null-assertion.ts index 4012693c7554..ceba7fefd15a 100644 --- a/packages/eslint-plugin/src/rules/no-non-null-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-non-null-assertion.ts @@ -17,6 +17,7 @@ export default util.createRule<[], MessageIds>({ recommended: 'warn', suggestion: true, }, + hasSuggestions: true, messages: { noNonNull: 'Forbidden non-null assertion.', suggestOptionalChain: diff --git a/packages/eslint-plugin/src/rules/no-unused-expressions.ts b/packages/eslint-plugin/src/rules/no-unused-expressions.ts index 8116cbf704e3..f2f0e2c73b2b 100644 --- a/packages/eslint-plugin/src/rules/no-unused-expressions.ts +++ b/packages/eslint-plugin/src/rules/no-unused-expressions.ts @@ -2,9 +2,11 @@ import { AST_NODE_TYPES, TSESTree, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/no-unused-expressions'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('no-unused-expressions'); + type MessageIds = util.InferMessageIdsTypeFromRule; type Options = util.InferOptionsTypeFromRule; @@ -18,6 +20,7 @@ export default util.createRule({ recommended: false, extendsBaseRule: true, }, + hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, messages: baseRule.meta.messages ?? { unusedExpression: diff --git a/packages/eslint-plugin/src/rules/no-useless-constructor.ts b/packages/eslint-plugin/src/rules/no-useless-constructor.ts index 2ad9c765c4e7..a4532ce72864 100644 --- a/packages/eslint-plugin/src/rules/no-useless-constructor.ts +++ b/packages/eslint-plugin/src/rules/no-useless-constructor.ts @@ -2,9 +2,11 @@ import { TSESTree, AST_NODE_TYPES, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/no-useless-constructor'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('no-useless-constructor'); + type Options = util.InferOptionsTypeFromRule; type MessageIds = util.InferMessageIdsTypeFromRule; @@ -53,6 +55,7 @@ export default util.createRule({ recommended: false, extendsBaseRule: true, }, + hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, messages: baseRule.meta.messages ?? { noUselessConstructor: 'Useless constructor.', diff --git a/packages/eslint-plugin/src/rules/object-curly-spacing.ts b/packages/eslint-plugin/src/rules/object-curly-spacing.ts index 00c73820fd7c..090bd8e1e952 100644 --- a/packages/eslint-plugin/src/rules/object-curly-spacing.ts +++ b/packages/eslint-plugin/src/rules/object-curly-spacing.ts @@ -3,7 +3,7 @@ import { AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/object-curly-spacing'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import { createRule, InferMessageIdsTypeFromRule, @@ -13,6 +13,8 @@ import { isTokenOnSameLine, } from '../util'; +const baseRule = getESLintCoreRule('object-curly-spacing'); + export type Options = InferOptionsTypeFromRule; export type MessageIds = InferMessageIdsTypeFromRule; diff --git a/packages/eslint-plugin/src/rules/prefer-as-const.ts b/packages/eslint-plugin/src/rules/prefer-as-const.ts index 91f432420214..aeaa6fcdd7a3 100644 --- a/packages/eslint-plugin/src/rules/prefer-as-const.ts +++ b/packages/eslint-plugin/src/rules/prefer-as-const.ts @@ -16,6 +16,7 @@ export default util.createRule({ suggestion: true, }, fixable: 'code', + hasSuggestions: true, messages: { preferConstAssertion: 'Expected a `const` instead of a literal type assertion.', diff --git a/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts b/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts index 663caa5bedda..9f9d641ec411 100644 --- a/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts +++ b/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts @@ -13,6 +13,7 @@ export default util.createRule<[], MessageIds>({ recommended: false, suggestion: true, }, + hasSuggestions: true, messages: { defineInitializer: "The value of the member '{{ name }}' should be explicitly defined.", diff --git a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts index fa6c1bb4e216..4fe3d021f700 100644 --- a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts +++ b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts @@ -26,6 +26,7 @@ export default util.createRule({ suggestion: true, requiresTypeChecking: true, }, + hasSuggestions: true, messages: { preferNullish: 'Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.', diff --git a/packages/eslint-plugin/src/rules/prefer-optional-chain.ts b/packages/eslint-plugin/src/rules/prefer-optional-chain.ts index 0e15bf8f9794..b1eff5e4ae7e 100644 --- a/packages/eslint-plugin/src/rules/prefer-optional-chain.ts +++ b/packages/eslint-plugin/src/rules/prefer-optional-chain.ts @@ -41,6 +41,7 @@ export default util.createRule({ recommended: false, suggestion: true, }, + hasSuggestions: true, messages: { preferOptionalChain: "Prefer using an optional chain expression instead, as it's more concise and easier to read.", diff --git a/packages/eslint-plugin/src/rules/quotes.ts b/packages/eslint-plugin/src/rules/quotes.ts index 3cbdbce3d875..e4af60fd0412 100644 --- a/packages/eslint-plugin/src/rules/quotes.ts +++ b/packages/eslint-plugin/src/rules/quotes.ts @@ -2,9 +2,11 @@ import { AST_NODE_TYPES, TSESTree, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/quotes'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('quotes'); + export type Options = util.InferOptionsTypeFromRule; export type MessageIds = util.InferMessageIdsTypeFromRule; @@ -20,6 +22,7 @@ export default util.createRule({ extendsBaseRule: true, }, fixable: 'code', + hasSuggestions: baseRule.meta.hasSuggestions, messages: baseRule.meta.messages ?? { wrongQuotes: 'Strings must use {{description}}.', }, diff --git a/packages/eslint-plugin/src/rules/return-await.ts b/packages/eslint-plugin/src/rules/return-await.ts index 940dfe94023f..1375d3028e1e 100644 --- a/packages/eslint-plugin/src/rules/return-await.ts +++ b/packages/eslint-plugin/src/rules/return-await.ts @@ -28,6 +28,7 @@ export default util.createRule({ extendsBaseRule: 'no-return-await', }, fixable: 'code', + hasSuggestions: true, type: 'problem', messages: { nonPromiseAwait: diff --git a/packages/eslint-plugin/src/rules/semi.ts b/packages/eslint-plugin/src/rules/semi.ts index eccc264e4613..05c4c6b1c3aa 100644 --- a/packages/eslint-plugin/src/rules/semi.ts +++ b/packages/eslint-plugin/src/rules/semi.ts @@ -3,9 +3,11 @@ import { TSESLint, AST_NODE_TYPES, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/semi'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('semi'); + export type Options = util.InferOptionsTypeFromRule; export type MessageIds = util.InferMessageIdsTypeFromRule; @@ -21,6 +23,7 @@ export default util.createRule({ extendsBaseRule: true, }, fixable: 'code', + hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, messages: baseRule.meta.messages ?? { missingSemi: 'Missing semicolon.', diff --git a/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts b/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts index af80720c2904..cfcab2c0b2cb 100644 --- a/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts +++ b/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts @@ -111,6 +111,7 @@ export default util.createRule({ recommended: false, }, fixable: 'code', + hasSuggestions: true, messages: { notSorted: '{{type}} type members must be sorted.', notSortedNamed: '{{type}} type {{name}} members must be sorted.', diff --git a/packages/eslint-plugin/src/rules/space-infix-ops.ts b/packages/eslint-plugin/src/rules/space-infix-ops.ts index 3a0a79ff1a32..86fb8d93d53f 100644 --- a/packages/eslint-plugin/src/rules/space-infix-ops.ts +++ b/packages/eslint-plugin/src/rules/space-infix-ops.ts @@ -2,9 +2,11 @@ import { AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/experimental-utils'; -import baseRule from 'eslint/lib/rules/space-infix-ops'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import * as util from '../util'; +const baseRule = getESLintCoreRule('space-infix-ops'); + export type Options = util.InferOptionsTypeFromRule; export type MessageIds = util.InferMessageIdsTypeFromRule; @@ -22,6 +24,7 @@ export default util.createRule({ extendsBaseRule: true, }, fixable: baseRule.meta.fixable, + hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, messages: baseRule.meta.messages ?? { missingSpace: "Operator '{{operator}}' must be spaced.", diff --git a/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts b/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts index 87796f9f4279..1aca481e7439 100644 --- a/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts +++ b/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts @@ -49,6 +49,7 @@ export default util.createRule({ meta: { type: 'suggestion', fixable: 'code', + hasSuggestions: true, docs: { description: 'Restricts the types allowed in boolean expressions', category: 'Best Practices', diff --git a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts index 7535aa6dc54a..65a70a86cc40 100644 --- a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts +++ b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts @@ -21,6 +21,7 @@ export default createRule({ suggestion: true, requiresTypeChecking: true, }, + hasSuggestions: true, schema: [], messages: { switchIsNotExhaustive: diff --git a/packages/eslint-plugin/src/util/collectUnusedVariables.ts b/packages/eslint-plugin/src/util/collectUnusedVariables.ts index b36d07e818cd..a1cfac27232f 100644 --- a/packages/eslint-plugin/src/util/collectUnusedVariables.ts +++ b/packages/eslint-plugin/src/util/collectUnusedVariables.ts @@ -318,7 +318,7 @@ class UnusedVarsVisitor< protected TSMethodSignature = this.visitFunctionTypeSignature; protected TSModuleDeclaration(node: TSESTree.TSModuleDeclaration): void { - // global augmentation can be in any file, and they do not need exports + // -- global augmentation can be in any file, and they do not need exports if (node.global === true) { this.markVariableAsUsed('global', node.parent!); } diff --git a/packages/eslint-plugin/src/util/getESLintCoreRule.ts b/packages/eslint-plugin/src/util/getESLintCoreRule.ts new file mode 100644 index 000000000000..fdb2ca46df87 --- /dev/null +++ b/packages/eslint-plugin/src/util/getESLintCoreRule.ts @@ -0,0 +1,62 @@ +import { version } from 'eslint/package.json'; +import * as semver from 'semver'; +import { nullThrows } from './nullThrows'; + +const isESLintV8 = semver.major(version) >= 8; + +interface RuleMap { + 'arrow-parens': typeof import('eslint/lib/rules/arrow-parens'); + 'brace-style': typeof import('eslint/lib/rules/brace-style'); + 'comma-dangle': typeof import('eslint/lib/rules/comma-dangle'); + 'dot-notation': typeof import('eslint/lib/rules/dot-notation'); + indent: typeof import('eslint/lib/rules/indent'); + 'init-declarations': typeof import('eslint/lib/rules/init-declarations'); + 'keyword-spacing': typeof import('eslint/lib/rules/keyword-spacing'); + 'lines-between-class-members': typeof import('eslint/lib/rules/lines-between-class-members'); + 'no-dupe-args': typeof import('eslint/lib/rules/no-dupe-args'); + 'no-dupe-class-members': typeof import('eslint/lib/rules/no-dupe-class-members'); + 'no-duplicate-imports': typeof import('eslint/lib/rules/no-duplicate-imports'); + 'no-empty-function': typeof import('eslint/lib/rules/no-empty-function'); + 'no-extra-parens': typeof import('eslint/lib/rules/no-extra-parens'); + 'no-extra-semi': typeof import('eslint/lib/rules/no-extra-semi'); + 'no-implicit-globals': typeof import('eslint/lib/rules/no-implicit-globals'); + 'no-invalid-this': typeof import('eslint/lib/rules/no-invalid-this'); + 'no-loop-func': typeof import('eslint/lib/rules/no-loop-func'); + 'no-loss-of-precision': typeof import('eslint/lib/rules/no-loss-of-precision'); + 'no-magic-numbers': typeof import('eslint/lib/rules/no-magic-numbers'); + 'no-undef': typeof import('eslint/lib/rules/no-undef'); + 'no-unused-expressions': typeof import('eslint/lib/rules/no-unused-expressions'); + 'no-useless-constructor': typeof import('eslint/lib/rules/no-useless-constructor'); + 'no-restricted-globals': typeof import('eslint/lib/rules/no-restricted-globals'); + 'object-curly-spacing': typeof import('eslint/lib/rules/object-curly-spacing'); + 'prefer-const': typeof import('eslint/lib/rules/prefer-const'); + quotes: typeof import('eslint/lib/rules/quotes'); + semi: typeof import('eslint/lib/rules/semi'); + 'space-infix-ops': typeof import('eslint/lib/rules/space-infix-ops'); + strict: typeof import('eslint/lib/rules/strict'); +} + +type RuleId = keyof RuleMap; + +export const getESLintCoreRule: (ruleId: R) => RuleMap[R] = + isESLintV8 + ? (ruleId: R): RuleMap[R] => + nullThrows( + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call + require('eslint/use-at-your-own-risk').builtinRules.get( + ruleId, + ) as RuleMap[R], + `ESLint's core rule '${ruleId}' not found.`, + ) + : (ruleId: R): RuleMap[R] => + require(`eslint/lib/rules/${ruleId}`) as RuleMap[R]; + +export function maybeGetESLintCoreRule( + ruleId: R, +): RuleMap[R] | null { + try { + return getESLintCoreRule(ruleId); + } catch { + return null; + } +} diff --git a/packages/eslint-plugin/tests/eslint-rules/arrow-parens.test.ts b/packages/eslint-plugin/tests/eslint-rules/arrow-parens.test.ts index 6d19021fa560..495bbe97e698 100644 --- a/packages/eslint-plugin/tests/eslint-rules/arrow-parens.test.ts +++ b/packages/eslint-plugin/tests/eslint-rules/arrow-parens.test.ts @@ -1,6 +1,8 @@ -import rule from 'eslint/lib/rules/arrow-parens'; +import { getESLintCoreRule } from '../../src/util/getESLintCoreRule'; import { RuleTester, noFormat } from '../RuleTester'; +const rule = getESLintCoreRule('arrow-parens'); + const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', }); diff --git a/packages/eslint-plugin/tests/eslint-rules/no-dupe-args.test.ts b/packages/eslint-plugin/tests/eslint-rules/no-dupe-args.test.ts index 0dc4807edb15..5bc8d99490d1 100644 --- a/packages/eslint-plugin/tests/eslint-rules/no-dupe-args.test.ts +++ b/packages/eslint-plugin/tests/eslint-rules/no-dupe-args.test.ts @@ -1,6 +1,8 @@ -import rule from 'eslint/lib/rules/no-dupe-args'; +import { getESLintCoreRule } from '../../src/util/getESLintCoreRule'; import { RuleTester } from '../RuleTester'; +const rule = getESLintCoreRule('no-dupe-args'); + const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 6, diff --git a/packages/eslint-plugin/tests/eslint-rules/no-implicit-globals.test.ts b/packages/eslint-plugin/tests/eslint-rules/no-implicit-globals.test.ts index 2fc971bdef60..eb3fea348b52 100644 --- a/packages/eslint-plugin/tests/eslint-rules/no-implicit-globals.test.ts +++ b/packages/eslint-plugin/tests/eslint-rules/no-implicit-globals.test.ts @@ -1,6 +1,7 @@ -import rule from 'eslint/lib/rules/no-implicit-globals'; +import { getESLintCoreRule } from '../../src/util/getESLintCoreRule'; import { RuleTester } from '../RuleTester'; +const rule = getESLintCoreRule('no-implicit-globals'); const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 6, diff --git a/packages/eslint-plugin/tests/eslint-rules/no-restricted-globals.test.ts b/packages/eslint-plugin/tests/eslint-rules/no-restricted-globals.test.ts index 7a457a617849..6061c8ebb4ee 100644 --- a/packages/eslint-plugin/tests/eslint-rules/no-restricted-globals.test.ts +++ b/packages/eslint-plugin/tests/eslint-rules/no-restricted-globals.test.ts @@ -1,6 +1,8 @@ -import rule from 'eslint/lib/rules/no-restricted-globals'; +import { getESLintCoreRule } from '../../src/util/getESLintCoreRule'; import { RuleTester } from '../RuleTester'; +const rule = getESLintCoreRule('no-restricted-globals'); + const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 6, diff --git a/packages/eslint-plugin/tests/eslint-rules/no-undef.test.ts b/packages/eslint-plugin/tests/eslint-rules/no-undef.test.ts index 4f2c9702411b..9cff63994d39 100644 --- a/packages/eslint-plugin/tests/eslint-rules/no-undef.test.ts +++ b/packages/eslint-plugin/tests/eslint-rules/no-undef.test.ts @@ -1,6 +1,8 @@ -import rule from 'eslint/lib/rules/no-undef'; +import { getESLintCoreRule } from '../../src/util/getESLintCoreRule'; import { RuleTester } from '../RuleTester'; +const rule = getESLintCoreRule('no-undef'); + const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 6, diff --git a/packages/eslint-plugin/tests/eslint-rules/prefer-const.test.ts b/packages/eslint-plugin/tests/eslint-rules/prefer-const.test.ts index a051ebb68610..d3bce8cfdee9 100644 --- a/packages/eslint-plugin/tests/eslint-rules/prefer-const.test.ts +++ b/packages/eslint-plugin/tests/eslint-rules/prefer-const.test.ts @@ -1,6 +1,8 @@ -import rule from 'eslint/lib/rules/prefer-const'; +import { getESLintCoreRule } from '../../src/util/getESLintCoreRule'; import { RuleTester } from '../RuleTester'; +const rule = getESLintCoreRule('prefer-const'); + const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', }); diff --git a/packages/eslint-plugin/tests/eslint-rules/strict.test.ts b/packages/eslint-plugin/tests/eslint-rules/strict.test.ts index 51d27c9bde95..83ad25a0605b 100644 --- a/packages/eslint-plugin/tests/eslint-rules/strict.test.ts +++ b/packages/eslint-plugin/tests/eslint-rules/strict.test.ts @@ -1,6 +1,8 @@ -import rule from 'eslint/lib/rules/strict'; +import { getESLintCoreRule } from '../../src/util/getESLintCoreRule'; import { RuleTester } from '../RuleTester'; +const rule = getESLintCoreRule('strict'); + const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 6, diff --git a/packages/eslint-plugin/tests/rules/array-type.test.ts b/packages/eslint-plugin/tests/rules/array-type.test.ts index 6551bf6e7b97..3c2c1893a3f8 100644 --- a/packages/eslint-plugin/tests/rules/array-type.test.ts +++ b/packages/eslint-plugin/tests/rules/array-type.test.ts @@ -1664,7 +1664,7 @@ interface FooInterface { ], }); -// eslint rule tester is not working with multi-pass +// -- eslint rule tester is not working with multi-pass // https://github.com/eslint/eslint/issues/11187 describe('array-type (nested)', () => { const linter = new TSESLint.Linter(); diff --git a/packages/eslint-plugin/tests/rules/no-duplicate-imports.test.ts b/packages/eslint-plugin/tests/rules/no-duplicate-imports.test.ts index 98e12fbeb7a8..fae90720e7ed 100644 --- a/packages/eslint-plugin/tests/rules/no-duplicate-imports.test.ts +++ b/packages/eslint-plugin/tests/rules/no-duplicate-imports.test.ts @@ -168,14 +168,6 @@ ruleTester.run('no-duplicate-imports', rule, { `, errors: [{ messageId: 'import' }], }, - { - code: ` - import foo from 'foo'; - export * from 'foo'; - `, - options: [{ includeExports: true }], - errors: [{ messageId: 'exportAs' }], - }, { code: ` import foo from 'foo'; diff --git a/packages/eslint-plugin/tests/rules/require-await.test.ts b/packages/eslint-plugin/tests/rules/require-await.test.ts index 248888b429f0..ec2b178ecbb4 100644 --- a/packages/eslint-plugin/tests/rules/require-await.test.ts +++ b/packages/eslint-plugin/tests/rules/require-await.test.ts @@ -375,7 +375,7 @@ async function foo() { for await (x of xs); } `, - // global await + // -- global await { code: 'await foo();', }, diff --git a/packages/eslint-plugin/typings/eslint-rules.d.ts b/packages/eslint-plugin/typings/eslint-rules.d.ts index ada68c89a769..aa833057ba20 100644 --- a/packages/eslint-plugin/typings/eslint-rules.d.ts +++ b/packages/eslint-plugin/typings/eslint-rules.d.ts @@ -230,7 +230,12 @@ declare module 'eslint/lib/rules/no-dupe-class-members' { Program(): void; ClassBody(): void; 'ClassBody:exit'(): void; - MethodDefinition(node: TSESTree.MethodDefinition): void; + // for ESLint <= v7 + MethodDefinition?: (node: TSESTree.MethodDefinition) => void; + // for ESLint v8 + 'MethodDefinition, PropertyDefinition'?: ( + node: TSESTree.MethodDefinition /* | TSESTree.PropertyDefinition */, + ) => void; } >; export = rule; @@ -520,11 +525,11 @@ declare module 'eslint/lib/rules/no-extra-parens' { ClassExpression(node: TSESTree.ClassExpression): void; ConditionalExpression(node: TSESTree.ConditionalExpression): void; DoWhileStatement(node: TSESTree.DoWhileStatement): void; - // eslint < 7.19.0 + // -- eslint < 7.19.0 'ForInStatement, ForOfStatement'( node: TSESTree.ForInStatement | TSESTree.ForOfStatement, ): void; - // eslint >= 7.19.0 + // -- eslint >= 7.19.0 ForInStatement(node: TSESTree.ForInStatement): void; ForOfStatement(node: TSESTree.ForOfStatement): void; ForStatement(node: TSESTree.ForStatement): void; @@ -637,7 +642,12 @@ declare module 'eslint/lib/rules/no-extra-semi' { { EmptyStatement(node: TSESTree.EmptyStatement): void; ClassBody(node: TSESTree.ClassBody): void; - MethodDefinition(node: TSESTree.MethodDefinition): void; + // for ESLint <= v7 + MethodDefinition?: (node: TSESTree.MethodDefinition) => void; + // for ESLint v8 + 'MethodDefinition, PropertyDefinition'?: ( + node: TSESTree.MethodDefinition /* | TSESTree.PropertyDefinition */, + ) => void; } >; export = rule; diff --git a/packages/experimental-utils/jest.config.js b/packages/experimental-utils/jest.config.js index cce8d6c61baf..bf4e270e3760 100644 --- a/packages/experimental-utils/jest.config.js +++ b/packages/experimental-utils/jest.config.js @@ -3,6 +3,7 @@ // @ts-check /** @type {import('@jest/types').Config.InitialOptions} */ module.exports = { + resolver: '/../../tests/jest-resolver.js', globals: { 'ts-jest': { isolatedModules: true, diff --git a/packages/experimental-utils/src/eslint-utils/batchedSingleLineTests.ts b/packages/experimental-utils/src/eslint-utils/batchedSingleLineTests.ts index 29a56671a351..8eaef6e3f5e9 100644 --- a/packages/experimental-utils/src/eslint-utils/batchedSingleLineTests.ts +++ b/packages/experimental-utils/src/eslint-utils/batchedSingleLineTests.ts @@ -34,7 +34,7 @@ function batchedSingleLineTests< >( options: ValidTestCase | InvalidTestCase, ): (ValidTestCase | InvalidTestCase)[] { - // eslint counts lines from 1 + // -- eslint counts lines from 1 const lineOffset = options.code.startsWith('\n') ? 2 : 1; const output = 'output' in options && options.output diff --git a/packages/experimental-utils/src/ts-eslint/CLIEngine.ts b/packages/experimental-utils/src/ts-eslint/CLIEngine.ts index dfcc2347a5e8..9cc1c97b5c79 100644 --- a/packages/experimental-utils/src/ts-eslint/CLIEngine.ts +++ b/packages/experimental-utils/src/ts-eslint/CLIEngine.ts @@ -175,6 +175,8 @@ namespace CLIEngine { * important information so you can deal with the output yourself. * @deprecated use the ESLint class instead */ -class CLIEngine extends (ESLintCLIEngine as typeof CLIEngineBase) {} +const CLIEngine = ESLintCLIEngine + ? class CLIEngine extends (ESLintCLIEngine as typeof CLIEngineBase) {} + : undefined; export { CLIEngine }; diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index f9b5c01576bf..76e8deb24082 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -57,6 +57,10 @@ interface RuleMetaData { * The fixer category. Omit if there is no fixer */ fixable?: 'code' | 'whitespace'; + /** + * Specifies whether rules can return suggestions. Omit if there is no suggestions + */ + hasSuggestions?: boolean; /** * A map of messages which the rule can report. * The key is the messageId, and the string is the parameterised error string. diff --git a/packages/parser/jest.config.js b/packages/parser/jest.config.js index 309c75f2fd3c..af3026d5c104 100644 --- a/packages/parser/jest.config.js +++ b/packages/parser/jest.config.js @@ -1,6 +1,9 @@ 'use strict'; +// @ts-check +/** @type {import('@jest/types').Config.InitialOptions} */ module.exports = { + resolver: '/../../tests/jest-resolver.js', globals: { 'ts-jest': { isolatedModules: true, diff --git a/packages/parser/package.json b/packages/parser/package.json index 080af86165f0..89c075d6afe6 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -41,7 +41,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" }, "dependencies": { "@typescript-eslint/scope-manager": "4.33.0", diff --git a/patches/eslint-plugin-import+2.24.2.patch b/patches/eslint-plugin-import+2.24.2.patch new file mode 100644 index 000000000000..6157ff155586 --- /dev/null +++ b/patches/eslint-plugin-import+2.24.2.patch @@ -0,0 +1,14 @@ +diff --git a/node_modules/eslint-plugin-import/lib/index.js b/node_modules/eslint-plugin-import/lib/index.js +index 247818e..1b42a54 100644 +--- a/node_modules/eslint-plugin-import/lib/index.js ++++ b/node_modules/eslint-plugin-import/lib/index.js +@@ -19,7 +19,8 @@ + 'no-named-as-default': require('./rules/no-named-as-default'), + 'no-named-as-default-member': require('./rules/no-named-as-default-member'), + 'no-anonymous-default-export': require('./rules/no-anonymous-default-export'), +- 'no-unused-modules': require('./rules/no-unused-modules'), ++ // temporarily removed for the v8 migration as it crashes the lint run ++ // 'no-unused-modules': require('./rules/no-unused-modules'), + + 'no-commonjs': require('./rules/no-commonjs'), + 'no-amd': require('./rules/no-amd'), diff --git a/patches/eslint-plugin-jest+24.4.0.patch b/patches/eslint-plugin-jest+24.4.0.patch new file mode 100644 index 000000000000..da14716ee8ab --- /dev/null +++ b/patches/eslint-plugin-jest+24.4.0.patch @@ -0,0 +1,48 @@ +diff --git a/node_modules/eslint-plugin-jest/lib/rules/no-done-callback.js b/node_modules/eslint-plugin-jest/lib/rules/no-done-callback.js +index 8a09e7b..4f7dffa 100644 +--- a/node_modules/eslint-plugin-jest/lib/rules/no-done-callback.js ++++ b/node_modules/eslint-plugin-jest/lib/rules/no-done-callback.js +@@ -34,6 +34,7 @@ var _default = (0, _utils.createRule)({ + recommended: 'error', + suggestion: true + }, ++ hasSuggestions: true, + messages: { + noDoneCallback: 'Return a Promise instead of relying on callback parameter', + suggestWrappingInPromise: 'Wrap in `new Promise({{ callback }} => ...`', +diff --git a/node_modules/eslint-plugin-jest/lib/rules/no-focused-tests.js b/node_modules/eslint-plugin-jest/lib/rules/no-focused-tests.js +index 159e1fb..b167a83 100644 +--- a/node_modules/eslint-plugin-jest/lib/rules/no-focused-tests.js ++++ b/node_modules/eslint-plugin-jest/lib/rules/no-focused-tests.js +@@ -36,6 +36,7 @@ var _default = (0, _utils.createRule)({ + recommended: 'error', + suggestion: true + }, ++ hasSuggestions: true, + messages: { + focusedTest: 'Unexpected focused test.', + suggestRemoveFocus: 'Remove focus from test.' +diff --git a/node_modules/eslint-plugin-jest/lib/rules/prefer-expect-assertions.js b/node_modules/eslint-plugin-jest/lib/rules/prefer-expect-assertions.js +index cf064ac..c47dc4a 100644 +--- a/node_modules/eslint-plugin-jest/lib/rules/prefer-expect-assertions.js ++++ b/node_modules/eslint-plugin-jest/lib/rules/prefer-expect-assertions.js +@@ -29,6 +29,7 @@ var _default = (0, _utils.createRule)({ + recommended: false, + suggestion: true + }, ++ hasSuggestions: true, + messages: { + hasAssertionsTakesNoArguments: '`expect.hasAssertions` expects no arguments', + assertionsRequiresOneArgument: '`expect.assertions` excepts a single argument of type number', +diff --git a/node_modules/eslint-plugin-jest/lib/rules/prefer-strict-equal.js b/node_modules/eslint-plugin-jest/lib/rules/prefer-strict-equal.js +index 95136e6..c1179c6 100644 +--- a/node_modules/eslint-plugin-jest/lib/rules/prefer-strict-equal.js ++++ b/node_modules/eslint-plugin-jest/lib/rules/prefer-strict-equal.js +@@ -16,6 +16,7 @@ var _default = (0, _utils.createRule)({ + recommended: false, + suggestion: true + }, ++ hasSuggestions: true, + messages: { + useToStrictEqual: 'Use `toStrictEqual()` instead', + suggestReplaceWithStrictEqual: 'Replace with `toStrictEqual()`' diff --git a/tests/jest-resolver.js b/tests/jest-resolver.js new file mode 100644 index 000000000000..f79f54509b79 --- /dev/null +++ b/tests/jest-resolver.js @@ -0,0 +1,15 @@ +// https://github.com/facebook/jest/issues/9771#issuecomment-871585234 + +// temporary workaround while we wait for https://github.com/facebook/jest/issues/9771 +const resolver = require('enhanced-resolve').create.sync({ + conditionNames: ['require', 'node', 'default'], + extensions: ['.js', '.json', '.node', '.ts', '.tsx'], +}); + +module.exports = function (request, options) { + // list global module that must be resolved by defaultResolver here + if (['fs', 'http', 'path'].includes(request)) { + return options.defaultResolver(request, options); + } + return resolver(options.basedir, request); +}; diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 0e8da2eba1ce..16ced4c0241c 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -5,5 +5,10 @@ "allowJs": true }, "extends": "./tsconfig.base.json", - "include": ["tests/**/*.ts", "tools/**/*.ts", ".eslintrc.js"] + "include": [ + "tests/**/*.ts", + "tools/**/*.ts", + ".eslintrc.js", + "tests/jest-resolver.js" + ] } diff --git a/yarn.lock b/yarn.lock index 8232ff7dee26..80ea8600a6df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,13 +9,6 @@ dependencies: "@babel/highlight" "^7.14.5" -"@babel/code-frame@7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - "@babel/compat-data@^7.14.4": version "7.14.4" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.4.tgz#45720fe0cecf3fd42019e1d12cc3d27fadc98d58" @@ -160,7 +153,7 @@ "@babel/traverse" "^7.14.0" "@babel/types" "^7.14.0" -"@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5": +"@babel/highlight@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== @@ -705,15 +698,15 @@ ts-node "^9" tslib "^2" -"@eslint/eslintrc@^0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.1.tgz#442763b88cecbe3ee0ec7ca6d6dd6168550cbf14" - integrity sha512-5v7TDE9plVhvxQeWLXDTvFvJBdH6pEsdnl2g/dAptmuFEPedQ4Erq5rsDsX+mvAM610IhNaO2W5V1dOOnDKxkQ== +"@eslint/eslintrc@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.0.tgz#08309b915051dbfcfea8c3cdfc832375303396c9" + integrity sha512-FPnE4y+crrKBF0c9PckDHFuPDQl+wRX6S9jeSw2WwM2YNmrdRch3gx3DOTWpqpQu0G9yoJaeSSrJLiV/29tGyQ== dependencies: ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^12.1.0" + debug "^4.3.2" + espree "^8.0.0" + globals "^13.9.0" ignore "^4.0.6" import-fresh "^3.2.1" js-yaml "^3.13.1" @@ -794,6 +787,20 @@ unique-filename "^1.1.1" which "^1.3.1" +"@humanwhocodes/config-array@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.6.0.tgz#b5621fdb3b32309d2d16575456cbc277fa8f021a" + integrity sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A== + dependencies: + "@humanwhocodes/object-schema" "^1.2.0" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf" + integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -2381,6 +2388,11 @@ dependencies: "@types/yargs-parser" "*" +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + "@zkochan/cmd-shim@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz#2ab8ed81f5bb5452a85f25758eb9b8681982fd2e" @@ -2431,7 +2443,7 @@ acorn-walk@^8.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.1.1.tgz#3ddab7f84e4a7e2313f6c414c5b7dac85f4e3ebc" integrity sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w== -acorn@^7.1.1, acorn@^7.4.0: +acorn@^7.1.1: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== @@ -2487,16 +2499,6 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@~6.12.6: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.1: - version "8.5.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.5.0.tgz#695528274bcb5afc865446aa275484049a18ae4b" - integrity sha512-Y2l399Tt1AguU3BPRP9Fn4eN+Or+StUGWCUpbnFyXSo8NZ9S4uj+AG2pjs5apK+ZMOwYOz1+a+VKvKH7CudXgQ== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - all-contributors-cli@^6.20.0: version "6.20.0" resolved "https://registry.yarnpkg.com/all-contributors-cli/-/all-contributors-cli-6.20.0.tgz#9bc98dda38cb29cfe8afc8a78c004e14af25d2f6" @@ -3854,7 +3856,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== @@ -4144,6 +4146,14 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" +enhanced-resolve@^5.8.2: + version "5.8.2" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz#15ddc779345cbb73e97c611cd00c01c1e7bf4d8b" + integrity sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + enquirer@^2.3.5, enquirer@^2.3.6, enquirer@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -4325,6 +4335,14 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" +eslint-scope@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-6.0.0.tgz#9cf45b13c5ac8f3d4c50f46a5121f61b3e318978" + integrity sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + eslint-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" @@ -4339,7 +4357,7 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: +eslint-visitor-keys@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== @@ -4349,36 +4367,41 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@^7.27.0: - version "7.27.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.27.0.tgz#665a1506d8f95655c9274d84bd78f7166b07e9c7" - integrity sha512-JZuR6La2ZF0UD384lcbnd0Cgg6QJjiCwhMD6eU4h/VGPcVGwawNNzKU41tgokGXnfjOOyI6QIffthhJTPzzuRA== +eslint-visitor-keys@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz#e32e99c6cdc2eb063f204eda5db67bfe58bb4186" + integrity sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q== + +eslint@^8.0.0-0: + version "8.0.0-beta.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.0.0-beta.0.tgz#965fa5161b7cc93f1c82fb9c617a3814dc95ba38" + integrity sha512-Q5wCLXSpq+RIa9QBrmHApNCpgqjBU5aeQbVfeAuc9DyBIWzsdivbiirbCmYBrdoFWUoGSYCYWSIpqrS2une7jg== dependencies: - "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.1" + "@eslint/eslintrc" "^1.0.0" + "@humanwhocodes/config-array" "^0.6.0" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" - debug "^4.0.1" + debug "^4.3.2" doctrine "^3.0.0" enquirer "^2.3.5" escape-string-regexp "^4.0.0" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" + eslint-scope "^6.0.0" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.0.0" + espree "^8.0.0" esquery "^1.4.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" - glob-parent "^5.0.0" + glob-parent "^6.0.1" globals "^13.6.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - js-yaml "^3.13.1" + js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" @@ -4386,22 +4409,21 @@ eslint@^7.27.0: natural-compare "^1.4.0" optionator "^0.9.1" progress "^2.0.0" - regexpp "^3.1.0" + regexpp "^3.2.0" semver "^7.2.1" strip-ansi "^6.0.0" strip-json-comments "^3.1.0" - table "^6.0.9" text-table "^0.2.0" v8-compile-cache "^2.0.3" -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== +espree@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-8.0.0.tgz#08c92c31814c96c96c54d3a35cc80f1cdb420275" + integrity sha512-y/+i23dwTjIDJrYCcjcAMr3c3UGbPIjC6THMQKjWmhP97fW0FPiI89kmpKfmgV/5jrkIi6toQP+CMm3qBE1Hig== dependencies: - acorn "^7.4.0" + acorn "^8.4.1" acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" + eslint-visitor-keys "^3.0.0" esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" @@ -4745,6 +4767,13 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" +find-yarn-workspace-root@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" + integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== + dependencies: + micromatch "^4.0.2" + findup-sync@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" @@ -4847,6 +4876,15 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^7.0.1, fs-extra@~7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -4857,15 +4895,6 @@ fs-extra@^9.1.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@~7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" - integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" @@ -5088,6 +5117,13 @@ glob-parent@^5.0.0, glob-parent@^5.1.0: dependencies: is-glob "^4.0.1" +glob-parent@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.1.tgz#42054f685eb6a44e7a7d189a96efa40a54971aa7" + integrity sha512-kEVjS71mQazDBHKcsq4E9u/vUzaLcw1A8EtUeydawvIWQCJM0qQ08G1H7/XTjFUulla6XQiDOG6MXSaG0HDKog== + dependencies: + is-glob "^4.0.1" + glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -5168,13 +5204,6 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^12.1.0: - version "12.4.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" - integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== - dependencies: - type-fest "^0.8.1" - globals@^13.6.0: version "13.9.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.9.0.tgz#4bf2bf635b334a173fb1daf7c5e6b218ecdc06cb" @@ -5182,6 +5211,13 @@ globals@^13.6.0: dependencies: type-fest "^0.20.2" +globals@^13.9.0: + version "13.11.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.11.0.tgz#40ef678da117fe7bd2e28f1fab24951bd0255be7" + integrity sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g== + dependencies: + type-fest "^0.20.2" + globby@^11.0.1, globby@^11.0.3: version "11.0.4" resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" @@ -6950,11 +6986,6 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -7044,6 +7075,13 @@ kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" @@ -7271,11 +7309,6 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "^3.0.0" -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= - lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" @@ -8342,6 +8375,25 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= +patch-package@^6.4.7: + version "6.4.7" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.4.7.tgz#2282d53c397909a0d9ef92dae3fdeb558382b148" + integrity sha512-S0vh/ZEafZ17hbhgqdnpunKDfzHQibQizx9g8yEf5dcVk3KOflOfdufRXQX8CSEkyOQwuM/bNz1GwKvFj54kaQ== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^2.4.2" + cross-spawn "^6.0.5" + find-yarn-workspace-root "^2.0.0" + fs-extra "^7.0.1" + is-ci "^2.0.0" + klaw-sync "^6.0.0" + minimist "^1.2.0" + open "^7.4.2" + rimraf "^2.6.3" + semver "^5.6.0" + slash "^2.0.0" + tmp "^0.0.33" + path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -8818,7 +8870,7 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpp@^3.1.0: +regexpp@^3.1.0, regexpp@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -8871,7 +8923,7 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-from-string@^2.0.1, require-from-string@^2.0.2: +require-from-string@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== @@ -9649,17 +9701,10 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -table@^6.0.9: - version "6.7.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" - integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== - dependencies: - ajv "^8.0.1" - lodash.clonedeep "^4.5.0" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.0" - strip-ansi "^6.0.0" +tapable@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" + integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== tar@6.1.11: version "6.1.11" From 79ae03b8adbae2b0a86276711a9c834af01bbb61 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 21 Aug 2021 18:19:32 -0700 Subject: [PATCH 405/473] feat(eslint-plugin): remove `no-unused-vars-experimental` --- packages/eslint-plugin/src/rules/index.ts | 2 - .../src/rules/no-unused-vars-experimental.ts | 364 ------------------ 2 files changed, 366 deletions(-) delete mode 100644 packages/eslint-plugin/src/rules/no-unused-vars-experimental.ts diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index 3ab88b478e2d..2d9730dd8c8a 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -78,7 +78,6 @@ import noUnsafeMemberAccess from './no-unsafe-member-access'; import noUnsafeReturn from './no-unsafe-return'; import noUnusedExpressions from './no-unused-expressions'; import noUnusedVars from './no-unused-vars'; -import noUnusedVarsExperimental from './no-unused-vars-experimental'; import noUseBeforeDefine from './no-use-before-define'; import noUselessConstructor from './no-useless-constructor'; import noVarRequires from './no-var-requires'; @@ -201,7 +200,6 @@ export default { 'no-unsafe-return': noUnsafeReturn, 'no-unused-expressions': noUnusedExpressions, 'no-unused-vars': noUnusedVars, - 'no-unused-vars-experimental': noUnusedVarsExperimental, 'no-use-before-define': noUseBeforeDefine, 'no-useless-constructor': noUselessConstructor, 'no-var-requires': noVarRequires, diff --git a/packages/eslint-plugin/src/rules/no-unused-vars-experimental.ts b/packages/eslint-plugin/src/rules/no-unused-vars-experimental.ts deleted file mode 100644 index 751543295229..000000000000 --- a/packages/eslint-plugin/src/rules/no-unused-vars-experimental.ts +++ /dev/null @@ -1,364 +0,0 @@ -/* eslint-disable @typescript-eslint/internal/prefer-ast-types-enum, no-fallthrough */ -import { TSESTree } from '@typescript-eslint/experimental-utils'; -import * as ts from 'typescript'; -import * as util from '../util'; - -export type Options = [ - { - ignoredNamesRegex?: string | boolean; - ignoreArgsIfArgsAfterAreUsed?: boolean; - }, -]; -export type MessageIds = - | 'unused' - | 'unusedWithIgnorePattern' - | 'unusedImport' - | 'unusedTypeParameters'; - -type NodeWithTypeParams = ts.Node & { - typeParameters: ts.NodeArray; -}; - -export const DEFAULT_IGNORED_REGEX_STRING = '^_'; -export default util.createRule({ - name: 'no-unused-vars-experimental', - meta: { - type: 'problem', - docs: { - description: 'Disallow unused variables and arguments', - category: 'Best Practices', - recommended: false, - }, - deprecated: true, - replacedBy: ['no-unused-vars'], - schema: [ - { - type: 'object', - properties: { - ignoredNamesRegex: { - oneOf: [ - { - type: 'string', - }, - { - type: 'boolean', - enum: [false], - }, - ], - }, - ignoreArgsIfArgsAfterAreUsed: { - type: 'boolean', - }, - }, - additionalProperties: false, - }, - ], - messages: { - unused: "{{type}} '{{name}}' is declared but its value is never read.", - unusedWithIgnorePattern: - "{{type}} '{{name}}' is declared but its value is never read. Allowed unused names must match {{pattern}}.", - unusedImport: 'All imports in import declaration are unused.', - unusedTypeParameters: 'All type parameters are unused.', - }, - }, - defaultOptions: [ - { - ignoredNamesRegex: DEFAULT_IGNORED_REGEX_STRING, - ignoreArgsIfArgsAfterAreUsed: false, - }, - ], - create(context, [userOptions]) { - const parserServices = util.getParserServices(context, true); - const tsProgram = parserServices.program; - const afterAllDiagnosticsCallbacks: (() => void)[] = []; - - const options = { - ignoredNames: - userOptions && typeof userOptions.ignoredNamesRegex === 'string' - ? new RegExp(userOptions.ignoredNamesRegex) - : null, - ignoreArgsIfArgsAfterAreUsed: - userOptions.ignoreArgsIfArgsAfterAreUsed ?? false, - }; - - function handleIdentifier(identifier: ts.Identifier): void { - function report(type: string): void { - const node = parserServices.tsNodeToESTreeNodeMap.get(identifier); - const regex = options.ignoredNames; - const name = identifier.getText(); - if (regex) { - if (!regex.test(name)) { - context.report({ - node, - messageId: 'unusedWithIgnorePattern', - data: { - name, - type, - pattern: regex.toString(), - }, - }); - } - } else { - context.report({ - node, - messageId: 'unused', - data: { - name, - type, - }, - }); - } - } - - const parent = identifier.parent; - - // is a single variable diagnostic - switch (parent.kind) { - case ts.SyntaxKind.BindingElement: - case ts.SyntaxKind.ObjectBindingPattern: - report('Destructured Variable'); - break; - - case ts.SyntaxKind.ClassDeclaration: - report('Class'); - break; - - case ts.SyntaxKind.EnumDeclaration: - report('Enum'); - break; - - case ts.SyntaxKind.FunctionDeclaration: - report('Function'); - break; - - // this won't happen because there are specific nodes that wrap up named/default import identifiers - // case ts.SyntaxKind.ImportDeclaration: - // import equals is always treated as a variable - case ts.SyntaxKind.ImportEqualsDeclaration: - // the default import is NOT used, but a named import is used - case ts.SyntaxKind.ImportClause: - // a named import is NOT used, but either another named import, or the default import is used - case ts.SyntaxKind.ImportSpecifier: - // a namespace import is NOT used, but the default import is used - case ts.SyntaxKind.NamespaceImport: - report('Import'); - break; - - case ts.SyntaxKind.InterfaceDeclaration: - report('Interface'); - break; - - case ts.SyntaxKind.MethodDeclaration: - report('Method'); - break; - - case ts.SyntaxKind.Parameter: - handleParameterDeclaration( - identifier, - parent as ts.ParameterDeclaration, - ); - break; - - case ts.SyntaxKind.PropertyDeclaration: - report('Property'); - break; - - case ts.SyntaxKind.TypeAliasDeclaration: - report('Type'); - break; - - case ts.SyntaxKind.TypeParameter: - handleTypeParam(identifier); - break; - - case ts.SyntaxKind.VariableDeclaration: - report('Variable'); - break; - - default: - throw new Error(`Unknown node with kind ${parent.kind}.`); - // TODO - should we just handle this gracefully? - // report('Unknown Node'); - // break; - } - } - - const unusedParameters = new Set(); - function handleParameterDeclaration( - identifier: ts.Identifier, - parent: ts.ParameterDeclaration, - ): void { - const name = identifier.getText(); - // regardless of if the parameter is ignored, track that it had a diagnostic fired on it - unusedParameters.add(identifier); - - /* - NOTE - Typescript will automatically ignore parameters that have a - leading underscore in their name. We cannot do anything about this. - */ - - function report(): void { - const node = parserServices.tsNodeToESTreeNodeMap.get(identifier); - context.report({ - node, - messageId: 'unused', - data: { - name, - type: 'Parameter', - }, - }); - } - - const isLastParameter = - parent.parent.parameters.indexOf(parent) === - parent.parent.parameters.length - 1; - if (!isLastParameter && options.ignoreArgsIfArgsAfterAreUsed) { - // once all diagnostics are processed, we can check if the following args are unused - afterAllDiagnosticsCallbacks.push(() => { - for (const param of parent.parent.parameters) { - if (!unusedParameters.has(param.name)) { - return; - } - } - - // none of the following params were unused, so report - report(); - }); - } else { - report(); - } - } - - function handleImportDeclaration(parent: ts.ImportDeclaration): void { - // the entire import statement is unused - - /* - NOTE - Typescript will automatically ignore imports that have a - leading underscore in their name. We cannot do anything about this. - */ - - context.report({ - messageId: 'unusedImport', - node: parserServices.tsNodeToESTreeNodeMap.get(parent), - }); - } - - function handleDestructure(parent: ts.BindingPattern): void { - // the entire destructure is unused - // note that this case only ever triggers for simple, single-level destructured objects - // i.e. these will not trigger it: - // - const {a:_a, b, c: {d}} = z; - // - const [a, b] = c; - - parent.elements.forEach(element => { - if (element.kind === ts.SyntaxKind.BindingElement) { - const name = element.name; - if (name.kind === ts.SyntaxKind.Identifier) { - handleIdentifier(name); - } - } - }); - } - - function handleTypeParamList(node: NodeWithTypeParams): void { - // the entire generic decl list is unused - - /* - NOTE - Typescript will automatically ignore generics that have a - leading underscore in their name. We cannot do anything about this. - */ - - const parent = parserServices.tsNodeToESTreeNodeMap.get( - node as never, - ) as { - typeParameters: TSESTree.TSTypeParameterDeclaration; - }; - context.report({ - messageId: 'unusedTypeParameters', - node: parent.typeParameters, - }); - } - function handleTypeParam(identifier: ts.Identifier): void { - context.report({ - node: parserServices.tsNodeToESTreeNodeMap.get(identifier), - messageId: 'unused', - data: { - name: identifier.getText(), - type: 'Type Parameter', - }, - }); - } - - return { - 'Program:exit'(program: TSESTree.Program): void { - const tsNode = parserServices.esTreeNodeToTSNodeMap.get(program); - const sourceFile = util.getSourceFileOfNode(tsNode); - const diagnostics = tsProgram.getSemanticDiagnostics(sourceFile); - - diagnostics.forEach(diag => { - if (isUnusedDiagnostic(diag.code)) { - if (diag.start !== undefined) { - const node = util.getTokenAtPosition(sourceFile, diag.start); - const parent = node.parent; - if (isIdentifier(node)) { - handleIdentifier(node); - } else if (isImport(parent)) { - handleImportDeclaration(parent); - } else if (isDestructure(parent)) { - handleDestructure(parent); - } else if (isGeneric(node, parent)) { - handleTypeParamList(parent); - } - } - } - }); - - // trigger all the checks to be done after all the diagnostics have been evaluated - afterAllDiagnosticsCallbacks.forEach(cb => cb()); - }, - }; - }, -}); - -/** - * Checks if the diagnostic code is one of the expected "unused var" codes - */ -function isUnusedDiagnostic(code: number): boolean { - return [ - 6133, // '{0}' is declared but never used. - 6138, // Property '{0}' is declared but its value is never read. - 6192, // All imports in import declaration are unused. - 6196, // '{0}' is declared but its value is never read. - 6198, // All destructured elements are unused. - 6199, // All variables are unused. - 6205, // All type parameters are unused. - ].includes(code); -} - -/** - * Checks if the given node is a destructuring pattern - */ -function isDestructure(node: ts.Node): node is ts.BindingPattern { - return ( - node.kind === ts.SyntaxKind.ObjectBindingPattern || - node.kind === ts.SyntaxKind.ArrayBindingPattern - ); -} - -function isImport(node: ts.Node): node is ts.ImportDeclaration { - return node.kind === ts.SyntaxKind.ImportDeclaration; -} - -function isIdentifier(node: ts.Node): node is ts.Identifier { - return node.kind === ts.SyntaxKind.Identifier; -} - -function isGeneric( - node: ts.Node, - parent: ts.Node & Partial, -): parent is NodeWithTypeParams { - return ( - node.kind === ts.SyntaxKind.LessThanToken && - parent.typeParameters !== undefined - ); -} From 3ed09bd6d4960e1d1fae0aaf061fcdb2c9bcd533 Mon Sep 17 00:00:00 2001 From: thomas michael wallace Date: Sun, 22 Aug 2021 02:26:22 +0100 Subject: [PATCH 406/473] chore(eslint-plugin): remove support for eslint 5 (#2683) --- packages/eslint-plugin-tslint/package.json | 2 +- packages/eslint-plugin/package.json | 2 +- packages/eslint-plugin/src/rules/indent.ts | 5 +---- packages/eslint-plugin/src/rules/init-declarations.ts | 7 +------ packages/eslint-plugin/src/rules/keyword-spacing.ts | 7 +------ .../eslint-plugin/src/rules/lines-between-class-members.ts | 5 +---- packages/eslint-plugin/src/rules/no-invalid-this.ts | 1 + packages/eslint-plugin/src/rules/no-loop-func.ts | 5 +---- packages/eslint-plugin/src/rules/no-magic-numbers.ts | 5 +---- packages/eslint-plugin/src/rules/no-unused-expressions.ts | 1 + packages/eslint-plugin/src/rules/no-useless-constructor.ts | 1 + packages/eslint-plugin/src/rules/quotes.ts | 1 + packages/eslint-plugin/src/rules/semi.ts | 1 + packages/eslint-plugin/src/rules/space-infix-ops.ts | 4 +++- packages/parser/package.json | 2 +- 15 files changed, 17 insertions(+), 32 deletions(-) diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 0df408974e52..7917ab0f1709 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -42,7 +42,7 @@ "lodash": "^4.17.21" }, "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0-0", "tslint": "^5.0.0 || ^6.0.0", "typescript": "*" }, diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 0546e3d3b09d..b750d5e02ab8 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -64,7 +64,7 @@ }, "peerDependencies": { "@typescript-eslint/parser": "^4.0.0", - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0-0" }, "peerDependenciesMeta": { "typescript": { diff --git a/packages/eslint-plugin/src/rules/indent.ts b/packages/eslint-plugin/src/rules/indent.ts index 129754543c8f..a87772dd1f66 100644 --- a/packages/eslint-plugin/src/rules/indent.ts +++ b/packages/eslint-plugin/src/rules/indent.ts @@ -100,10 +100,7 @@ export default util.createRule({ fixable: 'whitespace', hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, - messages: baseRule.meta.messages ?? { - wrongIndentation: - 'Expected indentation of {{expected}} but found {{actual}}.', - }, + messages: baseRule.meta.messages, }, defaultOptions: [ // typescript docs and playground use 4 space indent diff --git a/packages/eslint-plugin/src/rules/init-declarations.ts b/packages/eslint-plugin/src/rules/init-declarations.ts index 4557faeb7d77..a75d6e031cd0 100644 --- a/packages/eslint-plugin/src/rules/init-declarations.ts +++ b/packages/eslint-plugin/src/rules/init-declarations.ts @@ -27,12 +27,7 @@ export default createRule({ }, hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, - messages: baseRule.meta.messages ?? { - initialized: - "Variable '{{idName}}' should be initialized on declaration.", - notInitialized: - "Variable '{{idName}}' should not be initialized on declaration.", - }, + messages: baseRule.meta.messages, }, defaultOptions: ['always'], create(context) { diff --git a/packages/eslint-plugin/src/rules/keyword-spacing.ts b/packages/eslint-plugin/src/rules/keyword-spacing.ts index f7bedfc11943..18c1c60bbb95 100644 --- a/packages/eslint-plugin/src/rules/keyword-spacing.ts +++ b/packages/eslint-plugin/src/rules/keyword-spacing.ts @@ -20,12 +20,7 @@ export default util.createRule({ fixable: 'whitespace', hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, - messages: baseRule.meta.messages ?? { - expectedBefore: 'Expected space(s) before "{{value}}".', - expectedAfter: 'Expected space(s) after "{{value}}".', - unexpectedBefore: 'Unexpected space(s) before "{{value}}".', - unexpectedAfter: 'Unexpected space(s) after "{{value}}".', - }, + messages: baseRule.meta.messages, }, defaultOptions: [{}], diff --git a/packages/eslint-plugin/src/rules/lines-between-class-members.ts b/packages/eslint-plugin/src/rules/lines-between-class-members.ts index 0cca8619c0a5..0e52e7b958cc 100644 --- a/packages/eslint-plugin/src/rules/lines-between-class-members.ts +++ b/packages/eslint-plugin/src/rules/lines-between-class-members.ts @@ -35,10 +35,7 @@ export default util.createRule({ fixable: 'whitespace', hasSuggestions: baseRule.meta.hasSuggestions, schema, - messages: baseRule.meta.messages ?? { - never: 'Unexpected blank line between class members.', - always: 'Expected blank line between class members.', - }, + messages: baseRule.meta.messages, }, defaultOptions: [ 'always', diff --git a/packages/eslint-plugin/src/rules/no-invalid-this.ts b/packages/eslint-plugin/src/rules/no-invalid-this.ts index 2d802cdba04d..eb21da3ff8bd 100644 --- a/packages/eslint-plugin/src/rules/no-invalid-this.ts +++ b/packages/eslint-plugin/src/rules/no-invalid-this.ts @@ -25,6 +25,7 @@ export default createRule({ recommended: false, extendsBaseRule: true, }, + // TODO: this rule has only had messages since v7.0 - remove this when we remove support for v6 messages: baseRule.meta.messages ?? { unexpectedThis: "Unexpected 'this'.", }, diff --git a/packages/eslint-plugin/src/rules/no-loop-func.ts b/packages/eslint-plugin/src/rules/no-loop-func.ts index 5560acf0952d..b3e57903dd16 100644 --- a/packages/eslint-plugin/src/rules/no-loop-func.ts +++ b/packages/eslint-plugin/src/rules/no-loop-func.ts @@ -24,10 +24,7 @@ export default util.createRule({ }, hasSuggestions: baseRule.meta.hasSuggestions, schema: [], - messages: baseRule?.meta.messages ?? { - unsafeRefs: - 'Function declared in a loop contains unsafe references to variable(s) {{ varNames }}.', - }, + messages: baseRule.meta.messages, }, defaultOptions: [], create(context) { diff --git a/packages/eslint-plugin/src/rules/no-magic-numbers.ts b/packages/eslint-plugin/src/rules/no-magic-numbers.ts index 20d06f05f563..8171815bb56b 100644 --- a/packages/eslint-plugin/src/rules/no-magic-numbers.ts +++ b/packages/eslint-plugin/src/rules/no-magic-numbers.ts @@ -43,10 +43,7 @@ export default util.createRule({ }, }, ], - messages: baseRule.meta.messages ?? { - useConst: "Number constants declarations must use 'const'.", - noMagic: 'No magic number: {{raw}}.', - }, + messages: baseRule.meta.messages, }, defaultOptions: [ { diff --git a/packages/eslint-plugin/src/rules/no-unused-expressions.ts b/packages/eslint-plugin/src/rules/no-unused-expressions.ts index f2f0e2c73b2b..527ba14e03ce 100644 --- a/packages/eslint-plugin/src/rules/no-unused-expressions.ts +++ b/packages/eslint-plugin/src/rules/no-unused-expressions.ts @@ -22,6 +22,7 @@ export default util.createRule({ }, hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, + // TODO: this rule has only had messages since v7.0 - remove this when we remove support for v6 messages: baseRule.meta.messages ?? { unusedExpression: 'Expected an assignment or function call and instead saw an expression.', diff --git a/packages/eslint-plugin/src/rules/no-useless-constructor.ts b/packages/eslint-plugin/src/rules/no-useless-constructor.ts index a4532ce72864..d1134bd09db2 100644 --- a/packages/eslint-plugin/src/rules/no-useless-constructor.ts +++ b/packages/eslint-plugin/src/rules/no-useless-constructor.ts @@ -57,6 +57,7 @@ export default util.createRule({ }, hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, + // TODO: this rule has only had messages since v7.0 - remove this when we remove support for v6 messages: baseRule.meta.messages ?? { noUselessConstructor: 'Useless constructor.', }, diff --git a/packages/eslint-plugin/src/rules/quotes.ts b/packages/eslint-plugin/src/rules/quotes.ts index e4af60fd0412..699df89da156 100644 --- a/packages/eslint-plugin/src/rules/quotes.ts +++ b/packages/eslint-plugin/src/rules/quotes.ts @@ -23,6 +23,7 @@ export default util.createRule({ }, fixable: 'code', hasSuggestions: baseRule.meta.hasSuggestions, + // TODO: this rule has only had messages since v7.0 - remove this when we remove support for v6 messages: baseRule.meta.messages ?? { wrongQuotes: 'Strings must use {{description}}.', }, diff --git a/packages/eslint-plugin/src/rules/semi.ts b/packages/eslint-plugin/src/rules/semi.ts index 05c4c6b1c3aa..c8829ab83e34 100644 --- a/packages/eslint-plugin/src/rules/semi.ts +++ b/packages/eslint-plugin/src/rules/semi.ts @@ -25,6 +25,7 @@ export default util.createRule({ fixable: 'code', hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, + // TODO: this rule has only had messages since v7.0 - remove this when we remove support for v6 messages: baseRule.meta.messages ?? { missingSemi: 'Missing semicolon.', extraSemi: 'Extra semicolon.', diff --git a/packages/eslint-plugin/src/rules/space-infix-ops.ts b/packages/eslint-plugin/src/rules/space-infix-ops.ts index 86fb8d93d53f..eb92bd2f112c 100644 --- a/packages/eslint-plugin/src/rules/space-infix-ops.ts +++ b/packages/eslint-plugin/src/rules/space-infix-ops.ts @@ -26,8 +26,10 @@ export default util.createRule({ fixable: baseRule.meta.fixable, hasSuggestions: baseRule.meta.hasSuggestions, schema: baseRule.meta.schema, - messages: baseRule.meta.messages ?? { + messages: { + // @ts-expect-error -- we report on this messageId so we need to ensure it's there in case ESLint changes in future missingSpace: "Operator '{{operator}}' must be spaced.", + ...baseRule.meta.messages, }, }, defaultOptions: [ diff --git a/packages/parser/package.json b/packages/parser/package.json index 89c075d6afe6..ba9f66b31764 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -41,7 +41,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0-0" }, "dependencies": { "@typescript-eslint/scope-manager": "4.33.0", From e2641246571b69df36cde5cb7bce7c4fffc43f98 Mon Sep 17 00:00:00 2001 From: Sergey Date: Sun, 22 Aug 2021 04:29:45 +0300 Subject: [PATCH 407/473] feat(eslint-plugin): [member-ordering] add support for getters and setters (#3611) * Getters/setters * Fix decorated ordering * Add test --- .../docs/rules/member-ordering.md | 159 ++++++++++++++++ .../src/rules/member-ordering.ts | 77 +++++++- .../tests/rules/member-ordering.test.ts | 179 ++++++++++++++++++ 3 files changed, 412 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/member-ordering.md b/packages/eslint-plugin/docs/rules/member-ordering.md index eda1c573c8e9..98cff7da670f 100644 --- a/packages/eslint-plugin/docs/rules/member-ordering.md +++ b/packages/eslint-plugin/docs/rules/member-ordering.md @@ -77,6 +77,64 @@ There are multiple ways to specify the member types. The most explicit and granu "protected-constructor", "private-constructor", + // Getters + "public-static-get", + "protected-static-get", + "private-static-get", + + "public-decorated-get", + "protected-decorated-get", + "private-decorated-get", + + "public-instance-get", + "protected-instance-get", + "private-instance-get", + + "public-abstract-get", + "protected-abstract-get", + "private-abstract-get", + + "public-get", + "protected-get", + "private-get", + + "static-get", + "instance-get", + "abstract-get", + + "decorated-get", + + "get", + + // Setters + "public-static-set", + "protected-static-set", + "private-static-set", + + "public-decorated-set", + "protected-decorated-set", + "private-decorated-set", + + "public-instance-set", + "protected-instance-set", + "private-instance-set", + + "public-abstract-set", + "protected-abstract-set", + "private-abstract-set", + + "public-set", + "protected-set", + "private-set", + + "static-set", + "instance-set", + "abstract-set", + + "decorated-set", + + "set", + // Methods "public-static-method", "protected-static-method", @@ -112,6 +170,16 @@ It is also possible to group member types by their accessibility (`static`, `ins // Constructors // Only the accessibility of constructors is configurable. See below. + // Getters + "public-get", // = ["public-static-get", "public-instance-get"] + "protected-get", // = ["protected-static-get", "protected-instance-get"] + "private-get", // = ["private-static-get", "private-instance-get"] + + // Setters + "public-set", // = ["public-static-set", "public-instance-set"] + "protected-set", // = ["protected-static-set", "protected-instance-set"] + "private-set", // = ["private-static-set", "private-instance-set"] + // Methods "public-method", // = ["public-static-method", "public-instance-method"] "protected-method", // = ["protected-static-method", "protected-instance-method"] @@ -139,6 +207,21 @@ their accessibility. // Constructors // There are no decorators for constructors. + // Getters + "public-decorated-get", + "protected-decorated-get", + "private-decorated-get", + + "decorated-get" // = ["public-decorated-get", "protected-decorated-get", "private-decorated-get"] + + // Setters + "public-decorated-set", + "protected-decorated-set", + "private-decorated-set", + + "decorated-set" // = ["public-decorated-set", "protected-decorated-set", "private-decorated-set"] + + // Methods "public-decorated-method", "protected-decorated-method", "private-decorated-method", @@ -164,6 +247,16 @@ Another option is to group the member types by their scope (`public`, `protected // Constructors "constructor", // = ["public-constructor", "protected-constructor", "private-constructor"] + // Getters + "static-get", // = ["public-static-get", "protected-static-get", "private-static-get"] + "instance-get", // = ["public-instance-get", "protected-instance-get", "private-instance-get"] + "abstract-get" // = ["public-abstract-get", "protected-abstract-get", "private-abstract-get"] + + // Setters + "static-set", // = ["public-static-set", "protected-static-set", "private-static-set"] + "instance-set", // = ["public-instance-set", "protected-instance-set", "private-instance-set"] + "abstract-set" // = ["public-abstract-set", "protected-abstract-set", "private-abstract-set"] + // Methods "static-method", // = ["public-static-method", "protected-static-method", "private-static-method"] "instance-method", // = ["public-instance-method", "protected-instance-method", "private-instance-method"] @@ -187,6 +280,14 @@ The third grouping option is to ignore both scope and accessibility. // Constructors // Only the accessibility of constructors is configurable. See above. + // Getters + "get" // = ["public-static-get", "protected-static-get", "private-static-get", "public-instance-get", "protected-instance-get", "private-instance-get", + // "public-abstract-get", "protected-abstract-get", "private-abstract-get"] + + // Setters + "set" // = ["public-static-set", "protected-static-set", "private-static-set", "public-instance-set", "protected-instance-set", "private-instance-set", + // "public-abstract-set", "protected-abstract-set", "private-abstract-set"] + // Methods "method" // = ["public-static-method", "protected-static-method", "private-static-method", "public-instance-method", "protected-instance-method", "private-instance-method", // "public-abstract-method", "protected-abstract-method", "private-abstract-method"] @@ -239,6 +340,64 @@ The default configuration looks as follows: "constructor", + // Getters + "public-static-get", + "protected-static-get", + "private-static-get", + + "public-decorated-get", + "protected-decorated-get", + "private-decorated-get", + + "public-instance-get", + "protected-instance-get", + "private-instance-get", + + "public-abstract-get", + "protected-abstract-get", + "private-abstract-get", + + "public-get", + "protected-get", + "private-get", + + "static-get", + "instance-get", + "abstract-get", + + "decorated-get", + + "get", + + // Setters + "public-static-set", + "protected-static-set", + "private-static-set", + + "public-decorated-set", + "protected-decorated-set", + "private-decorated-set", + + "public-instance-set", + "protected-instance-set", + "private-instance-set", + + "public-abstract-set", + "protected-abstract-set", + "private-abstract-set", + + "public-set", + "protected-set", + "private-set", + + "static-set", + "instance-set", + "abstract-set", + + "decorated-set", + + "set", + // Methods "public-static-method", "protected-static-method", diff --git a/packages/eslint-plugin/src/rules/member-ordering.ts b/packages/eslint-plugin/src/rules/member-ordering.ts index a6b1b74c20e8..34c922a39181 100644 --- a/packages/eslint-plugin/src/rules/member-ordering.ts +++ b/packages/eslint-plugin/src/rules/member-ordering.ts @@ -93,6 +93,64 @@ export const defaultOrder = [ 'constructor', + // Getters + 'public-static-get', + 'protected-static-get', + 'private-static-get', + + 'public-decorated-get', + 'protected-decorated-get', + 'private-decorated-get', + + 'public-instance-get', + 'protected-instance-get', + 'private-instance-get', + + 'public-abstract-get', + 'protected-abstract-get', + 'private-abstract-get', + + 'public-get', + 'protected-get', + 'private-get', + + 'static-get', + 'instance-get', + 'abstract-get', + + 'decorated-get', + + 'get', + + // Setters + 'public-static-set', + 'protected-static-set', + 'private-static-set', + + 'public-decorated-set', + 'protected-decorated-set', + 'private-decorated-set', + + 'public-instance-set', + 'protected-instance-set', + 'private-instance-set', + + 'public-abstract-set', + 'protected-abstract-set', + 'private-abstract-set', + + 'public-set', + 'protected-set', + 'private-set', + + 'static-set', + 'instance-set', + 'abstract-set', + + 'decorated-set', + + 'set', + // Methods 'public-static-method', 'protected-static-method', @@ -129,6 +187,8 @@ const allMemberTypes = [ 'method', 'call-signature', 'constructor', + 'get', + 'set', ].reduce((all, type) => { all.push(type); @@ -137,8 +197,13 @@ const allMemberTypes = [ all.push(`${accessibility}-${type}`); // e.g. `public-field` } - // Only class instance fields and methods can have decorators attached to them - if (type === 'field' || type === 'method') { + // Only class instance fields, methods, get and set can have decorators attached to them + if ( + type === 'field' || + type === 'method' || + type === 'get' || + type === 'set' + ) { const decoratedMemberType = `${accessibility}-decorated-${type}`; const decoratedMemberTypeNoAccessibility = `decorated-${type}`; if (!all.includes(decoratedMemberType)) { @@ -292,7 +357,13 @@ function getRank( if (supportsModifiers) { const decorated = 'decorators' in node && node.decorators!.length > 0; - if (decorated && (type === 'field' || type === 'method')) { + if ( + decorated && + (type === 'field' || + type === 'method' || + type === 'get' || + type === 'set') + ) { memberGroups.push(`${accessibility}-decorated-${type}`); memberGroups.push(`decorated-${type}`); } diff --git a/packages/eslint-plugin/tests/rules/member-ordering.test.ts b/packages/eslint-plugin/tests/rules/member-ordering.test.ts index b53143866b20..a0bbf7b12233 100644 --- a/packages/eslint-plugin/tests/rules/member-ordering.test.ts +++ b/packages/eslint-plugin/tests/rules/member-ordering.test.ts @@ -5282,6 +5282,61 @@ class Foo { { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, ], }, + + // default option + class + defaultOrder + alphabetically + { + code: ` +class Foo { + public static a: string; + protected static b: string = ""; + private static c: string = ""; + + public d: string = ""; + protected e: string = ""; + private f: string = ""; + + constructor() {} + + get h() {} + + set g() {} +} + `, + options: [ + { + default: { + memberTypes: defaultOrder, + order: 'alphabetically', + }, + }, + ], + }, + + // default option + class + custom + alphabetically + { + code: ` +class Foo { + get a() {} + + @Bar + get b() {} + + set c() {} + + @Bar + set d() {} +} + `, + options: [ + { + default: { + memberTypes: ['get', 'decorated-get', 'set', 'decorated-set'], + order: 'alphabetically', + }, + }, + ], + }, + // default option + class + decorators + default order + alphabetically { code: ` @@ -5377,6 +5432,130 @@ const foo = class Foo { }, ], invalid: [ + // default option + class + wrong order within group and wrong group order + alphabetically + { + code: ` +class FooTestGetter { + public static a: string; + protected static b: string = ""; + private static c: string = ""; + + public d: string = ""; + protected e: string = ""; + private f: string = ""; + + get h() {} + + set g() {} + + constructor() {} +} + `, + options: [ + { + default: { + memberTypes: defaultOrder, + order: 'alphabetically', + }, + }, + ], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'constructor', + rank: 'public instance get', + }, + }, + ], + }, + + // default option + class + custom + alphabetically + { + code: ` +class Foo { + @Bar + get a() {} + + get b() {} + + @Bar + set c() {} + + set d() {} +} + `, + options: [ + { + default: { + memberTypes: ['get', 'decorated-get', 'set', 'decorated-set'], + order: 'alphabetically', + }, + }, + ], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'b', + rank: 'decorated get', + }, + }, + { + messageId: 'incorrectGroupOrder', + data: { + name: 'd', + rank: 'decorated set', + }, + }, + ], + }, + + // default option + class + wrong order within group and wrong group order + alphabetically + { + code: ` +class FooTestGetter { + public static a: string; + protected static b: string = ""; + private static c: string = ""; + + public d: string = ""; + protected e: string = ""; + private f: string = ""; + + set g() {} + + constructor() {} + + get h() {} +} + `, + options: [ + { + default: { + memberTypes: defaultOrder, + order: 'alphabetically', + }, + }, + ], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'constructor', + rank: 'public instance set', + }, + }, + { + messageId: 'incorrectGroupOrder', + data: { + name: 'h', + rank: 'public instance set', + }, + }, + ], + }, + // default option + interface + wrong order within group and wrong group order + alphabetically { code: ` From 9170ca71eb3f48cd9a942bcee1a444a459d40a07 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 21 Aug 2021 18:40:57 -0700 Subject: [PATCH 408/473] chore: delete no-unused-vars-experimental test oops --- .../rules/no-unused-vars-experimental.test.ts | 1363 ----------------- 1 file changed, 1363 deletions(-) delete mode 100644 packages/eslint-plugin/tests/rules/no-unused-vars-experimental.test.ts diff --git a/packages/eslint-plugin/tests/rules/no-unused-vars-experimental.test.ts b/packages/eslint-plugin/tests/rules/no-unused-vars-experimental.test.ts deleted file mode 100644 index 6beaa6f0a0a6..000000000000 --- a/packages/eslint-plugin/tests/rules/no-unused-vars-experimental.test.ts +++ /dev/null @@ -1,1363 +0,0 @@ -/* eslint-disable @typescript-eslint/internal/prefer-ast-types-enum */ -import { - InvalidTestCase, - ValidTestCase, -} from '@typescript-eslint/experimental-utils/dist/ts-eslint'; -import rule, { - DEFAULT_IGNORED_REGEX_STRING, - MessageIds, - Options, -} from '../../src/rules/no-unused-vars-experimental'; -import { getFixturesRootDir, RuleTester } from '../RuleTester'; - -const rootDir = getFixturesRootDir(); -const ruleTester = new RuleTester({ - parserOptions: { - ecmaVersion: 2018, - sourceType: 'module', - }, - parser: '@typescript-eslint/parser', -}); - -const hasExport = /^export/m; -// const hasImport = /^import .+? from ['"]/m; -function makeExternalModule< - T extends ValidTestCase | InvalidTestCase, ->(tests: T[]): T[] { - return tests.map(t => { - if (!hasExport.test(t.code)) { - return { - ...t, - code: `${t.code}\nexport const __externalModule = 1;`, - }; - } - return t; - }); -} - -const DEFAULT_IGNORED_REGEX = new RegExp( - DEFAULT_IGNORED_REGEX_STRING, -).toString(); -ruleTester.run('no-unused-vars-experimental', rule, { - valid: makeExternalModule([ - /////////////////////// - // #region variables // - /////////////////////// - { code: 'const _x = "unused"' }, - { code: 'export const x = "used";' }, - { - code: ` -const x = "used"; -console.log(x); - `, - }, - { - code: ` -function foo() {} -foo(); - `, - }, - { code: 'function _foo() {}' }, - { - // decorators require the tsconfig compiler option - // or else they are marked as unused because it is not a valid usage - code: ` -function decorator(_clazz: any) {} - -@decorator -export class Foo {} - `, - parser: require.resolve('@typescript-eslint/parser'), - parserOptions: { - project: './tsconfig.json', - tsconfigRootDir: rootDir, - }, - }, - { - code: ` -type Foo = { a?: string }; -export const foo: Foo = {}; - `, - }, - { - code: ` -interface Foo { a?: string }; -export const foo: Foo = {}; - `, - }, - { code: 'type _Foo = { a?: string };' }, - { code: 'interface _Foo { a?: string };' }, - { - code: ` -class Foo {} -new Foo(); - `, - }, - { code: 'class _Foo {}' }, - { - code: ` -export class Foo { - private foo: string; - bar() { - console.log(this.foo); - } -} - `, - }, - { - code: ` -export class Foo { - private _foo: string; -} - `, - }, - { - code: ` -export class Foo { - private foo() {}; - bar() { - this.foo(); - } -} - `, - }, - { - code: ` -export class Foo { - private _foo() {}; -} - `, - }, - { - code: ` -enum Foo { a = 1 } -console.log(Foo.a); - `, - }, - { code: 'enum _Foo { a = 1 }' }, - { code: 'export const {a, b} = c;' }, - { - code: ` -const {a, b: {c}} = d; -console.log(a, c); - `, - }, - { - code: ` -const {a, b} = c; -console.log(a, b); - `, - }, - { - code: ` -const {a: _a, b} = c; -console.log(b); - `, - }, - { code: `const {a: _a, b: _b} = c;` }, - { code: 'export const [a, b] = c;' }, - { - code: ` -const [a, b] = c; -console.log(a, b); - `, - }, - { - code: ` -const [a, [b]] = c; -console.log(a, b); - `, - }, - { - code: ` -const [_a, b] = c; -console.log(b); - `, - }, - { code: `const [_a, _b] = c;` }, - // #endregion variables // - ////////////////////////// - - //////////////////////// - // #region parameters // - //////////////////////// - { - code: ` -export function foo(a) { - console.log(a); -} - `, - }, - { - code: ` -export function foo(a: string, b: string) { - console.log(b); -} - `, - options: [ - { - ignoreArgsIfArgsAfterAreUsed: true, - }, - ], - }, - { - code: ` -export class Clazz { - constructor(a: string, public b: string) {} -} - `, - options: [ - { - ignoreArgsIfArgsAfterAreUsed: true, - }, - ], - }, - { - code: ` -export class Clazz { - constructor(private a: string, public b: string) {} -} - `, - options: [ - { - ignoreArgsIfArgsAfterAreUsed: true, - }, - ], - }, - { - code: ` -export class Clazz { - constructor(private a: string) {} - foo() { console.log(this.a) } -} - `, - }, - { code: 'export function foo({a: _a}) {}' }, - { code: 'export function foo({a: { b: _b }}) {}' }, - { code: 'export function foo([_a]) {}' }, - { code: 'export function foo([[_a]]) {}' }, - { - code: ` -export function foo({a: _a}, used) { - console.log(used); -} - `, - options: [ - { - ignoreArgsIfArgsAfterAreUsed: true, - }, - ], - }, - { - code: ` -export function foo({a: { b: _b }}, used) { - console.log(used); -} - `, - options: [ - { - ignoreArgsIfArgsAfterAreUsed: true, - }, - ], - }, - { - code: ` -export function foo([_a], used) { - console.log(used); -} - `, - options: [ - { - ignoreArgsIfArgsAfterAreUsed: true, - }, - ], - }, - { - code: ` -export function foo([[_a]], used) { - console.log(used); -} - `, - options: [ - { - ignoreArgsIfArgsAfterAreUsed: true, - }, - ], - }, - // #endregion parameters // - /////////////////////////// - - //////////////////// - // #region import // - //////////////////// - { - code: ` -import defaultImp from "thing"; -console.log(defaultImp); - `, - }, - { - code: ` -import { named } from "thing"; -console.log(named); - `, - }, - { - code: ` -import defaultImp, { named } from "thing"; -console.log(defaultImp, named); - `, - }, - { - code: ` -import defaultImp = require("thing"); -console.log(defaultImp, named); - `, - }, - { - code: ` -import * as namespace from "thing"; -console.log(namespace); - `, - }, - { - code: ` -import defaultImp, * as namespace from "thing"; -console.log(defaultImp, namespace); - `, - }, - { code: 'import _defaultImp from "thing";' }, - { code: 'import { named as _named } from "thing";' }, - { code: 'import _defaultImp, { named as _named } from "thing";' }, - { code: 'import _defaultImp = require("thing");' }, - { code: 'import * as _namespace from "thing";' }, - { code: 'import _defaultImp, * as _namespace from "thing";' }, - // #endregion import // - /////////////////////// - - ////////////////////// - // #region generics // - ////////////////////// - { code: 'export function foo(): T {}' }, - { code: 'export function foo(): T & T2 {}' }, - { code: 'export function foo(): T {}' }, - { - code: ` -export class foo { - prop: T -} - `, - }, - { - code: ` -export class foo { - prop: T - prop2: T2 -} - `, - }, - { - code: ` -export class foo { - prop: T - prop2: T2 -} - `, - }, - { - code: ` -export interface foo { - prop: T -} - `, - }, - { - code: ` -export interface foo { - prop: T - prop2: T2 -} - `, - }, - { - code: ` -export interface foo { - prop: T - prop2: T2 -} - `, - }, - { - code: ` -export type foo = { - prop: T - -} - `, - }, - { - code: ` -export type foo = { - prop: T - prop2: T2 -} - `, - }, - { - code: ` -export type foo = { - prop: T - prop2: T2 -} - `, - }, - // #endregion generics // - ///////////////////////// - ]), - invalid: makeExternalModule([ - /////////////////////// - // #region variables // - /////////////////////// - { - code: 'const x = "unused"', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'x', - type: 'Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 7, - endColumn: 8, - }, - ], - }, - { - code: 'const x: string = "unused"', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'x', - type: 'Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 7, - endColumn: 16, - }, - ], - }, - { - code: 'const x = "unused"', - options: [ - { - ignoredNamesRegex: false, - }, - ], - errors: [ - { - messageId: 'unused', - data: { - name: 'x', - type: 'Variable', - }, - line: 1, - column: 7, - endColumn: 8, - }, - ], - }, - { - code: 'function foo() {}', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'foo', - type: 'Function', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 10, - endColumn: 13, - }, - ], - }, - { - code: 'type Foo = { a?: string };', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'Foo', - type: 'Type', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 6, - endColumn: 9, - }, - ], - }, - { - code: 'interface Foo { a?: string };', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'Foo', - type: 'Interface', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 11, - endColumn: 14, - }, - ], - }, - { - code: 'class Foo {}', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'Foo', - type: 'Class', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 7, - endColumn: 10, - }, - ], - }, - { - code: ` -export class Foo { - private foo: string; -} - `, - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'foo', - type: 'Property', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 3, - column: 11, - endColumn: 14, - }, - ], - }, - { - code: ` -export class Foo { - private foo() {}; -} - `, - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'foo', - type: 'Method', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 3, - column: 11, - endColumn: 14, - }, - ], - }, - { - code: 'enum Foo { a = 1 }', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'Foo', - type: 'Enum', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 6, - endColumn: 9, - }, - ], - }, - { - code: ` -const {foo, bar} = baz; -console.log(foo); - `, - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'bar', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 2, - column: 13, - endColumn: 16, - }, - ], - }, - { - code: ` -const [foo, bar] = baz; -console.log(foo); - `, - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'bar', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 2, - column: 13, - endColumn: 16, - }, - ], - }, - { - code: 'const {foo, bar} = baz;', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'foo', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 8, - endColumn: 11, - }, - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'bar', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 13, - endColumn: 16, - }, - ], - }, - { - code: 'const {foo, bar: _bar} = baz;', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'foo', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 8, - endColumn: 11, - }, - ], - }, - { - code: 'const [foo, bar] = baz;', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'foo', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 8, - endColumn: 11, - }, - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'bar', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 13, - endColumn: 16, - }, - ], - }, - { - code: 'const [foo, _bar] = baz;', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'foo', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 8, - endColumn: 11, - }, - ], - }, - { - code: 'const [foo, [bar]] = baz;', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'foo', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 8, - endColumn: 11, - }, - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'bar', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 14, - endColumn: 17, - }, - ], - }, - { - code: 'const {foo, bar: {baz}} = bam;', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'foo', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 8, - endColumn: 11, - }, - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'baz', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 19, - endColumn: 22, - }, - ], - }, - { - code: 'const {foo, bar: [baz]} = bam;', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'foo', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 8, - endColumn: 11, - }, - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'baz', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 19, - endColumn: 22, - }, - ], - }, - // #endregion variables // - ////////////////////////// - - //////////////////////// - // #region parameters // - //////////////////////// - { - code: ` -export function foo(a, b) { - console.log(b); -} - `, - errors: [ - { - messageId: 'unused', - data: { - name: 'a', - type: 'Parameter', - }, - line: 2, - column: 21, - endColumn: 22, - }, - ], - }, - { - code: ` -export function foo(a: string, b: string) { - console.log(b); -} - `, - errors: [ - { - messageId: 'unused', - data: { - name: 'a', - type: 'Parameter', - }, - line: 2, - column: 21, - endColumn: 30, - }, - ], - }, - { - code: ` -export class Clazz { - constructor(a: string, b: string) { - console.log(b); - } -} - `, - errors: [ - { - messageId: 'unused', - data: { - name: 'a', - type: 'Parameter', - }, - line: 3, - column: 15, - endColumn: 24, - }, - ], - }, - { - code: ` -export class Clazz { - constructor(a: string, public b: string) {} -} - `, - errors: [ - { - messageId: 'unused', - data: { - name: 'a', - type: 'Parameter', - }, - line: 3, - column: 15, - endColumn: 24, - }, - ], - }, - { - code: ` -export function foo({a}, used) { - console.log(used); -} - `, - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'a', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 2, - column: 22, - endColumn: 23, - }, - ], - }, - { - code: ` -export function foo({a: {b}}, used) { - console.log(used); -} - `, - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'b', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 2, - column: 26, - endColumn: 27, - }, - ], - }, - { - code: ` -export function foo([a], used) { - console.log(used); -} - `, - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'a', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 2, - column: 22, - endColumn: 23, - }, - ], - }, - { - code: ` -export function foo([[a]], used) { - console.log(used); -} - `, - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'a', - type: 'Destructured Variable', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 2, - column: 23, - endColumn: 24, - }, - ], - }, - // #endregion parameters // - /////////////////////////// - - //////////////////// - // #region import // - //////////////////// - { - code: 'import foo = require("test")', - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'foo', - type: 'Import', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 1, - column: 8, - endColumn: 11, - }, - ], - }, - { - code: 'import defaultImp from "thing";', - errors: [ - { - messageId: 'unusedImport', - line: 1, - column: 1, - endColumn: 32, - }, - ], - }, - { - code: 'import { named } from "thing";', - errors: [ - { - messageId: 'unusedImport', - line: 1, - column: 1, - endColumn: 31, - }, - ], - }, - { - code: 'import * as namespace from "thing";', - errors: [ - { - messageId: 'unusedImport', - line: 1, - column: 1, - endColumn: 36, - }, - ], - }, - { - code: 'import defaultImp, { named } from "thing";', - errors: [ - { - messageId: 'unusedImport', - line: 1, - column: 1, - endColumn: 43, - }, - ], - }, - { - code: 'import defaultImp, * as namespace from "thing";', - errors: [ - { - messageId: 'unusedImport', - line: 1, - column: 1, - endColumn: 48, - }, - ], - }, - { - code: ` -import defaultImp, { named } from "thing"; -console.log(named); - `, - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'defaultImp', - type: 'Import', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 2, - column: 8, - endColumn: 18, - }, - ], - }, - { - code: ` -import defaultImp, * as named from "thing"; -console.log(named); - `, - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'defaultImp', - type: 'Import', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 2, - column: 8, - endColumn: 18, - }, - ], - }, - { - code: ` -import defaultImp, * as named from "thing"; -console.log(defaultImp); - `, - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'named', - type: 'Import', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 2, - column: 25, - endColumn: 30, - }, - ], - }, - { - code: ` -import defaultImp, { named } from "thing"; -console.log(defaultImp); - `, - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'named', - type: 'Import', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 2, - column: 22, - endColumn: 27, - }, - ], - }, - { - code: ` -import { named1, named2 } from "thing"; -console.log(named1); - `, - errors: [ - { - messageId: 'unusedWithIgnorePattern', - data: { - name: 'named2', - type: 'Import', - pattern: DEFAULT_IGNORED_REGEX, - }, - line: 2, - column: 18, - endColumn: 24, - }, - ], - }, - // #endregion import // - /////////////////////// - - ////////////////////// - // #region generics // - ////////////////////// - { - code: 'export function foo() {}', - errors: [ - { - messageId: 'unusedTypeParameters', - line: 1, - column: 20, - endColumn: 23, - }, - ], - }, - { - code: 'export function foo() {}', - errors: [ - { - messageId: 'unusedTypeParameters', - line: 1, - column: 20, - endColumn: 27, - }, - ], - }, - { - code: 'export function foo(): T2 {}', - errors: [ - { - messageId: 'unused', - data: { - name: 'T', - type: 'Type Parameter', - }, - line: 1, - column: 21, - endColumn: 22, - }, - ], - }, - { - code: 'export function foo() {}', - errors: [ - { - messageId: 'unused', - data: { - name: 'T', - type: 'Type Parameter', - }, - line: 1, - column: 21, - endColumn: 22, - }, - ], - }, - { - code: 'export class foo {}', - errors: [ - { - messageId: 'unusedTypeParameters', - line: 1, - column: 17, - endColumn: 20, - }, - ], - }, - { - code: 'export class foo {}', - errors: [ - { - messageId: 'unusedTypeParameters', - line: 1, - column: 17, - endColumn: 24, - }, - ], - }, - { - code: ` -export class foo { - prop: T2 -} - `, - errors: [ - { - messageId: 'unused', - data: { - name: 'T', - type: 'Type Parameter', - }, - line: 2, - column: 18, - endColumn: 19, - }, - ], - }, - { - code: 'export class foo {}', - errors: [ - { - messageId: 'unused', - data: { - name: 'T', - type: 'Type Parameter', - }, - line: 1, - column: 18, - endColumn: 19, - }, - ], - }, - { - code: 'export interface foo {}', - errors: [ - { - messageId: 'unusedTypeParameters', - line: 1, - column: 21, - endColumn: 24, - }, - ], - }, - { - code: 'export interface foo {}', - errors: [ - { - messageId: 'unusedTypeParameters', - line: 1, - column: 21, - endColumn: 28, - }, - ], - }, - { - code: ` -export interface foo { - prop: T2 -} - `, - errors: [ - { - messageId: 'unused', - data: { - name: 'T', - type: 'Type Parameter', - }, - line: 2, - column: 22, - endColumn: 23, - }, - ], - }, - { - code: 'export interface foo {}', - errors: [ - { - messageId: 'unused', - data: { - name: 'T', - type: 'Type Parameter', - }, - line: 1, - column: 22, - endColumn: 23, - }, - ], - }, - { - code: 'export type foo = {}', - errors: [ - { - messageId: 'unusedTypeParameters', - line: 1, - column: 16, - endColumn: 19, - }, - ], - }, - { - code: 'export type foo = {}', - errors: [ - { - messageId: 'unusedTypeParameters', - line: 1, - column: 16, - endColumn: 23, - }, - ], - }, - { - code: ` -export type foo = { - prop: T2 -} - `, - errors: [ - { - messageId: 'unused', - data: { - name: 'T', - type: 'Type Parameter', - }, - line: 2, - column: 17, - endColumn: 18, - }, - ], - }, - { - code: 'export type foo = {}', - errors: [ - { - messageId: 'unused', - data: { - name: 'T', - type: 'Type Parameter', - }, - line: 1, - column: 17, - endColumn: 18, - }, - ], - }, - // #endregion generics // - ///////////////////////// - ]), -}); From 3034181a856d76c15fffa2325251bbe65bc05f28 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 21 Aug 2021 18:56:39 -0700 Subject: [PATCH 409/473] chore: remove no-unused-vars-experimental docs jfc I'm an idiot --- .../docs/rules/no-unused-vars-experimental.md | 115 ------------------ 1 file changed, 115 deletions(-) delete mode 100644 packages/eslint-plugin/docs/rules/no-unused-vars-experimental.md diff --git a/packages/eslint-plugin/docs/rules/no-unused-vars-experimental.md b/packages/eslint-plugin/docs/rules/no-unused-vars-experimental.md deleted file mode 100644 index 918cbc595f5d..000000000000 --- a/packages/eslint-plugin/docs/rules/no-unused-vars-experimental.md +++ /dev/null @@ -1,115 +0,0 @@ -# Disallow unused variables and arguments (`no-unused-vars-experimental`) - -Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers. - -## Rule Details - -This rule leverages the TypeScript compiler's unused variable checks to report. This means that with all rule options set to `false`, it should report the same errors as if you used both the `noUnusedLocals` and `noUnusedParameters` compiler options. - -This rule is vastly different to, and maintains no compatibility with the base ESLint version of the rule. - -### Limitations - -There are two limitations to this rule when compared with ESLint's `no-unused-vars` rule, which are imposed by the fact that it directly uses TypeScript's implementation. - -1. This rule only works on files that TypeScript deems is a module (i.e. it has an `import` or an `export` statement). -2. The rule is significantly less configurable, as it cannot deviate too far from the base implementation. - -## Supported Nodes - -This rule supports checks on the following features: - -- Declarations: - - `var` / `const` / `let` - - `function` - - `class` - - `enum` - - `interface` - - `type` -- Class methods -- Class properties and parameter properties -- Function parameters -- Generic type parameters -- Import statements - -## Options - -```ts -type Options = { - ignoredNamesRegex?: string | boolean; - ignoreArgsIfArgsAfterAreUsed?: boolean; -}; - -const defaultOptions: Options = { - ignoredNamesRegex: '^_', - ignoreArgsIfArgsAfterAreUsed: false, -}; -``` - -### `ignoredNamesRegex` - -This option accepts a regex string to match names against. -Any matched names will be ignored and have no errors reported. -If you set it to false, it will never ignore any names. - -The default value is `'^_'` (i.e. matches any name prefixed with an underscore). - -Examples of valid code with `{ variables: { ignoredNamesRegex: '^_' } }`. - -```ts -const _unusedVar = 'unused'; -class _Unused { - private _unused = 1; - private _unusedMethod() {} -} -function _unusedFunction() {} -enum _UnusedEnum { - a = 1, -} -interface _UnusedInterface {} -type _UnusedType = {}; -``` - -**_NOTE:_** The TypeScript compiler automatically ignores imports, function arguments, type parameter declarations, and object destructuring variables prefixed with an underscore. -As this is hard-coded into the compiler, we cannot change this. - -Examples of valid code based on the unchangeable compiler settings - -```ts -import _UnusedDefault, { _UnusedNamed } from 'foo'; -export function foo(_unusedProp: string) {} -export class Foo<_UnusedGeneric> {} -const { prop: _unusedDestructure } = foo; -``` - -## `ignoreArgsIfArgsAfterAreUsed` - -When true, this option will ignore unused function arguments if the arguments proceeding arguments are used. - -Examples of invalid code with `{ ignoreArgsIfArgsAfterAreUsed: false }` - -```ts -function foo(unused: string, used: number) { - console.log(used); -} - -class Foo { - constructor(unused: string, public used: number) { - console.log(used); - } -} -``` - -Examples of valid code with `{ ignoreArgsIfArgsAfterAreUsed: true }` - -```ts -function foo(unused: string, used: number) { - console.log(used); -} - -class Foo { - constructor(unused: string, public used: number) { - console.log(used); - } -} -``` From c8ee43269faea4c04ec02eaa2b81a0aa6eec5d3e Mon Sep 17 00:00:00 2001 From: Jonas <13821543+sonallux@users.noreply.github.com> Date: Sun, 22 Aug 2021 04:21:54 +0200 Subject: [PATCH 410/473] feat: remove `TSParenthesizedType` (#3340) fixes #3136 Co-authored-by: Brad Zacher --- packages/ast-spec/src/ast-node-types.ts | 1 - .../src/type/TSParenthesizedType/spec.ts | 8 -- packages/ast-spec/src/type/spec.ts | 1 - packages/ast-spec/src/unions/Node.ts | 2 - packages/ast-spec/src/unions/TypeNode.ts | 2 - .../eslint-plugin/src/rules/array-type.ts | 22 ++--- .../src/rules/indent-new-do-not-use/index.ts | 1 - packages/eslint-plugin/src/rules/indent.ts | 1 - .../src/rules/no-extra-parens.ts | 4 +- .../eslint-plugin/src/rules/no-type-alias.ts | 3 - .../sort-type-union-intersection-members.ts | 9 +- .../tests/rules/indent/indent.test.ts | 23 ----- .../tests/rules/no-extra-parens.test.ts | 2 +- ...rt-type-union-intersection-members.test.ts | 2 +- .../experimental-utils/src/ts-eslint/Rule.ts | 1 - packages/typescript-estree/src/convert.ts | 5 +- .../src/ts-estree/estree-to-ts-node-types.ts | 1 - .../tests/ast-alignment/utils.ts | 10 +++ .../conditional-infer-nested.src.ts.shot | 51 ++++------- .../types/conditional-infer.src.ts.shot | 51 ++++------- .../types/parenthesized-type.src.ts.shot | 89 ++++++++----------- .../types/tuple-named-optional.src.ts.shot | 89 ++++++++----------- .../types/tuple-optional.src.ts.shot | 89 ++++++++----------- packages/visitor-keys/src/visitor-keys.ts | 1 - 24 files changed, 169 insertions(+), 299 deletions(-) delete mode 100644 packages/ast-spec/src/type/TSParenthesizedType/spec.ts diff --git a/packages/ast-spec/src/ast-node-types.ts b/packages/ast-spec/src/ast-node-types.ts index 90a18ba8d9ed..9a38d477acfc 100644 --- a/packages/ast-spec/src/ast-node-types.ts +++ b/packages/ast-spec/src/ast-node-types.ts @@ -135,7 +135,6 @@ export enum AST_NODE_TYPES { TSObjectKeyword = 'TSObjectKeyword', TSOptionalType = 'TSOptionalType', TSParameterProperty = 'TSParameterProperty', - TSParenthesizedType = 'TSParenthesizedType', TSPrivateKeyword = 'TSPrivateKeyword', TSPropertySignature = 'TSPropertySignature', TSProtectedKeyword = 'TSProtectedKeyword', diff --git a/packages/ast-spec/src/type/TSParenthesizedType/spec.ts b/packages/ast-spec/src/type/TSParenthesizedType/spec.ts deleted file mode 100644 index 2d20d5d2f2bc..000000000000 --- a/packages/ast-spec/src/type/TSParenthesizedType/spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { AST_NODE_TYPES } from '../../ast-node-types'; -import type { BaseNode } from '../../base/BaseNode'; -import type { TypeNode } from '../../unions/TypeNode'; - -export interface TSParenthesizedType extends BaseNode { - type: AST_NODE_TYPES.TSParenthesizedType; - typeAnnotation: TypeNode; -} diff --git a/packages/ast-spec/src/type/spec.ts b/packages/ast-spec/src/type/spec.ts index bbbea76cbd8e..d6209d260673 100644 --- a/packages/ast-spec/src/type/spec.ts +++ b/packages/ast-spec/src/type/spec.ts @@ -17,7 +17,6 @@ export * from './TSNullKeyword/spec'; export * from './TSNumberKeyword/spec'; export * from './TSObjectKeyword/spec'; export * from './TSOptionalType/spec'; -export * from './TSParenthesizedType/spec'; export * from './TSQualifiedName/spec'; export * from './TSRestType/spec'; export * from './TSStringKeyword/spec'; diff --git a/packages/ast-spec/src/unions/Node.ts b/packages/ast-spec/src/unions/Node.ts index f0802b3b6850..7fe5ced96dfc 100644 --- a/packages/ast-spec/src/unions/Node.ts +++ b/packages/ast-spec/src/unions/Node.ts @@ -142,7 +142,6 @@ import type { TSNullKeyword } from '../type/TSNullKeyword/spec'; import type { TSNumberKeyword } from '../type/TSNumberKeyword/spec'; import type { TSObjectKeyword } from '../type/TSObjectKeyword/spec'; import type { TSOptionalType } from '../type/TSOptionalType/spec'; -import type { TSParenthesizedType } from '../type/TSParenthesizedType/spec'; import type { TSQualifiedName } from '../type/TSQualifiedName/spec'; import type { TSRestType } from '../type/TSRestType/spec'; import type { TSStringKeyword } from '../type/TSStringKeyword/spec'; @@ -293,7 +292,6 @@ export type Node = | TSObjectKeyword | TSOptionalType | TSParameterProperty - | TSParenthesizedType | TSPrivateKeyword | TSPropertySignature | TSProtectedKeyword diff --git a/packages/ast-spec/src/unions/TypeNode.ts b/packages/ast-spec/src/unions/TypeNode.ts index c50630e6cd6a..55436b7a44d4 100644 --- a/packages/ast-spec/src/unions/TypeNode.ts +++ b/packages/ast-spec/src/unions/TypeNode.ts @@ -18,7 +18,6 @@ import type { TSNullKeyword } from '../type/TSNullKeyword/spec'; import type { TSNumberKeyword } from '../type/TSNumberKeyword/spec'; import type { TSObjectKeyword } from '../type/TSObjectKeyword/spec'; import type { TSOptionalType } from '../type/TSOptionalType/spec'; -import type { TSParenthesizedType } from '../type/TSParenthesizedType/spec'; import type { TSRestType } from '../type/TSRestType/spec'; import type { TSStringKeyword } from '../type/TSStringKeyword/spec'; import type { TSSymbolKeyword } from '../type/TSSymbolKeyword/spec'; @@ -56,7 +55,6 @@ export type TypeNode = | TSNumberKeyword | TSObjectKeyword | TSOptionalType - | TSParenthesizedType | TSRestType | TSStringKeyword | TSSymbolKeyword diff --git a/packages/eslint-plugin/src/rules/array-type.ts b/packages/eslint-plugin/src/rules/array-type.ts index 8c97729623a7..44de45f19de1 100644 --- a/packages/eslint-plugin/src/rules/array-type.ts +++ b/packages/eslint-plugin/src/rules/array-type.ts @@ -132,13 +132,8 @@ export default util.createRule({ * @param node the node to be evaluated. */ function getMessageType(node: TSESTree.Node): string { - if (node) { - if (node.type === AST_NODE_TYPES.TSParenthesizedType) { - return getMessageType(node.typeAnnotation); - } - if (isSimpleType(node)) { - return sourceCode.getText(node); - } + if (node && isSimpleType(node)) { + return sourceCode.getText(node); } return 'T'; } @@ -172,11 +167,7 @@ export default util.createRule({ type: getMessageType(node.elementType), }, fix(fixer) { - const typeNode = - node.elementType.type === AST_NODE_TYPES.TSParenthesizedType - ? node.elementType.typeAnnotation - : node.elementType; - + const typeNode = node.elementType; const arrayType = isReadonly ? 'ReadonlyArray' : 'Array'; return [ @@ -244,9 +235,12 @@ export default util.createRule({ } const type = typeParams[0]; - const typeParens = typeNeedsParentheses(type); + const typeParens = + !util.isParenthesized(type, sourceCode) && typeNeedsParentheses(type); const parentParens = - readonlyPrefix && node.parent?.type === AST_NODE_TYPES.TSArrayType; + readonlyPrefix && + node.parent?.type === AST_NODE_TYPES.TSArrayType && + !util.isParenthesized(node.parent.elementType, sourceCode); const start = `${parentParens ? '(' : ''}${readonlyPrefix}${ typeParens ? '(' : '' diff --git a/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts b/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts index 68edfe18dbb7..573423135962 100644 --- a/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts +++ b/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts @@ -161,7 +161,6 @@ const KNOWN_NODES = new Set([ AST_NODE_TYPES.TSModuleDeclaration, AST_NODE_TYPES.TSNonNullExpression, AST_NODE_TYPES.TSParameterProperty, - AST_NODE_TYPES.TSParenthesizedType, 'TSPlusToken', AST_NODE_TYPES.TSPropertySignature, AST_NODE_TYPES.TSQualifiedName, diff --git a/packages/eslint-plugin/src/rules/indent.ts b/packages/eslint-plugin/src/rules/indent.ts index a87772dd1f66..42b006177019 100644 --- a/packages/eslint-plugin/src/rules/indent.ts +++ b/packages/eslint-plugin/src/rules/indent.ts @@ -67,7 +67,6 @@ const KNOWN_NODES = new Set([ AST_NODE_TYPES.TSModuleDeclaration, AST_NODE_TYPES.TSNonNullExpression, AST_NODE_TYPES.TSParameterProperty, - AST_NODE_TYPES.TSParenthesizedType, 'TSPlusToken', AST_NODE_TYPES.TSPropertySignature, AST_NODE_TYPES.TSQualifiedName, diff --git a/packages/eslint-plugin/src/rules/no-extra-parens.ts b/packages/eslint-plugin/src/rules/no-extra-parens.ts index 6aa540a9be56..0eeeedf2c2fa 100644 --- a/packages/eslint-plugin/src/rules/no-extra-parens.ts +++ b/packages/eslint-plugin/src/rules/no-extra-parens.ts @@ -84,9 +84,7 @@ export default util.createRule({ if ( node.arguments.length === 1 && node.typeParameters?.params.some( - param => - param.type === AST_NODE_TYPES.TSParenthesizedType || - param.type === AST_NODE_TYPES.TSImportType, + param => param.type === AST_NODE_TYPES.TSImportType, ) ) { return rule({ diff --git a/packages/eslint-plugin/src/rules/no-type-alias.ts b/packages/eslint-plugin/src/rules/no-type-alias.ts index cf56745ca903..4e16216ea720 100644 --- a/packages/eslint-plugin/src/rules/no-type-alias.ts +++ b/packages/eslint-plugin/src/rules/no-type-alias.ts @@ -311,9 +311,6 @@ export default util.createRule({ return acc; }, []); } - if (node.type === AST_NODE_TYPES.TSParenthesizedType) { - return getTypes(node.typeAnnotation, compositionType); - } return [{ node, compositionType }]; } diff --git a/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts b/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts index cfcab2c0b2cb..e7f042162b8c 100644 --- a/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts +++ b/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts @@ -23,9 +23,6 @@ enum Group { function getGroup(node: TSESTree.TypeNode): Group { switch (node.type) { - case AST_NODE_TYPES.TSParenthesizedType: - return getGroup(node.typeAnnotation); - case AST_NODE_TYPES.TSConditionalType: return Group.conditional; @@ -91,6 +88,10 @@ function getGroup(node: TSESTree.TypeNode): Group { } } +function requiresParentheses(node: TSESTree.TypeNode): boolean { + return node.type === AST_NODE_TYPES.TSFunctionType; +} + export type Options = [ { checkIntersections?: boolean; @@ -212,7 +213,7 @@ export default util.createRule({ const fix: TSESLint.ReportFixFunction = fixer => { const sorted = expectedOrder - .map(t => t.text) + .map(t => (requiresParentheses(t.node) ? `(${t.text})` : t.text)) .join( node.type === AST_NODE_TYPES.TSIntersectionType ? ' & ' : ' | ', ); diff --git a/packages/eslint-plugin/tests/rules/indent/indent.test.ts b/packages/eslint-plugin/tests/rules/indent/indent.test.ts index 8296bf19520c..f5c87316c171 100644 --- a/packages/eslint-plugin/tests/rules/indent/indent.test.ts +++ b/packages/eslint-plugin/tests/rules/indent/indent.test.ts @@ -451,29 +451,6 @@ class Foo { `, ], }, - { - node: AST_NODE_TYPES.TSParenthesizedType, - code: [ - ` -const x: Array<( - | { - __typename: "Foo", - } - | { - __typename: "Baz", - } - | ( - | { - __typename: "Baz", - } - | { - __typename: "Buzz", - } - ) -)>; - `, - ], - }, // TSPlusToken - tested in TSMappedType { node: AST_NODE_TYPES.TSPropertySignature, diff --git a/packages/eslint-plugin/tests/rules/no-extra-parens.test.ts b/packages/eslint-plugin/tests/rules/no-extra-parens.test.ts index d0868e8293de..5f5dc37896fa 100644 --- a/packages/eslint-plugin/tests/rules/no-extra-parens.test.ts +++ b/packages/eslint-plugin/tests/rules/no-extra-parens.test.ts @@ -28,7 +28,7 @@ for (a in b, c); for (a in b); a(1); new a(1); -a<(A)>(1); +a(1); `, }), ...batchedSingleLineTests({ diff --git a/packages/eslint-plugin/tests/rules/sort-type-union-intersection-members.test.ts b/packages/eslint-plugin/tests/rules/sort-type-union-intersection-members.test.ts index 7dda416d6b3d..a0cf2d71dd59 100644 --- a/packages/eslint-plugin/tests/rules/sort-type-union-intersection-members.test.ts +++ b/packages/eslint-plugin/tests/rules/sort-type-union-intersection-members.test.ts @@ -127,7 +127,7 @@ const invalid = ( }, { code: noFormat`type T = (B) ${operator} (A);`, - output: noFormat`type T = (A) ${operator} (B);`, + output: noFormat`type T = A ${operator} B;`, errors: [ { messageId: 'notSortedNamed', diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index 76e8deb24082..e17de9f6eba3 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -399,7 +399,6 @@ interface RuleListener { TSObjectKeyword?: RuleFunction; TSOptionalType?: RuleFunction; TSParameterProperty?: RuleFunction; - TSParenthesizedType?: RuleFunction; TSPrivateKeyword?: RuleFunction; TSPropertySignature?: RuleFunction; TSProtectedKeyword?: RuleFunction; diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 86ade612d16a..3f51f9af0d9b 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -2698,10 +2698,7 @@ export class Converter { // TypeScript specific types case SyntaxKind.ParenthesizedType: { - return this.createNode(node, { - type: AST_NODE_TYPES.TSParenthesizedType, - typeAnnotation: this.convertType(node.type), - }); + return this.convertType(node.type); } case SyntaxKind.UnionType: { return this.createNode(node, { diff --git a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts index d5daed093324..65951a856df6 100644 --- a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts +++ b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts @@ -192,7 +192,6 @@ export interface EstreeToTsNodeTypes { [AST_NODE_TYPES.TSNonNullExpression]: ts.NonNullExpression; [AST_NODE_TYPES.TSOptionalType]: ts.OptionalTypeNode; [AST_NODE_TYPES.TSParameterProperty]: ts.ParameterDeclaration; - [AST_NODE_TYPES.TSParenthesizedType]: ts.ParenthesizedTypeNode; [AST_NODE_TYPES.TSPropertySignature]: ts.PropertySignature; [AST_NODE_TYPES.TSQualifiedName]: ts.QualifiedName; [AST_NODE_TYPES.TSRestType]: diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index 3cecac3f09f6..d7dae6bcafe0 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -250,6 +250,16 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any { } } }, + /** + * Remove TSParenthesizedType from babel AST. Babel 8 will stop generating the TSParenthesizedType. + * Once we use babel 8, this can be removed. + * @see https://github.com/babel/babel/pull/12608 + */ + TSParenthesizedType(node: any) { + const { typeAnnotation } = node; + Object.keys(node).forEach(key => delete node[key]); + Object.assign(node, typeAnnotation); + }, }, ); } diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-nested.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-nested.src.ts.shot index 3c06676714fb..50f8f0f7ff82 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-nested.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer-nested.src.ts.shot @@ -78,38 +78,33 @@ Object { "elementType": Object { "loc": Object { "end": Object { - "column": 21, + "column": 20, "line": 2, }, "start": Object { - "column": 12, + "column": 13, "line": 2, }, }, "range": Array [ - 31, - 40, + 32, + 39, ], - "type": "TSParenthesizedType", - "typeAnnotation": Object { + "type": "TSInferType", + "typeParameter": Object { + "constraint": undefined, + "default": undefined, "loc": Object { "end": Object { "column": 20, "line": 2, }, "start": Object { - "column": 13, + "column": 19, "line": 2, }, }, - "range": Array [ - 32, - 39, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": undefined, - "default": undefined, + "name": Object { "loc": Object { "end": Object { "column": 20, @@ -120,30 +115,18 @@ Object { "line": 2, }, }, - "name": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "name": "U", - "range": Array [ - 38, - 39, - ], - "type": "Identifier", - }, + "name": "U", "range": Array [ 38, 39, ], - "type": "TSTypeParameter", + "type": "Identifier", }, + "range": Array [ + 38, + 39, + ], + "type": "TSTypeParameter", }, }, "loc": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer.src.ts.shot index 9054692bd03d..d55b6ac728e0 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/types/conditional-infer.src.ts.shot @@ -78,38 +78,33 @@ Object { "elementType": Object { "loc": Object { "end": Object { - "column": 37, + "column": 36, "line": 1, }, "start": Object { - "column": 28, + "column": 29, "line": 1, }, }, "range": Array [ - 28, - 37, + 29, + 36, ], - "type": "TSParenthesizedType", - "typeAnnotation": Object { + "type": "TSInferType", + "typeParameter": Object { + "constraint": undefined, + "default": undefined, "loc": Object { "end": Object { "column": 36, "line": 1, }, "start": Object { - "column": 29, + "column": 35, "line": 1, }, }, - "range": Array [ - 29, - 36, - ], - "type": "TSInferType", - "typeParameter": Object { - "constraint": undefined, - "default": undefined, + "name": Object { "loc": Object { "end": Object { "column": 36, @@ -120,30 +115,18 @@ Object { "line": 1, }, }, - "name": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "name": "U", - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - }, + "name": "U", "range": Array [ 35, 36, ], - "type": "TSTypeParameter", + "type": "Identifier", }, + "range": Array [ + 35, + 36, + ], + "type": "TSTypeParameter", }, }, "loc": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/parenthesized-type.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/parenthesized-type.src.ts.shot index 7aa5ec4571d3..e029fb995167 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/types/parenthesized-type.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/types/parenthesized-type.src.ts.shot @@ -40,72 +40,55 @@ Object { "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 28, + "column": 27, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, - 28, + 12, + 27, ], - "type": "TSParenthesizedType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, }, + "range": Array [ + 12, + 18, + ], + "type": "TSStringKeyword", }, - "range": Array [ - 12, - 27, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, }, - "range": Array [ - 12, - 18, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, + "start": Object { + "column": 21, + "line": 1, }, - "range": Array [ - 21, - 27, - ], - "type": "TSNumberKeyword", }, - ], - }, + "range": Array [ + 21, + 27, + ], + "type": "TSNumberKeyword", + }, + ], }, }, ], diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-optional.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-optional.src.ts.shot index f07915f0394f..87f7351cba2a 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-optional.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/types/tuple-named-optional.src.ts.shot @@ -151,72 +151,55 @@ Object { "elementType": Object { "loc": Object { "end": Object { - "column": 52, + "column": 51, "line": 1, }, "start": Object { - "column": 35, + "column": 36, "line": 1, }, }, "range": Array [ - 35, - 52, + 36, + 51, ], - "type": "TSParenthesizedType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, }, + "range": Array [ + 36, + 42, + ], + "type": "TSStringKeyword", }, - "range": Array [ - 36, - 51, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, + Object { + "loc": Object { + "end": Object { + "column": 51, + "line": 1, }, - "range": Array [ - 36, - 42, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, + "start": Object { + "column": 45, + "line": 1, }, - "range": Array [ - 45, - 51, - ], - "type": "TSNumberKeyword", }, - ], - }, + "range": Array [ + 45, + 51, + ], + "type": "TSNumberKeyword", + }, + ], }, "label": Object { "loc": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-optional.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/tuple-optional.src.ts.shot index 55be898e6a54..b359d09d8895 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/types/tuple-optional.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/types/tuple-optional.src.ts.shot @@ -111,72 +111,55 @@ Object { "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 42, + "column": 41, "line": 1, }, "start": Object { - "column": 25, + "column": 26, "line": 1, }, }, "range": Array [ - 25, - 42, + 26, + 41, ], - "type": "TSParenthesizedType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, }, + "range": Array [ + 26, + 32, + ], + "type": "TSStringKeyword", }, - "range": Array [ - 26, - 41, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, }, - "range": Array [ - 26, - 32, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, + "start": Object { + "column": 35, + "line": 1, }, - "range": Array [ - 35, - 41, - ], - "type": "TSNumberKeyword", }, - ], - }, + "range": Array [ + 35, + 41, + ], + "type": "TSNumberKeyword", + }, + ], }, }, ], diff --git a/packages/visitor-keys/src/visitor-keys.ts b/packages/visitor-keys/src/visitor-keys.ts index efad2828a376..036bfe5763e3 100644 --- a/packages/visitor-keys/src/visitor-keys.ts +++ b/packages/visitor-keys/src/visitor-keys.ts @@ -115,7 +115,6 @@ const additionalKeys: AdditionalKeys = { TSObjectKeyword: [], TSOptionalType: ['typeAnnotation'], TSParameterProperty: ['decorators', 'parameter'], - TSParenthesizedType: ['typeAnnotation'], TSPrivateKeyword: [], TSPropertySignature: ['typeAnnotation', 'key', 'initializer'], TSProtectedKeyword: [], From 5b84b98fb3cf68d944b7d4e970f39f4e88f0b2d5 Mon Sep 17 00:00:00 2001 From: Armano Date: Sun, 22 Aug 2021 04:22:25 +0200 Subject: [PATCH 411/473] feat(typescript-estree): remove legacy `useJSXTextNode` option (#3109) --- packages/typescript-estree/README.md | 9 ------ .../typescript-estree/src/ast-converter.ts | 1 - packages/typescript-estree/src/convert.ts | 28 ++++--------------- .../typescript-estree/src/parser-options.ts | 9 ------ packages/typescript-estree/src/parser.ts | 12 -------- .../src/ts-estree/estree-to-ts-node-types.ts | 1 - .../tests/ast-alignment/parse.ts | 1 - .../tests/lib/convert.test.ts | 11 -------- .../tests/lib/semanticInfo.test.ts | 1 - .../jsx-attr-and-text-with-url.src.js.shot | 2 +- .../comments/jsx-block-comment.src.js.shot | 4 +-- ...sx-generic-with-comment-in-tag.src.js.shot | 18 ++++++------ .../comments/jsx-tag-comments.src.js.shot | 2 +- ...ext-with-multiline-non-comment.src.js.shot | 2 +- .../comments/jsx-text-with-url.src.js.shot | 10 +++---- .../jsx-with-greather-than.src.js.shot | 2 +- .../comments/jsx-with-operators.src.js.shot | 2 +- .../self-closing-tag-inside-tag.src.js.shot | 4 +-- .../test-content.src.js.shot | 2 +- .../snapshots/jsx/attributes.src.js.shot | 2 +- .../jsx/element-keyword-name.src.js.shot | 8 +++--- ...embedded-invalid-js-identifier.src.js.shot | 2 +- .../jsx/escape-patterns-unknown.src.js.shot | 6 ++-- .../jsx/escape-patterns-valid.src.js.shot | 2 +- .../jsx/escape-patters-multi.src.js.shot | 2 +- .../jsx/multiple-blank-spaces.src.js.shot | 2 +- ...d-attribute-and-value-inserted.src.js.shot | 4 +-- .../self-closing-tag-inside-tag.src.js.shot | 4 +-- ...ag-names-with-multi-dots-multi.src.js.shot | 4 +-- .../snapshots/jsx/test-content.src.js.shot | 2 +- .../tsx/react-typed-props.src.tsx.shot | 4 +-- 31 files changed, 51 insertions(+), 112 deletions(-) diff --git a/packages/typescript-estree/README.md b/packages/typescript-estree/README.md index 605836b3c692..25eb1e928294 100644 --- a/packages/typescript-estree/README.md +++ b/packages/typescript-estree/README.md @@ -101,14 +101,6 @@ interface ParseOptions { * Set to true to create a top-level array containing all tokens from the file. */ tokens?: boolean; - - /* - * The JSX AST changed the node type for string literals - * inside a JSX Element from `Literal` to `JSXText`. - * When value is `true`, these nodes will be parsed as type `JSXText`. - * When value is `false`, these nodes will be parsed as type `Literal`. - */ - useJSXTextNode?: boolean; } const PARSE_DEFAULT_OPTIONS: ParseOptions = { @@ -120,7 +112,6 @@ const PARSE_DEFAULT_OPTIONS: ParseOptions = { loggerFn: undefined, range: false, tokens: false, - useJSXTextNode: false, }; declare function parse( diff --git a/packages/typescript-estree/src/ast-converter.ts b/packages/typescript-estree/src/ast-converter.ts index 33c8f9fbc5e5..465a0b955c47 100644 --- a/packages/typescript-estree/src/ast-converter.ts +++ b/packages/typescript-estree/src/ast-converter.ts @@ -25,7 +25,6 @@ export function astConverter( */ const instance = new Converter(ast, { errorOnUnknownASTType: extra.errorOnUnknownASTType || false, - useJSXTextNode: extra.useJSXTextNode || false, shouldPreserveNodeMaps, }); diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 3f51f9af0d9b..be13f690458c 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -36,7 +36,6 @@ const SyntaxKind = ts.SyntaxKind; interface ConverterOptions { errorOnUnknownASTType: boolean; - useJSXTextNode: boolean; shouldPreserveNodeMaps: boolean; } @@ -2250,32 +2249,17 @@ export class Converter { }); } - /** - * The JSX AST changed the node type for string literals - * inside a JSX Element from `Literal` to `JSXText`. We - * provide a flag to support both types until `Literal` - * node type is deprecated in ESLint v5. - */ case SyntaxKind.JsxText: { const start = node.getFullStart(); const end = node.getEnd(); const text = this.ast.text.slice(start, end); - if (this.options.useJSXTextNode) { - return this.createNode(node, { - type: AST_NODE_TYPES.JSXText, - value: unescapeStringLiteralText(text), - raw: text, - range: [start, end], - }); - } else { - return this.createNode(node, { - type: AST_NODE_TYPES.Literal, - value: unescapeStringLiteralText(text), - raw: text, - range: [start, end], - }); - } + return this.createNode(node, { + type: AST_NODE_TYPES.JSXText, + value: unescapeStringLiteralText(text), + raw: text, + range: [start, end], + }); } case SyntaxKind.JsxSpreadAttribute: diff --git a/packages/typescript-estree/src/parser-options.ts b/packages/typescript-estree/src/parser-options.ts index 55f47ef9041d..fdd71cc55b55 100644 --- a/packages/typescript-estree/src/parser-options.ts +++ b/packages/typescript-estree/src/parser-options.ts @@ -27,7 +27,6 @@ export interface Extra { strict: boolean; tokens: null | TSESTree.Token[]; tsconfigRootDir: string; - useJSXTextNode: boolean; moduleResolver: string; } @@ -100,14 +99,6 @@ interface ParseOptions { * Set to true to create a top-level array containing all tokens from the file. */ tokens?: boolean; - - /* - * The JSX AST changed the node type for string literals - * inside a JSX Element from `Literal` to `JSXText`. - * When value is `true`, these nodes will be parsed as type `JSXText`. - * When value is `false`, these nodes will be parsed as type `Literal`. - */ - useJSXTextNode?: boolean; } interface ParseAndGenerateServicesOptions extends ParseOptions { diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index 6cb3a2d6c27b..9a9dc04a771e 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -129,7 +129,6 @@ function resetExtra(): void { strict: false, tokens: null, tsconfigRootDir: process.cwd(), - useJSXTextNode: false, /** * Unless we can reliably infer otherwise, we default to assuming that this run could be part * of a long-running session (e.g. in an IDE) and watch programs will therefore be required @@ -251,17 +250,6 @@ function applyParserOptionsToExtra(options: TSESTreeOptions): void { extra.filePath = getFileName(extra); } - /** - * The JSX AST changed the node type for string literals - * inside a JSX Element from `Literal` to `JSXText`. - * - * When value is `true`, these nodes will be parsed as type `JSXText`. - * When value is `false`, these nodes will be parsed as type `Literal`. - */ - if (typeof options.useJSXTextNode === 'boolean' && options.useJSXTextNode) { - extra.useJSXTextNode = true; - } - /** * Allow the user to cause the parser to error if it encounters an unknown AST Node Type * (used in testing) diff --git a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts index 65951a856df6..8faaef068d54 100644 --- a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts +++ b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts @@ -100,7 +100,6 @@ export interface EstreeToTsNodeTypes { | ts.StringLiteral | ts.NumericLiteral | ts.RegularExpressionLiteral - | ts.JsxText | ts.NullLiteral | ts.BooleanLiteral | ts.BigIntLiteral; diff --git a/packages/typescript-estree/tests/ast-alignment/parse.ts b/packages/typescript-estree/tests/ast-alignment/parse.ts index 484c8ef18d1e..0cf1898a321e 100644 --- a/packages/typescript-estree/tests/ast-alignment/parse.ts +++ b/packages/typescript-estree/tests/ast-alignment/parse.ts @@ -50,7 +50,6 @@ function parseWithTypeScriptESTree(text: string, jsx = true): parser.AST { range: true, tokens: false, comment: false, - useJSXTextNode: true, errorOnUnknownASTType: true, /** * Babel will always throw on these types of issues, so we enable diff --git a/packages/typescript-estree/tests/lib/convert.test.ts b/packages/typescript-estree/tests/lib/convert.test.ts index b26390b7f750..74ce08aa9673 100644 --- a/packages/typescript-estree/tests/lib/convert.test.ts +++ b/packages/typescript-estree/tests/lib/convert.test.ts @@ -27,7 +27,6 @@ describe('convert', () => { const instance = new Converter(ast, { errorOnUnknownASTType: false, - useJSXTextNode: false, shouldPreserveNodeMaps: false, }); expect(instance.convertProgram()).toMatchSnapshot(); @@ -38,7 +37,6 @@ describe('convert', () => { const instance = new Converter(ast, { errorOnUnknownASTType: false, - useJSXTextNode: false, shouldPreserveNodeMaps: false, }) as any; @@ -50,7 +48,6 @@ describe('convert', () => { const instance = new Converter(ast, { errorOnUnknownASTType: false, - useJSXTextNode: false, shouldPreserveNodeMaps: false, }) as any; @@ -62,7 +59,6 @@ describe('convert', () => { const instance = new Converter(ast, { errorOnUnknownASTType: false, - useJSXTextNode: false, shouldPreserveNodeMaps: false, }) as any; @@ -76,7 +72,6 @@ describe('convert', () => { const instance = new Converter(ast, { errorOnUnknownASTType: false, - useJSXTextNode: false, shouldPreserveNodeMaps: false, }) as any; expect(instance.deeplyCopy(ast)).toMatchSnapshot(); @@ -87,7 +82,6 @@ describe('convert', () => { const instance = new Converter(ast, { errorOnUnknownASTType: true, - useJSXTextNode: false, shouldPreserveNodeMaps: false, }) as any; @@ -106,7 +100,6 @@ describe('convert', () => { const instance = new Converter(ast, { errorOnUnknownASTType: false, - useJSXTextNode: false, shouldPreserveNodeMaps: true, }); instance.convertProgram(); @@ -140,7 +133,6 @@ describe('convert', () => { const instance = new Converter(ast, { errorOnUnknownASTType: false, - useJSXTextNode: false, shouldPreserveNodeMaps: true, }); instance.convertProgram(); @@ -173,7 +165,6 @@ describe('convert', () => { const instance = new Converter(ast, { errorOnUnknownASTType: false, - useJSXTextNode: false, shouldPreserveNodeMaps: true, }); const program = instance.convertProgram(); @@ -205,7 +196,6 @@ describe('convert', () => { const ast = convertCode(''); const instance = new Converter(ast, { errorOnUnknownASTType: false, - useJSXTextNode: false, shouldPreserveNodeMaps: true, }); @@ -250,7 +240,6 @@ describe('convert', () => { const instance = new Converter(ast, { errorOnUnknownASTType: false, - useJSXTextNode: false, shouldPreserveNodeMaps: false, }); expect(() => instance.convertProgram()).toThrow( diff --git a/packages/typescript-estree/tests/lib/semanticInfo.test.ts b/packages/typescript-estree/tests/lib/semanticInfo.test.ts index d099342c72e7..ccce1f6e4c8d 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo.test.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo.test.ts @@ -28,7 +28,6 @@ function createOptions(fileName: string): TSESTreeOptions & { cwd?: string } { tokens: true, comment: true, jsx: false, - useJSXTextNode: false, errorOnUnknownASTType: true, filePath: fileName, tsconfigRootDir: path.join(process.cwd(), FIXTURES_DIR), diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-attr-and-text-with-url.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-attr-and-text-with-url.src.js.shot index 23e257d45f1d..0313f535de1d 100644 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-attr-and-text-with-url.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/comments/jsx-attr-and-text-with-url.src.js.shot @@ -42,7 +42,7 @@ Object { 61, ], "raw": "http://example.com", - "type": "Literal", + "type": "JSXText", "value": "http://example.com", }, ], diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-block-comment.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-block-comment.src.js.shot index f4155967a745..851f8980ab51 100644 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-block-comment.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/comments/jsx-block-comment.src.js.shot @@ -48,7 +48,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -103,7 +103,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-generic-with-comment-in-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-generic-with-comment-in-tag.src.js.shot index 01c1a39e231f..cbf278f9ee7b 100644 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-generic-with-comment-in-tag.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/comments/jsx-generic-with-comment-in-tag.src.js.shot @@ -43,7 +43,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -190,7 +190,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -374,7 +374,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -558,7 +558,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -779,7 +779,7 @@ Object { "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", @@ -927,7 +927,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -1111,7 +1111,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -1295,7 +1295,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -1515,7 +1515,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-tag-comments.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-tag-comments.src.js.shot index e14584d71e3f..177f12a16625 100644 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-tag-comments.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/comments/jsx-tag-comments.src.js.shot @@ -48,7 +48,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-multiline-non-comment.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-multiline-non-comment.src.js.shot index dce1129ff0f1..34ae0afe27e7 100644 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-multiline-non-comment.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-multiline-non-comment.src.js.shot @@ -51,7 +51,7 @@ Object { * test */ ", - "type": "Literal", + "type": "JSXText", "value": " /** * test diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-url.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-url.src.js.shot index c0b9bcc60388..b51fc4edf9ce 100644 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-url.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/comments/jsx-text-with-url.src.js.shot @@ -42,7 +42,7 @@ Object { 37, ], "raw": "http://example.com", - "type": "Literal", + "type": "JSXText", "value": "http://example.com", }, ], @@ -208,7 +208,7 @@ Object { 81, ], "raw": "http://example.com", - "type": "Literal", + "type": "JSXText", "value": "http://example.com", }, ], @@ -392,7 +392,7 @@ Object { 130, ], "raw": "http://example.com", - "type": "Literal", + "type": "JSXText", "value": "http://example.com", }, ], @@ -649,7 +649,7 @@ Object { 190, ], "raw": "http://example.com", - "type": "Literal", + "type": "JSXText", "value": "http://example.com", }, ], @@ -849,7 +849,7 @@ Object { 238, ], "raw": "http://example.com", - "type": "Literal", + "type": "JSXText", "value": "http://example.com", }, ], diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-with-greather-than.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-with-greather-than.src.js.shot index b2ccc72ae26e..308c14521e5e 100644 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-with-greather-than.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/comments/jsx-with-greather-than.src.js.shot @@ -157,7 +157,7 @@ Object { 61, ], "raw": "//", - "type": "Literal", + "type": "JSXText", "value": "//", }, ], diff --git a/packages/typescript-estree/tests/snapshots/comments/jsx-with-operators.src.js.shot b/packages/typescript-estree/tests/snapshots/comments/jsx-with-operators.src.js.shot index 623f6422eedb..2d5c27d4fe04 100644 --- a/packages/typescript-estree/tests/snapshots/comments/jsx-with-operators.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/comments/jsx-with-operators.src.js.shot @@ -157,7 +157,7 @@ Object { 61, ], "raw": "//", - "type": "Literal", + "type": "JSXText", "value": "//", }, ], diff --git a/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js.shot index f19079709bf4..2e6300509975 100644 --- a/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js.shot @@ -23,7 +23,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -101,7 +101,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, diff --git a/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/test-content.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/test-content.src.js.shot index 7a64b57e9dac..326c3194f956 100644 --- a/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/test-content.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx-useJSXTextNode/test-content.src.js.shot @@ -22,7 +22,7 @@ Object { 18, ], "raw": "@test content", - "type": "Literal", + "type": "JSXText", "value": "@test content", }, ], diff --git a/packages/typescript-estree/tests/snapshots/jsx/attributes.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/attributes.src.js.shot index 1c6978110358..0c7c49b765a7 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/attributes.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/attributes.src.js.shot @@ -22,7 +22,7 @@ Object { 39, ], "raw": "test", - "type": "Literal", + "type": "JSXText", "value": "test", }, ], diff --git a/packages/typescript-estree/tests/snapshots/jsx/element-keyword-name.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/element-keyword-name.src.js.shot index 9a3ca8aae026..a1526ac3de67 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/element-keyword-name.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/element-keyword-name.src.js.shot @@ -23,7 +23,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -101,7 +101,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -179,7 +179,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -257,7 +257,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, diff --git a/packages/typescript-estree/tests/snapshots/jsx/embedded-invalid-js-identifier.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/embedded-invalid-js-identifier.src.js.shot index 40d5fc4812c2..e67cf324a956 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/embedded-invalid-js-identifier.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/embedded-invalid-js-identifier.src.js.shot @@ -79,7 +79,7 @@ Object { 35, ], "raw": "7x invalid-js-identifier", - "type": "Literal", + "type": "JSXText", "value": "7x invalid-js-identifier", }, ], diff --git a/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-unknown.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-unknown.src.js.shot index 25cd76ed83d8..141520e983f4 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-unknown.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-unknown.src.js.shot @@ -409,7 +409,7 @@ Object { 70, ], "raw": "&abc;", - "type": "Literal", + "type": "JSXText", "value": "&abc;", }, ], @@ -537,7 +537,7 @@ Object { 92, ], "raw": "¬anentity;", - "type": "Literal", + "type": "JSXText", "value": "¬anentity;", }, ], @@ -665,7 +665,7 @@ Object { 105, ], "raw": "&#x;", - "type": "Literal", + "type": "JSXText", "value": "&#x;", }, ], diff --git a/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-valid.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-valid.src.js.shot index 2cc38d57adbe..1856270c740c 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-valid.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/escape-patterns-valid.src.js.shot @@ -24,7 +24,7 @@ Object { "raw": "   ", - "type": "Literal", + "type": "JSXText", "value": "   ", diff --git a/packages/typescript-estree/tests/snapshots/jsx/escape-patters-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/escape-patters-multi.src.js.shot index d3cff5df9bf9..cc3c38b714cd 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/escape-patters-multi.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/escape-patters-multi.src.js.shot @@ -22,7 +22,7 @@ Object { 44, ], "raw": "  test", - "type": "Literal", + "type": "JSXText", "value": "  test", }, ], diff --git a/packages/typescript-estree/tests/snapshots/jsx/multiple-blank-spaces.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/multiple-blank-spaces.src.js.shot index 9e5cd8c899c9..17fa0430b73c 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/multiple-blank-spaces.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/multiple-blank-spaces.src.js.shot @@ -22,7 +22,7 @@ Object { 7, ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, ], diff --git a/packages/typescript-estree/tests/snapshots/jsx/namespaced-attribute-and-value-inserted.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/namespaced-attribute-and-value-inserted.src.js.shot index 647aa3f85b5e..cfb3f96c345d 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/namespaced-attribute-and-value-inserted.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/namespaced-attribute-and-value-inserted.src.js.shot @@ -22,7 +22,7 @@ Object { 16, ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, Object { @@ -76,7 +76,7 @@ Object { 24, ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, Object { diff --git a/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag-inside-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag-inside-tag.src.js.shot index 373468554f63..cfb82c9a414f 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag-inside-tag.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag-inside-tag.src.js.shot @@ -23,7 +23,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -101,7 +101,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, diff --git a/packages/typescript-estree/tests/snapshots/jsx/tag-names-with-multi-dots-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/tag-names-with-multi-dots-multi.src.js.shot index 9edf414fa882..7ef41034fc55 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/tag-names-with-multi-dots-multi.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/tag-names-with-multi-dots-multi.src.js.shot @@ -23,7 +23,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -345,7 +345,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, diff --git a/packages/typescript-estree/tests/snapshots/jsx/test-content.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/test-content.src.js.shot index b400dfee5ad0..4df5e2ed08b0 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/test-content.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/test-content.src.js.shot @@ -22,7 +22,7 @@ Object { 18, ], "raw": "@test content", - "type": "Literal", + "type": "JSXText", "value": "@test content", }, ], diff --git a/packages/typescript-estree/tests/snapshots/tsx/react-typed-props.src.tsx.shot b/packages/typescript-estree/tests/snapshots/tsx/react-typed-props.src.tsx.shot index 52271fbad013..c526bcc9da4a 100644 --- a/packages/typescript-estree/tests/snapshots/tsx/react-typed-props.src.tsx.shot +++ b/packages/typescript-estree/tests/snapshots/tsx/react-typed-props.src.tsx.shot @@ -231,7 +231,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, @@ -324,7 +324,7 @@ Object { ], "raw": " ", - "type": "Literal", + "type": "JSXText", "value": " ", }, From cf4724b615f9eb081cbdab89e47db1af5df7e3e9 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Tue, 24 Aug 2021 10:19:33 -0700 Subject: [PATCH 412/473] chore: add auto-canary release for v5 (#3776) * chore: add auto-canary release for v5 * chore: fix name --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ce54875bc2e..09e5a49fc8db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - v5 pull_request: branches: - '**' @@ -366,3 +367,50 @@ jobs: run: npx lerna publish --loglevel=verbose --canary --exact --force-publish --yes env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + publish_canary_version_v5: + name: Publish the latest code as a canary version + runs-on: ubuntu-latest + needs: [typecheck, test_on_primary_node_version, unit_tests_on_other_node_versions, linting_and_style, integration_tests] + if: github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/v5' + steps: + - uses: actions/checkout@v2 + # Fetch all history for all tags and branches in this job because lerna needs it + - run: | + git fetch --prune --unshallow + + - name: Use Node.js ${{ env.PRIMARY_NODE_VERSION }} + uses: actions/setup-node@v1 + with: + node-version: ${{ env.PRIMARY_NODE_VERSION }} + registry-url: https://registry.npmjs.org/ + + - 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 + yarn check-clean-workspace-after-install + + - name: Patch Dependencies + run: | + yarn patch-package + + - name: Build + run: | + yarn build + + - name: Publish all packages to npm + run: npx lerna publish premajor --loglevel=verbose --canary --exact --force-publish --yes --dist-tag rc-v5 + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 71c93706e55f5f92a1285102b93c6ab1950c6df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sat, 28 Aug 2021 23:57:54 +0200 Subject: [PATCH 413/473] feat: remove `meta.docs.category` from rules (#3800) --- .../src/rules/no-poorly-typed-ts-props.ts | 1 - .../src/rules/no-typescript-default-import.ts | 1 - .../src/rules/no-typescript-estree-import.ts | 1 - .../src/rules/plugin-test-formatting.ts | 1 - .../src/rules/prefer-ast-types-enum.ts | 1 - .../eslint-plugin-tslint/src/rules/config.ts | 2 -- .../src/rules/adjacent-overload-signatures.ts | 1 - .../eslint-plugin/src/rules/array-type.ts | 1 - .../eslint-plugin/src/rules/await-thenable.ts | 1 - .../eslint-plugin/src/rules/ban-ts-comment.ts | 1 - .../src/rules/ban-tslint-comment.ts | 1 - packages/eslint-plugin/src/rules/ban-types.ts | 1 - .../eslint-plugin/src/rules/brace-style.ts | 1 - .../src/rules/class-literal-property-style.ts | 1 - .../eslint-plugin/src/rules/comma-dangle.ts | 1 - .../eslint-plugin/src/rules/comma-spacing.ts | 1 - .../rules/consistent-indexed-object-style.ts | 1 - .../src/rules/consistent-type-assertions.ts | 1 - .../src/rules/consistent-type-definitions.ts | 1 - .../src/rules/consistent-type-imports.ts | 1 - .../src/rules/default-param-last.ts | 1 - .../eslint-plugin/src/rules/dot-notation.ts | 1 - .../rules/explicit-function-return-type.ts | 1 - .../rules/explicit-member-accessibility.ts | 1 - .../rules/explicit-module-boundary-types.ts | 1 - .../src/rules/func-call-spacing.ts | 1 - .../src/rules/indent-new-do-not-use/index.ts | 1 - packages/eslint-plugin/src/rules/indent.ts | 1 - .../src/rules/init-declarations.ts | 1 - .../src/rules/keyword-spacing.ts | 1 - .../src/rules/lines-between-class-members.ts | 1 - .../src/rules/member-delimiter-style.ts | 1 - .../src/rules/member-ordering.ts | 1 - .../src/rules/method-signature-style.ts | 1 - .../src/rules/naming-convention.ts | 1 - .../src/rules/no-array-constructor.ts | 1 - .../src/rules/no-base-to-string.ts | 1 - .../rules/no-confusing-non-null-assertion.ts | 1 - .../src/rules/no-confusing-void-expression.ts | 1 - .../src/rules/no-dupe-class-members.ts | 1 - .../src/rules/no-duplicate-imports.ts | 1 - .../src/rules/no-dynamic-delete.ts | 1 - .../src/rules/no-empty-function.ts | 1 - .../src/rules/no-empty-interface.ts | 1 - .../src/rules/no-explicit-any.ts | 1 - .../src/rules/no-extra-non-null-assertion.ts | 1 - .../src/rules/no-extra-parens.ts | 1 - .../eslint-plugin/src/rules/no-extra-semi.ts | 1 - .../src/rules/no-extraneous-class.ts | 1 - .../src/rules/no-floating-promises.ts | 1 - .../src/rules/no-for-in-array.ts | 1 - .../src/rules/no-implicit-any-catch.ts | 1 - .../src/rules/no-implied-eval.ts | 1 - .../src/rules/no-inferrable-types.ts | 1 - .../src/rules/no-invalid-this.ts | 1 - .../src/rules/no-invalid-void-type.ts | 1 - .../eslint-plugin/src/rules/no-loop-func.ts | 1 - .../src/rules/no-loss-of-precision.ts | 1 - .../src/rules/no-magic-numbers.ts | 1 - .../eslint-plugin/src/rules/no-misused-new.ts | 1 - .../src/rules/no-misused-promises.ts | 1 - .../eslint-plugin/src/rules/no-namespace.ts | 1 - .../no-non-null-asserted-optional-chain.ts | 1 - .../src/rules/no-non-null-assertion.ts | 1 - .../src/rules/no-parameter-properties.ts | 1 - .../eslint-plugin/src/rules/no-redeclare.ts | 1 - .../src/rules/no-require-imports.ts | 1 - packages/eslint-plugin/src/rules/no-shadow.ts | 1 - .../eslint-plugin/src/rules/no-this-alias.ts | 1 - .../src/rules/no-throw-literal.ts | 1 - .../eslint-plugin/src/rules/no-type-alias.ts | 1 - .../no-unnecessary-boolean-literal-compare.ts | 1 - .../src/rules/no-unnecessary-condition.ts | 1 - .../src/rules/no-unnecessary-qualifier.ts | 1 - .../rules/no-unnecessary-type-arguments.ts | 1 - .../rules/no-unnecessary-type-assertion.ts | 1 - .../rules/no-unnecessary-type-constraint.ts | 1 - .../src/rules/no-unsafe-argument.ts | 1 - .../src/rules/no-unsafe-assignment.ts | 1 - .../eslint-plugin/src/rules/no-unsafe-call.ts | 1 - .../src/rules/no-unsafe-member-access.ts | 1 - .../src/rules/no-unsafe-return.ts | 1 - .../src/rules/no-unused-expressions.ts | 1 - .../eslint-plugin/src/rules/no-unused-vars.ts | 1 - .../src/rules/no-use-before-define.ts | 1 - .../src/rules/no-useless-constructor.ts | 1 - .../src/rules/no-var-requires.ts | 1 - .../non-nullable-type-assertion-style.ts | 1 - .../src/rules/object-curly-spacing.ts | 1 - .../src/rules/prefer-as-const.ts | 1 - .../src/rules/prefer-enum-initializers.ts | 1 - .../eslint-plugin/src/rules/prefer-for-of.ts | 1 - .../src/rules/prefer-function-type.ts | 1 - .../src/rules/prefer-includes.ts | 1 - .../src/rules/prefer-literal-enum-member.ts | 1 - .../src/rules/prefer-namespace-keyword.ts | 1 - .../src/rules/prefer-nullish-coalescing.ts | 1 - .../src/rules/prefer-optional-chain.ts | 1 - .../rules/prefer-readonly-parameter-types.ts | 1 - .../src/rules/prefer-readonly.ts | 1 - .../src/rules/prefer-reduce-type-parameter.ts | 1 - .../src/rules/prefer-regexp-exec.ts | 1 - .../src/rules/prefer-return-this-type.ts | 1 - .../rules/prefer-string-starts-ends-with.ts | 1 - .../src/rules/prefer-ts-expect-error.ts | 1 - .../src/rules/promise-function-async.ts | 1 - packages/eslint-plugin/src/rules/quotes.ts | 1 - .../src/rules/require-array-sort-compare.ts | 1 - .../eslint-plugin/src/rules/require-await.ts | 1 - .../src/rules/restrict-plus-operands.ts | 1 - .../rules/restrict-template-expressions.ts | 1 - .../eslint-plugin/src/rules/return-await.ts | 1 - packages/eslint-plugin/src/rules/semi.ts | 1 - .../sort-type-union-intersection-members.ts | 1 - .../src/rules/space-before-function-paren.ts | 1 - .../src/rules/space-infix-ops.ts | 1 - .../src/rules/strict-boolean-expressions.ts | 1 - .../src/rules/switch-exhaustiveness-check.ts | 1 - .../src/rules/triple-slash-reference.ts | 1 - .../src/rules/type-annotation-spacing.ts | 1 - packages/eslint-plugin/src/rules/typedef.ts | 1 - .../eslint-plugin/src/rules/unbound-method.ts | 1 - .../src/rules/unified-signatures.ts | 1 - .../tests/util/getWrappingFixer.test.ts | 1 - .../experimental-utils/src/ts-eslint/Rule.ts | 20 ++++++------------- .../tests/eslint-utils/RuleCreator.test.ts | 2 -- yarn.lock | 6 +++--- 127 files changed, 9 insertions(+), 144 deletions(-) diff --git a/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts b/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts index 8ce331b4dad1..f91068d9ffe0 100644 --- a/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts +++ b/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts @@ -38,7 +38,6 @@ export default createRule({ docs: { description: "Enforces rules don't use TS API properties with known bad type definitions", - category: 'Possible Errors', recommended: 'error', suggestion: true, requiresTypeChecking: true, diff --git a/packages/eslint-plugin-internal/src/rules/no-typescript-default-import.ts b/packages/eslint-plugin-internal/src/rules/no-typescript-default-import.ts index ff4e35dc4f60..c82561312496 100644 --- a/packages/eslint-plugin-internal/src/rules/no-typescript-default-import.ts +++ b/packages/eslint-plugin-internal/src/rules/no-typescript-default-import.ts @@ -22,7 +22,6 @@ export default createRule({ docs: { description: "Enforces that packages rules don't do `import ts from 'typescript';`", - category: 'Possible Errors', recommended: 'error', }, fixable: 'code', diff --git a/packages/eslint-plugin-internal/src/rules/no-typescript-estree-import.ts b/packages/eslint-plugin-internal/src/rules/no-typescript-estree-import.ts index b3c3a71c60d6..3cc96a0f6003 100644 --- a/packages/eslint-plugin-internal/src/rules/no-typescript-estree-import.ts +++ b/packages/eslint-plugin-internal/src/rules/no-typescript-estree-import.ts @@ -16,7 +16,6 @@ export default createRule({ type: 'problem', docs: { description: `Enforces that eslint-plugin rules don't require anything from ${TSESTREE_NAME} or ${TYPES_NAME}`, - category: 'Possible Errors', recommended: 'error', }, fixable: 'code', diff --git a/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts b/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts index ed03e0fe1caf..81fcb8c41cf2 100644 --- a/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts +++ b/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts @@ -108,7 +108,6 @@ export default createRule({ type: 'problem', docs: { description: `Enforces that eslint-plugin test snippets are correctly formatted`, - category: 'Stylistic Issues', recommended: 'error', }, fixable: 'code', diff --git a/packages/eslint-plugin-internal/src/rules/prefer-ast-types-enum.ts b/packages/eslint-plugin-internal/src/rules/prefer-ast-types-enum.ts index c4a95695d967..e98d0904af52 100755 --- a/packages/eslint-plugin-internal/src/rules/prefer-ast-types-enum.ts +++ b/packages/eslint-plugin-internal/src/rules/prefer-ast-types-enum.ts @@ -15,7 +15,6 @@ export default createRule({ meta: { type: 'problem', docs: { - category: 'Best Practices', recommended: 'error', description: 'Ensures consistent usage of `AST_NODE_TYPES`, `AST_TOKEN_TYPES` and `DefinitionType` enums.', diff --git a/packages/eslint-plugin-tslint/src/rules/config.ts b/packages/eslint-plugin-tslint/src/rules/config.ts index 41326a8959c1..e865d8cbcdce 100644 --- a/packages/eslint-plugin-tslint/src/rules/config.ts +++ b/packages/eslint-plugin-tslint/src/rules/config.ts @@ -63,8 +63,6 @@ export default createRule({ docs: { description: 'Wraps a TSLint configuration and lints the whole source using TSLint', - // @ts-expect-error - We know this is a one off special category for this plugin - category: 'TSLint', recommended: false, }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts b/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts index 05f120b4cf24..273b6c6bfb9b 100644 --- a/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts +++ b/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts @@ -21,7 +21,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Require that member overloads be consecutive', - category: 'Best Practices', recommended: 'error', }, schema: [], diff --git a/packages/eslint-plugin/src/rules/array-type.ts b/packages/eslint-plugin/src/rules/array-type.ts index 44de45f19de1..da2bfdef518b 100644 --- a/packages/eslint-plugin/src/rules/array-type.ts +++ b/packages/eslint-plugin/src/rules/array-type.ts @@ -92,7 +92,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Requires using either `T[]` or `Array` for arrays', - category: 'Stylistic Issues', // too opinionated to be recommended recommended: false, }, diff --git a/packages/eslint-plugin/src/rules/await-thenable.ts b/packages/eslint-plugin/src/rules/await-thenable.ts index 9858bad8ba2a..e1decc5ad3df 100644 --- a/packages/eslint-plugin/src/rules/await-thenable.ts +++ b/packages/eslint-plugin/src/rules/await-thenable.ts @@ -7,7 +7,6 @@ export default util.createRule({ meta: { docs: { description: 'Disallows awaiting a value that is not a Thenable', - category: 'Best Practices', recommended: 'error', requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/ban-ts-comment.ts b/packages/eslint-plugin/src/rules/ban-ts-comment.ts index 4bf17c25d95b..a9e0caf0fe47 100644 --- a/packages/eslint-plugin/src/rules/ban-ts-comment.ts +++ b/packages/eslint-plugin/src/rules/ban-ts-comment.ts @@ -22,7 +22,6 @@ export default util.createRule<[Options], MessageIds>({ docs: { description: 'Bans `@ts-` comments from being used or requires descriptions after directive', - category: 'Best Practices', recommended: 'error', }, messages: { diff --git a/packages/eslint-plugin/src/rules/ban-tslint-comment.ts b/packages/eslint-plugin/src/rules/ban-tslint-comment.ts index 37dfefd380e5..14d32e72d889 100644 --- a/packages/eslint-plugin/src/rules/ban-tslint-comment.ts +++ b/packages/eslint-plugin/src/rules/ban-tslint-comment.ts @@ -20,7 +20,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Bans `// tslint:` comments from being used', - category: 'Stylistic Issues', recommended: false, }, messages: { diff --git a/packages/eslint-plugin/src/rules/ban-types.ts b/packages/eslint-plugin/src/rules/ban-types.ts index c9f03c89b969..32f05e9c1208 100644 --- a/packages/eslint-plugin/src/rules/ban-types.ts +++ b/packages/eslint-plugin/src/rules/ban-types.ts @@ -124,7 +124,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Bans specific types from being used', - category: 'Best Practices', recommended: 'error', }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/brace-style.ts b/packages/eslint-plugin/src/rules/brace-style.ts index 8bd77aa12ff0..6635303b3865 100644 --- a/packages/eslint-plugin/src/rules/brace-style.ts +++ b/packages/eslint-plugin/src/rules/brace-style.ts @@ -18,7 +18,6 @@ export default createRule({ type: 'layout', docs: { description: 'Enforce consistent brace style for blocks', - category: 'Stylistic Issues', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/class-literal-property-style.ts b/packages/eslint-plugin/src/rules/class-literal-property-style.ts index 0a257427ec10..dd3878e77a2f 100644 --- a/packages/eslint-plugin/src/rules/class-literal-property-style.ts +++ b/packages/eslint-plugin/src/rules/class-literal-property-style.ts @@ -44,7 +44,6 @@ export default util.createRule({ docs: { description: 'Ensures that literals on classes are exposed in a consistent style', - category: 'Best Practices', recommended: false, }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/comma-dangle.ts b/packages/eslint-plugin/src/rules/comma-dangle.ts index 9c212cca47e8..298a3e92639c 100644 --- a/packages/eslint-plugin/src/rules/comma-dangle.ts +++ b/packages/eslint-plugin/src/rules/comma-dangle.ts @@ -45,7 +45,6 @@ export default util.createRule({ type: 'layout', docs: { description: 'Require or disallow trailing comma', - category: 'Stylistic Issues', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/comma-spacing.ts b/packages/eslint-plugin/src/rules/comma-spacing.ts index 019a82a2e76e..c78322be8ea3 100644 --- a/packages/eslint-plugin/src/rules/comma-spacing.ts +++ b/packages/eslint-plugin/src/rules/comma-spacing.ts @@ -23,7 +23,6 @@ export default createRule({ type: 'suggestion', docs: { description: 'Enforces consistent spacing before and after commas', - category: 'Stylistic Issues', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/consistent-indexed-object-style.ts b/packages/eslint-plugin/src/rules/consistent-indexed-object-style.ts index fcce191b2b53..29c5e534b4af 100644 --- a/packages/eslint-plugin/src/rules/consistent-indexed-object-style.ts +++ b/packages/eslint-plugin/src/rules/consistent-indexed-object-style.ts @@ -14,7 +14,6 @@ export default createRule({ type: 'suggestion', docs: { description: 'Enforce or disallow the use of the record type', - category: 'Stylistic Issues', // too opinionated to be recommended recommended: false, }, diff --git a/packages/eslint-plugin/src/rules/consistent-type-assertions.ts b/packages/eslint-plugin/src/rules/consistent-type-assertions.ts index 3b431b80675c..617381790665 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-assertions.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-assertions.ts @@ -25,7 +25,6 @@ export default util.createRule({ meta: { type: 'suggestion', docs: { - category: 'Best Practices', description: 'Enforces consistent usage of type assertions', recommended: false, }, diff --git a/packages/eslint-plugin/src/rules/consistent-type-definitions.ts b/packages/eslint-plugin/src/rules/consistent-type-definitions.ts index 07d848db298a..bacccf9143f9 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-definitions.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-definitions.ts @@ -13,7 +13,6 @@ export default util.createRule({ docs: { description: 'Consistent with type definition either `interface` or `type`', - category: 'Stylistic Issues', // too opinionated to be recommended recommended: false, }, diff --git a/packages/eslint-plugin/src/rules/consistent-type-imports.ts b/packages/eslint-plugin/src/rules/consistent-type-imports.ts index 34f264ff0c7d..1bfb695f27be 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-imports.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-imports.ts @@ -56,7 +56,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Enforces consistent usage of type imports', - category: 'Stylistic Issues', recommended: false, }, messages: { diff --git a/packages/eslint-plugin/src/rules/default-param-last.ts b/packages/eslint-plugin/src/rules/default-param-last.ts index dea41116911b..9673d852dd1d 100644 --- a/packages/eslint-plugin/src/rules/default-param-last.ts +++ b/packages/eslint-plugin/src/rules/default-param-last.ts @@ -10,7 +10,6 @@ export default createRule({ type: 'suggestion', docs: { description: 'Enforce default parameters to be last', - category: 'Best Practices', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/dot-notation.ts b/packages/eslint-plugin/src/rules/dot-notation.ts index 9d5284b4aa63..01db4680cbec 100644 --- a/packages/eslint-plugin/src/rules/dot-notation.ts +++ b/packages/eslint-plugin/src/rules/dot-notation.ts @@ -20,7 +20,6 @@ export default createRule({ type: 'suggestion', docs: { description: 'enforce dot notation whenever possible', - category: 'Best Practices', recommended: false, extendsBaseRule: true, requiresTypeChecking: true, diff --git a/packages/eslint-plugin/src/rules/explicit-function-return-type.ts b/packages/eslint-plugin/src/rules/explicit-function-return-type.ts index f0904f07744e..e9a27b2b1fc0 100644 --- a/packages/eslint-plugin/src/rules/explicit-function-return-type.ts +++ b/packages/eslint-plugin/src/rules/explicit-function-return-type.ts @@ -26,7 +26,6 @@ export default util.createRule({ docs: { description: 'Require explicit return types on functions and class methods', - category: 'Stylistic Issues', recommended: false, }, messages: { diff --git a/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts b/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts index ece09d8bc71f..89671fa7567a 100644 --- a/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts +++ b/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts @@ -36,7 +36,6 @@ export default util.createRule({ docs: { description: 'Require explicit accessibility modifiers on class properties and methods', - category: 'Stylistic Issues', // too opinionated to be recommended recommended: false, }, diff --git a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts index 33caf65f19b4..67301afc4406 100644 --- a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts +++ b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts @@ -37,7 +37,6 @@ export default util.createRule({ docs: { description: "Require explicit return and argument types on exported functions' and classes' public class methods", - category: 'Stylistic Issues', recommended: 'warn', }, messages: { diff --git a/packages/eslint-plugin/src/rules/func-call-spacing.ts b/packages/eslint-plugin/src/rules/func-call-spacing.ts index 08d72181eeb6..254f89396601 100644 --- a/packages/eslint-plugin/src/rules/func-call-spacing.ts +++ b/packages/eslint-plugin/src/rules/func-call-spacing.ts @@ -19,7 +19,6 @@ export default util.createRule({ docs: { description: 'Require or disallow spacing between function identifiers and their invocations', - category: 'Stylistic Issues', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts b/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts index 573423135962..863e7d0889d0 100644 --- a/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts +++ b/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts @@ -257,7 +257,6 @@ export default createRule({ type: 'layout', docs: { description: 'Enforce consistent indentation.', - category: 'Stylistic Issues', recommended: false, }, fixable: 'whitespace', diff --git a/packages/eslint-plugin/src/rules/indent.ts b/packages/eslint-plugin/src/rules/indent.ts index 42b006177019..7835fd0e58d9 100644 --- a/packages/eslint-plugin/src/rules/indent.ts +++ b/packages/eslint-plugin/src/rules/indent.ts @@ -91,7 +91,6 @@ export default util.createRule({ type: 'layout', docs: { description: 'Enforce consistent indentation', - category: 'Stylistic Issues', // too opinionated to be recommended recommended: false, extendsBaseRule: true, diff --git a/packages/eslint-plugin/src/rules/init-declarations.ts b/packages/eslint-plugin/src/rules/init-declarations.ts index a75d6e031cd0..3a97a2c8eda1 100644 --- a/packages/eslint-plugin/src/rules/init-declarations.ts +++ b/packages/eslint-plugin/src/rules/init-declarations.ts @@ -21,7 +21,6 @@ export default createRule({ docs: { description: 'require or disallow initialization in variable declarations', - category: 'Variables', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/keyword-spacing.ts b/packages/eslint-plugin/src/rules/keyword-spacing.ts index 18c1c60bbb95..a5620fb7d530 100644 --- a/packages/eslint-plugin/src/rules/keyword-spacing.ts +++ b/packages/eslint-plugin/src/rules/keyword-spacing.ts @@ -13,7 +13,6 @@ export default util.createRule({ type: 'layout', docs: { description: 'Enforce consistent spacing before and after keywords', - category: 'Stylistic Issues', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/lines-between-class-members.ts b/packages/eslint-plugin/src/rules/lines-between-class-members.ts index 0e52e7b958cc..95c2f811e8a4 100644 --- a/packages/eslint-plugin/src/rules/lines-between-class-members.ts +++ b/packages/eslint-plugin/src/rules/lines-between-class-members.ts @@ -28,7 +28,6 @@ export default util.createRule({ type: 'layout', docs: { description: 'Require or disallow an empty line between class members', - category: 'Stylistic Issues', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/member-delimiter-style.ts b/packages/eslint-plugin/src/rules/member-delimiter-style.ts index de0a60f013cf..5fa5a863a6fd 100644 --- a/packages/eslint-plugin/src/rules/member-delimiter-style.ts +++ b/packages/eslint-plugin/src/rules/member-delimiter-style.ts @@ -120,7 +120,6 @@ export default util.createRule({ docs: { description: 'Require a specific member delimiter style for interfaces and type literals', - category: 'Stylistic Issues', recommended: false, }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/member-ordering.ts b/packages/eslint-plugin/src/rules/member-ordering.ts index 34c922a39181..13a4fb65ae5c 100644 --- a/packages/eslint-plugin/src/rules/member-ordering.ts +++ b/packages/eslint-plugin/src/rules/member-ordering.ts @@ -423,7 +423,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Require a consistent member declaration order', - category: 'Stylistic Issues', recommended: false, }, messages: { diff --git a/packages/eslint-plugin/src/rules/method-signature-style.ts b/packages/eslint-plugin/src/rules/method-signature-style.ts index 4775a1fec718..3e24263ab502 100644 --- a/packages/eslint-plugin/src/rules/method-signature-style.ts +++ b/packages/eslint-plugin/src/rules/method-signature-style.ts @@ -13,7 +13,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Enforces using a particular method signature syntax.', - category: 'Best Practices', recommended: false, }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/naming-convention.ts b/packages/eslint-plugin/src/rules/naming-convention.ts index 6b4b55309cf6..91456c7ccb23 100644 --- a/packages/eslint-plugin/src/rules/naming-convention.ts +++ b/packages/eslint-plugin/src/rules/naming-convention.ts @@ -55,7 +55,6 @@ export default util.createRule({ name: 'naming-convention', meta: { docs: { - category: 'Variables', description: 'Enforces naming conventions for everything across a codebase', recommended: false, diff --git a/packages/eslint-plugin/src/rules/no-array-constructor.ts b/packages/eslint-plugin/src/rules/no-array-constructor.ts index f9d09439cbb4..c0eac4a75af8 100644 --- a/packages/eslint-plugin/src/rules/no-array-constructor.ts +++ b/packages/eslint-plugin/src/rules/no-array-constructor.ts @@ -10,7 +10,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Disallow generic `Array` constructors', - category: 'Stylistic Issues', recommended: 'error', extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-base-to-string.ts b/packages/eslint-plugin/src/rules/no-base-to-string.ts index b1593c23d8b0..11962363c642 100644 --- a/packages/eslint-plugin/src/rules/no-base-to-string.ts +++ b/packages/eslint-plugin/src/rules/no-base-to-string.ts @@ -25,7 +25,6 @@ export default util.createRule({ docs: { description: 'Requires that `.toString()` is only called on objects which provide useful information when stringified', - category: 'Best Practices', recommended: false, requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts b/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts index 281c2f9c4632..f578c5d3a1da 100644 --- a/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts @@ -13,7 +13,6 @@ export default util.createRule({ docs: { description: 'Disallow non-null assertion in locations that may be confusing', - category: 'Stylistic Issues', recommended: false, }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts b/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts index 1ddb60bf73dc..696c3d7af2dc 100644 --- a/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts +++ b/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts @@ -30,7 +30,6 @@ export default util.createRule({ docs: { description: 'Requires expressions of type void to appear in statement position', - category: 'Best Practices', recommended: false, requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/no-dupe-class-members.ts b/packages/eslint-plugin/src/rules/no-dupe-class-members.ts index 0756e135fc96..dcc8b705038a 100644 --- a/packages/eslint-plugin/src/rules/no-dupe-class-members.ts +++ b/packages/eslint-plugin/src/rules/no-dupe-class-members.ts @@ -16,7 +16,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Disallow duplicate class members', - category: 'Possible Errors', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-duplicate-imports.ts b/packages/eslint-plugin/src/rules/no-duplicate-imports.ts index 773402e18d4b..5445b50cec46 100644 --- a/packages/eslint-plugin/src/rules/no-duplicate-imports.ts +++ b/packages/eslint-plugin/src/rules/no-duplicate-imports.ts @@ -16,7 +16,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Disallow duplicate imports', - category: 'Best Practices', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-dynamic-delete.ts b/packages/eslint-plugin/src/rules/no-dynamic-delete.ts index 71ce7f2d91e8..716590c66b66 100644 --- a/packages/eslint-plugin/src/rules/no-dynamic-delete.ts +++ b/packages/eslint-plugin/src/rules/no-dynamic-delete.ts @@ -10,7 +10,6 @@ export default util.createRule({ name: 'no-dynamic-delete', meta: { docs: { - category: 'Best Practices', description: 'Disallow the delete operator with computed key expressions', recommended: false, }, diff --git a/packages/eslint-plugin/src/rules/no-empty-function.ts b/packages/eslint-plugin/src/rules/no-empty-function.ts index d34618e0354a..06c04cb4ecad 100644 --- a/packages/eslint-plugin/src/rules/no-empty-function.ts +++ b/packages/eslint-plugin/src/rules/no-empty-function.ts @@ -45,7 +45,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Disallow empty functions', - category: 'Best Practices', recommended: 'error', extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-empty-interface.ts b/packages/eslint-plugin/src/rules/no-empty-interface.ts index d9c8c2477b8a..ee472e703903 100644 --- a/packages/eslint-plugin/src/rules/no-empty-interface.ts +++ b/packages/eslint-plugin/src/rules/no-empty-interface.ts @@ -14,7 +14,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Disallow the declaration of empty interfaces', - category: 'Best Practices', recommended: 'error', suggestion: true, }, diff --git a/packages/eslint-plugin/src/rules/no-explicit-any.ts b/packages/eslint-plugin/src/rules/no-explicit-any.ts index 71f052923276..a41d443e9243 100644 --- a/packages/eslint-plugin/src/rules/no-explicit-any.ts +++ b/packages/eslint-plugin/src/rules/no-explicit-any.ts @@ -19,7 +19,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Disallow usage of the `any` type', - category: 'Best Practices', recommended: 'warn', suggestion: true, }, diff --git a/packages/eslint-plugin/src/rules/no-extra-non-null-assertion.ts b/packages/eslint-plugin/src/rules/no-extra-non-null-assertion.ts index f507f37218f0..1ea8970da2fe 100644 --- a/packages/eslint-plugin/src/rules/no-extra-non-null-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-extra-non-null-assertion.ts @@ -7,7 +7,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Disallow extra non-null assertion', - category: 'Stylistic Issues', recommended: 'error', }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/no-extra-parens.ts b/packages/eslint-plugin/src/rules/no-extra-parens.ts index 0eeeedf2c2fa..743c22596c18 100644 --- a/packages/eslint-plugin/src/rules/no-extra-parens.ts +++ b/packages/eslint-plugin/src/rules/no-extra-parens.ts @@ -20,7 +20,6 @@ export default util.createRule({ type: 'layout', docs: { description: 'Disallow unnecessary parentheses', - category: 'Possible Errors', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-extra-semi.ts b/packages/eslint-plugin/src/rules/no-extra-semi.ts index d8db4ba7904b..5ed7372b08cc 100644 --- a/packages/eslint-plugin/src/rules/no-extra-semi.ts +++ b/packages/eslint-plugin/src/rules/no-extra-semi.ts @@ -12,7 +12,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Disallow unnecessary semicolons', - category: 'Possible Errors', recommended: 'error', extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-extraneous-class.ts b/packages/eslint-plugin/src/rules/no-extraneous-class.ts index e57ee5546a39..2686ab0f478d 100644 --- a/packages/eslint-plugin/src/rules/no-extraneous-class.ts +++ b/packages/eslint-plugin/src/rules/no-extraneous-class.ts @@ -20,7 +20,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Forbids the use of classes as namespaces', - category: 'Best Practices', recommended: false, }, schema: [ diff --git a/packages/eslint-plugin/src/rules/no-floating-promises.ts b/packages/eslint-plugin/src/rules/no-floating-promises.ts index ae196cf52889..b1a88336e198 100644 --- a/packages/eslint-plugin/src/rules/no-floating-promises.ts +++ b/packages/eslint-plugin/src/rules/no-floating-promises.ts @@ -22,7 +22,6 @@ export default util.createRule({ meta: { docs: { description: 'Requires Promise-like values to be handled appropriately', - category: 'Best Practices', recommended: 'error', suggestion: true, requiresTypeChecking: true, diff --git a/packages/eslint-plugin/src/rules/no-for-in-array.ts b/packages/eslint-plugin/src/rules/no-for-in-array.ts index f89d2ffd08d7..c382a11021c1 100644 --- a/packages/eslint-plugin/src/rules/no-for-in-array.ts +++ b/packages/eslint-plugin/src/rules/no-for-in-array.ts @@ -6,7 +6,6 @@ export default util.createRule({ meta: { docs: { description: 'Disallow iterating over an array with a for-in loop', - category: 'Best Practices', recommended: 'error', requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts b/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts index 85cdd7fd8fc9..f933336866b7 100644 --- a/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts +++ b/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts @@ -20,7 +20,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Disallow usage of the implicit `any` type in catch clauses', - category: 'Best Practices', recommended: false, suggestion: true, }, diff --git a/packages/eslint-plugin/src/rules/no-implied-eval.ts b/packages/eslint-plugin/src/rules/no-implied-eval.ts index 34b1c70b16d0..91bf0d0d3199 100644 --- a/packages/eslint-plugin/src/rules/no-implied-eval.ts +++ b/packages/eslint-plugin/src/rules/no-implied-eval.ts @@ -20,7 +20,6 @@ export default util.createRule({ meta: { docs: { description: 'Disallow the use of `eval()`-like methods', - category: 'Best Practices', recommended: 'error', extendsBaseRule: true, requiresTypeChecking: true, diff --git a/packages/eslint-plugin/src/rules/no-inferrable-types.ts b/packages/eslint-plugin/src/rules/no-inferrable-types.ts index 4edcf69c9758..23d8616e934e 100644 --- a/packages/eslint-plugin/src/rules/no-inferrable-types.ts +++ b/packages/eslint-plugin/src/rules/no-inferrable-types.ts @@ -20,7 +20,6 @@ export default util.createRule({ docs: { description: 'Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean', - category: 'Best Practices', recommended: 'error', }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/no-invalid-this.ts b/packages/eslint-plugin/src/rules/no-invalid-this.ts index eb21da3ff8bd..9b8a4ac8d8af 100644 --- a/packages/eslint-plugin/src/rules/no-invalid-this.ts +++ b/packages/eslint-plugin/src/rules/no-invalid-this.ts @@ -21,7 +21,6 @@ export default createRule({ docs: { description: 'Disallow `this` keywords outside of classes or class-like objects', - category: 'Best Practices', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-invalid-void-type.ts b/packages/eslint-plugin/src/rules/no-invalid-void-type.ts index 62c1aa679cf1..5c7829cde6cf 100644 --- a/packages/eslint-plugin/src/rules/no-invalid-void-type.ts +++ b/packages/eslint-plugin/src/rules/no-invalid-void-type.ts @@ -23,7 +23,6 @@ export default util.createRule<[Options], MessageIds>({ docs: { description: 'Disallows usage of `void` type outside of generic or return types', - category: 'Best Practices', recommended: false, }, messages: { diff --git a/packages/eslint-plugin/src/rules/no-loop-func.ts b/packages/eslint-plugin/src/rules/no-loop-func.ts index b3e57903dd16..4496dea91fc8 100644 --- a/packages/eslint-plugin/src/rules/no-loop-func.ts +++ b/packages/eslint-plugin/src/rules/no-loop-func.ts @@ -18,7 +18,6 @@ export default util.createRule({ docs: { description: 'Disallow function declarations that contain unsafe references inside loop statements', - category: 'Best Practices', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts index 3b53661a0266..955032474755 100644 --- a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts +++ b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts @@ -15,7 +15,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Disallow literal numbers that lose precision', - category: 'Possible Errors', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-magic-numbers.ts b/packages/eslint-plugin/src/rules/no-magic-numbers.ts index 8171815bb56b..a434a06dcf9a 100644 --- a/packages/eslint-plugin/src/rules/no-magic-numbers.ts +++ b/packages/eslint-plugin/src/rules/no-magic-numbers.ts @@ -20,7 +20,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Disallow magic numbers', - category: 'Best Practices', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-misused-new.ts b/packages/eslint-plugin/src/rules/no-misused-new.ts index d0331e19fa35..ae79c28a6f2e 100644 --- a/packages/eslint-plugin/src/rules/no-misused-new.ts +++ b/packages/eslint-plugin/src/rules/no-misused-new.ts @@ -10,7 +10,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Enforce valid definition of `new` and `constructor`', - category: 'Best Practices', recommended: 'error', }, schema: [], diff --git a/packages/eslint-plugin/src/rules/no-misused-promises.ts b/packages/eslint-plugin/src/rules/no-misused-promises.ts index 58d4ac9f9c6c..353b7d4a8038 100644 --- a/packages/eslint-plugin/src/rules/no-misused-promises.ts +++ b/packages/eslint-plugin/src/rules/no-misused-promises.ts @@ -20,7 +20,6 @@ export default util.createRule({ meta: { docs: { description: 'Avoid using promises in places not designed to handle them', - category: 'Best Practices', recommended: 'error', requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/no-namespace.ts b/packages/eslint-plugin/src/rules/no-namespace.ts index f8cc05b10471..f7fb0ea1e328 100644 --- a/packages/eslint-plugin/src/rules/no-namespace.ts +++ b/packages/eslint-plugin/src/rules/no-namespace.ts @@ -19,7 +19,6 @@ export default util.createRule({ docs: { description: 'Disallow the use of custom TypeScript modules and namespaces', - category: 'Best Practices', recommended: 'error', }, messages: { diff --git a/packages/eslint-plugin/src/rules/no-non-null-asserted-optional-chain.ts b/packages/eslint-plugin/src/rules/no-non-null-asserted-optional-chain.ts index 1d9c8f4aabc2..9fdba130b97e 100644 --- a/packages/eslint-plugin/src/rules/no-non-null-asserted-optional-chain.ts +++ b/packages/eslint-plugin/src/rules/no-non-null-asserted-optional-chain.ts @@ -22,7 +22,6 @@ export default util.createRule({ docs: { description: 'Disallows using a non-null assertion after an optional chain expression', - category: 'Possible Errors', recommended: 'error', suggestion: true, }, diff --git a/packages/eslint-plugin/src/rules/no-non-null-assertion.ts b/packages/eslint-plugin/src/rules/no-non-null-assertion.ts index ceba7fefd15a..cd9f0dbb2552 100644 --- a/packages/eslint-plugin/src/rules/no-non-null-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-non-null-assertion.ts @@ -13,7 +13,6 @@ export default util.createRule<[], MessageIds>({ docs: { description: 'Disallows non-null assertions using the `!` postfix operator', - category: 'Stylistic Issues', recommended: 'warn', suggestion: true, }, diff --git a/packages/eslint-plugin/src/rules/no-parameter-properties.ts b/packages/eslint-plugin/src/rules/no-parameter-properties.ts index 9b6bb31e6541..613b839bbdfa 100644 --- a/packages/eslint-plugin/src/rules/no-parameter-properties.ts +++ b/packages/eslint-plugin/src/rules/no-parameter-properties.ts @@ -26,7 +26,6 @@ export default util.createRule({ docs: { description: 'Disallow the use of parameter properties in class constructors', - category: 'Stylistic Issues', // too opinionated to be recommended recommended: false, }, diff --git a/packages/eslint-plugin/src/rules/no-redeclare.ts b/packages/eslint-plugin/src/rules/no-redeclare.ts index ae4b2e9a3f5a..914dd074d33f 100644 --- a/packages/eslint-plugin/src/rules/no-redeclare.ts +++ b/packages/eslint-plugin/src/rules/no-redeclare.ts @@ -19,7 +19,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Disallow variable redeclaration', - category: 'Best Practices', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-require-imports.ts b/packages/eslint-plugin/src/rules/no-require-imports.ts index 9aa4b685dd22..49bd5f237b06 100644 --- a/packages/eslint-plugin/src/rules/no-require-imports.ts +++ b/packages/eslint-plugin/src/rules/no-require-imports.ts @@ -7,7 +7,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Disallows invocation of `require()`', - category: 'Best Practices', recommended: false, }, schema: [], diff --git a/packages/eslint-plugin/src/rules/no-shadow.ts b/packages/eslint-plugin/src/rules/no-shadow.ts index a49afd502cfe..27c689309310 100644 --- a/packages/eslint-plugin/src/rules/no-shadow.ts +++ b/packages/eslint-plugin/src/rules/no-shadow.ts @@ -30,7 +30,6 @@ export default util.createRule({ docs: { description: 'Disallow variable declarations from shadowing variables declared in the outer scope', - category: 'Variables', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-this-alias.ts b/packages/eslint-plugin/src/rules/no-this-alias.ts index 8865fad2c3fb..82ab9b22b0fa 100644 --- a/packages/eslint-plugin/src/rules/no-this-alias.ts +++ b/packages/eslint-plugin/src/rules/no-this-alias.ts @@ -18,7 +18,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Disallow aliasing `this`', - category: 'Best Practices', recommended: 'error', }, schema: [ diff --git a/packages/eslint-plugin/src/rules/no-throw-literal.ts b/packages/eslint-plugin/src/rules/no-throw-literal.ts index 92bf3b02a135..178f1f39f9ca 100644 --- a/packages/eslint-plugin/src/rules/no-throw-literal.ts +++ b/packages/eslint-plugin/src/rules/no-throw-literal.ts @@ -11,7 +11,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Disallow throwing literals as exceptions', - category: 'Best Practices', recommended: false, extendsBaseRule: true, requiresTypeChecking: true, diff --git a/packages/eslint-plugin/src/rules/no-type-alias.ts b/packages/eslint-plugin/src/rules/no-type-alias.ts index 4e16216ea720..347e36f0a425 100644 --- a/packages/eslint-plugin/src/rules/no-type-alias.ts +++ b/packages/eslint-plugin/src/rules/no-type-alias.ts @@ -47,7 +47,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Disallow the use of type aliases', - category: 'Stylistic Issues', // too opinionated to be recommended recommended: false, }, diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts b/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts index 55719d857dab..8583e657f915 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts @@ -38,7 +38,6 @@ export default util.createRule({ docs: { description: 'Flags unnecessary equality comparisons against boolean literals', - category: 'Stylistic Issues', recommended: false, requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts index caca4f8bedb9..4e73c0623ad1 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts @@ -90,7 +90,6 @@ export default createRule({ docs: { description: 'Prevents conditionals where the type is always truthy or always falsy', - category: 'Best Practices', recommended: false, requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-qualifier.ts b/packages/eslint-plugin/src/rules/no-unnecessary-qualifier.ts index 014b2c220e41..1f4652085bda 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-qualifier.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-qualifier.ts @@ -10,7 +10,6 @@ export default util.createRule({ name: 'no-unnecessary-qualifier', meta: { docs: { - category: 'Best Practices', description: 'Warns when a namespace qualifier is unnecessary', recommended: false, requiresTypeChecking: true, diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-arguments.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-arguments.ts index 2df933084dcf..9f7d718c2d92 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-arguments.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-arguments.ts @@ -22,7 +22,6 @@ export default util.createRule<[], MessageIds>({ docs: { description: 'Enforces that type arguments will not be used if not required', - category: 'Best Practices', recommended: false, requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts index d16f494fc4af..cd5bce1845d5 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts @@ -25,7 +25,6 @@ export default util.createRule({ docs: { description: 'Warns if a type assertion does not change the type of an expression', - category: 'Best Practices', recommended: 'error', requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-constraint.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-constraint.ts index 6d5036c2d75a..535cae96023b 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-constraint.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-constraint.ts @@ -32,7 +32,6 @@ export default util.createRule({ name: 'no-unnecessary-type-constraint', meta: { docs: { - category: 'Best Practices', description: 'Disallows unnecessary constraints on generic types', recommended: false, suggestion: true, diff --git a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts index 053485f9228f..46ed36a0dc3d 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts @@ -138,7 +138,6 @@ export default util.createRule<[], MessageIds>({ type: 'problem', docs: { description: 'Disallows calling a function with an any type value', - category: 'Possible Errors', // TODO - enable this with next breaking recommended: false, requiresTypeChecking: true, diff --git a/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts b/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts index ae900b14f0cd..b14f43fe27f9 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts @@ -22,7 +22,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Disallows assigning any to variables and properties', - category: 'Possible Errors', recommended: 'error', requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/no-unsafe-call.ts b/packages/eslint-plugin/src/rules/no-unsafe-call.ts index b08214d36c27..781908f9497b 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-call.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-call.ts @@ -15,7 +15,6 @@ export default util.createRule<[], MessageIds>({ type: 'problem', docs: { description: 'Disallows calling an any type value', - category: 'Possible Errors', recommended: 'error', requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts b/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts index 121e826053e2..6e9555a5a3e4 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts @@ -17,7 +17,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Disallows member access on any typed variables', - category: 'Possible Errors', recommended: 'error', requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/no-unsafe-return.ts b/packages/eslint-plugin/src/rules/no-unsafe-return.ts index d460dd04c9bf..e226d526bca0 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-return.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-return.ts @@ -12,7 +12,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Disallows returning any from a function', - category: 'Possible Errors', recommended: 'error', requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/no-unused-expressions.ts b/packages/eslint-plugin/src/rules/no-unused-expressions.ts index 527ba14e03ce..4bef50b44a8a 100644 --- a/packages/eslint-plugin/src/rules/no-unused-expressions.ts +++ b/packages/eslint-plugin/src/rules/no-unused-expressions.ts @@ -16,7 +16,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Disallow unused expressions', - category: 'Best Practices', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-unused-vars.ts b/packages/eslint-plugin/src/rules/no-unused-vars.ts index 2e6633afc57f..bf9548ec888d 100644 --- a/packages/eslint-plugin/src/rules/no-unused-vars.ts +++ b/packages/eslint-plugin/src/rules/no-unused-vars.ts @@ -37,7 +37,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Disallow unused variables', - category: 'Variables', recommended: 'warn', extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-use-before-define.ts b/packages/eslint-plugin/src/rules/no-use-before-define.ts index ef39ec9a5b7c..83cf552fda52 100644 --- a/packages/eslint-plugin/src/rules/no-use-before-define.ts +++ b/packages/eslint-plugin/src/rules/no-use-before-define.ts @@ -232,7 +232,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Disallow the use of variables before they are defined', - category: 'Variables', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-useless-constructor.ts b/packages/eslint-plugin/src/rules/no-useless-constructor.ts index d1134bd09db2..f656af264818 100644 --- a/packages/eslint-plugin/src/rules/no-useless-constructor.ts +++ b/packages/eslint-plugin/src/rules/no-useless-constructor.ts @@ -51,7 +51,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Disallow unnecessary constructors', - category: 'Best Practices', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/no-var-requires.ts b/packages/eslint-plugin/src/rules/no-var-requires.ts index d7ed1d16f7fb..b599d4cb87a6 100644 --- a/packages/eslint-plugin/src/rules/no-var-requires.ts +++ b/packages/eslint-plugin/src/rules/no-var-requires.ts @@ -14,7 +14,6 @@ export default util.createRule({ docs: { description: 'Disallows the use of require statements except in import statements', - category: 'Best Practices', recommended: 'error', }, messages: { diff --git a/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts b/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts index 647fbcddd4c5..1577c3b94489 100644 --- a/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts +++ b/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts @@ -11,7 +11,6 @@ export default util.createRule({ name: 'non-nullable-type-assertion-style', meta: { docs: { - category: 'Best Practices', description: 'Prefers a non-null assertion over explicit type cast when possible', recommended: false, diff --git a/packages/eslint-plugin/src/rules/object-curly-spacing.ts b/packages/eslint-plugin/src/rules/object-curly-spacing.ts index 090bd8e1e952..5e93dff61a03 100644 --- a/packages/eslint-plugin/src/rules/object-curly-spacing.ts +++ b/packages/eslint-plugin/src/rules/object-curly-spacing.ts @@ -24,7 +24,6 @@ export default createRule({ ...baseRule.meta, docs: { description: 'Enforce consistent spacing inside braces', - category: 'Stylistic Issues', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/prefer-as-const.ts b/packages/eslint-plugin/src/rules/prefer-as-const.ts index aeaa6fcdd7a3..93bcce50889d 100644 --- a/packages/eslint-plugin/src/rules/prefer-as-const.ts +++ b/packages/eslint-plugin/src/rules/prefer-as-const.ts @@ -11,7 +11,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Prefer usage of `as const` over literal type', - category: 'Best Practices', recommended: 'error', suggestion: true, }, diff --git a/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts b/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts index 9f9d641ec411..5ad6dccd7cce 100644 --- a/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts +++ b/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts @@ -9,7 +9,6 @@ export default util.createRule<[], MessageIds>({ type: 'suggestion', docs: { description: 'Prefer initializing each enums member value', - category: 'Best Practices', recommended: false, suggestion: true, }, diff --git a/packages/eslint-plugin/src/rules/prefer-for-of.ts b/packages/eslint-plugin/src/rules/prefer-for-of.ts index 361ad5ec2cf7..25043615f81e 100644 --- a/packages/eslint-plugin/src/rules/prefer-for-of.ts +++ b/packages/eslint-plugin/src/rules/prefer-for-of.ts @@ -12,7 +12,6 @@ export default util.createRule({ docs: { description: 'Prefer a ‘for-of’ loop over a standard ‘for’ loop if the index is only used to access the array being iterated', - category: 'Stylistic Issues', recommended: false, }, messages: { diff --git a/packages/eslint-plugin/src/rules/prefer-function-type.ts b/packages/eslint-plugin/src/rules/prefer-function-type.ts index 761e8bc98eb9..ceeafcd841c3 100644 --- a/packages/eslint-plugin/src/rules/prefer-function-type.ts +++ b/packages/eslint-plugin/src/rules/prefer-function-type.ts @@ -17,7 +17,6 @@ export default util.createRule({ docs: { description: 'Use function types instead of interfaces with call signatures', - category: 'Best Practices', recommended: false, }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/prefer-includes.ts b/packages/eslint-plugin/src/rules/prefer-includes.ts index 13a6021c8069..f15a756abc4a 100644 --- a/packages/eslint-plugin/src/rules/prefer-includes.ts +++ b/packages/eslint-plugin/src/rules/prefer-includes.ts @@ -20,7 +20,6 @@ export default createRule({ type: 'suggestion', docs: { description: 'Enforce `includes` method over `indexOf` method', - category: 'Best Practices', recommended: false, requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/prefer-literal-enum-member.ts b/packages/eslint-plugin/src/rules/prefer-literal-enum-member.ts index 77b6746a06b0..8f10eb9be369 100644 --- a/packages/eslint-plugin/src/rules/prefer-literal-enum-member.ts +++ b/packages/eslint-plugin/src/rules/prefer-literal-enum-member.ts @@ -8,7 +8,6 @@ export default createRule({ docs: { description: 'Require that all enum members be literal values to prevent unintended enum member name shadow issues', - category: 'Best Practices', recommended: false, requiresTypeChecking: false, }, diff --git a/packages/eslint-plugin/src/rules/prefer-namespace-keyword.ts b/packages/eslint-plugin/src/rules/prefer-namespace-keyword.ts index 9137fe912aa6..4af7c9812534 100644 --- a/packages/eslint-plugin/src/rules/prefer-namespace-keyword.ts +++ b/packages/eslint-plugin/src/rules/prefer-namespace-keyword.ts @@ -11,7 +11,6 @@ export default util.createRule({ docs: { description: 'Require the use of the `namespace` keyword instead of the `module` keyword to declare custom TypeScript modules', - category: 'Best Practices', recommended: 'error', }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts index 4fe3d021f700..6975576edcaa 100644 --- a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts +++ b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts @@ -21,7 +21,6 @@ export default util.createRule({ docs: { description: 'Enforce the usage of the nullish coalescing operator instead of logical chaining', - category: 'Best Practices', recommended: false, suggestion: true, requiresTypeChecking: true, diff --git a/packages/eslint-plugin/src/rules/prefer-optional-chain.ts b/packages/eslint-plugin/src/rules/prefer-optional-chain.ts index b1eff5e4ae7e..84c2e15e3975 100644 --- a/packages/eslint-plugin/src/rules/prefer-optional-chain.ts +++ b/packages/eslint-plugin/src/rules/prefer-optional-chain.ts @@ -37,7 +37,6 @@ export default util.createRule({ docs: { description: 'Prefer using concise optional chain expressions instead of chained logical ands', - category: 'Best Practices', recommended: false, suggestion: true, }, diff --git a/packages/eslint-plugin/src/rules/prefer-readonly-parameter-types.ts b/packages/eslint-plugin/src/rules/prefer-readonly-parameter-types.ts index fdf48395eae5..478a15b66b76 100644 --- a/packages/eslint-plugin/src/rules/prefer-readonly-parameter-types.ts +++ b/packages/eslint-plugin/src/rules/prefer-readonly-parameter-types.ts @@ -19,7 +19,6 @@ export default util.createRule({ docs: { description: 'Requires that function parameters are typed as readonly to prevent accidental mutation of inputs', - category: 'Possible Errors', recommended: false, requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/prefer-readonly.ts b/packages/eslint-plugin/src/rules/prefer-readonly.ts index 36c6c7ea81a6..7b0fbfee3af7 100644 --- a/packages/eslint-plugin/src/rules/prefer-readonly.ts +++ b/packages/eslint-plugin/src/rules/prefer-readonly.ts @@ -28,7 +28,6 @@ export default util.createRule({ docs: { description: "Requires that private members are marked as `readonly` if they're never modified outside of the constructor", - category: 'Best Practices', recommended: false, requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/prefer-reduce-type-parameter.ts b/packages/eslint-plugin/src/rules/prefer-reduce-type-parameter.ts index 8656c8d2376d..a797bfdf48f3 100644 --- a/packages/eslint-plugin/src/rules/prefer-reduce-type-parameter.ts +++ b/packages/eslint-plugin/src/rules/prefer-reduce-type-parameter.ts @@ -30,7 +30,6 @@ export default util.createRule({ meta: { type: 'problem', docs: { - category: 'Best Practices', recommended: false, description: 'Prefer using type parameter when calling `Array#reduce` instead of casting', diff --git a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts index bbb7d9aac746..93ac0cda6409 100644 --- a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts +++ b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts @@ -29,7 +29,6 @@ export default createRule({ docs: { description: 'Enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided', - category: 'Best Practices', recommended: 'error', requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/prefer-return-this-type.ts b/packages/eslint-plugin/src/rules/prefer-return-this-type.ts index 9fcfcb042006..b6be29efc043 100644 --- a/packages/eslint-plugin/src/rules/prefer-return-this-type.ts +++ b/packages/eslint-plugin/src/rules/prefer-return-this-type.ts @@ -22,7 +22,6 @@ export default createRule({ docs: { description: 'Enforce that `this` is used when only `this` type is returned', - category: 'Best Practices', recommended: false, requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/prefer-string-starts-ends-with.ts b/packages/eslint-plugin/src/rules/prefer-string-starts-ends-with.ts index f4697b7c01de..c90bb0a1a746 100644 --- a/packages/eslint-plugin/src/rules/prefer-string-starts-ends-with.ts +++ b/packages/eslint-plugin/src/rules/prefer-string-starts-ends-with.ts @@ -27,7 +27,6 @@ export default createRule({ docs: { description: 'Enforce the use of `String#startsWith` and `String#endsWith` instead of other equivalent methods of checking substrings', - category: 'Best Practices', recommended: false, requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/prefer-ts-expect-error.ts b/packages/eslint-plugin/src/rules/prefer-ts-expect-error.ts index d696fc045735..15c070298cb1 100644 --- a/packages/eslint-plugin/src/rules/prefer-ts-expect-error.ts +++ b/packages/eslint-plugin/src/rules/prefer-ts-expect-error.ts @@ -16,7 +16,6 @@ export default util.createRule<[], MessageIds>({ type: 'problem', docs: { description: 'Recommends using `@ts-expect-error` over `@ts-ignore`', - category: 'Best Practices', recommended: false, }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/promise-function-async.ts b/packages/eslint-plugin/src/rules/promise-function-async.ts index 68b1d42567c5..6b3f29b8d97e 100644 --- a/packages/eslint-plugin/src/rules/promise-function-async.ts +++ b/packages/eslint-plugin/src/rules/promise-function-async.ts @@ -26,7 +26,6 @@ export default util.createRule({ docs: { description: 'Requires any function or method that returns a Promise to be marked async', - category: 'Best Practices', recommended: false, requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/quotes.ts b/packages/eslint-plugin/src/rules/quotes.ts index 699df89da156..e03556af63dd 100644 --- a/packages/eslint-plugin/src/rules/quotes.ts +++ b/packages/eslint-plugin/src/rules/quotes.ts @@ -17,7 +17,6 @@ export default util.createRule({ docs: { description: 'Enforce the consistent use of either backticks, double, or single quotes', - category: 'Stylistic Issues', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/require-array-sort-compare.ts b/packages/eslint-plugin/src/rules/require-array-sort-compare.ts index 6e0c49f31a8b..25476314d73f 100644 --- a/packages/eslint-plugin/src/rules/require-array-sort-compare.ts +++ b/packages/eslint-plugin/src/rules/require-array-sort-compare.ts @@ -21,7 +21,6 @@ export default util.createRule({ docs: { description: 'Requires `Array#sort` calls to always provide a `compareFunction`', - category: 'Best Practices', recommended: false, requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/require-await.ts b/packages/eslint-plugin/src/rules/require-await.ts index 99c455cd0f6a..a1e92e8f91d8 100644 --- a/packages/eslint-plugin/src/rules/require-await.ts +++ b/packages/eslint-plugin/src/rules/require-await.ts @@ -25,7 +25,6 @@ export default util.createRule({ type: 'suggestion', docs: { description: 'Disallow async functions which have no `await` expression', - category: 'Best Practices', recommended: 'error', requiresTypeChecking: true, extendsBaseRule: true, diff --git a/packages/eslint-plugin/src/rules/restrict-plus-operands.ts b/packages/eslint-plugin/src/rules/restrict-plus-operands.ts index 0f3b07e9fb27..659509f81ef1 100644 --- a/packages/eslint-plugin/src/rules/restrict-plus-operands.ts +++ b/packages/eslint-plugin/src/rules/restrict-plus-operands.ts @@ -16,7 +16,6 @@ export default util.createRule({ docs: { description: 'When adding two variables, operands must both be of type number or of type string', - category: 'Best Practices', recommended: 'error', requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/restrict-template-expressions.ts b/packages/eslint-plugin/src/rules/restrict-template-expressions.ts index b20bd5c62bc2..f39bc88cfe59 100644 --- a/packages/eslint-plugin/src/rules/restrict-template-expressions.ts +++ b/packages/eslint-plugin/src/rules/restrict-template-expressions.ts @@ -23,7 +23,6 @@ export default util.createRule({ type: 'problem', docs: { description: 'Enforce template literal expressions to be of string type', - category: 'Best Practices', recommended: 'error', requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/return-await.ts b/packages/eslint-plugin/src/rules/return-await.ts index 1375d3028e1e..93b863757a0b 100644 --- a/packages/eslint-plugin/src/rules/return-await.ts +++ b/packages/eslint-plugin/src/rules/return-await.ts @@ -22,7 +22,6 @@ export default util.createRule({ meta: { docs: { description: 'Enforces consistent returning of awaited values', - category: 'Best Practices', recommended: false, requiresTypeChecking: true, extendsBaseRule: 'no-return-await', diff --git a/packages/eslint-plugin/src/rules/semi.ts b/packages/eslint-plugin/src/rules/semi.ts index c8829ab83e34..40e631482aaf 100644 --- a/packages/eslint-plugin/src/rules/semi.ts +++ b/packages/eslint-plugin/src/rules/semi.ts @@ -17,7 +17,6 @@ export default util.createRule({ type: 'layout', docs: { description: 'Require or disallow semicolons instead of ASI', - category: 'Stylistic Issues', // too opinionated to be recommended recommended: false, extendsBaseRule: true, diff --git a/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts b/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts index e7f042162b8c..3d14b55e9d74 100644 --- a/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts +++ b/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts @@ -108,7 +108,6 @@ export default util.createRule({ docs: { description: 'Enforces that members of a type union/intersection are sorted alphabetically', - category: 'Stylistic Issues', recommended: false, }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/space-before-function-paren.ts b/packages/eslint-plugin/src/rules/space-before-function-paren.ts index e2ccfa5182db..b13af67163c5 100644 --- a/packages/eslint-plugin/src/rules/space-before-function-paren.ts +++ b/packages/eslint-plugin/src/rules/space-before-function-paren.ts @@ -23,7 +23,6 @@ export default util.createRule({ type: 'layout', docs: { description: 'Enforces consistent spacing before function parenthesis', - category: 'Stylistic Issues', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/space-infix-ops.ts b/packages/eslint-plugin/src/rules/space-infix-ops.ts index eb92bd2f112c..80294cd26718 100644 --- a/packages/eslint-plugin/src/rules/space-infix-ops.ts +++ b/packages/eslint-plugin/src/rules/space-infix-ops.ts @@ -19,7 +19,6 @@ export default util.createRule({ docs: { description: 'This rule is aimed at ensuring there are spaces around infix operators.', - category: 'Stylistic Issues', recommended: false, extendsBaseRule: true, }, diff --git a/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts b/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts index 1aca481e7439..10b48b5e9b37 100644 --- a/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts +++ b/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts @@ -52,7 +52,6 @@ export default util.createRule({ hasSuggestions: true, docs: { description: 'Restricts the types allowed in boolean expressions', - category: 'Best Practices', recommended: false, requiresTypeChecking: true, }, diff --git a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts index 65a70a86cc40..08f21e3364ca 100644 --- a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts +++ b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts @@ -16,7 +16,6 @@ export default createRule({ type: 'suggestion', docs: { description: 'Exhaustiveness checking in switch with union type', - category: 'Best Practices', recommended: false, suggestion: true, requiresTypeChecking: true, diff --git a/packages/eslint-plugin/src/rules/triple-slash-reference.ts b/packages/eslint-plugin/src/rules/triple-slash-reference.ts index 525febe2be3c..ba8bce5ae8a7 100644 --- a/packages/eslint-plugin/src/rules/triple-slash-reference.ts +++ b/packages/eslint-plugin/src/rules/triple-slash-reference.ts @@ -21,7 +21,6 @@ export default util.createRule({ docs: { description: 'Sets preference level for triple slash directives versus ES6-style import declarations', - category: 'Best Practices', recommended: 'error', }, messages: { diff --git a/packages/eslint-plugin/src/rules/type-annotation-spacing.ts b/packages/eslint-plugin/src/rules/type-annotation-spacing.ts index 0cf3e34b8b88..d02b8777d5ff 100644 --- a/packages/eslint-plugin/src/rules/type-annotation-spacing.ts +++ b/packages/eslint-plugin/src/rules/type-annotation-spacing.ts @@ -114,7 +114,6 @@ export default util.createRule({ type: 'layout', docs: { description: 'Require consistent spacing around type annotations', - category: 'Stylistic Issues', recommended: false, }, fixable: 'whitespace', diff --git a/packages/eslint-plugin/src/rules/typedef.ts b/packages/eslint-plugin/src/rules/typedef.ts index 766401040224..35655a9a803d 100644 --- a/packages/eslint-plugin/src/rules/typedef.ts +++ b/packages/eslint-plugin/src/rules/typedef.ts @@ -24,7 +24,6 @@ export default util.createRule<[Options], MessageIds>({ meta: { docs: { description: 'Requires type annotations to exist', - category: 'Stylistic Issues', recommended: false, }, messages: { diff --git a/packages/eslint-plugin/src/rules/unbound-method.ts b/packages/eslint-plugin/src/rules/unbound-method.ts index ecf9e6528190..15ddf8b89109 100644 --- a/packages/eslint-plugin/src/rules/unbound-method.ts +++ b/packages/eslint-plugin/src/rules/unbound-method.ts @@ -128,7 +128,6 @@ export default util.createRule({ name: 'unbound-method', meta: { docs: { - category: 'Best Practices', description: 'Enforces unbound methods are called with their expected scope', recommended: 'error', diff --git a/packages/eslint-plugin/src/rules/unified-signatures.ts b/packages/eslint-plugin/src/rules/unified-signatures.ts index dced203f1756..7481dcd70312 100644 --- a/packages/eslint-plugin/src/rules/unified-signatures.ts +++ b/packages/eslint-plugin/src/rules/unified-signatures.ts @@ -57,7 +57,6 @@ export default util.createRule({ docs: { description: 'Warns for any two overloads that could be unified into one by using a union or an optional/rest parameter', - category: 'Variables', // too opinionated to be recommended recommended: false, }, diff --git a/packages/eslint-plugin/tests/util/getWrappingFixer.test.ts b/packages/eslint-plugin/tests/util/getWrappingFixer.test.ts index 223061762115..bcbb4c6d5fbb 100644 --- a/packages/eslint-plugin/tests/util/getWrappingFixer.test.ts +++ b/packages/eslint-plugin/tests/util/getWrappingFixer.test.ts @@ -10,7 +10,6 @@ const rule = createRule({ fixable: 'code', docs: { description: 'Add void operator in random places for test purposes.', - category: 'Stylistic Issues', recommended: false, }, messages: { diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index e17de9f6eba3..9db521b2850c 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -1,19 +1,11 @@ -import { JSONSchema4 } from '../json-schema'; -import { ParserServices, TSESTree } from '../ts-estree'; -import { AST } from './AST'; -import { Linter } from './Linter'; -import { Scope } from './Scope'; -import { SourceCode } from './SourceCode'; +import type { JSONSchema4 } from '../json-schema'; +import type { ParserServices, TSESTree } from '../ts-estree'; +import type { AST } from './AST'; +import type { Linter } from './Linter'; +import type { Scope } from './Scope'; +import type { SourceCode } from './SourceCode'; interface RuleMetaDataDocs { - /** - * The general category the rule falls within - */ - category: - | 'Best Practices' - | 'Stylistic Issues' - | 'Variables' - | 'Possible Errors'; /** * Concise description of the rule */ diff --git a/packages/experimental-utils/tests/eslint-utils/RuleCreator.test.ts b/packages/experimental-utils/tests/eslint-utils/RuleCreator.test.ts index 343d5f0e1aad..34b314b8a261 100644 --- a/packages/experimental-utils/tests/eslint-utils/RuleCreator.test.ts +++ b/packages/experimental-utils/tests/eslint-utils/RuleCreator.test.ts @@ -13,7 +13,6 @@ describe('RuleCreator', () => { meta: { docs: { description: 'some description', - category: 'Best Practices', recommended: 'error', requiresTypeChecking: true, }, @@ -31,7 +30,6 @@ describe('RuleCreator', () => { expect(rule.meta).toEqual({ docs: { description: 'some description', - category: 'Best Practices', url: 'test/test', recommended: 'error', requiresTypeChecking: true, diff --git a/yarn.lock b/yarn.lock index 80ea8600a6df..83194d3d9c8d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4373,9 +4373,9 @@ eslint-visitor-keys@^3.0.0: integrity sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q== eslint@^8.0.0-0: - version "8.0.0-beta.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.0.0-beta.0.tgz#965fa5161b7cc93f1c82fb9c617a3814dc95ba38" - integrity sha512-Q5wCLXSpq+RIa9QBrmHApNCpgqjBU5aeQbVfeAuc9DyBIWzsdivbiirbCmYBrdoFWUoGSYCYWSIpqrS2une7jg== + version "8.0.0-beta.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.0.0-beta.1.tgz#5cd74684dbcfd8abee08cc10de578294124539b5" + integrity sha512-+3EHhCIJHUXuksq6dUSe1Nv9+sdFaLfct6ZiWdFYrHU8u9tX6QQWGdKJQuQXUlUdhMMh6cchRFIQ7OqSAcyq7A== dependencies: "@eslint/eslintrc" "^1.0.0" "@humanwhocodes/config-array" "^0.6.0" From 58235241714596b641a1e8b39c569e561e0039b4 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 28 Aug 2021 18:42:30 -0400 Subject: [PATCH 414/473] feat(eslint-plugin): removed value from abstract property nodes (#3765) * chore: bump @types/jest from 26.0.24 to 27.0.1 (#3748) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.24 to 27.0.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) --- updated-dependencies: - dependency-name: "@types/jest" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: address comments Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brad Zacher --- .../element/TSAbstractClassProperty/spec.ts | 2 + .../rules/explicit-module-boundary-types.ts | 1 - .../src/rules/member-ordering.ts | 1 + .../tests/rules/member-ordering.test.ts | 18 ++--- .../eslint-plugin/tests/rules/quotes.test.ts | 63 +++++----------- .../src/referencer/ClassVisitor.ts | 4 +- ...ract-class-with-abstract-properties.src.ts | 2 +- ...ass-with-abstract-readonly-property.src.ts | 2 +- packages/typescript-estree/src/convert.ts | 2 +- .../tests/ast-alignment/utils.ts | 1 + ...class-with-abstract-properties.src.ts.shot | 74 +++++++++++-------- ...ith-abstract-readonly-property.src.ts.shot | 74 +++++++++++-------- ...t-class-with-override-property.src.ts.shot | 20 +---- packages/visitor-keys/src/visitor-keys.ts | 2 +- 14 files changed, 128 insertions(+), 138 deletions(-) diff --git a/packages/ast-spec/src/element/TSAbstractClassProperty/spec.ts b/packages/ast-spec/src/element/TSAbstractClassProperty/spec.ts index 0d845a893290..a7f1dc56b2d5 100644 --- a/packages/ast-spec/src/element/TSAbstractClassProperty/spec.ts +++ b/packages/ast-spec/src/element/TSAbstractClassProperty/spec.ts @@ -7,11 +7,13 @@ import type { export interface TSAbstractClassPropertyComputedName extends ClassPropertyComputedNameBase { type: AST_NODE_TYPES.TSAbstractClassProperty; + value: null; } export interface TSAbstractClassPropertyNonComputedName extends ClassPropertyNonComputedNameBase { type: AST_NODE_TYPES.TSAbstractClassProperty; + value: null; } export type TSAbstractClassProperty = diff --git a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts index 67301afc4406..23ac46434dac 100644 --- a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts +++ b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts @@ -337,7 +337,6 @@ export default util.createRule({ return; case AST_NODE_TYPES.ClassProperty: - case AST_NODE_TYPES.TSAbstractClassProperty: if (node.accessibility === 'private') { return; } diff --git a/packages/eslint-plugin/src/rules/member-ordering.ts b/packages/eslint-plugin/src/rules/member-ordering.ts index 13a4fb65ae5c..b913f91b871b 100644 --- a/packages/eslint-plugin/src/rules/member-ordering.ts +++ b/packages/eslint-plugin/src/rules/member-ordering.ts @@ -251,6 +251,7 @@ function getNodeType(node: Member): string | null { case AST_NODE_TYPES.TSConstructSignatureDeclaration: return 'constructor'; case AST_NODE_TYPES.TSAbstractClassProperty: + return 'field'; case AST_NODE_TYPES.ClassProperty: return node.value && functionExpressions.includes(node.value.type) ? 'method' diff --git a/packages/eslint-plugin/tests/rules/member-ordering.test.ts b/packages/eslint-plugin/tests/rules/member-ordering.test.ts index a0bbf7b12233..e457ef3daf4a 100644 --- a/packages/eslint-plugin/tests/rules/member-ordering.test.ts +++ b/packages/eslint-plugin/tests/rules/member-ordering.test.ts @@ -1311,7 +1311,7 @@ abstract class Foo { private D: string; protected static F(): {}; public E(): {}; - public abstract A = () => {}; + public abstract A(): void; protected abstract G(): void; } `, @@ -3618,7 +3618,7 @@ type Foo = { { code: ` abstract class Foo { - abstract A = () => {}; + abstract A(): void; B: string; } `, @@ -3639,9 +3639,6 @@ abstract class Foo { abstract class Foo { abstract A: () => {}; B: string; - public C() {}; - private D() {}; - abstract E() {}; } `, errors: [ @@ -3659,18 +3656,19 @@ abstract class Foo { { code: ` abstract class Foo { - B: string; - abstract C = () => {}; abstract A: () => {}; + B: string; + public C() {}; + private D() {}; + abstract E() {}; } `, - options: [{ default: ['method', 'constructor', 'field'] }], errors: [ { messageId: 'incorrectGroupOrder', data: { - name: 'C', - rank: 'field', + name: 'B', + rank: 'public abstract field', }, line: 4, column: 5, diff --git a/packages/eslint-plugin/tests/rules/quotes.test.ts b/packages/eslint-plugin/tests/rules/quotes.test.ts index ec757dda3e54..0d2549d7e101 100644 --- a/packages/eslint-plugin/tests/rules/quotes.test.ts +++ b/packages/eslint-plugin/tests/rules/quotes.test.ts @@ -455,16 +455,16 @@ class Foo { { code: ` abstract class Foo { - public abstract a = ""; - public abstract "a-b" = ""; + public abstract a: ""; + public abstract "a-b": ""; } `, }, { code: ` abstract class Foo { - public abstract a = ''; - public abstract 'a-b' = ''; + public abstract a: ''; + public abstract 'a-b': ''; } `, options: ['single'], @@ -472,8 +472,8 @@ abstract class Foo { { code: ` abstract class Foo { - public abstract a = \`\`; - public abstract 'a-b' = \`\`; + public abstract a: \`\`; + public abstract 'a-b': \`\`; } `, options: ['backtick'], @@ -1047,21 +1047,21 @@ class Foo { { code: ` abstract class Foo { - public abstract a = ''; - public abstract 'a-b' = ''; + public abstract a: ''; + public abstract 'a-b': ''; } `, output: ` abstract class Foo { - public abstract a = ""; - public abstract "a-b" = ""; + public abstract a: ""; + public abstract "a-b": ""; } `, errors: [ { ...useDoubleQuote, line: 3, - column: 23, + column: 22, }, { ...useDoubleQuote, @@ -1071,28 +1071,28 @@ abstract class Foo { { ...useDoubleQuote, line: 4, - column: 27, + column: 26, }, ], }, { code: ` abstract class Foo { - public abstract a = ""; - public abstract "a-b" = ""; + public abstract a: ""; + public abstract "a-b": ""; } `, output: ` abstract class Foo { - public abstract a = ''; - public abstract 'a-b' = ''; + public abstract a: ''; + public abstract 'a-b': ''; } `, errors: [ { ...useSingleQuote, line: 3, - column: 23, + column: 22, }, { ...useSingleQuote, @@ -1102,38 +1102,11 @@ abstract class Foo { { ...useSingleQuote, line: 4, - column: 27, + column: 26, }, ], options: ['single'], }, - { - code: ` -abstract class Foo { - public abstract a = ""; - public abstract "a-b" = ""; -} - `, - output: ` -abstract class Foo { - public abstract a = \`\`; - public abstract "a-b" = \`\`; -} - `, - errors: [ - { - ...useBacktick, - line: 3, - column: 23, - }, - { - ...useBacktick, - line: 4, - column: 27, - }, - ], - options: ['backtick'], - }, // TSAbstractMethodDefinition { diff --git a/packages/scope-manager/src/referencer/ClassVisitor.ts b/packages/scope-manager/src/referencer/ClassVisitor.ts index fff575831910..497c3a92ca83 100644 --- a/packages/scope-manager/src/referencer/ClassVisitor.ts +++ b/packages/scope-manager/src/referencer/ClassVisitor.ts @@ -237,7 +237,9 @@ class ClassVisitor extends Visitor { this.#referencer.visit(node.key); } - this.#referencer.visit(node.value); + if (node.type !== AST_NODE_TYPES.TSAbstractClassProperty) { + this.#referencer.visit(node.value); + } if ('decorators' in node) { node.decorators?.forEach(d => this.#referencer.visit(d)); diff --git a/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-properties.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-properties.src.ts index 42128953cb7d..223917818db9 100644 --- a/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-properties.src.ts +++ b/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-properties.src.ts @@ -1,4 +1,4 @@ abstract class Foo { abstract bar; - abstract baz = 3; + abstract baz: number; } diff --git a/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts index 8c28567ce8e7..d00921ef4674 100644 --- a/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts +++ b/packages/shared-fixtures/fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts @@ -1,3 +1,3 @@ abstract class Foo { - public abstract readonly foo = 'string'; + public abstract readonly foo: string; } diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index be13f690458c..da5ba78fbf86 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1109,7 +1109,7 @@ export class Converter { ? AST_NODE_TYPES.TSAbstractClassProperty : AST_NODE_TYPES.ClassProperty, key: this.convertChild(node.name), - value: this.convertChild(node.initializer), + value: isAbstract ? null : this.convertChild(node.initializer), computed: isComputedProperty(node.name), static: hasModifier(SyntaxKind.StaticKeyword, node), readonly: hasModifier(SyntaxKind.ReadonlyKeyword, node) || undefined, diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index d7dae6bcafe0..1bfd73b2cb88 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -176,6 +176,7 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any { if (node.abstract) { node.type = AST_NODE_TYPES.TSAbstractClassProperty; delete node.abstract; + node.value = null; } /** * TS 3.7: declare class properties diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot index 8c70b312e051..ffbc6466b98a 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot @@ -71,7 +71,7 @@ Object { }, "loc": Object { "end": Object { - "column": 21, + "column": 25, "line": 3, }, "start": Object { @@ -82,30 +82,46 @@ Object { "override": false, "range": Array [ 43, - 60, + 64, ], "readonly": undefined, "static": false, "type": "TSAbstractClassProperty", - "value": Object { + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 20, + "column": 24, "line": 3, }, "start": Object { - "column": 19, + "column": 16, "line": 3, }, }, "range": Array [ - 58, - 59, + 55, + 63, ], - "raw": "3", - "type": "Literal", - "value": 3, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 57, + 63, + ], + "type": "TSNumberKeyword", + }, }, + "value": null, }, ], "loc": Object { @@ -120,7 +136,7 @@ Object { }, "range": Array [ 19, - 62, + 66, ], "type": "ClassBody", }, @@ -154,7 +170,7 @@ Object { }, "range": Array [ 0, - 62, + 66, ], "superClass": null, "type": "ClassDeclaration", @@ -173,7 +189,7 @@ Object { }, "range": Array [ 0, - 63, + 67, ], "sourceType": "script", "tokens": Array [ @@ -342,53 +358,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 17, "line": 3, }, "start": Object { - "column": 17, + "column": 16, "line": 3, }, }, "range": Array [ + 55, 56, - 57, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 24, "line": 3, }, "start": Object { - "column": 19, + "column": 18, "line": 3, }, }, "range": Array [ - 58, - 59, + 57, + 63, ], - "type": "Numeric", - "value": "3", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 25, "line": 3, }, "start": Object { - "column": 20, + "column": 24, "line": 3, }, }, "range": Array [ - 59, - 60, + 63, + 64, ], "type": "Punctuator", "value": ";", @@ -405,8 +421,8 @@ Object { }, }, "range": Array [ - 61, - 62, + 65, + 66, ], "type": "Punctuator", "value": "}", diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot index 44ba579e1f77..61229f3a6121 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot @@ -31,7 +31,7 @@ Object { }, "loc": Object { "end": Object { - "column": 42, + "column": 39, "line": 2, }, "start": Object { @@ -42,30 +42,46 @@ Object { "override": false, "range": Array [ 23, - 63, + 60, ], "readonly": true, "static": false, "type": "TSAbstractClassProperty", - "value": Object { + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 41, + "column": 38, "line": 2, }, "start": Object { - "column": 33, + "column": 30, "line": 2, }, }, "range": Array [ - 54, - 62, + 51, + 59, ], - "raw": "'string'", - "type": "Literal", - "value": "string", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 53, + 59, + ], + "type": "TSStringKeyword", + }, }, + "value": null, }, ], "loc": Object { @@ -80,7 +96,7 @@ Object { }, "range": Array [ 19, - 65, + 62, ], "type": "ClassBody", }, @@ -114,7 +130,7 @@ Object { }, "range": Array [ 0, - 65, + 62, ], "superClass": null, "type": "ClassDeclaration", @@ -133,7 +149,7 @@ Object { }, "range": Array [ 0, - 66, + 63, ], "sourceType": "script", "tokens": Array [ @@ -284,53 +300,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 32, + "column": 31, "line": 2, }, "start": Object { - "column": 31, + "column": 30, "line": 2, }, }, "range": Array [ + 51, 52, - 53, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 38, "line": 2, }, "start": Object { - "column": 33, + "column": 32, "line": 2, }, }, "range": Array [ - 54, - 62, + 53, + 59, ], - "type": "String", - "value": "'string'", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 39, "line": 2, }, "start": Object { - "column": 41, + "column": 38, "line": 2, }, }, "range": Array [ - 62, - 63, + 59, + 60, ], "type": "Punctuator", "value": ";", @@ -347,8 +363,8 @@ Object { }, }, "range": Array [ - 64, - 65, + 61, + 62, ], "type": "Punctuator", "value": "}", diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot index ec1973cbc7ed..005003a72ef8 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot @@ -46,25 +46,7 @@ Object { "readonly": undefined, "static": false, "type": "TSAbstractClassProperty", - "value": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 86, - 87, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, + "value": null, }, ], "loc": Object { diff --git a/packages/visitor-keys/src/visitor-keys.ts b/packages/visitor-keys/src/visitor-keys.ts index 036bfe5763e3..6430592217c2 100644 --- a/packages/visitor-keys/src/visitor-keys.ts +++ b/packages/visitor-keys/src/visitor-keys.ts @@ -63,7 +63,7 @@ const additionalKeys: AdditionalKeys = { Decorator: ['expression'], // TS-prefixed nodes - TSAbstractClassProperty: ['decorators', 'key', 'typeAnnotation', 'value'], + TSAbstractClassProperty: ['decorators', 'key', 'typeAnnotation'], TSAbstractKeyword: [], TSAbstractMethodDefinition: ['key', 'value'], TSAnyKeyword: [], From 22fa5c0c4705ed2898f00b7cacc5dd642d859275 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 28 Aug 2021 16:21:58 -0700 Subject: [PATCH 415/473] feat: align class property representation with ESTree (#3806) Half of #3430 Closes #3077 --- packages/ast-spec/src/ast-node-types.ts | 4 +- ...pertyBase.ts => PropertyDefinitionBase.ts} | 8 +- .../src/element/ClassProperty/spec.ts | 19 ---- .../src/element/PropertyDefinition/spec.ts | 19 ++++ .../element/TSAbstractClassProperty/spec.ts | 21 ---- .../TSAbstractPropertyDefinition/spec.ts | 21 ++++ packages/ast-spec/src/element/spec.ts | 4 +- packages/ast-spec/src/unions/ClassElement.ts | 8 +- packages/ast-spec/src/unions/Node.ts | 8 +- .../src/rules/class-literal-property-style.ts | 2 +- .../rules/explicit-member-accessibility.ts | 26 +++-- .../rules/explicit-module-boundary-types.ts | 2 +- .../src/rules/indent-new-do-not-use/index.ts | 4 +- packages/eslint-plugin/src/rules/indent.ts | 12 +-- .../src/rules/member-ordering.ts | 10 +- .../src/rules/naming-convention.ts | 26 ++--- .../eslint-plugin/src/rules/no-extra-semi.ts | 8 +- .../src/rules/no-inferrable-types.ts | 8 +- .../src/rules/no-invalid-this.ts | 4 +- .../src/rules/no-invalid-void-type.ts | 2 +- .../src/rules/no-magic-numbers.ts | 6 +- .../src/rules/no-unsafe-assignment.ts | 4 +- .../src/rules/prefer-return-this-type.ts | 4 +- packages/eslint-plugin/src/rules/quotes.ts | 4 +- packages/eslint-plugin/src/rules/semi.ts | 4 +- .../src/rules/space-infix-ops.ts | 6 +- packages/eslint-plugin/src/rules/typedef.ts | 2 +- .../src/util/explicitReturnTypeUtils.ts | 14 +-- packages/eslint-plugin/src/util/misc.ts | 6 +- .../tests/rules/indent/indent.test.ts | 2 +- .../tests/rules/no-extra-semi.test.ts | 99 ++++++++++++++--- .../eslint-plugin/tests/rules/quotes.test.ts | 8 +- .../src/ast-utils/predicates.ts | 4 +- .../experimental-utils/src/ts-eslint/Rule.ts | 8 +- packages/scope-manager/src/ScopeManager.ts | 10 ++ .../src/referencer/ClassVisitor.ts | 30 ++++-- .../src/scope/ClassFieldInitializerScope.ts | 28 +++++ packages/scope-manager/src/scope/Scope.ts | 2 + packages/scope-manager/src/scope/ScopeBase.ts | 3 +- packages/scope-manager/src/scope/ScopeType.ts | 1 + packages/scope-manager/src/scope/index.ts | 1 + .../tests/eslint-scope/class-fields.test.ts | 101 ++++++++++++++++++ .../class/declaration/computed-member.ts.shot | 13 ++- .../fixtures/class/declaration/properties.ts | 6 +- .../class/declaration/properties.ts.shot | 94 ++++++++++++---- .../class/expression/computed-member.ts.shot | 13 ++- .../fixtures/class/expression/properties.ts | 4 +- .../class/expression/properties.ts.shot | 78 +++++++++++--- packages/scope-manager/tests/util/expect.ts | 7 ++ packages/typescript-estree/src/convert.ts | 6 +- .../src/ts-estree/estree-to-ts-node-types.ts | 4 +- .../tests/ast-alignment/parse.ts | 9 +- .../tests/ast-alignment/utils.ts | 6 +- .../__snapshots__/semanticInfo.test.ts.snap | 2 +- .../tests/lib/semanticInfo.test.ts | 2 +- ...class-with-abstract-properties.src.ts.shot | 4 +- ...ith-abstract-readonly-property.src.ts.shot | 2 +- ...-class-with-declare-properties.src.ts.shot | 10 +- ...t-class-with-override-property.src.ts.shot | 2 +- .../basics/class-static-blocks.src.ts.shot | 2 +- ...s-with-accessibility-modifiers.src.ts.shot | 4 +- .../class-with-declare-properties.src.ts.shot | 14 +-- ...class-with-definite-assignment.src.ts.shot | 2 +- ...ith-optional-computed-property.src.ts.shot | 2 +- ...class-with-optional-properties.src.ts.shot | 18 ++-- ...th-optional-property-undefined.src.ts.shot | 2 +- .../class-with-override-property.src.ts.shot | 2 +- .../class-with-property-function.src.ts.shot | 4 +- .../class-with-property-values.src.ts.shot | 10 +- .../class-with-readonly-property.src.ts.shot | 2 +- ...object-with-escaped-properties.src.ts.shot | 2 +- .../type-assertion-in-method.src.ts.shot | 2 +- ...assertion-with-guard-in-method.src.ts.shot | 2 +- .../basics/type-guard-in-method.src.ts.shot | 2 +- .../type-reference-comments.src.ts.shot | 2 +- ...orator-factory-instance-member.src.ts.shot | 4 +- ...ecorator-factory-static-member.src.ts.shot | 4 +- ...erty-decorator-instance-member.src.ts.shot | 4 +- ...operty-decorator-static-member.src.ts.shot | 4 +- .../types/this-type-expanded.src.ts.shot | 2 +- packages/visitor-keys/src/visitor-keys.ts | 4 +- 81 files changed, 651 insertions(+), 268 deletions(-) rename packages/ast-spec/src/base/{ClassPropertyBase.ts => PropertyDefinitionBase.ts} (77%) delete mode 100644 packages/ast-spec/src/element/ClassProperty/spec.ts create mode 100644 packages/ast-spec/src/element/PropertyDefinition/spec.ts delete mode 100644 packages/ast-spec/src/element/TSAbstractClassProperty/spec.ts create mode 100644 packages/ast-spec/src/element/TSAbstractPropertyDefinition/spec.ts create mode 100644 packages/scope-manager/src/scope/ClassFieldInitializerScope.ts create mode 100644 packages/scope-manager/tests/eslint-scope/class-fields.test.ts diff --git a/packages/ast-spec/src/ast-node-types.ts b/packages/ast-spec/src/ast-node-types.ts index 9a38d477acfc..3f6b2a81082a 100644 --- a/packages/ast-spec/src/ast-node-types.ts +++ b/packages/ast-spec/src/ast-node-types.ts @@ -14,7 +14,6 @@ export enum AST_NODE_TYPES { ClassBody = 'ClassBody', ClassDeclaration = 'ClassDeclaration', ClassExpression = 'ClassExpression', - ClassProperty = 'ClassProperty', ConditionalExpression = 'ConditionalExpression', ContinueStatement = 'ContinueStatement', DebuggerStatement = 'DebuggerStatement', @@ -64,6 +63,7 @@ export enum AST_NODE_TYPES { ObjectPattern = 'ObjectPattern', Program = 'Program', Property = 'Property', + PropertyDefinition = 'PropertyDefinition', RestElement = 'RestElement', ReturnStatement = 'ReturnStatement', SequenceExpression = 'SequenceExpression', @@ -88,9 +88,9 @@ export enum AST_NODE_TYPES { /** * TS-prefixed nodes */ - TSAbstractClassProperty = 'TSAbstractClassProperty', TSAbstractKeyword = 'TSAbstractKeyword', TSAbstractMethodDefinition = 'TSAbstractMethodDefinition', + TSAbstractPropertyDefinition = 'TSAbstractPropertyDefinition', TSAnyKeyword = 'TSAnyKeyword', TSArrayType = 'TSArrayType', TSAsExpression = 'TSAsExpression', diff --git a/packages/ast-spec/src/base/ClassPropertyBase.ts b/packages/ast-spec/src/base/PropertyDefinitionBase.ts similarity index 77% rename from packages/ast-spec/src/base/ClassPropertyBase.ts rename to packages/ast-spec/src/base/PropertyDefinitionBase.ts index 7717e02c4ca3..a70a21479ae7 100644 --- a/packages/ast-spec/src/base/ClassPropertyBase.ts +++ b/packages/ast-spec/src/base/PropertyDefinitionBase.ts @@ -9,7 +9,7 @@ import type { import type { Accessibility } from './Accessibility'; import type { BaseNode } from './BaseNode'; -interface ClassPropertyBase extends BaseNode { +interface PropertyDefinitionBase extends BaseNode { key: PropertyName; value: Expression | null; computed: boolean; @@ -24,12 +24,14 @@ interface ClassPropertyBase extends BaseNode { override?: boolean; } -export interface ClassPropertyComputedNameBase extends ClassPropertyBase { +export interface PropertyDefinitionComputedNameBase + extends PropertyDefinitionBase { key: PropertyNameComputed; computed: true; } -export interface ClassPropertyNonComputedNameBase extends ClassPropertyBase { +export interface PropertyDefinitionNonComputedNameBase + extends PropertyDefinitionBase { key: PropertyNameNonComputed; computed: false; } diff --git a/packages/ast-spec/src/element/ClassProperty/spec.ts b/packages/ast-spec/src/element/ClassProperty/spec.ts deleted file mode 100644 index 29fe75aa84e6..000000000000 --- a/packages/ast-spec/src/element/ClassProperty/spec.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { AST_NODE_TYPES } from '../../ast-node-types'; -import type { - ClassPropertyComputedNameBase, - ClassPropertyNonComputedNameBase, -} from '../../base/ClassPropertyBase'; - -export interface ClassPropertyComputedName - extends ClassPropertyComputedNameBase { - type: AST_NODE_TYPES.ClassProperty; -} - -export interface ClassPropertyNonComputedName - extends ClassPropertyNonComputedNameBase { - type: AST_NODE_TYPES.ClassProperty; -} - -export type ClassProperty = - | ClassPropertyComputedName - | ClassPropertyNonComputedName; diff --git a/packages/ast-spec/src/element/PropertyDefinition/spec.ts b/packages/ast-spec/src/element/PropertyDefinition/spec.ts new file mode 100644 index 000000000000..4f79c2eb8345 --- /dev/null +++ b/packages/ast-spec/src/element/PropertyDefinition/spec.ts @@ -0,0 +1,19 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { + PropertyDefinitionComputedNameBase, + PropertyDefinitionNonComputedNameBase, +} from '../../base/PropertyDefinitionBase'; + +export interface PropertyDefinitionComputedName + extends PropertyDefinitionComputedNameBase { + type: AST_NODE_TYPES.PropertyDefinition; +} + +export interface PropertyDefinitionNonComputedName + extends PropertyDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.PropertyDefinition; +} + +export type PropertyDefinition = + | PropertyDefinitionComputedName + | PropertyDefinitionNonComputedName; diff --git a/packages/ast-spec/src/element/TSAbstractClassProperty/spec.ts b/packages/ast-spec/src/element/TSAbstractClassProperty/spec.ts deleted file mode 100644 index a7f1dc56b2d5..000000000000 --- a/packages/ast-spec/src/element/TSAbstractClassProperty/spec.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { AST_NODE_TYPES } from '../../ast-node-types'; -import type { - ClassPropertyComputedNameBase, - ClassPropertyNonComputedNameBase, -} from '../../base/ClassPropertyBase'; - -export interface TSAbstractClassPropertyComputedName - extends ClassPropertyComputedNameBase { - type: AST_NODE_TYPES.TSAbstractClassProperty; - value: null; -} - -export interface TSAbstractClassPropertyNonComputedName - extends ClassPropertyNonComputedNameBase { - type: AST_NODE_TYPES.TSAbstractClassProperty; - value: null; -} - -export type TSAbstractClassProperty = - | TSAbstractClassPropertyComputedName - | TSAbstractClassPropertyNonComputedName; diff --git a/packages/ast-spec/src/element/TSAbstractPropertyDefinition/spec.ts b/packages/ast-spec/src/element/TSAbstractPropertyDefinition/spec.ts new file mode 100644 index 000000000000..c7032669fc9f --- /dev/null +++ b/packages/ast-spec/src/element/TSAbstractPropertyDefinition/spec.ts @@ -0,0 +1,21 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { + PropertyDefinitionComputedNameBase, + PropertyDefinitionNonComputedNameBase, +} from '../../base/PropertyDefinitionBase'; + +export interface TSAbstractPropertyDefinitionComputedName + extends PropertyDefinitionComputedNameBase { + type: AST_NODE_TYPES.TSAbstractPropertyDefinition; + value: null; +} + +export interface TSAbstractPropertyDefinitionNonComputedName + extends PropertyDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.TSAbstractPropertyDefinition; + value: null; +} + +export type TSAbstractPropertyDefinition = + | TSAbstractPropertyDefinitionComputedName + | TSAbstractPropertyDefinitionNonComputedName; diff --git a/packages/ast-spec/src/element/spec.ts b/packages/ast-spec/src/element/spec.ts index a31caecced39..77ed3f2f283d 100644 --- a/packages/ast-spec/src/element/spec.ts +++ b/packages/ast-spec/src/element/spec.ts @@ -1,9 +1,9 @@ -export * from './ClassProperty/spec'; +export * from './PropertyDefinition/spec'; export * from './MethodDefinition/spec'; export * from './Property/spec'; export * from './SpreadElement/spec'; export * from './StaticBlock/spec'; -export * from './TSAbstractClassProperty/spec'; +export * from './TSAbstractPropertyDefinition/spec'; export * from './TSAbstractMethodDefinition/spec'; export * from './TSCallSignatureDeclaration/spec'; export * from './TSConstructSignatureDeclaration/spec'; diff --git a/packages/ast-spec/src/unions/ClassElement.ts b/packages/ast-spec/src/unions/ClassElement.ts index c174c4ce6c72..27d4ec4d752c 100644 --- a/packages/ast-spec/src/unions/ClassElement.ts +++ b/packages/ast-spec/src/unions/ClassElement.ts @@ -1,14 +1,14 @@ -import type { ClassProperty } from '../element/ClassProperty/spec'; import type { MethodDefinition } from '../element/MethodDefinition/spec'; +import type { PropertyDefinition } from '../element/PropertyDefinition/spec'; import type { StaticBlock } from '../element/StaticBlock/spec'; -import type { TSAbstractClassProperty } from '../element/TSAbstractClassProperty/spec'; import type { TSAbstractMethodDefinition } from '../element/TSAbstractMethodDefinition/spec'; +import type { TSAbstractPropertyDefinition } from '../element/TSAbstractPropertyDefinition/spec'; import type { TSIndexSignature } from '../element/TSIndexSignature/spec'; export type ClassElement = - | ClassProperty | MethodDefinition + | PropertyDefinition | StaticBlock - | TSAbstractClassProperty | TSAbstractMethodDefinition + | TSAbstractPropertyDefinition | TSIndexSignature; diff --git a/packages/ast-spec/src/unions/Node.ts b/packages/ast-spec/src/unions/Node.ts index 7fe5ced96dfc..4b3c54a09eb9 100644 --- a/packages/ast-spec/src/unions/Node.ts +++ b/packages/ast-spec/src/unions/Node.ts @@ -12,13 +12,13 @@ import type { TSModuleDeclaration } from '../declaration/TSModuleDeclaration/spe import type { TSNamespaceExportDeclaration } from '../declaration/TSNamespaceExportDeclaration/spec'; import type { TSTypeAliasDeclaration } from '../declaration/TSTypeAliasDeclaration/spec'; import type { VariableDeclaration } from '../declaration/VariableDeclaration/spec'; -import type { ClassProperty } from '../element/ClassProperty/spec'; import type { MethodDefinition } from '../element/MethodDefinition/spec'; import type { Property } from '../element/Property/spec'; +import type { PropertyDefinition } from '../element/PropertyDefinition/spec'; import type { SpreadElement } from '../element/SpreadElement/spec'; import type { StaticBlock } from '../element/StaticBlock/spec'; -import type { TSAbstractClassProperty } from '../element/TSAbstractClassProperty/spec'; import type { TSAbstractMethodDefinition } from '../element/TSAbstractMethodDefinition/spec'; +import type { TSAbstractPropertyDefinition } from '../element/TSAbstractPropertyDefinition/spec'; import type { TSCallSignatureDeclaration } from '../element/TSCallSignatureDeclaration/spec'; import type { TSConstructSignatureDeclaration } from '../element/TSConstructSignatureDeclaration/spec'; import type { TSEnumMember } from '../element/TSEnumMember/spec'; @@ -181,7 +181,6 @@ export type Node = | ClassBody | ClassDeclaration | ClassExpression - | ClassProperty | ConditionalExpression | ContinueStatement | DebuggerStatement @@ -231,6 +230,7 @@ export type Node = | ObjectPattern | Program | Property + | PropertyDefinition | RestElement | ReturnStatement | SequenceExpression @@ -245,9 +245,9 @@ export type Node = | ThisExpression | ThrowStatement | TryStatement - | TSAbstractClassProperty | TSAbstractKeyword | TSAbstractMethodDefinition + | TSAbstractPropertyDefinition | TSAnyKeyword | TSArrayType | TSAsExpression diff --git a/packages/eslint-plugin/src/rules/class-literal-property-style.ts b/packages/eslint-plugin/src/rules/class-literal-property-style.ts index dd3878e77a2f..b08161450155 100644 --- a/packages/eslint-plugin/src/rules/class-literal-property-style.ts +++ b/packages/eslint-plugin/src/rules/class-literal-property-style.ts @@ -99,7 +99,7 @@ export default util.createRule({ } return { - ClassProperty(node: TSESTree.ClassProperty): void { + PropertyDefinition(node: TSESTree.PropertyDefinition): void { if (!node.readonly || node.declare) { return; } diff --git a/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts b/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts index 89671fa7567a..2e73af17354b 100644 --- a/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts +++ b/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts @@ -162,7 +162,7 @@ export default util.createRule({ function getUnwantedPublicAccessibilityFixer( node: | TSESTree.MethodDefinition - | TSESTree.ClassProperty + | TSESTree.PropertyDefinition | TSESTree.TSParameterProperty, ): TSESLint.ReportFixFunction { return function (fixer: TSESLint.RuleFixer): TSESLint.RuleFix { @@ -198,30 +198,36 @@ export default util.createRule({ /** * Checks if property has an accessibility modifier. - * @param classProperty The node representing a ClassProperty. + * @param propertyDefinition The node representing a PropertyDefinition. */ function checkPropertyAccessibilityModifier( - classProperty: TSESTree.ClassProperty, + propertyDefinition: TSESTree.PropertyDefinition, ): void { const nodeType = 'class property'; - const propertyName = util.getNameFromMember(classProperty, sourceCode); + const propertyName = util.getNameFromMember( + propertyDefinition, + sourceCode, + ); if ( propCheck === 'no-public' && - classProperty.accessibility === 'public' + propertyDefinition.accessibility === 'public' ) { reportIssue( 'unwantedPublicAccessibility', nodeType, - classProperty, + propertyDefinition, propertyName, - getUnwantedPublicAccessibilityFixer(classProperty), + getUnwantedPublicAccessibilityFixer(propertyDefinition), ); - } else if (propCheck === 'explicit' && !classProperty.accessibility) { + } else if ( + propCheck === 'explicit' && + !propertyDefinition.accessibility + ) { reportIssue( 'missingAccessibility', nodeType, - classProperty, + propertyDefinition, propertyName, ); } @@ -273,7 +279,7 @@ export default util.createRule({ return { TSParameterProperty: checkParameterPropertyAccessibilityModifier, - ClassProperty: checkPropertyAccessibilityModifier, + PropertyDefinition: checkPropertyAccessibilityModifier, MethodDefinition: checkMethodAccessibilityModifier, }; }, diff --git a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts index 23ac46434dac..f9670cc98ee3 100644 --- a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts +++ b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts @@ -336,7 +336,7 @@ export default util.createRule({ } return; - case AST_NODE_TYPES.ClassProperty: + case AST_NODE_TYPES.PropertyDefinition: if (node.accessibility === 'private') { return; } diff --git a/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts b/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts index 863e7d0889d0..58da2c044e10 100644 --- a/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts +++ b/packages/eslint-plugin/src/rules/indent-new-do-not-use/index.ts @@ -113,7 +113,7 @@ const KNOWN_NODES = new Set([ AST_NODE_TYPES.ImportNamespaceSpecifier, // Class properties aren't yet supported by eslint... - AST_NODE_TYPES.ClassProperty, + AST_NODE_TYPES.PropertyDefinition, // ts keywords AST_NODE_TYPES.TSAbstractKeyword, @@ -129,7 +129,7 @@ const KNOWN_NODES = new Set([ AST_NODE_TYPES.TSNullKeyword, // ts specific nodes we want to support - AST_NODE_TYPES.TSAbstractClassProperty, + AST_NODE_TYPES.TSAbstractPropertyDefinition, AST_NODE_TYPES.TSAbstractMethodDefinition, AST_NODE_TYPES.TSArrayType, AST_NODE_TYPES.TSAsExpression, diff --git a/packages/eslint-plugin/src/rules/indent.ts b/packages/eslint-plugin/src/rules/indent.ts index 7835fd0e58d9..e057ca9886b3 100644 --- a/packages/eslint-plugin/src/rules/indent.ts +++ b/packages/eslint-plugin/src/rules/indent.ts @@ -19,7 +19,7 @@ type MessageIds = util.InferMessageIdsTypeFromRule; const KNOWN_NODES = new Set([ // Class properties aren't yet supported by eslint... - AST_NODE_TYPES.ClassProperty, + AST_NODE_TYPES.PropertyDefinition, // ts keywords AST_NODE_TYPES.TSAbstractKeyword, @@ -35,7 +35,7 @@ const KNOWN_NODES = new Set([ AST_NODE_TYPES.TSNullKeyword, // ts specific nodes we want to support - AST_NODE_TYPES.TSAbstractClassProperty, + AST_NODE_TYPES.TSAbstractPropertyDefinition, AST_NODE_TYPES.TSAbstractMethodDefinition, AST_NODE_TYPES.TSArrayType, AST_NODE_TYPES.TSAsExpression, @@ -136,7 +136,7 @@ export default util.createRule({ | TSESTree.TSEnumMember | TSESTree.TypeElement, type: - | AST_NODE_TYPES.ClassProperty + | AST_NODE_TYPES.PropertyDefinition | AST_NODE_TYPES.Property = AST_NODE_TYPES.Property, ): TSESTree.Node | null { const base = { @@ -168,7 +168,7 @@ export default util.createRule({ readonly: false, declare: false, ...base, - } as TSESTree.ClassProperty; + } as TSESTree.PropertyDefinition; } } @@ -330,8 +330,8 @@ export default util.createRule({ p => TSPropertySignatureToProperty( p, - AST_NODE_TYPES.ClassProperty, - ) as TSESTree.ClassProperty, + AST_NODE_TYPES.PropertyDefinition, + ) as TSESTree.PropertyDefinition, ), // location data diff --git a/packages/eslint-plugin/src/rules/member-ordering.ts b/packages/eslint-plugin/src/rules/member-ordering.ts index b913f91b871b..9f88228449b4 100644 --- a/packages/eslint-plugin/src/rules/member-ordering.ts +++ b/packages/eslint-plugin/src/rules/member-ordering.ts @@ -250,9 +250,9 @@ function getNodeType(node: Member): string | null { return 'call-signature'; case AST_NODE_TYPES.TSConstructSignatureDeclaration: return 'constructor'; - case AST_NODE_TYPES.TSAbstractClassProperty: + case AST_NODE_TYPES.TSAbstractPropertyDefinition: return 'field'; - case AST_NODE_TYPES.ClassProperty: + case AST_NODE_TYPES.PropertyDefinition: return node.value && functionExpressions.includes(node.value.type) ? 'method' : 'field'; @@ -278,8 +278,8 @@ function getMemberName( switch (node.type) { case AST_NODE_TYPES.TSPropertySignature: case AST_NODE_TYPES.TSMethodSignature: - case AST_NODE_TYPES.TSAbstractClassProperty: - case AST_NODE_TYPES.ClassProperty: + case AST_NODE_TYPES.TSAbstractPropertyDefinition: + case AST_NODE_TYPES.PropertyDefinition: return util.getNameFromMember(node, sourceCode); case AST_NODE_TYPES.TSAbstractMethodDefinition: case AST_NODE_TYPES.MethodDefinition: @@ -339,7 +339,7 @@ function getRank( } const abstract = - node.type === AST_NODE_TYPES.TSAbstractClassProperty || + node.type === AST_NODE_TYPES.TSAbstractPropertyDefinition || node.type === AST_NODE_TYPES.TSAbstractMethodDefinition; const scope = diff --git a/packages/eslint-plugin/src/rules/naming-convention.ts b/packages/eslint-plugin/src/rules/naming-convention.ts index 91456c7ccb23..6915c841473f 100644 --- a/packages/eslint-plugin/src/rules/naming-convention.ts +++ b/packages/eslint-plugin/src/rules/naming-convention.ts @@ -102,8 +102,8 @@ export default util.createRule({ validator: ValidatorFunction | null, node: | TSESTree.PropertyNonComputedName - | TSESTree.ClassPropertyNonComputedName - | TSESTree.TSAbstractClassPropertyNonComputedName + | TSESTree.PropertyDefinitionNonComputedName + | TSESTree.TSAbstractPropertyDefinitionNonComputedName | TSESTree.TSPropertySignatureNonComputedName | TSESTree.MethodDefinitionNonComputedName | TSESTree.TSAbstractMethodDefinitionNonComputedName @@ -124,8 +124,8 @@ export default util.createRule({ function getMemberModifiers( node: - | TSESTree.ClassProperty - | TSESTree.TSAbstractClassProperty + | TSESTree.PropertyDefinition + | TSESTree.TSAbstractPropertyDefinition | TSESTree.MethodDefinition | TSESTree.TSAbstractMethodDefinition | TSESTree.TSParameterProperty, @@ -143,7 +143,7 @@ export default util.createRule({ modifiers.add(Modifiers.readonly); } if ( - node.type === AST_NODE_TYPES.TSAbstractClassProperty || + node.type === AST_NODE_TYPES.TSAbstractPropertyDefinition || node.type === AST_NODE_TYPES.TSAbstractMethodDefinition ) { modifiers.add(Modifiers.abstract); @@ -330,10 +330,10 @@ export default util.createRule({ handleMember(validators.objectLiteralProperty, node, modifiers); }, - ':matches(ClassProperty, TSAbstractClassProperty)[computed = false][value.type != "ArrowFunctionExpression"][value.type != "FunctionExpression"][value.type != "TSEmptyBodyFunctionExpression"]'( + ':matches(PropertyDefinition, TSAbstractPropertyDefinition)[computed = false][value.type != "ArrowFunctionExpression"][value.type != "FunctionExpression"][value.type != "TSEmptyBodyFunctionExpression"]'( node: - | TSESTree.ClassPropertyNonComputedName - | TSESTree.TSAbstractClassPropertyNonComputedName, + | TSESTree.PropertyDefinitionNonComputedName + | TSESTree.TSAbstractPropertyDefinitionNonComputedName, ): void { const modifiers = getMemberModifiers(node); handleMember(validators.classProperty, node, modifiers); @@ -368,14 +368,14 @@ export default util.createRule({ }, [[ - ':matches(ClassProperty, TSAbstractClassProperty)[computed = false][value.type = "ArrowFunctionExpression"]', - ':matches(ClassProperty, TSAbstractClassProperty)[computed = false][value.type = "FunctionExpression"]', - ':matches(ClassProperty, TSAbstractClassProperty)[computed = false][value.type = "TSEmptyBodyFunctionExpression"]', + ':matches(PropertyDefinition, TSAbstractPropertyDefinition)[computed = false][value.type = "ArrowFunctionExpression"]', + ':matches(PropertyDefinition, TSAbstractPropertyDefinition)[computed = false][value.type = "FunctionExpression"]', + ':matches(PropertyDefinition, TSAbstractPropertyDefinition)[computed = false][value.type = "TSEmptyBodyFunctionExpression"]', ':matches(MethodDefinition, TSAbstractMethodDefinition)[computed = false][kind = "method"]', ].join(', ')]( node: - | TSESTree.ClassPropertyNonComputedName - | TSESTree.TSAbstractClassPropertyNonComputedName + | TSESTree.PropertyDefinitionNonComputedName + | TSESTree.TSAbstractPropertyDefinitionNonComputedName | TSESTree.MethodDefinitionNonComputedName | TSESTree.TSAbstractMethodDefinitionNonComputedName, ): void { diff --git a/packages/eslint-plugin/src/rules/no-extra-semi.ts b/packages/eslint-plugin/src/rules/no-extra-semi.ts index 5ed7372b08cc..4ae5cb5c396b 100644 --- a/packages/eslint-plugin/src/rules/no-extra-semi.ts +++ b/packages/eslint-plugin/src/rules/no-extra-semi.ts @@ -26,13 +26,15 @@ export default util.createRule({ return { ...rules, - ClassProperty(node): void { + 'TSAbstractMethodDefinition, TSAbstractPropertyDefinition'( + node: never, + ): void { if (rules.MethodDefinition) { // for ESLint <= v7 - rules.MethodDefinition(node as never); + rules.MethodDefinition(node); } else { // for ESLint v8 - rules['MethodDefinition, PropertyDefinition']?.(node as never); + rules['MethodDefinition, PropertyDefinition']?.(node); } }, }; diff --git a/packages/eslint-plugin/src/rules/no-inferrable-types.ts b/packages/eslint-plugin/src/rules/no-inferrable-types.ts index 23d8616e934e..9c8a1a14c20b 100644 --- a/packages/eslint-plugin/src/rules/no-inferrable-types.ts +++ b/packages/eslint-plugin/src/rules/no-inferrable-types.ts @@ -194,7 +194,7 @@ export default util.createRule({ node: | TSESTree.VariableDeclarator | TSESTree.Parameter - | TSESTree.ClassProperty, + | TSESTree.PropertyDefinition, typeNode: TSESTree.TSTypeAnnotation | undefined, initNode: TSESTree.Expression | null | undefined, ): void { @@ -252,7 +252,9 @@ export default util.createRule({ }); } - function inferrablePropertyVisitor(node: TSESTree.ClassProperty): void { + function inferrablePropertyVisitor( + node: TSESTree.PropertyDefinition, + ): void { // We ignore `readonly` because of Microsoft/TypeScript#14416 // Essentially a readonly property without a type // will result in its value being the type, leading to @@ -268,7 +270,7 @@ export default util.createRule({ FunctionExpression: inferrableParameterVisitor, FunctionDeclaration: inferrableParameterVisitor, ArrowFunctionExpression: inferrableParameterVisitor, - ClassProperty: inferrablePropertyVisitor, + PropertyDefinition: inferrablePropertyVisitor, }; }, }); diff --git a/packages/eslint-plugin/src/rules/no-invalid-this.ts b/packages/eslint-plugin/src/rules/no-invalid-this.ts index 9b8a4ac8d8af..1cd1be027b94 100644 --- a/packages/eslint-plugin/src/rules/no-invalid-this.ts +++ b/packages/eslint-plugin/src/rules/no-invalid-this.ts @@ -53,10 +53,10 @@ export default createRule({ return { ...rules, - ClassProperty(): void { + PropertyDefinition(): void { thisIsValidStack.push(true); }, - 'ClassProperty:exit'(): void { + 'PropertyDefinition:exit'(): void { thisIsValidStack.pop(); }, FunctionDeclaration(node: TSESTree.FunctionDeclaration): void { diff --git a/packages/eslint-plugin/src/rules/no-invalid-void-type.ts b/packages/eslint-plugin/src/rules/no-invalid-void-type.ts index 5c7829cde6cf..dceffa6d893e 100644 --- a/packages/eslint-plugin/src/rules/no-invalid-void-type.ts +++ b/packages/eslint-plugin/src/rules/no-invalid-void-type.ts @@ -68,7 +68,7 @@ export default util.createRule<[Options], MessageIds>({ const invalidGrandParents: AST_NODE_TYPES[] = [ AST_NODE_TYPES.TSPropertySignature, AST_NODE_TYPES.CallExpression, - AST_NODE_TYPES.ClassProperty, + AST_NODE_TYPES.PropertyDefinition, AST_NODE_TYPES.Identifier, ]; const validUnionMembers: AST_NODE_TYPES[] = [ diff --git a/packages/eslint-plugin/src/rules/no-magic-numbers.ts b/packages/eslint-plugin/src/rules/no-magic-numbers.ts index a434a06dcf9a..e63c80686c3d 100644 --- a/packages/eslint-plugin/src/rules/no-magic-numbers.ts +++ b/packages/eslint-plugin/src/rules/no-magic-numbers.ts @@ -77,7 +77,7 @@ export default util.createRule({ // Check if the node is a readonly class property if ( typeof node.value === 'number' && - isParentTSReadonlyClassProperty(node) + isParentTSReadonlyPropertyDefinition(node) ) { if (options.ignoreReadonlyClassProperties) { return; @@ -211,10 +211,10 @@ function isTSNumericLiteralType(node: TSESTree.Node): boolean { * @returns true if the node parent is a readonly class property * @private */ -function isParentTSReadonlyClassProperty(node: TSESTree.Literal): boolean { +function isParentTSReadonlyPropertyDefinition(node: TSESTree.Literal): boolean { const parent = getLiteralParent(node); - if (parent?.type === AST_NODE_TYPES.ClassProperty && parent.readonly) { + if (parent?.type === AST_NODE_TYPES.PropertyDefinition && parent.readonly) { return true; } diff --git a/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts b/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts index b14f43fe27f9..cb4b8e7c636a 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts @@ -336,7 +336,9 @@ export default util.createRule({ checkObjectDestructureHelper(node.id, init); } }, - 'ClassProperty[value != null]'(node: TSESTree.ClassProperty): void { + 'PropertyDefinition[value != null]'( + node: TSESTree.PropertyDefinition, + ): void { checkAssignment( node.key, node.value!, diff --git a/packages/eslint-plugin/src/rules/prefer-return-this-type.ts b/packages/eslint-plugin/src/rules/prefer-return-this-type.ts index b6be29efc043..15faf74d1ed3 100644 --- a/packages/eslint-plugin/src/rules/prefer-return-this-type.ts +++ b/packages/eslint-plugin/src/rules/prefer-return-this-type.ts @@ -154,7 +154,9 @@ export default createRule({ 'ClassBody > MethodDefinition'(node: TSESTree.MethodDefinition): void { checkFunction(node.value, node.parent!.parent as ClassLikeDeclaration); }, - 'ClassBody > ClassProperty'(node: TSESTree.ClassProperty): void { + 'ClassBody > PropertyDefinition'( + node: TSESTree.PropertyDefinition, + ): void { if ( !( node.value?.type === AST_NODE_TYPES.FunctionExpression || diff --git a/packages/eslint-plugin/src/rules/quotes.ts b/packages/eslint-plugin/src/rules/quotes.ts index e03556af63dd..a22782cc08ea 100644 --- a/packages/eslint-plugin/src/rules/quotes.ts +++ b/packages/eslint-plugin/src/rules/quotes.ts @@ -53,8 +53,8 @@ export default util.createRule({ case AST_NODE_TYPES.TSEnumMember: return node === parent.id; - case AST_NODE_TYPES.TSAbstractClassProperty: - case AST_NODE_TYPES.ClassProperty: + case AST_NODE_TYPES.TSAbstractPropertyDefinition: + case AST_NODE_TYPES.PropertyDefinition: return node === parent.key; default: diff --git a/packages/eslint-plugin/src/rules/semi.ts b/packages/eslint-plugin/src/rules/semi.ts index 40e631482aaf..647d2c21b3eb 100644 --- a/packages/eslint-plugin/src/rules/semi.ts +++ b/packages/eslint-plugin/src/rules/semi.ts @@ -51,8 +51,8 @@ export default util.createRule({ AST_NODE_TYPES.TSPropertySignature, */ const nodesToCheck = [ - AST_NODE_TYPES.ClassProperty, - AST_NODE_TYPES.TSAbstractClassProperty, + AST_NODE_TYPES.PropertyDefinition, + AST_NODE_TYPES.TSAbstractPropertyDefinition, AST_NODE_TYPES.TSAbstractMethodDefinition, AST_NODE_TYPES.TSDeclareFunction, AST_NODE_TYPES.TSExportAssignment, diff --git a/packages/eslint-plugin/src/rules/space-infix-ops.ts b/packages/eslint-plugin/src/rules/space-infix-ops.ts index 80294cd26718..fddeaac6fb6f 100644 --- a/packages/eslint-plugin/src/rules/space-infix-ops.ts +++ b/packages/eslint-plugin/src/rules/space-infix-ops.ts @@ -122,8 +122,8 @@ export default util.createRule({ * Check if it has an assignment char and report if it's faulty * @param node The node to report */ - function checkForClassPropertyAssignmentSpace( - node: TSESTree.ClassProperty, + function checkForPropertyDefinitionAssignmentSpace( + node: TSESTree.PropertyDefinition, ): void { const leftNode = sourceCode.getTokenByRangeStart( node.typeAnnotation?.range[0] ?? node.range[0], @@ -179,7 +179,7 @@ export default util.createRule({ return { ...rules, TSEnumMember: checkForEnumAssignmentSpace, - ClassProperty: checkForClassPropertyAssignmentSpace, + PropertyDefinition: checkForPropertyDefinitionAssignmentSpace, TSTypeAliasDeclaration: checkForTypeAliasAssignment, TSUnionType: checkForTypeAnnotationSpace, TSIntersectionType: checkForTypeAnnotationSpace, diff --git a/packages/eslint-plugin/src/rules/typedef.ts b/packages/eslint-plugin/src/rules/typedef.ts index 35655a9a803d..eaca1be209e9 100644 --- a/packages/eslint-plugin/src/rules/typedef.ts +++ b/packages/eslint-plugin/src/rules/typedef.ts @@ -159,7 +159,7 @@ export default util.createRule<[Options], MessageIds>({ checkParameters(node.params); } }, - ClassProperty(node): void { + PropertyDefinition(node): void { if (node.value && isVariableDeclarationIgnoreFunction(node.value)) { return; } diff --git a/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts b/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts index 881102b7e848..fd512749dfb0 100644 --- a/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts +++ b/packages/eslint-plugin/src/util/explicitReturnTypeUtils.ts @@ -32,10 +32,12 @@ function isVariableDeclaratorWithTypeAnnotation( * public x: Foo = ... * ``` */ -function isClassPropertyWithTypeAnnotation( +function isPropertyDefinitionWithTypeAnnotation( node: TSESTree.Node, -): node is TSESTree.ClassProperty { - return node.type === AST_NODE_TYPES.ClassProperty && !!node.typeAnnotation; +): node is TSESTree.PropertyDefinition { + return ( + node.type === AST_NODE_TYPES.PropertyDefinition && !!node.typeAnnotation + ); } /** @@ -81,7 +83,7 @@ function isPropertyOfObjectWithType( return ( isTypeAssertion(parent) || - isClassPropertyWithTypeAnnotation(parent) || + isPropertyDefinitionWithTypeAnnotation(parent) || isVariableDeclaratorWithTypeAnnotation(parent) || isFunctionArgument(parent) || isPropertyOfObjectWithType(parent) @@ -194,7 +196,7 @@ function isTypedFunctionExpression( return ( isTypeAssertion(parent) || isVariableDeclaratorWithTypeAnnotation(parent) || - isClassPropertyWithTypeAnnotation(parent) || + isPropertyDefinitionWithTypeAnnotation(parent) || isPropertyOfObjectWithType(parent) || isFunctionArgument(parent, node) || isConstructorArgument(parent) @@ -219,7 +221,7 @@ function isValidFunctionExpressionReturnType( parent.type !== AST_NODE_TYPES.VariableDeclarator && parent.type !== AST_NODE_TYPES.MethodDefinition && parent.type !== AST_NODE_TYPES.ExportDefaultDeclaration && - parent.type !== AST_NODE_TYPES.ClassProperty + parent.type !== AST_NODE_TYPES.PropertyDefinition ) { return true; } diff --git a/packages/eslint-plugin/src/util/misc.ts b/packages/eslint-plugin/src/util/misc.ts index e7e0991ba6a0..748a5cec6a6b 100644 --- a/packages/eslint-plugin/src/util/misc.ts +++ b/packages/eslint-plugin/src/util/misc.ts @@ -66,15 +66,15 @@ function getNameFromIndexSignature(node: TSESTree.TSIndexSignature): string { /** * Gets a string name representation of the name of the given MethodDefinition - * or ClassProperty node, with handling for computed property names. + * or PropertyDefinition node, with handling for computed property names. */ function getNameFromMember( member: | TSESTree.MethodDefinition | TSESTree.TSMethodSignature | TSESTree.TSAbstractMethodDefinition - | TSESTree.ClassProperty - | TSESTree.TSAbstractClassProperty + | TSESTree.PropertyDefinition + | TSESTree.TSAbstractPropertyDefinition | TSESTree.Property | TSESTree.TSPropertySignature, sourceCode: TSESLint.SourceCode, diff --git a/packages/eslint-plugin/tests/rules/indent/indent.test.ts b/packages/eslint-plugin/tests/rules/indent/indent.test.ts index f5c87316c171..3d6b58725f8b 100644 --- a/packages/eslint-plugin/tests/rules/indent/indent.test.ts +++ b/packages/eslint-plugin/tests/rules/indent/indent.test.ts @@ -39,7 +39,7 @@ abstract class Foo { ], }, { - node: AST_NODE_TYPES.TSAbstractClassProperty, + node: AST_NODE_TYPES.TSAbstractPropertyDefinition, code: [ ` class Foo { diff --git a/packages/eslint-plugin/tests/rules/no-extra-semi.test.ts b/packages/eslint-plugin/tests/rules/no-extra-semi.test.ts index db3ca1735325..4d2d870e7e50 100644 --- a/packages/eslint-plugin/tests/rules/no-extra-semi.test.ts +++ b/packages/eslint-plugin/tests/rules/no-extra-semi.test.ts @@ -32,7 +32,6 @@ ruleTester.run('no-extra-semi', rule, { }, { code: 'for(a of b);', - parserOptions: { ecmaVersion: 6 }, }, { code: 'if(true);', @@ -50,23 +49,18 @@ ruleTester.run('no-extra-semi', rule, { // Class body. { code: 'class A { }', - parserOptions: { ecmaVersion: 6 }, }, { code: 'var A = class { };', - parserOptions: { ecmaVersion: 6 }, }, { code: 'class A { a() { this; } }', - parserOptions: { ecmaVersion: 6 }, }, { code: 'var A = class { a() { this; } };', - parserOptions: { ecmaVersion: 6 }, }, { code: 'class A { } a;', - parserOptions: { ecmaVersion: 6 }, }, // modules @@ -159,7 +153,6 @@ export class Foo { { code: 'for(a of b);;', output: 'for(a of b);', - parserOptions: { ecmaVersion: 6 }, errors: [ { messageId: 'unexpected', @@ -228,7 +221,6 @@ export class Foo { { code: 'class A { ; }', output: 'class A { }', - parserOptions: { ecmaVersion: 6 }, errors: [ { messageId: 'unexpected', @@ -239,7 +231,6 @@ export class Foo { { code: 'class A { /*a*/; }', output: 'class A { /*a*/ }', - parserOptions: { ecmaVersion: 6 }, errors: [ { messageId: 'unexpected', @@ -250,7 +241,6 @@ export class Foo { { code: 'class A { ; a() {} }', output: 'class A { a() {} }', - parserOptions: { ecmaVersion: 6 }, errors: [ { messageId: 'unexpected', @@ -261,7 +251,6 @@ export class Foo { { code: 'class A { a() {}; }', output: 'class A { a() {} }', - parserOptions: { ecmaVersion: 6 }, errors: [ { messageId: 'unexpected', @@ -272,7 +261,6 @@ export class Foo { { code: 'class A { a() {}; b() {} }', output: 'class A { a() {} b() {} }', - parserOptions: { ecmaVersion: 6 }, errors: [ { messageId: 'unexpected', @@ -283,7 +271,6 @@ export class Foo { { code: 'class A {; a() {}; b() {}; }', output: 'class A { a() {} b() {} }', - parserOptions: { ecmaVersion: 6 }, errors: [ { messageId: 'unexpected', @@ -302,7 +289,6 @@ export class Foo { { code: 'class A { a() {}; get b() {} }', output: 'class A { a() {} get b() {} }', - parserOptions: { ecmaVersion: 6 }, errors: [ { messageId: 'unexpected', @@ -321,7 +307,6 @@ class Foo { public foo: number = 0; } `, - parserOptions: { ecmaVersion: 6 }, errors: [ { messageId: 'unexpected', @@ -342,7 +327,6 @@ class Foo { public baz: number = 1; } `, - parserOptions: { ecmaVersion: 6 }, errors: [ { messageId: 'unexpected', @@ -361,5 +345,88 @@ class Foo { }, ], }, + + // abstract prop/method + { + code: ` +class Foo { + abstract foo: number;; abstract bar: number;; + abstract baz: number;; +} + `, + output: ` +class Foo { + abstract foo: number; abstract bar: number; + abstract baz: number; +} + `, + errors: [ + { + messageId: 'unexpected', + line: 3, + column: 24, + }, + { + messageId: 'unexpected', + line: 3, + column: 47, + }, + { + messageId: 'unexpected', + line: 4, + column: 24, + }, + ], + }, + { + code: ` +class Foo { + abstract foo();; abstract bar();; + abstract baz();; + abstract foo(): void;; abstract bar(): void;; + abstract baz(): void;; +} + `, + output: ` +class Foo { + abstract foo(); abstract bar(); + abstract baz(); + abstract foo(): void; abstract bar(): void; + abstract baz(): void; +} + `, + errors: [ + { + messageId: 'unexpected', + line: 3, + column: 18, + }, + { + messageId: 'unexpected', + line: 3, + column: 35, + }, + { + messageId: 'unexpected', + line: 4, + column: 18, + }, + { + messageId: 'unexpected', + line: 5, + column: 24, + }, + { + messageId: 'unexpected', + line: 5, + column: 47, + }, + { + messageId: 'unexpected', + line: 6, + column: 24, + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/quotes.test.ts b/packages/eslint-plugin/tests/rules/quotes.test.ts index 0d2549d7e101..003d4fd19d7e 100644 --- a/packages/eslint-plugin/tests/rules/quotes.test.ts +++ b/packages/eslint-plugin/tests/rules/quotes.test.ts @@ -423,7 +423,7 @@ interface Foo { options: ['backtick'], }, - // ClassProperty + // PropertyDefinition { code: ` class Foo { @@ -451,7 +451,7 @@ class Foo { options: ['backtick'], }, - // TSAbstractClassProperty + // TSAbstractPropertyDefinition { code: ` abstract class Foo { @@ -951,7 +951,7 @@ interface Foo { options: ['single'], }, - // ClassProperty + // PropertyDefinition { code: ` class Foo { @@ -1043,7 +1043,7 @@ class Foo { options: ['backtick'], }, - // TSAbstractClassProperty + // TSAbstractPropertyDefinition { code: ` abstract class Foo { diff --git a/packages/experimental-utils/src/ast-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/predicates.ts index 5044dfcca6ef..825591978023 100644 --- a/packages/experimental-utils/src/ast-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/predicates.ts @@ -121,10 +121,10 @@ const isTSConstructorType = isNodeOfType(AST_NODE_TYPES.TSConstructorType); const isClassOrTypeElement = isNodeOfTypes([ // ClassElement - AST_NODE_TYPES.ClassProperty, + AST_NODE_TYPES.PropertyDefinition, AST_NODE_TYPES.FunctionExpression, AST_NODE_TYPES.MethodDefinition, - AST_NODE_TYPES.TSAbstractClassProperty, + AST_NODE_TYPES.TSAbstractPropertyDefinition, AST_NODE_TYPES.TSAbstractMethodDefinition, AST_NODE_TYPES.TSEmptyBodyFunctionExpression, AST_NODE_TYPES.TSIndexSignature, diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index 9db521b2850c..1759a20eff5a 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -271,8 +271,8 @@ interface RuleListener { ArrayExpression?: RuleFunction; ArrayPattern?: RuleFunction; ArrowFunctionExpression?: RuleFunction; - AssignmentPattern?: RuleFunction; AssignmentExpression?: RuleFunction; + AssignmentPattern?: RuleFunction; AwaitExpression?: RuleFunction; BigIntLiteral?: RuleFunction; BinaryExpression?: RuleFunction; @@ -284,7 +284,6 @@ interface RuleListener { ClassBody?: RuleFunction; ClassDeclaration?: RuleFunction; ClassExpression?: RuleFunction; - ClassProperty?: RuleFunction; ConditionalExpression?: RuleFunction; ContinueStatement?: RuleFunction; DebuggerStatement?: RuleFunction; @@ -333,6 +332,7 @@ interface RuleListener { ObjectPattern?: RuleFunction; Program?: RuleFunction; Property?: RuleFunction; + PropertyDefinition?: RuleFunction; RestElement?: RuleFunction; ReturnStatement?: RuleFunction; SequenceExpression?: RuleFunction; @@ -346,9 +346,9 @@ interface RuleListener { ThisExpression?: RuleFunction; ThrowStatement?: RuleFunction; TryStatement?: RuleFunction; - TSAbstractClassProperty?: RuleFunction; TSAbstractKeyword?: RuleFunction; TSAbstractMethodDefinition?: RuleFunction; + TSAbstractPropertyDefinition?: RuleFunction; TSAnyKeyword?: RuleFunction; TSArrayType?: RuleFunction; TSAsExpression?: RuleFunction; @@ -360,8 +360,8 @@ interface RuleListener { TSConditionalType?: RuleFunction; TSConstructorType?: RuleFunction; TSConstructSignatureDeclaration?: RuleFunction; - TSDeclareKeyword?: RuleFunction; TSDeclareFunction?: RuleFunction; + TSDeclareKeyword?: RuleFunction; TSEmptyBodyFunctionExpression?: RuleFunction; TSEnumDeclaration?: RuleFunction; TSEnumMember?: RuleFunction; diff --git a/packages/scope-manager/src/ScopeManager.ts b/packages/scope-manager/src/ScopeManager.ts index e4c9b4d3cdc4..3f360710cb0b 100644 --- a/packages/scope-manager/src/ScopeManager.ts +++ b/packages/scope-manager/src/ScopeManager.ts @@ -19,6 +19,7 @@ import { TypeScope, WithScope, } from './scope'; +import { ClassFieldInitializerScope } from './scope/ClassFieldInitializerScope'; import { Variable } from './variable'; @@ -168,6 +169,15 @@ class ScopeManager { return this.nestScope(new ClassScope(this, this.currentScope, node)); } + public nestClassFieldInitializerScope( + node: ClassFieldInitializerScope['block'], + ): ClassFieldInitializerScope { + assert(this.currentScope); + return this.nestScope( + new ClassFieldInitializerScope(this, this.currentScope, node), + ); + } + public nestConditionalTypeScope( node: ConditionalTypeScope['block'], ): ConditionalTypeScope { diff --git a/packages/scope-manager/src/referencer/ClassVisitor.ts b/packages/scope-manager/src/referencer/ClassVisitor.ts index 497c3a92ca83..d33e362ea41a 100644 --- a/packages/scope-manager/src/referencer/ClassVisitor.ts +++ b/packages/scope-manager/src/referencer/ClassVisitor.ts @@ -80,8 +80,8 @@ class ClassVisitor extends Visitor { this.#referencer.close(node); } - protected visitClassProperty( - node: TSESTree.TSAbstractClassProperty | TSESTree.ClassProperty, + protected visitPropertyDefinition( + node: TSESTree.TSAbstractPropertyDefinition | TSESTree.PropertyDefinition, ): void { this.visitProperty(node); /** @@ -229,16 +229,26 @@ class ClassVisitor extends Visitor { protected visitProperty( node: - | TSESTree.ClassProperty - | TSESTree.TSAbstractClassProperty + | TSESTree.PropertyDefinition + | TSESTree.TSAbstractPropertyDefinition | TSESTree.TSAbstractMethodDefinition, ): void { if (node.computed) { this.#referencer.visit(node.key); } - if (node.type !== AST_NODE_TYPES.TSAbstractClassProperty) { + if (node.value) { + if (node.type === AST_NODE_TYPES.PropertyDefinition) { + this.#referencer.scopeManager.nestClassFieldInitializerScope( + node.value, + ); + } + this.#referencer.visit(node.value); + + if (node.type === AST_NODE_TYPES.PropertyDefinition) { + this.#referencer.close(node.value); + } } if ('decorators' in node) { @@ -320,18 +330,18 @@ class ClassVisitor extends Visitor { this.visitChildren(node); } - protected ClassProperty(node: TSESTree.ClassProperty): void { - this.visitClassProperty(node); + protected PropertyDefinition(node: TSESTree.PropertyDefinition): void { + this.visitPropertyDefinition(node); } protected MethodDefinition(node: TSESTree.MethodDefinition): void { this.visitMethod(node); } - protected TSAbstractClassProperty( - node: TSESTree.TSAbstractClassProperty, + protected TSAbstractPropertyDefinition( + node: TSESTree.TSAbstractPropertyDefinition, ): void { - this.visitClassProperty(node); + this.visitPropertyDefinition(node); } protected TSAbstractMethodDefinition( diff --git a/packages/scope-manager/src/scope/ClassFieldInitializerScope.ts b/packages/scope-manager/src/scope/ClassFieldInitializerScope.ts new file mode 100644 index 000000000000..b176fb2060fc --- /dev/null +++ b/packages/scope-manager/src/scope/ClassFieldInitializerScope.ts @@ -0,0 +1,28 @@ +import { TSESTree } from '@typescript-eslint/types'; +import { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +import { ScopeManager } from '../ScopeManager'; + +class ClassFieldInitializerScope extends ScopeBase< + ScopeType.classFieldInitializer, + // the value expression itself is the block + TSESTree.Expression, + Scope +> { + constructor( + scopeManager: ScopeManager, + upperScope: ClassFieldInitializerScope['upper'], + block: ClassFieldInitializerScope['block'], + ) { + super( + scopeManager, + ScopeType.classFieldInitializer, + upperScope, + block, + false, + ); + } +} + +export { ClassFieldInitializerScope }; diff --git a/packages/scope-manager/src/scope/Scope.ts b/packages/scope-manager/src/scope/Scope.ts index 7df3f941629c..966e52a9456a 100644 --- a/packages/scope-manager/src/scope/Scope.ts +++ b/packages/scope-manager/src/scope/Scope.ts @@ -1,5 +1,6 @@ import { BlockScope } from './BlockScope'; import { CatchScope } from './CatchScope'; +import { ClassFieldInitializerScope } from './ClassFieldInitializerScope'; import { ClassScope } from './ClassScope'; import { ConditionalTypeScope } from './ConditionalTypeScope'; import { ForScope } from './ForScope'; @@ -19,6 +20,7 @@ type Scope = | BlockScope | CatchScope | ClassScope + | ClassFieldInitializerScope | ConditionalTypeScope | ForScope | FunctionExpressionNameScope diff --git a/packages/scope-manager/src/scope/ScopeBase.ts b/packages/scope-manager/src/scope/ScopeBase.ts index c06a7002c48b..34c9a338b5b1 100644 --- a/packages/scope-manager/src/scope/ScopeBase.ts +++ b/packages/scope-manager/src/scope/ScopeBase.ts @@ -125,8 +125,9 @@ const generator = createIdGenerator(); type VariableScope = GlobalScope | FunctionScope | ModuleScope | TSModuleScope; const VARIABLE_SCOPE_TYPES = new Set([ - ScopeType.global, + ScopeType.classFieldInitializer, ScopeType.function, + ScopeType.global, ScopeType.module, ScopeType.tsModule, ]); diff --git a/packages/scope-manager/src/scope/ScopeType.ts b/packages/scope-manager/src/scope/ScopeType.ts index 23d70fedbe80..8a63ffbdea7f 100644 --- a/packages/scope-manager/src/scope/ScopeType.ts +++ b/packages/scope-manager/src/scope/ScopeType.ts @@ -2,6 +2,7 @@ enum ScopeType { block = 'block', catch = 'catch', class = 'class', + classFieldInitializer = 'class-field-initializer', conditionalType = 'conditionalType', for = 'for', function = 'function', diff --git a/packages/scope-manager/src/scope/index.ts b/packages/scope-manager/src/scope/index.ts index 8e4683dbe68a..c94cc2982e1f 100644 --- a/packages/scope-manager/src/scope/index.ts +++ b/packages/scope-manager/src/scope/index.ts @@ -1,5 +1,6 @@ export * from './BlockScope'; export * from './CatchScope'; +export * from './ClassFieldInitializerScope'; export * from './ClassScope'; export * from './ConditionalTypeScope'; export * from './ForScope'; diff --git a/packages/scope-manager/tests/eslint-scope/class-fields.test.ts b/packages/scope-manager/tests/eslint-scope/class-fields.test.ts new file mode 100644 index 000000000000..541b46a2fff2 --- /dev/null +++ b/packages/scope-manager/tests/eslint-scope/class-fields.test.ts @@ -0,0 +1,101 @@ +import { + expectToBeClassFieldInitializerScope, + expectToBeIdentifier, +} from '../util'; +import { + expectToBeClassScope, + expectToBeGlobalScope, + parseAndAnalyze, +} from '../util'; + +describe('Class fields', () => { + it('class C { f = g }', () => { + const { scopeManager } = parseAndAnalyze('class C { f = g }'); + + const globalScope = scopeManager.scopes[0]; + expectToBeGlobalScope(globalScope); + + const classScope = globalScope.childScopes[0]; + // should create a class scope + expectToBeClassScope(classScope); + // The class scope has no references + expect(classScope.references).toHaveLength(0); + // The class scope has only the variable 'C'; it doesn't have the field name 'f'. + expect(classScope.variables).toHaveLength(1); + expect(classScope.variables[0].name).toBe('C'); + + const classFieldInitializerScope = classScope.childScopes[0]; + // The class scope has a class-field-initializer scope. + expectToBeClassFieldInitializerScope(classFieldInitializerScope); + // The class-field-initializer scope's block is the node of the field initializer. + expectToBeIdentifier(classFieldInitializerScope.block); + expect(classFieldInitializerScope.block.name).toBe('g'); + // The class-field-initializer scope's variableScope is itself. + expect(classFieldInitializerScope.variableScope).toBe( + classFieldInitializerScope, + ); + // The class-field-initializer scope has only the reference 'g'. + expect(classFieldInitializerScope.references).toHaveLength(1); + expect(classFieldInitializerScope.references[0].identifier.name).toBe('g'); + // The class-field-initializer scope has no variables. + expect(classFieldInitializerScope.variables).toHaveLength(0); + }); + + describe('class C { f }', () => { + const { scopeManager } = parseAndAnalyze('class C { f }'); + + const globalScope = scopeManager.scopes[0]; + expectToBeGlobalScope(globalScope); + + const classScope = globalScope.childScopes[0]; + // should create a class scope + expectToBeClassScope(classScope); + // The class scope has no references + expect(classScope.references).toHaveLength(0); + // The class scope has no child scopes; fields that don't have initializers don't create any class-field-initializer scopes. + expect(classScope.childScopes).toHaveLength(0); + // The class scope has only the variable 'C'; it doesn't have the field name 'f'. + expect(classScope.variables).toHaveLength(1); + expect(classScope.variables[0].name).toBe('C'); + }); + + describe('class C { [fname] }', () => { + const { scopeManager } = parseAndAnalyze('class C { [fname] }'); + + const globalScope = scopeManager.scopes[0]; + expectToBeGlobalScope(globalScope); + + const classScope = globalScope.childScopes[0]; + // should create a class scope + expectToBeClassScope(classScope); + // The class scope has only the reference `fname`. + expect(classScope.references).toHaveLength(1); + // The class scope has no child scopes; fields that don't have initializers don't create any class-field-initializer scopes. + expect(classScope.childScopes).toHaveLength(0); + }); + + describe('class C { [fname] = value }', () => { + const { scopeManager } = parseAndAnalyze('class C { [fname] = value }'); + + const globalScope = scopeManager.scopes[0]; + expectToBeGlobalScope(globalScope); + + const classScope = globalScope.childScopes[0]; + // should create a class scope + expectToBeClassScope(classScope); + // The class scope has only the reference `fname`; it doesn't have the reference 'value'. + expect(classScope.references).toHaveLength(1); + expect(classScope.references[0].identifier.name).toBe('fname'); + + const classFieldInitializerScope = classScope.childScopes[0]; + // The class scope has a class-field-initializer scope. + expectToBeClassFieldInitializerScope(classFieldInitializerScope); + // The class-field-initializer scope has the reference 'value'. + expect(classFieldInitializerScope.references).toHaveLength(1); + expect(classFieldInitializerScope.references[0].identifier.name).toBe( + 'value', + ); + // The class-field-initializer scope has no variables. + expect(classFieldInitializerScope.variables).toHaveLength(0); + }); +}); diff --git a/packages/scope-manager/tests/fixtures/class/declaration/computed-member.ts.shot b/packages/scope-manager/tests/fixtures/class/declaration/computed-member.ts.shot index fa221e5e540d..87bcc27ae85a 100644 --- a/packages/scope-manager/tests/fixtures/class/declaration/computed-member.ts.shot +++ b/packages/scope-manager/tests/fixtures/class/declaration/computed-member.ts.shot @@ -137,8 +137,17 @@ ScopeManager { Variable$5, ], }, - FunctionScope$3 { - block: FunctionExpression$7, + ClassFieldInitializerScope$3 { + block: Literal$7, + isStrict: true, + references: Array [], + set: Map {}, + type: "class-field-initializer", + upper: ClassScope$2, + variables: Array [], + }, + FunctionScope$4 { + block: FunctionExpression$8, isStrict: true, references: Array [], set: Map { diff --git a/packages/scope-manager/tests/fixtures/class/declaration/properties.ts b/packages/scope-manager/tests/fixtures/class/declaration/properties.ts index c047395435ad..e75d9def3e96 100644 --- a/packages/scope-manager/tests/fixtures/class/declaration/properties.ts +++ b/packages/scope-manager/tests/fixtures/class/declaration/properties.ts @@ -1,5 +1,7 @@ +const x = 1; class A { - prop = 1; + prop1 = 1; + prop2 = x; } -const unresolved = prop; +const unresolved = prop1; diff --git a/packages/scope-manager/tests/fixtures/class/declaration/properties.ts.shot b/packages/scope-manager/tests/fixtures/class/declaration/properties.ts.shot index 3592b97d80a5..180bf6246fb7 100644 --- a/packages/scope-manager/tests/fixtures/class/declaration/properties.ts.shot +++ b/packages/scope-manager/tests/fixtures/class/declaration/properties.ts.shot @@ -6,9 +6,40 @@ ScopeManager { ImplicitGlobalConstTypeVariable, Variable$2 { defs: Array [ - ClassNameDefinition$1 { + VariableDefinition$1 { + name: Identifier<"x">, + node: VariableDeclarator$1, + }, + ], + name: "x", + references: Array [ + Reference$1 { + identifier: Identifier<"x">, + init: true, + isRead: false, + isTypeReference: false, + isValueReference: true, + isWrite: true, + resolved: Variable$2, + writeExpr: Literal$2, + }, + Reference$2 { + identifier: Identifier<"x">, + isRead: true, + isTypeReference: false, + isValueReference: true, + isWrite: false, + resolved: Variable$2, + }, + ], + isValueVariable: true, + isTypeVariable: false, + }, + Variable$3 { + defs: Array [ + ClassNameDefinition$2 { name: Identifier<"A">, - node: ClassDeclaration$1, + node: ClassDeclaration$3, }, ], name: "A", @@ -16,11 +47,11 @@ ScopeManager { isValueVariable: true, isTypeVariable: true, }, - Variable$3 { + Variable$4 { defs: Array [ - ClassNameDefinition$2 { + ClassNameDefinition$3 { name: Identifier<"A">, - node: ClassDeclaration$1, + node: ClassDeclaration$3, }, ], name: "A", @@ -28,24 +59,24 @@ ScopeManager { isValueVariable: true, isTypeVariable: true, }, - Variable$4 { + Variable$5 { defs: Array [ - VariableDefinition$3 { + VariableDefinition$4 { name: Identifier<"unresolved">, - node: VariableDeclarator$2, + node: VariableDeclarator$4, }, ], name: "unresolved", references: Array [ - Reference$1 { + Reference$3 { identifier: Identifier<"unresolved">, init: true, isRead: false, isTypeReference: false, isValueReference: true, isWrite: true, - resolved: Variable$4, - writeExpr: Identifier<"prop">, + resolved: Variable$5, + writeExpr: Identifier<"prop1">, }, ], isValueVariable: true, @@ -54,12 +85,13 @@ ScopeManager { ], scopes: Array [ GlobalScope$1 { - block: Program$3, + block: Program$5, isStrict: false, references: Array [ Reference$1, - Reference$2 { - identifier: Identifier<"prop">, + Reference$3, + Reference$4 { + identifier: Identifier<"prop1">, isRead: true, isTypeReference: false, isValueReference: true, @@ -69,29 +101,51 @@ ScopeManager { ], set: Map { "const" => ImplicitGlobalConstTypeVariable, - "A" => Variable$2, - "unresolved" => Variable$4, + "x" => Variable$2, + "A" => Variable$3, + "unresolved" => Variable$5, }, type: "global", upper: null, variables: Array [ ImplicitGlobalConstTypeVariable, Variable$2, - Variable$4, + Variable$3, + Variable$5, ], }, ClassScope$2 { - block: ClassDeclaration$1, + block: ClassDeclaration$3, isStrict: true, references: Array [], set: Map { - "A" => Variable$3, + "A" => Variable$4, }, type: "class", upper: GlobalScope$1, variables: Array [ - Variable$3, + Variable$4, + ], + }, + ClassFieldInitializerScope$3 { + block: Literal$6, + isStrict: true, + references: Array [], + set: Map {}, + type: "class-field-initializer", + upper: ClassScope$2, + variables: Array [], + }, + ClassFieldInitializerScope$4 { + block: Identifier<"x">, + isStrict: true, + references: Array [ + Reference$2, ], + set: Map {}, + type: "class-field-initializer", + upper: ClassScope$2, + variables: Array [], }, ], } diff --git a/packages/scope-manager/tests/fixtures/class/expression/computed-member.ts.shot b/packages/scope-manager/tests/fixtures/class/expression/computed-member.ts.shot index 25e96169fc75..f9080b0c6ee2 100644 --- a/packages/scope-manager/tests/fixtures/class/expression/computed-member.ts.shot +++ b/packages/scope-manager/tests/fixtures/class/expression/computed-member.ts.shot @@ -133,8 +133,17 @@ ScopeManager { upper: GlobalScope$1, variables: Array [], }, - FunctionScope$3 { - block: FunctionExpression$8, + ClassFieldInitializerScope$3 { + block: Literal$8, + isStrict: true, + references: Array [], + set: Map {}, + type: "class-field-initializer", + upper: ClassScope$2, + variables: Array [], + }, + FunctionScope$4 { + block: FunctionExpression$9, isStrict: true, references: Array [], set: Map { diff --git a/packages/scope-manager/tests/fixtures/class/expression/properties.ts b/packages/scope-manager/tests/fixtures/class/expression/properties.ts index 49b1efe6297e..508292413246 100644 --- a/packages/scope-manager/tests/fixtures/class/expression/properties.ts +++ b/packages/scope-manager/tests/fixtures/class/expression/properties.ts @@ -1,5 +1,7 @@ +const x = 1; const A = class { - prop = 1; + prop1 = 1; + prop2 = x; }; const unresolved = prop; diff --git a/packages/scope-manager/tests/fixtures/class/expression/properties.ts.shot b/packages/scope-manager/tests/fixtures/class/expression/properties.ts.shot index 261a24a50ecc..b5f489d2502b 100644 --- a/packages/scope-manager/tests/fixtures/class/expression/properties.ts.shot +++ b/packages/scope-manager/tests/fixtures/class/expression/properties.ts.shot @@ -7,21 +7,29 @@ ScopeManager { Variable$2 { defs: Array [ VariableDefinition$1 { - name: Identifier<"A">, + name: Identifier<"x">, node: VariableDeclarator$1, }, ], - name: "A", + name: "x", references: Array [ Reference$1 { - identifier: Identifier<"A">, + identifier: Identifier<"x">, init: true, isRead: false, isTypeReference: false, isValueReference: true, isWrite: true, resolved: Variable$2, - writeExpr: ClassExpression$2, + writeExpr: Literal$2, + }, + Reference$3 { + identifier: Identifier<"x">, + isRead: true, + isTypeReference: false, + isValueReference: true, + isWrite: false, + resolved: Variable$2, }, ], isValueVariable: true, @@ -30,20 +38,43 @@ ScopeManager { Variable$3 { defs: Array [ VariableDefinition$2 { - name: Identifier<"unresolved">, + name: Identifier<"A">, node: VariableDeclarator$3, }, ], - name: "unresolved", + name: "A", references: Array [ Reference$2 { - identifier: Identifier<"unresolved">, + identifier: Identifier<"A">, init: true, isRead: false, isTypeReference: false, isValueReference: true, isWrite: true, resolved: Variable$3, + writeExpr: ClassExpression$4, + }, + ], + isValueVariable: true, + isTypeVariable: false, + }, + Variable$4 { + defs: Array [ + VariableDefinition$3 { + name: Identifier<"unresolved">, + node: VariableDeclarator$5, + }, + ], + name: "unresolved", + references: Array [ + Reference$4 { + identifier: Identifier<"unresolved">, + init: true, + isRead: false, + isTypeReference: false, + isValueReference: true, + isWrite: true, + resolved: Variable$4, writeExpr: Identifier<"prop">, }, ], @@ -53,12 +84,13 @@ ScopeManager { ], scopes: Array [ GlobalScope$1 { - block: Program$4, + block: Program$6, isStrict: false, references: Array [ Reference$1, Reference$2, - Reference$3 { + Reference$4, + Reference$5 { identifier: Identifier<"prop">, isRead: true, isTypeReference: false, @@ -69,8 +101,9 @@ ScopeManager { ], set: Map { "const" => ImplicitGlobalConstTypeVariable, - "A" => Variable$2, - "unresolved" => Variable$3, + "x" => Variable$2, + "A" => Variable$3, + "unresolved" => Variable$4, }, type: "global", upper: null, @@ -78,10 +111,11 @@ ScopeManager { ImplicitGlobalConstTypeVariable, Variable$2, Variable$3, + Variable$4, ], }, ClassScope$2 { - block: ClassExpression$2, + block: ClassExpression$4, isStrict: true, references: Array [], set: Map {}, @@ -89,6 +123,26 @@ ScopeManager { upper: GlobalScope$1, variables: Array [], }, + ClassFieldInitializerScope$3 { + block: Literal$7, + isStrict: true, + references: Array [], + set: Map {}, + type: "class-field-initializer", + upper: ClassScope$2, + variables: Array [], + }, + ClassFieldInitializerScope$4 { + block: Identifier<"x">, + isStrict: true, + references: Array [ + Reference$3, + ], + set: Map {}, + type: "class-field-initializer", + upper: ClassScope$2, + variables: Array [], + }, ], } `; diff --git a/packages/scope-manager/tests/util/expect.ts b/packages/scope-manager/tests/util/expect.ts index 0057af9f85c2..5609a923598b 100644 --- a/packages/scope-manager/tests/util/expect.ts +++ b/packages/scope-manager/tests/util/expect.ts @@ -14,6 +14,7 @@ import { BlockScope, CatchScope, ClassScope, + ClassFieldInitializerScope, ForScope, FunctionExpressionNameScope, FunctionScope, @@ -35,6 +36,11 @@ function expectToBeBlockScope(scope: Scope): asserts scope is BlockScope { function expectToBeCatchScope(scope: Scope): asserts scope is CatchScope { expect(scope.type).toBe(ScopeType.catch); } +function expectToBeClassFieldInitializerScope( + scope: Scope, +): asserts scope is ClassFieldInitializerScope { + expect(scope.type).toBe(ScopeType.classFieldInitializer); +} function expectToBeClassScope(scope: Scope): asserts scope is ClassScope { expect(scope.type).toBe(ScopeType.class); } @@ -65,6 +71,7 @@ function expectToBeWithScope(scope: Scope): asserts scope is WithScope { export { expectToBeBlockScope, expectToBeCatchScope, + expectToBeClassFieldInitializerScope, expectToBeClassScope, expectToBeForScope, expectToBeFunctionExpressionNameScope, diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index da5ba78fbf86..0846087759f3 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1103,11 +1103,11 @@ export class Converter { case SyntaxKind.PropertyDeclaration: { const isAbstract = hasModifier(SyntaxKind.AbstractKeyword, node); const result = this.createNode< - TSESTree.TSAbstractClassProperty | TSESTree.ClassProperty + TSESTree.TSAbstractPropertyDefinition | TSESTree.PropertyDefinition >(node, { type: isAbstract - ? AST_NODE_TYPES.TSAbstractClassProperty - : AST_NODE_TYPES.ClassProperty, + ? AST_NODE_TYPES.TSAbstractPropertyDefinition + : AST_NODE_TYPES.PropertyDefinition, key: this.convertChild(node.name), value: isAbstract ? null : this.convertChild(node.initializer), computed: isComputedProperty(node.name), diff --git a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts index 8faaef068d54..07b2bb5db318 100644 --- a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts +++ b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts @@ -28,7 +28,7 @@ export interface EstreeToTsNodeTypes { [AST_NODE_TYPES.ClassBody]: ts.ClassDeclaration | ts.ClassExpression; [AST_NODE_TYPES.ClassDeclaration]: ts.ClassDeclaration; [AST_NODE_TYPES.ClassExpression]: ts.ClassExpression; - [AST_NODE_TYPES.ClassProperty]: ts.PropertyDeclaration; + [AST_NODE_TYPES.PropertyDefinition]: ts.PropertyDeclaration; [AST_NODE_TYPES.ConditionalExpression]: ts.ConditionalExpression; [AST_NODE_TYPES.ContinueStatement]: ts.ContinueStatement; [AST_NODE_TYPES.DebuggerStatement]: ts.DebuggerStatement; @@ -150,7 +150,7 @@ export interface EstreeToTsNodeTypes { [AST_NODE_TYPES.ThisExpression]: ts.ThisExpression | ts.KeywordTypeNode; [AST_NODE_TYPES.ThrowStatement]: ts.ThrowStatement; [AST_NODE_TYPES.TryStatement]: ts.TryStatement; - [AST_NODE_TYPES.TSAbstractClassProperty]: ts.PropertyDeclaration; + [AST_NODE_TYPES.TSAbstractPropertyDefinition]: ts.PropertyDeclaration; [AST_NODE_TYPES.TSAbstractMethodDefinition]: | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration diff --git a/packages/typescript-estree/tests/ast-alignment/parse.ts b/packages/typescript-estree/tests/ast-alignment/parse.ts index 0cf1898a321e..7d340278649e 100644 --- a/packages/typescript-estree/tests/ast-alignment/parse.ts +++ b/packages/typescript-estree/tests/ast-alignment/parse.ts @@ -24,10 +24,15 @@ function createError( function parseWithBabelParser(text: string, jsx = true): File { const babel = require('@babel/parser') as typeof babelParser; const plugins: ParserPlugin[] = [ - 'classProperties', + [ + 'estree', + { + // @ts-expect-error -- this isn't exposed in the types yet + classFeatures: true, + }, + ], 'decorators-legacy', 'classStaticBlock', - 'estree', 'typescript', ]; if (jsx) { diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index 1bfd73b2cb88..ad3500c89911 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -168,13 +168,15 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any { node.override = false; } }, - ClassProperty(node) { + PropertyDefinition(node) { + // babel does not + // node.type = AST_NODE_TYPES.PropertyDefinition; /** * Babel: ClassProperty + abstract: true * ts-estree: TSAbstractClassProperty */ if (node.abstract) { - node.type = AST_NODE_TYPES.TSAbstractClassProperty; + node.type = AST_NODE_TYPES.TSAbstractPropertyDefinition; delete node.abstract; node.value = null; } diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semanticInfo.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semanticInfo.test.ts.snap index 0fe1c5a0c57e..ce899d6636cb 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semanticInfo.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semanticInfo.test.ts.snap @@ -1292,7 +1292,7 @@ Object { 56, ], "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/lib/semanticInfo.test.ts b/packages/typescript-estree/tests/lib/semanticInfo.test.ts index ccce1f6e4c8d..c003d8d00466 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo.test.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo.test.ts @@ -161,7 +161,7 @@ describe('semanticInfo', () => { const computedPropertyString = ( (parseResult.ast.body[1] as TSESTree.ClassDeclaration).body - .body[0] as TSESTree.ClassProperty + .body[0] as TSESTree.PropertyDefinition ).key; const tsComputedPropertyString = parseResult.services.esTreeNodeToTSNodeMap.get(computedPropertyString); diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot index ffbc6466b98a..34ca54e31bb1 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-properties.src.ts.shot @@ -45,7 +45,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "TSAbstractClassProperty", + "type": "TSAbstractPropertyDefinition", "value": null, }, Object { @@ -86,7 +86,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "TSAbstractClassProperty", + "type": "TSAbstractPropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot index 61229f3a6121..66cc1ade4909 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.shot @@ -46,7 +46,7 @@ Object { ], "readonly": true, "static": false, - "type": "TSAbstractClassProperty", + "type": "TSAbstractPropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-declare-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-declare-properties.src.ts.shot index d6ebb066f30e..2ba070b7a0bc 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-declare-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-declare-properties.src.ts.shot @@ -45,7 +45,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -120,7 +120,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "TSAbstractClassProperty", + "type": "TSAbstractPropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -196,7 +196,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "TSAbstractClassProperty", + "type": "TSAbstractPropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -271,7 +271,7 @@ Object { ], "readonly": true, "static": false, - "type": "TSAbstractClassProperty", + "type": "TSAbstractPropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -347,7 +347,7 @@ Object { ], "readonly": true, "static": false, - "type": "TSAbstractClassProperty", + "type": "TSAbstractPropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot index 005003a72ef8..d22f508108d0 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/abstract-class-with-override-property.src.ts.shot @@ -45,7 +45,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "TSAbstractClassProperty", + "type": "TSAbstractPropertyDefinition", "value": null, }, ], diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-static-blocks.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-static-blocks.src.ts.shot index e370e9e24ea1..761783ccd1d6 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-static-blocks.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-static-blocks.src.ts.shot @@ -44,7 +44,7 @@ Object { ], "readonly": undefined, "static": true, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-accessibility-modifiers.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-accessibility-modifiers.src.ts.shot index 67d8ef501e3b..72b6e487ad10 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-accessibility-modifiers.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-accessibility-modifiers.src.ts.shot @@ -45,7 +45,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -121,7 +121,7 @@ Object { ], "readonly": undefined, "static": true, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-declare-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-declare-properties.src.ts.shot index 5de10062c2d5..d42896e1914c 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-declare-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-declare-properties.src.ts.shot @@ -44,7 +44,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -120,7 +120,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -195,7 +195,7 @@ Object { ], "readonly": undefined, "static": true, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -270,7 +270,7 @@ Object { ], "readonly": true, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -346,7 +346,7 @@ Object { ], "readonly": true, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -422,7 +422,7 @@ Object { ], "readonly": undefined, "static": true, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -498,7 +498,7 @@ Object { ], "readonly": true, "static": true, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-definite-assignment.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-definite-assignment.src.ts.shot index 00d59df785b5..8c358d12d205 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-definite-assignment.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-definite-assignment.src.ts.shot @@ -45,7 +45,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-property.src.ts.shot index 31128d9a73bb..13e6452c8591 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-property.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-computed-property.src.ts.shot @@ -47,7 +47,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-properties.src.ts.shot index 3905565b51e0..048f000b9e2f 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-properties.src.ts.shot @@ -193,7 +193,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": null, }, Object { @@ -235,7 +235,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -312,7 +312,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -388,7 +388,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": null, }, Object { @@ -431,7 +431,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": null, }, Object { @@ -474,7 +474,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": null, }, Object { @@ -516,7 +516,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -593,7 +593,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -670,7 +670,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-property-undefined.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-property-undefined.src.ts.shot index e3f8ea37bde3..c5fd8a1fd1aa 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-property-undefined.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-optional-property-undefined.src.ts.shot @@ -46,7 +46,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-property.src.ts.shot index 30a584f5f6da..49a33895f9d4 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-property.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-override-property.src.ts.shot @@ -44,7 +44,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-function.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-function.src.ts.shot index fbf79a0e8592..1705e340f45f 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-function.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-function.src.ts.shot @@ -44,7 +44,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { @@ -228,7 +228,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-values.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-values.src.ts.shot index e9ca7ddbc2ac..a2238f57f0db 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-values.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-property-values.src.ts.shot @@ -44,7 +44,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "loc": Object { "end": Object { @@ -103,7 +103,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "loc": Object { "end": Object { @@ -161,7 +161,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "elements": Array [], "loc": Object { @@ -219,7 +219,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "loc": Object { "end": Object { @@ -278,7 +278,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "arguments": Array [ Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-property.src.ts.shot index 23d24a88952e..c3fc1acb2af1 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-property.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-property.src.ts.shot @@ -45,7 +45,7 @@ Object { ], "readonly": true, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-escaped-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-escaped-properties.src.ts.shot index 8ef720aba18d..4373bd4bb671 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-escaped-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/object-with-escaped-properties.src.ts.shot @@ -351,7 +351,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-method.src.ts.shot index d2ee9293ca2e..8f61a28350af 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-in-method.src.ts.shot @@ -195,7 +195,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "async": false, "body": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-method.src.ts.shot index e9af3cb75909..abfccafd6245 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/type-assertion-with-guard-in-method.src.ts.shot @@ -228,7 +228,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "async": false, "body": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-method.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-method.src.ts.shot index f97f275b6905..9d4fe4c33ca7 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-method.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/type-guard-in-method.src.ts.shot @@ -280,7 +280,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "async": false, "body": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/type-reference-comments.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/type-reference-comments.src.ts.shot index 4e24a2d0e02a..50ce8ec40fd5 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/type-reference-comments.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/type-reference-comments.src.ts.shot @@ -44,7 +44,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.shot index 792ec79028f0..2dec783b8b49 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.shot @@ -100,7 +100,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": null, }, Object { @@ -197,7 +197,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": Object { "arguments": Array [], "callee": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.shot index 616d39ed3670..53043405565c 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.shot @@ -120,7 +120,7 @@ Object { ], "readonly": undefined, "static": true, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": null, }, Object { @@ -237,7 +237,7 @@ Object { ], "readonly": undefined, "static": true, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": null, }, ], diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.shot index 7ba24aa3ef5d..95ccdf95a30a 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.shot @@ -81,7 +81,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": null, }, Object { @@ -159,7 +159,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": null, }, ], diff --git a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.shot index 9e4706080cd7..60c9860bfd0b 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.shot @@ -81,7 +81,7 @@ Object { ], "readonly": undefined, "static": true, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": null, }, Object { @@ -159,7 +159,7 @@ Object { ], "readonly": undefined, "static": true, - "type": "ClassProperty", + "type": "PropertyDefinition", "value": null, }, ], diff --git a/packages/typescript-estree/tests/snapshots/typescript/types/this-type-expanded.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/types/this-type-expanded.src.ts.shot index d936454024a7..5543bc1a3a01 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/types/this-type-expanded.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/types/this-type-expanded.src.ts.shot @@ -45,7 +45,7 @@ Object { ], "readonly": undefined, "static": false, - "type": "ClassProperty", + "type": "PropertyDefinition", "typeAnnotation": Object { "loc": Object { "end": Object { diff --git a/packages/visitor-keys/src/visitor-keys.ts b/packages/visitor-keys/src/visitor-keys.ts index 6430592217c2..bd1f3186d839 100644 --- a/packages/visitor-keys/src/visitor-keys.ts +++ b/packages/visitor-keys/src/visitor-keys.ts @@ -48,6 +48,7 @@ const additionalKeys: AdditionalKeys = { MethodDefinition: ['decorators', 'key', 'value'], NewExpression: ['callee', 'typeParameters', 'arguments'], ObjectPattern: ['decorators', 'properties', 'typeAnnotation'], + PropertyDefinition: ['decorators', 'key', 'typeAnnotation', 'value'], RestElement: ['decorators', 'argument', 'typeAnnotation'], TaggedTemplateExpression: ['tag', 'typeParameters', 'quasi'], StaticBlock: ['body'], @@ -59,13 +60,12 @@ const additionalKeys: AdditionalKeys = { JSXSpreadChild: ['expression'], // Additional Nodes. - ClassProperty: ['decorators', 'key', 'typeAnnotation', 'value'], Decorator: ['expression'], // TS-prefixed nodes - TSAbstractClassProperty: ['decorators', 'key', 'typeAnnotation'], TSAbstractKeyword: [], TSAbstractMethodDefinition: ['key', 'value'], + TSAbstractPropertyDefinition: ['decorators', 'key', 'typeAnnotation'], TSAnyKeyword: [], TSArrayType: ['elementType'], TSAsExpression: ['expression', 'typeAnnotation'], From 0eefe5e49d21af3f1e3e2d9a90c2e49929863ac2 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 28 Aug 2021 18:18:40 -0700 Subject: [PATCH 416/473] feat: support `PrivateIdentifier` (#3808) Closes #3430 Resolves #2933 --- packages/ast-spec/src/ast-node-types.ts | 1 + .../ast-spec/src/base/MethodDefinitionBase.ts | 7 + .../src/base/PropertyDefinitionBase.ts | 7 + .../src/element/MethodDefinition/spec.ts | 4 +- .../src/element/PropertyDefinition/spec.ts | 4 +- .../TSAbstractMethodDefinition/spec.ts | 1 + .../TSAbstractPropertyDefinition/spec.ts | 1 + .../src/expression/MemberExpression/spec.ts | 5 +- .../src/special/PrivateIdentifier/spec.ts | 7 + packages/ast-spec/src/special/spec.ts | 1 + packages/ast-spec/src/unions/Node.ts | 2 + packages/ast-spec/src/unions/PropertyName.ts | 10 +- .../src/rules/adjacent-overload-signatures.ts | 15 +- .../rules/explicit-member-accessibility.ts | 11 +- .../src/rules/member-ordering.ts | 6 +- .../rules/naming-convention-utils/types.ts | 2 +- .../naming-convention-utils/validator.ts | 19 +- .../src/rules/naming-convention.ts | 7 +- .../eslint-plugin/src/rules/prefer-for-of.ts | 2 +- packages/eslint-plugin/src/util/misc.ts | 40 +- .../adjacent-overload-signatures.test.ts | 37 + .../explicit-member-accessibility.test.ts | 68 ++ .../tests/rules/member-ordering.test.ts | 40 + .../tests/rules/naming-convention.test.ts | 7 + .../src/referencer/ClassVisitor.ts | 4 + .../src/referencer/Referencer.ts | 4 + .../class/declaration/private-identifier.ts | 7 + .../declaration/private-identifier.ts.shot | 83 ++ .../class/expression/private-identifier.ts | 7 + .../expression/private-identifier.ts.shot | 80 ++ .../class-private-identifier-accessor.src.js | 8 + .../class-private-identifier-field.src.js | 8 + .../class-private-identifier-method.src.js | 7 + ...fier-field-with-accessibility-error.src.ts | 5 + ...te-identifier-field-with-annotation.src.ts | 8 + ...s-private-identifier-readonly-field.src.ts | 3 + packages/types/tools/copy-ast-spec.ts | 2 +- packages/typescript-estree/src/convert.ts | 8 + .../src/ts-estree/estree-to-ts-node-types.ts | 1 + .../src/ts-estree/ts-nodes.ts | 3 + .../tests/ast-alignment/fixtures-to-test.ts | 15 + .../semantic-diagnostics-enabled.test.ts.snap | 12 + ...ss-private-identifier-accessor.src.js.shot | 1024 +++++++++++++++++ ...class-private-identifier-field.src.js.shot | 748 ++++++++++++ ...lass-private-identifier-method.src.js.shot | 691 +++++++++++ ...field-with-accessibility-error.src.ts.shot | 597 ++++++++++ ...entifier-field-with-annotation.src.ts.shot | 888 ++++++++++++++ ...vate-identifier-readonly-field.src.ts.shot | 301 +++++ packages/visitor-keys/package.json | 2 +- 49 files changed, 4786 insertions(+), 34 deletions(-) create mode 100644 packages/ast-spec/src/special/PrivateIdentifier/spec.ts create mode 100644 packages/scope-manager/tests/fixtures/class/declaration/private-identifier.ts create mode 100644 packages/scope-manager/tests/fixtures/class/declaration/private-identifier.ts.shot create mode 100644 packages/scope-manager/tests/fixtures/class/expression/private-identifier.ts create mode 100644 packages/scope-manager/tests/fixtures/class/expression/private-identifier.ts.shot create mode 100644 packages/shared-fixtures/fixtures/javascript/classes/class-private-identifier-accessor.src.js create mode 100644 packages/shared-fixtures/fixtures/javascript/classes/class-private-identifier-field.src.js create mode 100644 packages/shared-fixtures/fixtures/javascript/classes/class-private-identifier-method.src.js create mode 100644 packages/shared-fixtures/fixtures/typescript/basics/class-private-identifier-field-with-accessibility-error.src.ts create mode 100644 packages/shared-fixtures/fixtures/typescript/basics/class-private-identifier-field-with-annotation.src.ts create mode 100644 packages/shared-fixtures/fixtures/typescript/basics/class-private-identifier-readonly-field.src.ts create mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-accessor.src.js.shot create mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-field.src.js.shot create mode 100644 packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-method.src.js.shot create mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-accessibility-error.src.ts.shot create mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-annotation.src.ts.shot create mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-readonly-field.src.ts.shot diff --git a/packages/ast-spec/src/ast-node-types.ts b/packages/ast-spec/src/ast-node-types.ts index 3f6b2a81082a..c5ee4a189df4 100644 --- a/packages/ast-spec/src/ast-node-types.ts +++ b/packages/ast-spec/src/ast-node-types.ts @@ -61,6 +61,7 @@ export enum AST_NODE_TYPES { NewExpression = 'NewExpression', ObjectExpression = 'ObjectExpression', ObjectPattern = 'ObjectPattern', + PrivateIdentifier = 'PrivateIdentifier', Program = 'Program', Property = 'Property', PropertyDefinition = 'PropertyDefinition', diff --git a/packages/ast-spec/src/base/MethodDefinitionBase.ts b/packages/ast-spec/src/base/MethodDefinitionBase.ts index afdea67bcd7b..f1f2087ccae8 100644 --- a/packages/ast-spec/src/base/MethodDefinitionBase.ts +++ b/packages/ast-spec/src/base/MethodDefinitionBase.ts @@ -3,6 +3,7 @@ import type { TSEmptyBodyFunctionExpression } from '../expression/TSEmptyBodyFun import type { Decorator } from '../special/Decorator/spec'; import type { TSTypeParameterDeclaration } from '../special/TSTypeParameterDeclaration/spec'; import type { + ClassPropertyNameNonComputed, PropertyName, PropertyNameComputed, PropertyNameNonComputed, @@ -34,3 +35,9 @@ export interface MethodDefinitionNonComputedNameBase key: PropertyNameNonComputed; computed: false; } + +export interface ClassMethodDefinitionNonComputedNameBase + extends MethodDefinitionBase { + key: ClassPropertyNameNonComputed; + computed: false; +} diff --git a/packages/ast-spec/src/base/PropertyDefinitionBase.ts b/packages/ast-spec/src/base/PropertyDefinitionBase.ts index a70a21479ae7..f1d5b9cc4402 100644 --- a/packages/ast-spec/src/base/PropertyDefinitionBase.ts +++ b/packages/ast-spec/src/base/PropertyDefinitionBase.ts @@ -2,6 +2,7 @@ import type { Decorator } from '../special/Decorator/spec'; import type { TSTypeAnnotation } from '../special/TSTypeAnnotation/spec'; import type { Expression } from '../unions/Expression'; import type { + ClassPropertyNameNonComputed, PropertyName, PropertyNameComputed, PropertyNameNonComputed, @@ -35,3 +36,9 @@ export interface PropertyDefinitionNonComputedNameBase key: PropertyNameNonComputed; computed: false; } + +export interface ClassPropertyDefinitionNonComputedNameBase + extends PropertyDefinitionBase { + key: ClassPropertyNameNonComputed; + computed: false; +} diff --git a/packages/ast-spec/src/element/MethodDefinition/spec.ts b/packages/ast-spec/src/element/MethodDefinition/spec.ts index f097f9f8e854..c02aa19b5df3 100644 --- a/packages/ast-spec/src/element/MethodDefinition/spec.ts +++ b/packages/ast-spec/src/element/MethodDefinition/spec.ts @@ -1,7 +1,7 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { + ClassMethodDefinitionNonComputedNameBase, MethodDefinitionComputedNameBase, - MethodDefinitionNonComputedNameBase, } from '../../base/MethodDefinitionBase'; export interface MethodDefinitionComputedName @@ -10,7 +10,7 @@ export interface MethodDefinitionComputedName } export interface MethodDefinitionNonComputedName - extends MethodDefinitionNonComputedNameBase { + extends ClassMethodDefinitionNonComputedNameBase { type: AST_NODE_TYPES.MethodDefinition; } diff --git a/packages/ast-spec/src/element/PropertyDefinition/spec.ts b/packages/ast-spec/src/element/PropertyDefinition/spec.ts index 4f79c2eb8345..d249b140e661 100644 --- a/packages/ast-spec/src/element/PropertyDefinition/spec.ts +++ b/packages/ast-spec/src/element/PropertyDefinition/spec.ts @@ -1,7 +1,7 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { + ClassPropertyDefinitionNonComputedNameBase, PropertyDefinitionComputedNameBase, - PropertyDefinitionNonComputedNameBase, } from '../../base/PropertyDefinitionBase'; export interface PropertyDefinitionComputedName @@ -10,7 +10,7 @@ export interface PropertyDefinitionComputedName } export interface PropertyDefinitionNonComputedName - extends PropertyDefinitionNonComputedNameBase { + extends ClassPropertyDefinitionNonComputedNameBase { type: AST_NODE_TYPES.PropertyDefinition; } diff --git a/packages/ast-spec/src/element/TSAbstractMethodDefinition/spec.ts b/packages/ast-spec/src/element/TSAbstractMethodDefinition/spec.ts index a8f5a05c50ab..ad2c3f7e51ff 100644 --- a/packages/ast-spec/src/element/TSAbstractMethodDefinition/spec.ts +++ b/packages/ast-spec/src/element/TSAbstractMethodDefinition/spec.ts @@ -10,6 +10,7 @@ export interface TSAbstractMethodDefinitionComputedName } export interface TSAbstractMethodDefinitionNonComputedName + // this does not extend ClassMethodDefinitionNonComputedNameBase because abstract private names are not allowed extends MethodDefinitionNonComputedNameBase { type: AST_NODE_TYPES.TSAbstractMethodDefinition; } diff --git a/packages/ast-spec/src/element/TSAbstractPropertyDefinition/spec.ts b/packages/ast-spec/src/element/TSAbstractPropertyDefinition/spec.ts index c7032669fc9f..efa41b3bd364 100644 --- a/packages/ast-spec/src/element/TSAbstractPropertyDefinition/spec.ts +++ b/packages/ast-spec/src/element/TSAbstractPropertyDefinition/spec.ts @@ -11,6 +11,7 @@ export interface TSAbstractPropertyDefinitionComputedName } export interface TSAbstractPropertyDefinitionNonComputedName + // this does not extend ClassPropertyDefinitionNonComputedNameBase because abstract private names are not allowed extends PropertyDefinitionNonComputedNameBase { type: AST_NODE_TYPES.TSAbstractPropertyDefinition; value: null; diff --git a/packages/ast-spec/src/expression/MemberExpression/spec.ts b/packages/ast-spec/src/expression/MemberExpression/spec.ts index 92bad8cf3dc3..260574cc59f9 100644 --- a/packages/ast-spec/src/expression/MemberExpression/spec.ts +++ b/packages/ast-spec/src/expression/MemberExpression/spec.ts @@ -1,12 +1,13 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; +import type { PrivateIdentifier } from '../../special/PrivateIdentifier/spec'; import type { Expression } from '../../unions/Expression'; import type { LeftHandSideExpression } from '../../unions/LeftHandSideExpression'; import type { Identifier } from '../Identifier/spec'; interface MemberExpressionBase extends BaseNode { object: LeftHandSideExpression; - property: Expression | Identifier; + property: Expression | Identifier | PrivateIdentifier; computed: boolean; optional: boolean; } @@ -19,7 +20,7 @@ export interface MemberExpressionComputedName extends MemberExpressionBase { export interface MemberExpressionNonComputedName extends MemberExpressionBase { type: AST_NODE_TYPES.MemberExpression; - property: Identifier; + property: Identifier | PrivateIdentifier; computed: false; } diff --git a/packages/ast-spec/src/special/PrivateIdentifier/spec.ts b/packages/ast-spec/src/special/PrivateIdentifier/spec.ts new file mode 100644 index 000000000000..f1d2172b8374 --- /dev/null +++ b/packages/ast-spec/src/special/PrivateIdentifier/spec.ts @@ -0,0 +1,7 @@ +import type { AST_NODE_TYPES } from '../../ast-node-types'; +import type { BaseNode } from '../../base/BaseNode'; + +export interface PrivateIdentifier extends BaseNode { + type: AST_NODE_TYPES.PrivateIdentifier; + name: string; +} diff --git a/packages/ast-spec/src/special/spec.ts b/packages/ast-spec/src/special/spec.ts index 07142e15c8f9..91e5037751d7 100644 --- a/packages/ast-spec/src/special/spec.ts +++ b/packages/ast-spec/src/special/spec.ts @@ -6,6 +6,7 @@ export * from './ExportSpecifier/spec'; export * from './ImportDefaultSpecifier/spec'; export * from './ImportNamespaceSpecifier/spec'; export * from './ImportSpecifier/spec'; +export * from './PrivateIdentifier/spec'; export * from './Program/spec'; export * from './SwitchCase/spec'; export * from './TSClassImplements/spec'; diff --git a/packages/ast-spec/src/unions/Node.ts b/packages/ast-spec/src/unions/Node.ts index 4b3c54a09eb9..ba2b07bf4d4d 100644 --- a/packages/ast-spec/src/unions/Node.ts +++ b/packages/ast-spec/src/unions/Node.ts @@ -82,6 +82,7 @@ import type { ExportSpecifier } from '../special/ExportSpecifier/spec'; import type { ImportDefaultSpecifier } from '../special/ImportDefaultSpecifier/spec'; import type { ImportNamespaceSpecifier } from '../special/ImportNamespaceSpecifier/spec'; import type { ImportSpecifier } from '../special/ImportSpecifier/spec'; +import type { PrivateIdentifier } from '../special/PrivateIdentifier/spec'; import type { Program } from '../special/Program/spec'; import type { SwitchCase } from '../special/SwitchCase/spec'; import type { TemplateElement } from '../special/TemplateElement/spec'; @@ -228,6 +229,7 @@ export type Node = | NewExpression | ObjectExpression | ObjectPattern + | PrivateIdentifier | Program | Property | PropertyDefinition diff --git a/packages/ast-spec/src/unions/PropertyName.ts b/packages/ast-spec/src/unions/PropertyName.ts index 56ba04cabbea..dce45834d7f6 100644 --- a/packages/ast-spec/src/unions/PropertyName.ts +++ b/packages/ast-spec/src/unions/PropertyName.ts @@ -1,11 +1,19 @@ import type { Identifier } from '../expression/Identifier/spec'; import type { NumberLiteral } from '../expression/literal/NumberLiteral/spec'; import type { StringLiteral } from '../expression/literal/StringLiteral/spec'; +import type { PrivateIdentifier } from '../special/PrivateIdentifier/spec'; import type { Expression } from '../unions/Expression'; -export type PropertyName = PropertyNameComputed | PropertyNameNonComputed; +export type PropertyName = + | ClassPropertyNameNonComputed + | PropertyNameComputed + | PropertyNameNonComputed; export type PropertyNameComputed = Expression; export type PropertyNameNonComputed = | Identifier | NumberLiteral | StringLiteral; +export type ClassPropertyNameNonComputed = + | PrivateIdentifier + // only class properties can have private identifiers as their names + | PropertyNameNonComputed; diff --git a/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts b/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts index 273b6c6bfb9b..c0eec499ab3e 100644 --- a/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts +++ b/packages/eslint-plugin/src/rules/adjacent-overload-signatures.ts @@ -25,7 +25,7 @@ export default util.createRule({ }, schema: [], messages: { - adjacentSignature: "All '{{name}}' signatures should be adjacent.", + adjacentSignature: 'All {{name}} signatures should be adjacent.', }, }, defaultOptions: [], @@ -36,6 +36,7 @@ export default util.createRule({ name: string; static: boolean; callSignature: boolean; + type: util.MemberNameType; } /** @@ -71,11 +72,12 @@ export default util.createRule({ name, static: isStatic, callSignature: false, + type: util.MemberNameType.Normal, }; } case AST_NODE_TYPES.TSMethodSignature: return { - name: util.getNameFromMember(member, sourceCode), + ...util.getNameFromMember(member, sourceCode), static: isStatic, callSignature: false, }; @@ -84,16 +86,18 @@ export default util.createRule({ name: 'call', static: isStatic, callSignature: true, + type: util.MemberNameType.Normal, }; case AST_NODE_TYPES.TSConstructSignatureDeclaration: return { name: 'new', static: isStatic, callSignature: false, + type: util.MemberNameType.Normal, }; case AST_NODE_TYPES.MethodDefinition: return { - name: util.getNameFromMember(member, sourceCode), + ...util.getNameFromMember(member, sourceCode), static: isStatic, callSignature: false, }; @@ -107,7 +111,8 @@ export default util.createRule({ !!method2 && method1.name === method2.name && method1.static === method2.static && - method1.callSignature === method2.callSignature + method1.callSignature === method2.callSignature && + method1.type === method2.type ); } @@ -150,7 +155,7 @@ export default util.createRule({ node: member, messageId: 'adjacentSignature', data: { - name: (method.static ? 'static ' : '') + method.name, + name: `${method.static ? 'static ' : ''}${method.name}`, }, }); } else if (index === -1) { diff --git a/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts b/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts index 2e73af17354b..a8522f1b87c0 100644 --- a/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts +++ b/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts @@ -113,6 +113,10 @@ export default util.createRule({ function checkMethodAccessibilityModifier( methodDefinition: TSESTree.MethodDefinition, ): void { + if (methodDefinition.key.type === AST_NODE_TYPES.PrivateIdentifier) { + return; + } + let nodeType = 'method definition'; let check = baseCheck; switch (methodDefinition.kind) { @@ -129,7 +133,10 @@ export default util.createRule({ break; } - const methodName = util.getNameFromMember(methodDefinition, sourceCode); + const { name: methodName } = util.getNameFromMember( + methodDefinition, + sourceCode, + ); if (check === 'off' || ignoredMethodNames.has(methodName)) { return; @@ -205,7 +212,7 @@ export default util.createRule({ ): void { const nodeType = 'class property'; - const propertyName = util.getNameFromMember( + const { name: propertyName } = util.getNameFromMember( propertyDefinition, sourceCode, ); diff --git a/packages/eslint-plugin/src/rules/member-ordering.ts b/packages/eslint-plugin/src/rules/member-ordering.ts index 9f88228449b4..c1e30adc2ef5 100644 --- a/packages/eslint-plugin/src/rules/member-ordering.ts +++ b/packages/eslint-plugin/src/rules/member-ordering.ts @@ -280,12 +280,12 @@ function getMemberName( case AST_NODE_TYPES.TSMethodSignature: case AST_NODE_TYPES.TSAbstractPropertyDefinition: case AST_NODE_TYPES.PropertyDefinition: - return util.getNameFromMember(node, sourceCode); + return util.getNameFromMember(node, sourceCode).name; case AST_NODE_TYPES.TSAbstractMethodDefinition: case AST_NODE_TYPES.MethodDefinition: return node.kind === 'constructor' ? 'constructor' - : util.getNameFromMember(node, sourceCode); + : util.getNameFromMember(node, sourceCode).name; case AST_NODE_TYPES.TSConstructSignatureDeclaration: return 'new'; case AST_NODE_TYPES.TSCallSignatureDeclaration: @@ -428,7 +428,7 @@ export default util.createRule({ }, messages: { incorrectOrder: - 'Member "{{member}}" should be declared before member "{{beforeMember}}".', + 'Member {{member}} should be declared before member {{beforeMember}}.', incorrectGroupOrder: 'Member {{name}} should be declared before all {{rank}} definitions.', }, diff --git a/packages/eslint-plugin/src/rules/naming-convention-utils/types.ts b/packages/eslint-plugin/src/rules/naming-convention-utils/types.ts index d66f9ad13d4f..9cff76129dba 100644 --- a/packages/eslint-plugin/src/rules/naming-convention-utils/types.ts +++ b/packages/eslint-plugin/src/rules/naming-convention-utils/types.ts @@ -60,7 +60,7 @@ interface NormalizedSelector { } type ValidatorFunction = ( - node: TSESTree.Identifier | TSESTree.Literal, + node: TSESTree.Identifier | TSESTree.PrivateIdentifier | TSESTree.Literal, modifiers?: Set, ) => void; type ParsedOptions = Record; diff --git a/packages/eslint-plugin/src/rules/naming-convention-utils/validator.ts b/packages/eslint-plugin/src/rules/naming-convention-utils/validator.ts index a683933d61b4..374302f7f124 100644 --- a/packages/eslint-plugin/src/rules/naming-convention-utils/validator.ts +++ b/packages/eslint-plugin/src/rules/naming-convention-utils/validator.ts @@ -25,7 +25,9 @@ function createValidator( type: SelectorsString, context: Context, allConfigs: NormalizedSelector[], -): (node: TSESTree.Identifier | TSESTree.Literal) => void { +): ( + node: TSESTree.Identifier | TSESTree.PrivateIdentifier | TSESTree.Literal, +) => void { // make sure the "highest priority" configs are checked first const selectorType = Selectors[type]; const configs = allConfigs @@ -70,11 +72,14 @@ function createValidator( }); return ( - node: TSESTree.Identifier | TSESTree.Literal, + node: TSESTree.Identifier | TSESTree.PrivateIdentifier | TSESTree.Literal, modifiers: Set = new Set(), ): void => { const originalName = - node.type === AST_NODE_TYPES.Identifier ? node.name : `${node.value}`; + node.type === AST_NODE_TYPES.Identifier || + node.type === AST_NODE_TYPES.PrivateIdentifier + ? node.name + : `${node.value}`; // return will break the loop and stop checking configs // it is only used when the name is known to have failed or succeeded a config. @@ -178,7 +183,7 @@ function createValidator( position: 'leading' | 'trailing', config: NormalizedSelector, name: string, - node: TSESTree.Identifier | TSESTree.Literal, + node: TSESTree.Identifier | TSESTree.PrivateIdentifier | TSESTree.Literal, originalName: string, ): string | null { const option = @@ -299,7 +304,7 @@ function createValidator( position: 'prefix' | 'suffix', config: NormalizedSelector, name: string, - node: TSESTree.Identifier | TSESTree.Literal, + node: TSESTree.Identifier | TSESTree.PrivateIdentifier | TSESTree.Literal, originalName: string, ): string | null { const affixes = config[position]; @@ -339,7 +344,7 @@ function createValidator( function validateCustom( config: NormalizedSelector, name: string, - node: TSESTree.Identifier | TSESTree.Literal, + node: TSESTree.Identifier | TSESTree.PrivateIdentifier | TSESTree.Literal, originalName: string, ): boolean { const custom = config.custom; @@ -372,7 +377,7 @@ function createValidator( function validatePredefinedFormat( config: NormalizedSelector, name: string, - node: TSESTree.Identifier | TSESTree.Literal, + node: TSESTree.Identifier | TSESTree.PrivateIdentifier | TSESTree.Literal, originalName: string, ): boolean { const formats = config.format; diff --git a/packages/eslint-plugin/src/rules/naming-convention.ts b/packages/eslint-plugin/src/rules/naming-convention.ts index 6915c841473f..db4463edd985 100644 --- a/packages/eslint-plugin/src/rules/naming-convention.ts +++ b/packages/eslint-plugin/src/rules/naming-convention.ts @@ -620,11 +620,14 @@ function isGlobal(scope: TSESLint.Scope.Scope | null): boolean { } function requiresQuoting( - node: TSESTree.Identifier | TSESTree.Literal, + node: TSESTree.Identifier | TSESTree.Literal | TSESTree.PrivateIdentifier, target: ScriptTarget | undefined, ): boolean { const name = - node.type === AST_NODE_TYPES.Identifier ? node.name : `${node.value}`; + node.type === AST_NODE_TYPES.Identifier || + node.type === AST_NODE_TYPES.PrivateIdentifier + ? node.name + : `${node.value}`; return util.requiresQuoting(name, target); } diff --git a/packages/eslint-plugin/src/rules/prefer-for-of.ts b/packages/eslint-plugin/src/rules/prefer-for-of.ts index 25043615f81e..f00868d04097 100644 --- a/packages/eslint-plugin/src/rules/prefer-for-of.ts +++ b/packages/eslint-plugin/src/rules/prefer-for-of.ts @@ -42,7 +42,7 @@ export default util.createRule({ } function isMatchingIdentifier( - node: TSESTree.Expression, + node: TSESTree.Expression | TSESTree.PrivateIdentifier, name: string, ): boolean { return node.type === AST_NODE_TYPES.Identifier && node.name === name; diff --git a/packages/eslint-plugin/src/util/misc.ts b/packages/eslint-plugin/src/util/misc.ts index 748a5cec6a6b..95fa4a359c6e 100644 --- a/packages/eslint-plugin/src/util/misc.ts +++ b/packages/eslint-plugin/src/util/misc.ts @@ -7,6 +7,7 @@ import { TSESLint, TSESTree, } from '@typescript-eslint/experimental-utils'; +import { requiresQuoting } from './requiresQuoting'; /** * Check if the context file name is *.d.ts or *.d.tsx @@ -64,6 +65,13 @@ function getNameFromIndexSignature(node: TSESTree.TSIndexSignature): string { return propName ? propName.name : '(index signature)'; } +enum MemberNameType { + Private = 1, + Quoted = 2, + Normal = 3, + Expression = 4, +} + /** * Gets a string name representation of the name of the given MethodDefinition * or PropertyDefinition node, with handling for computed property names. @@ -78,15 +86,38 @@ function getNameFromMember( | TSESTree.Property | TSESTree.TSPropertySignature, sourceCode: TSESLint.SourceCode, -): string { +): { type: MemberNameType; name: string } { if (member.key.type === AST_NODE_TYPES.Identifier) { - return member.key.name; + return { + type: MemberNameType.Normal, + name: member.key.name, + }; + } + if (member.key.type === AST_NODE_TYPES.PrivateIdentifier) { + return { + type: MemberNameType.Private, + name: `#${member.key.name}`, + }; } if (member.key.type === AST_NODE_TYPES.Literal) { - return `${member.key.value}`; + const name = `${member.key.value}`; + if (requiresQuoting(name)) { + return { + type: MemberNameType.Quoted, + name: `"${name}"`, + }; + } else { + return { + type: MemberNameType.Normal, + name, + }; + } } - return sourceCode.text.slice(...member.key.range); + return { + type: MemberNameType.Expression, + name: sourceCode.text.slice(...member.key.range), + }; } type ExcludeKeys< @@ -111,6 +142,7 @@ export { getNameFromIndexSignature, getNameFromMember, isDefinitionFile, + MemberNameType, RequireKeys, upperCaseFirst, }; diff --git a/packages/eslint-plugin/tests/rules/adjacent-overload-signatures.test.ts b/packages/eslint-plugin/tests/rules/adjacent-overload-signatures.test.ts index 0f034a787f78..12cf859a84a7 100644 --- a/packages/eslint-plugin/tests/rules/adjacent-overload-signatures.test.ts +++ b/packages/eslint-plugin/tests/rules/adjacent-overload-signatures.test.ts @@ -238,6 +238,18 @@ class Test { interface Foo { [Symbol.toStringTag](): void; [Symbol.iterator](): void; +} + `, + // private members + ` +class Test { + #private(): void; + #private(arg: number): void {} + + bar() {} + + '#private'(): void; + '#private'(arg: number): void {} } `, ], @@ -836,5 +848,30 @@ class Foo { }, ], }, + // private members + { + code: ` +class Test { + #private(): void; + '#private'(): void; + #private(arg: number): void {} + '#private'(arg: number): void {} +} + `, + errors: [ + { + messageId: 'adjacentSignature', + data: { name: '#private' }, + line: 5, + column: 3, + }, + { + messageId: 'adjacentSignature', + data: { name: '"#private"' }, + line: 6, + column: 3, + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/explicit-member-accessibility.test.ts b/packages/eslint-plugin/tests/rules/explicit-member-accessibility.test.ts index 906f1b6cc600..4e070acb325c 100644 --- a/packages/eslint-plugin/tests/rules/explicit-member-accessibility.test.ts +++ b/packages/eslint-plugin/tests/rules/explicit-member-accessibility.test.ts @@ -330,6 +330,16 @@ class Test { code: ` class Test { constructor(private { x }: any[]) {} +} + `, + options: [{ accessibility: 'no-public' }], + }, + // private members + { + code: ` +class Test { + #foo = 1; + #bar() {} } `, options: [{ accessibility: 'no-public' }], @@ -1070,6 +1080,64 @@ class EnsureWhiteSPaceSpan { output: ` class EnsureWhiteSPaceSpan { /* */ constructor() {} +} + `, + }, + // quoted names + { + code: noFormat` +class Test { + public 'foo' = 1; + public 'foo foo' = 2; + public 'bar'() {} + public 'bar bar'() {} +} + `, + options: [{ accessibility: 'no-public' }], + errors: [ + { + messageId: 'unwantedPublicAccessibility', + data: { + type: 'class property', + name: 'foo', + }, + line: 3, + column: 3, + }, + { + messageId: 'unwantedPublicAccessibility', + data: { + type: 'class property', + name: '"foo foo"', + }, + line: 4, + column: 3, + }, + { + messageId: 'unwantedPublicAccessibility', + data: { + type: 'method definition', + name: 'bar', + }, + line: 5, + column: 3, + }, + { + messageId: 'unwantedPublicAccessibility', + data: { + type: 'method definition', + name: '"bar bar"', + }, + line: 6, + column: 3, + }, + ], + output: noFormat` +class Test { + 'foo' = 1; + 'foo foo' = 2; + 'bar'() {} + 'bar bar'() {} } `, }, diff --git a/packages/eslint-plugin/tests/rules/member-ordering.test.ts b/packages/eslint-plugin/tests/rules/member-ordering.test.ts index e457ef3daf4a..97b05cfdeffc 100644 --- a/packages/eslint-plugin/tests/rules/member-ordering.test.ts +++ b/packages/eslint-plugin/tests/rules/member-ordering.test.ts @@ -3996,6 +3996,20 @@ class Foo { `, options: [{ default: { memberTypes: 'never', order: 'alphabetically' } }], }, + + // default option + private identifiers + { + code: ` +class Foo { + #a = 1; + #b = 2; + #c = 3; +} + `, + options: [ + { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, + ], + }, ], invalid: [ // default option + interface + wrong order @@ -6349,6 +6363,32 @@ type Foo = { }, ], }, + + // default option + private identifiers + { + code: ` +class Foo { + #c = 3; + #b = 2; + #a = 1; +} + `, + options: [ + { default: { memberTypes: defaultOrder, order: 'alphabetically' } }, + ], + errors: [ + { + messageId: 'incorrectOrder', + line: 4, + column: 3, + }, + { + messageId: 'incorrectOrder', + line: 5, + column: 3, + }, + ], + }, ], }; diff --git a/packages/eslint-plugin/tests/rules/naming-convention.test.ts b/packages/eslint-plugin/tests/rules/naming-convention.test.ts index 1c693b4fde09..d35afe5ed30c 100644 --- a/packages/eslint-plugin/tests/rules/naming-convention.test.ts +++ b/packages/eslint-plugin/tests/rules/naming-convention.test.ts @@ -486,7 +486,9 @@ const cases: Cases = [ 'interface Ignored { %: string }', 'type Ignored = { %: string }', 'class Ignored { private % = 1 }', + 'class Ignored { #% = 1 }', 'class Ignored { constructor(private %) {} }', + 'class Ignored { #%() {} }', 'class Ignored { private %() {} }', 'const ignored = { %() {} };', 'class Ignored { private get %() {} }', @@ -562,6 +564,8 @@ const cases: Cases = [ 'class Ignored { private static readonly % = 1 }', 'class Ignored { abstract % = 1 }', 'class Ignored { declare % }', + 'class Ignored { #% }', + 'class Ignored { static #% }', ], options: { selector: 'classProperty', @@ -617,6 +621,8 @@ const cases: Cases = [ 'class Ignored { private % = () => {} }', 'class Ignored { abstract %() }', 'class Ignored { declare %() }', + 'class Ignored { #%() }', + 'class Ignored { static #%() }', ], options: { selector: 'classMethod', @@ -653,6 +659,7 @@ const cases: Cases = [ 'class Ignored { private get %() {} }', 'class Ignored { private set "%"(ignored) {} }', 'class Ignored { private static get %() {} }', + 'class Ignored { static get #%() {} }', ], options: { selector: 'accessor', diff --git a/packages/scope-manager/src/referencer/ClassVisitor.ts b/packages/scope-manager/src/referencer/ClassVisitor.ts index d33e362ea41a..6f5050442138 100644 --- a/packages/scope-manager/src/referencer/ClassVisitor.ts +++ b/packages/scope-manager/src/referencer/ClassVisitor.ts @@ -353,6 +353,10 @@ class ClassVisitor extends Visitor { protected Identifier(node: TSESTree.Identifier): void { this.#referencer.visit(node); } + + protected PrivateIdentifier(): void { + // intentionally skip + } } /** diff --git a/packages/scope-manager/src/referencer/Referencer.ts b/packages/scope-manager/src/referencer/Referencer.ts index df4c318daddb..9109feb3edb4 100644 --- a/packages/scope-manager/src/referencer/Referencer.ts +++ b/packages/scope-manager/src/referencer/Referencer.ts @@ -551,6 +551,10 @@ class Referencer extends Visitor { this.visitType(node.typeParameters); } + protected PrivateIdentifier(): void { + // private identifiers are members on classes and thus have no variables to to reference + } + protected Program(node: TSESTree.Program): void { const globalScope = this.scopeManager.nestGlobalScope(node); this.populateGlobalsFromLib(globalScope); diff --git a/packages/scope-manager/tests/fixtures/class/declaration/private-identifier.ts b/packages/scope-manager/tests/fixtures/class/declaration/private-identifier.ts new file mode 100644 index 000000000000..13ab5d80c3e9 --- /dev/null +++ b/packages/scope-manager/tests/fixtures/class/declaration/private-identifier.ts @@ -0,0 +1,7 @@ +class Foo { + #bar; + + constructor() { + this.#bar = 1; + } +} diff --git a/packages/scope-manager/tests/fixtures/class/declaration/private-identifier.ts.shot b/packages/scope-manager/tests/fixtures/class/declaration/private-identifier.ts.shot new file mode 100644 index 000000000000..bed463a748a8 --- /dev/null +++ b/packages/scope-manager/tests/fixtures/class/declaration/private-identifier.ts.shot @@ -0,0 +1,83 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`class declaration private-identifier 1`] = ` +ScopeManager { + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2 { + defs: Array [ + ClassNameDefinition$1 { + name: Identifier<"Foo">, + node: ClassDeclaration$1, + }, + ], + name: "Foo", + references: Array [], + isValueVariable: true, + isTypeVariable: true, + }, + Variable$3 { + defs: Array [ + ClassNameDefinition$2 { + name: Identifier<"Foo">, + node: ClassDeclaration$1, + }, + ], + name: "Foo", + references: Array [], + isValueVariable: true, + isTypeVariable: true, + }, + Variable$4 { + defs: Array [], + name: "arguments", + references: Array [], + isValueVariable: true, + isTypeVariable: true, + }, + ], + scopes: Array [ + GlobalScope$1 { + block: Program$2, + isStrict: false, + references: Array [], + set: Map { + "const" => ImplicitGlobalConstTypeVariable, + "Foo" => Variable$2, + }, + type: "global", + upper: null, + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2, + ], + }, + ClassScope$2 { + block: ClassDeclaration$1, + isStrict: true, + references: Array [], + set: Map { + "Foo" => Variable$3, + }, + type: "class", + upper: GlobalScope$1, + variables: Array [ + Variable$3, + ], + }, + FunctionScope$3 { + block: FunctionExpression$3, + isStrict: true, + references: Array [], + set: Map { + "arguments" => Variable$4, + }, + type: "function", + upper: ClassScope$2, + variables: Array [ + Variable$4, + ], + }, + ], +} +`; diff --git a/packages/scope-manager/tests/fixtures/class/expression/private-identifier.ts b/packages/scope-manager/tests/fixtures/class/expression/private-identifier.ts new file mode 100644 index 000000000000..95d1cb660ad4 --- /dev/null +++ b/packages/scope-manager/tests/fixtures/class/expression/private-identifier.ts @@ -0,0 +1,7 @@ +const Foo = class { + #bar; + + constructor() { + this.#bar = 1; + } +}; diff --git a/packages/scope-manager/tests/fixtures/class/expression/private-identifier.ts.shot b/packages/scope-manager/tests/fixtures/class/expression/private-identifier.ts.shot new file mode 100644 index 000000000000..d9961a857634 --- /dev/null +++ b/packages/scope-manager/tests/fixtures/class/expression/private-identifier.ts.shot @@ -0,0 +1,80 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`class expression private-identifier 1`] = ` +ScopeManager { + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2 { + defs: Array [ + VariableDefinition$1 { + name: Identifier<"Foo">, + node: VariableDeclarator$1, + }, + ], + name: "Foo", + references: Array [ + Reference$1 { + identifier: Identifier<"Foo">, + init: true, + isRead: false, + isTypeReference: false, + isValueReference: true, + isWrite: true, + resolved: Variable$2, + writeExpr: ClassExpression$2, + }, + ], + isValueVariable: true, + isTypeVariable: false, + }, + Variable$3 { + defs: Array [], + name: "arguments", + references: Array [], + isValueVariable: true, + isTypeVariable: true, + }, + ], + scopes: Array [ + GlobalScope$1 { + block: Program$3, + isStrict: false, + references: Array [ + Reference$1, + ], + set: Map { + "const" => ImplicitGlobalConstTypeVariable, + "Foo" => Variable$2, + }, + type: "global", + upper: null, + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2, + ], + }, + ClassScope$2 { + block: ClassExpression$2, + isStrict: true, + references: Array [], + set: Map {}, + type: "class", + upper: GlobalScope$1, + variables: Array [], + }, + FunctionScope$3 { + block: FunctionExpression$4, + isStrict: true, + references: Array [], + set: Map { + "arguments" => Variable$3, + }, + type: "function", + upper: ClassScope$2, + variables: Array [ + Variable$3, + ], + }, + ], +} +`; diff --git a/packages/shared-fixtures/fixtures/javascript/classes/class-private-identifier-accessor.src.js b/packages/shared-fixtures/fixtures/javascript/classes/class-private-identifier-accessor.src.js new file mode 100644 index 000000000000..6a8a89931955 --- /dev/null +++ b/packages/shared-fixtures/fixtures/javascript/classes/class-private-identifier-accessor.src.js @@ -0,0 +1,8 @@ +class Foo { + get #priv1() { return 1 } + set #priv1(value) { } + + constructor() { + this.#priv1 = 1; + } +} diff --git a/packages/shared-fixtures/fixtures/javascript/classes/class-private-identifier-field.src.js b/packages/shared-fixtures/fixtures/javascript/classes/class-private-identifier-field.src.js new file mode 100644 index 000000000000..4519b85cd975 --- /dev/null +++ b/packages/shared-fixtures/fixtures/javascript/classes/class-private-identifier-field.src.js @@ -0,0 +1,8 @@ +class Foo { + #priv1; + #priv2 = 1; + + constructor() { + this.#priv1 = 1; + } +} diff --git a/packages/shared-fixtures/fixtures/javascript/classes/class-private-identifier-method.src.js b/packages/shared-fixtures/fixtures/javascript/classes/class-private-identifier-method.src.js new file mode 100644 index 000000000000..f2694d08e36b --- /dev/null +++ b/packages/shared-fixtures/fixtures/javascript/classes/class-private-identifier-method.src.js @@ -0,0 +1,7 @@ +class Foo { + #bar() {} + + constructor() { + this.#bar(); + } +} diff --git a/packages/shared-fixtures/fixtures/typescript/basics/class-private-identifier-field-with-accessibility-error.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/class-private-identifier-field-with-accessibility-error.src.ts new file mode 100644 index 000000000000..554ea66635ae --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/class-private-identifier-field-with-accessibility-error.src.ts @@ -0,0 +1,5 @@ +class Foo { + private #priv1: string + public #priv2: string + static #priv3: string +} diff --git a/packages/shared-fixtures/fixtures/typescript/basics/class-private-identifier-field-with-annotation.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/class-private-identifier-field-with-annotation.src.ts new file mode 100644 index 000000000000..f771a81a83a4 --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/class-private-identifier-field-with-annotation.src.ts @@ -0,0 +1,8 @@ +class Foo { + #priv1: number; + #priv2: number = 1; + + constructor() { + this.#priv1 = 1; + } +} diff --git a/packages/shared-fixtures/fixtures/typescript/basics/class-private-identifier-readonly-field.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/class-private-identifier-readonly-field.src.ts new file mode 100644 index 000000000000..254995a222b1 --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/class-private-identifier-readonly-field.src.ts @@ -0,0 +1,3 @@ +class Foo { + readonly #priv: string +} diff --git a/packages/types/tools/copy-ast-spec.ts b/packages/types/tools/copy-ast-spec.ts index ed231195eeb4..0288453a3100 100644 --- a/packages/types/tools/copy-ast-spec.ts +++ b/packages/types/tools/copy-ast-spec.ts @@ -11,7 +11,7 @@ const AST_SPEC_PATH = path.resolve(__dirname, '../../ast-spec'); const OUTPUT_PATH = path.join(path.resolve(__dirname, '../src/')); // ensure the package is built -chlidProcess.execSync('yarn build', { cwd: AST_SPEC_PATH }); +chlidProcess.execSync('yarn build', { cwd: AST_SPEC_PATH, stdio: 'inherit' }); const HEADER = `\ /********************************************** diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 0846087759f3..e800233a7106 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -775,6 +775,14 @@ export class Converter { }); } + case SyntaxKind.PrivateIdentifier: { + return this.createNode(node, { + type: AST_NODE_TYPES.PrivateIdentifier, + // typescript includes the `#` in the text + name: node.text.slice(1), + }); + } + case SyntaxKind.WithStatement: return this.createNode(node, { type: AST_NODE_TYPES.WithStatement, diff --git a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts index 07b2bb5db318..586aea269eea 100644 --- a/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts +++ b/packages/typescript-estree/src/ts-estree/estree-to-ts-node-types.ts @@ -72,6 +72,7 @@ export interface EstreeToTsNodeTypes { | ts.Identifier | ts.ConstructorDeclaration | ts.Token; + [AST_NODE_TYPES.PrivateIdentifier]: ts.PrivateIdentifier; [AST_NODE_TYPES.IfStatement]: ts.IfStatement; [AST_NODE_TYPES.ImportDeclaration]: ts.ImportDeclaration; [AST_NODE_TYPES.ImportDefaultSpecifier]: ts.ImportClause; diff --git a/packages/typescript-estree/src/ts-estree/ts-nodes.ts b/packages/typescript-estree/src/ts-estree/ts-nodes.ts index 673dd6f9831c..79756053e087 100644 --- a/packages/typescript-estree/src/ts-estree/ts-nodes.ts +++ b/packages/typescript-estree/src/ts-estree/ts-nodes.ts @@ -6,6 +6,8 @@ declare module 'typescript' { /* eslint-disable @typescript-eslint/no-empty-interface */ export interface NamedTupleMember extends ts.Node {} export interface TemplateLiteralTypeNode extends ts.Node {} + export interface PrivateIdentifier extends ts.Node {} + export interface ClassStaticBlockDeclaration extends ts.Node {} /* eslint-enable @typescript-eslint/no-empty-interface */ } @@ -14,6 +16,7 @@ export type TSToken = ts.Token; export type TSNode = | ts.Modifier | ts.Identifier + | ts.PrivateIdentifier | ts.QualifiedName | ts.ComputedPropertyName | ts.Decorator diff --git a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts index a3400b97d336..3f4246b037cc 100644 --- a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts +++ b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts @@ -181,6 +181,12 @@ tester.addFixturePatternConfig('javascript/classes', { * TS3.6 made computed constructors parse as actual constructors. */ 'class-two-methods-computed-constructor', + /** + * Babel emits a `PrivateName` instead of `PrivateIdentifier` + */ + 'class-private-identifier-accessor', + 'class-private-identifier-method', + 'class-private-identifier-field', ], }); @@ -386,6 +392,15 @@ tester.addFixturePatternConfig('typescript/basics', { * This is intentional; babel is not checking types */ 'catch-clause-with-invalid-annotation', + /** + * [BABEL ERRORED, BUT TS-ESTREE DID NOT] + * TODO: enforce that accessibility is not allowed on a private identifier + */ + 'class-private-identifier-field-with-accessibility-error', + /** + * Babel emits a `PrivateName` instead of `PrivateIdentifier` + */ + 'class-private-identifier-field-with-annotation', /** * [TS-ESTREE ERRORED, BUT BABEL DID NOT] * TypeScript 4.4 new feature diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap index 031e7f61e120..2a46c9188cb2 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap @@ -273,6 +273,12 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-one-method-super.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-private-identifier-accessor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-private-identifier-field.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-private-identifier-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method-named-prototype.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1751,6 +1757,12 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-multi-line-keyword-declare.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-private-identifier-field-with-accessibility-error.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-private-identifier-field-with-annotation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-private-identifier-readonly-field.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-static-blocks.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-accessibility-modifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-accessor.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-accessor.src.js.shot new file mode 100644 index 000000000000..07249d71dc9a --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-accessor.src.js.shot @@ -0,0 +1,1024 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`javascript classes class-private-identifier-accessor.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "name": "priv1", + "range": Array [ + 18, + 24, + ], + "type": "PrivateIdentifier", + }, + "kind": "get", + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": false, + "range": Array [ + 14, + 39, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 29, + 37, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 27, + 39, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 24, + 39, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "name": "priv1", + "range": Array [ + 46, + 52, + ], + "type": "PrivateIdentifier", + }, + "kind": "set", + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "override": false, + "range": Array [ + 42, + 63, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 60, + 63, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "name": "value", + "range": Array [ + 53, + 58, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 52, + 63, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "name": "constructor", + "range": Array [ + 67, + 78, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "override": false, + "range": Array [ + 67, + 107, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 87, + 91, + ], + "type": "ThisExpression", + }, + "optional": false, + "property": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "name": "priv1", + "range": Array [ + 92, + 98, + ], + "type": "PrivateIdentifier", + }, + "range": Array [ + 87, + 98, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "operator": "=", + "range": Array [ + 87, + 102, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 6, + }, + "start": Object { + "column": 18, + "line": 6, + }, + }, + "range": Array [ + 101, + 102, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 87, + 103, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "range": Array [ + 81, + 107, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 13, + "line": 5, + }, + }, + "params": Array [], + "range": Array [ + 78, + 107, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 109, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 109, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 110, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Identifier", + "value": "#priv1", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 29, + 35, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 42, + 45, + ], + "type": "Identifier", + "value": "set", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 46, + 52, + ], + "type": "Identifier", + "value": "#priv1", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "range": Array [ + 53, + 58, + ], + "type": "Identifier", + "value": "value", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 60, + 61, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 3, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 67, + 78, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 13, + "line": 5, + }, + }, + "range": Array [ + 78, + 79, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 79, + 80, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "range": Array [ + 81, + 82, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 87, + 91, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 6, + }, + }, + "range": Array [ + 91, + 92, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "range": Array [ + 92, + 98, + ], + "type": "Identifier", + "value": "#priv1", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 6, + }, + "start": Object { + "column": 16, + "line": 6, + }, + }, + "range": Array [ + 99, + 100, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 6, + }, + "start": Object { + "column": 18, + "line": 6, + }, + }, + "range": Array [ + 101, + 102, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 6, + }, + "start": Object { + "column": 19, + "line": 6, + }, + }, + "range": Array [ + 102, + 103, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 7, + }, + }, + "range": Array [ + 106, + 107, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 8, + }, + }, + "range": Array [ + 108, + 109, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-field.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-field.src.js.shot new file mode 100644 index 000000000000..63586a9fa6df --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-field.src.js.shot @@ -0,0 +1,748 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`javascript classes class-private-identifier-field.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "priv1", + "range": Array [ + 14, + 20, + ], + "type": "PrivateIdentifier", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": false, + "range": Array [ + 14, + 21, + ], + "readonly": undefined, + "static": false, + "type": "PropertyDefinition", + "value": null, + }, + Object { + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "name": "priv2", + "range": Array [ + 24, + 30, + ], + "type": "PrivateIdentifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "override": false, + "range": Array [ + 24, + 35, + ], + "readonly": undefined, + "static": false, + "type": "PropertyDefinition", + "value": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 33, + 34, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "name": "constructor", + "range": Array [ + 39, + 50, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "override": false, + "range": Array [ + 39, + 79, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 59, + 63, + ], + "type": "ThisExpression", + }, + "optional": false, + "property": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "name": "priv1", + "range": Array [ + 64, + 70, + ], + "type": "PrivateIdentifier", + }, + "range": Array [ + 59, + 70, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "operator": "=", + "range": Array [ + 59, + 74, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 6, + }, + "start": Object { + "column": 18, + "line": 6, + }, + }, + "range": Array [ + 73, + 74, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 59, + 75, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "range": Array [ + 53, + 79, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 13, + "line": 5, + }, + }, + "params": Array [], + "range": Array [ + 50, + 79, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 81, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 81, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 82, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "Identifier", + "value": "#priv1", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 24, + 30, + ], + "type": "Identifier", + "value": "#priv2", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 39, + 50, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 13, + "line": 5, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 59, + 63, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 6, + }, + }, + "range": Array [ + 63, + 64, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "range": Array [ + 64, + 70, + ], + "type": "Identifier", + "value": "#priv1", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 6, + }, + "start": Object { + "column": 16, + "line": 6, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 6, + }, + "start": Object { + "column": 18, + "line": 6, + }, + }, + "range": Array [ + 73, + 74, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 6, + }, + "start": Object { + "column": 19, + "line": 6, + }, + }, + "range": Array [ + 74, + 75, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 7, + }, + }, + "range": Array [ + 78, + 79, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 8, + }, + }, + "range": Array [ + 80, + 81, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-method.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-method.src.js.shot new file mode 100644 index 000000000000..099a48f546c5 --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-private-identifier-method.src.js.shot @@ -0,0 +1,691 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`javascript classes class-private-identifier-method.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 14, + 18, + ], + "type": "PrivateIdentifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": false, + "range": Array [ + 14, + 23, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 21, + 23, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 18, + 23, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "name": "constructor", + "range": Array [ + 27, + 38, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "override": false, + "range": Array [ + 27, + 63, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 13, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 47, + 51, + ], + "type": "ThisExpression", + }, + "optional": false, + "property": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "name": "bar", + "range": Array [ + 52, + 56, + ], + "type": "PrivateIdentifier", + }, + "range": Array [ + 47, + 56, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "optional": false, + "range": Array [ + 47, + 58, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 47, + 59, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 41, + 63, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 13, + "line": 4, + }, + }, + "params": Array [], + "range": Array [ + 38, + 63, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 65, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 65, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 66, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 18, + ], + "type": "Identifier", + "value": "#bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 27, + 38, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 4, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 47, + 51, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "range": Array [ + 52, + 56, + ], + "type": "Identifier", + "value": "#bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 13, + "line": 5, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 57, + 58, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 5, + }, + "start": Object { + "column": 15, + "line": 5, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 6, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 7, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-accessibility-error.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-accessibility-error.src.ts.shot new file mode 100644 index 000000000000..04b127b9d7e9 --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-accessibility-error.src.ts.shot @@ -0,0 +1,597 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics class-private-identifier-field-with-accessibility-error.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "private", + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "priv1", + "range": Array [ + 22, + 28, + ], + "type": "PrivateIdentifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": false, + "range": Array [ + 14, + 36, + ], + "readonly": undefined, + "static": false, + "type": "PropertyDefinition", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 28, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "TSStringKeyword", + }, + }, + "value": null, + }, + Object { + "accessibility": "public", + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "priv2", + "range": Array [ + 46, + 52, + ], + "type": "PrivateIdentifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "override": false, + "range": Array [ + 39, + 60, + ], + "readonly": undefined, + "static": false, + "type": "PropertyDefinition", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 52, + 60, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 3, + }, + }, + "range": Array [ + 54, + 60, + ], + "type": "TSStringKeyword", + }, + }, + "value": null, + }, + Object { + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "name": "priv3", + "range": Array [ + 70, + 76, + ], + "type": "PrivateIdentifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "override": false, + "range": Array [ + 63, + 84, + ], + "readonly": undefined, + "static": true, + "type": "PropertyDefinition", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, + "range": Array [ + 76, + 84, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "range": Array [ + 78, + 84, + ], + "type": "TSStringKeyword", + }, + }, + "value": null, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 86, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 86, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 87, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 21, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "Identifier", + "value": "#priv1", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 46, + 52, + ], + "type": "Identifier", + "value": "#priv2", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 3, + }, + }, + "range": Array [ + 54, + 60, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 63, + 69, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "range": Array [ + 70, + 76, + ], + "type": "Identifier", + "value": "#priv3", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, + "range": Array [ + 76, + 77, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "range": Array [ + 78, + 84, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 85, + 86, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-annotation.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-annotation.src.ts.shot new file mode 100644 index 000000000000..c75fc510111c --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-field-with-annotation.src.ts.shot @@ -0,0 +1,888 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics class-private-identifier-field-with-annotation.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "priv1", + "range": Array [ + 14, + 20, + ], + "type": "PrivateIdentifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": false, + "range": Array [ + 14, + 29, + ], + "readonly": undefined, + "static": false, + "type": "PropertyDefinition", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 20, + 28, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSNumberKeyword", + }, + }, + "value": null, + }, + Object { + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "name": "priv2", + "range": Array [ + 32, + 38, + ], + "type": "PrivateIdentifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "override": false, + "range": Array [ + 32, + 51, + ], + "readonly": undefined, + "static": false, + "type": "PropertyDefinition", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 38, + 46, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "TSNumberKeyword", + }, + }, + "value": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "name": "constructor", + "range": Array [ + 55, + 66, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "override": false, + "range": Array [ + 55, + 95, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 75, + 79, + ], + "type": "ThisExpression", + }, + "optional": false, + "property": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "name": "priv1", + "range": Array [ + 80, + 86, + ], + "type": "PrivateIdentifier", + }, + "range": Array [ + 75, + 86, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "operator": "=", + "range": Array [ + 75, + 90, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 6, + }, + "start": Object { + "column": 18, + "line": 6, + }, + }, + "range": Array [ + 89, + 90, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 75, + 91, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "range": Array [ + 69, + 95, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 13, + "line": 5, + }, + }, + "params": Array [], + "range": Array [ + 66, + 95, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 97, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 97, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 98, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "Identifier", + "value": "#priv1", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "Identifier", + "value": "#priv2", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 55, + 66, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 13, + "line": 5, + }, + }, + "range": Array [ + 66, + 67, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 67, + 68, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 75, + 79, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 6, + }, + }, + "range": Array [ + 79, + 80, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "range": Array [ + 80, + 86, + ], + "type": "Identifier", + "value": "#priv1", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 6, + }, + "start": Object { + "column": 16, + "line": 6, + }, + }, + "range": Array [ + 87, + 88, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 6, + }, + "start": Object { + "column": 18, + "line": 6, + }, + }, + "range": Array [ + 89, + 90, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 6, + }, + "start": Object { + "column": 19, + "line": 6, + }, + }, + "range": Array [ + 90, + 91, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 7, + }, + }, + "range": Array [ + 94, + 95, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 8, + }, + }, + "range": Array [ + 96, + 97, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-readonly-field.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-readonly-field.src.ts.shot new file mode 100644 index 000000000000..1131eb4ab21e --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-private-identifier-readonly-field.src.ts.shot @@ -0,0 +1,301 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics class-private-identifier-readonly-field.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "priv", + "range": Array [ + 23, + 28, + ], + "type": "PrivateIdentifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": false, + "range": Array [ + 14, + 36, + ], + "readonly": true, + "static": false, + "type": "PropertyDefinition", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 28, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "TSStringKeyword", + }, + }, + "value": null, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 38, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 38, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 22, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 23, + 28, + ], + "type": "Identifier", + "value": "#priv", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index aed915b8613d..5ea3a984b532 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -39,7 +39,7 @@ }, "dependencies": { "@typescript-eslint/types": "4.33.0", - "eslint-visitor-keys": "^2.0.0" + "eslint-visitor-keys": "^3.0.0" }, "devDependencies": { "@types/eslint-visitor-keys": "*" From 4b096442f731c0a60926ac0391a4f2c4208aa8d4 Mon Sep 17 00:00:00 2001 From: Yosuke Ota Date: Mon, 30 Aug 2021 04:59:21 +0900 Subject: [PATCH 417/473] fix(eslint-plugin): crash in no-dupe-class-members (v5) (#3813) --- .../src/rules/no-dupe-class-members.ts | 13 ++++++----- .../tests/rules/no-dupe-class-members.test.ts | 22 +++++++++++++++++++ .../eslint-plugin/typings/eslint-rules.d.ts | 4 ++-- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-dupe-class-members.ts b/packages/eslint-plugin/src/rules/no-dupe-class-members.ts index dcc8b705038a..e9cb151d6d69 100644 --- a/packages/eslint-plugin/src/rules/no-dupe-class-members.ts +++ b/packages/eslint-plugin/src/rules/no-dupe-class-members.ts @@ -27,15 +27,18 @@ export default util.createRule({ create(context) { const rules = baseRule.create(context); - function wrapMemberDefinitionListener( - coreListener: (node: TSESTree.MethodDefinition) => void, - ): (node: TSESTree.MethodDefinition) => void { - return (node: TSESTree.MethodDefinition): void => { + function wrapMemberDefinitionListener< + N extends TSESTree.MethodDefinition | TSESTree.PropertyDefinition, + >(coreListener: (node: N) => void): (node: N) => void { + return (node: N): void => { if (node.computed) { return; } - if (node.value.type === AST_NODE_TYPES.TSEmptyBodyFunctionExpression) { + if ( + node.value && + node.value.type === AST_NODE_TYPES.TSEmptyBodyFunctionExpression + ) { return; } diff --git a/packages/eslint-plugin/tests/rules/no-dupe-class-members.test.ts b/packages/eslint-plugin/tests/rules/no-dupe-class-members.test.ts index 50cbdba54107..5cfbc5e3128d 100644 --- a/packages/eslint-plugin/tests/rules/no-dupe-class-members.test.ts +++ b/packages/eslint-plugin/tests/rules/no-dupe-class-members.test.ts @@ -166,6 +166,28 @@ class A { class A { set foo(value) {} foo() {} +} + `, + errors: [ + { line: 4, column: 3, messageId: 'unexpected', data: { name: 'foo' } }, + ], + }, + { + code: ` +class A { + foo; + foo = 42; +} + `, + errors: [ + { line: 4, column: 3, messageId: 'unexpected', data: { name: 'foo' } }, + ], + }, + { + code: ` +class A { + foo; + foo() {} } `, errors: [ diff --git a/packages/eslint-plugin/typings/eslint-rules.d.ts b/packages/eslint-plugin/typings/eslint-rules.d.ts index aa833057ba20..44b679281fbd 100644 --- a/packages/eslint-plugin/typings/eslint-rules.d.ts +++ b/packages/eslint-plugin/typings/eslint-rules.d.ts @@ -234,7 +234,7 @@ declare module 'eslint/lib/rules/no-dupe-class-members' { MethodDefinition?: (node: TSESTree.MethodDefinition) => void; // for ESLint v8 'MethodDefinition, PropertyDefinition'?: ( - node: TSESTree.MethodDefinition /* | TSESTree.PropertyDefinition */, + node: TSESTree.MethodDefinition | TSESTree.PropertyDefinition, ) => void; } >; @@ -646,7 +646,7 @@ declare module 'eslint/lib/rules/no-extra-semi' { MethodDefinition?: (node: TSESTree.MethodDefinition) => void; // for ESLint v8 'MethodDefinition, PropertyDefinition'?: ( - node: TSESTree.MethodDefinition /* | TSESTree.PropertyDefinition */, + node: TSESTree.MethodDefinition | TSESTree.PropertyDefinition, ) => void; } >; From deeb7bb9334d301c6af56aefd37d318231af11ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 30 Aug 2021 08:16:45 +0200 Subject: [PATCH 418/473] feat(eslint-plugin): update recommended configs (#3809) --- packages/eslint-plugin/README.md | 11 ++-- packages/eslint-plugin/src/configs/all.ts | 1 - .../recommended-requiring-type-checking.ts | 2 +- .../eslint-plugin/src/configs/recommended.ts | 4 +- .../rules/explicit-module-boundary-types.ts | 2 +- .../src/rules/no-implicit-any-catch.ts | 1 + .../src/rules/no-loss-of-precision.ts | 2 +- .../rules/no-unnecessary-type-constraint.ts | 2 +- .../src/rules/no-unsafe-argument.ts | 3 +- .../src/rules/prefer-regexp-exec.ts | 2 +- .../typescript-estree/src/ast-converter.ts | 6 +- packages/typescript-estree/src/convert.ts | 65 +++++++++++++------ .../src/create-program/createWatchProgram.ts | 2 +- .../src/semantic-or-syntactic-errors.ts | 25 +++---- .../tests/ast-alignment/parse.ts | 18 ++--- .../tests/ast-alignment/spec.ts | 15 +++-- .../tests/ast-alignment/utils.ts | 8 +-- .../tests/lib/convert.test.ts | 9 +-- .../typescript-estree/tools/test-utils.ts | 20 +++--- tests/jest-resolver.js | 1 + 20 files changed, 121 insertions(+), 78 deletions(-) diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 87ed9c2a276d..6b7c2701ffa0 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -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 | :white_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 | | | | | [`@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: | | @@ -125,7 +125,6 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@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 | :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 | :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-meaningless-void-operator`](./docs/rules/no-meaningless-void-operator.md) | Disallow the `void` operator except when used to discard a value | | :wrench: | :thought_balloon: | @@ -144,8 +143,8 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@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 | :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 a function with an any type value | | | :thought_balloon: | +| [`@typescript-eslint/no-unnecessary-type-constraint`](./docs/rules/no-unnecessary-type-constraint.md) | Disallows unnecessary constraints on generic types | :white_check_mark: | :wrench: | | +| [`@typescript-eslint/no-unsafe-argument`](./docs/rules/no-unsafe-argument.md) | Disallows calling a function with an any type value | :white_check_mark: | | :thought_balloon: | | [`@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: | @@ -164,7 +163,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: | :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 | | :wrench: | :thought_balloon: | | [`@typescript-eslint/prefer-return-this-type`](./docs/rules/prefer-return-this-type.md) | Enforce that `this` is used when only `this` type is returned | | :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: | | @@ -213,7 +212,7 @@ In these cases, we create what we call an extension rule; a rule within our plug | [`@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 | | | | +| [`@typescript-eslint/no-loss-of-precision`](./docs/rules/no-loss-of-precision.md) | Disallow literal numbers that lose precision | :white_check_mark: | | | | [`@typescript-eslint/no-magic-numbers`](./docs/rules/no-magic-numbers.md) | Disallow magic numbers | | | | | [`@typescript-eslint/no-redeclare`](./docs/rules/no-redeclare.md) | Disallow variable redeclaration | | | | | [`@typescript-eslint/no-restricted-imports`](./docs/rules/no-restricted-imports.md) | Disallow specified modules when loaded by `import` | | | | diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index eff553b5b9b7..17c06645e61e 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -65,7 +65,6 @@ export = { '@typescript-eslint/no-extraneous-class': 'error', '@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/no-for-in-array': 'error', - '@typescript-eslint/no-implicit-any-catch': 'error', 'no-implied-eval': 'off', '@typescript-eslint/no-implied-eval': 'error', '@typescript-eslint/no-inferrable-types': 'error', diff --git a/packages/eslint-plugin/src/configs/recommended-requiring-type-checking.ts b/packages/eslint-plugin/src/configs/recommended-requiring-type-checking.ts index fecfa6002af9..369d33d6687e 100644 --- a/packages/eslint-plugin/src/configs/recommended-requiring-type-checking.ts +++ b/packages/eslint-plugin/src/configs/recommended-requiring-type-checking.ts @@ -12,11 +12,11 @@ export = { '@typescript-eslint/no-implied-eval': 'error', '@typescript-eslint/no-misused-promises': 'error', '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/no-unsafe-argument': 'error', '@typescript-eslint/no-unsafe-assignment': 'error', '@typescript-eslint/no-unsafe-call': 'error', '@typescript-eslint/no-unsafe-member-access': 'error', '@typescript-eslint/no-unsafe-return': 'error', - '@typescript-eslint/prefer-regexp-exec': 'error', 'require-await': 'off', '@typescript-eslint/require-await': 'error', '@typescript-eslint/restrict-plus-operands': 'error', diff --git a/packages/eslint-plugin/src/configs/recommended.ts b/packages/eslint-plugin/src/configs/recommended.ts index d9450197c415..10b1d04581fb 100644 --- a/packages/eslint-plugin/src/configs/recommended.ts +++ b/packages/eslint-plugin/src/configs/recommended.ts @@ -8,7 +8,6 @@ export = { '@typescript-eslint/adjacent-overload-signatures': 'error', '@typescript-eslint/ban-ts-comment': 'error', '@typescript-eslint/ban-types': 'error', - '@typescript-eslint/explicit-module-boundary-types': 'warn', 'no-array-constructor': 'off', '@typescript-eslint/no-array-constructor': 'error', 'no-empty-function': 'off', @@ -19,11 +18,14 @@ export = { 'no-extra-semi': 'off', '@typescript-eslint/no-extra-semi': 'error', '@typescript-eslint/no-inferrable-types': 'error', + 'no-loss-of-precision': 'off', + '@typescript-eslint/no-loss-of-precision': 'error', '@typescript-eslint/no-misused-new': 'error', '@typescript-eslint/no-namespace': 'error', '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', '@typescript-eslint/no-non-null-assertion': 'warn', '@typescript-eslint/no-this-alias': 'error', + '@typescript-eslint/no-unnecessary-type-constraint': 'error', 'no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': 'warn', '@typescript-eslint/no-var-requires': 'error', diff --git a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts index f9670cc98ee3..94f492bf06ca 100644 --- a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts +++ b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts @@ -37,7 +37,7 @@ export default util.createRule({ docs: { description: "Require explicit return and argument types on exported functions' and classes' public class methods", - recommended: 'warn', + recommended: false, }, messages: { missingReturnType: 'Missing return type on function.', diff --git a/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts b/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts index f933336866b7..aa050794c4ae 100644 --- a/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts +++ b/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts @@ -17,6 +17,7 @@ export type MessageIds = export default util.createRule({ name: 'no-implicit-any-catch', meta: { + deprecated: true, type: 'suggestion', docs: { description: 'Disallow usage of the implicit `any` type in catch clauses', diff --git a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts index 955032474755..d095def03cc9 100644 --- a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts +++ b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts @@ -15,7 +15,7 @@ export default util.createRule({ type: 'problem', docs: { description: 'Disallow literal numbers that lose precision', - recommended: false, + recommended: 'error', extendsBaseRule: true, }, hasSuggestions: baseRule?.meta.hasSuggestions, diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-constraint.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-constraint.ts index 535cae96023b..68895c01e71d 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-constraint.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-constraint.ts @@ -33,7 +33,7 @@ export default util.createRule({ meta: { docs: { description: 'Disallows unnecessary constraints on generic types', - recommended: false, + recommended: 'error', suggestion: true, }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts index 46ed36a0dc3d..3df1e6a486c0 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts @@ -138,8 +138,7 @@ export default util.createRule<[], MessageIds>({ type: 'problem', docs: { description: 'Disallows calling a function with an any type value', - // TODO - enable this with next breaking - recommended: false, + recommended: 'error', requiresTypeChecking: true, }, messages: { diff --git a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts index 93ac0cda6409..bb91f3408460 100644 --- a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts +++ b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts @@ -29,7 +29,7 @@ export default createRule({ docs: { description: 'Enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided', - recommended: 'error', + recommended: false, requiresTypeChecking: true, }, messages: { diff --git a/packages/typescript-estree/src/ast-converter.ts b/packages/typescript-estree/src/ast-converter.ts index 465a0b955c47..49ffd28f479e 100644 --- a/packages/typescript-estree/src/ast-converter.ts +++ b/packages/typescript-estree/src/ast-converter.ts @@ -1,9 +1,9 @@ -import { SourceFile } from 'typescript'; +import type { SourceFile } from 'typescript'; import { convertError, Converter, ASTMaps } from './convert'; import { convertComments } from './convert-comments'; import { convertTokens } from './node-utils'; -import { Extra } from './parser-options'; -import { TSESTree } from './ts-estree'; +import type { Extra } from './parser-options'; +import type { TSESTree } from './ts-estree'; import { simpleTraverse } from './simple-traverse'; export function astConverter( diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index e800233a7106..37af8556cca4 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -23,7 +23,11 @@ import { TSError, unescapeStringLiteralText, } from './node-utils'; -import { ParserWeakMap, ParserWeakMapESTreeToTSNode } from './parser-options'; +import type { + ParserWeakMap, + ParserWeakMapESTreeToTSNode, +} from './parser-options'; +import type { SemanticOrSyntacticError } from './semantic-or-syntactic-errors'; import { AST_NODE_TYPES, TSESTree, @@ -31,6 +35,7 @@ import { TSNode, } from './ts-estree'; import { typescriptVersionIsAtLeast } from './version-check'; +import { Expression } from '@typescript-eslint/types/src/ast-spec'; const SyntaxKind = ts.SyntaxKind; @@ -44,11 +49,13 @@ interface ConverterOptions { * @param error the error object * @returns converted error object */ -export function convertError(error: any): TSError { +export function convertError( + error: ts.DiagnosticWithLocation | SemanticOrSyntacticError, +): TSError { return createError( - error.file, - error.start, - error.message || error.messageText, + error.file!, + error.start!, + ('message' in error && error.message) || (error.messageText as string), ); } @@ -264,7 +271,7 @@ export class Converter { tsType: ts.TypeNode | undefined, parent?: ts.Node, ): TSESTree.BindingName { - const id = this.convertPattern(name); + const id = this.convertPattern(name) as TSESTree.BindingName; if (tsType) { id.typeAnnotation = this.convertTypeAnnotation(tsType, parent); @@ -509,10 +516,10 @@ export class Converter { ) .forEach(([key, value]) => { if (Array.isArray(value)) { - result[key] = value.map(el => this.convertChild(el)); + result[key] = value.map(el => this.convertChild(el as TSNode)); } else if (value && typeof value === 'object' && value.kind) { // need to check node[key].kind to ensure we don't try to convert a symbol - result[key] = this.convertChild(value); + result[key] = this.convertChild(value as TSNode); } else { result[key] = value; } @@ -694,7 +701,9 @@ export class Converter { result.declare = true; break; default: - remainingModifiers.push(this.convertChild(modifier)); + remainingModifiers.push( + this.convertChild(modifier) as TSESTree.Modifier, + ); break; } } @@ -1505,8 +1514,12 @@ export class Converter { }); node.templateSpans.forEach(templateSpan => { - result.expressions.push(this.convertChild(templateSpan.expression)); - result.quasis.push(this.convertChild(templateSpan.literal)); + result.expressions.push( + this.convertChild(templateSpan.expression) as TSESTree.Expression, + ); + result.quasis.push( + this.convertChild(templateSpan.literal) as TSESTree.TemplateElement, + ); }); return result; } @@ -1731,14 +1744,18 @@ export class Converter { } if (node.importClause.name) { - result.specifiers.push(this.convertChild(node.importClause)); + result.specifiers.push( + this.convertChild(node.importClause) as TSESTree.ImportClause, + ); } if (node.importClause.namedBindings) { switch (node.importClause.namedBindings.kind) { case SyntaxKind.NamespaceImport: result.specifiers.push( - this.convertChild(node.importClause.namedBindings), + this.convertChild( + node.importClause.namedBindings, + ) as TSESTree.ImportClause, ); break; case SyntaxKind.NamedImports: @@ -1893,7 +1910,7 @@ export class Converter { expressions: [], }); - const left = this.convertChild(node.left); + const left = this.convertChild(node.left) as Expression; if ( left.type === AST_NODE_TYPES.SequenceExpression && node.left.kind !== SyntaxKind.ParenthesizedExpression @@ -1903,7 +1920,9 @@ export class Converter { result.expressions.push(left); } - result.expressions.push(this.convertChild(node.right)); + result.expressions.push( + this.convertChild(node.right) as TSESTree.Expression, + ); return result; } else { const type = getBinaryExpressionType(node.operatorToken); @@ -2584,11 +2603,15 @@ export class Converter { for (const heritageClause of interfaceHeritageClauses) { if (heritageClause.token === SyntaxKind.ExtendsKeyword) { for (const n of heritageClause.types) { - interfaceExtends.push(this.convertChild(n, node)); + interfaceExtends.push( + this.convertChild(n, node) as TSESTree.TSInterfaceHeritage, + ); } } else { for (const n of heritageClause.types) { - interfaceImplements.push(this.convertChild(n, node)); + interfaceImplements.push( + this.convertChild(n, node) as TSESTree.TSInterfaceHeritage, + ); } } } @@ -2830,8 +2853,12 @@ export class Converter { }); node.templateSpans.forEach(templateSpan => { - result.types.push(this.convertChild(templateSpan.type)); - result.quasis.push(this.convertChild(templateSpan.literal)); + result.types.push( + this.convertChild(templateSpan.type) as TSESTree.TypeNode, + ); + result.quasis.push( + this.convertChild(templateSpan.literal) as TSESTree.TemplateElement, + ); }); return result; } diff --git a/packages/typescript-estree/src/create-program/createWatchProgram.ts b/packages/typescript-estree/src/create-program/createWatchProgram.ts index 2142065e47b0..ae2dec4de514 100644 --- a/packages/typescript-estree/src/create-program/createWatchProgram.ts +++ b/packages/typescript-estree/src/create-program/createWatchProgram.ts @@ -370,7 +370,7 @@ function createWatchProgram( log('Running without timeout fix'); // But because of https://github.com/microsoft/TypeScript/pull/37308 we cannot just set it to undefined // instead save it and call before getProgram is called - watchCompilerHost.setTimeout = (cb, _ms, ...args): unknown => { + watchCompilerHost.setTimeout = (cb, _ms, ...args: unknown[]): unknown => { callback = cb.bind(/*this*/ undefined, ...args); return callback; }; diff --git a/packages/typescript-estree/src/semantic-or-syntactic-errors.ts b/packages/typescript-estree/src/semantic-or-syntactic-errors.ts index fab5cd642e09..af6f33918df1 100644 --- a/packages/typescript-estree/src/semantic-or-syntactic-errors.ts +++ b/packages/typescript-estree/src/semantic-or-syntactic-errors.ts @@ -1,6 +1,12 @@ -import * as ts from 'typescript'; +import type { + Diagnostic, + DiagnosticWithLocation, + Program, + SourceFile, +} from 'typescript'; +import { flattenDiagnosticMessageText, sys } from 'typescript'; -interface SemanticOrSyntacticError extends ts.Diagnostic { +export interface SemanticOrSyntacticError extends Diagnostic { message: string; } @@ -12,8 +18,8 @@ interface SemanticOrSyntacticError extends ts.Diagnostic { * the user opts in to throwing errors on semantic issues. */ export function getFirstSemanticOrSyntacticError( - program: ts.Program, - ast: ts.SourceFile, + program: Program, + ast: SourceFile, ): SemanticOrSyntacticError | undefined { try { const supportedSyntacticDiagnostics = whitelistSupportedDiagnostics( @@ -52,8 +58,8 @@ export function getFirstSemanticOrSyntacticError( } function whitelistSupportedDiagnostics( - diagnostics: readonly (ts.DiagnosticWithLocation | ts.Diagnostic)[], -): readonly (ts.DiagnosticWithLocation | ts.Diagnostic)[] { + diagnostics: readonly (DiagnosticWithLocation | Diagnostic)[], +): readonly (DiagnosticWithLocation | Diagnostic)[] { return diagnostics.filter(diagnostic => { switch (diagnostic.code) { case 1013: // "A rest parameter or binding pattern may not have a trailing comma." @@ -103,13 +109,10 @@ function whitelistSupportedDiagnostics( } function convertDiagnosticToSemanticOrSyntacticError( - diagnostic: ts.Diagnostic, + diagnostic: Diagnostic, ): SemanticOrSyntacticError { return { ...diagnostic, - message: ts.flattenDiagnosticMessageText( - diagnostic.messageText, - ts.sys.newLine, - ), + message: flattenDiagnosticMessageText(diagnostic.messageText, sys.newLine), }; } diff --git a/packages/typescript-estree/tests/ast-alignment/parse.ts b/packages/typescript-estree/tests/ast-alignment/parse.ts index 7d340278649e..701cf069ff42 100644 --- a/packages/typescript-estree/tests/ast-alignment/parse.ts +++ b/packages/typescript-estree/tests/ast-alignment/parse.ts @@ -1,11 +1,11 @@ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */ - import type babelParser from '@babel/parser'; -import { ParserPlugin } from '@babel/parser'; +import type { ParserPlugin } from '@babel/parser'; import { codeFrameColumns } from '@babel/code-frame'; import type { File } from '@babel/types'; -import * as parser from '../../src/parser'; -import { TSESTree } from '@typescript-eslint/types'; +import type { TSESTree } from '@typescript-eslint/types'; +import { AST, parseAndGenerateServices } from '../../src/parser'; +import type { TSError } from '../../src/node-utils'; function createError( message: string, @@ -48,9 +48,9 @@ function parseWithBabelParser(text: string, jsx = true): File { }); } -function parseWithTypeScriptESTree(text: string, jsx = true): parser.AST { +function parseWithTypeScriptESTree(text: string, jsx = true): AST { try { - const result = parser.parseAndGenerateServices(text, { + const result = parseAndGenerateServices(text, { loc: true, range: true, tokens: false, @@ -66,8 +66,10 @@ function parseWithTypeScriptESTree(text: string, jsx = true): parser.AST { jsx, }); return result.ast; - } catch (e: any) { - throw createError(e.message, e.lineNumber, e.column); + } catch (e: unknown) { + const error = e as TSError; + + throw createError(error.message, error.lineNumber, error.column); } } diff --git a/packages/typescript-estree/tests/ast-alignment/spec.ts b/packages/typescript-estree/tests/ast-alignment/spec.ts index 9e308b73c643..8af9996fc9d6 100644 --- a/packages/typescript-estree/tests/ast-alignment/spec.ts +++ b/packages/typescript-estree/tests/ast-alignment/spec.ts @@ -1,7 +1,12 @@ import fs from 'fs'; +import type { File } from '@babel/types'; import { fixturesToTest } from './fixtures-to-test'; import { parse } from './parse'; -import * as parseUtils from './utils'; +import { + preprocessBabylonAST, + preprocessTypescriptAST, + removeLocationDataAndSourceTypeFromProgramNode, +} from './utils'; fixturesToTest.forEach(fixture => { const filename = fixture.filename; @@ -72,13 +77,13 @@ fixturesToTest.forEach(fixture => { * Perform some extra formatting steps on the babel AST before comparing */ expect( - parseUtils.removeLocationDataAndSourceTypeFromProgramNode( - parseUtils.preprocessBabylonAST(babelParserResult.ast), + removeLocationDataAndSourceTypeFromProgramNode( + preprocessBabylonAST(babelParserResult.ast as File), fixture.ignoreSourceType, ), ).toEqual( - parseUtils.removeLocationDataAndSourceTypeFromProgramNode( - parseUtils.preprocessTypescriptAST(typeScriptESTreeResult.ast), + removeLocationDataAndSourceTypeFromProgramNode( + preprocessTypescriptAST(typeScriptESTreeResult.ast), fixture.ignoreSourceType, ), ); diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index ad3500c89911..7066686303c3 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -1,8 +1,8 @@ // babel types are something we don't really care about /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-plus-operands */ +import type { File, Program } from '@babel/types'; import { AST_NODE_TYPES, TSESTree } from '../../src/ts-estree'; import { deeplyCopy, omitDeep } from '../../tools/test-utils'; -import * as BabelTypes from '@babel/types'; /** * Common predicates for Babylon AST preprocessing @@ -18,8 +18,8 @@ const ifNumber = (val: unknown): boolean => typeof val === 'number'; * @param ast raw babylon AST * @returns processed babylon AST */ -export function preprocessBabylonAST(ast: BabelTypes.File): any { - return omitDeep( +export function preprocessBabylonAST(ast: File): any { + return omitDeep( ast.program, [ { @@ -258,7 +258,7 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any { * Once we use babel 8, this can be removed. * @see https://github.com/babel/babel/pull/12608 */ - TSParenthesizedType(node: any) { + TSParenthesizedType(node) { const { typeAnnotation } = node; Object.keys(node).forEach(key => delete node[key]); Object.assign(node, typeAnnotation); diff --git a/packages/typescript-estree/tests/lib/convert.test.ts b/packages/typescript-estree/tests/lib/convert.test.ts index 74ce08aa9673..277063b9d8cb 100644 --- a/packages/typescript-estree/tests/lib/convert.test.ts +++ b/packages/typescript-estree/tests/lib/convert.test.ts @@ -1,7 +1,8 @@ // deeplyCopy is private internal /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-call */ -import { Converter } from '../../src/convert'; import * as ts from 'typescript'; +import type { TSNode } from '../../src'; +import { Converter } from '../../src/convert'; describe('convert', () => { function convertCode(code: string): ts.SourceFile { @@ -114,7 +115,7 @@ describe('convert', () => { ) { expect(node).toBe( maps.esTreeNodeToTSNodeMap.get( - maps.tsNodeToESTreeNodeMap.get(node as any), + maps.tsNodeToESTreeNodeMap.get(node as TSNode), ), ); } @@ -146,7 +147,7 @@ describe('convert', () => { ) { expect(node).toBe( maps.esTreeNodeToTSNodeMap.get( - maps.tsNodeToESTreeNodeMap.get(node as any), + maps.tsNodeToESTreeNodeMap.get(node as TSNode), ), ); } @@ -187,7 +188,7 @@ describe('convert', () => { expect(maps.esTreeNodeToTSNodeMap.get(program.body[0])).toBeDefined(); expect(program.body[0]).not.toBe( - maps.tsNodeToESTreeNodeMap.get(ast.statements[0] as any), + maps.tsNodeToESTreeNodeMap.get(ast.statements[0] as TSNode), ); checkMaps(ast); }); diff --git a/packages/typescript-estree/tools/test-utils.ts b/packages/typescript-estree/tools/test-utils.ts index c07ab65b831d..65e1cb131e1d 100644 --- a/packages/typescript-estree/tools/test-utils.ts +++ b/packages/typescript-estree/tools/test-utils.ts @@ -1,11 +1,15 @@ -import * as parser from '../src'; -import { TSESTreeOptions } from '../src/parser-options'; +import type { + TSESTree, + TSESTreeOptions, + ParseAndGenerateServicesResult, +} from '../src'; +import { parse as parserParse, parseAndGenerateServices } from '../src'; export function parseCodeAndGenerateServices( code: string, config: TSESTreeOptions, -): parser.ParseAndGenerateServicesResult { - return parser.parseAndGenerateServices(code, config); +): ParseAndGenerateServicesResult { + return parseAndGenerateServices(code, config); } /** @@ -24,10 +28,10 @@ export function createSnapshotTestBlock( /** * @returns the AST object */ - function parse(): parser.TSESTree.Program { + function parse(): TSESTree.Program { const ast = generateServices - ? parser.parseAndGenerateServices(code, config).ast - : parser.parse(code, config); + ? parseAndGenerateServices(code, config).ast + : parserParse(code, config); return deeplyCopy(ast); } @@ -127,7 +131,7 @@ export function omitDeep( continue; } - const child = node[prop]; + const child = node[prop] as UnknownObject | UnknownObject[]; if (Array.isArray(child)) { const value = []; for (const el of child) { diff --git a/tests/jest-resolver.js b/tests/jest-resolver.js index f79f54509b79..a0460ee0ac43 100644 --- a/tests/jest-resolver.js +++ b/tests/jest-resolver.js @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unsafe-argument */ // https://github.com/facebook/jest/issues/9771#issuecomment-871585234 // temporary workaround while we wait for https://github.com/facebook/jest/issues/9771 From ae3fa900d5b4e1f557a52ca58d35a7d098d9efaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 30 Aug 2021 18:59:56 +0200 Subject: [PATCH 419/473] feat(eslint-plugin): remove `object` from `ban-types`' default types (#3818) BREAKING CHANGE: `ban-types` no longer reports `object` by default --- packages/eslint-plugin/docs/rules/ban-types.md | 14 ++------------ packages/eslint-plugin/src/rules/ban-types.ts | 6 ------ 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/ban-types.md b/packages/eslint-plugin/docs/rules/ban-types.md index bf59ffb84618..ebcec5775123 100644 --- a/packages/eslint-plugin/docs/rules/ban-types.md +++ b/packages/eslint-plugin/docs/rules/ban-types.md @@ -75,8 +75,6 @@ The default options provide a set of "best practices", intended to provide safet - Avoid the `Object` and `{}` types, as they mean "any non-nullish value". - This is a point of confusion for many developers, who think it means "any object type". - See [this comment for more information](https://github.com/typescript-eslint/typescript-eslint/issues/2063#issuecomment-675156492). -- Avoid the `object` type, as it is currently hard to use due to not being able to assert that keys exist. - - See [microsoft/TypeScript#21732](https://github.com/microsoft/TypeScript/issues/21732). **_Important note:_** the default options suggest using `Record`; this was a stylistic decision, as the built-in `Record` type is considered to look cleaner. @@ -126,12 +124,6 @@ const defaultTypes = { '- If you want a type meaning "any value", you probably want `unknown` instead.', ].join('\n'), }, - object: { - message: [ - 'The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).', - 'Consider using `Record` instead, as it allows you to more easily inspect and use the keys.', - ].join('\n'), - }, }; ``` @@ -152,8 +144,6 @@ const symb: Symbol = Symbol('foo'); const func: Function = () => 1; // use safer object types -const lowerObj: object = {}; - const capitalObj1: Object = 1; const capitalObj2: Object = { a: 'string' }; @@ -174,7 +164,7 @@ const symb: symbol = Symbol('foo'); const func: () => number = () => 1; // use safer object types -const lowerObj: Record = {}; +const lowerObj: object = {}; const capitalObj1: number = 1; const capitalObj2: { a: string } = { a: 'string' }; @@ -185,4 +175,4 @@ const curly2: Record<'a', string> = { a: 'string' }; ## Compatibility -- TSLint: [ban-types](https://palantir.github.io/tslint/rules/ban-types/) +- TSLint: [ban-types](https://palantir.github.io/tslint/rules/ban-types) diff --git a/packages/eslint-plugin/src/rules/ban-types.ts b/packages/eslint-plugin/src/rules/ban-types.ts index 32f05e9c1208..dea2e79c4b0e 100644 --- a/packages/eslint-plugin/src/rules/ban-types.ts +++ b/packages/eslint-plugin/src/rules/ban-types.ts @@ -96,12 +96,6 @@ const defaultTypes: Types = { '- If you want a type meaning "empty object", you probably want `Record` instead.', ].join('\n'), }, - object: { - message: [ - 'The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).', - 'Consider using `Record` instead, as it allows you to more easily inspect and use the keys.', - ].join('\n'), - }, }; export const TYPE_KEYWORDS = { From b34fb7eb3102ea603bb4aef0dbbf9885b3d47557 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Fri, 3 Sep 2021 11:07:12 -0700 Subject: [PATCH 420/473] fix: update new rules from master --- packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts | 1 - .../eslint-plugin/src/rules/padding-line-between-statements.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts b/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts index 3640cb34630b..ca802e8b5c24 100644 --- a/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts +++ b/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts @@ -23,7 +23,6 @@ export default util.createRule< docs: { description: 'Disallow the `void` operator except when used to discard a value', - category: 'Best Practices', recommended: false, suggestion: true, requiresTypeChecking: true, diff --git a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts index e99b0e493460..e9876c7ed363 100644 --- a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts +++ b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts @@ -561,7 +561,6 @@ export default util.createRule({ type: 'layout', docs: { description: 'require or disallow padding lines between statements', - category: 'Stylistic Issues', recommended: false, extendsBaseRule: true, }, From d88a6b44eedcf9dd59569160570aa118851aa86b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sun, 5 Sep 2021 04:06:57 +0200 Subject: [PATCH 421/473] fix(eslint-plugin): update new rules from master (#3840) --- .../src/rules/no-meaningless-void-operator.ts | 1 + .../rules/padding-line-between-statements.ts | 33 ++++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts b/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts index ca802e8b5c24..28cc7b6b051d 100644 --- a/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts +++ b/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts @@ -28,6 +28,7 @@ export default util.createRule< requiresTypeChecking: true, }, fixable: 'code', + hasSuggestions: true, messages: { meaninglessVoidOperator: "void operator shouldn't be used on {{type}}; it should convey that a return value is being ignored", diff --git a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts index e9876c7ed363..334b6928c630 100644 --- a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts +++ b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts @@ -107,7 +107,7 @@ function newNodeTypeTester(type: AST_NODE_TYPES): NodeTestObject { /** * Skips a chain expression node - * @paramnode The node to test + * @param node The node to test * @returnsA non-chain expression * @private */ @@ -119,7 +119,7 @@ function skipChainExpression(node: TSESTree.Node): TSESTree.Node { /** * Checks the given node is an expression statement of IIFE. - * @paramnode The node to check. + * @param node The node to check. * @returns `true` if the node is an expression statement of IIFE. * @private */ @@ -142,7 +142,7 @@ function isIIFEStatement(node: TSESTree.Node): boolean { /** * Checks the given node is a CommonJS require statement - * @paramnode The node to check. + * @param node The node to check. * @returns `true` if the node is a CommonJS require statement. * @private */ @@ -169,7 +169,7 @@ function isCJSRequire(node: TSESTree.Node): boolean { * Checks whether the given node is a block-like statement. * This checks the last token of the node is the closing brace of a block. * @param sourceCode The source code to get tokens. - * @paramnode The node to check. + * @param node The node to check. * @returns `true` if the node is a block-like statement. * @private */ @@ -209,7 +209,7 @@ function isBlockLikeStatement( /** * Check whether the given node is a directive or not. - * @paramnode The node to check. + * @param node The node to check. * @param sourceCode The source code object to get tokens. * @returns `true` if the node is a directive. */ @@ -230,7 +230,7 @@ function isDirective( /** * Check whether the given node is a part of directive prologue or not. - * @paramnode The node to check. + * @param node The node to check. * @param sourceCode The source code object to get tokens. * @returns `true` if the node is a part of directive prologue. */ @@ -259,7 +259,7 @@ function isDirectivePrologue( /** * Checks the given node is a CommonJS export statement - * @paramnode The node to check. + * @param node The node to check. * @returns `true` if the node is a CommonJS export statement. * @private */ @@ -287,7 +287,7 @@ function isCJSExport(node: TSESTree.Node): boolean { /** * Check whether the given node is an expression - * @paramnode The node to check. + * @param node The node to check. * @param sourceCode The source code object to get tokens. * @returns `true` if the node is an expression */ @@ -310,7 +310,7 @@ function isExpression( * foo() * ;[1, 2, 3].forEach(bar) * @param sourceCode The source code to get tokens. - * @paramnode The node to get. + * @param node The node to get. * @returns The actual last token. * @private */ @@ -364,8 +364,8 @@ function verifyForAny(): void { * However, if comments exist between 2 blank lines, it does not remove those * blank lines automatically. * @param context The rule context to report. - * @param_ Unused. The previous node to check. - * @paramnextNode The next node to check. + * @param _ Unused. The previous node to check. + * @param nextNode The next node to check. * @param paddingLines The array of token pairs that blank * lines exist between the pair. * @@ -409,8 +409,8 @@ function verifyForNever( * If the `prevNode` has trailing comments, it inserts a blank line after the * trailing comments. * @param context The rule context to report. - * @paramprevNode The previous node to check. - * @paramnextNode The next node to check. + * @param prevNode The previous node to check. + * @param nextNode The next node to check. * @param paddingLines The array of token pairs that blank * lines exist between the pair. * @@ -565,6 +565,7 @@ export default util.createRule({ extendsBaseRule: true, }, fixable: 'whitespace', + hasSuggestions: true, schema: { definitions: { paddingType: { @@ -639,7 +640,7 @@ export default util.createRule({ /** * Checks whether the given node matches the given type. - * @paramnode The statement node to check. + * @param node The statement node to check. * @param type The statement type to check. * @returns `true` if the statement node matched the type. * @private @@ -714,7 +715,7 @@ export default util.createRule({ /** * Verify padding lines between the given node and the previous node. - * @paramnode The node to verify. + * @param node The node to verify. * * @private */ @@ -749,7 +750,7 @@ export default util.createRule({ /** * Verify padding lines between the given node and the previous node. * Then process to enter to new scope. - * @paramnode The node to verify. + * @param node The node to verify. * * @private */ From 8fc573653228458f36b40eb299c63a00b5fc6e7a Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 20 Sep 2021 23:21:40 +0200 Subject: [PATCH 422/473] chore: bump eslint-plugin-jest for eslint v8 support (#3895) --- patches/eslint-plugin-jest+24.4.0.patch | 48 ------------------------- 1 file changed, 48 deletions(-) delete mode 100644 patches/eslint-plugin-jest+24.4.0.patch diff --git a/patches/eslint-plugin-jest+24.4.0.patch b/patches/eslint-plugin-jest+24.4.0.patch deleted file mode 100644 index da14716ee8ab..000000000000 --- a/patches/eslint-plugin-jest+24.4.0.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/node_modules/eslint-plugin-jest/lib/rules/no-done-callback.js b/node_modules/eslint-plugin-jest/lib/rules/no-done-callback.js -index 8a09e7b..4f7dffa 100644 ---- a/node_modules/eslint-plugin-jest/lib/rules/no-done-callback.js -+++ b/node_modules/eslint-plugin-jest/lib/rules/no-done-callback.js -@@ -34,6 +34,7 @@ var _default = (0, _utils.createRule)({ - recommended: 'error', - suggestion: true - }, -+ hasSuggestions: true, - messages: { - noDoneCallback: 'Return a Promise instead of relying on callback parameter', - suggestWrappingInPromise: 'Wrap in `new Promise({{ callback }} => ...`', -diff --git a/node_modules/eslint-plugin-jest/lib/rules/no-focused-tests.js b/node_modules/eslint-plugin-jest/lib/rules/no-focused-tests.js -index 159e1fb..b167a83 100644 ---- a/node_modules/eslint-plugin-jest/lib/rules/no-focused-tests.js -+++ b/node_modules/eslint-plugin-jest/lib/rules/no-focused-tests.js -@@ -36,6 +36,7 @@ var _default = (0, _utils.createRule)({ - recommended: 'error', - suggestion: true - }, -+ hasSuggestions: true, - messages: { - focusedTest: 'Unexpected focused test.', - suggestRemoveFocus: 'Remove focus from test.' -diff --git a/node_modules/eslint-plugin-jest/lib/rules/prefer-expect-assertions.js b/node_modules/eslint-plugin-jest/lib/rules/prefer-expect-assertions.js -index cf064ac..c47dc4a 100644 ---- a/node_modules/eslint-plugin-jest/lib/rules/prefer-expect-assertions.js -+++ b/node_modules/eslint-plugin-jest/lib/rules/prefer-expect-assertions.js -@@ -29,6 +29,7 @@ var _default = (0, _utils.createRule)({ - recommended: false, - suggestion: true - }, -+ hasSuggestions: true, - messages: { - hasAssertionsTakesNoArguments: '`expect.hasAssertions` expects no arguments', - assertionsRequiresOneArgument: '`expect.assertions` excepts a single argument of type number', -diff --git a/node_modules/eslint-plugin-jest/lib/rules/prefer-strict-equal.js b/node_modules/eslint-plugin-jest/lib/rules/prefer-strict-equal.js -index 95136e6..c1179c6 100644 ---- a/node_modules/eslint-plugin-jest/lib/rules/prefer-strict-equal.js -+++ b/node_modules/eslint-plugin-jest/lib/rules/prefer-strict-equal.js -@@ -16,6 +16,7 @@ var _default = (0, _utils.createRule)({ - recommended: false, - suggestion: true - }, -+ hasSuggestions: true, - messages: { - useToStrictEqual: 'Use `toStrictEqual()` instead', - suggestReplaceWithStrictEqual: 'Replace with `toStrictEqual()`' From 82016f99b14825c9c60e1f7eb3b4efcc492bba86 Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Mon, 20 Sep 2021 21:12:12 -0300 Subject: [PATCH 423/473] fix(eslint-plugin): [explicit-member-accessibility] report `TSAbstractPropertyDefinition` and `TSAbstractMethodDefinition` properly (#3901) --- .../rules/explicit-member-accessibility.ts | 20 +++-- .../explicit-member-accessibility.test.ts | 83 ++++++++++++++++++- 2 files changed, 95 insertions(+), 8 deletions(-) diff --git a/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts b/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts index a8522f1b87c0..dc549fc1411b 100644 --- a/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts +++ b/packages/eslint-plugin/src/rules/explicit-member-accessibility.ts @@ -1,8 +1,8 @@ import { AST_NODE_TYPES, - TSESTree, AST_TOKEN_TYPES, TSESLint, + TSESTree, } from '@typescript-eslint/experimental-utils'; import * as util from '../util'; @@ -96,13 +96,13 @@ export default util.createRule({ fix: TSESLint.ReportFixFunction | null = null, ): void { context.report({ - node: node, - messageId: messageId, + node, + messageId, data: { type: nodeType, name: nodeName, }, - fix: fix, + fix, }); } @@ -170,6 +170,8 @@ export default util.createRule({ node: | TSESTree.MethodDefinition | TSESTree.PropertyDefinition + | TSESTree.TSAbstractMethodDefinition + | TSESTree.TSAbstractPropertyDefinition | TSESTree.TSParameterProperty, ): TSESLint.ReportFixFunction { return function (fixer: TSESLint.RuleFixer): TSESLint.RuleFix { @@ -208,7 +210,9 @@ export default util.createRule({ * @param propertyDefinition The node representing a PropertyDefinition. */ function checkPropertyAccessibilityModifier( - propertyDefinition: TSESTree.PropertyDefinition, + propertyDefinition: + | TSESTree.PropertyDefinition + | TSESTree.TSAbstractPropertyDefinition, ): void { const nodeType = 'class property'; @@ -285,9 +289,11 @@ export default util.createRule({ } return { + 'MethodDefinition, TSAbstractMethodDefinition': + checkMethodAccessibilityModifier, + 'PropertyDefinition, TSAbstractPropertyDefinition': + checkPropertyAccessibilityModifier, TSParameterProperty: checkParameterPropertyAccessibilityModifier, - PropertyDefinition: checkPropertyAccessibilityModifier, - MethodDefinition: checkMethodAccessibilityModifier, }; }, }); diff --git a/packages/eslint-plugin/tests/rules/explicit-member-accessibility.test.ts b/packages/eslint-plugin/tests/rules/explicit-member-accessibility.test.ts index 4e070acb325c..4f2951c6d910 100644 --- a/packages/eslint-plugin/tests/rules/explicit-member-accessibility.test.ts +++ b/packages/eslint-plugin/tests/rules/explicit-member-accessibility.test.ts @@ -1,5 +1,5 @@ import rule from '../../src/rules/explicit-member-accessibility'; -import { RuleTester, noFormat } from '../RuleTester'; +import { noFormat, RuleTester } from '../RuleTester'; const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', @@ -1138,6 +1138,87 @@ class Test { 'foo foo' = 2; 'bar'() {} 'bar bar'() {} +} + `, + }, + { + code: ` +abstract class SomeClass { + abstract method(): string; +} + `, + options: [{ accessibility: 'explicit' }], + errors: [ + { + messageId: 'missingAccessibility', + line: 3, + column: 3, + }, + ], + }, + { + code: ` +abstract class SomeClass { + public abstract method(): string; +} + `, + options: [ + { + accessibility: 'no-public', + overrides: { parameterProperties: 'no-public' }, + }, + ], + errors: [ + { + messageId: 'unwantedPublicAccessibility', + line: 3, + column: 3, + }, + ], + output: ` +abstract class SomeClass { + abstract method(): string; +} + `, + }, + { + // https://github.com/typescript-eslint/typescript-eslint/issues/3835 + code: ` +abstract class SomeClass { + abstract x: string; +} + `, + options: [{ accessibility: 'explicit' }], + errors: [ + { + messageId: 'missingAccessibility', + line: 3, + column: 3, + }, + ], + }, + { + code: ` +abstract class SomeClass { + public abstract x: string; +} + `, + options: [ + { + accessibility: 'no-public', + overrides: { parameterProperties: 'no-public' }, + }, + ], + errors: [ + { + messageId: 'unwantedPublicAccessibility', + line: 3, + column: 3, + }, + ], + output: ` +abstract class SomeClass { + abstract x: string; } `, }, From 09c47b00987bbae5ee7f1609444c4f0c74a81951 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Mon, 20 Sep 2021 17:56:34 -0700 Subject: [PATCH 424/473] chore: cleanup after rebase --- .../declaration/ExportAllDeclaration/spec.ts | 4 ++-- .../ExportNamedDeclaration/spec.ts | 4 ++-- .../src/declaration/ImportDeclaration/spec.ts | 4 ++-- .../src/rules/consistent-type-imports.ts | 2 +- ...no-non-null-asserted-nullish-coalescing.ts | 3 +-- .../src/rules/no-restricted-imports.ts | 23 ++++++++----------- .../src/util/getESLintCoreRule.ts | 1 + .../tests/rules/no-restricted-imports.test.ts | 8 ------- tests/jest-resolver.js | 10 +++++--- 9 files changed, 26 insertions(+), 33 deletions(-) diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts index e6700070b59b..3b50c001f850 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts @@ -1,12 +1,12 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; import type { Identifier } from '../../expression/Identifier/spec'; -import type { Expression } from '../../unions/Expression'; +import type { StringLiteral } from '../../expression/literal/StringLiteral/spec'; import type { ExportKind } from '../ExportAndImportKind'; export interface ExportAllDeclaration extends BaseNode { type: AST_NODE_TYPES.ExportAllDeclaration; - source: Expression | null; + source: StringLiteral | null; exportKind: ExportKind; exported: Identifier | null; } diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts index a8f476477a7b..b43471428094 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts @@ -1,14 +1,14 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; +import type { StringLiteral } from '../../expression/literal/StringLiteral/spec'; import type { ExportSpecifier } from '../../special/ExportSpecifier/spec'; import type { ExportDeclaration } from '../../unions/ExportDeclaration'; -import type { Literal } from '../../unions/Literal'; import type { ExportKind } from '../ExportAndImportKind'; export interface ExportNamedDeclaration extends BaseNode { type: AST_NODE_TYPES.ExportNamedDeclaration; declaration: ExportDeclaration | null; specifiers: ExportSpecifier[]; - source: Literal | null; + source: StringLiteral | null; exportKind: ExportKind; } diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts b/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts index 2aeaeae4539f..d9a11f6e3145 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts @@ -1,12 +1,12 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; +import type { StringLiteral } from '../../expression/literal/StringLiteral/spec'; import type { ImportClause } from '../../unions/ImportClause'; -import type { Literal } from '../../unions/Literal'; import type { ImportKind } from '../ExportAndImportKind'; export interface ImportDeclaration extends BaseNode { type: AST_NODE_TYPES.ImportDeclaration; - source: Literal; + source: StringLiteral; specifiers: ImportClause[]; importKind: ImportKind; } diff --git a/packages/eslint-plugin/src/rules/consistent-type-imports.ts b/packages/eslint-plugin/src/rules/consistent-type-imports.ts index 1bfb695f27be..abefc9a4a8a7 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-imports.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-imports.ts @@ -107,7 +107,7 @@ export default util.createRule({ ? { // prefer type imports ImportDeclaration(node: TSESTree.ImportDeclaration): void { - const source = node.source.value as string; + const source = node.source.value; const sourceImports = sourceImportsMap[source] ?? (sourceImportsMap[source] = { diff --git a/packages/eslint-plugin/src/rules/no-non-null-asserted-nullish-coalescing.ts b/packages/eslint-plugin/src/rules/no-non-null-asserted-nullish-coalescing.ts index b7619f1a82b5..93431950c35d 100644 --- a/packages/eslint-plugin/src/rules/no-non-null-asserted-nullish-coalescing.ts +++ b/packages/eslint-plugin/src/rules/no-non-null-asserted-nullish-coalescing.ts @@ -39,9 +39,7 @@ export default util.createRule({ docs: { description: 'Disallows using a non-null assertion in the left operand of the nullish coalescing operator', - category: 'Possible Errors', recommended: false, - suggestion: true, }, messages: { noNonNullAssertedNullishCoalescing: @@ -49,6 +47,7 @@ export default util.createRule({ suggestRemovingNonNull: 'Remove the non-null assertion.', }, schema: [], + hasSuggestions: true, }, defaultOptions: [], create(context) { diff --git a/packages/eslint-plugin/src/rules/no-restricted-imports.ts b/packages/eslint-plugin/src/rules/no-restricted-imports.ts index 994b9ddba737..7a583a01a1d7 100644 --- a/packages/eslint-plugin/src/rules/no-restricted-imports.ts +++ b/packages/eslint-plugin/src/rules/no-restricted-imports.ts @@ -1,9 +1,10 @@ -import { AST_NODE_TYPES } from '@typescript-eslint/experimental-utils'; -import baseRule, { +import { TSESTree } from '@typescript-eslint/experimental-utils'; +import { ArrayOfStringOrObject, ArrayOfStringOrObjectPatterns, } from 'eslint/lib/rules/no-restricted-imports'; import ignore, { Ignore } from 'ignore'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; import { createRule, deepMerge, @@ -11,6 +12,8 @@ import { InferOptionsTypeFromRule, } from '../util'; +const baseRule = getESLintCoreRule('no-restricted-imports'); + export type Options = InferOptionsTypeFromRule; export type MessageIds = InferMessageIdsTypeFromRule; @@ -106,7 +109,6 @@ export default createRule({ type: 'suggestion', docs: { description: 'Disallow specified modules when loaded by `import`', - category: 'Best Practices', recommended: false, extendsBaseRule: true, }, @@ -155,9 +157,6 @@ export default createRule({ return { ImportDeclaration(node): void { - if (typeof node.source.value !== 'string') { - return; - } if (node.importKind === 'type') { const importSource = node.source.value.trim(); if ( @@ -170,13 +169,11 @@ export default createRule({ return rules.ImportDeclaration(node); } }, - ExportNamedDeclaration(node): void { - if ( - node.source?.type !== AST_NODE_TYPES.Literal || - typeof node.source.value !== 'string' - ) { - return; - } + 'ExportNamedDeclaration[source]'( + node: TSESTree.ExportNamedDeclaration & { + source: NonNullable; + }, + ): void { if (node.exportKind === 'type') { const importSource = node.source.value.trim(); if ( diff --git a/packages/eslint-plugin/src/util/getESLintCoreRule.ts b/packages/eslint-plugin/src/util/getESLintCoreRule.ts index fdb2ca46df87..1701b4ef1d76 100644 --- a/packages/eslint-plugin/src/util/getESLintCoreRule.ts +++ b/packages/eslint-plugin/src/util/getESLintCoreRule.ts @@ -24,6 +24,7 @@ interface RuleMap { 'no-loop-func': typeof import('eslint/lib/rules/no-loop-func'); 'no-loss-of-precision': typeof import('eslint/lib/rules/no-loss-of-precision'); 'no-magic-numbers': typeof import('eslint/lib/rules/no-magic-numbers'); + 'no-restricted-imports': typeof import('eslint/lib/rules/no-restricted-imports'); 'no-undef': typeof import('eslint/lib/rules/no-undef'); 'no-unused-expressions': typeof import('eslint/lib/rules/no-unused-expressions'); 'no-useless-constructor': typeof import('eslint/lib/rules/no-useless-constructor'); diff --git a/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts b/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts index 8f7cb1f88bf4..143bfd95aae9 100644 --- a/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts +++ b/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts @@ -217,14 +217,6 @@ ruleTester.run('no-restricted-imports', rule, { code: "export * from 'foo';", options: ['import1'], }, - { - code: 'export { foo } from foo;', - options: ['import1', 'import2'], - }, - { - code: 'import { foo } from foo;', - options: ['import1', 'import2'], - }, ], invalid: [ { diff --git a/tests/jest-resolver.js b/tests/jest-resolver.js index a0460ee0ac43..0636e2feee7e 100644 --- a/tests/jest-resolver.js +++ b/tests/jest-resolver.js @@ -1,12 +1,16 @@ -/* eslint-disable @typescript-eslint/no-unsafe-argument */ -// https://github.com/facebook/jest/issues/9771#issuecomment-871585234 +/* @ts-check */ -// temporary workaround while we wait for https://github.com/facebook/jest/issues/9771 +// temporary workaround - https://github.com/facebook/jest/issues/9771#issuecomment-871585234 const resolver = require('enhanced-resolve').create.sync({ conditionNames: ['require', 'node', 'default'], extensions: ['.js', '.json', '.node', '.ts', '.tsx'], }); +/** + * @param request {unknown} + * @param options {{ defaultResolver(...args: unknown[]): unknown, basedir: unknown }} + * @returns {unknown} + */ module.exports = function (request, options) { // list global module that must be resolved by defaultResolver here if (['fs', 'http', 'path'].includes(request)) { From dd140643b457aa515cc21fcda2b3cd4acc2a1c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Wed, 22 Sep 2021 19:52:23 +0200 Subject: [PATCH 425/473] feat(ast-spec): bring `Node` objects in line with ESTree (#3771) --- packages/ast-spec/src/base/NodeOrTokenData.ts | 3 +++ .../ast-spec/src/base/{LineAndColumnData.ts => Position.ts} | 2 +- packages/ast-spec/src/base/SourceLocation.ts | 6 +++--- packages/ast-spec/src/index.ts | 2 +- packages/eslint-plugin/src/util/getFunctionHeadLoc.ts | 4 ++-- packages/experimental-utils/src/ts-eslint/Rule.ts | 4 ++-- packages/experimental-utils/src/ts-eslint/SourceCode.ts | 4 ++-- packages/typescript-estree/src/node-utils.ts | 2 +- packages/typescript-estree/tests/ast-alignment/parse.ts | 2 +- 9 files changed, 16 insertions(+), 13 deletions(-) rename packages/ast-spec/src/base/{LineAndColumnData.ts => Position.ts} (78%) diff --git a/packages/ast-spec/src/base/NodeOrTokenData.ts b/packages/ast-spec/src/base/NodeOrTokenData.ts index 8052278bbf02..013f96002fc4 100644 --- a/packages/ast-spec/src/base/NodeOrTokenData.ts +++ b/packages/ast-spec/src/base/NodeOrTokenData.ts @@ -4,6 +4,9 @@ import type { SourceLocation } from './SourceLocation'; export interface NodeOrTokenData { /** * The source location information of the node. + * + * The loc property is defined as nullable by ESTree, but ESLint requires this property. + * * @see {SourceLocation} */ loc: SourceLocation; diff --git a/packages/ast-spec/src/base/LineAndColumnData.ts b/packages/ast-spec/src/base/Position.ts similarity index 78% rename from packages/ast-spec/src/base/LineAndColumnData.ts rename to packages/ast-spec/src/base/Position.ts index 740ebe6fa467..672fe5d5d4d0 100644 --- a/packages/ast-spec/src/base/LineAndColumnData.ts +++ b/packages/ast-spec/src/base/Position.ts @@ -1,4 +1,4 @@ -export interface LineAndColumnData { +export interface Position { /** * Line number (1-indexed) */ diff --git a/packages/ast-spec/src/base/SourceLocation.ts b/packages/ast-spec/src/base/SourceLocation.ts index e1a8e272a6fc..67b5246fed5d 100644 --- a/packages/ast-spec/src/base/SourceLocation.ts +++ b/packages/ast-spec/src/base/SourceLocation.ts @@ -1,12 +1,12 @@ -import type { LineAndColumnData } from './LineAndColumnData'; +import type { Position } from './Position'; export interface SourceLocation { /** * The position of the first character of the parsed source region */ - start: LineAndColumnData; + start: Position; /** * The position of the first character after the parsed source region */ - end: LineAndColumnData; + end: Position; } diff --git a/packages/ast-spec/src/index.ts b/packages/ast-spec/src/index.ts index c0dc09b70b0e..ba9ee6800007 100644 --- a/packages/ast-spec/src/index.ts +++ b/packages/ast-spec/src/index.ts @@ -1,7 +1,7 @@ export * from './base/Accessibility'; export * from './base/BaseNode'; // this is exported so that the `types` package can merge the decl and add the `parent` property -export * from './base/LineAndColumnData'; export * from './base/OptionalRangeAndLoc'; +export * from './base/Position'; export * from './base/Range'; export * from './base/SourceLocation'; diff --git a/packages/eslint-plugin/src/util/getFunctionHeadLoc.ts b/packages/eslint-plugin/src/util/getFunctionHeadLoc.ts index dc18a832f948..7604a8d496fc 100644 --- a/packages/eslint-plugin/src/util/getFunctionHeadLoc.ts +++ b/packages/eslint-plugin/src/util/getFunctionHeadLoc.ts @@ -31,7 +31,7 @@ export function getFunctionHeadLoc( node: FunctionNode, sourceCode: TSESLint.SourceCode, ): TSESTree.SourceLocation { - function getLocStart(): TSESTree.LineAndColumnData { + function getLocStart(): TSESTree.Position { if (node.parent && node.parent.type === AST_NODE_TYPES.MethodDefinition) { // return the start location for class method @@ -58,7 +58,7 @@ export function getFunctionHeadLoc( return node.loc.start; } - function getLocEnd(): TSESTree.LineAndColumnData { + function getLocEnd(): TSESTree.Position { if (node.type === AST_NODE_TYPES.ArrowFunctionExpression) { // find the end location for arrow function expression return sourceCode.getTokenBefore( diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index 1759a20eff5a..7750d35dc68a 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -154,13 +154,13 @@ interface ReportDescriptorNodeOptionalLoc { */ readonly loc?: | Readonly - | Readonly; + | Readonly; } interface ReportDescriptorLocOnly { /** * An override of the location of the report */ - loc: Readonly | Readonly; + loc: Readonly | Readonly; } type ReportDescriptor = ReportDescriptorWithSuggestion & diff --git a/packages/experimental-utils/src/ts-eslint/SourceCode.ts b/packages/experimental-utils/src/ts-eslint/SourceCode.ts index 669ad7113c92..682e2e52012c 100644 --- a/packages/experimental-utils/src/ts-eslint/SourceCode.ts +++ b/packages/experimental-utils/src/ts-eslint/SourceCode.ts @@ -250,7 +250,7 @@ declare class SourceCodeBase extends TokenStore { * @param loc A line/column location * @returns The range index of the location in the file. */ - getIndexFromLoc(location: TSESTree.LineAndColumnData): number; + getIndexFromLoc(location: TSESTree.Position): number; /** * Gets the entire source text split into an array of lines. * @returns The source text as an array of lines. @@ -261,7 +261,7 @@ declare class SourceCodeBase extends TokenStore { * @param index The index of a character in a file * @returns A {line, column} location object with a 0-indexed column */ - getLocFromIndex(index: number): TSESTree.LineAndColumnData; + getLocFromIndex(index: number): TSESTree.Position; /** * Gets the deepest node containing a range index. * @param index Range index of the desired node. diff --git a/packages/typescript-estree/src/node-utils.ts b/packages/typescript-estree/src/node-utils.ts index 82f487b864cc..d8182aa5655e 100644 --- a/packages/typescript-estree/src/node-utils.ts +++ b/packages/typescript-estree/src/node-utils.ts @@ -161,7 +161,7 @@ export function getBinaryExpressionType( export function getLineAndCharacterFor( pos: number, ast: ts.SourceFile, -): TSESTree.LineAndColumnData { +): TSESTree.Position { const loc = ast.getLineAndCharacterOfPosition(pos); return { line: loc.line + 1, diff --git a/packages/typescript-estree/tests/ast-alignment/parse.ts b/packages/typescript-estree/tests/ast-alignment/parse.ts index 701cf069ff42..3429f338d77b 100644 --- a/packages/typescript-estree/tests/ast-alignment/parse.ts +++ b/packages/typescript-estree/tests/ast-alignment/parse.ts @@ -105,7 +105,7 @@ export function parse( ); } } catch (error: any) { - const loc = error.loc as TSESTree.LineAndColumnData | undefined; + const loc = error.loc as TSESTree.Position | undefined; if (loc) { error.codeFrame = codeFrameColumns( text, From c304a55afa4983a807955190202c0dbc0fb9e3aa Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sun, 10 Oct 2021 14:36:16 -0700 Subject: [PATCH 426/473] chore: bump eslint to 8.0.0 --- package.json | 2 +- packages/eslint-plugin-tslint/package.json | 2 +- packages/eslint-plugin/package.json | 4 +-- packages/parser/package.json | 2 +- yarn.lock | 37 ++++++++++++---------- 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index a6b365cfc54a..941734a0fd14 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "cz-conventional-changelog": "^3.3.0", "downlevel-dts": "^0.7.0", "enhanced-resolve": "^5.8.2", - "eslint": "^8.0.0-0", + "eslint": "^8.0.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-plugin": "^3.0.3", "eslint-plugin-import": "^2.23.4", diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 7917ab0f1709..813984697072 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -42,7 +42,7 @@ "lodash": "^4.17.21" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0-0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0", "tslint": "^5.0.0 || ^6.0.0", "typescript": "*" }, diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index b750d5e02ab8..ed1e439926d5 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -63,8 +63,8 @@ "typescript": "*" }, "peerDependencies": { - "@typescript-eslint/parser": "^4.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0-0" + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { diff --git a/packages/parser/package.json b/packages/parser/package.json index ba9f66b31764..64caa07a14e9 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -41,7 +41,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0-0" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "dependencies": { "@typescript-eslint/scope-manager": "4.33.0", diff --git a/yarn.lock b/yarn.lock index 83194d3d9c8d..293c6e122bb5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -698,14 +698,14 @@ ts-node "^9" tslib "^2" -"@eslint/eslintrc@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.0.tgz#08309b915051dbfcfea8c3cdfc832375303396c9" - integrity sha512-FPnE4y+crrKBF0c9PckDHFuPDQl+wRX6S9jeSw2WwM2YNmrdRch3gx3DOTWpqpQu0G9yoJaeSSrJLiV/29tGyQ== +"@eslint/eslintrc@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.2.tgz#6044884f7f93c4ecc2d1694c7486cce91ef8f746" + integrity sha512-x1ZXdEFsvTcnbTZgqcWUL9w2ybgZCw/qbKTPQnab+XnYA2bMQpJCh+/bBzCRfDJaJdlrrQlOk49jNtru9gL/6Q== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^8.0.0" + espree "^9.0.0" globals "^13.9.0" ignore "^4.0.6" import-fresh "^3.2.1" @@ -2453,6 +2453,11 @@ acorn@^8.2.4, acorn@^8.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA== +acorn@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2" + integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q== + agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" @@ -4372,12 +4377,12 @@ eslint-visitor-keys@^3.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz#e32e99c6cdc2eb063f204eda5db67bfe58bb4186" integrity sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q== -eslint@^8.0.0-0: - version "8.0.0-beta.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.0.0-beta.1.tgz#5cd74684dbcfd8abee08cc10de578294124539b5" - integrity sha512-+3EHhCIJHUXuksq6dUSe1Nv9+sdFaLfct6ZiWdFYrHU8u9tX6QQWGdKJQuQXUlUdhMMh6cchRFIQ7OqSAcyq7A== +eslint@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.0.0.tgz#2c2d0ac6353755667ac90c9ff4a9c1315e43fcff" + integrity sha512-03spzPzMAO4pElm44m60Nj08nYonPGQXmw6Ceai/S4QK82IgwWO1EXx1s9namKzVlbVu3Jf81hb+N+8+v21/HQ== dependencies: - "@eslint/eslintrc" "^1.0.0" + "@eslint/eslintrc" "^1.0.2" "@humanwhocodes/config-array" "^0.6.0" ajv "^6.10.0" chalk "^4.0.0" @@ -4389,7 +4394,7 @@ eslint@^8.0.0-0: eslint-scope "^6.0.0" eslint-utils "^3.0.0" eslint-visitor-keys "^3.0.0" - espree "^8.0.0" + espree "^9.0.0" esquery "^1.4.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" @@ -4416,12 +4421,12 @@ eslint@^8.0.0-0: text-table "^0.2.0" v8-compile-cache "^2.0.3" -espree@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-8.0.0.tgz#08c92c31814c96c96c54d3a35cc80f1cdb420275" - integrity sha512-y/+i23dwTjIDJrYCcjcAMr3c3UGbPIjC6THMQKjWmhP97fW0FPiI89kmpKfmgV/5jrkIi6toQP+CMm3qBE1Hig== +espree@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.0.0.tgz#e90a2965698228502e771c7a58489b1a9d107090" + integrity sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ== dependencies: - acorn "^8.4.1" + acorn "^8.5.0" acorn-jsx "^5.3.1" eslint-visitor-keys "^3.0.0" From 101abc72f0baced5cdf609d99418ad9f10830c73 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 11 Oct 2021 18:09:52 +0000 Subject: [PATCH 427/473] chore: publish v5.0.0 --- CHANGELOG.md | 40 ++++++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 20 ++++++++++ packages/ast-spec/package.json | 2 +- packages/eslint-plugin-internal/CHANGELOG.md | 12 ++++++ packages/eslint-plugin-internal/package.json | 6 +-- packages/eslint-plugin-tslint/CHANGELOG.md | 12 ++++++ packages/eslint-plugin-tslint/package.json | 6 +-- packages/eslint-plugin/CHANGELOG.md | 35 +++++++++++++++++ packages/eslint-plugin/package.json | 6 +-- packages/experimental-utils/CHANGELOG.md | 22 +++++++++++ packages/experimental-utils/package.json | 8 ++-- packages/parser/CHANGELOG.md | 11 ++++++ packages/parser/package.json | 10 ++--- packages/scope-manager/CHANGELOG.md | 13 +++++++ packages/scope-manager/package.json | 8 ++-- packages/shared-fixtures/CHANGELOG.md | 17 +++++++++ packages/shared-fixtures/package.json | 2 +- packages/types/CHANGELOG.md | 11 ++++++ packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 22 +++++++++++ packages/typescript-estree/package.json | 8 ++-- packages/visitor-keys/CHANGELOG.md | 14 +++++++ packages/visitor-keys/package.json | 4 +- 24 files changed, 261 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 362f124346f5..3bb0ead323c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) + + +### Bug Fixes + +* **eslint-plugin:** [explicit-member-accessibility] report `TSAbstractPropertyDefinition` and `TSAbstractMethodDefinition` properly ([#3901](https://github.com/typescript-eslint/typescript-eslint/issues/3901)) ([82016f9](https://github.com/typescript-eslint/typescript-eslint/commit/82016f99b14825c9c60e1f7eb3b4efcc492bba86)) +* **eslint-plugin:** update new rules from master ([#3840](https://github.com/typescript-eslint/typescript-eslint/issues/3840)) ([d88a6b4](https://github.com/typescript-eslint/typescript-eslint/commit/d88a6b44eedcf9dd59569160570aa118851aa86b)) +* update new rules from master ([b34fb7e](https://github.com/typescript-eslint/typescript-eslint/commit/b34fb7eb3102ea603bb4aef0dbbf9885b3d47557)) +* **eslint-plugin:** crash in no-dupe-class-members (v5) ([#3813](https://github.com/typescript-eslint/typescript-eslint/issues/3813)) ([4b09644](https://github.com/typescript-eslint/typescript-eslint/commit/4b096442f731c0a60926ac0391a4f2c4208aa8d4)) +* **experimental-utils:** fix `isSetter`'s return type ([#3975](https://github.com/typescript-eslint/typescript-eslint/issues/3975)) ([d256856](https://github.com/typescript-eslint/typescript-eslint/commit/d2568561d0417fdfbdfd964ad942f9d00434af73)) +* **typescript-estree:** change `source` of ExportNamedDeclaration to Literal from Expression ([#3763](https://github.com/typescript-eslint/typescript-eslint/issues/3763)) ([dc5a0f5](https://github.com/typescript-eslint/typescript-eslint/commit/dc5a0f5104b400f4422b8d67ecfc6cc7a32613a2)) + + +### Features + +* **ast-spec:** bring `Node` objects in line with ESTree ([#3771](https://github.com/typescript-eslint/typescript-eslint/issues/3771)) ([dd14064](https://github.com/typescript-eslint/typescript-eslint/commit/dd140643b457aa515cc21fcda2b3cd4acc2a1c5c)) +* **eslint-plugin:** remove `object` from `ban-types`' default types ([#3818](https://github.com/typescript-eslint/typescript-eslint/issues/3818)) ([ae3fa90](https://github.com/typescript-eslint/typescript-eslint/commit/ae3fa900d5b4e1f557a52ca58d35a7d098d9efaf)) +* **eslint-plugin:** removed value from abstract property nodes ([#3765](https://github.com/typescript-eslint/typescript-eslint/issues/3765)) ([5823524](https://github.com/typescript-eslint/typescript-eslint/commit/58235241714596b641a1e8b39c569e561e0039b4)), closes [#3748](https://github.com/typescript-eslint/typescript-eslint/issues/3748) +* **eslint-plugin:** update recommended configs ([#3809](https://github.com/typescript-eslint/typescript-eslint/issues/3809)) ([deeb7bb](https://github.com/typescript-eslint/typescript-eslint/commit/deeb7bb9334d301c6af56aefd37d318231af11ef)) +* align class property representation with ESTree ([#3806](https://github.com/typescript-eslint/typescript-eslint/issues/3806)) ([22fa5c0](https://github.com/typescript-eslint/typescript-eslint/commit/22fa5c0c4705ed2898f00b7cacc5dd642d859275)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#3077](https://github.com/typescript-eslint/typescript-eslint/issues/3077) +* remove `meta.docs.category` from rules ([#3800](https://github.com/typescript-eslint/typescript-eslint/issues/3800)) ([71c9370](https://github.com/typescript-eslint/typescript-eslint/commit/71c93706e55f5f92a1285102b93c6ab1950c6df4)) +* remove `TSParenthesizedType` ([#3340](https://github.com/typescript-eslint/typescript-eslint/issues/3340)) ([c8ee432](https://github.com/typescript-eslint/typescript-eslint/commit/c8ee43269faea4c04ec02eaa2b81a0aa6eec5d3e)), closes [#3136](https://github.com/typescript-eslint/typescript-eslint/issues/3136) +* support `PrivateIdentifier` ([#3808](https://github.com/typescript-eslint/typescript-eslint/issues/3808)) ([0eefe5e](https://github.com/typescript-eslint/typescript-eslint/commit/0eefe5e49d21af3f1e3e2d9a90c2e49929863ac2)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#2933](https://github.com/typescript-eslint/typescript-eslint/issues/2933) +* **eslint-plugin:** [comma-dangle] align schema with ESLint v8 ([#3768](https://github.com/typescript-eslint/typescript-eslint/issues/3768)) ([0acfafc](https://github.com/typescript-eslint/typescript-eslint/commit/0acfafcc655e28dcfc05a5caa567c0d0217ee7ad)) +* **eslint-plugin:** [member-ordering] add support for getters and setters ([#3611](https://github.com/typescript-eslint/typescript-eslint/issues/3611)) ([e264124](https://github.com/typescript-eslint/typescript-eslint/commit/e2641246571b69df36cde5cb7bce7c4fffc43f98)) +* **eslint-plugin:** remove `no-unused-vars-experimental` ([79ae03b](https://github.com/typescript-eslint/typescript-eslint/commit/79ae03b8adbae2b0a86276711a9c834af01bbb61)) +* **experimental-utils:** extract `isNodeOfTypes` out of `ast-utils`' `predicates` ([#3836](https://github.com/typescript-eslint/typescript-eslint/issues/3836)) ([0cc509b](https://github.com/typescript-eslint/typescript-eslint/commit/0cc509b61df248cfb4b42fe64ec800f3cac69c69)) +* **typescript-estree:** remove legacy `useJSXTextNode` option ([#3109](https://github.com/typescript-eslint/typescript-eslint/issues/3109)) ([5b84b98](https://github.com/typescript-eslint/typescript-eslint/commit/5b84b98fb3cf68d944b7d4e970f39f4e88f0b2d5)) +* support ESLint v8 ([#3737](https://github.com/typescript-eslint/typescript-eslint/issues/3737)) ([4ca62ae](https://github.com/typescript-eslint/typescript-eslint/commit/4ca62aee6681d706e762a8db727541ca204364f2)) +* **experimental-utils:** remove `getComments` from `ESLint` `SourceCode` types ([#3766](https://github.com/typescript-eslint/typescript-eslint/issues/3766)) ([165a507](https://github.com/typescript-eslint/typescript-eslint/commit/165a507970d8e4a0ed12abdd5f0d892f7de83ffe)) + + +### BREAKING CHANGES + +* **eslint-plugin:** `ban-types` no longer reports `object` by default + + + + + # [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) diff --git a/lerna.json b/lerna.json index 2eb92dc282ad..a266c1ab0e92 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.33.0", + "version": "5.0.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index d26fe52ec222..9700836b888b 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -3,6 +3,26 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) + + +### Bug Fixes + +* **typescript-estree:** change `source` of ExportNamedDeclaration to Literal from Expression ([#3763](https://github.com/typescript-eslint/typescript-eslint/issues/3763)) ([dc5a0f5](https://github.com/typescript-eslint/typescript-eslint/commit/dc5a0f5104b400f4422b8d67ecfc6cc7a32613a2)) + + +### Features + +* **ast-spec:** bring `Node` objects in line with ESTree ([#3771](https://github.com/typescript-eslint/typescript-eslint/issues/3771)) ([dd14064](https://github.com/typescript-eslint/typescript-eslint/commit/dd140643b457aa515cc21fcda2b3cd4acc2a1c5c)) +* align class property representation with ESTree ([#3806](https://github.com/typescript-eslint/typescript-eslint/issues/3806)) ([22fa5c0](https://github.com/typescript-eslint/typescript-eslint/commit/22fa5c0c4705ed2898f00b7cacc5dd642d859275)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#3077](https://github.com/typescript-eslint/typescript-eslint/issues/3077) +* remove `TSParenthesizedType` ([#3340](https://github.com/typescript-eslint/typescript-eslint/issues/3340)) ([c8ee432](https://github.com/typescript-eslint/typescript-eslint/commit/c8ee43269faea4c04ec02eaa2b81a0aa6eec5d3e)), closes [#3136](https://github.com/typescript-eslint/typescript-eslint/issues/3136) +* support `PrivateIdentifier` ([#3808](https://github.com/typescript-eslint/typescript-eslint/issues/3808)) ([0eefe5e](https://github.com/typescript-eslint/typescript-eslint/commit/0eefe5e49d21af3f1e3e2d9a90c2e49929863ac2)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#2933](https://github.com/typescript-eslint/typescript-eslint/issues/2933) +* **eslint-plugin:** removed value from abstract property nodes ([#3765](https://github.com/typescript-eslint/typescript-eslint/issues/3765)) ([5823524](https://github.com/typescript-eslint/typescript-eslint/commit/58235241714596b641a1e8b39c569e561e0039b4)), closes [#3748](https://github.com/typescript-eslint/typescript-eslint/issues/3748) + + + + + # [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index ccc66b7116f3..2d8aa0269d79 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.33.0", + "version": "5.0.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index d93af7147d11..fe63a7a67a5c 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) + + +### Features + +* remove `meta.docs.category` from rules ([#3800](https://github.com/typescript-eslint/typescript-eslint/issues/3800)) ([71c9370](https://github.com/typescript-eslint/typescript-eslint/commit/71c93706e55f5f92a1285102b93c6ab1950c6df4)) +* support ESLint v8 ([#3737](https://github.com/typescript-eslint/typescript-eslint/issues/3737)) ([4ca62ae](https://github.com/typescript-eslint/typescript-eslint/commit/4ca62aee6681d706e762a8db727541ca204364f2)) + + + + + # [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) **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 f5d325e44d05..4ca7567c8b87 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.33.0", + "version": "5.0.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,8 +14,8 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.33.0", - "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/experimental-utils": "5.0.0", + "@typescript-eslint/scope-manager": "5.0.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index c63718c8350f..689580cb9419 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) + + +### Features + +* remove `meta.docs.category` from rules ([#3800](https://github.com/typescript-eslint/typescript-eslint/issues/3800)) ([71c9370](https://github.com/typescript-eslint/typescript-eslint/commit/71c93706e55f5f92a1285102b93c6ab1950c6df4)) +* support ESLint v8 ([#3737](https://github.com/typescript-eslint/typescript-eslint/issues/3737)) ([4ca62ae](https://github.com/typescript-eslint/typescript-eslint/commit/4ca62aee6681d706e762a8db727541ca204364f2)) + + + + + # [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) **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 813984697072..33378ffd2bf3 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.33.0", + "version": "5.0.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.33.0", + "@typescript-eslint/experimental-utils": "5.0.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.33.0" + "@typescript-eslint/parser": "5.0.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index fb68903babc0..24164b8b9adb 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,41 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) + + +### Bug Fixes + +* **eslint-plugin:** [explicit-member-accessibility] report `TSAbstractPropertyDefinition` and `TSAbstractMethodDefinition` properly ([#3901](https://github.com/typescript-eslint/typescript-eslint/issues/3901)) ([82016f9](https://github.com/typescript-eslint/typescript-eslint/commit/82016f99b14825c9c60e1f7eb3b4efcc492bba86)) +* **eslint-plugin:** update new rules from master ([#3840](https://github.com/typescript-eslint/typescript-eslint/issues/3840)) ([d88a6b4](https://github.com/typescript-eslint/typescript-eslint/commit/d88a6b44eedcf9dd59569160570aa118851aa86b)) +* update new rules from master ([b34fb7e](https://github.com/typescript-eslint/typescript-eslint/commit/b34fb7eb3102ea603bb4aef0dbbf9885b3d47557)) +* **eslint-plugin:** crash in no-dupe-class-members (v5) ([#3813](https://github.com/typescript-eslint/typescript-eslint/issues/3813)) ([4b09644](https://github.com/typescript-eslint/typescript-eslint/commit/4b096442f731c0a60926ac0391a4f2c4208aa8d4)) + + +### Features + +* **ast-spec:** bring `Node` objects in line with ESTree ([#3771](https://github.com/typescript-eslint/typescript-eslint/issues/3771)) ([dd14064](https://github.com/typescript-eslint/typescript-eslint/commit/dd140643b457aa515cc21fcda2b3cd4acc2a1c5c)) +* **eslint-plugin:** remove `object` from `ban-types`' default types ([#3818](https://github.com/typescript-eslint/typescript-eslint/issues/3818)) ([ae3fa90](https://github.com/typescript-eslint/typescript-eslint/commit/ae3fa900d5b4e1f557a52ca58d35a7d098d9efaf)) +* **eslint-plugin:** removed value from abstract property nodes ([#3765](https://github.com/typescript-eslint/typescript-eslint/issues/3765)) ([5823524](https://github.com/typescript-eslint/typescript-eslint/commit/58235241714596b641a1e8b39c569e561e0039b4)), closes [#3748](https://github.com/typescript-eslint/typescript-eslint/issues/3748) +* **eslint-plugin:** update recommended configs ([#3809](https://github.com/typescript-eslint/typescript-eslint/issues/3809)) ([deeb7bb](https://github.com/typescript-eslint/typescript-eslint/commit/deeb7bb9334d301c6af56aefd37d318231af11ef)) +* align class property representation with ESTree ([#3806](https://github.com/typescript-eslint/typescript-eslint/issues/3806)) ([22fa5c0](https://github.com/typescript-eslint/typescript-eslint/commit/22fa5c0c4705ed2898f00b7cacc5dd642d859275)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#3077](https://github.com/typescript-eslint/typescript-eslint/issues/3077) +* remove `meta.docs.category` from rules ([#3800](https://github.com/typescript-eslint/typescript-eslint/issues/3800)) ([71c9370](https://github.com/typescript-eslint/typescript-eslint/commit/71c93706e55f5f92a1285102b93c6ab1950c6df4)) +* remove `TSParenthesizedType` ([#3340](https://github.com/typescript-eslint/typescript-eslint/issues/3340)) ([c8ee432](https://github.com/typescript-eslint/typescript-eslint/commit/c8ee43269faea4c04ec02eaa2b81a0aa6eec5d3e)), closes [#3136](https://github.com/typescript-eslint/typescript-eslint/issues/3136) +* support `PrivateIdentifier` ([#3808](https://github.com/typescript-eslint/typescript-eslint/issues/3808)) ([0eefe5e](https://github.com/typescript-eslint/typescript-eslint/commit/0eefe5e49d21af3f1e3e2d9a90c2e49929863ac2)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#2933](https://github.com/typescript-eslint/typescript-eslint/issues/2933) +* **eslint-plugin:** [comma-dangle] align schema with ESLint v8 ([#3768](https://github.com/typescript-eslint/typescript-eslint/issues/3768)) ([0acfafc](https://github.com/typescript-eslint/typescript-eslint/commit/0acfafcc655e28dcfc05a5caa567c0d0217ee7ad)) +* **eslint-plugin:** [member-ordering] add support for getters and setters ([#3611](https://github.com/typescript-eslint/typescript-eslint/issues/3611)) ([e264124](https://github.com/typescript-eslint/typescript-eslint/commit/e2641246571b69df36cde5cb7bce7c4fffc43f98)) +* **eslint-plugin:** remove `no-unused-vars-experimental` ([79ae03b](https://github.com/typescript-eslint/typescript-eslint/commit/79ae03b8adbae2b0a86276711a9c834af01bbb61)) +* support ESLint v8 ([#3737](https://github.com/typescript-eslint/typescript-eslint/issues/3737)) ([4ca62ae](https://github.com/typescript-eslint/typescript-eslint/commit/4ca62aee6681d706e762a8db727541ca204364f2)) + + +### BREAKING CHANGES + +* **eslint-plugin:** `ban-types` no longer reports `object` by default + + + + + # [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index ed1e439926d5..f49ea2c65daf 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.33.0", + "version": "5.0.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.33.0", - "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/experimental-utils": "5.0.0", + "@typescript-eslint/scope-manager": "5.0.0", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 4fc1e388ede2..d6c5611fcacb 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) + + +### Bug Fixes + +* **experimental-utils:** fix `isSetter`'s return type ([#3975](https://github.com/typescript-eslint/typescript-eslint/issues/3975)) ([d256856](https://github.com/typescript-eslint/typescript-eslint/commit/d2568561d0417fdfbdfd964ad942f9d00434af73)) + + +### Features + +* **ast-spec:** bring `Node` objects in line with ESTree ([#3771](https://github.com/typescript-eslint/typescript-eslint/issues/3771)) ([dd14064](https://github.com/typescript-eslint/typescript-eslint/commit/dd140643b457aa515cc21fcda2b3cd4acc2a1c5c)) +* align class property representation with ESTree ([#3806](https://github.com/typescript-eslint/typescript-eslint/issues/3806)) ([22fa5c0](https://github.com/typescript-eslint/typescript-eslint/commit/22fa5c0c4705ed2898f00b7cacc5dd642d859275)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#3077](https://github.com/typescript-eslint/typescript-eslint/issues/3077) +* remove `meta.docs.category` from rules ([#3800](https://github.com/typescript-eslint/typescript-eslint/issues/3800)) ([71c9370](https://github.com/typescript-eslint/typescript-eslint/commit/71c93706e55f5f92a1285102b93c6ab1950c6df4)) +* remove `TSParenthesizedType` ([#3340](https://github.com/typescript-eslint/typescript-eslint/issues/3340)) ([c8ee432](https://github.com/typescript-eslint/typescript-eslint/commit/c8ee43269faea4c04ec02eaa2b81a0aa6eec5d3e)), closes [#3136](https://github.com/typescript-eslint/typescript-eslint/issues/3136) +* support ESLint v8 ([#3737](https://github.com/typescript-eslint/typescript-eslint/issues/3737)) ([4ca62ae](https://github.com/typescript-eslint/typescript-eslint/commit/4ca62aee6681d706e762a8db727541ca204364f2)) +* **experimental-utils:** extract `isNodeOfTypes` out of `ast-utils`' `predicates` ([#3836](https://github.com/typescript-eslint/typescript-eslint/issues/3836)) ([0cc509b](https://github.com/typescript-eslint/typescript-eslint/commit/0cc509b61df248cfb4b42fe64ec800f3cac69c69)) +* **experimental-utils:** remove `getComments` from `ESLint` `SourceCode` types ([#3766](https://github.com/typescript-eslint/typescript-eslint/issues/3766)) ([165a507](https://github.com/typescript-eslint/typescript-eslint/commit/165a507970d8e4a0ed12abdd5f0d892f7de83ffe)) + + + + + # [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index ed9b0d3dc914..820da1ffc8db 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.33.0", + "version": "5.0.0", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", + "@typescript-eslint/scope-manager": "5.0.0", + "@typescript-eslint/types": "5.0.0", + "@typescript-eslint/typescript-estree": "5.0.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 892b55f89f56..4328fce0b216 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) + + +### Features + +* support ESLint v8 ([#3737](https://github.com/typescript-eslint/typescript-eslint/issues/3737)) ([4ca62ae](https://github.com/typescript-eslint/typescript-eslint/commit/4ca62aee6681d706e762a8db727541ca204364f2)) + + + + + # [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 64caa07a14e9..efa2212665c1 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.33.0", + "version": "5.0.0", "description": "An ESLint custom parser which leverages TypeScript ESTree", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -44,14 +44,14 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", + "@typescript-eslint/scope-manager": "5.0.0", + "@typescript-eslint/types": "5.0.0", + "@typescript-eslint/typescript-estree": "5.0.0", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.33.0", + "@typescript-eslint/experimental-utils": "5.0.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 7d0ddf98816f..40ae08d39d9f 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) + + +### Features + +* align class property representation with ESTree ([#3806](https://github.com/typescript-eslint/typescript-eslint/issues/3806)) ([22fa5c0](https://github.com/typescript-eslint/typescript-eslint/commit/22fa5c0c4705ed2898f00b7cacc5dd642d859275)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#3077](https://github.com/typescript-eslint/typescript-eslint/issues/3077) +* support `PrivateIdentifier` ([#3808](https://github.com/typescript-eslint/typescript-eslint/issues/3808)) ([0eefe5e](https://github.com/typescript-eslint/typescript-eslint/commit/0eefe5e49d21af3f1e3e2d9a90c2e49929863ac2)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#2933](https://github.com/typescript-eslint/typescript-eslint/issues/2933) +* **eslint-plugin:** removed value from abstract property nodes ([#3765](https://github.com/typescript-eslint/typescript-eslint/issues/3765)) ([5823524](https://github.com/typescript-eslint/typescript-eslint/commit/58235241714596b641a1e8b39c569e561e0039b4)), closes [#3748](https://github.com/typescript-eslint/typescript-eslint/issues/3748) + + + + + # [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) **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 ac2c2a335f9b..e534cc63c536 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.33.0", + "version": "5.0.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0" + "@typescript-eslint/types": "5.0.0", + "@typescript-eslint/visitor-keys": "5.0.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.33.0", + "@typescript-eslint/typescript-estree": "5.0.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index b4e3999eac20..ee8c3d0abc6a 100644 --- a/packages/shared-fixtures/CHANGELOG.md +++ b/packages/shared-fixtures/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) + + +### Bug Fixes + +* **typescript-estree:** change `source` of ExportNamedDeclaration to Literal from Expression ([#3763](https://github.com/typescript-eslint/typescript-eslint/issues/3763)) ([dc5a0f5](https://github.com/typescript-eslint/typescript-eslint/commit/dc5a0f5104b400f4422b8d67ecfc6cc7a32613a2)) + + +### Features + +* support `PrivateIdentifier` ([#3808](https://github.com/typescript-eslint/typescript-eslint/issues/3808)) ([0eefe5e](https://github.com/typescript-eslint/typescript-eslint/commit/0eefe5e49d21af3f1e3e2d9a90c2e49929863ac2)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#2933](https://github.com/typescript-eslint/typescript-eslint/issues/2933) +* **eslint-plugin:** removed value from abstract property nodes ([#3765](https://github.com/typescript-eslint/typescript-eslint/issues/3765)) ([5823524](https://github.com/typescript-eslint/typescript-eslint/commit/58235241714596b641a1e8b39c569e561e0039b4)), closes [#3748](https://github.com/typescript-eslint/typescript-eslint/issues/3748) + + + + + # [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) **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 ecbb220c80f1..a93c026c4fb6 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.33.0", + "version": "5.0.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 215fa2e52936..9a266a4a5eb9 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) + + +### Features + +* support `PrivateIdentifier` ([#3808](https://github.com/typescript-eslint/typescript-eslint/issues/3808)) ([0eefe5e](https://github.com/typescript-eslint/typescript-eslint/commit/0eefe5e49d21af3f1e3e2d9a90c2e49929863ac2)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#2933](https://github.com/typescript-eslint/typescript-eslint/issues/2933) + + + + + # [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 4cb0ba110bda..0d0adb29f43c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.33.0", + "version": "5.0.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 f957fb3ba982..c5368d811729 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) + + +### Bug Fixes + +* **typescript-estree:** change `source` of ExportNamedDeclaration to Literal from Expression ([#3763](https://github.com/typescript-eslint/typescript-eslint/issues/3763)) ([dc5a0f5](https://github.com/typescript-eslint/typescript-eslint/commit/dc5a0f5104b400f4422b8d67ecfc6cc7a32613a2)) + + +### Features + +* **ast-spec:** bring `Node` objects in line with ESTree ([#3771](https://github.com/typescript-eslint/typescript-eslint/issues/3771)) ([dd14064](https://github.com/typescript-eslint/typescript-eslint/commit/dd140643b457aa515cc21fcda2b3cd4acc2a1c5c)) +* **eslint-plugin:** update recommended configs ([#3809](https://github.com/typescript-eslint/typescript-eslint/issues/3809)) ([deeb7bb](https://github.com/typescript-eslint/typescript-eslint/commit/deeb7bb9334d301c6af56aefd37d318231af11ef)) +* align class property representation with ESTree ([#3806](https://github.com/typescript-eslint/typescript-eslint/issues/3806)) ([22fa5c0](https://github.com/typescript-eslint/typescript-eslint/commit/22fa5c0c4705ed2898f00b7cacc5dd642d859275)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#3077](https://github.com/typescript-eslint/typescript-eslint/issues/3077) +* remove `TSParenthesizedType` ([#3340](https://github.com/typescript-eslint/typescript-eslint/issues/3340)) ([c8ee432](https://github.com/typescript-eslint/typescript-eslint/commit/c8ee43269faea4c04ec02eaa2b81a0aa6eec5d3e)), closes [#3136](https://github.com/typescript-eslint/typescript-eslint/issues/3136) +* support `PrivateIdentifier` ([#3808](https://github.com/typescript-eslint/typescript-eslint/issues/3808)) ([0eefe5e](https://github.com/typescript-eslint/typescript-eslint/commit/0eefe5e49d21af3f1e3e2d9a90c2e49929863ac2)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#2933](https://github.com/typescript-eslint/typescript-eslint/issues/2933) +* **eslint-plugin:** removed value from abstract property nodes ([#3765](https://github.com/typescript-eslint/typescript-eslint/issues/3765)) ([5823524](https://github.com/typescript-eslint/typescript-eslint/commit/58235241714596b641a1e8b39c569e561e0039b4)), closes [#3748](https://github.com/typescript-eslint/typescript-eslint/issues/3748) +* **typescript-estree:** remove legacy `useJSXTextNode` option ([#3109](https://github.com/typescript-eslint/typescript-eslint/issues/3109)) ([5b84b98](https://github.com/typescript-eslint/typescript-eslint/commit/5b84b98fb3cf68d944b7d4e970f39f4e88f0b2d5)) + + + + + # [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) **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 2d70c3f50cd1..ee54a5dbd14f 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.33.0", + "version": "5.0.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.33.0", - "@typescript-eslint/visitor-keys": "4.33.0", + "@typescript-eslint/types": "5.0.0", + "@typescript-eslint/visitor-keys": "5.0.0", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.33.0", + "@typescript-eslint/shared-fixtures": "5.0.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 0376970754eb..6393289b2c82 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) + + +### Features + +* align class property representation with ESTree ([#3806](https://github.com/typescript-eslint/typescript-eslint/issues/3806)) ([22fa5c0](https://github.com/typescript-eslint/typescript-eslint/commit/22fa5c0c4705ed2898f00b7cacc5dd642d859275)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#3077](https://github.com/typescript-eslint/typescript-eslint/issues/3077) +* remove `TSParenthesizedType` ([#3340](https://github.com/typescript-eslint/typescript-eslint/issues/3340)) ([c8ee432](https://github.com/typescript-eslint/typescript-eslint/commit/c8ee43269faea4c04ec02eaa2b81a0aa6eec5d3e)), closes [#3136](https://github.com/typescript-eslint/typescript-eslint/issues/3136) +* support `PrivateIdentifier` ([#3808](https://github.com/typescript-eslint/typescript-eslint/issues/3808)) ([0eefe5e](https://github.com/typescript-eslint/typescript-eslint/commit/0eefe5e49d21af3f1e3e2d9a90c2e49929863ac2)), closes [#3430](https://github.com/typescript-eslint/typescript-eslint/issues/3430) [#2933](https://github.com/typescript-eslint/typescript-eslint/issues/2933) +* **eslint-plugin:** removed value from abstract property nodes ([#3765](https://github.com/typescript-eslint/typescript-eslint/issues/3765)) ([5823524](https://github.com/typescript-eslint/typescript-eslint/commit/58235241714596b641a1e8b39c569e561e0039b4)), closes [#3748](https://github.com/typescript-eslint/typescript-eslint/issues/3748) + + + + + # [4.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.32.0...v4.33.0) (2021-10-04) **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 5ea3a984b532..4ef726e3e3d7 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.33.0", + "version": "5.0.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.33.0", + "@typescript-eslint/types": "5.0.0", "eslint-visitor-keys": "^3.0.0" }, "devDependencies": { From 0ae445a8b52ad5b2b850bf324447418e9aefdecd Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Thu, 14 Oct 2021 14:30:48 +0900 Subject: [PATCH 428/473] chore: bump eslint-plugin-jest (#3998) chore: bump eslint-plugin-jest --- .eslintrc.js | 3 +-- package.json | 2 +- packages/eslint-plugin/tests/util.test.ts | 6 ++--- .../tests/eslint-utils/RuleCreator.test.ts | 2 +- .../es6-default-parameters.test.ts | 2 +- .../tests/eslint-scope/references.test.ts | 16 ++++++------- .../tests/lib/node-utils.test.ts | 24 +++++++++---------- .../typescript-estree/tests/lib/parse.test.ts | 2 +- .../tests/lib/persistentParse.test.ts | 6 ++--- yarn.lock | 10 ++++---- 10 files changed, 36 insertions(+), 37 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 1f053bd17d76..cfd40c184f1b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -193,8 +193,7 @@ module.exports = { 'jest/no-test-prefixes': 'error', 'jest/no-done-callback': 'error', 'jest/no-test-return-statement': 'error', - 'jest/prefer-to-be-null': 'warn', - 'jest/prefer-to-be-undefined': 'warn', + 'jest/prefer-to-be': 'warn', 'jest/prefer-to-contain': 'warn', 'jest/prefer-to-have-length': 'warn', 'jest/prefer-spy-on': 'error', diff --git a/package.json b/package.json index 941734a0fd14..ce7f411e530d 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-plugin": "^3.0.3", "eslint-plugin-import": "^2.23.4", - "eslint-plugin-jest": "^24.3.6", + "eslint-plugin-jest": "^25.0.5", "eslint-plugin-simple-import-sort": "^7.0.0", "glob": "^7.1.7", "husky": "^7.0.1", diff --git a/packages/eslint-plugin/tests/util.test.ts b/packages/eslint-plugin/tests/util.test.ts index b98111d9a28a..9714ab5718c4 100644 --- a/packages/eslint-plugin/tests/util.test.ts +++ b/packages/eslint-plugin/tests/util.test.ts @@ -18,7 +18,7 @@ describe('isDefinitionFile', () => { ]; invalid.forEach(f => { - expect(util.isDefinitionFile(f)).toStrictEqual(false); + expect(util.isDefinitionFile(f)).toBe(false); }); }); @@ -26,13 +26,13 @@ describe('isDefinitionFile', () => { const valid = ['test.d.ts', 'test.d.tsx', 'test.D.TS', 'test.D.TSX']; valid.forEach(f => { - expect(util.isDefinitionFile(f)).toStrictEqual(true); + expect(util.isDefinitionFile(f)).toBe(true); }); }); }); describe('upperCaseFirst', () => { it('upper cases first', () => { - expect(util.upperCaseFirst('hello')).toStrictEqual('Hello'); + expect(util.upperCaseFirst('hello')).toBe('Hello'); }); }); diff --git a/packages/experimental-utils/tests/eslint-utils/RuleCreator.test.ts b/packages/experimental-utils/tests/eslint-utils/RuleCreator.test.ts index 34b314b8a261..5e1c14d68c48 100644 --- a/packages/experimental-utils/tests/eslint-utils/RuleCreator.test.ts +++ b/packages/experimental-utils/tests/eslint-utils/RuleCreator.test.ts @@ -4,7 +4,7 @@ describe('RuleCreator', () => { const createRule = ESLintUtils.RuleCreator(name => `test/${name}`); it('createRule should be a function', () => { - expect(typeof createRule).toEqual('function'); + expect(typeof createRule).toBe('function'); }); it('should create rule correctly', () => { diff --git a/packages/scope-manager/tests/eslint-scope/es6-default-parameters.test.ts b/packages/scope-manager/tests/eslint-scope/es6-default-parameters.test.ts index 3134930f5d19..9fa61d522324 100644 --- a/packages/scope-manager/tests/eslint-scope/es6-default-parameters.test.ts +++ b/packages/scope-manager/tests/eslint-scope/es6-default-parameters.test.ts @@ -37,7 +37,7 @@ describe('ES6 default parameters:', () => { expect(reference.from).toBe(scope); expect(reference.identifier.name).toBe('b'); expect(reference.resolved).toBe(variables[numVars - 1]); - expect(reference.writeExpr).not.toBeUndefined(); + expect(reference.writeExpr).toBeDefined(); expect(reference.isWrite()).toBeTruthy(); expect(reference.isRead()).toBeFalsy(); }); diff --git a/packages/scope-manager/tests/eslint-scope/references.test.ts b/packages/scope-manager/tests/eslint-scope/references.test.ts index 8458fbfe657d..15ed88c9a1ef 100644 --- a/packages/scope-manager/tests/eslint-scope/references.test.ts +++ b/packages/scope-manager/tests/eslint-scope/references.test.ts @@ -18,7 +18,7 @@ describe('References:', () => { expect(reference.from).toBe(scope); expect(reference.identifier.name).toBe('a'); expect(reference.resolved).toBe(variables[0]); - expect(reference.writeExpr).not.toBeUndefined(); + expect(reference.writeExpr).toBeDefined(); expect(reference.isWrite()).toBeTruthy(); expect(reference.isRead()).toBeFalsy(); }); @@ -96,7 +96,7 @@ describe('References:', () => { expect(reference.from).toBe(scope); expect(reference.identifier.name).toBe('a'); expect(reference.resolved).toBe(variables[0]); - expect(reference.writeExpr).not.toBeUndefined(); + expect(reference.writeExpr).toBeDefined(); expect(reference.isWrite()).toBeTruthy(); expect(reference.isRead()).toBeFalsy(); }); @@ -147,7 +147,7 @@ describe('References:', () => { expect(reference.from).toBe(scope); expect(reference.identifier.name).toBe('a'); expect(reference.resolved).toBeNull(); - expect(reference.writeExpr).not.toBeUndefined(); + expect(reference.writeExpr).toBeDefined(); expect(reference.isWrite()).toBeTruthy(); expect(reference.isRead()).toBeFalsy(); }); @@ -254,7 +254,7 @@ describe('References:', () => { expect(reference.from).toBe(scope); expect(reference.identifier.name).toBe('a'); expect(reference.resolved).toBe(variables[1]); - expect(reference.writeExpr).not.toBeUndefined(); + expect(reference.writeExpr).toBeDefined(); expect(reference.isWrite()).toBeTruthy(); expect(reference.isRead()).toBeFalsy(); }); @@ -311,7 +311,7 @@ describe('References:', () => { expect(reference.from).toBe(scope); expect(reference.identifier.name).toBe('a'); expect(reference.resolved).toBe(variables[1]); - expect(reference.writeExpr).not.toBeUndefined(); + expect(reference.writeExpr).toBeDefined(); expect(reference.isWrite()).toBeTruthy(); expect(reference.isRead()).toBeFalsy(); }); @@ -364,7 +364,7 @@ describe('References:', () => { expect(reference.from).toBe(scope); expect(reference.identifier.name).toBe('a'); expect(reference.resolved).toBe(variables[0]); - expect(reference.writeExpr).not.toBeUndefined(); + expect(reference.writeExpr).toBeDefined(); expect(reference.isWrite()).toBeTruthy(); expect(reference.isRead()).toBeFalsy(); }); @@ -385,7 +385,7 @@ describe('References:', () => { expect(reference.from).toBe(scope); expect(reference.identifier.name).toBe('a'); expect(reference.resolved).toBe(variables[0]); - expect(reference.writeExpr).not.toBeUndefined(); + expect(reference.writeExpr).toBeDefined(); expect(reference.isWrite()).toBeTruthy(); expect(reference.isRead()).toBeFalsy(); }); @@ -406,7 +406,7 @@ describe('References:', () => { expect(reference.from).toBe(scope); expect(reference.identifier.name).toBe('a'); expect(reference.resolved).toBe(variables[0]); - expect(reference.writeExpr).not.toBeUndefined(); + expect(reference.writeExpr).toBeDefined(); expect(reference.isWrite()).toBeTruthy(); expect(reference.isRead()).toBeFalsy(); }); diff --git a/packages/typescript-estree/tests/lib/node-utils.test.ts b/packages/typescript-estree/tests/lib/node-utils.test.ts index 04ef46c9f650..8eea4c219f4c 100644 --- a/packages/typescript-estree/tests/lib/node-utils.test.ts +++ b/packages/typescript-estree/tests/lib/node-utils.test.ts @@ -16,29 +16,29 @@ describe('unescapeStringLiteralText()', () => { expect(unescapeStringLiteralText(text)).toEqual(text); }); it('should handle empty string', () => { - expect(unescapeStringLiteralText('')).toEqual(''); + expect(unescapeStringLiteralText('')).toBe(''); }); it('should handle named entities followed by alphanumeric characters', () => { - expect(unescapeStringLiteralText('über')).toEqual('über'); + expect(unescapeStringLiteralText('über')).toBe('über'); }); it('should handle invalid code point modify content', () => { - expect(unescapeStringLiteralText('�')).toEqual('�'); + expect(unescapeStringLiteralText('�')).toBe('�'); }); it('should escape correctly', () => { - expect(unescapeStringLiteralText('&=123&lang=en&,&')).toEqual( + expect(unescapeStringLiteralText('&=123&lang=en&,&')).toBe( '&=123&lang=en&,&', ); - expect(unescapeStringLiteralText('')).toEqual('\u0001'); - expect(unescapeStringLiteralText('!')).toEqual(`!`); - expect(unescapeStringLiteralText('�')).toEqual('\u0000'); - expect(unescapeStringLiteralText('Œ')).toEqual('\u0152'); - expect(unescapeStringLiteralText('œ')).toEqual('\u0153'); - expect(unescapeStringLiteralText('∴')).toEqual('\u2234'); - expect(unescapeStringLiteralText('😂')).toEqual('😂'); + expect(unescapeStringLiteralText('')).toBe('\u0001'); + expect(unescapeStringLiteralText('!')).toBe(`!`); + expect(unescapeStringLiteralText('�')).toBe('\u0000'); + expect(unescapeStringLiteralText('Œ')).toBe('\u0152'); + expect(unescapeStringLiteralText('œ')).toBe('\u0153'); + expect(unescapeStringLiteralText('∴')).toBe('\u2234'); + expect(unescapeStringLiteralText('😂')).toBe('😂'); expect( unescapeStringLiteralText( 'a\n<>"'&©∆℞😂�', ), - ).toEqual(`a\n<>"'&©∆℞😂\u0000\u0001`); + ).toBe(`a\n<>"'&©∆℞😂\u0000\u0001`); }); }); diff --git a/packages/typescript-estree/tests/lib/parse.test.ts b/packages/typescript-estree/tests/lib/parse.test.ts index 236dc6929ad0..f74bcc81794d 100644 --- a/packages/typescript-estree/tests/lib/parse.test.ts +++ b/packages/typescript-estree/tests/lib/parse.test.ts @@ -54,7 +54,7 @@ describe('parseWithNodeMaps()', () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any err: any ) { - expect(err.column).toEqual(16); + expect(err.column).toBe(16); } }); }); diff --git a/packages/typescript-estree/tests/lib/persistentParse.test.ts b/packages/typescript-estree/tests/lib/persistentParse.test.ts index 50ab0351c16c..b79f66aaa5c2 100644 --- a/packages/typescript-estree/tests/lib/persistentParse.test.ts +++ b/packages/typescript-estree/tests/lib/persistentParse.test.ts @@ -193,7 +193,7 @@ function baseTests( writeFile(PROJECT_DIR, 'bar'); // make sure that file is correctly created - expect(existsSync('bar', PROJECT_DIR)).toEqual(true); + expect(existsSync('bar', PROJECT_DIR)).toBe(true); // both files should parse fine now expect(() => parseFile('foo', PROJECT_DIR, true)).not.toThrow(); @@ -213,8 +213,8 @@ function baseTests( writeFile(PROJECT_DIR, 'bar'); // make sure that file is correctly created - expect(existsSync('bar')).toEqual(true); - expect(existsSync('bar', PROJECT_DIR)).toEqual(true); + expect(existsSync('bar')).toBe(true); + expect(existsSync('bar', PROJECT_DIR)).toBe(true); // both files should parse fine now expect(() => parseFile('foo', PROJECT_DIR, true, true)).not.toThrow(); diff --git a/yarn.lock b/yarn.lock index 293c6e122bb5..6e80394a4934 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4320,12 +4320,12 @@ eslint-plugin-import@^2.23.4: resolve "^1.20.0" tsconfig-paths "^3.11.0" -eslint-plugin-jest@^24.3.6: - version "24.5.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.5.2.tgz#f71f98f27fd18b50f55246ca090f36d1730e36a6" - integrity sha512-lrI3sGAyZi513RRmP08sIW241Ti/zMnn/6wbE4ZBhb3M2pJ9ztaZMnSKSKKBUfotVdwqU8W1KtD8ao2/FR8DIg== +eslint-plugin-jest@^25.0.5: + version "25.0.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-25.0.5.tgz#22b0f155aa68aa0932adda104c930c0b1a9ca6ca" + integrity sha512-fMVTvh/pgBHgEyJp643qRjqvyR3TAw3VIldYV0LltepKo4whYZ4oYlsplT0SIqjnclkuNN+PRr841XPMgaOswg== dependencies: - "@typescript-eslint/experimental-utils" "^4.0.1" + "@typescript-eslint/experimental-utils" "^5.0.0" eslint-plugin-simple-import-sort@^7.0.0: version "7.0.0" From 41d6cac8bd439ccba5ba763f033d052fd1f05a57 Mon Sep 17 00:00:00 2001 From: Denis Sikuler Date: Thu, 14 Oct 2021 08:32:55 +0300 Subject: [PATCH 429/473] docs: fix a typo in no-non-null-asserted-nullish-coalescing.md (#3994) --- .../docs/rules/no-non-null-asserted-nullish-coalescing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md b/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md index 799100f29939..f09cb1ddb6d8 100644 --- a/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md +++ b/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md @@ -34,7 +34,7 @@ foo!.bazz ?? bar; foo!.bazz ?? bar!; foo() ?? bar; -// This is considered correct code because because there's no way for the user to satisfy it. +// This is considered correct code because there's no way for the user to satisfy it. let x: string; x! ?? ''; ``` From 2b176a138c90728f0ae196ca57e679dd469c051d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 23:05:30 -0700 Subject: [PATCH 430/473] chore: bump lint-staged from 11.2.0 to 11.2.3 (#3986) Bumps [lint-staged](https://github.com/okonet/lint-staged) from 11.2.0 to 11.2.3. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](https://github.com/okonet/lint-staged/compare/v11.2.0...v11.2.3) --- updated-dependencies: - dependency-name: lint-staged dependency-type: direct:development update-type: version-update:semver-patch ... 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 6e80394a4934..9962477d6c87 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7150,9 +7150,9 @@ linkify-it@^3.0.1: uc.micro "^1.0.1" lint-staged@^11.0.0: - version "11.2.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.2.0.tgz#6b9774a74b3eb4bef5c59fb6475bff84d6853008" - integrity sha512-0KIcRuO4HQS2Su7qWtjrfTXgSklvyIb9Fk9qVWRZkGHa5S81Vj6WBbs+ogQBvHUwLJYq1eQ4R+H82GSak4OM7w== + version "11.2.3" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.2.3.tgz#fc3f4569cc4f46553309dfc1447b8aef69f744fb" + integrity sha512-Tfmhk8O2XFMD25EswHPv+OYhUjsijy5D7liTdxeXvhG2rsadmOLFtyj8lmlfoFFXY8oXWAIOKpoI+lJe1DB1mw== dependencies: cli-truncate "2.1.0" colorette "^1.4.0" From 2c333813728417a346af945b71a8b2fa395253f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 23:05:42 -0700 Subject: [PATCH 431/473] chore: bump @commitlint/cli from 13.2.0 to 13.2.1 (#3985) Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint) from 13.2.0 to 13.2.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/v13.2.0...v13.2.1) --- updated-dependencies: - dependency-name: "@commitlint/cli" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9962477d6c87..37a20f78141d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -307,13 +307,13 @@ integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== "@commitlint/cli@^13.1.0": - version "13.2.0" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-13.2.0.tgz#9e85756b0d0ee06c34b5635d7ef42d7a6c72bd6f" - integrity sha512-RqG0cxxiwaL9OgQbA2ZEfZaVIRJmbtsZgnj5G07AjN7///s/40grSN4/kDl8YjUgvAZskPfJRoGGYNvHJ4zHWA== + version "13.2.1" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-13.2.1.tgz#80ebd46beef6ceed3bb0c0842bcda8d02a3c91de" + integrity sha512-JGzYk2ay5JkRS5w+FLQzr0u/Kih52ds4HPpa3vnwVOQN8Q+S1VYr8Nk/6kRm6uNYsAcC1nejtuDxRdLcLh/9TA== dependencies: "@commitlint/format" "^13.2.0" "@commitlint/lint" "^13.2.0" - "@commitlint/load" "^13.2.0" + "@commitlint/load" "^13.2.1" "@commitlint/read" "^13.2.0" "@commitlint/types" "^13.2.0" lodash "^4.17.19" @@ -377,10 +377,10 @@ "@commitlint/rules" "^13.2.0" "@commitlint/types" "^13.2.0" -"@commitlint/load@>6.1.1", "@commitlint/load@^13.2.0": - version "13.2.0" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-13.2.0.tgz#6bd90b803f7fd102766731dad207cca075b67a4a" - integrity sha512-Nhkv+hwWCCxWGjmE9jd1U8kfGGCkZVpwzlTtdKxpY+Aj2VCFg3BjY+qA81pMF3oAsIpxchSaZG5llb8kduVjYg== +"@commitlint/load@>6.1.1", "@commitlint/load@^13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-13.2.1.tgz#d5d926dbd05021c02837c438ff1057025b28b745" + integrity sha512-qlaJkj0hfa9gtWRfCfbgFBTK3GYQRmjZhba4l9mUu4wV9lEZ4ICFlrLtd/8kaLXf/8xbrPhkAPkVFOAqM0YwUQ== dependencies: "@commitlint/execute-rule" "^13.2.0" "@commitlint/resolve-extends" "^13.2.0" @@ -390,6 +390,7 @@ cosmiconfig "^7.0.0" lodash "^4.17.19" resolve-from "^5.0.0" + typescript "^4.4.3" "@commitlint/message@^13.2.0": version "13.2.0" @@ -10119,7 +10120,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.4.2, "typescript@>=3.3.1 <4.5.0", typescript@^4.1.0-dev.20201026, typescript@~4.4.2: +typescript@*, typescript@4.4.2, "typescript@>=3.3.1 <4.5.0", typescript@^4.1.0-dev.20201026, typescript@^4.4.3, typescript@~4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86" integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ== From 3534d8e1e5cf71523a408f755c7e78b4f000b770 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 23:05:50 -0700 Subject: [PATCH 432/473] chore: bump cspell from 5.11.1 to 5.12.3 (#3987) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.11.1 to 5.12.3. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/compare/v5.11.1...v5.12.3) --- updated-dependencies: - dependency-name: cspell dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 87 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 39 deletions(-) diff --git a/yarn.lock b/yarn.lock index 37a20f78141d..e170b0b729ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -456,10 +456,10 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.11.1": - version "5.11.1" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.11.1.tgz#3cc1c81b446eb5efc25e60921edb30a23a4dd672" - integrity sha512-i/xbEfAP162BeZRftS+1l/BnOgoyBLauzGLp7c9MgBrB6hJf0fWjYndyLsKKXmHNRjPzqA8C6BHJRQh4ZSXi4g== +"@cspell/cspell-bundled-dicts@^5.12.3": + version "5.12.3" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.12.3.tgz#d4ae61d03c6f991f4b03b03ee718830522bf74d5" + integrity sha512-f3kyUHYxyGqNt2DTphpmP8hr38YTL48wr4Dq7pZDbqDjLkerq9T7ufX2CZ2OfydBEdIgduX2UXwiow7IfdwY/A== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" @@ -494,13 +494,13 @@ "@cspell/dict-ruby" "^1.0.14" "@cspell/dict-rust" "^1.0.23" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.45" + "@cspell/dict-software-terms" "^1.0.47" "@cspell/dict-typescript" "^1.0.19" -"@cspell/cspell-types@^5.11.1": - version "5.11.1" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.11.1.tgz#61e744782acb8f1fd21a44f0aa59de0572c6ccab" - integrity sha512-QSPqbrzbGOWDCibFirDQwheNyf0RIO4+GgYN5CQWis0y4ZY9GIBkQkxaqbgLQEu/lTRNyVhg+m/Y9yNv73t59A== +"@cspell/cspell-types@^5.12.3": + version "5.12.3" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.12.3.tgz#bfbebfa29d2f280d99785fdbc3e97bea60b47e5b" + integrity sha512-4l43apk3QGMkpszirKjrRGWmzZVuCyvoa0+kgWCl28dviLKsVonop8liBJaBzjmZbdpe27IKpMrNtj0fOus+fw== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -667,10 +667,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.45": - version "1.0.46" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.46.tgz#edbb4d0585252e1f3deb14ffdacc9d12917118c5" - integrity sha512-W4Lf0AmWo7V/tS0kXKsTUW/edfYOQ7QTVisuuQM7bnttrykhlNuNrmcSSYNg5xn46H6MlaZvk3+oz4tHH30nbg== +"@cspell/dict-software-terms@^1.0.47": + version "1.0.48" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.48.tgz#dc45a91c64f9f86df3a047879d9f34aa17435bd0" + integrity sha512-pfF3Ys2gRffu5ElqkH7FQMDMi/iZMyOzpGMb3FSH0PJ2AnRQ5rRNWght1h2L36YxvXl0mWVaFrrfwiOyRIc8ZQ== "@cspell/dict-typescript@^1.0.19": version "1.0.19" @@ -3699,32 +3699,40 @@ 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.11.1: - version "5.11.1" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.11.1.tgz#c8d26a77f9769a291f16288776f3f544ea165d61" - integrity sha512-1/X8ZkC7bMh8kb5RjkIzlfktz4asGfIUHbLm85nXO7wRYFZ/spK11YrPsRNXoEJsoDUkElDUvgN3pJFd9tM3vw== +cspell-gitignore@^5.12.3: + version "5.12.3" + resolved "https://registry.yarnpkg.com/cspell-gitignore/-/cspell-gitignore-5.12.3.tgz#cd0425064f048cc6f40ba791684f068ee0cc130d" + integrity sha512-oPqY6oCVNwFRqcE0FiWNPsyv0EjWiK2N66en6HDZR+pXLZ1CBh8PHcUbRAGt+XHckm27zxbl/sDCKd2m+5yyIA== + dependencies: + cspell-glob "^5.12.3" + find-up "^5.0.0" + +cspell-glob@^5.12.3: + version "5.12.3" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.12.3.tgz#31d1b3799f2ced60814730ef1c9332260df44755" + integrity sha512-2ZgzHr01Blch1I1C3jkzb3IIEE7peoFDDAM+MONQdf8JugWrexZsQ3A6nNUuUgtHZYbJC01ZKzB1JunmE84caA== dependencies: micromatch "^4.0.4" -cspell-io@^5.11.1: - version "5.11.1" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.11.1.tgz#375c5db629c143aec3e4ecb576a53ad0c3e21176" - integrity sha512-FWCNq1dY6MO1Y494ou3Qdvm1fcWGte6bLLYycgz1CLwU42VAzOTMDzzR53+BExRb4HExp3penmIHGrwwG+BZHQ== +cspell-io@^5.12.3: + version "5.12.3" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.12.3.tgz#19bf52443ac964042b0a2e9103a8c12f3312d494" + integrity sha512-YqIsDPWj4OKyRYDZyZ9InvYBSGJAYbq/OMzCtJ1vCpgzGdm+7pWQkonGZMThPDW33EsSE8GPaT/XTGZbqZuDoA== -cspell-lib@^5.11.1: - version "5.11.1" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.11.1.tgz#68aa5b51a3f449fe1e60b65ff38cb0bfe52f8244" - integrity sha512-4o0umOGIdhx8pWqhVbminW14kwAoPOxiBmMUNwttZQ1kQw3WgT/6LwlFHbNL4pEIAgbMAnt4IX7IbTPL1Z+xDw== +cspell-lib@^5.12.3: + version "5.12.3" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.12.3.tgz#47b2ebffe535a82eeed27f539125fef2fcedbb01" + integrity sha512-wiS3X3inzkwr2d6UojVLjzGFxwhnE+HoQYg7cDyC2qqK1Q++36c5bHJGE8564lsVedeAMVbHh81bP7hibg/yUw== dependencies: - "@cspell/cspell-bundled-dicts" "^5.11.1" - "@cspell/cspell-types" "^5.11.1" + "@cspell/cspell-bundled-dicts" "^5.12.3" + "@cspell/cspell-types" "^5.12.3" clear-module "^4.1.1" comment-json "^4.1.1" configstore "^5.0.1" cosmiconfig "^7.0.1" - cspell-glob "^5.11.1" - cspell-io "^5.11.1" - cspell-trie-lib "^5.11.1" + cspell-glob "^5.12.3" + cspell-io "^5.12.3" + cspell-trie-lib "^5.12.3" find-up "^5.0.0" fs-extra "^10.0.0" gensequence "^3.1.1" @@ -3733,24 +3741,25 @@ cspell-lib@^5.11.1: resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.11.1: - version "5.11.1" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.11.1.tgz#041742b39fd9fbc596a3d0aafc13b697a42b85f2" - integrity sha512-2VQqKT+a5YKRy1CDrJOxtwUaPKCugMzg+tgZT0ft+CXZ7dzIxqi1RsC63eDpKVPx06WwTFYMx9FvtVCzU+2LNQ== +cspell-trie-lib@^5.12.3: + version "5.12.3" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.12.3.tgz#31a6fe7ed3016d77768fc4b1dfcfab1a9dd46a93" + integrity sha512-kck/fUcsBeskuHPFSW4tn4yseDWCDTSaXwxTB+G129anzk0w7mz4LliBBfoD8AHo+D102N7nWmcKXxwPUxAXUQ== dependencies: fs-extra "^10.0.0" gensequence "^3.1.1" cspell@^5.5.2: - version "5.11.1" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.11.1.tgz#654bfec3ce1356282a479544f59caf313c6f734e" - integrity sha512-VO+zPnl7KtGcQICe6dSeCRTT6tODnr79Mm39iY4VXDYKf0q5CtzAbABMiFIwMKD2vuCnc3kCl+1nwHYLjqRJHg== + version "5.12.3" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.12.3.tgz#1966eb6687f7cdf86e5f96a8c39a140ffac42d55" + integrity sha512-lPyWZHfdQh+xjUZDAQC0gnpjglMu2AEfxBWlziTm3XuYuPGTvNJQSUrkMcH180tA3fkj8q2XFwfxHkXXAxm68w== dependencies: chalk "^4.1.2" commander "^8.2.0" comment-json "^4.1.1" - cspell-glob "^5.11.1" - cspell-lib "^5.11.1" + cspell-gitignore "^5.12.3" + cspell-glob "^5.12.3" + cspell-lib "^5.12.3" fast-json-stable-stringify "^2.1.0" file-entry-cache "^6.0.1" fs-extra "^10.0.0" From 34c97dd75304cf068a5577e24870ec425c41e45c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 23:05:57 -0700 Subject: [PATCH 433/473] chore: bump jest from 27.2.4 to 27.2.5 (#3988) Bumps [jest](https://github.com/facebook/jest) from 27.2.4 to 27.2.5. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/compare/v27.2.4...v27.2.5) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 618 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 315 insertions(+), 303 deletions(-) diff --git a/yarn.lock b/yarn.lock index e170b0b729ec..b065e0538c57 100644 --- a/yarn.lock +++ b/yarn.lock @@ -830,47 +830,47 @@ jest-util "^27.0.6" slash "^3.0.0" -"@jest/console@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.2.4.tgz#2f1a4bf82b9940065d4818fac271def99ec55e5e" - integrity sha512-94znCKynPZpDpYHQ6esRJSc11AmONrVkBOBZiD7S+bSubHhrUfbS95EY5HIOxhm4PQO7cnvZkL3oJcY0oMA+Wg== +"@jest/console@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.2.5.tgz#bddbf8d41c191f17b52bf0c9e6c0d18605e35d6e" + integrity sha512-smtlRF9vNKorRMCUtJ+yllIoiY8oFmfFG7xlzsAE76nKEwXNhjPOJIsc7Dv+AUitVt76t+KjIpUP9m98Crn2LQ== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^27.2.4" - jest-util "^27.2.4" + jest-message-util "^27.2.5" + jest-util "^27.2.5" slash "^3.0.0" -"@jest/core@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.2.4.tgz#0b932da787d64848eab720dbb88e5b7a3f86e539" - integrity sha512-UNQLyy+rXoojNm2MGlapgzWhZD1CT1zcHZQYeiD0xE7MtJfC19Q6J5D/Lm2l7i4V97T30usKDoEtjI8vKwWcLg== +"@jest/core@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.2.5.tgz#854c314708cee0d892ac4f531b9129f00a21ee69" + integrity sha512-VR7mQ+jykHN4WO3OvusRJMk4xCa2MFLipMS+43fpcRGaYrN1KwMATfVEXif7ccgFKYGy5D1TVXTNE4mGq/KMMA== dependencies: - "@jest/console" "^27.2.4" - "@jest/reporters" "^27.2.4" - "@jest/test-result" "^27.2.4" - "@jest/transform" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/console" "^27.2.5" + "@jest/reporters" "^27.2.5" + "@jest/test-result" "^27.2.5" + "@jest/transform" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^27.2.4" - jest-config "^27.2.4" - jest-haste-map "^27.2.4" - jest-message-util "^27.2.4" + jest-changed-files "^27.2.5" + jest-config "^27.2.5" + jest-haste-map "^27.2.5" + jest-message-util "^27.2.5" jest-regex-util "^27.0.6" - jest-resolve "^27.2.4" - jest-resolve-dependencies "^27.2.4" - jest-runner "^27.2.4" - jest-runtime "^27.2.4" - jest-snapshot "^27.2.4" - jest-util "^27.2.4" - jest-validate "^27.2.4" - jest-watcher "^27.2.4" + jest-resolve "^27.2.5" + jest-resolve-dependencies "^27.2.5" + jest-runner "^27.2.5" + jest-runtime "^27.2.5" + jest-snapshot "^27.2.5" + jest-util "^27.2.5" + jest-validate "^27.2.5" + jest-watcher "^27.2.5" micromatch "^4.0.4" rimraf "^3.0.0" slash "^3.0.0" @@ -886,15 +886,15 @@ "@types/node" "*" jest-mock "^27.0.6" -"@jest/environment@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.2.4.tgz#db3e60f7dd30ab950f6ce2d6d7293ed9a6b7cbcd" - integrity sha512-wkuui5yr3SSQW0XD0Qm3TATUbL/WE3LDEM3ulC+RCQhMf2yxhci8x7svGkZ4ivJ6Pc94oOzpZ6cdHBAMSYd1ew== +"@jest/environment@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.2.5.tgz#b85517ccfcec55690c82c56f5a01a3b30c5e3c84" + integrity sha512-XvUW3q6OUF+54SYFCgbbfCd/BKTwm5b2MGLoc2jINXQLKQDTCS2P2IrpPOtQ08WWZDGzbhAzVhOYta3J2arubg== dependencies: - "@jest/fake-timers" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/fake-timers" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" - jest-mock "^27.2.4" + jest-mock "^27.2.5" "@jest/fake-timers@^27.0.6": version "27.0.6" @@ -908,17 +908,17 @@ jest-mock "^27.0.6" jest-util "^27.0.6" -"@jest/fake-timers@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.2.4.tgz#00df08bd60332bd59503cb5b6db21e4903785f86" - integrity sha512-cs/TzvwWUM7kAA6Qm/890SK6JJ2pD5RfDNM3SSEom6BmdyV6OiWP1qf/pqo6ts6xwpcM36oN0wSEzcZWc6/B6w== +"@jest/fake-timers@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.2.5.tgz#0c7e5762d7bfe6e269e7b49279b097a52a42f0a0" + integrity sha512-ZGUb6jg7BgwY+nmO0TW10bc7z7Hl2G/UTAvmxEyZ/GgNFoa31tY9/cgXmqcxnnZ7o5Xs7RAOz3G1SKIj8IVDlg== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" "@sinonjs/fake-timers" "^8.0.1" "@types/node" "*" - jest-message-util "^27.2.4" - jest-mock "^27.2.4" - jest-util "^27.2.4" + jest-message-util "^27.2.5" + jest-mock "^27.2.5" + jest-util "^27.2.5" "@jest/globals@^27.0.6": version "27.0.6" @@ -929,14 +929,14 @@ "@jest/types" "^27.0.6" expect "^27.0.6" -"@jest/globals@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.4.tgz#0aeb22b011f8c8c4b8ff3b4dbd1ee0392fe0dd8a" - integrity sha512-DRsRs5dh0i+fA9mGHylTU19+8fhzNJoEzrgsu+zgJoZth3x8/0juCQ8nVVdW1er4Cqifb/ET7/hACYVPD0dBEA== +"@jest/globals@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.5.tgz#4115538f98ed6cee4051a90fdbd0854062902099" + integrity sha512-naRI537GM+enFVJQs6DcwGYPn/0vgJNb06zGVbzXfDfe/epDPV73hP1vqO37PqSKDeOXM2KInr6ymYbL1HTP7g== dependencies: - "@jest/environment" "^27.2.4" - "@jest/types" "^27.2.4" - expect "^27.2.4" + "@jest/environment" "^27.2.5" + "@jest/types" "^27.2.5" + expect "^27.2.5" "@jest/reporters@27.0.6": version "27.0.6" @@ -968,16 +968,17 @@ terminal-link "^2.0.0" v8-to-istanbul "^8.0.0" -"@jest/reporters@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.4.tgz#1482ff007f2e919d85c54b1563abb8b2ea2d5198" - integrity sha512-LHeSdDnDZkDnJ8kvnjcqV8P1Yv/32yL4d4XfR5gBiy3xGO0onwll1QEbvtW96fIwhx2nejug0GTaEdNDoyr3fQ== +"@jest/reporters@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.5.tgz#65198ed1f3f4449e3f656129764dc6c5bb27ebe3" + integrity sha512-zYuR9fap3Q3mxQ454VWF8I6jYHErh368NwcKHWO2uy2fwByqBzRHkf9j2ekMDM7PaSTWcLBSZyd7NNxR1iHxzQ== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.2.4" - "@jest/test-result" "^27.2.4" - "@jest/transform" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/console" "^27.2.5" + "@jest/test-result" "^27.2.5" + "@jest/transform" "^27.2.5" + "@jest/types" "^27.2.5" + "@types/node" "*" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -988,10 +989,10 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^27.2.4" - jest-resolve "^27.2.4" - jest-util "^27.2.4" - jest-worker "^27.2.4" + jest-haste-map "^27.2.5" + jest-resolve "^27.2.5" + jest-util "^27.2.5" + jest-worker "^27.2.5" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" @@ -1017,13 +1018,13 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.2.4.tgz#d1ca8298d168f1b0be834bfb543b1ac0294c05d7" - integrity sha512-eU+PRo0+lIS01b0dTmMdVZ0TtcRSxEaYquZTRFMQz6CvsehGhx9bRzi9Zdw6VROviJyv7rstU+qAMX5pNBmnfQ== +"@jest/test-result@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.2.5.tgz#e9f73cf6cd5e2cc6eb3105339248dea211f9320e" + integrity sha512-ub7j3BrddxZ0BdSnM5JCF6cRZJ/7j3wgdX0+Dtwhw2Po+HKsELCiXUTvh+mgS4/89mpnU1CPhZxe2mTvuLPJJg== dependencies: - "@jest/console" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/console" "^27.2.5" + "@jest/types" "^27.2.5" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" @@ -1037,15 +1038,15 @@ jest-haste-map "^27.0.6" jest-runtime "^27.0.6" -"@jest/test-sequencer@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.2.4.tgz#df66422a3e9e7440ce8b7498e255fa6b52c0bc03" - integrity sha512-fpk5eknU3/DXE2QCCG1wv/a468+cfPo3Asu6d6yUtM9LOPh709ubZqrhuUOYfM8hXMrIpIdrv1CdCrWWabX0rQ== +"@jest/test-sequencer@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.2.5.tgz#ed5ae91c00e623fb719111d58e380395e16cefbb" + integrity sha512-8j8fHZRfnjbbdMitMAGFKaBZ6YqvFRFJlMJzcy3v75edTOqc7RY65S9JpMY6wT260zAcL2sTQRga/P4PglCu3Q== dependencies: - "@jest/test-result" "^27.2.4" + "@jest/test-result" "^27.2.5" graceful-fs "^4.2.4" - jest-haste-map "^27.2.4" - jest-runtime "^27.2.4" + jest-haste-map "^27.2.5" + jest-runtime "^27.2.5" "@jest/transform@^27.0.2": version "27.0.2" @@ -1089,21 +1090,21 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/transform@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.2.4.tgz#2fe5b6836895f7a1b8bdec442c51e83943c62733" - integrity sha512-n5FlX2TH0oQGwyVDKPxdJ5nI2sO7TJBFe3u3KaAtt7TOiV4yL+Y+rSFDl+Ic5MpbiA/eqXmLAQxjnBmWgS2rEA== +"@jest/transform@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.2.5.tgz#02b08862a56dbedddf0ba3c2eae41e049a250e29" + integrity sha512-29lRtAHHYGALbZOx343v0zKmdOg4Sb0rsA1uSv0818bvwRhs3TyElOmTVXlrw0v1ZTqXJCAH/cmoDXimBhQOJQ== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" babel-plugin-istanbul "^6.0.0" chalk "^4.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.4" - jest-haste-map "^27.2.4" + jest-haste-map "^27.2.5" jest-regex-util "^27.0.6" - jest-util "^27.2.4" + jest-util "^27.2.5" micromatch "^4.0.4" pirates "^4.0.1" slash "^3.0.0" @@ -1121,6 +1122,17 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" +"@jest/types@^27.2.5": + version "27.2.5" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.2.5.tgz#420765c052605e75686982d24b061b4cbba22132" + integrity sha512-nmuM4VuDtCZcY+eTpw+0nvstwReMsjPoj7ZR80/BbixulhLaiX+fbv8oeLW8WZlJMcsGQsTmMKT/iTZu1Uy/lQ== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^16.0.0" + chalk "^4.0.0" + "@lerna/add@3.21.0": version "3.21.0" resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.21.0.tgz#27007bde71cc7b0a2969ab3c2f0ae41578b4577b" @@ -2804,13 +2816,13 @@ babel-jest@^27.0.6: graceful-fs "^4.2.4" slash "^3.0.0" -babel-jest@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.2.4.tgz#21ed6729d51bdd75470bbbf3c8b08d86209fb0dc" - integrity sha512-f24OmxyWymk5jfgLdlCMu4fTs4ldxFBIdn5sJdhvGC1m08rSkJ5hYbWkNmfBSvE/DjhCVNSHXepxsI6THGfGsg== +babel-jest@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.2.5.tgz#6bbbc1bb4200fe0bfd1b1fbcbe02fc62ebed16aa" + integrity sha512-GC9pWCcitBhSuF7H3zl0mftoKizlswaF0E3qi+rPL417wKkCB0d+Sjjb0OfXvxj7gWiBf497ldgRMii68Xz+2g== dependencies: - "@jest/transform" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/transform" "^27.2.5" + "@jest/types" "^27.2.5" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.0.0" babel-preset-jest "^27.2.0" @@ -4556,16 +4568,16 @@ expect@^27.0.6: jest-message-util "^27.0.6" jest-regex-util "^27.0.6" -expect@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.4.tgz#4debf546050bcdad8914a8c95fec7662e02bf67c" - integrity sha512-gOtuonQ8TCnbNNCSw2fhVzRf8EFYDII4nB5NmG4IEV0rbUnW1I5zXvoTntU4iicB/Uh0oZr20NGlOLdJiwsOZA== +expect@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.5.tgz#16154aaa60b4d9a5b0adacfea3e4d6178f4b93fd" + integrity sha512-ZrO0w7bo8BgGoP/bLz+HDCI+0Hfei9jUSZs5yI/Wyn9VkG9w8oJ7rHRgYj+MA7yqqFa0IwHA3flJzZtYugShJA== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" ansi-styles "^5.0.0" jest-get-type "^27.0.6" - jest-matcher-utils "^27.2.4" - jest-message-util "^27.2.4" + jest-matcher-utils "^27.2.5" + jest-message-util "^27.2.5" jest-regex-util "^27.0.6" extend-shallow@^2.0.1: @@ -6051,12 +6063,12 @@ jake@^10.6.1: filelist "^1.0.1" minimatch "^3.0.4" -jest-changed-files@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.2.4.tgz#d7de46e90e5a599c47e260760f5ab53516e835e6" - integrity sha512-eeO1C1u4ex7pdTroYXezr+rbr957myyVoKGjcY4R1TJi3A+9v+4fu1Iv9J4eLq1bgFyT3O3iRWU9lZsEE7J72Q== +jest-changed-files@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.2.5.tgz#9dfd550d158260bcb6fa80aff491f5647f7daeca" + integrity sha512-jfnNJzF89csUKRPKJ4MwZ1SH27wTmX2xiAIHUHrsb/OYd9Jbo4/SXxJ17/nnx6RIifpthk3Y+LEeOk+/dDeGdw== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" execa "^5.0.0" throat "^6.0.1" @@ -6085,46 +6097,46 @@ jest-circus@^27.0.6: stack-utils "^2.0.3" throat "^6.0.1" -jest-circus@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.2.4.tgz#3bd898a29dcaf6a506f3f1b780dff5f67ca83c23" - integrity sha512-TtheheTElrGjlsY9VxkzUU1qwIx05ItIusMVKnvNkMt4o/PeegLRcjq3Db2Jz0GGdBalJdbzLZBgeulZAJxJWA== +jest-circus@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.2.5.tgz#573256a6fb6e447ac2fc7e0ade9375013309037f" + integrity sha512-eyL9IcrAxm3Saq3rmajFCwpaxaRMGJ1KJs+7hlTDinXpJmeR3P02bheM3CYohE7UfwOBmrFMJHjgo/WPcLTM+Q== dependencies: - "@jest/environment" "^27.2.4" - "@jest/test-result" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/environment" "^27.2.5" + "@jest/test-result" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" - expect "^27.2.4" + expect "^27.2.5" is-generator-fn "^2.0.0" - jest-each "^27.2.4" - jest-matcher-utils "^27.2.4" - jest-message-util "^27.2.4" - jest-runtime "^27.2.4" - jest-snapshot "^27.2.4" - jest-util "^27.2.4" - pretty-format "^27.2.4" + jest-each "^27.2.5" + jest-matcher-utils "^27.2.5" + jest-message-util "^27.2.5" + jest-runtime "^27.2.5" + jest-snapshot "^27.2.5" + jest-util "^27.2.5" + pretty-format "^27.2.5" slash "^3.0.0" stack-utils "^2.0.3" throat "^6.0.1" -jest-cli@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.2.4.tgz#acda7f367aa6e674723fc1a7334e0ae1799448d2" - integrity sha512-4kpQQkg74HYLaXo3nzwtg4PYxSLgL7puz1LXHj5Tu85KmlIpxQFjRkXlx4V47CYFFIDoyl3rHA/cXOxUWyMpNg== +jest-cli@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.2.5.tgz#88718c8f05f1c0f209152952ecd61afe4c3311bb" + integrity sha512-XzfcOXi5WQrXqFYsDxq5RDOKY4FNIgBgvgf3ZBz4e/j5/aWep5KnsAYH5OFPMdX/TP/LFsYQMRH7kzJUMh6JKg== dependencies: - "@jest/core" "^27.2.4" - "@jest/test-result" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/core" "^27.2.5" + "@jest/test-result" "^27.2.5" + "@jest/types" "^27.2.5" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.2.4" - jest-util "^27.2.4" - jest-validate "^27.2.4" + jest-config "^27.2.5" + jest-util "^27.2.5" + jest-validate "^27.2.5" prompts "^2.0.1" yargs "^16.2.0" @@ -6155,34 +6167,34 @@ jest-config@27.0.6: micromatch "^4.0.4" pretty-format "^27.0.6" -jest-config@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.2.4.tgz#0204969f5ae2e5190d47be2c14c04d631b7836e2" - integrity sha512-tWy0UxhdzqiKyp4l5Vq4HxLyD+gH5td+GCF3c22/DJ0bYAOsMo+qi2XtbJI6oYMH5JOJQs9nLW/r34nvFCehjA== +jest-config@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.2.5.tgz#c2e4ec6ea2bf4ffd2cae3d927999fe6159cba207" + integrity sha512-QdENtn9b5rIIYGlbDNEcgY9LDL5kcokJnXrp7x8AGjHob/XFqw1Z6p+gjfna2sUulQsQ3ce2Fvntnv+7fKYDhQ== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.2.4" - "@jest/types" "^27.2.4" - babel-jest "^27.2.4" + "@jest/test-sequencer" "^27.2.5" + "@jest/types" "^27.2.5" + babel-jest "^27.2.5" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" is-ci "^3.0.0" - jest-circus "^27.2.4" - jest-environment-jsdom "^27.2.4" - jest-environment-node "^27.2.4" + jest-circus "^27.2.5" + jest-environment-jsdom "^27.2.5" + jest-environment-node "^27.2.5" jest-get-type "^27.0.6" - jest-jasmine2 "^27.2.4" + jest-jasmine2 "^27.2.5" jest-regex-util "^27.0.6" - jest-resolve "^27.2.4" - jest-runner "^27.2.4" - jest-util "^27.2.4" - jest-validate "^27.2.4" + jest-resolve "^27.2.5" + jest-runner "^27.2.5" + jest-util "^27.2.5" + jest-validate "^27.2.5" micromatch "^4.0.4" - pretty-format "^27.2.4" + pretty-format "^27.2.5" -jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6, jest-diff@^27.2.4: +jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6, jest-diff@^27.2.5: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.6.tgz#4a7a19ee6f04ad70e0e3388f35829394a44c7b5e" integrity sha512-Z1mqgkTCSYaFgwTlP/NUiRzdqgxmmhzHY1Tq17zL94morOHfHu3K4bgSgl+CR4GLhpV8VxkuOYuIWnQ9LnFqmg== @@ -6210,16 +6222,16 @@ jest-each@^27.0.6: jest-util "^27.0.6" pretty-format "^27.0.6" -jest-each@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.2.4.tgz#b4f280aafd63129ba82e345f0e74c5a10200aeef" - integrity sha512-w9XVc+0EDBUTJS4xBNJ7N2JCcWItFd006lFjz77OarAQcQ10eFDBMrfDv2GBJMKlXe9aq0HrIIF51AXcZrRJyg== +jest-each@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.2.5.tgz#378118d516db730b92096a9607b8711165946353" + integrity sha512-HUPWIbJT0bXarRwKu/m7lYzqxR4GM5EhKOsu0z3t0SKtbFN6skQhpAUADM4qFShBXb9zoOuag5lcrR1x/WM+Ag== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" chalk "^4.0.0" jest-get-type "^27.0.6" - jest-util "^27.2.4" - pretty-format "^27.2.4" + jest-util "^27.2.5" + pretty-format "^27.2.5" jest-environment-jsdom@^27.0.6: version "27.0.6" @@ -6234,17 +6246,17 @@ jest-environment-jsdom@^27.0.6: jest-util "^27.0.6" jsdom "^16.6.0" -jest-environment-jsdom@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.2.4.tgz#39ae80bbb8675306bfaf0440be1e5f877554539a" - integrity sha512-X70pTXFSypD7AIzKT1mLnDi5hP9w9mdTRcOGOmoDoBrNyNEg4rYm6d4LQWFLc9ps1VnMuDOkFSG0wjSNYGjkng== +jest-environment-jsdom@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.2.5.tgz#21de3ad0e89441d961b592ba7561b16241279208" + integrity sha512-QtRpOh/RQKuXniaWcoFE2ElwP6tQcyxHu0hlk32880g0KczdonCs5P1sk5+weu/OVzh5V4Bt1rXuQthI01mBLg== dependencies: - "@jest/environment" "^27.2.4" - "@jest/fake-timers" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/environment" "^27.2.5" + "@jest/fake-timers" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" - jest-mock "^27.2.4" - jest-util "^27.2.4" + jest-mock "^27.2.5" + jest-util "^27.2.5" jsdom "^16.6.0" jest-environment-node@^27.0.6: @@ -6259,17 +6271,17 @@ jest-environment-node@^27.0.6: jest-mock "^27.0.6" jest-util "^27.0.6" -jest-environment-node@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.2.4.tgz#b79f98cb36e0c9111aac859c9c99f04eb2f74ff6" - integrity sha512-ZbVbFSnbzTvhLOIkqh5lcLuGCCFvtG4xTXIRPK99rV2KzQT3kNg16KZwfTnLNlIiWCE8do960eToeDfcqmpSAw== +jest-environment-node@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.2.5.tgz#ffa1afb3604c640ec841f044d526c65912e02cef" + integrity sha512-0o1LT4grm7iwrS8fIoLtwJxb/hoa3GsH7pP10P02Jpj7Mi4BXy65u46m89vEM2WfD1uFJQ2+dfDiWZNA2e6bJg== dependencies: - "@jest/environment" "^27.2.4" - "@jest/fake-timers" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/environment" "^27.2.5" + "@jest/fake-timers" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" - jest-mock "^27.2.4" - jest-util "^27.2.4" + jest-mock "^27.2.5" + jest-util "^27.2.5" jest-get-type@^27.0.1: version "27.0.1" @@ -6321,12 +6333,12 @@ jest-haste-map@^27.0.6: optionalDependencies: fsevents "^2.3.2" -jest-haste-map@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.2.4.tgz#f8974807bedf07348ca9fd24e5861ab7c8e61aba" - integrity sha512-bkJ4bT00T2K+1NZXbRcyKnbJ42I6QBvoDNMTAQQDBhaGNnZreiQKUNqax0e6hLTx7E75pKDeltVu3V1HAdu+YA== +jest-haste-map@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.2.5.tgz#0247b7299250643472bbcf5b4ad85c72d5178e2e" + integrity sha512-pzO+Gw2WLponaSi0ilpzYBE0kuVJstoXBX8YWyUebR8VaXuX4tzzn0Zp23c/WaETo7XYTGv2e8KdnpiskAFMhQ== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" @@ -6334,8 +6346,8 @@ jest-haste-map@^27.2.4: graceful-fs "^4.2.4" jest-regex-util "^27.0.6" jest-serializer "^27.0.6" - jest-util "^27.2.4" - jest-worker "^27.2.4" + jest-util "^27.2.5" + jest-worker "^27.2.5" micromatch "^4.0.4" walker "^1.0.7" optionalDependencies: @@ -6365,28 +6377,28 @@ jest-jasmine2@^27.0.6: pretty-format "^27.0.6" throat "^6.0.1" -jest-jasmine2@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.2.4.tgz#4a1608133dbdb4d68b5929bfd785503ed9c9ba51" - integrity sha512-fcffjO/xLWLVnW2ct3No4EksxM5RyPwHDYu9QU+90cC+/eSMLkFAxS55vkqsxexOO5zSsZ3foVpMQcg/amSeIQ== +jest-jasmine2@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.2.5.tgz#baaf96c69913c52bce0100000cf0721027c0fd66" + integrity sha512-hdxY9Cm/CjLqu2tXeAoQHPgA4vcqlweVXYOg1+S9FeFdznB9Rti+eEBKDDkmOy9iqr4Xfbq95OkC4NFbXXPCAQ== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^27.2.4" + "@jest/environment" "^27.2.5" "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/test-result" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^27.2.4" + expect "^27.2.5" is-generator-fn "^2.0.0" - jest-each "^27.2.4" - jest-matcher-utils "^27.2.4" - jest-message-util "^27.2.4" - jest-runtime "^27.2.4" - jest-snapshot "^27.2.4" - jest-util "^27.2.4" - pretty-format "^27.2.4" + jest-each "^27.2.5" + jest-matcher-utils "^27.2.5" + jest-message-util "^27.2.5" + jest-runtime "^27.2.5" + jest-snapshot "^27.2.5" + jest-util "^27.2.5" + pretty-format "^27.2.5" throat "^6.0.1" jest-leak-detector@^27.0.6: @@ -6397,13 +6409,13 @@ jest-leak-detector@^27.0.6: jest-get-type "^27.0.6" pretty-format "^27.0.6" -jest-leak-detector@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.2.4.tgz#9bb7eab26a73bb280e9298be8d80f389288ec8f1" - integrity sha512-SrcHWbe0EHg/bw2uBjVoHacTo5xosl068x2Q0aWsjr2yYuW2XwqrSkZV4lurUop0jhv1709ymG4or+8E4sH27Q== +jest-leak-detector@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.2.5.tgz#e2edc3b37d38e8d9a527e10e456b403c3151b206" + integrity sha512-HYsi3GUR72bYhOGB5C5saF9sPdxGzSjX7soSQS+BqDRysc7sPeBwPbhbuT8DnOpijnKjgwWQ8JqvbmReYnt3aQ== dependencies: jest-get-type "^27.0.6" - pretty-format "^27.2.4" + pretty-format "^27.2.5" jest-matcher-utils@^27.0.2: version "27.0.2" @@ -6425,15 +6437,15 @@ jest-matcher-utils@^27.0.6: jest-get-type "^27.0.6" pretty-format "^27.0.6" -jest-matcher-utils@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.2.4.tgz#008fff018151415ad1b6cfc083fd70fe1e012525" - integrity sha512-nQeLfFAIPPkyhkDfifAPfP/U5wm1x0fLtAzqXZSSKckXDNuk2aaOfQiDYv1Mgf5GY6yOsxfUnvNm3dDjXM+BXw== +jest-matcher-utils@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.2.5.tgz#4684faaa8eb32bf15e6edaead6834031897e2980" + integrity sha512-qNR/kh6bz0Dyv3m68Ck2g1fLW5KlSOUNcFQh87VXHZwWc/gY6XwnKofx76Qytz3x5LDWT09/2+yXndTkaG4aWg== dependencies: chalk "^4.0.0" - jest-diff "^27.2.4" + jest-diff "^27.2.5" jest-get-type "^27.0.6" - pretty-format "^27.2.4" + pretty-format "^27.2.5" jest-message-util@^27.0.2: version "27.0.2" @@ -6465,18 +6477,18 @@ jest-message-util@^27.0.6: slash "^3.0.0" stack-utils "^2.0.3" -jest-message-util@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.2.4.tgz#667e8c0f2b973156d1bac7398a7f677705cafaca" - integrity sha512-wbKT/BNGnBVB9nzi+IoaLkXt6fbSvqUxx+IYY66YFh96J3goY33BAaNG3uPqaw/Sh/FR9YpXGVDfd5DJdbh4nA== +jest-message-util@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.2.5.tgz#ed8b7b0965247bb875a49c1f9b9ab2d1d0820028" + integrity sha512-ggXSLoPfIYcbmZ8glgEJZ8b+e0Msw/iddRmgkoO7lDAr9SmI65IIfv7VnvTnV4FGnIIUIjzM+fHRHO5RBvyAbQ== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" micromatch "^4.0.4" - pretty-format "^27.2.4" + pretty-format "^27.2.5" slash "^3.0.0" stack-utils "^2.0.3" @@ -6488,12 +6500,12 @@ jest-mock@^27.0.6: "@jest/types" "^27.0.6" "@types/node" "*" -jest-mock@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.2.4.tgz#c8f0ef33f73d8ff53e3f60b16d59f1128f4072ae" - integrity sha512-iVRU905rutaAoUcrt5Tm1JoHHWi24YabqEGXjPJI4tAyA6wZ7mzDi3GrZ+M7ebgWBqUkZE93GAx1STk7yCMIQA== +jest-mock@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.2.5.tgz#0ec38d5ff1e49c4802e7a4a8179e8d7a2fd84de0" + integrity sha512-HiMB3LqE9RzmeMzZARi2Bz3NoymxyP0gCid4y42ca1djffNtYFKgI220aC1VP1mUZ8rbpqZbHZOJ15093bZV/Q== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -6511,14 +6523,14 @@ jest-regex-util@^27.0.6: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5" integrity sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ== -jest-resolve-dependencies@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.2.4.tgz#20c41cc02b66aa45169b282356ec73b133013089" - integrity sha512-i5s7Uh9B3Q6uwxLpMhNKlgBf6pcemvWaORxsW1zNF/YCY3jd5EftvnGBI+fxVwJ1CBxkVfxqCvm1lpZkbaoGmg== +jest-resolve-dependencies@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.2.5.tgz#fcd8eca005b3d11ba32da443045c028164b83be1" + integrity sha512-BSjefped31bcvvCh++/pN9ueqqN1n0+p8/58yScuWfklLm2tbPbS9d251vJhAy0ZI2pL/0IaGhOTJrs9Y4FJlg== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" jest-regex-util "^27.0.6" - jest-snapshot "^27.2.4" + jest-snapshot "^27.2.5" jest-resolve@27.0.6, jest-resolve@^27.0.6: version "27.0.6" @@ -6550,19 +6562,19 @@ jest-resolve@^27.0.2: resolve "^1.20.0" slash "^3.0.0" -jest-resolve@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.2.4.tgz#d3b999f073ff84a8ae109ce99ff7f3223048701a" - integrity sha512-IsAO/3+3BZnKjI2I4f3835TBK/90dxR7Otgufn3mnrDFTByOSXclDi3G2XJsawGV4/18IMLARJ+V7Wm7t+J89Q== +jest-resolve@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.2.5.tgz#04dadbfc1312a2541f5c199c5011945e9cfe5cef" + integrity sha512-q5irwS3oS73SKy3+FM/HL2T7WJftrk9BRzrXF92f7net5HMlS7lJMg/ZwxLB4YohKqjSsdksEw7n/jvMxV7EKg== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" chalk "^4.0.0" escalade "^3.1.1" graceful-fs "^4.2.4" - jest-haste-map "^27.2.4" + jest-haste-map "^27.2.5" jest-pnp-resolver "^1.2.2" - jest-util "^27.2.4" - jest-validate "^27.2.4" + jest-util "^27.2.5" + jest-validate "^27.2.5" resolve "^1.20.0" slash "^3.0.0" @@ -6594,31 +6606,31 @@ jest-runner@^27.0.6: source-map-support "^0.5.6" throat "^6.0.1" -jest-runner@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.2.4.tgz#d816f4cb4af04f3cba703afcf5a35a335b77cad4" - integrity sha512-hIo5PPuNUyVDidZS8EetntuuJbQ+4IHWxmHgYZz9FIDbG2wcZjrP6b52uMDjAEQiHAn8yn8ynNe+TL8UuGFYKg== +jest-runner@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.2.5.tgz#3d9d0626f351480bb2cffcfbbfac240c0097ebd4" + integrity sha512-n41vw9RLg5TKAnEeJK9d6pGOsBOpwE89XBniK+AD1k26oIIy3V7ogM1scbDjSheji8MUPC9pNgCrZ/FHLVDNgg== dependencies: - "@jest/console" "^27.2.4" - "@jest/environment" "^27.2.4" - "@jest/test-result" "^27.2.4" - "@jest/transform" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/console" "^27.2.5" + "@jest/environment" "^27.2.5" + "@jest/test-result" "^27.2.5" + "@jest/transform" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" jest-docblock "^27.0.6" - jest-environment-jsdom "^27.2.4" - jest-environment-node "^27.2.4" - jest-haste-map "^27.2.4" - jest-leak-detector "^27.2.4" - jest-message-util "^27.2.4" - jest-resolve "^27.2.4" - jest-runtime "^27.2.4" - jest-util "^27.2.4" - jest-worker "^27.2.4" + jest-environment-jsdom "^27.2.5" + jest-environment-node "^27.2.5" + jest-haste-map "^27.2.5" + jest-leak-detector "^27.2.5" + jest-message-util "^27.2.5" + jest-resolve "^27.2.5" + jest-runtime "^27.2.5" + jest-util "^27.2.5" + jest-worker "^27.2.5" source-map-support "^0.5.6" throat "^6.0.1" @@ -6654,19 +6666,19 @@ jest-runtime@^27.0.6: strip-bom "^4.0.0" yargs "^16.0.3" -jest-runtime@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.2.4.tgz#170044041e5d30625ab8d753516bbe503f213a5c" - integrity sha512-ICKzzYdjIi70P17MZsLLIgIQFCQmIjMFf+xYww3aUySiUA/QBPUTdUqo5B2eg4HOn9/KkUsV0z6GVgaqAPBJvg== +jest-runtime@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.2.5.tgz#d144c3f6889b927aae1e695b63a41a3323b7016b" + integrity sha512-N0WRZ3QszKyZ3Dm27HTBbBuestsSd3Ud5ooVho47XZJ8aSKO/X1Ag8M1dNx9XzfGVRNdB/xCA3lz8MJwIzPLLA== dependencies: - "@jest/console" "^27.2.4" - "@jest/environment" "^27.2.4" - "@jest/fake-timers" "^27.2.4" - "@jest/globals" "^27.2.4" + "@jest/console" "^27.2.5" + "@jest/environment" "^27.2.5" + "@jest/fake-timers" "^27.2.5" + "@jest/globals" "^27.2.5" "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.2.4" - "@jest/transform" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/test-result" "^27.2.5" + "@jest/transform" "^27.2.5" + "@jest/types" "^27.2.5" "@types/yargs" "^16.0.0" chalk "^4.0.0" cjs-module-lexer "^1.0.0" @@ -6675,14 +6687,14 @@ jest-runtime@^27.2.4: exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-haste-map "^27.2.4" - jest-message-util "^27.2.4" - jest-mock "^27.2.4" + jest-haste-map "^27.2.5" + jest-message-util "^27.2.5" + jest-mock "^27.2.5" jest-regex-util "^27.0.6" - jest-resolve "^27.2.4" - jest-snapshot "^27.2.4" - jest-util "^27.2.4" - jest-validate "^27.2.4" + jest-resolve "^27.2.5" + jest-snapshot "^27.2.5" + jest-util "^27.2.5" + jest-validate "^27.2.5" slash "^3.0.0" strip-bom "^4.0.0" yargs "^16.2.0" @@ -6763,10 +6775,10 @@ jest-snapshot@^27.0.6: pretty-format "^27.0.6" semver "^7.3.2" -jest-snapshot@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.2.4.tgz#277b2269437e3ffcb91d95a73b24becf33c5a871" - integrity sha512-5DFxK31rYS8X8C6WXsFx8XxrxW3PGa6+9IrUcZdTLg1aEyXDGIeiBh4jbwvh655bg/9vTETbEj/njfZicHTZZw== +jest-snapshot@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.2.5.tgz#8a612fe31e2967f58ad364542198dff61f92ef32" + integrity sha512-2/Jkn+VN6Abwz0llBltZaiJMnL8b1j5Bp/gRIxe9YR3FCEh9qp0TXVV0dcpTGZ8AcJV1SZGQkczewkI9LP5yGw== dependencies: "@babel/core" "^7.7.2" "@babel/generator" "^7.7.2" @@ -6774,23 +6786,23 @@ jest-snapshot@^27.2.4: "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.0.0" - "@jest/transform" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/transform" "^27.2.5" + "@jest/types" "^27.2.5" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^27.2.4" + expect "^27.2.5" graceful-fs "^4.2.4" - jest-diff "^27.2.4" + jest-diff "^27.2.5" jest-get-type "^27.0.6" - jest-haste-map "^27.2.4" - jest-matcher-utils "^27.2.4" - jest-message-util "^27.2.4" - jest-resolve "^27.2.4" - jest-util "^27.2.4" + jest-haste-map "^27.2.5" + jest-matcher-utils "^27.2.5" + jest-message-util "^27.2.5" + jest-resolve "^27.2.5" + jest-util "^27.2.5" natural-compare "^1.4.0" - pretty-format "^27.2.4" + pretty-format "^27.2.5" semver "^7.3.2" jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: @@ -6812,12 +6824,12 @@ jest-util@27.0.6, jest-util@^27.0.0, jest-util@^27.0.2, jest-util@^27.0.6: is-ci "^3.0.0" picomatch "^2.2.3" -jest-util@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.2.4.tgz#3d7ce081b2e7f4cfe0156452ac01f3cb456cc656" - integrity sha512-mW++4u+fSvAt3YBWm5IpbmRAceUqa2B++JlUZTiuEt2AmNYn0Yw5oay4cP17TGsMINRNPSGiJ2zNnX60g+VbFg== +jest-util@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.2.5.tgz#88740c4024d223634a82ce7c2263e8bc6df3b3ba" + integrity sha512-QRhDC6XxISntMzFRd/OQ6TGsjbzA5ONO0tlAj2ElHs155x1aEr0rkYJBEysG6H/gZVH3oGFzCdAB/GA8leh8NQ== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" graceful-fs "^4.2.4" @@ -6848,29 +6860,29 @@ jest-validate@^27.0.6: leven "^3.1.0" pretty-format "^27.0.6" -jest-validate@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.2.4.tgz#b66d462b2fb93d7e16a47d1aa8763d5600bf2cfa" - integrity sha512-VMtbxbkd7LHnIH7PChdDtrluCFRJ4b1YV2YJzNwwsASMWftq/HgqiqjvptBOWyWOtevgO3f14wPxkPcLlVBRog== +jest-validate@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.2.5.tgz#2d59bf1627d180f395ba58f24599b0ee0efcfbdf" + integrity sha512-XgYtjS89nhVe+UfkbLgcm+GgXKWgL80t9nTcNeejyO3t0Sj/yHE8BtIJqjZu9NXQksYbGImoQRXmQ1gP+Guffw== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" camelcase "^6.2.0" chalk "^4.0.0" jest-get-type "^27.0.6" leven "^3.1.0" - pretty-format "^27.2.4" + pretty-format "^27.2.5" -jest-watcher@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.2.4.tgz#b1d5c39ab94f59f4f35f66cc96f7761a10e0cfc4" - integrity sha512-LXC/0+dKxhK7cfF7reflRYlzDIaQE+fL4ynhKhzg8IMILNMuI4xcjXXfUJady7OR4/TZeMg7X8eHx8uan9vqaQ== +jest-watcher@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.2.5.tgz#41cd3e64dc5bea8a4327083d71ba7667be400567" + integrity sha512-umV4qGozg2Dn6DTTtqAh9puPw+DGLK9AQas7+mWjiK8t0fWMpxKg8ZXReZw7L4C88DqorsGUiDgwHNZ+jkVrkQ== dependencies: - "@jest/test-result" "^27.2.4" - "@jest/types" "^27.2.4" + "@jest/test-result" "^27.2.5" + "@jest/types" "^27.2.5" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.2.4" + jest-util "^27.2.5" string-length "^4.0.1" jest-worker@^27.0.2: @@ -6891,23 +6903,23 @@ jest-worker@^27.0.6: merge-stream "^2.0.0" supports-color "^8.0.0" -jest-worker@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.2.4.tgz#881455df75e22e7726a53f43703ab74d6b36f82d" - integrity sha512-Zq9A2Pw59KkVjBBKD1i3iE2e22oSjXhUKKuAK1HGX8flGwkm6NMozyEYzKd41hXc64dbd/0eWFeEEuxqXyhM+g== +jest-worker@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.2.5.tgz#ed42865661959488aa020e8a325df010597c36d4" + integrity sha512-HTjEPZtcNKZ4LnhSp02NEH4vE+5OpJ0EsOWYvGQpHgUMLngydESAAMH5Wd/asPf29+XUDQZszxpLg1BkIIA2aw== dependencies: "@types/node" "*" merge-stream "^2.0.0" supports-color "^8.0.0" jest@^27.0.3: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.2.4.tgz#70e27bef873138afc123aa4769f7124c50ad3efb" - integrity sha512-h4uqb1EQLfPulWyUFFWv9e9Nn8sCqsJ/j3wk/KCY0p4s4s0ICCfP3iMf6hRf5hEhsDyvyrCgKiZXma63gMz16A== + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest/-/jest-27.2.5.tgz#7d8a5c8781a160f693beeb7c68e46c16ef948148" + integrity sha512-vDMzXcpQN4Ycaqu+vO7LX8pZwNNoKMhc+gSp6q1D8S6ftRk8gNW8cni3YFxknP95jxzQo23Lul0BI2FrWgnwYQ== dependencies: - "@jest/core" "^27.2.4" + "@jest/core" "^27.2.5" import-local "^3.0.2" - jest-cli "^27.2.4" + jest-cli "^27.2.5" jju@~1.4.0: version "1.4.0" @@ -8591,7 +8603,7 @@ prettier@2.3.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== -pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6, pretty-format@^27.2.4: +pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6, pretty-format@^27.2.5: version "27.2.4" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.4.tgz#08ea39c5eab41b082852d7093059a091f6ddc748" integrity sha512-NUjw22WJHldzxyps2YjLZkUj6q1HvjqFezkB9Y2cklN8NtVZN/kZEXGZdFw4uny3oENzV5EEMESrkI0YDUH8vg== From cd08f7a358e9985191553511f1f43923095a7a25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 23:06:07 -0700 Subject: [PATCH 434/473] chore: bump @babel/code-frame from 7.14.5 to 7.15.8 (#3991) Bumps [@babel/code-frame](https://github.com/babel/babel/tree/HEAD/packages/babel-code-frame) from 7.14.5 to 7.15.8. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.15.8/packages/babel-code-frame) --- updated-dependencies: - dependency-name: "@babel/code-frame" dependency-type: direct:development update-type: version-update:semver-minor ... 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 b065e0538c57..0187695895ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,9 +3,9 @@ "@babel/code-frame@*", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" - integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw== + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.15.8.tgz#45990c47adadb00c03677baa89221f7cc23d2503" + integrity sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg== dependencies: "@babel/highlight" "^7.14.5" From 9b29ca751f496c25240c0c14b8fa432bf4443d39 Mon Sep 17 00:00:00 2001 From: Nikita Stefaniak Date: Thu, 14 Oct 2021 08:06:41 +0200 Subject: [PATCH 435/473] fix(eslint-plugin): [strict-bool-expr] treat unconstrained generic as any (#3981) --- .../src/rules/strict-boolean-expressions.ts | 10 ++++++-- .../rules/strict-boolean-expressions.test.ts | 23 ++++++++++++++++++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts b/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts index 10b48b5e9b37..88ec00846f30 100644 --- a/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts +++ b/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts @@ -779,6 +779,7 @@ export default util.createRule({ ts.TypeFlags.StringLike | ts.TypeFlags.NumberLike | ts.TypeFlags.BigIntLike | + ts.TypeFlags.TypeParameter | ts.TypeFlags.Any | ts.TypeFlags.Unknown | ts.TypeFlags.Never, @@ -789,8 +790,13 @@ export default util.createRule({ } if ( - types.some( - type => util.isTypeAnyType(type) || util.isTypeUnknownType(type), + types.some(type => + util.isTypeFlagSet( + type, + ts.TypeFlags.TypeParameter | + ts.TypeFlags.Any | + ts.TypeFlags.Unknown, + ), ) ) { variantTypes.add('any'); 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 649d069faeec..c98102a1f173 100644 --- a/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts +++ b/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts @@ -298,6 +298,8 @@ if (y) { declare const x: null; if (x) {} (x: undefined) => !x; (x: T) => x ? 1 : 0; + (x: T) => x ? 1 : 0; + (x: T) => x ? 1 : 0; `, errors: [ { messageId: 'conditionErrorNullish', line: 2, column: 1 }, @@ -305,6 +307,8 @@ if (y) { { messageId: 'conditionErrorNullish', line: 4, column: 36 }, { messageId: 'conditionErrorNullish', line: 5, column: 28 }, { messageId: 'conditionErrorNullish', line: 6, column: 47 }, + { messageId: 'conditionErrorNullish', line: 7, column: 35 }, + { messageId: 'conditionErrorNullish', line: 8, column: 40 }, ], }), @@ -316,6 +320,9 @@ if (y) { declare const x: symbol; if (x) {} (x: () => void) => !x; (x: T) => x ? 1 : 0; + (x: T) => x ? 1 : 0; + (x: T) => x ? 1 : 0; + void>(x: T) => x ? 1 : 0; `, errors: [ { messageId: 'conditionErrorObject', line: 2, column: 1 }, @@ -323,6 +330,9 @@ if (y) { { messageId: 'conditionErrorObject', line: 4, column: 38 }, { messageId: 'conditionErrorObject', line: 5, column: 29 }, { messageId: 'conditionErrorObject', line: 6, column: 37 }, + { messageId: 'conditionErrorObject', line: 7, column: 48 }, + { messageId: 'conditionErrorObject', line: 8, column: 44 }, + { messageId: 'conditionErrorObject', line: 9, column: 41 }, ], }), @@ -843,12 +853,12 @@ if (y) { }), // any in boolean context - // TODO: when `T` is not `extends any` then the error is `conditionErrorObject` (says it's always truthy, which is false) ...batchedSingleLineTests({ code: noFormat` if (x) {} x => !x; (x: T) => x ? 1 : 0; + (x: T) => x ? 1 : 0; `, errors: [ { @@ -884,6 +894,17 @@ if (y) { }, ], }, + { + messageId: 'conditionErrorAny', + line: 5, + column: 22, + suggestions: [ + { + messageId: 'conditionFixCastBoolean', + output: ' (x: T) => (Boolean(x)) ? 1 : 0;', + }, + ], + }, ], }), From 154ec9aea8e81732cafe36af97c4822f1591b077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 14 Oct 2021 08:08:32 +0200 Subject: [PATCH 436/473] feat(experimental-utils): extract `ast-utils`' `predicates`' helpers (#3976) --- .../src/ast-utils/helpers.ts | 37 +++++++++++++++++ .../src/ast-utils/predicates.ts | 40 +++---------------- 2 files changed, 42 insertions(+), 35 deletions(-) create mode 100644 packages/experimental-utils/src/ast-utils/helpers.ts diff --git a/packages/experimental-utils/src/ast-utils/helpers.ts b/packages/experimental-utils/src/ast-utils/helpers.ts new file mode 100644 index 000000000000..5d917df603a1 --- /dev/null +++ b/packages/experimental-utils/src/ast-utils/helpers.ts @@ -0,0 +1,37 @@ +import { AST_NODE_TYPES, TSESTree } from '../ts-estree'; + +export const isNodeOfType = + (nodeType: NodeType) => + ( + node: TSESTree.Node | null | undefined, + ): node is TSESTree.Node & { type: NodeType } => + node?.type === nodeType; + +export const isNodeOfTypes = + (nodeTypes: NodeTypes) => + ( + node: TSESTree.Node | null | undefined, + ): node is TSESTree.Node & { type: NodeTypes[number] } => + !!node && nodeTypes.includes(node.type); + +type ObjectEntry = [keyof BaseType, BaseType[keyof BaseType]]; +type ObjectEntries = Array>; +export const isNodeOfTypeWithConditions = < + NodeType extends AST_NODE_TYPES, + Conditions extends Partial, +>( + nodeType: NodeType, + conditions: Conditions, +): (( + node: TSESTree.Node | null | undefined, +) => node is TSESTree.Node & { type: NodeType } & Conditions) => { + const entries = Object.entries(conditions) as ObjectEntries< + TSESTree.Node & { type: NodeType } + >; + + return ( + node: TSESTree.Node | null | undefined, + ): node is TSESTree.Node & { type: NodeType } & Conditions => + node?.type === nodeType && + entries.every(([key, value]) => node[key] === value); +}; diff --git a/packages/experimental-utils/src/ast-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/predicates.ts index 825591978023..985c6e976238 100644 --- a/packages/experimental-utils/src/ast-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/predicates.ts @@ -1,40 +1,10 @@ import { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree } from '../ts-estree'; -const isNodeOfType = - (nodeType: NodeType) => - ( - node: TSESTree.Node | null | undefined, - ): node is TSESTree.Node & { type: NodeType } => - node?.type === nodeType; - -const isNodeOfTypes = - (nodeTypes: NodeTypes) => - ( - node: TSESTree.Node | null | undefined, - ): node is TSESTree.Node & { type: NodeTypes[number] } => - !!node && nodeTypes.includes(node.type); - -type ObjectEntry = [keyof BaseType, BaseType[keyof BaseType]]; -type ObjectEntries = Array>; -const isNodeOfTypeWithConditions = < - NodeType extends AST_NODE_TYPES, - Conditions extends Partial, ->( - nodeType: NodeType, - conditions: Conditions, -): (( - node: TSESTree.Node | null | undefined, -) => node is TSESTree.Node & { type: NodeType } & Conditions) => { - const entries = Object.entries(conditions) as ObjectEntries< - TSESTree.Node & { type: NodeType } - >; - - return ( - node: TSESTree.Node | null | undefined, - ): node is TSESTree.Node & { type: NodeType } & Conditions => - node?.type === nodeType && - entries.every(([key, value]) => node[key] === value); -}; +import { + isNodeOfType, + isNodeOfTypes, + isNodeOfTypeWithConditions, +} from './helpers'; function isOptionalChainPunctuator( token: TSESTree.Token, From 8605e080a4dac4a277e6108cd9ed1e5a707302fa Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Thu, 14 Oct 2021 15:17:25 +0900 Subject: [PATCH 437/473] fix(typescript-estree): support private optional property definition (#3997) * fix(typescript-estree): support private optional property definition * test: add more test --- ...lass-with-private-optional-property.src.ts | 5 + packages/typescript-estree/src/convert.ts | 3 +- .../semantic-diagnostics-enabled.test.ts.snap | 2 + ...with-private-optional-property.src.ts.shot | 690 ++++++++++++++++++ 4 files changed, 699 insertions(+), 1 deletion(-) create mode 100644 packages/shared-fixtures/fixtures/typescript/basics/class-with-private-optional-property.src.ts create mode 100644 packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-optional-property.src.ts.shot diff --git a/packages/shared-fixtures/fixtures/typescript/basics/class-with-private-optional-property.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/class-with-private-optional-property.src.ts new file mode 100644 index 000000000000..bb3e79a9cb4d --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/class-with-private-optional-property.src.ts @@ -0,0 +1,5 @@ +class Foo { + #prop?: string; + #propExplicitWithValue?: string = ''; + #propImplicitWithValue? = ''; +} diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 37af8556cca4..bd33d9a53e51 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1149,7 +1149,8 @@ export class Converter { if ( (node.name.kind === SyntaxKind.Identifier || - node.name.kind === SyntaxKind.ComputedPropertyName) && + node.name.kind === SyntaxKind.ComputedPropertyName || + node.name.kind === SyntaxKind.PrivateIdentifier) && node.questionToken ) { result.optional = true; diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap index 2a46c9188cb2..f238afc849e7 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap @@ -1835,6 +1835,8 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-override-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-private-optional-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-private-parameter-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-property-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-optional-property.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-optional-property.src.ts.shot new file mode 100644 index 000000000000..dfb9b9557cdc --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-optional-property.src.ts.shot @@ -0,0 +1,690 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics class-with-private-optional-property.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "prop", + "range": Array [ + 14, + 19, + ], + "type": "PrivateIdentifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "optional": true, + "override": false, + "range": Array [ + 14, + 29, + ], + "readonly": undefined, + "static": false, + "type": "PropertyDefinition", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 20, + 28, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSStringKeyword", + }, + }, + "value": null, + }, + Object { + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "name": "propExplicitWithValue", + "range": Array [ + 32, + 54, + ], + "type": "PrivateIdentifier", + }, + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "optional": true, + "override": false, + "range": Array [ + 32, + 69, + ], + "readonly": undefined, + "static": false, + "type": "PropertyDefinition", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 3, + }, + }, + "range": Array [ + 55, + 63, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 57, + 63, + ], + "type": "TSStringKeyword", + }, + }, + "value": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 3, + }, + "start": Object { + "column": 36, + "line": 3, + }, + }, + "range": Array [ + 66, + 68, + ], + "raw": "''", + "type": "Literal", + "value": "", + }, + }, + Object { + "computed": false, + "declare": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "name": "propImplicitWithValue", + "range": Array [ + 72, + 94, + ], + "type": "PrivateIdentifier", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "optional": true, + "override": false, + "range": Array [ + 72, + 101, + ], + "readonly": undefined, + "static": false, + "type": "PropertyDefinition", + "value": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 4, + }, + "start": Object { + "column": 28, + "line": 4, + }, + }, + "range": Array [ + 98, + 100, + ], + "raw": "''", + "type": "Literal", + "value": "", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 103, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 103, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 104, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 19, + ], + "type": "Identifier", + "value": "#prop", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 32, + 54, + ], + "type": "Identifier", + "value": "#propExplicitWithValue", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 3, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 57, + 63, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 3, + }, + "start": Object { + "column": 34, + "line": 3, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 3, + }, + "start": Object { + "column": 36, + "line": 3, + }, + }, + "range": Array [ + 66, + 68, + ], + "type": "String", + "value": "''", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 38, + "line": 3, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 72, + 94, + ], + "type": "Identifier", + "value": "#propImplicitWithValue", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 4, + }, + "start": Object { + "column": 24, + "line": 4, + }, + }, + "range": Array [ + 94, + 95, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 4, + }, + "start": Object { + "column": 26, + "line": 4, + }, + }, + "range": Array [ + 96, + 97, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 4, + }, + "start": Object { + "column": 28, + "line": 4, + }, + }, + "range": Array [ + 98, + 100, + ], + "type": "String", + "value": "''", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 30, + "line": 4, + }, + }, + "range": Array [ + 100, + 101, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 102, + 103, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; From b43fda781c25d946fcf35bf9ffa0adfba9a5997d Mon Sep 17 00:00:00 2001 From: Asad Ateeque <319157+aateeque@users.noreply.github.com> Date: Thu, 14 Oct 2021 22:14:49 +0500 Subject: [PATCH 438/473] docs(eslint-plugin): [consistent-type-definitions] fix a typo (#4009) Seems like the `interface` option was intended --- .../eslint-plugin/docs/rules/consistent-type-definitions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/consistent-type-definitions.md b/packages/eslint-plugin/docs/rules/consistent-type-definitions.md index 52afd3f9a81c..eeabe6f598ed 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-definitions.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-definitions.md @@ -59,7 +59,7 @@ interface T { } ``` -Examples of **correct** code with `type` option. +Examples of **correct** code with `interface` option. ```ts type T = { x: number }; From d560c8633a1091b8be6562f69ddfc702586a4a1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 10:15:27 -0700 Subject: [PATCH 439/473] chore: bump enhanced-resolve from 5.8.2 to 5.8.3 (#4003) Bumps [enhanced-resolve](https://github.com/webpack/enhanced-resolve) from 5.8.2 to 5.8.3. - [Release notes](https://github.com/webpack/enhanced-resolve/releases) - [Commits](https://github.com/webpack/enhanced-resolve/compare/v5.8.2...v5.8.3) --- updated-dependencies: - dependency-name: enhanced-resolve dependency-type: direct:development update-type: version-update:semver-patch ... 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 0187695895ea..304776ef86af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4174,9 +4174,9 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: once "^1.4.0" enhanced-resolve@^5.8.2: - version "5.8.2" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz#15ddc779345cbb73e97c611cd00c01c1e7bf4d8b" - integrity sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA== + version "5.8.3" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz#6d552d465cce0423f5b3d718511ea53826a7b2f0" + integrity sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" From 0a6045893ace4325c6fb2442dd39166aa809bb51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 10:15:35 -0700 Subject: [PATCH 440/473] chore: bump ts-node from 10.2.1 to 10.3.0 (#4004) Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.2.1 to 10.3.0. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v10.2.1...v10.3.0) --- updated-dependencies: - dependency-name: ts-node dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/yarn.lock b/yarn.lock index 304776ef86af..0a82b50c53a8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -682,10 +682,10 @@ resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== -"@cspotcode/source-map-support@0.6.1": - version "0.6.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.6.1.tgz#118511f316e2e87ee4294761868e254d3da47960" - integrity sha512-DX3Z+T5dt1ockmPdobJS/FAsQPW4V4SrWEhD2iYQT2Cb2tQsiMnYxrcUH9By/Z3B+v0S5LMBkQtV/XOBbpLEOg== +"@cspotcode/source-map-support@0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz#4789840aa859e46d2f3173727ab707c66bf344f5" + integrity sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA== dependencies: "@cspotcode/source-map-consumer" "0.8.0" @@ -2461,12 +2461,7 @@ acorn@^7.1.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.2.4, acorn@^8.4.1: - version "8.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" - integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA== - -acorn@^8.5.0: +acorn@^8.2.4, acorn@^8.4.1, acorn@^8.5.0: version "8.5.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2" integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q== @@ -9360,7 +9355,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.17: +source-map-support@^0.5.17, source-map-support@^0.5.6: version "0.5.20" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.20.tgz#12166089f8f5e5e8c56926b377633392dd2cb6c9" integrity sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw== @@ -9368,14 +9363,6 @@ source-map-support@^0.5.17: buffer-from "^1.0.0" source-map "^0.6.0" -source-map-support@^0.5.6: - version "0.5.19" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" - integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" @@ -9976,11 +9963,11 @@ ts-jest@^27.0.1: yargs-parser "20.x" ts-node@^10.0.0: - version "10.2.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.2.1.tgz#4cc93bea0a7aba2179497e65bb08ddfc198b3ab5" - integrity sha512-hCnyOyuGmD5wHleOQX6NIjJtYVIO8bPP8F2acWkB4W06wdlkgyvJtubO/I9NkI88hCFECbsEgoLc0VNkYmcSfw== + version "10.3.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.3.0.tgz#a797f2ed3ff50c9a5d814ce400437cb0c1c048b4" + integrity sha512-RYIy3i8IgpFH45AX4fQHExrT8BxDeKTdC83QFJkNzkvt8uFB6QJ8XMyhynYiKMLxt9a7yuXaDBZNOYS3XjDcYw== dependencies: - "@cspotcode/source-map-support" "0.6.1" + "@cspotcode/source-map-support" "0.7.0" "@tsconfig/node10" "^1.0.7" "@tsconfig/node12" "^1.0.7" "@tsconfig/node14" "^1.0.0" From a53329ab5bb130c1e8f5855bd1ab2c7118f0a898 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 10:15:47 -0700 Subject: [PATCH 441/473] chore: bump eslint-plugin-import from 2.24.2 to 2.25.2 (#4006) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.24.2 to 2.25.2. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.24.2...v2.25.2) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 181 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 131 insertions(+), 50 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0a82b50c53a8..d87cb564ac7f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2671,16 +2671,16 @@ array-ify@^1.0.0: resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= -array-includes@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a" - integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A== +array-includes@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.4.tgz#f5b493162c760f3539631f005ba2bb46acb45ba9" + integrity sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" + es-abstract "^1.19.1" get-intrinsic "^1.1.1" - is-string "^1.0.5" + is-string "^1.0.7" array-timsort@^1.0.3: version "1.0.3" @@ -2709,14 +2709,14 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= -array.prototype.flat@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123" - integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg== +array.prototype.flat@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz#07e0975d84bbc7c48cd1879d609e682598d33e13" + integrity sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg== dependencies: - call-bind "^1.0.0" + call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" + es-abstract "^1.19.0" arrify@^1.0.1: version "1.0.1" @@ -4210,7 +4210,7 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.0-next.1, es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: +es-abstract@^1.17.0-next.1, es-abstract@^1.18.0-next.2: version "1.18.3" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.3.tgz#25c4c3380a27aa203c44b2b685bba94da31b63e0" integrity sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw== @@ -4232,6 +4232,32 @@ es-abstract@^1.17.0-next.1, es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" +es-abstract@^1.19.0, es-abstract@^1.19.1: + version "1.19.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" + integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-symbols "^1.0.2" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.1" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.1" + is-string "^1.0.7" + is-weakref "^1.0.1" + object-inspect "^1.11.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -4293,12 +4319,13 @@ eslint-import-resolver-node@^0.3.6: debug "^3.2.7" resolve "^1.20.0" -eslint-module-utils@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz#94e5540dd15fe1522e8ffa3ec8db3b7fa7e7a534" - integrity sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q== +eslint-module-utils@^2.7.0: + version "2.7.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz#b435001c9f8dd4ab7f6d0efcae4b9696d4c24b7c" + integrity sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ== dependencies: debug "^3.2.7" + find-up "^2.1.0" pkg-dir "^2.0.0" eslint-plugin-eslint-comments@^3.2.0: @@ -4317,23 +4344,21 @@ eslint-plugin-eslint-plugin@^3.0.3: eslint-utils "^2.1.0" eslint-plugin-import@^2.23.4: - version "2.24.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.24.2.tgz#2c8cd2e341f3885918ee27d18479910ade7bb4da" - integrity sha512-hNVtyhiEtZmpsabL4neEj+6M5DCLgpYyG9nzJY8lZQeQXEn5UPW1DpUdsMHMXsq98dbNm7nt1w9ZMSVpfJdi8Q== + version "2.25.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.2.tgz#b3b9160efddb702fc1636659e71ba1d10adbe9e9" + integrity sha512-qCwQr9TYfoBHOFcVGKY9C9unq05uOxxdklmBXLVvcwo68y5Hta6/GzCZEMx2zQiu0woKNEER0LE7ZgaOfBU14g== dependencies: - array-includes "^3.1.3" - array.prototype.flat "^1.2.4" + array-includes "^3.1.4" + array.prototype.flat "^1.2.5" debug "^2.6.9" doctrine "^2.1.0" eslint-import-resolver-node "^0.3.6" - eslint-module-utils "^2.6.2" - find-up "^2.0.0" + eslint-module-utils "^2.7.0" has "^1.0.3" - is-core-module "^2.6.0" + is-core-module "^2.7.0" + is-glob "^4.0.3" minimatch "^3.0.4" - object.values "^1.1.4" - pkg-up "^2.0.0" - read-pkg-up "^3.0.0" + object.values "^1.1.5" resolve "^1.20.0" tsconfig-paths "^3.11.0" @@ -4995,7 +5020,7 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== @@ -5052,6 +5077,14 @@ get-stream@^6.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -5331,6 +5364,13 @@ has-symbols@^1.0.1, has-symbols@^1.0.2: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has-unicode@^2.0.0, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -5664,6 +5704,15 @@ inquirer@^7.0.4: strip-ansi "^6.0.0" through "^2.3.6" +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + interpret@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -5722,6 +5771,11 @@ is-callable@^1.1.4, is-callable@^1.2.3: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== +is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" @@ -5736,14 +5790,7 @@ is-ci@^3.0.0: dependencies: ci-info "^3.1.1" -is-core-module@^2.1.0, is-core-module@^2.2.0, is-core-module@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.6.0.tgz#d7553b2526fe59b92ba3e40c8df757ec8a709e19" - integrity sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ== - dependencies: - has "^1.0.3" - -is-core-module@^2.5.0: +is-core-module@^2.1.0, is-core-module@^2.2.0, is-core-module@^2.5.0, is-core-module@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.7.0.tgz#3c0ef7d31b4acfc574f80c58409d568a836848e3" integrity sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ== @@ -5848,7 +5895,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -5917,11 +5964,24 @@ is-regex@^1.1.3: call-bind "^1.0.2" has-symbols "^1.0.2" +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= +is-shared-array-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" + integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== + is-ssh@^1.3.0: version "1.3.2" resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.2.tgz#a4b82ab63d73976fd8263cceee27f99a88bdae2b" @@ -5944,6 +6004,13 @@ is-string@^1.0.5, is-string@^1.0.6: resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== +is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" @@ -5968,6 +6035,13 @@ is-utf8@^0.2.0, is-utf8@^0.2.1: resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= +is-weakref@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.1.tgz#842dba4ec17fa9ac9850df2d6efbc1737274f2a2" + integrity sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ== + dependencies: + call-bind "^1.0.0" + is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -8074,6 +8148,11 @@ object-inspect@^1.10.3: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== +object-inspect@^1.11.0, object-inspect@^1.9.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" + integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== + object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -8111,14 +8190,14 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.4.tgz#0d273762833e816b693a637d30073e7051535b30" - integrity sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg== +object.values@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.2" + es-abstract "^1.19.1" octokit-pagination-methods@^1.1.0: version "1.1.0" @@ -8559,13 +8638,6 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" - integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= - dependencies: - find-up "^2.1.0" - please-upgrade-node@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" @@ -9243,6 +9315,15 @@ shelljs@^0.8.3: interpret "^1.0.0" rechoir "^0.6.2" +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" From 2494b80f407b0a0b0e897c816959c63fa37b8b79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 13:40:35 -0700 Subject: [PATCH 442/473] chore: bump eslint-plugin-jest from 25.0.5 to 25.0.6 (#4011) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 25.0.5 to 25.0.6. - [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/v25.0.5...v25.0.6) --- updated-dependencies: - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-patch ... 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 d87cb564ac7f..a708485318d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4363,9 +4363,9 @@ eslint-plugin-import@^2.23.4: tsconfig-paths "^3.11.0" eslint-plugin-jest@^25.0.5: - version "25.0.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-25.0.5.tgz#22b0f155aa68aa0932adda104c930c0b1a9ca6ca" - integrity sha512-fMVTvh/pgBHgEyJp643qRjqvyR3TAw3VIldYV0LltepKo4whYZ4oYlsplT0SIqjnclkuNN+PRr841XPMgaOswg== + version "25.0.6" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-25.0.6.tgz#75141c0ee60a5747d27b9920f3687d13a012cbb4" + integrity sha512-uXmY2P1iYew6m7ziAyrO6Ircb/r0161s9oxfR8G1HY65KTHm0RY6ohz95PxrW6eQnhqQ7dEk+WodzSdHBZZs3A== dependencies: "@typescript-eslint/experimental-utils" "^5.0.0" From 78420901d0d7f60bacca793e481cdc3b11cb23f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 13:40:46 -0700 Subject: [PATCH 443/473] chore: bump pretty-format from 27.2.4 to 27.2.5 (#4005) Bumps [pretty-format](https://github.com/facebook/jest/tree/HEAD/packages/pretty-format) from 27.2.4 to 27.2.5. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v27.2.5/packages/pretty-format) --- updated-dependencies: - dependency-name: pretty-format dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/yarn.lock b/yarn.lock index a708485318d6..1f61dbe86ffd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1111,18 +1111,7 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^27.0.2", "@jest/types@^27.0.6", "@jest/types@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.2.4.tgz#2430042a66e00dc5b140c3636f4474d464c21ee8" - integrity sha512-IDO2ezTxeMvQAHxzG/ZvEyA47q0aVfzT95rGFl7bZs/Go0aIucvfDbS2rmnoEdXxlLQhcolmoG/wvL/uKx4tKA== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - -"@jest/types@^27.2.5": +"@jest/types@^27.0.2", "@jest/types@^27.0.6", "@jest/types@^27.2.5": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.2.5.tgz#420765c052605e75686982d24b061b4cbba22132" integrity sha512-nmuM4VuDtCZcY+eTpw+0nvstwReMsjPoj7ZR80/BbixulhLaiX+fbv8oeLW8WZlJMcsGQsTmMKT/iTZu1Uy/lQ== @@ -8671,11 +8660,11 @@ prettier@2.3.2: integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6, pretty-format@^27.2.5: - version "27.2.4" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.4.tgz#08ea39c5eab41b082852d7093059a091f6ddc748" - integrity sha512-NUjw22WJHldzxyps2YjLZkUj6q1HvjqFezkB9Y2cklN8NtVZN/kZEXGZdFw4uny3oENzV5EEMESrkI0YDUH8vg== + version "27.2.5" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.5.tgz#7cfe2a8e8f01a5b5b29296a0b70f4140df0830c5" + integrity sha512-+nYn2z9GgicO9JiqmY25Xtq8SYfZ/5VCpEU3pppHHNAhd1y+ZXxmNPd1evmNcAd6Hz4iBV2kf0UpGth5A/VJ7g== dependencies: - "@jest/types" "^27.2.4" + "@jest/types" "^27.2.5" ansi-regex "^5.0.1" ansi-styles "^5.0.0" react-is "^17.0.1" From 880f17ea8baa94ae5eacbae99e1d4849469ccdf2 Mon Sep 17 00:00:00 2001 From: Parikshit Chavan <35219214+ParikshitChavan@users.noreply.github.com> Date: Mon, 18 Oct 2021 05:02:10 +0900 Subject: [PATCH 444/473] chore(eslint-plugin): [no-floating-promises] Make the error msg more descriptive (#4000) * fix(eslint-plugin): [no-floating-promises] Make the error msg more descriptive * chore(eslint-plugin): [no-floating-promises] Update error message * chore(eslint-plugin) Update packages/eslint-plugin/src/rules/no-floating-promises.ts Co-authored-by: Josh Goldberg Co-authored-by: Josh Goldberg Co-authored-by: Josh Goldberg --- packages/eslint-plugin/src/rules/no-floating-promises.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-floating-promises.ts b/packages/eslint-plugin/src/rules/no-floating-promises.ts index b1a88336e198..5687f08a06b1 100644 --- a/packages/eslint-plugin/src/rules/no-floating-promises.ts +++ b/packages/eslint-plugin/src/rules/no-floating-promises.ts @@ -28,10 +28,11 @@ export default util.createRule({ }, hasSuggestions: true, messages: { - floating: 'Promises must be handled appropriately.', + floating: + 'Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler.', floatingVoid: - 'Promises must be handled appropriately' + - ' or explicitly marked as ignored with the `void` operator.', + 'Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler' + + ' or be explicitly marked as ignored with the `void` operator.', floatingFixVoid: 'Add void operator to ignore.', }, schema: [ From c51eef1491edefd60f003de0ebf4fe363d7e96a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Oct 2021 13:02:43 -0700 Subject: [PATCH 445/473] chore: bump @microsoft/api-extractor from 7.18.12 to 7.18.16 (#4012) Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack) from 7.18.12 to 7.18.16. - [Release notes](https://github.com/microsoft/rushstack/releases) - [Commits](https://github.com/microsoft/rushstack/compare/@microsoft/api-extractor_v7.18.12...@microsoft/api-extractor_v7.18.16) --- updated-dependencies: - dependency-name: "@microsoft/api-extractor" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1f61dbe86ffd..979e3b6c3a71 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1807,26 +1807,26 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@microsoft/api-extractor-model@7.13.9": - version "7.13.9" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.9.tgz#018fb37ac0147595832e13db17509f6adafbad9c" - integrity sha512-t/XKTr8MlHRWgDr1fkyCzTQRR5XICf/WzIFs8yw1JLU8Olw99M3by4/dtpOZNskfqoW+J8NwOxovduU2csi4Ww== +"@microsoft/api-extractor-model@7.13.13": + version "7.13.13" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.13.tgz#5c1ac0fff0410b8f23478b15560b24096b8869c6" + integrity sha512-4Hz2TOL4TljsAfMQe7a8tm+Am8+AkrcgkbnH62S9YuaIC3Cw6jE4H2qP8WC2JJInWJP4pg/ZrUlHrtmtgrqn9Q== dependencies: "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.41.0" + "@rushstack/node-core-library" "3.42.3" "@microsoft/api-extractor@^7.15.2": - version "7.18.12" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.12.tgz#22644d43dd5c056fbc3d2db9fc692d67ed109e20" - integrity sha512-rFwsegenBjjce09uUr4wK9L9K5y1Lcm1eCHHKbI4w44ZoHdZOQlAGfl16I7pl0AEfkmhJUEcqWixRh07un3XJA== + version "7.18.16" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.16.tgz#c5e077e417938da7e7026124c51d34a90868e7bd" + integrity sha512-f0EcjGgS8IToUHxfQIr4vxGpBhUdaDOhGyddZpZ5K9e/GcGkImfkGeHpYbK043f2bZV3aagTx6NcIawwE72BKA== dependencies: - "@microsoft/api-extractor-model" "7.13.9" + "@microsoft/api-extractor-model" "7.13.13" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.41.0" - "@rushstack/rig-package" "0.3.1" - "@rushstack/ts-command-line" "4.10.0" + "@rushstack/node-core-library" "3.42.3" + "@rushstack/rig-package" "0.3.3" + "@rushstack/ts-command-line" "4.10.2" colors "~1.2.1" lodash "~4.17.15" resolve "~1.17.0" @@ -2100,10 +2100,10 @@ dependencies: "@types/node" ">= 8" -"@rushstack/node-core-library@3.41.0": - version "3.41.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.41.0.tgz#36f79ecf1a3c9b417690d95bbfcdf40390bf5f51" - integrity sha512-JxdmqR+SHU04jTDaZhltMZL3/XTz2ZZM47DTN+FSPUGUVp6WmxLlvJnT5FoHrOZWUjL/FoIlZUdUPTSXjTjIcg== +"@rushstack/node-core-library@3.42.3": + version "3.42.3" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.42.3.tgz#e9bc8aee4ba047d1858afcb7822b5aaf973b4fd8" + integrity sha512-xtiJsHtO4Sf/hVKyf/8d58p3zQh2JAZNs1mmDNCyIlgSRYGdqUkpadvvn5mz7EwF6lwn+xTTaTV5/a32xKjbdw== dependencies: "@types/node" "12.20.24" colors "~1.2.1" @@ -2115,18 +2115,18 @@ timsort "~0.3.0" z-schema "~3.18.3" -"@rushstack/rig-package@0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.1.tgz#b70ab9ffe3b6347eb799f5c6c5b6f5882039a60f" - integrity sha512-DXQmrPWOCNoE2zPzHCShE1y47FlgbAg48wpaY058Qo/yKDzL0GlEGf5Ra2NIt22pMcp0R/HHh+kZGbqTnF4CrA== +"@rushstack/rig-package@0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.3.tgz#6e291d181b2b9b114dd8e806e8389d999142d137" + integrity sha512-ElPnChxIkUzcU3ywI0Cl7E1aM+2w6vFpAwM6X+oWk7Cyjf2ofItThje9e5qUBtKqvI9sc5jVsHY1bRC8rVwOqQ== dependencies: resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.10.0": - version "4.10.0" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.10.0.tgz#6ddc939bb16410078379956dd97c14020b71b236" - integrity sha512-BRF7O4XQKmrZz8GZ6b/+0+4elrnY2kjZsLrUOJ1dwJZxAR0I1+G0/GD66RVPi0ku1qN4A6t+HrB5p2Nxc9ECrA== +"@rushstack/ts-command-line@4.10.2": + version "4.10.2" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.10.2.tgz#019d43d8428e243031c66aeac1f088687f6730f3" + integrity sha512-Weq8B7oJeCQ4ITsaVLhOQombipyg+idpkdkhA6UqLtKvuzq8zTtPpAfhP5ff5L+RCmo1CFCVOBE3i+MvzUR5vA== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" From a75d9c8b2938c942d263f01b14cc28531614baac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 18 Oct 2021 03:36:20 +0200 Subject: [PATCH 446/473] chore: update dependencies (#3859) --- .github/workflows/ci.yml | 28 - .markdownlint.json | 8 +- package.json | 70 +- packages/ast-spec/package.json | 2 +- .../eslint-plugin/docs/rules/no-type-alias.md | 20 +- packages/eslint-plugin/package.json | 8 +- packages/eslint-plugin/tests/docs.test.ts | 10 +- .../tests/rules/no-type-alias.test.ts | 54 +- packages/experimental-utils/package.json | 2 +- packages/parser/package.json | 2 +- packages/typescript-estree/package.json | 6 +- .../tests/ast-alignment/spec.ts | 2 +- .../tests/lib/node-utils.test.ts | 14 +- patches/eslint-plugin-import+2.24.2.patch | 14 - yarn.lock | 2490 ++++++----------- 15 files changed, 1026 insertions(+), 1704 deletions(-) delete mode 100644 patches/eslint-plugin-import+2.24.2.patch diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09e5a49fc8db..5acbec2c9c79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,10 +48,6 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts yarn check-clean-workspace-after-install - - name: Patch Dependencies - run: | - yarn patch-package - - name: Build run: | yarn build @@ -94,10 +90,6 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts yarn check-clean-workspace-after-install - - name: Patch Dependencies - run: | - yarn patch-package - - name: Build run: | yarn build @@ -176,10 +168,6 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts yarn check-clean-workspace-after-install - - name: Patch Dependencies - run: | - yarn patch-package - - name: Build run: | yarn build @@ -223,10 +211,6 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts yarn check-clean-workspace-after-install - - name: Patch Dependencies - run: | - yarn patch-package - - name: Build run: | yarn build @@ -269,10 +253,6 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts yarn check-clean-workspace-after-install - - name: Patch Dependencies - run: | - yarn patch-package - - name: Build run: | yarn build @@ -355,10 +335,6 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts yarn check-clean-workspace-after-install - - name: Patch Dependencies - run: | - yarn patch-package - - name: Build run: | yarn build @@ -402,10 +378,6 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts yarn check-clean-workspace-after-install - - name: Patch Dependencies - run: | - yarn patch-package - - name: Build run: | yarn build diff --git a/.markdownlint.json b/.markdownlint.json index 9dc1aa860029..a83e9dad63c1 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -92,7 +92,13 @@ "MD043": false, // MD044/proper-names - Proper names should have the correct capitalization "MD044": { - "names": ["JavaScript", "TypeScript", "TSLint", "ESLint"], + "names": [ + "JavaScript", + "TypeScript", + "TSLint", + "ESLint", + "typescript-eslint" + ], "code_blocks": false }, // MD045/no-alt-text - Images should have alternate text (alt text) diff --git a/package.json b/package.json index ce7f411e530d..cbf0f7c9e23d 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "lint-markdown-fix": "yarn lint-markdown --fix", "lint-markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore", "lint": "eslint . --ext .js,.ts", - "postinstall": "patch-package && yarn husky install && yarn build", + "postinstall": "yarn husky install && yarn build", "pre-commit": "yarn lint-staged", "pre-push": "yarn check-format", "test": "nx run-many --target=test --all --parallel", @@ -71,64 +71,62 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "devDependencies": { - "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.15.6", - "@babel/types": "^7.14.4", + "@babel/code-frame": "^7.14.5", + "@babel/parser": "^7.15.7", + "@babel/types": "^7.15.6", "@commitlint/cli": "^13.1.0", "@commitlint/config-conventional": "^13.1.0", "@commitlint/config-lerna-scopes": "^13.1.0", - "@nrwl/cli": "12.9.0", + "@nrwl/cli": "12.10.0", "@nrwl/nx-cloud": "12.3.13", - "@nrwl/tao": "12.9.0", - "@nrwl/workspace": "12.9.0", - "@types/babel__code-frame": "^7.0.2", - "@types/debug": "^4.1.5", + "@nrwl/tao": "12.10.0", + "@nrwl/workspace": "12.10.0", + "@types/babel__code-frame": "^7.0.3", + "@types/debug": "^4.1.7", "@types/eslint-visitor-keys": "^1.0.0", - "@types/glob": "^7.1.3", - "@types/is-glob": "^4.0.1", - "@types/jest": "^27.0.1", + "@types/glob": "^7.1.4", + "@types/is-glob": "^4.0.2", + "@types/jest": "^27.0.2", "@types/jest-specific-snapshot": "^0.5.5", - "@types/lodash": "^4.14.170", - "@types/marked": "^2.0.3", - "@types/node": "^15.6.1", - "@types/node-fetch": "^3.0.3", - "@types/prettier": "^2.2.3", - "@types/rimraf": "^3.0.0", - "@types/semver": "^7.3.6", - "@types/tmp": "^0.2.0", + "@types/lodash": "^4.14.172", + "@types/marked": "^2.0.5", + "@types/node": "^16.10.9", + "@types/prettier": "^2.3.2", + "@types/rimraf": "^3.0.2", + "@types/semver": "^7.3.8", + "@types/tmp": "^0.2.1", "all-contributors-cli": "^6.20.0", - "cspell": "^5.5.2", + "cspell": "^5.12.3", "cz-conventional-changelog": "^3.3.0", "downlevel-dts": "^0.7.0", - "enhanced-resolve": "^5.8.2", + "enhanced-resolve": "^5.8.3", "eslint": "^8.0.0", "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-eslint-plugin": "^3.0.3", - "eslint-plugin-import": "^2.23.4", + "eslint-plugin-eslint-plugin": "^3.6.1", + "eslint-plugin-import": "^2.25.2", "eslint-plugin-jest": "^25.0.5", "eslint-plugin-simple-import-sort": "^7.0.0", "glob": "^7.1.7", - "husky": "^7.0.1", - "jest": "^27.0.3", + "husky": "^7.0.2", + "jest": "^27.1.0", "jest-specific-snapshot": "^5.0.0", "lerna": "^3.22.1", - "lint-staged": "^11.0.0", + "lint-staged": "^11.1.2", "make-dir": "^3.1.0", - "markdownlint-cli": "^0.28.1", + "markdownlint-cli": "^0.29.0", "node-fetch": "^3.0.0", - "patch-package": "^6.4.7", - "prettier": "2.3.2", - "pretty-format": "^27.0.2", + "prettier": "2.4.1", + "pretty-format": "^27.2.5", "rimraf": "^3.0.2", - "ts-jest": "^27.0.1", - "ts-node": "^10.0.0", + "ts-jest": "^27.0.5", + "ts-node": "^10.2.1", "tslint": "^6.1.3", "typescript": ">=3.3.1 <4.5.0" }, "resolutions": { - "@types/node": "^15.6.1", + "@types/node": "^16.10.9", "jest-diff": "^27.0.0", - "pretty-format": "^27.0.0", - "typescript": "4.4.2" + "pretty-format": "^27.2.5", + "typescript": "4.4.4" } } diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 2d8aa0269d79..c08b098c97f6 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -41,7 +41,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "devDependencies": { - "@microsoft/api-extractor": "^7.15.2", + "@microsoft/api-extractor": "^7.18.16", "typescript": "*" } } diff --git a/packages/eslint-plugin/docs/rules/no-type-alias.md b/packages/eslint-plugin/docs/rules/no-type-alias.md index a3b61f1da446..76bde791a8f9 100644 --- a/packages/eslint-plugin/docs/rules/no-type-alias.md +++ b/packages/eslint-plugin/docs/rules/no-type-alias.md @@ -406,8 +406,9 @@ type Foo = type Foo = { [P in keyof T]?: T[P] } | { [P in keyof U]?: U[P] }; -type Foo = { readonly [P in keyof T]: T[P] } & - { readonly [P in keyof U]: U[P] }; +type Foo = { readonly [P in keyof T]: T[P] } & { + readonly [P in keyof U]: U[P]; +}; type Foo = { [P in keyof T]?: T[P] } & { [P in keyof U]?: U[P] }; ``` @@ -419,8 +420,9 @@ type Foo = { readonly [P in keyof T]: T[P] }; type Foo = { [P in keyof T]?: T[P] }; -type Foo = { readonly [P in keyof T]: T[P] } & - { readonly [P in keyof U]: U[P] }; +type Foo = { readonly [P in keyof T]: T[P] } & { + readonly [P in keyof U]: U[P]; +}; type Foo = { [P in keyof T]?: T[P] } & { [P in keyof U]?: U[P] }; ``` @@ -452,8 +454,9 @@ type Foo = { [P in keyof T]?: T[P] } | { [P in keyof U]?: U[P] }; Examples of **correct** code for the `{ "allowMappedTypes": "in-intersections" }` option: ```ts -type Foo = { readonly [P in keyof T]: T[P] } & - { readonly [P in keyof U]: U[P] }; +type Foo = { readonly [P in keyof T]: T[P] } & { + readonly [P in keyof U]: U[P]; +}; type Foo = { [P in keyof T]?: T[P] } & { [P in keyof U]?: U[P] }; ``` @@ -475,8 +478,9 @@ type Foo = type Foo = { [P in keyof T]?: T[P] } | { [P in keyof U]?: U[P] }; -type Foo = { readonly [P in keyof T]: T[P] } & - { readonly [P in keyof U]: U[P] }; +type Foo = { readonly [P in keyof T]: T[P] } & { + readonly [P in keyof U]: U[P]; +}; type Foo = { [P in keyof T]?: T[P] } & { [P in keyof U]?: U[P] }; ``` diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index f49ea2c65daf..445da28ce5f4 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -46,10 +46,10 @@ "dependencies": { "@typescript-eslint/experimental-utils": "5.0.0", "@typescript-eslint/scope-manager": "5.0.0", - "debug": "^4.3.1", + "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", - "regexpp": "^3.1.0", + "regexpp": "^3.2.0", "semver": "^7.3.5", "tsutils": "^3.21.0" }, @@ -57,8 +57,8 @@ "@types/debug": "*", "@types/marked": "*", "@types/prettier": "*", - "chalk": "^4.1.1", - "marked": "^2.0.6", + "chalk": "^4.1.2", + "marked": "^2.1.3", "prettier": "*", "typescript": "*" }, diff --git a/packages/eslint-plugin/tests/docs.test.ts b/packages/eslint-plugin/tests/docs.test.ts index ceaf83d6680a..f8aa38132a4d 100644 --- a/packages/eslint-plugin/tests/docs.test.ts +++ b/packages/eslint-plugin/tests/docs.test.ts @@ -149,27 +149,27 @@ describe('Validating README.md', () => { } it('Link column should be correct', () => { - expect(ruleRow[0]).toEqual(createRuleLink(ruleName)); + expect(ruleRow[0]).toBe(createRuleLink(ruleName)); }); it('Description column should be correct', () => { - expect(ruleRow[1]).toEqual(rule.meta.docs?.description); + expect(ruleRow[1]).toBe(rule.meta.docs?.description); }); it('Recommended column should be correct', () => { - expect(ruleRow[2]).toEqual( + expect(ruleRow[2]).toBe( rule.meta.docs?.recommended ? ':white_check_mark:' : '', ); }); it('Fixable column should be correct', () => { - expect(ruleRow[3]).toEqual( + expect(ruleRow[3]).toBe( rule.meta.fixable !== undefined ? ':wrench:' : '', ); }); it('Requiring type information column should be correct', () => { - expect(ruleRow[4]).toEqual( + expect(ruleRow[4]).toBe( rule.meta.docs?.requiresTypeChecking === true ? ':thought_balloon:' : '', diff --git a/packages/eslint-plugin/tests/rules/no-type-alias.test.ts b/packages/eslint-plugin/tests/rules/no-type-alias.test.ts index 06d06f7672ec..f0da2160b632 100644 --- a/packages/eslint-plugin/tests/rules/no-type-alias.test.ts +++ b/packages/eslint-plugin/tests/rules/no-type-alias.test.ts @@ -341,10 +341,9 @@ type Foo = code: ` type Foo = { readonly [P in keyof T]: T[P]; -} & - { - readonly [P in keyof T]: T[P]; - }; +} & { + readonly [P in keyof T]: T[P]; +}; `, options: [{ allowMappedTypes: 'always' }], }, @@ -352,10 +351,9 @@ type Foo = { code: ` type Foo = { readonly [P in keyof T]: T[P]; -} & - { - readonly [P in keyof T]: T[P]; - }; +} & { + readonly [P in keyof T]: T[P]; +}; `, options: [{ allowMappedTypes: 'in-unions-and-intersections' }], }, @@ -363,10 +361,9 @@ type Foo = { code: ` type Foo = { readonly [P in keyof T]: T[P]; -} & - { - readonly [P in keyof T]: T[P]; - }; +} & { + readonly [P in keyof T]: T[P]; +}; `, options: [{ allowMappedTypes: 'in-intersections' }], }, @@ -2968,10 +2965,9 @@ type Foo = code: ` type Foo = { readonly [P in keyof T]: T[P]; -} & - { - readonly [P in keyof T]: T[P]; - }; +} & { + readonly [P in keyof T]: T[P]; +}; `, errors: [ { @@ -2989,8 +2985,8 @@ type Foo = { typeName: 'Mapped types', compositionType: 'intersection', }, - line: 5, - column: 3, + line: 4, + column: 5, }, ], }, @@ -2998,10 +2994,9 @@ type Foo = { code: ` type Foo = { readonly [P in keyof T]: T[P]; -} & - { - readonly [P in keyof T]: T[P]; - }; +} & { + readonly [P in keyof T]: T[P]; +}; `, options: [{ allowMappedTypes: 'never' }], errors: [ @@ -3020,8 +3015,8 @@ type Foo = { typeName: 'Mapped types', compositionType: 'intersection', }, - line: 5, - column: 3, + line: 4, + column: 5, }, ], }, @@ -3029,10 +3024,9 @@ type Foo = { code: ` type Foo = { readonly [P in keyof T]: T[P]; -} & - { - readonly [P in keyof T]: T[P]; - }; +} & { + readonly [P in keyof T]: T[P]; +}; `, options: [{ allowMappedTypes: 'in-unions' }], errors: [ @@ -3051,8 +3045,8 @@ type Foo = { typeName: 'Mapped types', compositionType: 'intersection', }, - line: 5, - column: 3, + line: 4, + column: 5, }, ], }, diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 820da1ffc8db..92da68df9b65 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -39,7 +39,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@types/json-schema": "^7.0.7", + "@types/json-schema": "^7.0.9", "@typescript-eslint/scope-manager": "5.0.0", "@typescript-eslint/types": "5.0.0", "@typescript-eslint/typescript-estree": "5.0.0", diff --git a/packages/parser/package.json b/packages/parser/package.json index efa2212665c1..95eb1ac7048e 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -47,7 +47,7 @@ "@typescript-eslint/scope-manager": "5.0.0", "@typescript-eslint/types": "5.0.0", "@typescript-eslint/typescript-estree": "5.0.0", - "debug": "^4.3.1" + "debug": "^4.3.2" }, "devDependencies": { "@types/glob": "*", diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index ee54a5dbd14f..3a87418410ac 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -43,9 +43,9 @@ "dependencies": { "@typescript-eslint/types": "5.0.0", "@typescript-eslint/visitor-keys": "5.0.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", "semver": "^7.3.5", "tsutils": "^3.21.0" }, diff --git a/packages/typescript-estree/tests/ast-alignment/spec.ts b/packages/typescript-estree/tests/ast-alignment/spec.ts index 8af9996fc9d6..57ab33710bee 100644 --- a/packages/typescript-estree/tests/ast-alignment/spec.ts +++ b/packages/typescript-estree/tests/ast-alignment/spec.ts @@ -48,7 +48,7 @@ fixturesToTest.forEach(fixture => { * E.g. Both must be a SyntaxError, or both must be a RangeError etc. */ it(`[Both parsers error as expected] - ${filename}`, () => { - expect(babelParserResult.parseError.name).toEqual( + expect(babelParserResult.parseError.name).toBe( typeScriptESTreeResult.parseError.name, ); }); diff --git a/packages/typescript-estree/tests/lib/node-utils.test.ts b/packages/typescript-estree/tests/lib/node-utils.test.ts index 8eea4c219f4c..a315d44de3ab 100644 --- a/packages/typescript-estree/tests/lib/node-utils.test.ts +++ b/packages/typescript-estree/tests/lib/node-utils.test.ts @@ -3,17 +3,17 @@ import { unescapeStringLiteralText } from '../../src/node-utils'; describe('unescapeStringLiteralText()', () => { it('should not modify content', () => { let text = 'amp;'; - expect(unescapeStringLiteralText(text)).toEqual(text); + expect(unescapeStringLiteralText(text)).toBe(text); text = 'test'; - expect(unescapeStringLiteralText(text)).toEqual(text); + expect(unescapeStringLiteralText(text)).toBe(text); text = 'foo&bar&baz;'; - expect(unescapeStringLiteralText(text)).toEqual(text); + expect(unescapeStringLiteralText(text)).toBe(text); text = 'foo&bar&baz;'; - expect(unescapeStringLiteralText(text)).toEqual(text); + expect(unescapeStringLiteralText(text)).toBe(text); text = '¬listed;'; - expect(unescapeStringLiteralText(text)).toEqual(text); + expect(unescapeStringLiteralText(text)).toBe(text); text = '\u20ac'; - expect(unescapeStringLiteralText(text)).toEqual(text); + expect(unescapeStringLiteralText(text)).toBe(text); }); it('should handle empty string', () => { expect(unescapeStringLiteralText('')).toBe(''); @@ -29,7 +29,7 @@ describe('unescapeStringLiteralText()', () => { '&=123&lang=en&,&', ); expect(unescapeStringLiteralText('')).toBe('\u0001'); - expect(unescapeStringLiteralText('!')).toBe(`!`); + expect(unescapeStringLiteralText('!')).toBe('!'); expect(unescapeStringLiteralText('�')).toBe('\u0000'); expect(unescapeStringLiteralText('Œ')).toBe('\u0152'); expect(unescapeStringLiteralText('œ')).toBe('\u0153'); diff --git a/patches/eslint-plugin-import+2.24.2.patch b/patches/eslint-plugin-import+2.24.2.patch deleted file mode 100644 index 6157ff155586..000000000000 --- a/patches/eslint-plugin-import+2.24.2.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/node_modules/eslint-plugin-import/lib/index.js b/node_modules/eslint-plugin-import/lib/index.js -index 247818e..1b42a54 100644 ---- a/node_modules/eslint-plugin-import/lib/index.js -+++ b/node_modules/eslint-plugin-import/lib/index.js -@@ -19,7 +19,8 @@ - 'no-named-as-default': require('./rules/no-named-as-default'), - 'no-named-as-default-member': require('./rules/no-named-as-default-member'), - 'no-anonymous-default-export': require('./rules/no-anonymous-default-export'), -- 'no-unused-modules': require('./rules/no-unused-modules'), -+ // temporarily removed for the v8 migration as it crashes the lint run -+ // 'no-unused-modules': require('./rules/no-unused-modules'), - - 'no-commonjs': require('./rules/no-commonjs'), - 'no-amd': require('./rules/no-amd'), diff --git a/yarn.lock b/yarn.lock index 979e3b6c3a71..0b8ce3dd57ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,32 +2,32 @@ # yarn lockfile v1 -"@babel/code-frame@*", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": +"@babel/code-frame@*", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5", "@babel/code-frame@^7.15.8": version "7.15.8" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.15.8.tgz#45990c47adadb00c03677baa89221f7cc23d2503" integrity sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg== dependencies: "@babel/highlight" "^7.14.5" -"@babel/compat-data@^7.14.4": - version "7.14.4" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.4.tgz#45720fe0cecf3fd42019e1d12cc3d27fadc98d58" - integrity sha512-i2wXrWQNkH6JplJQGn3Rd2I4Pij8GdHkXwHMxm+zV5YG/Jci+bCNrWZEWC4o+umiDkRrRs4dVzH3X4GP7vyjQQ== +"@babel/compat-data@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" + integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA== "@babel/core@^7.1.0", "@babel/core@^7.7.2", "@babel/core@^7.7.5": - version "7.14.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.3.tgz#5395e30405f0776067fbd9cf0884f15bfb770a38" - integrity sha512-jB5AmTKOCSJIZ72sd78ECEhuPiDMKlQdDI/4QRI6lzYATx5SSogS1oQA2AoPecRCknm30gHi2l+QVvNUu3wZAg== - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.14.3" - "@babel/helper-compilation-targets" "^7.13.16" - "@babel/helper-module-transforms" "^7.14.2" - "@babel/helpers" "^7.14.0" - "@babel/parser" "^7.14.3" - "@babel/template" "^7.12.13" - "@babel/traverse" "^7.14.2" - "@babel/types" "^7.14.2" + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.8.tgz#195b9f2bffe995d2c6c159e72fe525b4114e8c10" + integrity sha512-3UG9dsxvYBMYwRv+gS41WKHno4K60/9GPy1CJaH6xy3Elq8CTtvtjT5R5jmNhXfCYLX2mTw+7/aq5ak/gOE0og== + dependencies: + "@babel/code-frame" "^7.15.8" + "@babel/generator" "^7.15.8" + "@babel/helper-compilation-targets" "^7.15.4" + "@babel/helper-module-transforms" "^7.15.8" + "@babel/helpers" "^7.15.4" + "@babel/parser" "^7.15.8" + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.6" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -35,123 +35,130 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/generator@^7.14.2", "@babel/generator@^7.14.3", "@babel/generator@^7.7.2": - version "7.14.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.3.tgz#0c2652d91f7bddab7cccc6ba8157e4f40dcedb91" - integrity sha512-bn0S6flG/j0xtQdz3hsjJ624h3W0r3llttBMfyHX3YrZ/KtLYr15bjA0FXkgW7FpvrDuTuElXeVjiKlYRpnOFA== +"@babel/generator@^7.15.4", "@babel/generator@^7.15.8", "@babel/generator@^7.7.2": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.8.tgz#fa56be6b596952ceb231048cf84ee499a19c0cd1" + integrity sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g== dependencies: - "@babel/types" "^7.14.2" + "@babel/types" "^7.15.6" jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-compilation-targets@^7.13.16": - version "7.14.4" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.4.tgz#33ebd0ffc34248051ee2089350a929ab02f2a516" - integrity sha512-JgdzOYZ/qGaKTVkn5qEDV/SXAh8KcyUVkCoSWGN8T3bwrgd6m+/dJa2kVGi6RJYJgEYPBdZ84BZp9dUjNWkBaA== +"@babel/helper-compilation-targets@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz#cf6d94f30fbefc139123e27dd6b02f65aeedb7b9" + integrity sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ== dependencies: - "@babel/compat-data" "^7.14.4" - "@babel/helper-validator-option" "^7.12.17" + "@babel/compat-data" "^7.15.0" + "@babel/helper-validator-option" "^7.14.5" browserslist "^4.16.6" semver "^6.3.0" -"@babel/helper-function-name@^7.14.2": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.14.2.tgz#397688b590760b6ef7725b5f0860c82427ebaac2" - integrity sha512-NYZlkZRydxw+YT56IlhIcS8PAhb+FEUiOzuhFTfqDyPmzAhRge6ua0dQYT/Uh0t/EDHq05/i+e5M2d4XvjgarQ== +"@babel/helper-function-name@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz#845744dafc4381a4a5fb6afa6c3d36f98a787ebc" + integrity sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw== dependencies: - "@babel/helper-get-function-arity" "^7.12.13" - "@babel/template" "^7.12.13" - "@babel/types" "^7.14.2" + "@babel/helper-get-function-arity" "^7.15.4" + "@babel/template" "^7.15.4" + "@babel/types" "^7.15.4" -"@babel/helper-get-function-arity@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz#bc63451d403a3b3082b97e1d8b3fe5bd4091e583" - integrity sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg== +"@babel/helper-get-function-arity@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz#098818934a137fce78b536a3e015864be1e2879b" + integrity sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA== dependencies: - "@babel/types" "^7.12.13" + "@babel/types" "^7.15.4" -"@babel/helper-member-expression-to-functions@^7.13.12": - version "7.13.12" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz#dfe368f26d426a07299d8d6513821768216e6d72" - integrity sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw== +"@babel/helper-hoist-variables@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz#09993a3259c0e918f99d104261dfdfc033f178df" + integrity sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA== dependencies: - "@babel/types" "^7.13.12" + "@babel/types" "^7.15.4" -"@babel/helper-module-imports@^7.13.12": - version "7.13.12" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz#c6a369a6f3621cb25da014078684da9196b61977" - integrity sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA== +"@babel/helper-member-expression-to-functions@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz#bfd34dc9bba9824a4658b0317ec2fd571a51e6ef" + integrity sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA== dependencies: - "@babel/types" "^7.13.12" + "@babel/types" "^7.15.4" -"@babel/helper-module-transforms@^7.14.2": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.14.2.tgz#ac1cc30ee47b945e3e0c4db12fa0c5389509dfe5" - integrity sha512-OznJUda/soKXv0XhpvzGWDnml4Qnwp16GN+D/kZIdLsWoHj05kyu8Rm5kXmMef+rVJZ0+4pSGLkeixdqNUATDA== - dependencies: - "@babel/helper-module-imports" "^7.13.12" - "@babel/helper-replace-supers" "^7.13.12" - "@babel/helper-simple-access" "^7.13.12" - "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/helper-validator-identifier" "^7.14.0" - "@babel/template" "^7.12.13" - "@babel/traverse" "^7.14.2" - "@babel/types" "^7.14.2" - -"@babel/helper-optimise-call-expression@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz#5c02d171b4c8615b1e7163f888c1c81c30a2aaea" - integrity sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA== +"@babel/helper-module-imports@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz#e18007d230632dea19b47853b984476e7b4e103f" + integrity sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA== dependencies: - "@babel/types" "^7.12.13" + "@babel/types" "^7.15.4" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.8.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz#806526ce125aed03373bc416a828321e3a6a33af" - integrity sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ== +"@babel/helper-module-transforms@^7.15.8": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.8.tgz#d8c0e75a87a52e374a8f25f855174786a09498b2" + integrity sha512-DfAfA6PfpG8t4S6npwzLvTUpp0sS7JrcuaMiy1Y5645laRJIp/LiLGIBbQKaXSInK8tiGNI7FL7L8UvB8gdUZg== + dependencies: + "@babel/helper-module-imports" "^7.15.4" + "@babel/helper-replace-supers" "^7.15.4" + "@babel/helper-simple-access" "^7.15.4" + "@babel/helper-split-export-declaration" "^7.15.4" + "@babel/helper-validator-identifier" "^7.15.7" + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.6" + +"@babel/helper-optimise-call-expression@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz#f310a5121a3b9cc52d9ab19122bd729822dee171" + integrity sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" + integrity sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ== -"@babel/helper-replace-supers@^7.13.12": - version "7.14.4" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.14.4.tgz#b2ab16875deecfff3ddfcd539bc315f72998d836" - integrity sha512-zZ7uHCWlxfEAAOVDYQpEf/uyi1dmeC7fX4nCf2iz9drnCwi1zvwXL3HwWWNXUQEJ1k23yVn3VbddiI9iJEXaTQ== +"@babel/helper-replace-supers@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz#52a8ab26ba918c7f6dee28628b07071ac7b7347a" + integrity sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw== dependencies: - "@babel/helper-member-expression-to-functions" "^7.13.12" - "@babel/helper-optimise-call-expression" "^7.12.13" - "@babel/traverse" "^7.14.2" - "@babel/types" "^7.14.4" + "@babel/helper-member-expression-to-functions" "^7.15.4" + "@babel/helper-optimise-call-expression" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.4" -"@babel/helper-simple-access@^7.13.12": - version "7.13.12" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz#dd6c538afb61819d205a012c31792a39c7a5eaf6" - integrity sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA== +"@babel/helper-simple-access@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz#ac368905abf1de8e9781434b635d8f8674bcc13b" + integrity sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg== dependencies: - "@babel/types" "^7.13.12" + "@babel/types" "^7.15.4" -"@babel/helper-split-export-declaration@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz#e9430be00baf3e88b0e13e6f9d4eaf2136372b05" - integrity sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg== +"@babel/helper-split-export-declaration@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz#aecab92dcdbef6a10aa3b62ab204b085f776e257" + integrity sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw== dependencies: - "@babel/types" "^7.12.13" + "@babel/types" "^7.15.4" -"@babel/helper-validator-identifier@^7.14.0", "@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" - integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== +"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9", "@babel/helper-validator-identifier@^7.15.7": + version "7.15.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" + integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== -"@babel/helper-validator-option@^7.12.17": - version "7.12.17" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz#d1fbf012e1a79b7eebbfdc6d270baaf8d9eb9831" - integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== +"@babel/helper-validator-option@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" + integrity sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow== -"@babel/helpers@^7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.0.tgz#ea9b6be9478a13d6f961dbb5f36bf75e2f3b8f62" - integrity sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg== +"@babel/helpers@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.15.4.tgz#5f40f02050a3027121a3cf48d497c05c555eaf43" + integrity sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ== dependencies: - "@babel/template" "^7.12.13" - "@babel/traverse" "^7.14.0" - "@babel/types" "^7.14.0" + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.4" "@babel/highlight@^7.14.5": version "7.14.5" @@ -162,15 +169,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@*", "@babel/parser@^7.15.6": - version "7.15.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.6.tgz#043b9aa3c303c0722e5377fef9197f4cf1796549" - integrity sha512-S/TSCcsRuCkmpUuoWijua0Snt+f3ewU/8spLo+4AXJCZfT0bVCzLD5MuOKdrx0mlAptbKzn5AdgEIIKXxXkz9Q== - -"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.14.2", "@babel/parser@^7.14.3", "@babel/parser@^7.7.2": - version "7.14.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.4.tgz#a5c560d6db6cd8e6ed342368dea8039232cbab18" - integrity sha512-ArliyUsWDUqEGfWcmzpGUzNfLxTdTp6WU4IuP6QFSp9gGfWS6boxFCkJSJ/L4+RG8z/FnIU3WxCk6hPL9SSWeA== +"@babel/parser@*", "@babel/parser@^7.1.0", "@babel/parser@^7.15.4", "@babel/parser@^7.15.7", "@babel/parser@^7.15.8", "@babel/parser@^7.7.2": + version "7.15.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.8.tgz#7bacdcbe71bdc3ff936d510c15dcea7cf0b99016" + integrity sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -250,50 +252,51 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-top-level-await@^7.8.3": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz#c5f0fa6e249f5b739727f923540cf7a806130178" - integrity sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ== + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== dependencies: - "@babel/helper-plugin-utils" "^7.12.13" + "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.13.tgz#9dff111ca64154cef0f4dc52cf843d9f12ce4474" - integrity sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w== + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.14.5.tgz#b82c6ce471b165b5ce420cf92914d6fb46225716" + integrity sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q== dependencies: - "@babel/helper-plugin-utils" "^7.12.13" + "@babel/helper-plugin-utils" "^7.14.5" -"@babel/runtime@^7.11.0", "@babel/runtime@^7.7.6": - version "7.13.10" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.10.tgz#47d42a57b6095f4468da440388fdbad8bebf0d7d" - integrity sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw== +"@babel/runtime@^7.14.6", "@babel/runtime@^7.7.6": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a" + integrity sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw== dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.12.13", "@babel/template@^7.3.3": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" - integrity sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA== - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/parser" "^7.12.13" - "@babel/types" "^7.12.13" - -"@babel/traverse@^7.1.0", "@babel/traverse@^7.14.0", "@babel/traverse@^7.14.2", "@babel/traverse@^7.7.2": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.2.tgz#9201a8d912723a831c2679c7ebbf2fe1416d765b" - integrity sha512-TsdRgvBFHMyHOOzcP9S6QU0QQtjxlRpEYOy3mcCO5RgmC305ki42aSAmfZEMSSYBla2oZ9BMqYlncBaKmD/7iA== - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.14.2" - "@babel/helper-function-name" "^7.14.2" - "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/parser" "^7.14.2" - "@babel/types" "^7.14.2" +"@babel/template@^7.15.4", "@babel/template@^7.3.3": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.15.4.tgz#51898d35dcf3faa670c4ee6afcfd517ee139f194" + integrity sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/parser" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/traverse@^7.1.0", "@babel/traverse@^7.15.4", "@babel/traverse@^7.7.2": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.15.4.tgz#ff8510367a144bfbff552d9e18e28f3e2889c22d" + integrity sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/generator" "^7.15.4" + "@babel/helper-function-name" "^7.15.4" + "@babel/helper-hoist-variables" "^7.15.4" + "@babel/helper-split-export-declaration" "^7.15.4" + "@babel/parser" "^7.15.4" + "@babel/types" "^7.15.4" debug "^4.1.0" globals "^11.1.0" -"@babel/types@*", "@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.12", "@babel/types@^7.14.0", "@babel/types@^7.14.2", "@babel/types@^7.14.4", "@babel/types@^7.3.0", "@babel/types@^7.3.3": +"@babel/types@*", "@babel/types@^7.0.0", "@babel/types@^7.15.4", "@babel/types@^7.15.6", "@babel/types@^7.3.0", "@babel/types@^7.3.3": version "7.15.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.6.tgz#99abdc48218b2881c058dd0a7ab05b99c9be758f" integrity sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig== @@ -548,9 +551,9 @@ integrity sha512-mn9bd7Et1L2zuibc08GVHTiD2Go3/hdjyX5KLukXDklBkq06r+tb0OtKtf1zKodtFDTIaYekGADhNhA6AnKLkg== "@cspell/dict-dotnet@^1.0.31": - version "1.0.31" - resolved "https://registry.yarnpkg.com/@cspell/dict-dotnet/-/dict-dotnet-1.0.31.tgz#31d2f2602ddd6be038e00148860162d2b44d56e0" - integrity sha512-65yZTMcEdYkNx9sNs18OxcE0zfbZ5VsAZ0KgDvl/1YCkTomxr9vmtnrzFz4+vxfjV4eSuaL1SPRMZODaM7SSTg== + version "1.0.32" + resolved "https://registry.yarnpkg.com/@cspell/dict-dotnet/-/dict-dotnet-1.0.32.tgz#412af0bf1f65c5902c8ef8a4f1decae2892790e2" + integrity sha512-9H9vXrgJB4KF8xsyTToXO53cXD33iyfrpT4mhCds+YLUw3P3x3E9myszgJzshnrxYBvQZ+QMII57Qr6SjZVk4Q== "@cspell/dict-elixir@^1.0.25": version "1.0.25" @@ -638,9 +641,9 @@ integrity sha512-vHCqETX1idT9tN1plkxUFnXMIHjbbrNOINZh1PYSvVlBrOdahSaL/g6dOJZC5QTaaidoU4WXUlgnNb/7JN4Plg== "@cspell/dict-powershell@^1.0.18": - version "1.0.18" - resolved "https://registry.yarnpkg.com/@cspell/dict-powershell/-/dict-powershell-1.0.18.tgz#c744629a168df008641ed074633a548390bac98f" - integrity sha512-LAfCJBy1hga8/KI/IpAg/GrnoP+b4SbNGdiXiXrejeZ7ZTVfj4qYsTCkZ2p7eYUu92FLyJT4jGex0fGZn/PtVw== + version "1.0.19" + resolved "https://registry.yarnpkg.com/@cspell/dict-powershell/-/dict-powershell-1.0.19.tgz#b50d14b3b20e33f86b80318ccd7ef986ecba2549" + integrity sha512-zF/raM/lkhXeHf4I43OtK0gP9rBeEJFArscTVwLWOCIvNk21MJcNoTYoaGw+c056+Q+hJL0psGLO7QN+mxYH1A== "@cspell/dict-public-licenses@^1.0.3": version "1.0.3" @@ -648,9 +651,9 @@ integrity sha512-sXjxOHJ9Q4rZvE1UbwpwJQ8EXO3fadKBjJIWmz0z+dZAbvTrmz5Ln1Ef9ruJvLPfwAps8m3TCV6Diz60RAQqHg== "@cspell/dict-python@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@cspell/dict-python/-/dict-python-2.0.3.tgz#c0d98903c1242a621d89162e82583597541c08cc" - integrity sha512-b15Dk/nDzeB5mbTSXx4RGKgmM9AW5BpaHyZoUZNUOdPfQbcd02hVblro/MXMw45SvQ3Wr/VFJx32skwuRkvFPg== + version "2.0.4" + resolved "https://registry.yarnpkg.com/@cspell/dict-python/-/dict-python-2.0.4.tgz#9c2dc78445ef731b618386628bec8ae9fafa63b7" + integrity sha512-71X/VnyFPm6OPEkqmoVXCJz28RvBgktxy6zF6D5TLt97LbWg2JyRrWSXaf2+seVoLnJQ5CHACxcs+jyEyLhBJA== "@cspell/dict-ruby@^1.0.14": version "1.0.14" @@ -699,10 +702,10 @@ ts-node "^9" tslib "^2" -"@eslint/eslintrc@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.2.tgz#6044884f7f93c4ecc2d1694c7486cce91ef8f746" - integrity sha512-x1ZXdEFsvTcnbTZgqcWUL9w2ybgZCw/qbKTPQnab+XnYA2bMQpJCh+/bBzCRfDJaJdlrrQlOk49jNtru9gL/6Q== +"@eslint/eslintrc@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.3.tgz#41f08c597025605f672251dcc4e8be66b5ed7366" + integrity sha512-DHI1wDPoKCBPoLZA3qDR91+3te/wDSc1YhKg3jR8NxKKRJq2hwHwcWv31cSwSYvIBrmbENoYMWcenW8uproQqg== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -814,23 +817,11 @@ resolve-from "^5.0.0" "@istanbuljs/schema@^0.1.2": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" - integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== - -"@jest/console@^27.0.6": - version "27.0.6" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.0.6.tgz#3eb72ea80897495c3d73dd97aab7f26770e2260f" - integrity sha512-fMlIBocSHPZ3JxgWiDNW/KPj6s+YRd0hicb33IrmelCcjXo/pXPwvuiKFmZz+XuqI/1u7nbUK10zSsWL/1aegg== - dependencies: - "@jest/types" "^27.0.6" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^27.0.6" - jest-util "^27.0.6" - slash "^3.0.0" + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^27.2.5": +"@jest/console@^27.2.2", "@jest/console@^27.2.5": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.2.5.tgz#bddbf8d41c191f17b52bf0c9e6c0d18605e35d6e" integrity sha512-smtlRF9vNKorRMCUtJ+yllIoiY8oFmfFG7xlzsAE76nKEwXNhjPOJIsc7Dv+AUitVt76t+KjIpUP9m98Crn2LQ== @@ -876,16 +867,6 @@ slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^27.0.6": - version "27.0.6" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.0.6.tgz#ee293fe996db01d7d663b8108fa0e1ff436219d2" - integrity sha512-4XywtdhwZwCpPJ/qfAkqExRsERW+UaoSRStSHCCiQTUpoYdLukj+YJbQSFrZjhlUDRZeNiU9SFH0u7iNimdiIg== - dependencies: - "@jest/fake-timers" "^27.0.6" - "@jest/types" "^27.0.6" - "@types/node" "*" - jest-mock "^27.0.6" - "@jest/environment@^27.2.5": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.2.5.tgz#b85517ccfcec55690c82c56f5a01a3b30c5e3c84" @@ -896,18 +877,6 @@ "@types/node" "*" jest-mock "^27.2.5" -"@jest/fake-timers@^27.0.6": - version "27.0.6" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.0.6.tgz#cbad52f3fe6abe30e7acb8cd5fa3466b9588e3df" - integrity sha512-sqd+xTWtZ94l3yWDKnRTdvTeZ+A/V7SSKrxsrOKSqdyddb9CeNRF8fbhAU0D7ZJBpTTW2nbp6MftmKJDZfW2LQ== - dependencies: - "@jest/types" "^27.0.6" - "@sinonjs/fake-timers" "^7.0.2" - "@types/node" "*" - jest-message-util "^27.0.6" - jest-mock "^27.0.6" - jest-util "^27.0.6" - "@jest/fake-timers@^27.2.5": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.2.5.tgz#0c7e5762d7bfe6e269e7b49279b097a52a42f0a0" @@ -920,15 +889,6 @@ jest-mock "^27.2.5" jest-util "^27.2.5" -"@jest/globals@^27.0.6": - version "27.0.6" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.0.6.tgz#48e3903f99a4650673d8657334d13c9caf0e8f82" - integrity sha512-DdTGCP606rh9bjkdQ7VvChV18iS7q0IMJVP1piwTWyWskol4iqcVwthZmoJEf7obE1nc34OpIyoVGPeqLC+ryw== - dependencies: - "@jest/environment" "^27.0.6" - "@jest/types" "^27.0.6" - expect "^27.0.6" - "@jest/globals@^27.2.5": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.5.tgz#4115538f98ed6cee4051a90fdbd0854062902099" @@ -938,16 +898,16 @@ "@jest/types" "^27.2.5" expect "^27.2.5" -"@jest/reporters@27.0.6": - version "27.0.6" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.6.tgz#91e7f2d98c002ad5df94d5b5167c1eb0b9fd5b00" - integrity sha512-TIkBt09Cb2gptji3yJXb3EE+eVltW6BjO7frO7NEfjI9vSIYoISi5R3aI3KpEDXlB1xwB+97NXIqz84qYeYsfA== +"@jest/reporters@27.2.2": + version "27.2.2" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.2.tgz#e2d41cd9f8088676b81b9a9908cb1ba67bdbee78" + integrity sha512-ufwZ8XoLChEfPffDeVGroYbhbcYPom3zKDiv4Flhe97rr/o2IfUXoWkDUDoyJ3/V36RFIMjokSu0IJ/pbFtbHg== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.0.6" - "@jest/test-result" "^27.0.6" - "@jest/transform" "^27.0.6" - "@jest/types" "^27.0.6" + "@jest/console" "^27.2.2" + "@jest/test-result" "^27.2.2" + "@jest/transform" "^27.2.2" + "@jest/types" "^27.1.1" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -958,10 +918,10 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^27.0.6" - jest-resolve "^27.0.6" - jest-util "^27.0.6" - jest-worker "^27.0.6" + jest-haste-map "^27.2.2" + jest-resolve "^27.2.2" + jest-util "^27.2.0" + jest-worker "^27.2.2" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" @@ -1008,17 +968,17 @@ graceful-fs "^4.2.4" source-map "^0.6.0" -"@jest/test-result@27.0.6", "@jest/test-result@^27.0.6": - version "27.0.6" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.0.6.tgz#3fa42015a14e4fdede6acd042ce98c7f36627051" - integrity sha512-ja/pBOMTufjX4JLEauLxE3LQBPaI2YjGFtXexRAjt1I/MbfNlMx0sytSX3tn5hSLzQsR3Qy2rd0hc1BWojtj9w== +"@jest/test-result@27.2.2": + version "27.2.2" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.2.2.tgz#cd4ba1ca9b0521e463bd4b32349ba1842277563b" + integrity sha512-yENoDEoWlEFI7l5z7UYyJb/y5Q8RqbPd4neAVhKr6l+vVaQOPKf8V/IseSMJI9+urDUIxgssA7RGNyCRhGjZvw== dependencies: - "@jest/console" "^27.0.6" - "@jest/types" "^27.0.6" + "@jest/console" "^27.2.2" + "@jest/types" "^27.1.1" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^27.2.5": +"@jest/test-result@^27.2.2", "@jest/test-result@^27.2.5": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.2.5.tgz#e9f73cf6cd5e2cc6eb3105339248dea211f9320e" integrity sha512-ub7j3BrddxZ0BdSnM5JCF6cRZJ/7j3wgdX0+Dtwhw2Po+HKsELCiXUTvh+mgS4/89mpnU1CPhZxe2mTvuLPJJg== @@ -1028,17 +988,7 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^27.0.6": - version "27.0.6" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.6.tgz#80a913ed7a1130545b1cd777ff2735dd3af5d34b" - integrity sha512-bISzNIApazYOlTHDum9PwW22NOyDa6VI31n6JucpjTVM0jD6JDgqEZ9+yn575nDdPF0+4csYDxNNW13NvFQGZA== - dependencies: - "@jest/test-result" "^27.0.6" - graceful-fs "^4.2.4" - jest-haste-map "^27.0.6" - jest-runtime "^27.0.6" - -"@jest/test-sequencer@^27.2.5": +"@jest/test-sequencer@^27.2.2", "@jest/test-sequencer@^27.2.5": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.2.5.tgz#ed5ae91c00e623fb719111d58e380395e16cefbb" integrity sha512-8j8fHZRfnjbbdMitMAGFKaBZ6YqvFRFJlMJzcy3v75edTOqc7RY65S9JpMY6wT260zAcL2sTQRga/P4PglCu3Q== @@ -1048,49 +998,7 @@ jest-haste-map "^27.2.5" jest-runtime "^27.2.5" -"@jest/transform@^27.0.2": - version "27.0.2" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.0.2.tgz#b073b7c589e3f4b842102468875def2bb722d6b5" - integrity sha512-H8sqKlgtDfVog/s9I4GG2XMbi4Ar7RBxjsKQDUhn2XHAi3NG+GoQwWMER+YfantzExbjNqQvqBHzo/G2pfTiPw== - dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^27.0.2" - babel-plugin-istanbul "^6.0.0" - chalk "^4.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.2.4" - jest-haste-map "^27.0.2" - jest-regex-util "^27.0.1" - jest-util "^27.0.2" - micromatch "^4.0.4" - pirates "^4.0.1" - slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" - -"@jest/transform@^27.0.6": - version "27.0.6" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.0.6.tgz#189ad7107413208f7600f4719f81dd2f7278cc95" - integrity sha512-rj5Dw+mtIcntAUnMlW/Vju5mr73u8yg+irnHwzgtgoeI6cCPOvUwQ0D1uQtc/APmWgvRweEb1g05pkUpxH3iCA== - dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^27.0.6" - babel-plugin-istanbul "^6.0.0" - chalk "^4.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.2.4" - jest-haste-map "^27.0.6" - jest-regex-util "^27.0.6" - jest-util "^27.0.6" - micromatch "^4.0.4" - pirates "^4.0.1" - slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" - -"@jest/transform@^27.2.5": +"@jest/transform@^27.2.2", "@jest/transform@^27.2.5": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.2.5.tgz#02b08862a56dbedddf0ba3c2eae41e049a250e29" integrity sha512-29lRtAHHYGALbZOx343v0zKmdOg4Sb0rsA1uSv0818bvwRhs3TyElOmTVXlrw0v1ZTqXJCAH/cmoDXimBhQOJQ== @@ -1111,7 +1019,7 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^27.0.2", "@jest/types@^27.0.6", "@jest/types@^27.2.5": +"@jest/types@^27.1.1", "@jest/types@^27.2.5": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.2.5.tgz#420765c052605e75686982d24b061b4cbba22132" integrity sha512-nmuM4VuDtCZcY+eTpw+0nvstwReMsjPoj7ZR80/BbixulhLaiX+fbv8oeLW8WZlJMcsGQsTmMKT/iTZu1Uy/lQ== @@ -1816,7 +1724,7 @@ "@microsoft/tsdoc-config" "~0.15.2" "@rushstack/node-core-library" "3.42.3" -"@microsoft/api-extractor@^7.15.2": +"@microsoft/api-extractor@^7.18.16": version "7.18.16" resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.16.tgz#c5e077e417938da7e7026124c51d34a90868e7bd" integrity sha512-f0EcjGgS8IToUHxfQIr4vxGpBhUdaDOhGyddZpZ5K9e/GcGkImfkGeHpYbK043f2bZV3aagTx6NcIawwE72BKA== @@ -1857,18 +1765,18 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" -"@nodelib/fs.scandir@2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" - integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: - "@nodelib/fs.stat" "2.0.3" + "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" - integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.stat@^1.1.2": version "1.1.3" @@ -1876,59 +1784,59 @@ integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== "@nodelib/fs.walk@^1.2.3": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" - integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== dependencies: - "@nodelib/fs.scandir" "2.1.3" + "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@nrwl/cli@*", "@nrwl/cli@12.9.0": - version "12.9.0" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.9.0.tgz#f5fccd973006ad2802d7c823b28820ac1fa6c27c" - integrity sha512-YKTZ3G07f6Y4MedOOkBmCi1Y72gu3ssCk2J50wL76SaiSjJTUSAz1NkKLsPwO6S8/QloMSR71tI42HJG2bbpwQ== +"@nrwl/cli@*", "@nrwl/cli@12.10.0": + version "12.10.0" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.10.0.tgz#fc0a592bff43387388d15427c7c2f2f0d66c00bd" + integrity sha512-T8HY7OpY5ygwUZcgt1W2mKYvSsiJ2AMDv7PDGQMCfauYd37FeK8ae93mqdbAXZRJKLrAuaoy51TWOQxwv4vzsA== dependencies: - "@nrwl/tao" "12.9.0" + "@nrwl/tao" "12.10.0" chalk "4.1.0" v8-compile-cache "2.3.0" yargs "15.4.1" yargs-parser "20.0.0" -"@nrwl/devkit@12.9.0": - version "12.9.0" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.9.0.tgz#fbf6eb715d1deb22fa919bceb3dff7a5c990d415" - integrity sha512-mobW2XKmQicTdhn0XQStNnYmhMC0Aj7qqX9lS/8IX561PtgocR0MPH9rTWOfNECpwHhj2YwTRTHjQfgv29btxw== +"@nrwl/devkit@12.10.0": + version "12.10.0" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.10.0.tgz#cf4a1dfb1036212185548d68296ac26e498a41c4" + integrity sha512-we0K5Hn48BXh77SV5GVSPfRJeIHNCVFSn+feLbnKz3G60Tk3wFEEFhDABA8cCfTKDxMESSjZoWBy4ZcVg0EX0g== dependencies: - "@nrwl/tao" "12.9.0" + "@nrwl/tao" "12.10.0" ejs "^3.1.5" ignore "^5.0.4" rxjs "^6.5.4" semver "7.3.4" tslib "^2.0.0" -"@nrwl/jest@12.9.0": - version "12.9.0" - resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.9.0.tgz#fb20631274c2462b73a0cb88d73ba7897c35e303" - integrity sha512-PHPG6DlwNgrT4+uplJqM814k+gqNV/m85FIes6JkzRO8XMK9jmqF0hwJvyymCZHDmGXMqwa0muoxkjoJs2CI/A== +"@nrwl/jest@12.10.0": + version "12.10.0" + resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.10.0.tgz#37bed395ed390a73f094be752c040fa64c901397" + integrity sha512-Tqrl/d6y+fGWV9j8bCReLhhfnioAA8yPC9Y6EUevxPuuuW0AUwRZp8slhx7mCiWNh9nLCkMO7PcwD+4L39kzjQ== dependencies: - "@jest/reporters" "27.0.6" - "@jest/test-result" "27.0.6" - "@nrwl/devkit" "12.9.0" + "@jest/reporters" "27.2.2" + "@jest/test-result" "27.2.2" + "@nrwl/devkit" "12.10.0" chalk "4.1.0" identity-obj-proxy "3.0.0" - jest-config "27.0.6" - jest-resolve "27.0.6" - jest-util "27.0.6" + jest-config "27.2.2" + jest-resolve "27.2.2" + jest-util "27.2.0" rxjs "^6.5.4" tslib "^2.0.0" -"@nrwl/linter@12.9.0": - version "12.9.0" - resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.9.0.tgz#1633045cb64871fb89eaced8c5b66664211237c6" - integrity sha512-8acZTT0nkwi914uJ6fMhZT6fZMMKOUGGjEWhvw9D3Lhe0aACsnXXSB+hJh+E8qchcGMYliqXuSi3X4Liq/fUFw== +"@nrwl/linter@12.10.0": + version "12.10.0" + resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.10.0.tgz#25f8df66d637651811e9f90573fa2885124db623" + integrity sha512-GULnMm3vMh1QEq6QUzZWV+AYB2NlZnov0Pj6tdtqXTjS+mOXkLYP/k8Vfb4ZEPVNSwHyjRZY08A5sbeRnurD2w== dependencies: - "@nrwl/devkit" "12.9.0" - "@nrwl/jest" "12.9.0" + "@nrwl/devkit" "12.10.0" + "@nrwl/jest" "12.10.0" glob "7.1.4" minimatch "3.0.4" tmp "~0.2.1" @@ -1946,16 +1854,16 @@ strip-json-comments "^3.1.1" tar "6.1.11" -"@nrwl/tao@12.9.0": - version "12.9.0" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.9.0.tgz#f8470ac0dccd5df414afc244fbbf37c23eb75764" - integrity sha512-a97JYoLohhBRthnWAGMh3++8Ri/yvCQUG/INBAYxW6sWAk2owJ6DIEIERP4yhIW29HPdqZ/fA2k9iqU6EgIAew== +"@nrwl/tao@12.10.0": + version "12.10.0" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.10.0.tgz#28cfbbda66f5f10a4917df0e70b94d04334e1628" + integrity sha512-YkdgTJJsDQlItVj25vW8zEen7BAra6i41Udd0v3CuxTSEXjJJnBD2KzEOGUxXS0gMg7+ILuw2rl9aOKu43TmVA== dependencies: chalk "4.1.0" enquirer "~2.3.6" fs-extra "^9.1.0" jsonc-parser "3.0.0" - nx "12.9.0" + nx "12.10.0" rxjs "^6.5.4" rxjs-for-await "0.0.2" semver "7.3.4" @@ -1963,15 +1871,16 @@ tslib "^2.0.0" yargs-parser "20.0.0" -"@nrwl/workspace@12.9.0": - version "12.9.0" - resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.9.0.tgz#218ac0bba8f1cd84235bc636ed6a928ec3550f86" - integrity sha512-P8jab7DebwU1fMnpA9A+7oBXNLxVYPqdGPIusOsvpRaJ9tjzhXhVM4OCYu3ZnmcpHboskmSwUMcIvOARRcwWLg== +"@nrwl/workspace@12.10.0": + version "12.10.0" + resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.10.0.tgz#7e26256a5f3187f6e60eb3ac177a00768633baa4" + integrity sha512-3efkh/0DEOmQXnA2SlBcEk21QiM0vPaJt73CiYnocm1oy7/ngZDyhxYFxOJkVtsfRvR69Etj2JLonbIWa4Za5w== dependencies: - "@nrwl/cli" "12.9.0" - "@nrwl/devkit" "12.9.0" - "@nrwl/jest" "12.9.0" - "@nrwl/linter" "12.9.0" + "@nrwl/cli" "12.10.0" + "@nrwl/devkit" "12.10.0" + "@nrwl/jest" "12.10.0" + "@nrwl/linter" "12.10.0" + "@parcel/watcher" "2.0.0-alpha.11" chalk "4.1.0" chokidar "^3.5.1" cosmiconfig "^4.0.0" @@ -1983,30 +1892,37 @@ ignore "^5.0.4" minimatch "3.0.4" npm-run-all "^4.1.5" + npm-run-path "^4.0.1" open "^7.4.2" rxjs "^6.5.4" semver "7.3.4" + strip-ansi "6.0.0" tmp "~0.2.1" tslib "^2.0.0" yargs "15.4.1" yargs-parser "20.0.0" "@octokit/auth-token@^2.4.0": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a" - integrity sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ== + version "2.5.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36" + integrity sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g== dependencies: - "@octokit/types" "^5.0.0" + "@octokit/types" "^6.0.3" "@octokit/endpoint@^6.0.1": - version "6.0.5" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.5.tgz#43a6adee813c5ffd2f719e20cfd14a1fee7c193a" - integrity sha512-70K5u6zd45ItOny6aHQAsea8HHQjlQq85yqOMe+Aj8dkhN2qSJ9T+Q3YjUjEYfPRBcuUWNgMn62DQnP/4LAIiQ== + version "6.0.12" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.12.tgz#3b4d47a4b0e79b1027fb8d75d4221928b2d05658" + integrity sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA== dependencies: - "@octokit/types" "^5.0.0" - is-plain-object "^4.0.0" + "@octokit/types" "^6.0.3" + is-plain-object "^5.0.0" universal-user-agent "^6.0.0" +"@octokit/openapi-types@^11.2.0": + version "11.2.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-11.2.0.tgz#b38d7fc3736d52a1e96b230c1ccd4a58a2f400a6" + integrity sha512-PBsVO+15KSlGmiI8QAzaqvsNlZlrDlyAJYcrXBCvVUxCp7VnXjkwPoFHgjEJXx3WF9BAwkA6nfCUA7i9sODzKA== + "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437" @@ -2020,9 +1936,9 @@ "@octokit/types" "^2.0.1" "@octokit/plugin-request-log@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" - integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== + version "1.0.4" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" + integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== "@octokit/plugin-rest-endpoint-methods@2.4.0": version "2.4.0" @@ -2041,27 +1957,25 @@ deprecation "^2.0.0" once "^1.4.0" -"@octokit/request-error@^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.2.tgz#0e76b83f5d8fdda1db99027ea5f617c2e6ba9ed0" - integrity sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw== +"@octokit/request-error@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677" + integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg== dependencies: - "@octokit/types" "^5.0.1" + "@octokit/types" "^6.0.3" deprecation "^2.0.0" once "^1.4.0" "@octokit/request@^5.2.0": - version "5.4.7" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.7.tgz#fd703ee092e0463ceba49ff7a3e61cb4cf8a0fde" - integrity sha512-FN22xUDP0i0uF38YMbOfx6TotpcENP5W8yJM1e/LieGXn6IoRxDMnBf7tx5RKSW4xuUZ/1P04NFZy5iY3Rax1A== + version "5.6.2" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.2.tgz#1aa74d5da7b9e04ac60ef232edd9a7438dcf32d8" + integrity sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA== dependencies: "@octokit/endpoint" "^6.0.1" - "@octokit/request-error" "^2.0.0" - "@octokit/types" "^5.0.0" - deprecation "^2.0.0" - is-plain-object "^4.0.0" - node-fetch "^2.3.0" - once "^1.4.0" + "@octokit/request-error" "^2.1.0" + "@octokit/types" "^6.16.1" + is-plain-object "^5.0.0" + node-fetch "^2.6.1" universal-user-agent "^6.0.0" "@octokit/rest@^16.28.4": @@ -2093,12 +2007,20 @@ dependencies: "@types/node" ">= 8" -"@octokit/types@^5.0.0", "@octokit/types@^5.0.1": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.4.1.tgz#d5d5f2b70ffc0e3f89467c3db749fa87fc3b7031" - integrity sha512-OlMlSySBJoJ6uozkr/i03nO5dlYQyE05vmQNZhAh9MyO4DPBP88QlwsDVLmVjIMFssvIZB6WO0ctIGMRG+xsJQ== +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1": + version "6.34.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.34.0.tgz#c6021333334d1ecfb5d370a8798162ddf1ae8218" + integrity sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw== dependencies: - "@types/node" ">= 8" + "@octokit/openapi-types" "^11.2.0" + +"@parcel/watcher@2.0.0-alpha.11": + version "2.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.0-alpha.11.tgz#8d6233d4416880810438cd2628e6a35273241ab3" + integrity sha512-zMIAsFLcnB82kkk0kSOZ/zgyihb8sty0zVrsz+3ruoYXkchymWsCDsxiX4v+X2s8Jppk3JE8vlnD4DKs3QTOEQ== + dependencies: + node-addon-api "^3.0.2" + node-gyp-build "^4.2.3" "@rushstack/node-core-library@3.42.3": version "3.42.3" @@ -2134,19 +2056,12 @@ string-argv "~0.3.1" "@sinonjs/commons@^1.7.0": - version "1.8.2" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.2.tgz#858f5c4b48d80778fde4b9d541f27edc0d56488b" - integrity sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw== + version "1.8.3" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" + integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^7.0.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz#2524eae70c4910edccf99b2f4e6efc5894aff7b5" - integrity sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg== - dependencies: - "@sinonjs/commons" "^1.7.0" - "@sinonjs/fake-timers@^8.0.1": version "8.0.1" resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-8.0.1.tgz#1c1c9a91419f804e59ae8df316a07dd1c3a76b94" @@ -2160,19 +2075,19 @@ integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== "@tsconfig/node10@^1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.7.tgz#1eb1de36c73478a2479cc661ef5af1c16d86d606" - integrity sha512-aBvUmXLQbayM4w3A8TrjwrXs4DZ8iduJnuJLLRGdkWlyakCf1q6uHZJBzXoRA/huAEknG5tcUyQxN3A+In5euQ== + version "1.0.8" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" + integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg== "@tsconfig/node12@^1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.7.tgz#677bd9117e8164dc319987dd6ff5fc1ba6fbf18b" - integrity sha512-dgasobK/Y0wVMswcipr3k0HpevxFJLijN03A8mYfEPvWvOs14v0ZlYTR4kIgMx8g4+fTyTFv8/jLCIfRqLDJ4A== + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c" + integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw== "@tsconfig/node14@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.0.tgz#5bd046e508b1ee90bc091766758838741fdefd6e" - integrity sha512-RKkL8eTdPv6t5EHgFKIVQgsDapugbuOptNd9OOunN/HAkzmmTnZELx1kNCK0rSdUYGmiFMM3rRQMAWiyp023LQ== + version "1.0.1" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" + integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== "@tsconfig/node16@^1.0.2": version "1.0.2" @@ -2184,15 +2099,15 @@ resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9" integrity sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== -"@types/babel__code-frame@*", "@types/babel__code-frame@^7.0.2": +"@types/babel__code-frame@*", "@types/babel__code-frame@^7.0.3": version "7.0.3" resolved "https://registry.yarnpkg.com/@types/babel__code-frame/-/babel__code-frame-7.0.3.tgz#eda94e1b7c9326700a4b69c485ebbc9498a0b63f" integrity sha512-2TN6oiwtNjOezilFVl77zwdNPwQWaDBBCCWWxyo1ctiO3vAtd7H/aB/CBJdw9+kqq3+latD0SXoedIuHySSZWw== "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": - version "7.1.14" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.14.tgz#faaeefc4185ec71c389f4501ee5ec84b170cc402" - integrity sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g== + version "7.1.16" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.16.tgz#bc12c74b7d65e82d29876b5d0baf5c625ac58702" + integrity sha512-EAEHtisTMM+KaKwfWdC3oyllIqswlznXCIVCt7/oRNrh+DhgT4UEBNC/jlADNjvw7UnfbcdkGQcPVZ1xYiLcrQ== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" @@ -2201,33 +2116,28 @@ "@types/babel__traverse" "*" "@types/babel__generator@*": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.2.tgz#f3d71178e187858f7c45e30380f8f1b7415a12d8" - integrity sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ== + version "7.6.3" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.3.tgz#f456b4b2ce79137f768aa130d2423d2f0ccfaba5" + integrity sha512-/GWCmzJWqV7diQW54smJZzWbSFf4QYtF71WCKhcx6Ru/tFyQIY2eiiITcCAeuPbNSvT9YCGkVMqqvSk2Z0mXiA== dependencies: "@babel/types" "^7.0.0" "@types/babel__template@*": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.0.tgz#0c888dd70b3ee9eebb6e4f200e809da0076262be" - integrity sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A== + version "7.4.1" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" + integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.0.tgz#b9a1efa635201ba9bc850323a8793ee2d36c04a0" - integrity sha512-kSjgDMZONiIfSH1Nxcr5JIRMwUetDki63FSQfpTCz8ogF3Ulqm8+mr5f78dUYs6vMiB6gBusQqfQmBvHZj/lwg== + version "7.14.2" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.14.2.tgz#ffcd470bbb3f8bf30481678fb5502278ca833a43" + integrity sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA== dependencies: "@babel/types" "^7.3.0" -"@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== - -"@types/debug@*", "@types/debug@^4.1.5": +"@types/debug@*", "@types/debug@^4.1.7": version "4.1.7" resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.7.tgz#7cc0ea761509124709b8b2d1090d8f6c17aadb82" integrity sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg== @@ -2239,7 +2149,7 @@ resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== -"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.3": +"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.4": version "7.1.4" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.4.tgz#ea59e21d2ee5c517914cb4bc8e4153b99e566672" integrity sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA== @@ -2248,13 +2158,13 @@ "@types/node" "*" "@types/graceful-fs@^4.1.2": - version "4.1.3" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.3.tgz#039af35fe26bec35003e8d86d2ee9c586354348f" - integrity sha512-AiHRaEB50LQg0pZmm659vNBb9f4SJ0qrAnteuzhSeAUcJKxoYgEnprg/83kppCnc2zvtCKbdZry1a5pVY3lOTQ== + version "4.1.5" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" + integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== dependencies: "@types/node" "*" -"@types/is-glob@*", "@types/is-glob@^4.0.1": +"@types/is-glob@*", "@types/is-glob@^4.0.2": version "4.0.2" resolved "https://registry.yarnpkg.com/@types/is-glob/-/is-glob-4.0.2.tgz#c243dd0d09eac2992130142419ff2308ffd988bf" integrity sha512-4j5G9Y5jljDSICQ1R2f/Rcyoj6DZmYGneny+p/cDkjep0rkqNg0W73Ty0bVjMUTZgLXHf8oiMjg1XC3CDwCz+g== @@ -2272,9 +2182,9 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz#508b13aa344fa4976234e75dddcc34925737d821" - integrity sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA== + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" + integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== dependencies: "@types/istanbul-lib-report" "*" @@ -2285,7 +2195,7 @@ dependencies: "@types/jest" "*" -"@types/jest@*", "@types/jest@^27.0.1": +"@types/jest@*", "@types/jest@^27.0.2": version "27.0.2" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.0.2.tgz#ac383c4d4aaddd29bbf2b916d8d105c304a5fcd7" integrity sha512-4dRxkS/AFX0c5XW6IPMNOydLn2tEhNhJV7DnYK+0bjoJZ+QTmfucBlihX7aoEsh/ocYtkLC73UbnBXBXIxsULA== @@ -2293,7 +2203,7 @@ jest-diff "^27.0.0" pretty-format "^27.0.0" -"@types/json-schema@^7.0.7": +"@types/json-schema@^7.0.9": version "7.0.9" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== @@ -2303,59 +2213,52 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= -"@types/lodash@*", "@types/lodash@^4.14.170": +"@types/lodash@*", "@types/lodash@^4.14.172": version "4.14.175" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.175.tgz#b78dfa959192b01fae0ad90e166478769b215f45" integrity sha512-XmdEOrKQ8a1Y/yxQFOMbC47G/V2VDO1GvMRnl4O75M4GW/abC5tnfzadQYkqEveqRM1dEJGFFegfPNA2vvx2iw== -"@types/marked@*", "@types/marked@^2.0.3": +"@types/marked@*", "@types/marked@^2.0.5": version "2.0.5" resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.5.tgz#453e27f1e97199d45bb25297b0dd2b9bbc1e05ea" integrity sha512-shRZ7XnYFD/8n8zSjKvFdto1QNSf4tONZIlNEZGrJe8GsOE8DL/hG1Hbl8gZlfLnjS7+f5tZGIaTgfpyW38h4w== "@types/minimatch@*": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.4.tgz#f0ec25dbf2f0e4b18647313ac031134ca5b24b21" - integrity sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA== + version "3.0.5" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" + integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== "@types/minimist@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" - integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= + version "1.2.2" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" + integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== "@types/ms@*": version "0.7.31" resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== -"@types/node-fetch@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-3.0.3.tgz#9d969c9a748e841554a40ee435d26e53fa3ee899" - integrity sha512-HhggYPH5N+AQe/OmN6fmhKmRRt2XuNJow+R3pQwJxOOF9GuwM7O2mheyGeIrs5MOIeNjDEdgdoyHBOrFeJBR3g== - dependencies: - node-fetch "*" - -"@types/node@*", "@types/node@12.20.24", "@types/node@>= 8", "@types/node@^15.6.1": - version "15.12.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.2.tgz#1f2b42c4be7156ff4a6f914b2fb03d05fa84e38d" - integrity sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww== +"@types/node@*", "@types/node@12.20.24", "@types/node@>= 8", "@types/node@^16.10.9": + version "16.10.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.10.9.tgz#8f1cdd517972f76a3b928298f4c0747cd6fef25a" + integrity sha512-H9ReOt+yqIJPCutkTYjFjlyK6WEMQYT9hLZMlWtOjFQY2ItppsWZ6RJf8Aw+jz5qTYceuHvFgPIaKOHtLAEWBw== "@types/normalize-package-data@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" - integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== + version "2.4.1" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" + integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/prettier@*", "@types/prettier@^2.1.5", "@types/prettier@^2.2.3": +"@types/prettier@*", "@types/prettier@^2.1.5", "@types/prettier@^2.3.2": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.1.tgz#e1303048d5389563e130f5bdd89d37a99acb75eb" integrity sha512-Fo79ojj3vdEZOHg3wR9ksAMRz4P3S5fDB5e/YWZiFnyFQI1WY2Vftu9XoXVVtJfxB7Bpce/QTqWSSntkz2Znrw== -"@types/rimraf@^3.0.0": +"@types/rimraf@^3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.2.tgz#a63d175b331748e5220ad48c901d7bbf1f44eef8" integrity sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ== @@ -2363,38 +2266,33 @@ "@types/glob" "*" "@types/node" "*" -"@types/semver@*", "@types/semver@^7.3.6": +"@types/semver@*", "@types/semver@^7.3.8": version "7.3.8" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.8.tgz#508a27995498d7586dcecd77c25e289bfaf90c59" integrity sha512-D/2EJvAlCEtYFEYmmlGwbGXuK886HzyCc3nZX/tkFTQdEU8jZDAgiv08P162yB17y4ZXZoq7yFAnW4GDBb9Now== "@types/stack-utils@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff" - integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" + integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== -"@types/tmp@*", "@types/tmp@^0.2.0": +"@types/tmp@*", "@types/tmp@^0.2.1": version "0.2.1" resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.2.1.tgz#83ecf4ec22a8c218c71db25f316619fe5b986011" integrity sha512-7cTXwKP/HLOPVgjg+YhBdQ7bMiobGMuoBmrGmqwIWJv8elC6t1DfVc/mn4fD9UE1IjhwmhaQ5pGVXkmXbH0rhg== "@types/yargs-parser@*": - version "20.2.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" - integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA== + version "20.2.1" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129" + integrity sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw== "@types/yargs@^16.0.0": - version "16.0.3" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.3.tgz#4b6d35bb8e680510a7dc2308518a80ee1ef27e01" - integrity sha512-YlFfTGS+zqCgXuXNV26rOIeETOkXnGQXP/pjjL9P0gO/EP9jTmc7pUBhx+jVEIxpq41RX33GQ7N3DzOSfZoglQ== + version "16.0.4" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.4.tgz#26aad98dd2c2a38e421086ea9ad42b9e51642977" + integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw== dependencies: "@types/yargs-parser" "*" -"@yarnpkg/lockfile@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" - integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== - "@zkochan/cmd-shim@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz#2ab8ed81f5bb5452a85f25758eb9b8681982fd2e" @@ -2431,9 +2329,9 @@ acorn-globals@^6.0.0: acorn-walk "^7.1.1" acorn-jsx@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" - integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^7.1.1: version "7.2.0" @@ -2441,9 +2339,9 @@ acorn-walk@^7.1.1: integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== acorn-walk@^8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.1.1.tgz#3ddab7f84e4a7e2313f6c414c5b7dac85f4e3ebc" - integrity sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w== + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== acorn@^7.1.1: version "7.4.1" @@ -2528,11 +2426,11 @@ ansi-escapes@^3.2.0: integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" - integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== dependencies: - type-fest "^0.11.0" + type-fest "^0.21.3" ansi-regex@^2.0.0: version "2.1.1" @@ -2549,7 +2447,7 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-regex@^5.0.1: +ansi-regex@^5.0.0, ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== @@ -2562,11 +2460,10 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: color-convert "^1.9.0" ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: - "@types/color-name" "^1.1.1" color-convert "^2.0.1" ansi-styles@^5.0.0: @@ -2579,15 +2476,7 @@ any-promise@^1.0.0: resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= -anymatch@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -anymatch@~3.1.2: +anymatch@^3.0.3, anymatch@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== @@ -2606,9 +2495,9 @@ aproba@^2.0.0: integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + version "1.1.7" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" + integrity sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g== dependencies: delegates "^1.0.0" readable-stream "^2.0.6" @@ -2745,9 +2634,9 @@ async@0.9.x: integrity sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0= async@^3.0.1: - version "3.2.0" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" - integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw== + version "3.2.1" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.1.tgz#d3274ec66d107a47476a4c49136aacdb00665fc8" + integrity sha512-XdD5lRO/87udXCMC9meWdYiR+Nq6ZjUfXidViUZGu2F1MO4T3XwZ1et0hb2++BgLfhyJwy44BGB/yx80ABx8hg== asynckit@^0.4.0: version "0.4.0" @@ -2775,9 +2664,9 @@ aws-sign2@~0.7.0: integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.8.0: - version "1.10.1" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" - integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== axios@^0.21.1: version "0.21.4" @@ -2786,21 +2675,7 @@ axios@^0.21.1: dependencies: follow-redirects "^1.14.0" -babel-jest@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.6.tgz#e99c6e0577da2655118e3608b68761a5a69bd0d8" - integrity sha512-iTJyYLNc4wRofASmofpOc5NK9QunwMk+TLFgGXsTFS8uEqmd8wdI7sga0FPe2oVH3b5Agt/EAK1QjPEuKL8VfA== - dependencies: - "@jest/transform" "^27.0.6" - "@jest/types" "^27.0.6" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^27.0.6" - chalk "^4.0.0" - graceful-fs "^4.2.4" - slash "^3.0.0" - -babel-jest@^27.2.5: +babel-jest@^27.2.2, babel-jest@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.2.5.tgz#6bbbc1bb4200fe0bfd1b1fbcbe02fc62ebed16aa" integrity sha512-GC9pWCcitBhSuF7H3zl0mftoKizlswaF0E3qi+rPL417wKkCB0d+Sjjb0OfXvxj7gWiBf497ldgRMii68Xz+2g== @@ -2825,16 +2700,6 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.6.tgz#f7c6b3d764af21cb4a2a1ab6870117dbde15b456" - integrity sha512-CewFeM9Vv2gM7Yr9n5eyyLVPRSiBnk6lKZRjgwYnGKSl9M14TMn2vkN02wTF04OGuSDLEzlWiMzvjXuW9mB6Gw== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.0.0" - "@types/babel__traverse" "^7.0.6" - babel-plugin-jest-hoist@^27.2.0: version "27.2.0" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.2.0.tgz#79f37d43f7e5c4fdc4b2ca3e10cc6cf545626277" @@ -2863,14 +2728,6 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.0.6.tgz#909ef08e9f24a4679768be2f60a3df0856843f9d" - integrity sha512-WObA0/Biw2LrVVwZkF/2GqbOdzhKD6Fkdwhoy9ASIrOWr/zodcSpQh72JOkEn6NWyjmnPDjNSqaGN4KnpKzhXw== - dependencies: - babel-plugin-jest-hoist "^27.0.6" - babel-preset-current-node-syntax "^1.0.0" - babel-preset-jest@^27.2.0: version "27.2.0" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.2.0.tgz#556bbbf340608fed5670ab0ea0c8ef2449fba885" @@ -2880,9 +2737,9 @@ babel-preset-jest@^27.2.0: babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base@^0.11.1: version "0.11.2" @@ -2905,9 +2762,9 @@ bcrypt-pbkdf@^1.0.0: tweetnacl "^0.14.3" before-after-hook@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" - integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== + version "2.2.2" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.2.tgz#a6e8ca41028d90ee2c24222f201c90956091613e" + integrity sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ== binary-extensions@^2.0.0: version "2.2.0" @@ -2956,15 +2813,15 @@ browser-process-hrtime@^1.0.0: integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== browserslist@^4.16.6: - version "4.16.6" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" - integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== + version "4.17.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.17.4.tgz#72e2508af2a403aec0a49847ef31bd823c57ead4" + integrity sha512-Zg7RpbZpIJRW3am9Lyckue7PLytvVxxhJj1CaJVlCWENsGEAOlnlt8X0ZxGRPp7Bt9o8tIRM5SEXy4BCPMJjLQ== dependencies: - caniuse-lite "^1.0.30001219" - colorette "^1.2.2" - electron-to-chromium "^1.3.723" + caniuse-lite "^1.0.30001265" + electron-to-chromium "^1.3.867" escalade "^3.1.1" - node-releases "^1.1.71" + node-releases "^2.0.0" + picocolors "^1.0.0" bs-logger@0.x: version "0.2.6" @@ -2986,9 +2843,9 @@ btoa-lite@^1.0.0: integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== builtin-modules@^1.1.1: version "1.1.1" @@ -3134,10 +2991,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -caniuse-lite@^1.0.30001219: - version "1.0.30001228" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz#bfdc5942cd3326fa51ee0b42fbef4da9d492a7fa" - integrity sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A== +caniuse-lite@^1.0.30001265: + version "1.0.30001267" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001267.tgz#b1cf2937175afc0570e4615fc2d2f9069fa0ed30" + integrity sha512-r1mjTzAuJ9W8cPBGbbus8E0SKcUP7gn03R14Wk8FlAlqhH9hroy9nLqmpuXlfKEw/oILW+FGz47ipXV2O7x8lg== caseless@~0.12.0: version "0.12.0" @@ -3215,9 +3072,9 @@ ci-info@^3.1.1: integrity sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A== cjs-module-lexer@^1.0.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.1.tgz#2fd46d9906a126965aa541345c499aaa18e8cd73" - integrity sha512-jVamGdJPDeuQilKhvVn1h3knuMOZzr8QDnpk+M9aMlCaMkTDd6fBWPhiDqFvFZ07pL0liqabAiuy8SY4jGHeaw== + version "1.2.2" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" + integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== class-utils@^0.3.5: version "0.3.6" @@ -3362,7 +3219,7 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^1.2.2, colorette@^1.4.0: +colorette@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== @@ -3392,16 +3249,11 @@ commander@^2.12.1, commander@^2.7.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^8.2.0: +commander@^8.2.0, commander@~8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.2.0.tgz#37fe2bde301d87d47a53adeff8b5915db1381ca8" integrity sha512-LLKxDvHeL91/8MIyTAD5BFMNtoIwztGPMiM/7Bl8rIPmHCZXRxmSWr91h57dpOpnQ6jIUqEWdXE/uBYMfiVZDA== -commander@~8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-8.0.0.tgz#1da2139548caef59bd23e66d18908dfb54b02258" - integrity sha512-Xvf85aAtu6v22+E5hfVoLHqyul/jyxh91zvqk/ioJTQuJR7Z78n7H558vMPKanPSRgIEeZemT92I2g9Y8LPbSQ== - comment-json@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/comment-json/-/comment-json-4.1.1.tgz#49df4948704bebb1cc0ffa6910e25669b668b7c5" @@ -3414,15 +3266,15 @@ comment-json@^4.1.1: repeat-string "^1.6.1" commitizen@^4.0.3: - version "4.2.1" - resolved "https://registry.yarnpkg.com/commitizen/-/commitizen-4.2.1.tgz#3b098b16c6b1a37f0d129018dff6751b20cd3103" - integrity sha512-nZsp8IThkDu7C+93BFD/mLShb9Gd6Wsaf90tpKE3x/6u5y/Q52kzanIJpGr0qvIsJ5bCMpgKtr3Lbu3miEJfaA== + version "4.2.4" + resolved "https://registry.yarnpkg.com/commitizen/-/commitizen-4.2.4.tgz#a3e5b36bd7575f6bf6e7aa19dbbf06b0d8f37165" + integrity sha512-LlZChbDzg3Ir3O2S7jSo/cgWp5/QwylQVr59K4xayVq8S4/RdKzSyJkghAiZZHfhh5t4pxunUoyeg0ml1q/7aw== dependencies: cachedir "2.2.0" cz-conventional-changelog "3.2.0" dedent "0.7.0" detect-indent "6.0.0" - find-node-modules "2.0.0" + find-node-modules "^2.1.2" find-root "1.1.0" fs-extra "8.1.0" glob "7.1.4" @@ -3472,9 +3324,9 @@ concat-stream@^2.0.0: typedarray "^0.0.6" config-chain@^1.1.11: - version "1.1.12" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" - integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== + version "1.1.13" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" + integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== dependencies: ini "^1.3.4" proto-list "~1.2.1" @@ -3497,17 +3349,17 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= conventional-changelog-angular@^5.0.11, conventional-changelog-angular@^5.0.3: - version "5.0.12" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" - integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw== + version "5.0.13" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz#896885d63b914a70d4934b59d2fe7bde1832b28c" + integrity sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA== dependencies: compare-func "^2.0.0" q "^1.5.1" conventional-changelog-conventionalcommits@^4.3.1: - version "4.5.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.5.0.tgz#a02e0b06d11d342fdc0f00c91d78265ed0bc0a62" - integrity sha512-buge9xDvjjOxJlyxUnar/+6i/aVEVGA7EEh4OafBCXPlLUQPGbRUBhBUveWRxzvR8TEjhKEP4BdepnpG2FSZXw== + version "4.6.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.1.tgz#f4c0921937050674e578dc7875f908351ccf4014" + integrity sha512-lzWJpPZhbM1R0PIzkwzGBCnAkH5RKJzJfFQZcl/D+2lsJxAwGnDKBqn/F4C1RD31GJNn8NuKWQzAZDAVXPp2Mw== dependencies: compare-func "^2.0.0" lodash "^4.17.15" @@ -3538,48 +3390,35 @@ conventional-changelog-preset-loader@^2.1.1: integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== conventional-changelog-writer@^4.0.6: - version "4.0.17" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.17.tgz#4753aaa138bf5aa59c0b274cb5937efcd2722e21" - integrity sha512-IKQuK3bib/n032KWaSb8YlBFds+aLmzENtnKtxJy3+HqDq5kohu3g/UdNbIHeJWygfnEbZjnCKFxAW0y7ArZAw== + version "4.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.1.0.tgz#1ca7880b75aa28695ad33312a1f2366f4b12659f" + integrity sha512-WwKcUp7WyXYGQmkLsX4QmU42AZ1lqlvRW9mqoyiQzdD+rJWbTepdWoKJuwXTS+yq79XKnQNa93/roViPQrAQgw== dependencies: compare-func "^2.0.0" - conventional-commits-filter "^2.0.6" + conventional-commits-filter "^2.0.7" dateformat "^3.0.0" handlebars "^4.7.6" json-stringify-safe "^5.0.1" lodash "^4.17.15" - meow "^7.0.0" + meow "^8.0.0" semver "^6.0.0" split "^1.0.0" - through2 "^3.0.0" + through2 "^4.0.0" conventional-commit-types@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/conventional-commit-types/-/conventional-commit-types-3.0.0.tgz#7c9214e58eae93e85dd66dbfbafe7e4fffa2365b" integrity sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg== -conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.6.tgz#0935e1240c5ca7698329affee1b6a46d33324c4c" - integrity sha512-4g+sw8+KA50/Qwzfr0hL5k5NWxqtrOVw4DDk3/h6L85a9Gz0/Eqp3oP+CWCNfesBvZZZEFHF7OTEbRe+yYSyKw== +conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz#f8d9b4f182fce00c9af7139da49365b136c8a0b3" + integrity sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA== dependencies: lodash.ismatch "^4.4.0" modify-values "^1.0.0" -conventional-commits-parser@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.1.0.tgz#10140673d5e7ef5572633791456c5d03b69e8be4" - integrity sha512-RSo5S0WIwXZiRxUGTPuYFbqvrR4vpJ1BDdTlthFgvHt5kEdnd1+pdvwWphWn57/oIl4V72NMmOocFqqJ8mFFhA== - dependencies: - JSONStream "^1.0.4" - is-text-path "^1.0.1" - lodash "^4.17.15" - meow "^7.0.0" - split2 "^2.0.0" - through2 "^3.0.0" - trim-off-newlines "^1.0.0" - -conventional-commits-parser@^3.2.2: +conventional-commits-parser@^3.0.3, conventional-commits-parser@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.2.tgz#190fb9900c6e02be0c0bca9b03d57e24982639fd" integrity sha512-Jr9KAKgqAkwXMRHjxDwO/zOCDKod1XdAESHAGuJX38iZ7ZzVti/tvVoysO0suMsdAObp9NQ2rHSsSbnAqZ5f5g== @@ -3606,9 +3445,9 @@ conventional-recommended-bump@^5.0.0: q "^1.5.1" convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + version "1.8.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" + integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== dependencies: safe-buffer "~5.1.1" @@ -3629,11 +3468,16 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0: +core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +core-util-is@^1.0.2, core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + cosmiconfig@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" @@ -3745,7 +3589,7 @@ cspell-trie-lib@^5.12.3: fs-extra "^10.0.0" gensequence "^3.1.1" -cspell@^5.5.2: +cspell@^5.12.3: version "5.12.3" resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.12.3.tgz#1966eb6687f7cdf86e5f96a8c39a140ffac42d55" integrity sha512-lPyWZHfdQh+xjUZDAQC0gnpjglMu2AEfxBWlziTm3XuYuPGTvNJQSUrkMcH180tA3fkj8q2XFwfxHkXXAxm68w== @@ -3867,7 +3711,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== @@ -3907,9 +3751,9 @@ decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0: integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= decimal.js@^10.2.1: - version "10.2.1" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.1.tgz#238ae7b0f0c793d3e3cea410108b35a2c01426a3" - integrity sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw== + version "10.3.1" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" + integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== decode-uri-component@^0.2.0: version "0.2.0" @@ -3927,9 +3771,9 @@ deep-extend@^0.6.0, deep-extend@~0.6.0: integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== deep-is@^0.1.3, deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== deepmerge@^4.2.2: version "4.2.2" @@ -4016,9 +3860,9 @@ dezalgo@^1.0.0: wrappy "1" didyoumean@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.1.tgz#e92edfdada6537d484d73c0172fd1eba0c4976ff" - integrity sha1-6S7f2tplN9SE1zwBcv0eugxJdv8= + version "1.2.2" + resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" + integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== diff-sequences@^27.0.6: version "27.0.6" @@ -4073,9 +3917,9 @@ dot-prop@^4.2.0: is-obj "^1.0.0" dot-prop@^5.1.0, dot-prop@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb" - integrity sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A== + version "5.3.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" + integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== dependencies: is-obj "^2.0.0" @@ -4123,10 +3967,10 @@ ejs@^3.1.5: dependencies: jake "^10.6.1" -electron-to-chromium@^1.3.723: - version "1.3.736" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.736.tgz#f632d900a1f788dab22fec9c62ec5c9c8f0c4052" - integrity sha512-DY8dA7gR51MSo66DqitEQoUMQ0Z+A2DSXFi7tK304bdTVqczCAfUuyQw6Wdg8hIoo5zIxkU1L24RQtUce1Ioig== +electron-to-chromium@^1.3.867: + version "1.3.868" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.868.tgz#ed835023b57ecf0ba63dfe7d50e16b53758ab1da" + integrity sha512-kZYCHqwJ1ctGrYDlOcWQH+/AftAm/KD4lEnLDNwS0kKwx1x6dU4zv+GuDjsPPOGn/2TjnKBaZjDyjXaoix0q/A== emittery@^0.8.1: version "0.8.1" @@ -4157,7 +4001,7 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enhanced-resolve@^5.8.2: +enhanced-resolve@^5.8.3: version "5.8.3" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz#6d552d465cce0423f5b3d718511ea53826a7b2f0" integrity sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA== @@ -4178,14 +4022,14 @@ entities@~2.1.0: integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== env-paths@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" - integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== envinfo@^7.3.1: - version "7.7.3" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.3.tgz#4b2d8622e3e7366afb8091b23ed95569ea0208cc" - integrity sha512-46+j5QxbPWza0PB1i15nZx0xQ4I/EfQxg9J8Had3b408SV63nEtor2e+oiY63amTo9KTuh2a3XLObNwduxYwwA== + version "7.8.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" + integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== err-code@^1.0.0: version "1.1.2" @@ -4199,28 +4043,6 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.0-next.1, es-abstract@^1.18.0-next.2: - version "1.18.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.3.tgz#25c4c3380a27aa203c44b2b685bba94da31b63e0" - integrity sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - get-intrinsic "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.2" - is-callable "^1.2.3" - is-negative-zero "^2.0.1" - is-regex "^1.1.3" - is-string "^1.0.6" - object-inspect "^1.10.3" - object-keys "^1.1.1" - object.assign "^4.1.2" - string.prototype.trimend "^1.0.4" - string.prototype.trimstart "^1.0.4" - unbox-primitive "^1.0.1" - es-abstract@^1.19.0, es-abstract@^1.19.1: version "1.19.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" @@ -4325,14 +4147,14 @@ eslint-plugin-eslint-comments@^3.2.0: escape-string-regexp "^1.0.5" ignore "^5.0.5" -eslint-plugin-eslint-plugin@^3.0.3: +eslint-plugin-eslint-plugin@^3.6.1: version "3.6.1" resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.6.1.tgz#6c93655c9345f36874cc4f8aba4f89c81d47b8fe" integrity sha512-SOE0aoS2+lvtcEbJmy98gEKaxcpkQdxDtqvqE0VQSiGEFme8yTNjpLAjMqPDmmj8KGTwIFd+cYnVykz+9HAIiw== dependencies: eslint-utils "^2.1.0" -eslint-plugin-import@^2.23.4: +eslint-plugin-import@^2.25.2: version "2.25.2" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.2.tgz#b3b9160efddb702fc1636659e71ba1d10adbe9e9" integrity sha512-qCwQr9TYfoBHOFcVGKY9C9unq05uOxxdklmBXLVvcwo68y5Hta6/GzCZEMx2zQiu0woKNEER0LE7ZgaOfBU14g== @@ -4399,9 +4221,9 @@ eslint-visitor-keys@^1.1.0: integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== eslint-visitor-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" - integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== eslint-visitor-keys@^3.0.0: version "3.0.0" @@ -4409,11 +4231,11 @@ eslint-visitor-keys@^3.0.0: integrity sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q== eslint@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.0.0.tgz#2c2d0ac6353755667ac90c9ff4a9c1315e43fcff" - integrity sha512-03spzPzMAO4pElm44m60Nj08nYonPGQXmw6Ceai/S4QK82IgwWO1EXx1s9namKzVlbVu3Jf81hb+N+8+v21/HQ== + version "8.0.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.0.1.tgz#3610e7fe4a05c2154669515ca60835a76a19f700" + integrity sha512-LsgcwZgQ72vZ+SMp4K6pAnk2yFDWL7Ti4pJaRvsZ0Hsw2h8ZjUIW38a9AFn2cZXdBMlScMFYYgsSp4ttFI/0bA== dependencies: - "@eslint/eslintrc" "^1.0.2" + "@eslint/eslintrc" "^1.0.3" "@humanwhocodes/config-array" "^0.6.0" ajv "^6.10.0" chalk "^4.0.0" @@ -4553,30 +4375,6 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.0.2.tgz#e66ca3a4c9592f1c019fa1d46459a9d2084f3422" - integrity sha512-YJFNJe2+P2DqH+ZrXy+ydRQYO87oxRUonZImpDodR1G7qo3NYd3pL+NQ9Keqpez3cehczYwZDBC3A7xk3n7M/w== - dependencies: - "@jest/types" "^27.0.2" - ansi-styles "^5.0.0" - jest-get-type "^27.0.1" - jest-matcher-utils "^27.0.2" - jest-message-util "^27.0.2" - jest-regex-util "^27.0.1" - -expect@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.0.6.tgz#a4d74fbe27222c718fff68ef49d78e26a8fd4c05" - integrity sha512-psNLt8j2kwg42jGBDSfAlU49CEZxejN1f1PlANWDZqIhBOVU/c2Pm888FcjWJzFewhIsNWfZJeLjUjtKGiPuSw== - dependencies: - "@jest/types" "^27.0.6" - ansi-styles "^5.0.0" - jest-get-type "^27.0.6" - jest-matcher-utils "^27.0.6" - jest-message-util "^27.0.6" - jest-regex-util "^27.0.6" - expect@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.5.tgz#16154aaa60b4d9a5b0adacfea3e4d6178f4b93fd" @@ -4660,16 +4458,15 @@ fast-glob@^2.2.6: micromatch "^3.1.10" fast-glob@^3.1.1: - version "3.2.4" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" - integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== + version "3.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" + integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.0" + glob-parent "^5.1.2" merge2 "^1.3.0" - micromatch "^4.0.2" - picomatch "^2.2.1" + micromatch "^4.0.4" fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" @@ -4682,9 +4479,9 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= fastq@^1.6.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481" - integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q== + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== dependencies: reusify "^1.0.4" @@ -4752,13 +4549,18 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-node-modules@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/find-node-modules/-/find-node-modules-2.0.0.tgz#5db1fb9e668a3d451db3d618cd167cdd59e41b69" - integrity sha512-8MWIBRgJi/WpjjfVXumjPKCtmQ10B+fjx6zmSA+770GMJirLhWIzg8l763rhjl9xaeaHbnxPNRQKq2mgMhr+aw== +filter-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" + integrity sha1-mzERErxsYSehbgFsbF1/GeCAXFs= + +find-node-modules@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/find-node-modules/-/find-node-modules-2.1.2.tgz#57565a3455baf671b835bc6b2134a9b938b9c53c" + integrity sha512-x+3P4mbtRPlSiVE1Qco0Z4YLU8WFiFcuWTf3m75OV9Uzcfs2Bg+O9N+r/K0AnmINBW06KpfqKwYJbFlFq4qNug== dependencies: - findup-sync "^3.0.0" - merge "^1.2.1" + findup-sync "^4.0.0" + merge "^2.1.0" find-root@1.1.0: version "1.1.0" @@ -4803,21 +4605,14 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-yarn-workspace-root@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" - integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== - dependencies: - micromatch "^4.0.2" - -findup-sync@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" - integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== +findup-sync@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-4.0.0.tgz#956c9cdde804052b881b428512905c4a5f2cdef0" + integrity sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ== dependencies: detect-file "^1.0.0" is-glob "^4.0.0" - micromatch "^3.0.4" + micromatch "^4.0.2" resolve-dir "^1.0.1" flat-cache@^3.0.4: @@ -4834,9 +4629,9 @@ flat@^5.0.2: integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== flatted@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" - integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== + version "3.2.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" + integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== flush-write-stream@^1.0.0: version "1.1.1" @@ -4847,9 +4642,9 @@ flush-write-stream@^1.0.0: readable-stream "^2.3.6" follow-redirects@^1.14.0: - version "1.14.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.3.tgz#6ada78118d8d24caee595595accdc0ac6abd022e" - integrity sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw== + version "1.14.4" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.4.tgz#838fdf48a8bbdd79e52ee51fb1c94e3ed98b9379" + integrity sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g== for-in@^1.0.2: version "1.0.2" @@ -4912,15 +4707,6 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^7.0.1, fs-extra@~7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" - integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -4931,6 +4717,15 @@ fs-extra@^9.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@~7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" @@ -5098,15 +4893,15 @@ git-raw-commits@2.0.0: through2 "^2.0.0" git-raw-commits@^2.0.0: - version "2.0.7" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.7.tgz#02e9357727a9755efa8e14dd5e59b381c29068fb" - integrity sha512-SkwrTqrDxw8y0G1uGJ9Zw13F7qu3LF8V4BifyDeiJCxSnjRGZD9SaoMiMqUvvXMXh6S3sOQ1DsBN7L2fMUZW/g== + version "2.0.10" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.10.tgz#e2255ed9563b1c9c3ea6bd05806410290297bbc1" + integrity sha512-sHhX5lsbG9SOO6yXdlwgEMQ/ljIn7qMpAbJZCGfXX2fq5T8M5SrDnpYk9/4HswTildcIqatsWa91vty6VhWSaQ== dependencies: dargs "^7.0.0" - lodash.template "^4.0.2" - meow "^7.0.0" - split2 "^2.0.0" - through2 "^3.0.0" + lodash "^4.17.15" + meow "^8.0.0" + split2 "^3.0.0" + through2 "^4.0.0" git-remote-origin-url@^2.0.0: version "2.0.0" @@ -5125,17 +4920,17 @@ git-semver-tags@^2.0.3: semver "^6.0.0" git-up@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.2.tgz#10c3d731051b366dc19d3df454bfca3f77913a7c" - integrity sha512-kbuvus1dWQB2sSW4cbfTeGpCMd8ge9jx9RKnhXhuJ7tnvT+NIrTVfYZxjtflZddQYcmdOTlkAcjmx7bor+15AQ== + version "4.0.5" + resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.5.tgz#e7bb70981a37ea2fb8fe049669800a1f9a01d759" + integrity sha512-YUvVDg/vX3d0syBsk/CKUTib0srcQME0JyHkL5BaYdwLsiCslPWmDSi8PUMo9pXYjrryMcmsCoCgsTpSCJEQaA== dependencies: is-ssh "^1.3.0" - parse-url "^5.0.0" + parse-url "^6.0.0" git-url-parse@^11.1.2: - version "11.1.3" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.1.3.tgz#03625b6fc09905e9ad1da7bb2b84be1bf9123143" - integrity sha512-GPsfwticcu52WQ+eHp0IYkAyaOASgYdtsQDIt4rUp6GbiNt1P9ddrh3O0kQB0eD4UJZszVqNT3+9Zwcg40fywA== + version "11.6.0" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.6.0.tgz#c634b8de7faa66498a2b88932df31702c67df605" + integrity sha512-WWUxvJs5HsyHL6L08wOusa/IXYtMuCAhrMmnTjQPpBU0TTHyDhnOATNH3xNQz7YOQUsqIIPTGr4xiVti1Hsk5g== dependencies: git-up "^4.0.0" @@ -5154,33 +4949,26 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0, glob-parent@^5.1.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" - integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.1.tgz#42054f685eb6a44e7a7d189a96efa40a54971aa7" - integrity sha512-kEVjS71mQazDBHKcsq4E9u/vUzaLcw1A8EtUeydawvIWQCJM0qQ08G1H7/XTjFUulla6XQiDOG6MXSaG0HDKog== - dependencies: - is-glob "^4.0.1" - -glob-parent@~5.1.2: +glob-parent@^5.0.0, glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@*, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.7, glob@^7.2.0: +glob@*, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.7, glob@^7.2.0, glob@~7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== @@ -5204,18 +4992,6 @@ glob@7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -glob@~7.1.7: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - global-dirs@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -5248,21 +5024,14 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.6.0: - version "13.9.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.9.0.tgz#4bf2bf635b334a173fb1daf7c5e6b218ecdc06cb" - integrity sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA== - dependencies: - type-fest "^0.20.2" - -globals@^13.9.0: +globals@^13.6.0, globals@^13.9.0: version "13.11.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.11.0.tgz#40ef678da117fe7bd2e28f1fab24951bd0255be7" integrity sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g== dependencies: type-fest "^0.20.2" -globby@^11.0.1, globby@^11.0.3: +globby@^11.0.1, globby@^11.0.4: version "11.0.4" resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== @@ -5289,9 +5058,9 @@ globby@^9.2.0: slash "^2.0.0" graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + version "4.2.8" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== handlebars@^4.7.6: version "4.7.7" @@ -5493,7 +5262,7 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -husky@^7.0.1: +husky@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.2.tgz#21900da0f30199acca43a46c043c4ad84ae88dff" integrity sha512-8yKEWNX4z2YsofXAMT7KvA1g8p+GxtB1ffV8XtpAEGuXNAbCV5wdNKH+qTpw8SM9fh4aMPDR+yQuKfgnreyZlg== @@ -5525,9 +5294,9 @@ iferr@^0.1.5: integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= ignore-walk@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" - integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== + version "3.0.4" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.4.tgz#c9a09f69b7c7b479a5d74ac1a3c0d4236d2a6335" + integrity sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ== dependencies: minimatch "^3.0.4" @@ -5549,15 +5318,7 @@ import-fresh@^2.0.0: caller-path "^2.0.0" resolve-from "^3.0.0" -import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" - integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-fresh@^3.3.0: +import-fresh@^3.0.0, import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -5584,9 +5345,9 @@ import-local@^2.0.0: resolve-cwd "^2.0.0" import-local@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" - integrity sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA== + version "3.0.3" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.3.tgz#4d51c2c495ca9393da259ec66b62e022920211e0" + integrity sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA== dependencies: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" @@ -5732,9 +5493,11 @@ is-arrayish@^0.2.1: integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= is-bigint@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" - integrity sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA== + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" is-binary-path@~2.1.0: version "2.1.0" @@ -5744,23 +5507,19 @@ is-binary-path@~2.1.0: binary-extensions "^2.0.0" is-boolean-object@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.1.tgz#3c0878f035cb821228d350d2e1e36719716a3de8" - integrity sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng== + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== dependencies: call-bind "^1.0.2" + has-tostringtag "^1.0.0" is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-callable@^1.1.4, is-callable@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" - integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== - -is-callable@^1.2.4: +is-callable@^1.1.4, is-callable@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== @@ -5801,9 +5560,11 @@ is-data-descriptor@^1.0.0: kind-of "^6.0.0" is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" is-descriptor@^0.1.0: version "0.1.6" @@ -5897,9 +5658,11 @@ is-negative-zero@^2.0.1: integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== is-number-object@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.5.tgz#6edfaeed7950cff19afedce9fbfca9ee6dd289eb" - integrity sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw== + version "1.0.6" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" + integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== + dependencies: + has-tostringtag "^1.0.0" is-number@^3.0.0: version "3.0.0" @@ -5935,24 +5698,16 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-plain-object@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-4.1.1.tgz#1a14d6452cbd50790edc7fdaa0aed5a40a35ebb5" - integrity sha512-5Aw8LLVsDlZsETVMhoMXzqsXwQqr/0vlnBYzIXJbYo2F4yYlhLHs+Ez7Bod7IIQKWkJbJfxrWD7pA1Dw1TKrwA== +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== is-potential-custom-element-name@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== -is-regex@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f" - integrity sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ== - dependencies: - call-bind "^1.0.2" - has-symbols "^1.0.2" - is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -5972,9 +5727,9 @@ is-shared-array-buffer@^1.0.1: integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== is-ssh@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.2.tgz#a4b82ab63d73976fd8263cceee27f99a88bdae2b" - integrity sha512-elEw0/0c2UscLrNG+OAorbP539E3rhliKPg+hDMWN9VwrDXfYK+4PBEykDPfxlYYtQvl84TascnQyobfQLHEhQ== + version "1.3.3" + resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.3.tgz#7f133285ccd7f2c2c7fc897b771b53d95a2b2c7e" + integrity sha512-NKzJmQzJfEEma3w5cJNcUMxoXfDjz0Zj0eyCalHn2E6VOwlzjZo0yuO2fcBSf8zhFuVCL/82/r5gRcoi6aEPVQ== dependencies: protocols "^1.1.0" @@ -5984,16 +5739,11 @@ is-stream@^1.1.0: integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= is-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" - integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== - -is-string@^1.0.5, is-string@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" - integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== -is-string@^1.0.7: +is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== @@ -6071,9 +5821,9 @@ isstream@~0.1.2: integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= istanbul-lib-coverage@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec" - integrity sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg== + version "3.0.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.2.tgz#36786d4d82aad2ea5911007e255e2da6b5f80d86" + integrity sha512-o5+eTUYzCJ11/+JhW5/FUCdfsdoYVdQ/8I/OveE2XsjehYn5DdeSnNQAbjYaO8gQ6hvGTN6GM6ddQqpTVG5j8g== istanbul-lib-instrument@^4.0.0, istanbul-lib-instrument@^4.0.3: version "4.0.3" @@ -6095,18 +5845,18 @@ istanbul-lib-report@^3.0.0: supports-color "^7.1.0" istanbul-lib-source-maps@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz#75743ce6d96bb86dc7ee4352cf6366a23f0b1ad9" - integrity sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg== + version "4.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== dependencies: debug "^4.1.1" istanbul-lib-coverage "^3.0.0" source-map "^0.6.1" istanbul-reports@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.2.tgz#d593210e5000683750cb09fc0644e4b6e27fd53b" - integrity sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw== + version "3.0.5" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.5.tgz#a2580107e71279ea6d661ddede929ffc6d693384" + integrity sha512-5+19PlhnGabNWB7kOFnuxT8H3T/iIyQzIbQMxXsURmmvKg86P2sbkrGOT77VnHw0Qr0gc2XzRaRfMZYYbSQCJQ== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" @@ -6130,32 +5880,7 @@ jest-changed-files@^27.2.5: execa "^5.0.0" throat "^6.0.1" -jest-circus@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.6.tgz#dd4df17c4697db6a2c232aaad4e9cec666926668" - integrity sha512-OJlsz6BBeX9qR+7O9lXefWoc2m9ZqcZ5Ohlzz0pTEAG4xMiZUJoacY8f4YDHxgk0oKYxj277AfOk9w6hZYvi1Q== - dependencies: - "@jest/environment" "^27.0.6" - "@jest/test-result" "^27.0.6" - "@jest/types" "^27.0.6" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^0.7.0" - expect "^27.0.6" - is-generator-fn "^2.0.0" - jest-each "^27.0.6" - jest-matcher-utils "^27.0.6" - jest-message-util "^27.0.6" - jest-runtime "^27.0.6" - jest-snapshot "^27.0.6" - jest-util "^27.0.6" - pretty-format "^27.0.6" - slash "^3.0.0" - stack-utils "^2.0.3" - throat "^6.0.1" - -jest-circus@^27.2.5: +jest-circus@^27.2.2, jest-circus@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.2.5.tgz#573256a6fb6e447ac2fc7e0ade9375013309037f" integrity sha512-eyL9IcrAxm3Saq3rmajFCwpaxaRMGJ1KJs+7hlTDinXpJmeR3P02bheM3CYohE7UfwOBmrFMJHjgo/WPcLTM+Q== @@ -6198,32 +5923,32 @@ jest-cli@^27.2.5: prompts "^2.0.1" yargs "^16.2.0" -jest-config@27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.6.tgz#119fb10f149ba63d9c50621baa4f1f179500277f" - integrity sha512-JZRR3I1Plr2YxPBhgqRspDE2S5zprbga3swYNrvY3HfQGu7p/GjyLOqwrYad97tX3U3mzT53TPHVmozacfP/3w== +jest-config@27.2.2: + version "27.2.2" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.2.2.tgz#970d8466c60ac106ac9d7d0b8dcf3ff150fa713a" + integrity sha512-2nhms3lp52ZpU0636bB6zIFHjDVtYxzFQIOHZjBFUeXcb6b41sEkWojbHaJ4FEIO44UbccTLa7tvNpiFCgPE7w== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.0.6" - "@jest/types" "^27.0.6" - babel-jest "^27.0.6" + "@jest/test-sequencer" "^27.2.2" + "@jest/types" "^27.1.1" + babel-jest "^27.2.2" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" is-ci "^3.0.0" - jest-circus "^27.0.6" - jest-environment-jsdom "^27.0.6" - jest-environment-node "^27.0.6" + jest-circus "^27.2.2" + jest-environment-jsdom "^27.2.2" + jest-environment-node "^27.2.2" jest-get-type "^27.0.6" - jest-jasmine2 "^27.0.6" + jest-jasmine2 "^27.2.2" jest-regex-util "^27.0.6" - jest-resolve "^27.0.6" - jest-runner "^27.0.6" - jest-util "^27.0.6" - jest-validate "^27.0.6" + jest-resolve "^27.2.2" + jest-runner "^27.2.2" + jest-util "^27.2.0" + jest-validate "^27.2.2" micromatch "^4.0.4" - pretty-format "^27.0.6" + pretty-format "^27.2.2" jest-config@^27.2.5: version "27.2.5" @@ -6252,15 +5977,15 @@ jest-config@^27.2.5: micromatch "^4.0.4" pretty-format "^27.2.5" -jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6, jest-diff@^27.2.5: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.6.tgz#4a7a19ee6f04ad70e0e3388f35829394a44c7b5e" - integrity sha512-Z1mqgkTCSYaFgwTlP/NUiRzdqgxmmhzHY1Tq17zL94morOHfHu3K4bgSgl+CR4GLhpV8VxkuOYuIWnQ9LnFqmg== +jest-diff@^27.0.0, jest-diff@^27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.2.5.tgz#908f7a6aca5653824516ad30e0a9fd9767e53623" + integrity sha512-7gfwwyYkeslOOVQY4tVq5TaQa92mWfC9COsVYMNVYyJTOYAqbIkoD3twi5A+h+tAPtAelRxkqY6/xu+jwTr0dA== dependencies: chalk "^4.0.0" diff-sequences "^27.0.6" jest-get-type "^27.0.6" - pretty-format "^27.0.6" + pretty-format "^27.2.5" jest-docblock@^27.0.6: version "27.0.6" @@ -6269,17 +5994,6 @@ jest-docblock@^27.0.6: dependencies: detect-newline "^3.0.0" -jest-each@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.0.6.tgz#cee117071b04060158dc8d9a66dc50ad40ef453b" - integrity sha512-m6yKcV3bkSWrUIjxkE9OC0mhBZZdhovIW5ergBYirqnkLXkyEn3oUUF/QZgyecA1cF1QFyTE8bRRl8Tfg1pfLA== - dependencies: - "@jest/types" "^27.0.6" - chalk "^4.0.0" - jest-get-type "^27.0.6" - jest-util "^27.0.6" - pretty-format "^27.0.6" - jest-each@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.2.5.tgz#378118d516db730b92096a9607b8711165946353" @@ -6291,20 +6005,7 @@ jest-each@^27.2.5: jest-util "^27.2.5" pretty-format "^27.2.5" -jest-environment-jsdom@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.0.6.tgz#f66426c4c9950807d0a9f209c590ce544f73291f" - integrity sha512-FvetXg7lnXL9+78H+xUAsra3IeZRTiegA3An01cWeXBspKXUhAwMM9ycIJ4yBaR0L7HkoMPaZsozCLHh4T8fuw== - dependencies: - "@jest/environment" "^27.0.6" - "@jest/fake-timers" "^27.0.6" - "@jest/types" "^27.0.6" - "@types/node" "*" - jest-mock "^27.0.6" - jest-util "^27.0.6" - jsdom "^16.6.0" - -jest-environment-jsdom@^27.2.5: +jest-environment-jsdom@^27.2.2, jest-environment-jsdom@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.2.5.tgz#21de3ad0e89441d961b592ba7561b16241279208" integrity sha512-QtRpOh/RQKuXniaWcoFE2ElwP6tQcyxHu0hlk32880g0KczdonCs5P1sk5+weu/OVzh5V4Bt1rXuQthI01mBLg== @@ -6317,19 +6018,7 @@ jest-environment-jsdom@^27.2.5: jest-util "^27.2.5" jsdom "^16.6.0" -jest-environment-node@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.0.6.tgz#a6699b7ceb52e8d68138b9808b0c404e505f3e07" - integrity sha512-+Vi6yLrPg/qC81jfXx3IBlVnDTI6kmRr08iVa2hFCWmJt4zha0XW7ucQltCAPhSR0FEKEoJ3i+W4E6T0s9is0w== - dependencies: - "@jest/environment" "^27.0.6" - "@jest/fake-timers" "^27.0.6" - "@jest/types" "^27.0.6" - "@types/node" "*" - jest-mock "^27.0.6" - jest-util "^27.0.6" - -jest-environment-node@^27.2.5: +jest-environment-node@^27.2.2, jest-environment-node@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.2.5.tgz#ffa1afb3604c640ec841f044d526c65912e02cef" integrity sha512-0o1LT4grm7iwrS8fIoLtwJxb/hoa3GsH7pP10P02Jpj7Mi4BXy65u46m89vEM2WfD1uFJQ2+dfDiWZNA2e6bJg== @@ -6341,57 +6030,12 @@ jest-environment-node@^27.2.5: jest-mock "^27.2.5" jest-util "^27.2.5" -jest-get-type@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.1.tgz#34951e2b08c8801eb28559d7eb732b04bbcf7815" - integrity sha512-9Tggo9zZbu0sHKebiAijyt1NM77Z0uO4tuWOxUCujAiSeXv30Vb5D4xVF4UR4YWNapcftj+PbByU54lKD7/xMg== - jest-get-type@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.6.tgz#0eb5c7f755854279ce9b68a9f1a4122f69047cfe" integrity sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg== -jest-haste-map@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.0.2.tgz#3f1819400c671237e48b4d4b76a80a0dbed7577f" - integrity sha512-37gYfrYjjhEfk37C4bCMWAC0oPBxDpG0qpl8lYg8BT//wf353YT/fzgA7+Dq0EtM7rPFS3JEcMsxdtDwNMi2cA== - dependencies: - "@jest/types" "^27.0.2" - "@types/graceful-fs" "^4.1.2" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.4" - jest-regex-util "^27.0.1" - jest-serializer "^27.0.1" - jest-util "^27.0.2" - jest-worker "^27.0.2" - micromatch "^4.0.4" - walker "^1.0.7" - optionalDependencies: - fsevents "^2.3.2" - -jest-haste-map@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.0.6.tgz#4683a4e68f6ecaa74231679dca237279562c8dc7" - integrity sha512-4ldjPXX9h8doB2JlRzg9oAZ2p6/GpQUNAeiYXqcpmrKbP0Qev0wdZlxSMOmz8mPOEnt4h6qIzXFLDi8RScX/1w== - dependencies: - "@jest/types" "^27.0.6" - "@types/graceful-fs" "^4.1.2" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.4" - jest-regex-util "^27.0.6" - jest-serializer "^27.0.6" - jest-util "^27.0.6" - jest-worker "^27.0.6" - micromatch "^4.0.4" - walker "^1.0.7" - optionalDependencies: - fsevents "^2.3.2" - -jest-haste-map@^27.2.5: +jest-haste-map@^27.2.2, jest-haste-map@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.2.5.tgz#0247b7299250643472bbcf5b4ad85c72d5178e2e" integrity sha512-pzO+Gw2WLponaSi0ilpzYBE0kuVJstoXBX8YWyUebR8VaXuX4tzzn0Zp23c/WaETo7XYTGv2e8KdnpiskAFMhQ== @@ -6411,31 +6055,7 @@ jest-haste-map@^27.2.5: optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.6.tgz#fd509a9ed3d92bd6edb68a779f4738b100655b37" - integrity sha512-cjpH2sBy+t6dvCeKBsHpW41mjHzXgsavaFMp+VWRf0eR4EW8xASk1acqmljFtK2DgyIECMv2yCdY41r2l1+4iA== - dependencies: - "@babel/traverse" "^7.1.0" - "@jest/environment" "^27.0.6" - "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.0.6" - "@jest/types" "^27.0.6" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - expect "^27.0.6" - is-generator-fn "^2.0.0" - jest-each "^27.0.6" - jest-matcher-utils "^27.0.6" - jest-message-util "^27.0.6" - jest-runtime "^27.0.6" - jest-snapshot "^27.0.6" - jest-util "^27.0.6" - pretty-format "^27.0.6" - throat "^6.0.1" - -jest-jasmine2@^27.2.5: +jest-jasmine2@^27.2.2, jest-jasmine2@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.2.5.tgz#baaf96c69913c52bce0100000cf0721027c0fd66" integrity sha512-hdxY9Cm/CjLqu2tXeAoQHPgA4vcqlweVXYOg1+S9FeFdznB9Rti+eEBKDDkmOy9iqr4Xfbq95OkC4NFbXXPCAQ== @@ -6459,14 +6079,6 @@ jest-jasmine2@^27.2.5: pretty-format "^27.2.5" throat "^6.0.1" -jest-leak-detector@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.0.6.tgz#545854275f85450d4ef4b8fe305ca2a26450450f" - integrity sha512-2/d6n2wlH5zEcdctX4zdbgX8oM61tb67PQt4Xh8JFAIy6LRKUnX528HulkaG6nD5qDl5vRV1NXejCe1XRCH5gQ== - dependencies: - jest-get-type "^27.0.6" - pretty-format "^27.0.6" - jest-leak-detector@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.2.5.tgz#e2edc3b37d38e8d9a527e10e456b403c3151b206" @@ -6475,26 +6087,6 @@ jest-leak-detector@^27.2.5: jest-get-type "^27.0.6" pretty-format "^27.2.5" -jest-matcher-utils@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.0.2.tgz#f14c060605a95a466cdc759acc546c6f4cbfc4f0" - integrity sha512-Qczi5xnTNjkhcIB0Yy75Txt+Ez51xdhOxsukN7awzq2auZQGPHcQrJ623PZj0ECDEMOk2soxWx05EXdXGd1CbA== - dependencies: - chalk "^4.0.0" - jest-diff "^27.0.2" - jest-get-type "^27.0.1" - pretty-format "^27.0.2" - -jest-matcher-utils@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.0.6.tgz#2a8da1e86c620b39459f4352eaa255f0d43e39a9" - integrity sha512-OFgF2VCQx9vdPSYTHWJ9MzFCehs20TsyFi6bIHbk5V1u52zJOnvF0Y/65z3GLZHKRuTgVPY4Z6LVePNahaQ+tA== - dependencies: - chalk "^4.0.0" - jest-diff "^27.0.6" - jest-get-type "^27.0.6" - pretty-format "^27.0.6" - jest-matcher-utils@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.2.5.tgz#4684faaa8eb32bf15e6edaead6834031897e2980" @@ -6505,36 +6097,6 @@ jest-matcher-utils@^27.2.5: jest-get-type "^27.0.6" pretty-format "^27.2.5" -jest-message-util@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.0.2.tgz#181c9b67dff504d8f4ad15cba10d8b80f272048c" - integrity sha512-rTqWUX42ec2LdMkoUPOzrEd1Tcm+R1KfLOmFK+OVNo4MnLsEaxO5zPDb2BbdSmthdM/IfXxOZU60P/WbWF8BTw== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.0.2" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.4" - micromatch "^4.0.4" - pretty-format "^27.0.2" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-message-util@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.0.6.tgz#158bcdf4785706492d164a39abca6a14da5ab8b5" - integrity sha512-rBxIs2XK7rGy+zGxgi+UJKP6WqQ+KrBbD1YMj517HYN3v2BG66t3Xan3FWqYHKZwjdB700KiAJ+iES9a0M+ixw== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.0.6" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.4" - micromatch "^4.0.4" - pretty-format "^27.0.6" - slash "^3.0.0" - stack-utils "^2.0.3" - jest-message-util@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.2.5.tgz#ed8b7b0965247bb875a49c1f9b9ab2d1d0820028" @@ -6550,14 +6112,6 @@ jest-message-util@^27.2.5: slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.0.6.tgz#0efdd40851398307ba16778728f6d34d583e3467" - integrity sha512-lzBETUoK8cSxts2NYXSBWT+EJNzmUVtVVwS1sU9GwE1DLCfGsngg+ZVSIe0yd0ZSm+y791esiuo+WSwpXJQ5Bw== - dependencies: - "@jest/types" "^27.0.6" - "@types/node" "*" - jest-mock@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.2.5.tgz#0ec38d5ff1e49c4802e7a4a8179e8d7a2fd84de0" @@ -6571,11 +6125,6 @@ jest-pnp-resolver@^1.2.2: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== -jest-regex-util@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.1.tgz#69d4b1bf5b690faa3490113c47486ed85dd45b68" - integrity sha512-6nY6QVcpTgEKQy1L41P4pr3aOddneK17kn3HJw6SdwGiKfgCGTvH02hVXL0GU8GEKtPH83eD2DIDgxHXOxVohQ== - jest-regex-util@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5" @@ -6590,37 +6139,23 @@ jest-resolve-dependencies@^27.2.5: jest-regex-util "^27.0.6" jest-snapshot "^27.2.5" -jest-resolve@27.0.6, jest-resolve@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.0.6.tgz#e90f436dd4f8fbf53f58a91c42344864f8e55bff" - integrity sha512-yKmIgw2LgTh7uAJtzv8UFHGF7Dm7XfvOe/LQ3Txv101fLM8cx2h1QVwtSJ51Q/SCxpIiKfVn6G2jYYMDNHZteA== - dependencies: - "@jest/types" "^27.0.6" - chalk "^4.0.0" - escalade "^3.1.1" - graceful-fs "^4.2.4" - jest-pnp-resolver "^1.2.2" - jest-util "^27.0.6" - jest-validate "^27.0.6" - resolve "^1.20.0" - slash "^3.0.0" - -jest-resolve@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.0.2.tgz#087a3ed17182722a3415f92bfacc99c49cf8a965" - integrity sha512-rmfLGyZhwAUR5z3EwPAW7LQTorWAuCYCcsQJoQxT2it+BOgX3zKxa67r1pfpK3ihy2k9TjYD3/lMp5rPm/CL1Q== +jest-resolve@27.2.2: + version "27.2.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.2.2.tgz#1bad93dbc6c20edb874e6720e82e4e48900b120b" + integrity sha512-tfbHcBs/hJTb3fPQ/3hLWR+TsLNTzzK98TU+zIAsrL9nNzWfWROwopUOmiSUqmHMZW5t9au/433kSF2/Af+tTw== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.1.1" chalk "^4.0.0" escalade "^3.1.1" graceful-fs "^4.2.4" + jest-haste-map "^27.2.2" jest-pnp-resolver "^1.2.2" - jest-util "^27.0.2" - jest-validate "^27.0.2" + jest-util "^27.2.0" + jest-validate "^27.2.2" resolve "^1.20.0" slash "^3.0.0" -jest-resolve@^27.2.5: +jest-resolve@^27.2.2, jest-resolve@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.2.5.tgz#04dadbfc1312a2541f5c199c5011945e9cfe5cef" integrity sha512-q5irwS3oS73SKy3+FM/HL2T7WJftrk9BRzrXF92f7net5HMlS7lJMg/ZwxLB4YohKqjSsdksEw7n/jvMxV7EKg== @@ -6636,35 +6171,7 @@ jest-resolve@^27.2.5: resolve "^1.20.0" slash "^3.0.0" -jest-runner@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.6.tgz#1325f45055539222bbc7256a6976e993ad2f9520" - integrity sha512-W3Bz5qAgaSChuivLn+nKOgjqNxM7O/9JOJoKDCqThPIg2sH/d4A/lzyiaFgnb9V1/w29Le11NpzTJSzga1vyYQ== - dependencies: - "@jest/console" "^27.0.6" - "@jest/environment" "^27.0.6" - "@jest/test-result" "^27.0.6" - "@jest/transform" "^27.0.6" - "@jest/types" "^27.0.6" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.8.1" - exit "^0.1.2" - graceful-fs "^4.2.4" - jest-docblock "^27.0.6" - jest-environment-jsdom "^27.0.6" - jest-environment-node "^27.0.6" - jest-haste-map "^27.0.6" - jest-leak-detector "^27.0.6" - jest-message-util "^27.0.6" - jest-resolve "^27.0.6" - jest-runtime "^27.0.6" - jest-util "^27.0.6" - jest-worker "^27.0.6" - source-map-support "^0.5.6" - throat "^6.0.1" - -jest-runner@^27.2.5: +jest-runner@^27.2.2, jest-runner@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.2.5.tgz#3d9d0626f351480bb2cffcfbbfac240c0097ebd4" integrity sha512-n41vw9RLg5TKAnEeJK9d6pGOsBOpwE89XBniK+AD1k26oIIy3V7ogM1scbDjSheji8MUPC9pNgCrZ/FHLVDNgg== @@ -6692,38 +6199,6 @@ jest-runner@^27.2.5: source-map-support "^0.5.6" throat "^6.0.1" -jest-runtime@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.6.tgz#45877cfcd386afdd4f317def551fc369794c27c9" - integrity sha512-BhvHLRVfKibYyqqEFkybsznKwhrsu7AWx2F3y9G9L95VSIN3/ZZ9vBpm/XCS2bS+BWz3sSeNGLzI3TVQ0uL85Q== - dependencies: - "@jest/console" "^27.0.6" - "@jest/environment" "^27.0.6" - "@jest/fake-timers" "^27.0.6" - "@jest/globals" "^27.0.6" - "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.0.6" - "@jest/transform" "^27.0.6" - "@jest/types" "^27.0.6" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.4" - jest-haste-map "^27.0.6" - jest-message-util "^27.0.6" - jest-mock "^27.0.6" - jest-regex-util "^27.0.6" - jest-resolve "^27.0.6" - jest-snapshot "^27.0.6" - jest-util "^27.0.6" - jest-validate "^27.0.6" - slash "^3.0.0" - strip-bom "^4.0.0" - yargs "^16.0.3" - jest-runtime@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.2.5.tgz#d144c3f6889b927aae1e695b63a41a3323b7016b" @@ -6757,14 +6232,6 @@ jest-runtime@^27.2.5: strip-bom "^4.0.0" yargs "^16.2.0" -jest-serializer@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.0.1.tgz#2464d04dcc33fb71dc80b7c82e3c5e8a08cb1020" - integrity sha512-svy//5IH6bfQvAbkAEg1s7xhhgHTtXu0li0I2fdKHDsLP2P2MOiscPQIENQep8oU2g2B3jqLyxKKzotZOz4CwQ== - dependencies: - "@types/node" "*" - graceful-fs "^4.2.4" - jest-serializer@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.0.6.tgz#93a6c74e0132b81a2d54623251c46c498bb5bec1" @@ -6773,67 +6240,7 @@ jest-serializer@^27.0.6: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.2.tgz#40c48dc6afd3cbc5d3d07c061f20fc10d94ca0cd" - integrity sha512-4RcgvZbPrrbEE/hT6XQ4hr+NVVLNrmsgUnYSnZRT6UAvW9Q2yzGMS+tfJh+xlQJAapnnkNJzsMn6vUa+yfiVHA== - dependencies: - "@babel/core" "^7.7.2" - "@babel/generator" "^7.7.2" - "@babel/parser" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.0.0" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/babel__traverse" "^7.0.4" - "@types/prettier" "^2.1.5" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^27.0.2" - graceful-fs "^4.2.4" - jest-diff "^27.0.2" - jest-get-type "^27.0.1" - jest-haste-map "^27.0.2" - jest-matcher-utils "^27.0.2" - jest-message-util "^27.0.2" - jest-resolve "^27.0.2" - jest-util "^27.0.2" - natural-compare "^1.4.0" - pretty-format "^27.0.2" - semver "^7.3.2" - -jest-snapshot@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.6.tgz#f4e6b208bd2e92e888344d78f0f650bcff05a4bf" - integrity sha512-NTHaz8He+ATUagUgE7C/UtFcRoHqR2Gc+KDfhQIyx+VFgwbeEMjeP+ILpUTLosZn/ZtbNdCF5LkVnN/l+V751A== - dependencies: - "@babel/core" "^7.7.2" - "@babel/generator" "^7.7.2" - "@babel/parser" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.0.0" - "@jest/transform" "^27.0.6" - "@jest/types" "^27.0.6" - "@types/babel__traverse" "^7.0.4" - "@types/prettier" "^2.1.5" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^27.0.6" - graceful-fs "^4.2.4" - jest-diff "^27.0.6" - jest-get-type "^27.0.6" - jest-haste-map "^27.0.6" - jest-matcher-utils "^27.0.6" - jest-message-util "^27.0.6" - jest-resolve "^27.0.6" - jest-util "^27.0.6" - natural-compare "^1.4.0" - pretty-format "^27.0.6" - semver "^7.3.2" - -jest-snapshot@^27.2.5: +jest-snapshot@^27.0.2, jest-snapshot@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.2.5.tgz#8a612fe31e2967f58ad364542198dff61f92ef32" integrity sha512-2/Jkn+VN6Abwz0llBltZaiJMnL8b1j5Bp/gRIxe9YR3FCEh9qp0TXVV0dcpTGZ8AcJV1SZGQkczewkI9LP5yGw== @@ -6870,19 +6277,19 @@ jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: dependencies: jest-snapshot "^27.0.2" -jest-util@27.0.6, jest-util@^27.0.0, jest-util@^27.0.2, jest-util@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.0.6.tgz#e8e04eec159de2f4d5f57f795df9cdc091e50297" - integrity sha512-1JjlaIh+C65H/F7D11GNkGDDZtDfMEM8EBXsvd+l/cxtgQ6QhxuloOaiayt89DxUvDarbVhqI98HhgrM1yliFQ== +jest-util@27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.2.0.tgz#bfccb85cfafae752257319e825a5b8d4ada470dc" + integrity sha512-T5ZJCNeFpqcLBpx+Hl9r9KoxBCUqeWlJ1Htli+vryigZVJ1vuLB9j35grEBASp4R13KFkV7jM52bBGnArpJN6A== dependencies: - "@jest/types" "^27.0.6" + "@jest/types" "^27.1.1" "@types/node" "*" chalk "^4.0.0" graceful-fs "^4.2.4" is-ci "^3.0.0" picomatch "^2.2.3" -jest-util@^27.2.5: +jest-util@^27.0.0, jest-util@^27.2.0, jest-util@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.2.5.tgz#88740c4024d223634a82ce7c2263e8bc6df3b3ba" integrity sha512-QRhDC6XxISntMzFRd/OQ6TGsjbzA5ONO0tlAj2ElHs155x1aEr0rkYJBEysG6H/gZVH3oGFzCdAB/GA8leh8NQ== @@ -6894,31 +6301,7 @@ jest-util@^27.2.5: is-ci "^3.0.0" picomatch "^2.2.3" -jest-validate@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.0.2.tgz#7fe2c100089449cd5cbb47a5b0b6cb7cda5beee5" - integrity sha512-UgBF6/oVu1ofd1XbaSotXKihi8nZhg0Prm8twQ9uCuAfo59vlxCXMPI/RKmrZEVgi3Nd9dS0I8A0wzWU48pOvg== - dependencies: - "@jest/types" "^27.0.2" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^27.0.1" - leven "^3.1.0" - pretty-format "^27.0.2" - -jest-validate@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.0.6.tgz#930a527c7a951927df269f43b2dc23262457e2a6" - integrity sha512-yhZZOaMH3Zg6DC83n60pLmdU1DQE46DW+KLozPiPbSbPhlXXaiUTDlhHQhHFpaqIFRrInko1FHXjTRpjWRuWfA== - dependencies: - "@jest/types" "^27.0.6" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^27.0.6" - leven "^3.1.0" - pretty-format "^27.0.6" - -jest-validate@^27.2.5: +jest-validate@^27.2.2, jest-validate@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.2.5.tgz#2d59bf1627d180f395ba58f24599b0ee0efcfbdf" integrity sha512-XgYtjS89nhVe+UfkbLgcm+GgXKWgL80t9nTcNeejyO3t0Sj/yHE8BtIJqjZu9NXQksYbGImoQRXmQ1gP+Guffw== @@ -6943,25 +6326,7 @@ jest-watcher@^27.2.5: jest-util "^27.2.5" string-length "^4.0.1" -jest-worker@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.2.tgz#4ebeb56cef48b3e7514552f80d0d80c0129f0b05" - integrity sha512-EoBdilOTTyOgmHXtw/cPc+ZrCA0KJMrkXzkrPGNwLmnvvlN1nj7MPrxpT7m+otSv2e1TLaVffzDnE/LB14zJMg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest-worker@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.6.tgz#a5fdb1e14ad34eb228cfe162d9f729cdbfa28aed" - integrity sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest-worker@^27.2.5: +jest-worker@^27.2.2, jest-worker@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.2.5.tgz#ed42865661959488aa020e8a325df010597c36d4" integrity sha512-HTjEPZtcNKZ4LnhSp02NEH4vE+5OpJ0EsOWYvGQpHgUMLngydESAAMH5Wd/asPf29+XUDQZszxpLg1BkIIA2aw== @@ -6970,7 +6335,7 @@ jest-worker@^27.2.5: merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^27.0.3: +jest@^27.1.0: version "27.2.5" resolved "https://registry.yarnpkg.com/jest/-/jest-27.2.5.tgz#7d8a5c8781a160f693beeb7c68e46c16ef948148" integrity sha512-vDMzXcpQN4Ycaqu+vO7LX8pZwNNoKMhc+gSp6q1D8S6ftRk8gNW8cni3YFxknP95jxzQo23Lul0BI2FrWgnwYQ== @@ -7010,9 +6375,9 @@ jsbn@~0.1.0: integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= jsdom@^16.6.0: - version "16.6.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.6.0.tgz#f79b3786682065492a3da6a60a4695da983805ac" - integrity sha512-Ty1vmF4NHJkolaEmdjtxTfSfkdb8Ywarwf63f+F8/mDD1uLSSWDxDuMiZxiPhwunLrn9LOSVItWj4bLYsLN3Dg== + version "16.7.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" + integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== dependencies: abab "^2.0.5" acorn "^8.2.4" @@ -7039,7 +6404,7 @@ jsdom@^16.6.0: whatwg-encoding "^1.0.5" whatwg-mimetype "^2.3.0" whatwg-url "^8.5.0" - ws "^7.4.5" + ws "^7.4.6" xml-name-validator "^3.0.0" jsesc@^2.5.1: @@ -7048,12 +6413,12 @@ jsesc@^2.5.1: integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== json-fixer@^1.5.1: - version "1.6.3" - resolved "https://registry.yarnpkg.com/json-fixer/-/json-fixer-1.6.3.tgz#1beaf69b137ed3588b8fdb5a5a507f4b3f276fe4" - integrity sha512-JSjfJJaKCQpSNEh+Tw1lX2L8MnDjIxfBpPTWUO/XN0JUY87nHJiFBy5i0Tm8o7/841LWfMDbqhn7UjhkjrZKkw== + version "1.6.12" + resolved "https://registry.yarnpkg.com/json-fixer/-/json-fixer-1.6.12.tgz#352026c905c6366e214c9f10f77d6d7f93c48322" + integrity sha512-BGO9HExf0ZUVYvuWsps71Re513Ss0il1Wp7wYWkir2NthzincvNJEUu82KagEfAkGdjOMsypj3t2JB7drBKWnA== dependencies: - "@babel/runtime" "^7.11.0" - chalk "^4.1.0" + "@babel/runtime" "^7.14.6" + chalk "^4.1.1" pegjs "^0.10.0" json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1: @@ -7062,9 +6427,9 @@ json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1: integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== json-parse-even-better-errors@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.0.tgz#371873c5ffa44304a6ba12419bcfa95f404ae081" - integrity sha512-o3aP+RsWDJZayj1SbHNQAI8x0v3T3SKiGoZlNYfbUP1S3omJQ6i9CnqADqkSPaOAxwua4/1YWx5CM7oiChJt2Q== + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== json-schema-traverse@^0.4.1: version "0.4.1" @@ -7113,11 +6478,11 @@ jsonfile@^4.0.0: graceful-fs "^4.1.6" jsonfile@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" - integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== dependencies: - universalify "^1.0.0" + universalify "^2.0.0" optionalDependencies: graceful-fs "^4.1.6" @@ -7160,13 +6525,6 @@ kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== -klaw-sync@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" - integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== - dependencies: - graceful-fs "^4.1.11" - kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" @@ -7223,13 +6581,13 @@ lines-and-columns@^1.1.6: integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= linkify-it@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.2.tgz#f55eeb8bc1d3ae754049e124ab3bb56d97797fb8" - integrity sha512-gDBO4aHNZS6coiZCKVhSNh43F9ioIL4JwRjLZPkoLIY4yZFwg264Y5lu2x6rb1Js42Gh6Yqm2f6L2AJcnkzinQ== + version "3.0.3" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e" + integrity sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ== dependencies: uc.micro "^1.0.1" -lint-staged@^11.0.0: +lint-staged@^11.1.2: version "11.2.3" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.2.3.tgz#fc3f4569cc4f46553309dfc1447b8aef69f744fb" integrity sha512-Tfmhk8O2XFMD25EswHPv+OYhUjsijy5D7liTdxeXvhG2rsadmOLFtyj8lmlfoFFXY8oXWAIOKpoI+lJe1DB1mw== @@ -7442,9 +6800,9 @@ lru-cache@^6.0.0: yallist "^4.0.0" macos-release@^2.2.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.4.1.tgz#64033d0ec6a5e6375155a74b1a1eba8e509820ac" - integrity sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg== + version "2.5.0" + resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.5.0.tgz#067c2c88b5f3fb3c56a375b2ec93826220fa1ff2" + integrity sha512-EIgv+QZ9r+814gjJj0Bt5vSLJLzswGmSUbUpbi9AIr/fsN2IWFBl2NucV9PAiek+U1STK468tEkxmVYUtuAN3g== make-dir@*, make-dir@^3.0.0, make-dir@^3.1.0: version "3.1.0" @@ -7513,9 +6871,9 @@ map-obj@^2.0.0: integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= map-obj@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.1.0.tgz#b91221b542734b9f14256c0132c897c5d7256fd5" - integrity sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g== + version "4.3.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" + integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== map-visit@^1.0.0: version "1.0.0" @@ -7524,10 +6882,10 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -markdown-it@12.0.4: - version "12.0.4" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.4.tgz#eec8247d296327eac3ba9746bdeec9cfcc751e33" - integrity sha512-34RwOXZT8kyuOJy25oJNJoulO8L0bTHYWXcdZBYZqFnjIy3NgjeoM3FmPXIOFQ26/lSHYMr8oc62B6adxXcb3Q== +markdown-it@12.2.0: + version "12.2.0" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.2.0.tgz#091f720fd5db206f80de7a8d1f1a7035fd0d38db" + integrity sha512-Wjws+uCrVQRqOoJvze4HCqkKl1AsSh95iFAeQDwnyfxM09divCBSXlDR1uTvyUP3Grzpn4Ru8GeCxYPM8vkCQg== dependencies: argparse "^2.0.1" entities "~2.1.0" @@ -7535,39 +6893,39 @@ markdown-it@12.0.4: mdurl "^1.0.1" uc.micro "^1.0.5" -markdownlint-cli@^0.28.1: - version "0.28.1" - resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.28.1.tgz#76f1d8d50f81dce524826c93bf0f95af9cbe9397" - integrity sha512-RBKtRRBzcuAF/H5wMSzb4zvEtbUkyYNEeaDtlQkyH9SoHWPL01emJ2Wrx6NEOa1ZDGwB+seBGvE157Qzc/t/vA== +markdownlint-cli@^0.29.0: + version "0.29.0" + resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.29.0.tgz#3c56686fd00ace4b68c9cfa3a34a7a9dfdef1417" + integrity sha512-SEXRUT1ri9sXV8xQK88vjGAgmz2X9rxEG2tXdDZMljzW8e++LNTO9zzBBStx3JQWrTDoGTPHNrcurbuiyF97gw== dependencies: - commander "~8.0.0" + commander "~8.2.0" deep-extend "~0.6.0" get-stdin "~8.0.0" - glob "~7.1.7" + glob "~7.2.0" ignore "~5.1.8" js-yaml "^4.1.0" jsonc-parser "~3.0.0" lodash.differencewith "~4.5.0" lodash.flatten "~4.4.0" - markdownlint "~0.23.1" - markdownlint-rule-helpers "~0.14.0" + markdownlint "~0.24.0" + markdownlint-rule-helpers "~0.15.0" minimatch "~3.0.4" minimist "~1.2.5" run-con "~1.2.10" -markdownlint-rule-helpers@~0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.14.0.tgz#4d0e1ae320e85559d8cbed1490934855791627bb" - integrity sha512-vRTPqSU4JK8vVXmjICHSBhwXUvbfh/VJo+j7hvxqe15tLJyomv3FLgFdFgb8kpj0Fe8SsJa/TZUAXv7/sN+N7A== +markdownlint-rule-helpers@~0.15.0: + version "0.15.0" + resolved "https://registry.yarnpkg.com/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.15.0.tgz#11434c573649b9235ae70b967314f5711f7d8fa8" + integrity sha512-A+9mswc3m/kkqpJCqntmte/1VKhDJ+tjZsERLz5L4h/Qr7ht2/BkGkgY5E7/wsxIhcpl+ctIfz+oS3PQrMOB2w== -markdownlint@~0.23.1: - version "0.23.1" - resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.23.1.tgz#98292b5d340d01e9c113f3d7fb3b2ccf89628dc2" - integrity sha512-iOEwhDfNmq2IJlaA8mzEkHYUi/Hwoa6Ss+HO5jkwUR6wQ4quFr0WzSx+Z9rsWZKUaPbyirIdL1zGmJRkWawr4Q== +markdownlint@~0.24.0: + version "0.24.0" + resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.24.0.tgz#224b53f671367a237d40c8be1745c7be9a322671" + integrity sha512-OJIGsGFV/rC9irI5E1FMy6v9hdACSwaa+EN3224Y5KG8zj2EYzdHOw0pOJovIYmjNfEZ9BtxUY4P7uYHTSNnbQ== dependencies: - markdown-it "12.0.4" + markdown-it "12.2.0" -marked@^2.0.6: +marked@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/marked/-/marked-2.1.3.tgz#bd017cef6431724fd4b27e0657f5ceb14bff3753" integrity sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA== @@ -7613,23 +6971,6 @@ meow@^4.0.0: redent "^2.0.0" trim-newlines "^2.0.0" -meow@^7.0.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/meow/-/meow-7.1.1.tgz#7c01595e3d337fcb0ec4e8eed1666ea95903d306" - integrity sha512-GWHvA5QOcS412WCo8vwKDlTelGLsCGBVevQB5Kva961rmNfun0PCbv5+xta2kUMFJyR8/oWnn7ddeKdosbAPbA== - dependencies: - "@types/minimist" "^1.2.0" - camelcase-keys "^6.2.2" - decamelize-keys "^1.1.0" - hard-rejection "^2.1.0" - minimist-options "4.1.0" - normalize-package-data "^2.5.0" - read-pkg-up "^7.0.1" - redent "^3.0.0" - trim-newlines "^3.0.0" - type-fest "^0.13.1" - yargs-parser "^18.1.3" - meow@^8.0.0: version "8.1.2" resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" @@ -7657,12 +6998,12 @@ merge2@^1.2.3, merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -merge@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" - integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== +merge@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/merge/-/merge-2.1.1.tgz#59ef4bf7e0b3e879186436e8481c06a6c162ca98" + integrity sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w== -micromatch@^3.0.4, micromatch@^3.1.10: +micromatch@^3.1.10: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -7689,17 +7030,17 @@ micromatch@^4.0.2, micromatch@^4.0.4: braces "^3.0.1" picomatch "^2.2.3" -mime-db@1.44.0: - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== +mime-db@1.50.0: + version "1.50.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.50.0.tgz#abd4ac94e98d3c0e185016c67ab45d5fde40c11f" + integrity sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A== mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + version "2.1.33" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.33.tgz#1fa12a904472fafd068e48d9e8401f74d3f70edb" + integrity sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g== dependencies: - mime-db "1.44.0" + mime-db "1.50.0" mimic-fn@^1.0.0: version "1.2.0" @@ -7754,9 +7095,9 @@ minipass@^2.3.5, minipass@^2.6.0, minipass@^2.9.0: yallist "^3.0.0" minipass@^3.0.0: - version "3.1.3" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" - integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== + version "3.1.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.5.tgz#71f6251b0a33a49c01b3cf97ff77eda030dff732" + integrity sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw== dependencies: yallist "^4.0.0" @@ -7840,11 +7181,16 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@2.1.2, ms@^2.0.0, ms@^2.1.1: +ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.0.0, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + multimatch@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-3.0.0.tgz#0e2534cc6bc238d9ab67e1b9cd5fcd85a6dbf70b" @@ -7906,6 +7252,11 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +node-addon-api@^3.0.2: + version "3.2.1" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" + integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== + node-fetch-npm@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz#6507d0e17a9ec0be3bec516958a497cec54bf5a4" @@ -7915,7 +7266,14 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" -node-fetch@*, node-fetch@^3.0.0: +node-fetch@^2.5.0, node-fetch@^2.6.0, node-fetch@^2.6.1: + version "2.6.5" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.5.tgz#42735537d7f080a7e5f78b6c549b7146be1742fd" + integrity sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ== + dependencies: + whatwg-url "^5.0.0" + +node-fetch@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.0.0.tgz#79da7146a520036f2c5f644e4a26095f17e411ea" integrity sha512-bKMI+C7/T/SPU1lKnbQbwxptpCrG9ashG+VkytmXCPZyuM9jB6VU+hY0oi4lC8LxTtAeWdckNCTa3nrGsAdA3Q== @@ -7923,10 +7281,10 @@ node-fetch@*, node-fetch@^3.0.0: data-uri-to-buffer "^3.0.1" fetch-blob "^3.1.2" -node-fetch@^2.3.0, node-fetch@^2.5.0, node-fetch@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== +node-gyp-build@^4.2.3: + version "4.3.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.3.0.tgz#9f256b03e5826150be39c764bf51e993946d71a3" + integrity sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q== node-gyp@^5.0.2: version "5.1.1" @@ -7960,10 +7318,10 @@ node-modules-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= -node-releases@^1.1.71: - version "1.1.72" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.72.tgz#14802ab6b1039a79a0c7d662b610a5bbd76eacbe" - integrity sha512-LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw== +node-releases@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.0.tgz#67dc74903100a7deb044037b8a2e5f453bb05400" + integrity sha512-aA87l0flFYMzCHpTM3DERFSYxc6lv/BltdbRTOMZuxZ0cwZCD3mejE5n9vLhSJCN++/eOqr77G1IO5uXxlQYWA== nopt@^4.0.1: version "4.0.3" @@ -7998,15 +7356,15 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -normalize-url@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" - integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== +normalize-url@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" + integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== npm-bundled@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" - integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== + version "1.1.2" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.2.tgz#944c78789bd739035b70baa2ca5cc32b8d860bc1" + integrity sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ== dependencies: npm-normalize-package-bin "^1.0.1" @@ -8106,10 +7464,10 @@ nwsapi@^2.2.0: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== -nx@12.9.0: - version "12.9.0" - resolved "https://registry.yarnpkg.com/nx/-/nx-12.9.0.tgz#8553ce806fd19181ad8f81395f7812ab9fe5d4e2" - integrity sha512-AOyMJPpioeMtY1UJ2Zgxyjfsc6rg31uztqiCZIQEOLwXoYIYiPuz54IhTngW7c1MjtxDl8B62G8xCjlRv2zjhw== +nx@12.10.0: + version "12.10.0" + resolved "https://registry.yarnpkg.com/nx/-/nx-12.10.0.tgz#a4e8fba7254529de69fe54e5b4b007e8a432a3fb" + integrity sha512-LpCfZCWsVEtmD2SI1j2KRaw1uIyn4DJ3eRzsjnDYitbq38aORpkvYO+L0zVMZRNDSYSRGTsuj0nHCS3OOxK/Cg== dependencies: "@nrwl/cli" "*" @@ -8132,11 +7490,6 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" - integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== - object-inspect@^1.11.0, object-inspect@^1.9.0: version "1.11.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" @@ -8165,12 +7518,13 @@ object.assign@^4.1.2: object-keys "^1.1.1" object.getownpropertydescriptors@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" - integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== + version "2.1.3" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz#b223cf38e17fefb97a63c10c91df72ccb386df9e" + integrity sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw== dependencies: + call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" + es-abstract "^1.19.1" object.pick@^1.3.0: version "1.3.0" @@ -8423,9 +7777,9 @@ parse-json@^4.0.0: json-parse-better-errors "^1.0.1" parse-json@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.1.0.tgz#f96088cdf24a8faa9aea9a009f2d9d942c999646" - integrity sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ== + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" error-ex "^1.3.1" @@ -8438,20 +7792,22 @@ parse-passwd@^1.0.0: integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= parse-path@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.2.tgz#ef14f0d3d77bae8dd4bc66563a4c151aac9e65aa" - integrity sha512-HSqVz6iuXSiL8C1ku5Gl1Z5cwDd9Wo0q8CoffdAghP6bz8pJa1tcMC+m4N+z6VAS8QdksnIGq1TB6EgR4vPR6w== + version "4.0.3" + resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.3.tgz#82d81ec3e071dcc4ab49aa9f2c9c0b8966bb22bf" + integrity sha512-9Cepbp2asKnWTJ9x2kpw6Fe8y9JDbqwahGCTvklzd/cEq5C5JC59x2Xb0Kx+x0QZ8bvNquGO8/BWP0cwBHzSAA== dependencies: is-ssh "^1.3.0" protocols "^1.4.0" + qs "^6.9.4" + query-string "^6.13.8" -parse-url@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-5.0.2.tgz#856a3be1fcdf78dc93fc8b3791f169072d898b59" - integrity sha512-Czj+GIit4cdWtxo3ISZCvLiUjErSo0iI3wJ+q9Oi3QuMYTI6OZu+7cewMWZ+C1YAnKhYTk6/TLuhIgCypLthPA== +parse-url@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-6.0.0.tgz#f5dd262a7de9ec00914939220410b66cff09107d" + integrity sha512-cYyojeX7yIIwuJzledIHeLUBVJ6COVLeT4eF+2P6aKVzwvgKQPndCBv3+yQ7pcWjqToYwaligxzSYNNmGoMAvw== dependencies: is-ssh "^1.3.0" - normalize-url "^3.3.0" + normalize-url "^6.1.0" parse-path "^4.0.0" protocols "^1.4.0" @@ -8465,25 +7821,6 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= -patch-package@^6.4.7: - version "6.4.7" - resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.4.7.tgz#2282d53c397909a0d9ef92dae3fdeb558382b148" - integrity sha512-S0vh/ZEafZ17hbhgqdnpunKDfzHQibQizx9g8yEf5dcVk3KOflOfdufRXQX8CSEkyOQwuM/bNz1GwKvFj54kaQ== - dependencies: - "@yarnpkg/lockfile" "^1.1.0" - chalk "^2.4.2" - cross-spawn "^6.0.5" - find-yarn-workspace-root "^2.0.0" - fs-extra "^7.0.1" - is-ci "^2.0.0" - klaw-sync "^6.0.0" - minimist "^1.2.0" - open "^7.4.2" - rimraf "^2.6.3" - semver "^5.6.0" - slash "^2.0.0" - tmp "^0.0.33" - path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -8557,10 +7894,15 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.3.tgz#465547f359ccc206d3c48e46a1bcb89bf7ee619d" - integrity sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg== + version "2.3.0" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== pidtree@^0.3.0: version "0.3.1" @@ -8649,17 +7991,12 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prettier@*: - version "2.3.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6" - integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA== - -prettier@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" - integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== +prettier@*, prettier@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c" + integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA== -pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6, pretty-format@^27.2.5: +pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.2.2, pretty-format@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.5.tgz#7cfe2a8e8f01a5b5b29296a0b70f4140df0830c5" integrity sha512-+nYn2z9GgicO9JiqmY25Xtq8SYfZ/5VCpEU3pppHHNAhd1y+ZXxmNPd1evmNcAd6Hz4iBV2kf0UpGth5A/VJ7g== @@ -8693,9 +8030,9 @@ promise-retry@^1.1.1: retry "^0.10.0" prompts@^2.0.1: - version "2.4.0" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.0.tgz#4aa5de0723a231d1ee9121c40fdf663df73f61d7" - integrity sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ== + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== dependencies: kleur "^3.0.3" sisteransi "^1.0.5" @@ -8764,11 +8101,33 @@ q@^1.5.1: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= +qs@^6.9.4: + version "6.10.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a" + integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg== + dependencies: + side-channel "^1.0.4" + qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== +query-string@^6.13.8: + version "6.14.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a" + integrity sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw== + dependencies: + decode-uri-component "^0.2.0" + filter-obj "^1.1.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" @@ -8780,9 +8139,9 @@ quick-lru@^4.0.1: integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== react-is@^17.0.1: - version "17.0.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" - integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA== + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" + integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== read-cmd-shim@^1.0.1: version "1.0.5" @@ -8941,9 +8300,9 @@ redent@^3.0.0: strip-indent "^3.0.0" regenerator-runtime@^0.13.4: - version "0.13.7" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" - integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== + version "0.13.9" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" + integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" @@ -8953,15 +8312,15 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpp@^3.1.0, regexpp@^3.2.0: +regexpp@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + version "1.1.4" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" + integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== repeat-string@^1.6.1: version "1.6.1" @@ -9156,9 +8515,11 @@ run-con@~1.2.10: strip-json-comments "~3.1.1" run-parallel@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" - integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q== + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" @@ -9314,9 +8675,9 @@ side-channel@^1.0.4: object-inspect "^1.9.0" signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + version "3.0.5" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.5.tgz#9e3e8cc0c75a99472b44321033a7702e7738252f" + integrity sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ== sisteransi@^1.0.5: version "1.0.5" @@ -9357,9 +8718,9 @@ slide@^1.1.6: integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= smart-buffer@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" - integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== snapdragon-node@^2.0.1: version "2.1.1" @@ -9434,9 +8795,9 @@ source-map-support@^0.5.17, source-map-support@^0.5.6: source-map "^0.6.0" source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" @@ -9475,9 +8836,14 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.5" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" - integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + version "3.0.10" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz#0d9becccde7003d6c658d487dd48a32f0bf3014b" + integrity sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA== + +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -9535,9 +8901,9 @@ ssri@^6.0.0, ssri@^6.0.1: figgy-pudding "^3.5.1" stack-utils@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277" - integrity sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw== + version "2.0.5" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5" + integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA== dependencies: escape-string-regexp "^2.0.0" @@ -9562,15 +8928,20 @@ stream-shift@^1.0.0: resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= + string-argv@0.3.1, string-argv@~0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== string-length@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.1.tgz#4a973bf31ef77c4edbceadd6af2611996985f8a1" - integrity sha512-PKyXUd0LK0ePjSOnWn34V2uD6acUWev9uy0Ft05k0E8xRW+SKcA0F7eMr7h5xlzfn+4O3N+55rduYyet3Jk+jw== + version "4.0.2" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== dependencies: char-regex "^1.0.2" strip-ansi "^6.0.0" @@ -9602,22 +8973,22 @@ string-width@^3.0.0, string-width@^3.1.0: strip-ansi "^5.1.0" string-width@^4.1.0, string-width@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" - integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" + strip-ansi "^6.0.1" string.prototype.padend@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.2.tgz#6858ca4f35c5268ebd5e8615e1327d55f59ee311" - integrity sha512-/AQFLdYvePENU3W5rgurfWSMU6n+Ww8n/3cUt7E+vPBB/D7YDG8x+qjoFs4M/alR2bW7Qg6xMjVwWUOvuQ0XpQ== + version "3.1.3" + resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.3.tgz#997a6de12c92c7cb34dc8a201a6c53d9bd88a5f1" + integrity sha512-jNIIeokznm8SD/TZISQsZKYu7RJyheFNt84DUPrh482GC8RVp2MKqm2O5oBRdGxbDQoXrhhWtPIWQOiy20svUg== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" + es-abstract "^1.19.1" string.prototype.trimend@^1.0.4: version "1.0.4" @@ -9658,6 +9029,13 @@ stringify-object@3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" +strip-ansi@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -9773,9 +9151,9 @@ supports-color@^7.0.0, supports-color@^7.1.0: has-flag "^4.0.0" supports-hyperlinks@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz#f663df252af5f37c5d49bbd7eeefa9e0b9e59e47" - integrity sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb" + integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ== dependencies: has-flag "^4.0.0" supports-color "^7.0.0" @@ -9786,9 +9164,9 @@ symbol-tree@^3.2.4: integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== tapable@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" - integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== tar@6.1.11: version "6.1.11" @@ -9991,13 +9369,18 @@ tr46@^1.0.1: dependencies: punycode "^2.1.0" -tr46@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.0.2.tgz#03273586def1595ae08fedb38d7733cee91d2479" - integrity sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg== +tr46@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" + integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== dependencies: punycode "^2.1.1" +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" @@ -10009,16 +9392,11 @@ trim-newlines@^2.0.0: integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= trim-newlines@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.0.tgz#79726304a6a898aa8373427298d54c2ee8b1cb30" - integrity sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA== - -trim-off-newlines@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" - integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= + version "3.0.1" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" + integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== -ts-jest@^27.0.1: +ts-jest@^27.0.5: version "27.0.5" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.5.tgz#0b0604e2271167ec43c12a69770f0bb65ad1b750" integrity sha512-lIJApzfTaSSbtlksfFNHkWOzLJuuSm4faFAfo5kvzOiRAuoN4/eKxVJ2zEAho8aecE04qX6K1pAzfH5QHL1/8w== @@ -10032,7 +9410,7 @@ ts-jest@^27.0.1: semver "7.x" yargs-parser "20.x" -ts-node@^10.0.0: +ts-node@^10.2.1: version "10.3.0" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.3.0.tgz#a797f2ed3ff50c9a5d814ce400437cb0c1c048b4" integrity sha512-RYIy3i8IgpFH45AX4fQHExrT8BxDeKTdC83QFJkNzkvt8uFB6QJ8XMyhynYiKMLxt9a7yuXaDBZNOYS3XjDcYw== @@ -10073,20 +9451,15 @@ tsconfig-paths@^3.11.0: strip-bom "^3.0.0" tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" - integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2: +tslib@^2, tslib@^2.0.0: version "2.3.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== -tslib@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" - integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== - tslint@^6.1.3: version "6.1.3" resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.3.tgz#5c23b2eccc32487d5523bd3a470e9aa31789d904" @@ -10151,16 +9524,6 @@ type-detect@4.0.8: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== -type-fest@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" - integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== - -type-fest@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" - integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== - type-fest@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" @@ -10171,6 +9534,11 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + type-fest@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" @@ -10198,10 +9566,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.4.2, "typescript@>=3.3.1 <4.5.0", typescript@^4.1.0-dev.20201026, typescript@^4.4.3, typescript@~4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86" - integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ== +typescript@*, typescript@4.4.4, "typescript@>=3.3.1 <4.5.0", typescript@^4.1.0-dev.20201026, typescript@^4.4.3, typescript@~4.4.2: + version "4.4.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" + integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" @@ -10209,9 +9577,9 @@ uc.micro@^1.0.1, uc.micro@^1.0.5: integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== uglify-js@^3.1.4: - version "3.13.5" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.5.tgz#5d71d6dbba64cf441f32929b1efce7365bb4f113" - integrity sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw== + version "3.14.2" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.14.2.tgz#d7dd6a46ca57214f54a2d0a43cad0f35db82ac99" + integrity sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A== uid-number@0.0.6: version "0.0.6" @@ -10281,11 +9649,6 @@ universalify@^0.1.0, universalify@^0.1.2: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -universalify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" - integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== - universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" @@ -10305,9 +9668,9 @@ upath@^1.2.0: integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" @@ -10343,16 +9706,7 @@ v8-compile-cache@2.3.0, v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== -v8-to-istanbul@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.0.0.tgz#4229f2a99e367f3f018fa1d5c2b8ec684667c69c" - integrity sha512-LkmXi8UUNxnCC+JlH7/fsfsKr5AU110l+SYGJimWNkWhxbN5EyeOtm1MJ0hhvqMMOhGwBj1Fp70Yv9i+hX0QAg== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - source-map "^0.7.3" - -v8-to-istanbul@^8.1.0: +v8-to-istanbul@^8.0.0, v8-to-istanbul@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz#0aeb763894f1a0a1676adf8a8b7612a38902446c" integrity sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA== @@ -10428,6 +9782,11 @@ web-streams-polyfill@^3.0.3: resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.1.1.tgz#1516f2d4ea8f1bdbfed15eb65cb2df87098c8364" integrity sha512-Czi3fG883e96T4DLEPRvufrF2ydhOOW1+1a6c3gNjH2aIh50DNFBdfwh2AKoOf1rXvpvavAoA11Qdq9+BKjE0Q== +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -10455,6 +9814,14 @@ whatwg-mimetype@^2.3.0: resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + whatwg-url@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" @@ -10465,12 +9832,12 @@ whatwg-url@^7.0.0: webidl-conversions "^4.0.2" whatwg-url@^8.0.0, whatwg-url@^8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.5.0.tgz#7752b8464fc0903fec89aa9846fc9efe07351fd3" - integrity sha512-fy+R77xWv0AiqfLl4nuGUlQ3/6b5uNfQ4WAbGQVMYshCTCCPK9psC1nWh3XHuxGVCtlcDDQPQW1csmmIQo+fwg== + version "8.7.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" + integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== dependencies: lodash "^4.7.0" - tr46 "^2.0.2" + tr46 "^2.1.0" webidl-conversions "^6.1.0" which-boxed-primitive@^1.0.2: @@ -10610,10 +9977,10 @@ write-pkg@^3.1.0: sort-keys "^2.0.0" write-json-file "^2.2.0" -ws@^7.4.5: - version "7.4.6" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" - integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== +ws@^7.4.6: + version "7.5.5" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.5.tgz#8b4bc4af518cfabd0473ae4f99144287b33eb881" + integrity sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w== xdg-basedir@^4.0.0: version "4.0.0" @@ -10641,9 +10008,9 @@ y18n@^4.0.0: integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== y18n@^5.0.5: - version "5.0.5" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" - integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" @@ -10656,29 +10023,29 @@ yallist@^4.0.0: integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== yaml@^1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" - integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== yargs-parser@20.0.0: version "20.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.0.0.tgz#c65a1daaa977ad63cebdd52159147b789a4e19a9" integrity sha512-8eblPHTL7ZWRkyjIZJjnGf+TijiKJSwA24svzLRVvtgoi/RZiKa9fFQTrlx0OKLnyHSdt/enrdadji6WFfESVA== -yargs-parser@20.x, yargs-parser@^20.2.2: - version "20.2.6" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.6.tgz#69f920addf61aafc0b8b89002f5d66e28f2d8b20" - integrity sha512-AP1+fQIWSM/sMiET8fyayjx/J+JmTPt2Mr0FkrgqB4todtfa53sOsrSAcIrJRD5XS20bKUwaDIuMkWKCEiQLKA== +yargs-parser@20.x, yargs-parser@^20.2.2, yargs-parser@^20.2.3: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== yargs-parser@^15.0.1: - version "15.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.1.tgz#54786af40b820dcb2fb8025b11b4d659d76323b3" - integrity sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw== + version "15.0.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.3.tgz#316e263d5febe8b38eef61ac092b33dfcc9b1115" + integrity sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA== dependencies: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^18.1.2, yargs-parser@^18.1.3: +yargs-parser@^18.1.2: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== @@ -10686,11 +10053,6 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^20.2.3: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - yargs@15.4.1, yargs@^15.0.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" @@ -10725,7 +10087,7 @@ yargs@^14.2.2: y18n "^4.0.0" yargs-parser "^15.0.1" -yargs@^16.0.3, yargs@^16.2.0: +yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== @@ -10739,9 +10101,9 @@ yargs@^16.0.3, yargs@^16.2.0: yargs-parser "^20.2.2" yargs@^17.0.0: - version "17.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.0.1.tgz#6a1ced4ed5ee0b388010ba9fd67af83b9362e0bb" - integrity sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ== + version "17.2.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.2.1.tgz#e2c95b9796a0e1f7f3bf4427863b42e0418191ea" + integrity sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q== dependencies: cliui "^7.0.2" escalade "^3.1.1" From 713fd774968c187da52e0b249155c6f3543bfb1d Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Sun, 17 Oct 2021 22:48:47 -0300 Subject: [PATCH 447/473] refactor(eslint-plugin): avoid looking for nodes that do not match the provided options (#3922) * refactor(eslint-plugin): avoid looking for nodes that do not match the provided options * refactor: normalize options indexes access Co-authored-by: Josh Goldberg --- .../eslint-plugin-tslint/src/rules/config.ts | 8 +- .../src/rules/class-literal-property-style.ts | 67 ++++--- .../rules/consistent-indexed-object-style.ts | 98 +++++----- .../src/rules/consistent-type-definitions.ts | 20 +- .../rules/explicit-module-boundary-types.ts | 1 - .../src/rules/init-declarations.ts | 9 +- .../src/rules/lines-between-class-members.ts | 4 +- .../src/rules/method-signature-style.ts | 182 +++++++++--------- .../src/rules/no-duplicate-imports.ts | 3 +- .../src/rules/no-unused-expressions.ts | 3 +- .../eslint-plugin/src/rules/no-unused-vars.ts | 2 +- .../src/rules/object-curly-spacing.ts | 7 +- .../rules/prefer-readonly-parameter-types.ts | 10 +- .../src/rules/promise-function-async.ts | 24 +-- .../src/rules/restrict-plus-operands.ts | 8 +- .../sort-type-union-intersection-members.ts | 16 +- .../src/rules/space-before-function-paren.ts | 8 +- packages/eslint-plugin/src/rules/typedef.ts | 154 ++++++++------- 18 files changed, 310 insertions(+), 314 deletions(-) diff --git a/packages/eslint-plugin-tslint/src/rules/config.ts b/packages/eslint-plugin-tslint/src/rules/config.ts index e865d8cbcdce..7bf51826541f 100644 --- a/packages/eslint-plugin-tslint/src/rules/config.ts +++ b/packages/eslint-plugin-tslint/src/rules/config.ts @@ -104,11 +104,9 @@ export default createRule({ /** * The TSLint rules configuration passed in by the user */ - const { - rules: tslintRules, - rulesDirectory: tslintRulesDirectory, - lintFile, - } = context.options[0]; + const [ + { rules: tslintRules, rulesDirectory: tslintRulesDirectory, lintFile }, + ] = context.options; const program = parserServices.program; diff --git a/packages/eslint-plugin/src/rules/class-literal-property-style.ts b/packages/eslint-plugin/src/rules/class-literal-property-style.ts index b08161450155..b3f9fb401c2f 100644 --- a/packages/eslint-plugin/src/rules/class-literal-property-style.ts +++ b/packages/eslint-plugin/src/rules/class-literal-property-style.ts @@ -55,9 +55,9 @@ export default util.createRule({ }, defaultOptions: ['fields'], create(context, [style]) { - if (style === 'fields') { - return { - MethodDefinition(node: TSESTree.MethodDefinition): void { + return { + ...(style === 'fields' && { + MethodDefinition(node): void { if ( node.kind !== 'get' || !node.value.body || @@ -95,38 +95,37 @@ export default util.createRule({ }, }); }, - }; - } + }), + ...(style === 'getters' && { + PropertyDefinition(node): void { + if (!node.readonly || node.declare) { + return; + } - return { - PropertyDefinition(node: TSESTree.PropertyDefinition): void { - if (!node.readonly || node.declare) { - return; - } - - const { value } = node; - - if (!value || !isSupportedLiteral(value)) { - return; - } - - context.report({ - node: node.key, - messageId: 'preferGetterStyle', - fix(fixer) { - const sourceCode = context.getSourceCode(); - const name = sourceCode.getText(node.key); - - let text = ''; - - text += printNodeModifiers(node, 'get'); - text += node.computed ? `[${name}]` : name; - text += `() { return ${sourceCode.getText(value)}; }`; - - return fixer.replaceText(node, text); - }, - }); - }, + const { value } = node; + + if (!value || !isSupportedLiteral(value)) { + return; + } + + context.report({ + node: node.key, + messageId: 'preferGetterStyle', + fix(fixer) { + const sourceCode = context.getSourceCode(); + const name = sourceCode.getText(node.key); + + let text = ''; + + text += printNodeModifiers(node, 'get'); + text += node.computed ? `[${name}]` : name; + text += `() { return ${sourceCode.getText(value)}; }`; + + return fixer.replaceText(node, text); + }, + }); + }, + }), }; }, }); diff --git a/packages/eslint-plugin/src/rules/consistent-indexed-object-style.ts b/packages/eslint-plugin/src/rules/consistent-indexed-object-style.ts index 29c5e534b4af..8c2081adebfe 100644 --- a/packages/eslint-plugin/src/rules/consistent-indexed-object-style.ts +++ b/packages/eslint-plugin/src/rules/consistent-indexed-object-style.ts @@ -1,9 +1,9 @@ -import { createRule } from '../util'; import { AST_NODE_TYPES, - TSESTree, TSESLint, + TSESTree, } from '@typescript-eslint/experimental-utils'; +import { createRule } from '../util'; type MessageIds = 'preferRecord' | 'preferIndexSignature'; type Options = ['record' | 'index-signature']; @@ -29,38 +29,9 @@ export default createRule({ ], }, defaultOptions: ['record'], - create(context) { + create(context, [mode]) { const sourceCode = context.getSourceCode(); - if (context.options[0] === 'index-signature') { - return { - TSTypeReference(node): void { - const typeName = node.typeName; - if (typeName.type !== AST_NODE_TYPES.Identifier) { - return; - } - if (typeName.name !== 'Record') { - return; - } - - const params = node.typeParameters?.params; - if (params?.length !== 2) { - return; - } - - context.report({ - node, - messageId: 'preferIndexSignature', - fix(fixer) { - const key = sourceCode.getText(params[0]); - const type = sourceCode.getText(params[1]); - return fixer.replaceText(node, `{ [key: ${key}]: ${type} }`); - }, - }); - }, - }; - } - function checkMembers( members: TSESTree.TypeElement[], node: TSESTree.Node, @@ -113,27 +84,54 @@ export default createRule({ } return { - TSTypeLiteral(node): void { - checkMembers(node.members, node, '', ''); - }, + ...(mode === 'index-signature' && { + TSTypeReference(node): void { + const typeName = node.typeName; + if (typeName.type !== AST_NODE_TYPES.Identifier) { + return; + } + if (typeName.name !== 'Record') { + return; + } - TSInterfaceDeclaration(node): void { - let genericTypes = ''; + const params = node.typeParameters?.params; + if (params?.length !== 2) { + return; + } - if ((node.typeParameters?.params ?? []).length > 0) { - genericTypes = `<${node.typeParameters?.params - .map(p => p.name.name) - .join(', ')}>`; - } + context.report({ + node, + messageId: 'preferIndexSignature', + fix(fixer) { + const key = sourceCode.getText(params[0]); + const type = sourceCode.getText(params[1]); + return fixer.replaceText(node, `{ [key: ${key}]: ${type} }`); + }, + }); + }, + }), + ...(mode === 'record' && { + TSTypeLiteral(node): void { + checkMembers(node.members, node, '', ''); + }, + TSInterfaceDeclaration(node): void { + let genericTypes = ''; - checkMembers( - node.body.body, - node, - `type ${node.id.name}${genericTypes} = `, - ';', - !node.extends?.length, - ); - }, + if ((node.typeParameters?.params ?? []).length > 0) { + genericTypes = `<${node.typeParameters?.params + .map(p => p.name.name) + .join(', ')}>`; + } + + checkMembers( + node.body.body, + node, + `type ${node.id.name}${genericTypes} = `, + ';', + !node.extends?.length, + ); + }, + }), }; }, }); diff --git a/packages/eslint-plugin/src/rules/consistent-type-definitions.ts b/packages/eslint-plugin/src/rules/consistent-type-definitions.ts index bacccf9143f9..efb7bdd8d5da 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-definitions.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-definitions.ts @@ -47,10 +47,10 @@ export default util.createRule({ } return { - "TSTypeAliasDeclaration[typeAnnotation.type='TSTypeLiteral']"( - node: TSESTree.TSTypeAliasDeclaration, - ): void { - if (option === 'interface') { + ...(option === 'interface' && { + "TSTypeAliasDeclaration[typeAnnotation.type='TSTypeLiteral']"( + node: TSESTree.TSTypeAliasDeclaration, + ): void { context.report({ node: node.id, messageId: 'interfaceOverType', @@ -81,10 +81,10 @@ export default util.createRule({ return fixes; }, }); - } - }, - TSInterfaceDeclaration(node): void { - if (option === 'type') { + }, + }), + ...(option === 'type' && { + TSInterfaceDeclaration(node): void { context.report({ node: node.id, messageId: 'typeOverInterface', @@ -137,8 +137,8 @@ export default util.createRule({ return fixes; }, }); - } - }, + }, + }), }; }, }); diff --git a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts index 94f492bf06ca..e189727463f3 100644 --- a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts +++ b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts @@ -129,7 +129,6 @@ export default util.createRule({ TSExportAssignment(node): void { checkNode(node.expression); }, - 'ArrowFunctionExpression, FunctionDeclaration, FunctionExpression'( node: FunctionNode, ): void { diff --git a/packages/eslint-plugin/src/rules/init-declarations.ts b/packages/eslint-plugin/src/rules/init-declarations.ts index 3a97a2c8eda1..6cd83e636f9e 100644 --- a/packages/eslint-plugin/src/rules/init-declarations.ts +++ b/packages/eslint-plugin/src/rules/init-declarations.ts @@ -1,12 +1,12 @@ import { - TSESTree, AST_NODE_TYPES, + TSESTree, } from '@typescript-eslint/experimental-utils'; import { getESLintCoreRule } from '../util/getESLintCoreRule'; import { - InferOptionsTypeFromRule, - InferMessageIdsTypeFromRule, createRule, + InferMessageIdsTypeFromRule, + InferOptionsTypeFromRule, } from '../util'; const baseRule = getESLintCoreRule('init-declarations'); @@ -29,9 +29,8 @@ export default createRule({ messages: baseRule.meta.messages, }, defaultOptions: ['always'], - create(context) { + create(context, [mode]) { const rules = baseRule.create(context); - const mode = context.options[0] || 'always'; return { 'VariableDeclaration:exit'(node: TSESTree.VariableDeclaration): void { diff --git a/packages/eslint-plugin/src/rules/lines-between-class-members.ts b/packages/eslint-plugin/src/rules/lines-between-class-members.ts index 95c2f811e8a4..c78216b125fc 100644 --- a/packages/eslint-plugin/src/rules/lines-between-class-members.ts +++ b/packages/eslint-plugin/src/rules/lines-between-class-members.ts @@ -43,10 +43,10 @@ export default util.createRule({ exceptAfterSingleLine: false, }, ], - create(context, options) { + create(context, [firstOption, secondOption]) { const rules = baseRule.create(context); const exceptAfterOverload = - options[1]?.exceptAfterOverload && options[0] === 'always'; + secondOption?.exceptAfterOverload && firstOption === 'always'; function isOverload(node: TSESTree.Node): boolean { return ( diff --git a/packages/eslint-plugin/src/rules/method-signature-style.ts b/packages/eslint-plugin/src/rules/method-signature-style.ts index 3e24263ab502..b05c4f9fbd18 100644 --- a/packages/eslint-plugin/src/rules/method-signature-style.ts +++ b/packages/eslint-plugin/src/rules/method-signature-style.ts @@ -116,29 +116,72 @@ export default util.createRule({ } return { - TSMethodSignature(methodNode): void { - if (mode === 'method') { - return; - } - - const parent = methodNode.parent; - const members = - parent?.type === AST_NODE_TYPES.TSInterfaceBody - ? parent.body - : parent?.type === AST_NODE_TYPES.TSTypeLiteral - ? parent.members - : []; - - const duplicatedKeyMethodNodes: TSESTree.TSMethodSignature[] = - members.filter( - (element): element is TSESTree.TSMethodSignature => - element.type === AST_NODE_TYPES.TSMethodSignature && - element !== methodNode && - getMethodKey(element) === getMethodKey(methodNode), - ); - const isParentModule = isNodeParentModuleDeclaration(methodNode); - - if (duplicatedKeyMethodNodes.length > 0) { + ...(mode === 'property' && { + TSMethodSignature(methodNode): void { + const parent = methodNode.parent; + const members = + parent?.type === AST_NODE_TYPES.TSInterfaceBody + ? parent.body + : parent?.type === AST_NODE_TYPES.TSTypeLiteral + ? parent.members + : []; + + const duplicatedKeyMethodNodes: TSESTree.TSMethodSignature[] = + members.filter( + (element): element is TSESTree.TSMethodSignature => + element.type === AST_NODE_TYPES.TSMethodSignature && + element !== methodNode && + getMethodKey(element) === getMethodKey(methodNode), + ); + const isParentModule = isNodeParentModuleDeclaration(methodNode); + + if (duplicatedKeyMethodNodes.length > 0) { + if (isParentModule) { + context.report({ + node: methodNode, + messageId: 'errorMethod', + }); + } else { + context.report({ + node: methodNode, + messageId: 'errorMethod', + *fix(fixer) { + const methodNodes = [ + methodNode, + ...duplicatedKeyMethodNodes, + ].sort((a, b) => (a.range[0] < b.range[0] ? -1 : 1)); + const typeString = methodNodes + .map(node => { + const params = getMethodParams(node); + const returnType = getMethodReturnType(node); + return `(${params} => ${returnType})`; + }) + .join(' & '); + const key = getMethodKey(methodNode); + const delimiter = getDelimiter(methodNode); + yield fixer.replaceText( + methodNode, + `${key}: ${typeString}${delimiter}`, + ); + for (const node of duplicatedKeyMethodNodes) { + const lastToken = sourceCode.getLastToken(node); + if (lastToken) { + const nextToken = sourceCode.getTokenAfter(lastToken); + if (nextToken) { + yield fixer.remove(node); + yield fixer.replaceTextRange( + [lastToken.range[1], nextToken.range[0]], + '', + ); + } + } + } + }, + }); + } + return; + } + if (isParentModule) { context.report({ node: methodNode, @@ -148,90 +191,43 @@ export default util.createRule({ context.report({ node: methodNode, messageId: 'errorMethod', - *fix(fixer) { - const methodNodes = [ - methodNode, - ...duplicatedKeyMethodNodes, - ].sort((a, b) => (a.range[0] < b.range[0] ? -1 : 1)); - const typeString = methodNodes - .map(node => { - const params = getMethodParams(node); - const returnType = getMethodReturnType(node); - return `(${params} => ${returnType})`; - }) - .join(' & '); + fix: fixer => { const key = getMethodKey(methodNode); + const params = getMethodParams(methodNode); + const returnType = getMethodReturnType(methodNode); const delimiter = getDelimiter(methodNode); - yield fixer.replaceText( + return fixer.replaceText( methodNode, - `${key}: ${typeString}${delimiter}`, + `${key}: ${params} => ${returnType}${delimiter}`, ); - for (const node of duplicatedKeyMethodNodes) { - const lastToken = sourceCode.getLastToken(node); - if (lastToken) { - const nextToken = sourceCode.getTokenAfter(lastToken); - if (nextToken) { - yield fixer.remove(node); - yield fixer.replaceTextRange( - [lastToken.range[1], nextToken.range[0]], - '', - ); - } - } - } }, }); } - return; - } + }, + }), + ...(mode === 'method' && { + TSPropertySignature(propertyNode): void { + const typeNode = propertyNode.typeAnnotation?.typeAnnotation; + if (typeNode?.type !== AST_NODE_TYPES.TSFunctionType) { + return; + } - if (isParentModule) { - context.report({ - node: methodNode, - messageId: 'errorMethod', - }); - } else { context.report({ - node: methodNode, - messageId: 'errorMethod', + node: propertyNode, + messageId: 'errorProperty', fix: fixer => { - const key = getMethodKey(methodNode); - const params = getMethodParams(methodNode); - const returnType = getMethodReturnType(methodNode); - const delimiter = getDelimiter(methodNode); + const key = getMethodKey(propertyNode); + const params = getMethodParams(typeNode); + const returnType = getMethodReturnType(typeNode); + const delimiter = getDelimiter(propertyNode); return fixer.replaceText( - methodNode, - `${key}: ${params} => ${returnType}${delimiter}`, + propertyNode, + `${key}${params}: ${returnType}${delimiter}`, ); }, }); - } - }, - TSPropertySignature(propertyNode): void { - const typeNode = propertyNode.typeAnnotation?.typeAnnotation; - if (typeNode?.type !== AST_NODE_TYPES.TSFunctionType) { - return; - } - - if (mode === 'property') { - return; - } - - context.report({ - node: propertyNode, - messageId: 'errorProperty', - fix: fixer => { - const key = getMethodKey(propertyNode); - const params = getMethodParams(typeNode); - const returnType = getMethodReturnType(typeNode); - const delimiter = getDelimiter(propertyNode); - return fixer.replaceText( - propertyNode, - `${key}${params}: ${returnType}${delimiter}`, - ); - }, - }); - }, + }, + }), }; }, }); diff --git a/packages/eslint-plugin/src/rules/no-duplicate-imports.ts b/packages/eslint-plugin/src/rules/no-duplicate-imports.ts index 5445b50cec46..b2ded1a2ea73 100644 --- a/packages/eslint-plugin/src/rules/no-duplicate-imports.ts +++ b/packages/eslint-plugin/src/rules/no-duplicate-imports.ts @@ -34,9 +34,8 @@ export default util.createRule({ includeExports: false, }, ], - create(context, [option]) { + create(context, [{ includeExports }]) { const rules = baseRule.create(context); - const includeExports = option.includeExports; const typeMemberImports = new Set(); const typeDefaultImports = new Set(); const typeExports = new Set(); diff --git a/packages/eslint-plugin/src/rules/no-unused-expressions.ts b/packages/eslint-plugin/src/rules/no-unused-expressions.ts index 4bef50b44a8a..91d9f4e4a384 100644 --- a/packages/eslint-plugin/src/rules/no-unused-expressions.ts +++ b/packages/eslint-plugin/src/rules/no-unused-expressions.ts @@ -34,9 +34,8 @@ export default util.createRule({ allowTaggedTemplates: false, }, ], - create(context, options) { + create(context, [{ allowShortCircuit = false, allowTernary = false }]) { const rules = baseRule.create(context); - const { allowShortCircuit = false, allowTernary = false } = options[0]; function isValidExpression(node: TSESTree.Node): boolean { if (allowShortCircuit && node.type === AST_NODE_TYPES.LogicalExpression) { diff --git a/packages/eslint-plugin/src/rules/no-unused-vars.ts b/packages/eslint-plugin/src/rules/no-unused-vars.ts index bf9548ec888d..7cce473557c4 100644 --- a/packages/eslint-plugin/src/rules/no-unused-vars.ts +++ b/packages/eslint-plugin/src/rules/no-unused-vars.ts @@ -94,7 +94,7 @@ export default util.createRule({ caughtErrors: 'none', }; - const firstOption = context.options[0]; + const [firstOption] = context.options; if (firstOption) { if (typeof firstOption === 'string') { diff --git a/packages/eslint-plugin/src/rules/object-curly-spacing.ts b/packages/eslint-plugin/src/rules/object-curly-spacing.ts index 5e93dff61a03..fe74c8f7da40 100644 --- a/packages/eslint-plugin/src/rules/object-curly-spacing.ts +++ b/packages/eslint-plugin/src/rules/object-curly-spacing.ts @@ -30,7 +30,8 @@ export default createRule({ }, defaultOptions: ['never'], create(context) { - const spaced = context.options[0] === 'always'; + const [firstOption, secondOption] = context.options; + const spaced = firstOption === 'always'; const sourceCode = context.getSourceCode(); /** @@ -43,9 +44,7 @@ export default createRule({ function isOptionSet( option: 'arraysInObjects' | 'objectsInObjects', ): boolean { - return context.options[1] - ? context.options[1][option] === !spaced - : false; + return secondOption ? secondOption[option] === !spaced : false; } const options = { diff --git a/packages/eslint-plugin/src/rules/prefer-readonly-parameter-types.ts b/packages/eslint-plugin/src/rules/prefer-readonly-parameter-types.ts index 478a15b66b76..ed3e4ba284b1 100644 --- a/packages/eslint-plugin/src/rules/prefer-readonly-parameter-types.ts +++ b/packages/eslint-plugin/src/rules/prefer-readonly-parameter-types.ts @@ -1,6 +1,6 @@ import { - TSESTree, AST_NODE_TYPES, + TSESTree, } from '@typescript-eslint/experimental-utils'; import * as util from '../util'; @@ -48,10 +48,10 @@ export default util.createRule({ ...util.readonlynessOptionsDefaults, }, ], - create(context, options) { - const [ - { checkParameterProperties, ignoreInferredTypes, treatMethodsAsReadonly }, - ] = options; + create( + context, + [{ checkParameterProperties, ignoreInferredTypes, treatMethodsAsReadonly }], + ) { const { esTreeNodeToTSNodeMap, program } = util.getParserServices(context); const checker = program.getTypeChecker(); diff --git a/packages/eslint-plugin/src/rules/promise-function-async.ts b/packages/eslint-plugin/src/rules/promise-function-async.ts index 6b3f29b8d97e..083afcebe712 100644 --- a/packages/eslint-plugin/src/rules/promise-function-async.ts +++ b/packages/eslint-plugin/src/rules/promise-function-async.ts @@ -196,20 +196,20 @@ export default util.createRule({ } return { - 'ArrowFunctionExpression[async = false]'( - node: TSESTree.ArrowFunctionExpression, - ): void { - if (checkArrowFunctions) { + ...(checkArrowFunctions && { + 'ArrowFunctionExpression[async = false]'( + node: TSESTree.ArrowFunctionExpression, + ): void { validateNode(node); - } - }, - 'FunctionDeclaration[async = false]'( - node: TSESTree.FunctionDeclaration, - ): void { - if (checkFunctionDeclarations) { + }, + }), + ...(checkFunctionDeclarations && { + 'FunctionDeclaration[async = false]'( + node: TSESTree.FunctionDeclaration, + ): void { validateNode(node); - } - }, + }, + }), 'FunctionExpression[async = false]'( node: TSESTree.FunctionExpression, ): void { diff --git a/packages/eslint-plugin/src/rules/restrict-plus-operands.ts b/packages/eslint-plugin/src/rules/restrict-plus-operands.ts index 659509f81ef1..51b4da9be466 100644 --- a/packages/eslint-plugin/src/rules/restrict-plus-operands.ts +++ b/packages/eslint-plugin/src/rules/restrict-plus-operands.ts @@ -132,11 +132,11 @@ export default util.createRule({ return { "BinaryExpression[operator='+']": checkPlusOperands, - "AssignmentExpression[operator='+=']"(node): void { - if (checkCompoundAssignments) { + ...(checkCompoundAssignments && { + "AssignmentExpression[operator='+=']"(node): void { checkPlusOperands(node); - } - }, + }, + }), }; }, }); diff --git a/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts b/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts index 3d14b55e9d74..942cae423df9 100644 --- a/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts +++ b/packages/eslint-plugin/src/rules/sort-type-union-intersection-members.ts @@ -241,16 +241,16 @@ export default util.createRule({ } return { - TSIntersectionType(node): void { - if (checkIntersections === true) { + ...(checkIntersections && { + TSIntersectionType(node): void { checkSorting(node); - } - }, - TSUnionType(node): void { - if (checkUnions === true) { + }, + }), + ...(checkUnions && { + TSUnionType(node): void { checkSorting(node); - } - }, + }, + }), }; }, }); diff --git a/packages/eslint-plugin/src/rules/space-before-function-paren.ts b/packages/eslint-plugin/src/rules/space-before-function-paren.ts index b13af67163c5..8f848f92742a 100644 --- a/packages/eslint-plugin/src/rules/space-before-function-paren.ts +++ b/packages/eslint-plugin/src/rules/space-before-function-paren.ts @@ -58,12 +58,10 @@ export default util.createRule({ }, defaultOptions: ['always'], - create(context) { + create(context, [firstOption]) { const sourceCode = context.getSourceCode(); - const baseConfig = - typeof context.options[0] === 'string' ? context.options[0] : 'always'; - const overrideConfig = - typeof context.options[0] === 'object' ? context.options[0] : {}; + const baseConfig = typeof firstOption === 'string' ? firstOption : 'always'; + const overrideConfig = typeof firstOption === 'object' ? firstOption : {}; /** * Determines whether a function has a name. diff --git a/packages/eslint-plugin/src/rules/typedef.ts b/packages/eslint-plugin/src/rules/typedef.ts index eaca1be209e9..602df98e060e 100644 --- a/packages/eslint-plugin/src/rules/typedef.ts +++ b/packages/eslint-plugin/src/rules/typedef.ts @@ -1,6 +1,6 @@ import { - TSESTree, AST_NODE_TYPES, + TSESTree, } from '@typescript-eslint/experimental-utils'; import * as util from '../util'; @@ -59,7 +59,21 @@ export default util.createRule<[Options], MessageIds>({ [OptionKeys.VariableDeclarationIgnoreFunction]: false, }, ], - create(context, [options]) { + create( + context, + [ + { + arrayDestructuring, + arrowParameter, + memberVariableDeclaration, + objectDestructuring, + parameter, + propertyDeclaration, + variableDeclaration, + variableDeclarationIgnoreFunction, + }, + ], + ) { function report(location: TSESTree.Node, name?: string): void { context.report({ node: location, @@ -132,86 +146,84 @@ export default util.createRule<[Options], MessageIds>({ function isVariableDeclarationIgnoreFunction(node: TSESTree.Node): boolean { return ( - !!options[OptionKeys.VariableDeclarationIgnoreFunction] && - (node.type === AST_NODE_TYPES.FunctionExpression || - node.type === AST_NODE_TYPES.ArrowFunctionExpression) + variableDeclarationIgnoreFunction === true && + (node.type === AST_NODE_TYPES.ArrowFunctionExpression || + node.type === AST_NODE_TYPES.FunctionExpression) ); } return { - ArrayPattern(node): void { - if ( - node.parent?.type === AST_NODE_TYPES.RestElement && - node.parent.typeAnnotation - ) { - return; - } - if ( - options[OptionKeys.ArrayDestructuring] && - !node.typeAnnotation && - !isForOfStatementContext(node) - ) { - report(node); - } - }, - ArrowFunctionExpression(node): void { - if (options[OptionKeys.ArrowParameter]) { - checkParameters(node.params); - } - }, - PropertyDefinition(node): void { - if (node.value && isVariableDeclarationIgnoreFunction(node.value)) { - return; - } + ...(arrayDestructuring && { + ArrayPattern(node): void { + if ( + node.parent?.type === AST_NODE_TYPES.RestElement && + node.parent.typeAnnotation + ) { + return; + } - if ( - options[OptionKeys.MemberVariableDeclaration] && - !node.typeAnnotation - ) { - report( - node, - node.key.type === AST_NODE_TYPES.Identifier - ? node.key.name - : undefined, - ); - } - }, - 'FunctionDeclaration, FunctionExpression'( - node: TSESTree.FunctionDeclaration | TSESTree.FunctionExpression, - ): void { - if (options[OptionKeys.Parameter]) { + if (!node.typeAnnotation && !isForOfStatementContext(node)) { + report(node); + } + }, + }), + ...(arrowParameter && { + ArrowFunctionExpression(node): void { checkParameters(node.params); - } - }, - ObjectPattern(node): void { - if ( - options[OptionKeys.ObjectDestructuring] && - !node.typeAnnotation && - !isForOfStatementContext(node) - ) { - report(node); - } - }, - 'TSIndexSignature, TSPropertySignature'( - node: TSESTree.TSIndexSignature | TSESTree.TSPropertySignature, - ): void { - if (options[OptionKeys.PropertyDeclaration] && !node.typeAnnotation) { - report( - node, - node.type === AST_NODE_TYPES.TSPropertySignature - ? getNodeName(node.key) - : undefined, - ); - } - }, + }, + }), + ...(memberVariableDeclaration && { + PropertyDefinition(node): void { + if ( + !node.value || + !isVariableDeclarationIgnoreFunction(node.value) || + !node.typeAnnotation + ) { + report( + node, + node.key.type === AST_NODE_TYPES.Identifier + ? node.key.name + : undefined, + ); + } + }, + }), + ...(parameter && { + 'FunctionDeclaration, FunctionExpression'( + node: TSESTree.FunctionDeclaration | TSESTree.FunctionExpression, + ): void { + checkParameters(node.params); + }, + }), + ...(objectDestructuring && { + ObjectPattern(node): void { + if (!node.typeAnnotation && !isForOfStatementContext(node)) { + report(node); + } + }, + }), + ...(propertyDeclaration && { + 'TSIndexSignature, TSPropertySignature'( + node: TSESTree.TSIndexSignature | TSESTree.TSPropertySignature, + ): void { + if (!node.typeAnnotation) { + report( + node, + node.type === AST_NODE_TYPES.TSPropertySignature + ? getNodeName(node.key) + : undefined, + ); + } + }, + }), VariableDeclarator(node): void { if ( - !options[OptionKeys.VariableDeclaration] || + !variableDeclaration || node.id.typeAnnotation || (node.id.type === AST_NODE_TYPES.ArrayPattern && - !options[OptionKeys.ArrayDestructuring]) || + !arrayDestructuring) || (node.id.type === AST_NODE_TYPES.ObjectPattern && - !options[OptionKeys.ObjectDestructuring]) || + !objectDestructuring) || (node.init && isVariableDeclarationIgnoreFunction(node.init)) ) { return; From 076d65a6f9a1f9c2fe92799b34df743e60654bb9 Mon Sep 17 00:00:00 2001 From: jp7837 Date: Sun, 17 Oct 2021 18:50:37 -0700 Subject: [PATCH 448/473] docs: add attributes to rule docs (#3970) --- .../rules/adjacent-overload-signatures.md | 6 +++++ .../eslint-plugin/docs/rules/array-type.md | 6 +++++ .../docs/rules/await-thenable.md | 6 +++++ .../docs/rules/ban-ts-comment.md | 6 +++++ .../docs/rules/ban-tslint-comment.md | 6 +++++ .../eslint-plugin/docs/rules/ban-types.md | 6 +++++ .../eslint-plugin/docs/rules/brace-style.md | 6 +++++ .../rules/class-literal-property-style.md | 6 +++++ .../eslint-plugin/docs/rules/comma-dangle.md | 6 +++++ .../eslint-plugin/docs/rules/comma-spacing.md | 6 +++++ .../rules/consistent-indexed-object-style.md | 6 +++++ .../docs/rules/consistent-type-assertions.md | 6 +++++ .../docs/rules/consistent-type-definitions.md | 6 +++++ .../docs/rules/consistent-type-imports.md | 6 +++++ .../docs/rules/default-param-last.md | 6 +++++ .../eslint-plugin/docs/rules/dot-notation.md | 6 +++++ .../rules/explicit-function-return-type.md | 6 +++++ .../rules/explicit-member-accessibility.md | 6 +++++ .../rules/explicit-module-boundary-types.md | 6 +++++ .../docs/rules/func-call-spacing.md | 6 +++++ packages/eslint-plugin/docs/rules/indent.md | 6 +++++ .../docs/rules/init-declarations.md | 6 +++++ .../docs/rules/keyword-spacing.md | 6 +++++ .../docs/rules/lines-between-class-members.md | 6 +++++ .../docs/rules/member-delimiter-style.md | 6 +++++ .../docs/rules/member-ordering.md | 6 +++++ .../docs/rules/method-signature-style.md | 6 +++++ .../docs/rules/naming-convention.md | 6 +++++ .../docs/rules/no-array-constructor.md | 6 +++++ .../docs/rules/no-base-to-string.md | 6 +++++ .../rules/no-confusing-non-null-assertion.md | 6 +++++ .../rules/no-confusing-void-expression.md | 6 +++++ .../docs/rules/no-dupe-class-members.md | 6 +++++ .../docs/rules/no-duplicate-imports.md | 6 +++++ .../docs/rules/no-dynamic-delete.md | 6 +++++ .../docs/rules/no-empty-function.md | 6 +++++ .../docs/rules/no-empty-interface.md | 6 +++++ .../docs/rules/no-explicit-any.md | 6 +++++ .../docs/rules/no-extra-non-null-assertion.md | 6 +++++ .../docs/rules/no-extra-parens.md | 6 +++++ .../eslint-plugin/docs/rules/no-extra-semi.md | 6 +++++ .../docs/rules/no-extraneous-class.md | 6 +++++ .../docs/rules/no-floating-promises.md | 6 +++++ .../docs/rules/no-for-in-array.md | 6 +++++ .../docs/rules/no-implicit-any-catch.md | 6 +++++ .../docs/rules/no-implied-eval.md | 6 +++++ .../docs/rules/no-inferrable-types.md | 6 +++++ .../docs/rules/no-invalid-this.md | 6 +++++ .../docs/rules/no-invalid-void-type.md | 6 +++++ .../eslint-plugin/docs/rules/no-loop-func.md | 6 +++++ .../docs/rules/no-loss-of-precision.md | 6 +++++ .../docs/rules/no-magic-numbers.md | 6 +++++ .../rules/no-meaningless-void-operator.md | 6 +++++ .../docs/rules/no-misused-new.md | 6 +++++ .../docs/rules/no-misused-promises.md | 6 +++++ .../eslint-plugin/docs/rules/no-namespace.md | 6 +++++ ...no-non-null-asserted-nullish-coalescing.md | 6 +++++ .../no-non-null-asserted-optional-chain.md | 6 +++++ .../docs/rules/no-non-null-assertion.md | 6 +++++ .../docs/rules/no-parameter-properties.md | 6 +++++ .../eslint-plugin/docs/rules/no-redeclare.md | 6 +++++ .../docs/rules/no-require-imports.md | 6 +++++ .../docs/rules/no-restricted-imports.md | 6 +++++ .../eslint-plugin/docs/rules/no-shadow.md | 6 +++++ .../eslint-plugin/docs/rules/no-this-alias.md | 6 +++++ .../docs/rules/no-throw-literal.md | 6 +++++ .../eslint-plugin/docs/rules/no-type-alias.md | 6 +++++ .../no-unnecessary-boolean-literal-compare.md | 6 +++++ .../docs/rules/no-unnecessary-condition.md | 6 +++++ .../docs/rules/no-unnecessary-qualifier.md | 6 +++++ .../rules/no-unnecessary-type-arguments.md | 6 +++++ .../rules/no-unnecessary-type-assertion.md | 6 +++++ .../rules/no-unnecessary-type-constraint.md | 6 +++++ .../docs/rules/no-unsafe-argument.md | 6 +++++ .../docs/rules/no-unsafe-assignment.md | 6 +++++ .../docs/rules/no-unsafe-call.md | 6 +++++ .../docs/rules/no-unsafe-member-access.md | 6 +++++ .../docs/rules/no-unsafe-return.md | 6 +++++ .../docs/rules/no-unused-expressions.md | 6 +++++ .../docs/rules/no-unused-vars.md | 6 +++++ .../docs/rules/no-use-before-define.md | 6 +++++ .../docs/rules/no-useless-constructor.md | 6 +++++ .../docs/rules/no-var-requires.md | 6 +++++ .../non-nullable-type-assertion-style.md | 6 +++++ .../docs/rules/object-curly-spacing.md | 6 +++++ .../rules/padding-line-between-statements.md | 6 +++++ .../docs/rules/prefer-as-const.md | 6 +++++ .../docs/rules/prefer-enum-initializers.md | 6 +++++ .../eslint-plugin/docs/rules/prefer-for-of.md | 6 +++++ .../docs/rules/prefer-function-type.md | 6 +++++ .../docs/rules/prefer-includes.md | 6 +++++ .../docs/rules/prefer-literal-enum-member.md | 6 +++++ .../docs/rules/prefer-namespace-keyword.md | 6 +++++ .../docs/rules/prefer-nullish-coalescing.md | 6 +++++ .../docs/rules/prefer-optional-chain.md | 6 +++++ .../rules/prefer-readonly-parameter-types.md | 6 +++++ .../docs/rules/prefer-readonly.md | 6 +++++ .../rules/prefer-reduce-type-parameter.md | 6 +++++ .../docs/rules/prefer-regexp-exec.md | 6 +++++ .../docs/rules/prefer-return-this-type.md | 6 +++++ .../rules/prefer-string-starts-ends-with.md | 6 +++++ .../docs/rules/prefer-ts-expect-error.md | 6 +++++ .../docs/rules/promise-function-async.md | 6 +++++ packages/eslint-plugin/docs/rules/quotes.md | 6 +++++ .../docs/rules/require-array-sort-compare.md | 6 +++++ .../eslint-plugin/docs/rules/require-await.md | 6 +++++ .../docs/rules/restrict-plus-operands.md | 6 +++++ .../rules/restrict-template-expressions.md | 6 +++++ .../eslint-plugin/docs/rules/return-await.md | 6 +++++ packages/eslint-plugin/docs/rules/semi.md | 6 +++++ .../sort-type-union-intersection-members.md | 6 +++++ .../docs/rules/space-before-function-paren.md | 6 +++++ .../docs/rules/space-infix-ops.md | 6 +++++ .../docs/rules/strict-boolean-expressions.md | 6 +++++ .../docs/rules/switch-exhaustiveness-check.md | 6 +++++ .../docs/rules/triple-slash-reference.md | 6 +++++ .../docs/rules/type-annotation-spacing.md | 6 +++++ packages/eslint-plugin/docs/rules/typedef.md | 6 +++++ .../docs/rules/unbound-method.md | 6 +++++ .../docs/rules/unified-signatures.md | 6 +++++ packages/eslint-plugin/tests/docs.test.ts | 27 +++++++++++++++++++ 121 files changed, 747 insertions(+) diff --git a/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md b/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md index e7a1596d1674..339425c8d427 100644 --- a/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md +++ b/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md @@ -87,3 +87,9 @@ If you don't care about the general structure of the code, then you will not nee ## Compatibility - TSLint: [adjacent-overload-signatures](https://palantir.github.io/tslint/rules/adjacent-overload-signatures/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/array-type.md b/packages/eslint-plugin/docs/rules/array-type.md index 75e2b1c6d655..66f0bcb750b4 100644 --- a/packages/eslint-plugin/docs/rules/array-type.md +++ b/packages/eslint-plugin/docs/rules/array-type.md @@ -114,3 +114,9 @@ This matrix lists all possible option combinations and their expected results fo ## Related to - TSLint: [array-type](https://palantir.github.io/tslint/rules/array-type/) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/await-thenable.md b/packages/eslint-plugin/docs/rules/await-thenable.md index fc65df9be38f..c4046cbf9883 100644 --- a/packages/eslint-plugin/docs/rules/await-thenable.md +++ b/packages/eslint-plugin/docs/rules/await-thenable.md @@ -31,3 +31,9 @@ This is generally not preferred, but can sometimes be useful for visual consiste ## Related to - TSLint: ['await-promise'](https://palantir.github.io/tslint/rules/await-promise) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/ban-ts-comment.md b/packages/eslint-plugin/docs/rules/ban-ts-comment.md index bfdd4104751d..f9727887603e 100644 --- a/packages/eslint-plugin/docs/rules/ban-ts-comment.md +++ b/packages/eslint-plugin/docs/rules/ban-ts-comment.md @@ -130,3 +130,9 @@ If you want to use all of the TypeScript directives. ## Compatibility - TSLint: [ban-ts-ignore](https://palantir.github.io/tslint/rules/ban-ts-ignore/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/ban-tslint-comment.md b/packages/eslint-plugin/docs/rules/ban-tslint-comment.md index 6af168f4bc4e..48e49c1ddcbf 100644 --- a/packages/eslint-plugin/docs/rules/ban-tslint-comment.md +++ b/packages/eslint-plugin/docs/rules/ban-tslint-comment.md @@ -27,3 +27,9 @@ Examples of **correct** code for this rule: ## When Not To Use It If you are still using TSLint. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/ban-types.md b/packages/eslint-plugin/docs/rules/ban-types.md index ebcec5775123..0fc1c3af94bc 100644 --- a/packages/eslint-plugin/docs/rules/ban-types.md +++ b/packages/eslint-plugin/docs/rules/ban-types.md @@ -176,3 +176,9 @@ const curly2: Record<'a', string> = { a: 'string' }; ## Compatibility - TSLint: [ban-types](https://palantir.github.io/tslint/rules/ban-types) + +## Attributes + +- [x] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/brace-style.md b/packages/eslint-plugin/docs/rules/brace-style.md index 06dfa1619fb2..87c123a43d7a 100644 --- a/packages/eslint-plugin/docs/rules/brace-style.md +++ b/packages/eslint-plugin/docs/rules/brace-style.md @@ -20,3 +20,9 @@ It adds support for `enum`, `interface`, `namespace` and `module` declarations. See [`eslint/brace-style` options](https://eslint.org/docs/rules/brace-style#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/brace-style.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/class-literal-property-style.md b/packages/eslint-plugin/docs/rules/class-literal-property-style.md index 1bca8390fd3b..220d858f03cb 100644 --- a/packages/eslint-plugin/docs/rules/class-literal-property-style.md +++ b/packages/eslint-plugin/docs/rules/class-literal-property-style.md @@ -94,3 +94,9 @@ class Mx { When you have no strong preference, or do not wish to enforce a particular style for how literal values are exposed by your classes. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/comma-dangle.md b/packages/eslint-plugin/docs/rules/comma-dangle.md index bfb40d338bcf..6db276e59d90 100644 --- a/packages/eslint-plugin/docs/rules/comma-dangle.md +++ b/packages/eslint-plugin/docs/rules/comma-dangle.md @@ -32,3 +32,9 @@ This rule has a string option and an object option. - [See the other options allowed](https://github.com/eslint/eslint/blob/master/docs/rules/comma-dangle.md#options) Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/comma-dangle.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/comma-spacing.md b/packages/eslint-plugin/docs/rules/comma-spacing.md index 0920180416ad..4ed084d8ee00 100644 --- a/packages/eslint-plugin/docs/rules/comma-spacing.md +++ b/packages/eslint-plugin/docs/rules/comma-spacing.md @@ -20,3 +20,9 @@ It adds support for trailing comma in a types parameters list. See [`eslint/comma-spacing` options](https://eslint.org/docs/rules/comma-spacing#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/comma-spacing.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md b/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md index c98997c5e0a6..a65281a6050c 100644 --- a/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md +++ b/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md @@ -65,3 +65,9 @@ type Foo = { [key: string]: unknown; }; ``` + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/consistent-type-assertions.md b/packages/eslint-plugin/docs/rules/consistent-type-assertions.md index 899647636cb6..56a3cbddde2d 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-assertions.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-assertions.md @@ -92,3 +92,9 @@ If you do not want to enforce consistent type assertions. - TSLint: [no-angle-bracket-type-assertion](https://palantir.github.io/tslint/rules/no-angle-bracket-type-assertion/) - TSLint: [no-object-literal-type-assertion](https://palantir.github.io/tslint/rules/no-object-literal-type-assertion/) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/consistent-type-definitions.md b/packages/eslint-plugin/docs/rules/consistent-type-definitions.md index eeabe6f598ed..f58a138ec8cd 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-definitions.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-definitions.md @@ -72,3 +72,9 @@ If you specifically want to use an interface or type literal for stylistic reaso ## Compatibility - TSLint: [interface-over-type-literal](https://palantir.github.io/tslint/rules/interface-over-type-literal/) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/consistent-type-imports.md b/packages/eslint-plugin/docs/rules/consistent-type-imports.md index 3d3acbeca272..515675e6e6fe 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-imports.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-imports.md @@ -62,3 +62,9 @@ const x: import('Bar') = 1; - If you are not using TypeScript 3.8 (or greater), then you will not be able to use this rule, as type-only imports are not allowed. - If you specifically want to use both import kinds for stylistic reasons, you can disable this rule. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/default-param-last.md b/packages/eslint-plugin/docs/rules/default-param-last.md index c9c51df40a36..0eb9aa429df4 100644 --- a/packages/eslint-plugin/docs/rules/default-param-last.md +++ b/packages/eslint-plugin/docs/rules/default-param-last.md @@ -54,3 +54,9 @@ class Foo { See [`eslint/default-param-last` options](https://eslint.org/docs/rules/default-param-last#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/default-param-last.md) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/dot-notation.md b/packages/eslint-plugin/docs/rules/dot-notation.md index 094e2e4fc673..bc2b4f340f21 100644 --- a/packages/eslint-plugin/docs/rules/dot-notation.md +++ b/packages/eslint-plugin/docs/rules/dot-notation.md @@ -81,3 +81,9 @@ x['hello'] = 123; If the TypeScript compiler option `noPropertyAccessFromIndexSignature` is set to `true`, then the above code is always allowed, even if `allowIndexSignaturePropertyAccess` is `false`. Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/dot-notation.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/explicit-function-return-type.md b/packages/eslint-plugin/docs/rules/explicit-function-return-type.md index 894a99617532..27e731d3d84f 100644 --- a/packages/eslint-plugin/docs/rules/explicit-function-return-type.md +++ b/packages/eslint-plugin/docs/rules/explicit-function-return-type.md @@ -246,3 +246,9 @@ you will not need this rule. ## Further Reading - TypeScript [Functions](https://www.typescriptlang.org/docs/handbook/functions.html#function-types) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md b/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md index cfbb3154f902..f65af54c4d5d 100644 --- a/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md +++ b/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md @@ -346,3 +346,9 @@ If you think defaulting to public is a good default, then you should consider us ## Compatibility - TSLint: [member-access](http://palantir.github.io/tslint/rules/member-access/) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md index a6945749f2a2..0365deeaea54 100644 --- a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md +++ b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md @@ -267,3 +267,9 @@ If you wish to make sure all functions have explicit return types, as opposed to ## Further Reading - TypeScript [Functions](https://www.typescriptlang.org/docs/handbook/functions.html#function-types) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/func-call-spacing.md b/packages/eslint-plugin/docs/rules/func-call-spacing.md index 8aa9e7e0cbff..0070c5633030 100644 --- a/packages/eslint-plugin/docs/rules/func-call-spacing.md +++ b/packages/eslint-plugin/docs/rules/func-call-spacing.md @@ -20,3 +20,9 @@ It adds support for generic type parameters on function calls. See [`eslint/func-call-spacing` options](https://eslint.org/docs/rules/func-call-spacing#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/func-call-spacing.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/indent.md b/packages/eslint-plugin/docs/rules/indent.md index 023c774657ae..1c8af15906c8 100644 --- a/packages/eslint-plugin/docs/rules/indent.md +++ b/packages/eslint-plugin/docs/rules/indent.md @@ -22,3 +22,9 @@ It adds support for TypeScript nodes. See [`eslint/indent` options](https://eslint.org/docs/rules/indent#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/indent.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/init-declarations.md b/packages/eslint-plugin/docs/rules/init-declarations.md index f83c5bd9c3f4..53783e23759b 100644 --- a/packages/eslint-plugin/docs/rules/init-declarations.md +++ b/packages/eslint-plugin/docs/rules/init-declarations.md @@ -20,3 +20,9 @@ It adds support for TypeScript's `declare` variables. See [`eslint/init-declarations` options](https://eslint.org/docs/rules/init-declarations#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/init-declarations.md) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/keyword-spacing.md b/packages/eslint-plugin/docs/rules/keyword-spacing.md index 3178542d2d68..f4d4403bd400 100644 --- a/packages/eslint-plugin/docs/rules/keyword-spacing.md +++ b/packages/eslint-plugin/docs/rules/keyword-spacing.md @@ -20,3 +20,9 @@ This version adds support for generic type parameters on function calls. See [`eslint/keyword-spacing` options](https://eslint.org/docs/rules/keyword-spacing#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/keyword-spacing.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/lines-between-class-members.md b/packages/eslint-plugin/docs/rules/lines-between-class-members.md index e2692bb18a0c..ab40dfdbdf3e 100644 --- a/packages/eslint-plugin/docs/rules/lines-between-class-members.md +++ b/packages/eslint-plugin/docs/rules/lines-between-class-members.md @@ -71,3 +71,9 @@ class foo { ``` Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/lines-between-class-members.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/member-delimiter-style.md b/packages/eslint-plugin/docs/rules/member-delimiter-style.md index c6f7ca470002..259915f7b419 100644 --- a/packages/eslint-plugin/docs/rules/member-delimiter-style.md +++ b/packages/eslint-plugin/docs/rules/member-delimiter-style.md @@ -199,3 +199,9 @@ type FooBar = { name: string; greet(): string } ## When Not To Use It If you don't care about enforcing a consistent member delimiter in interfaces and type literals, then you will not need this rule. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/member-ordering.md b/packages/eslint-plugin/docs/rules/member-ordering.md index 98cff7da670f..5924b18aaaa7 100644 --- a/packages/eslint-plugin/docs/rules/member-ordering.md +++ b/packages/eslint-plugin/docs/rules/member-ordering.md @@ -1024,3 +1024,9 @@ If you don't care about the general structure of your classes and interfaces, th ## Compatibility - TSLint: [member-ordering](https://palantir.github.io/tslint/rules/member-ordering/) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/method-signature-style.md b/packages/eslint-plugin/docs/rules/method-signature-style.md index 4358ee36ca06..acfc4317db97 100644 --- a/packages/eslint-plugin/docs/rules/method-signature-style.md +++ b/packages/eslint-plugin/docs/rules/method-signature-style.md @@ -92,3 +92,9 @@ type T2 = { ## When Not To Use It If you don't want to enforce a particular style for object/interface function types, and/or if you don't use `strictFunctionTypes`, then you don't need this rule. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/naming-convention.md b/packages/eslint-plugin/docs/rules/naming-convention.md index 4b28cffceafe..a55dfde13181 100644 --- a/packages/eslint-plugin/docs/rules/naming-convention.md +++ b/packages/eslint-plugin/docs/rules/naming-convention.md @@ -694,3 +694,9 @@ You can use the `destructured` modifier to match these names, and explicitly set ## When Not To Use It If you do not want to enforce naming conventions for anything. + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-array-constructor.md b/packages/eslint-plugin/docs/rules/no-array-constructor.md index fb9a68e7429f..dd9dd25bc140 100644 --- a/packages/eslint-plugin/docs/rules/no-array-constructor.md +++ b/packages/eslint-plugin/docs/rules/no-array-constructor.md @@ -41,3 +41,9 @@ new Array(someOtherArray.length); See [`eslint/no-array-constructor` options](https://eslint.org/docs/rules/no-array-constructor#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-array-constructor.md) + +## Attributes + +- [x] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-base-to-string.md b/packages/eslint-plugin/docs/rules/no-base-to-string.md index f1c2abab3a78..3daf5624792b 100644 --- a/packages/eslint-plugin/docs/rules/no-base-to-string.md +++ b/packages/eslint-plugin/docs/rules/no-base-to-string.md @@ -85,3 +85,9 @@ let text = `${value}`; If you don't mind `"[object Object]"` in your strings, then you will not need this rule. - [`Object.prototype.toString()` MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md b/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md index a61f6a8a9f4e..cac0acbc2434 100644 --- a/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md @@ -44,3 +44,9 @@ If you don't care about this confusion, then you will not need this rule. ## Further Reading - [`Issue: Easy misunderstanding: "! ==="`](https://github.com/microsoft/TypeScript/issues/37837) in [TypeScript repo](https://github.com/microsoft/TypeScript) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md b/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md index 8a00255170d5..3ea101e18b4a 100644 --- a/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md +++ b/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md @@ -147,3 +147,9 @@ Also, if you prefer concise coding style then also don't use it. ## Related to - TSLint: ['no-void-expression'](https://palantir.github.io/tslint/rules/no-void-expression/) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-dupe-class-members.md b/packages/eslint-plugin/docs/rules/no-dupe-class-members.md index ddfc1b9f1bd8..121c07a46703 100644 --- a/packages/eslint-plugin/docs/rules/no-dupe-class-members.md +++ b/packages/eslint-plugin/docs/rules/no-dupe-class-members.md @@ -20,3 +20,9 @@ It adds support for TypeScript's method overload definitions. See [`eslint/no-dupe-class-members` options](https://eslint.org/docs/rules/no-dupe-class-members#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-dupe-class-members.md) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-duplicate-imports.md b/packages/eslint-plugin/docs/rules/no-duplicate-imports.md index 140a8a1ece14..1cc99ddd0977 100644 --- a/packages/eslint-plugin/docs/rules/no-duplicate-imports.md +++ b/packages/eslint-plugin/docs/rules/no-duplicate-imports.md @@ -20,3 +20,9 @@ This version adds support for type-only import and export. See [`eslint/no-duplicate-imports` options](https://eslint.org/docs/rules/no-duplicate-imports#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-duplicate-imports.md) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-dynamic-delete.md b/packages/eslint-plugin/docs/rules/no-dynamic-delete.md index 5d84cb1c9ade..4d12eef8ffe8 100644 --- a/packages/eslint-plugin/docs/rules/no-dynamic-delete.md +++ b/packages/eslint-plugin/docs/rules/no-dynamic-delete.md @@ -47,3 +47,9 @@ Even repeated minor performance slowdowns likely do not significantly affect you ## Related to - TSLint: [no-dynamic-delete](https://palantir.github.io/tslint/rules/no-dynamic-delete) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-empty-function.md b/packages/eslint-plugin/docs/rules/no-empty-function.md index 356700d834ea..b7d0fb99f5f2 100644 --- a/packages/eslint-plugin/docs/rules/no-empty-function.md +++ b/packages/eslint-plugin/docs/rules/no-empty-function.md @@ -88,3 +88,9 @@ class Foo { --- Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-empty-function.md) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-empty-interface.md b/packages/eslint-plugin/docs/rules/no-empty-interface.md index 7df218a7eca8..5eca9c8af107 100644 --- a/packages/eslint-plugin/docs/rules/no-empty-interface.md +++ b/packages/eslint-plugin/docs/rules/no-empty-interface.md @@ -62,3 +62,9 @@ If you don't care about having empty/meaningless interfaces, then you will not n ## Compatibility - TSLint: [no-empty-interface](https://palantir.github.io/tslint/rules/no-empty-interface/) + +## Attributes + +- [x] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-explicit-any.md b/packages/eslint-plugin/docs/rules/no-explicit-any.md index 7aeb465874eb..85256e33c716 100644 --- a/packages/eslint-plugin/docs/rules/no-explicit-any.md +++ b/packages/eslint-plugin/docs/rules/no-explicit-any.md @@ -179,3 +179,9 @@ and you want to be able to specify `any`. ## Compatibility - TSLint: [no-any](https://palantir.github.io/tslint/rules/no-any/) + +## Attributes + +- [x] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md b/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md index 0991efdee52f..8eb27f805c4e 100644 --- a/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md @@ -47,3 +47,9 @@ function foo(bar?: { n: number }) { "@typescript-eslint/no-extra-non-null-assertion": ["error"] } ``` + +## Attributes + +- [x] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-extra-parens.md b/packages/eslint-plugin/docs/rules/no-extra-parens.md index 8173b2ef1adb..8a748ac5a231 100644 --- a/packages/eslint-plugin/docs/rules/no-extra-parens.md +++ b/packages/eslint-plugin/docs/rules/no-extra-parens.md @@ -20,3 +20,9 @@ It adds support for TypeScript type assertions. See [`eslint/no-extra-parens` options](https://eslint.org/docs/rules/no-extra-parens#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-extra-parens.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-extra-semi.md b/packages/eslint-plugin/docs/rules/no-extra-semi.md index f6865bd8b54a..2d43f5223ee6 100644 --- a/packages/eslint-plugin/docs/rules/no-extra-semi.md +++ b/packages/eslint-plugin/docs/rules/no-extra-semi.md @@ -20,3 +20,9 @@ It adds support for class properties. See [`eslint/no-extra-semi` options](https://eslint.org/docs/rules/no-extra-semi#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-extra-semi.md) + +## Attributes + +- [x] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-extraneous-class.md b/packages/eslint-plugin/docs/rules/no-extraneous-class.md index abc84f272b4d..5a57c71ec4f0 100644 --- a/packages/eslint-plugin/docs/rules/no-extraneous-class.md +++ b/packages/eslint-plugin/docs/rules/no-extraneous-class.md @@ -78,3 +78,9 @@ team or if you use classes as namespaces. ## Compatibility [`no-unnecessary-class`](https://palantir.github.io/tslint/rules/no-unnecessary-class/) from TSLint + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-floating-promises.md b/packages/eslint-plugin/docs/rules/no-floating-promises.md index 86923bfad79c..1e7d0bf3299a 100644 --- a/packages/eslint-plugin/docs/rules/no-floating-promises.md +++ b/packages/eslint-plugin/docs/rules/no-floating-promises.md @@ -102,3 +102,9 @@ If you do not use Promise-like values in your codebase, or want to allow them to ## Related to - TSLint: ['no-floating-promises'](https://palantir.github.io/tslint/rules/no-floating-promises/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-for-in-array.md b/packages/eslint-plugin/docs/rules/no-for-in-array.md index c5d4c3f648dd..61ab8e0c1186 100644 --- a/packages/eslint-plugin/docs/rules/no-for-in-array.md +++ b/packages/eslint-plugin/docs/rules/no-for-in-array.md @@ -42,3 +42,9 @@ If you want to iterate through a loop using the indices in an array as strings, ## Related to - TSLint: ['no-for-in-array'](https://palantir.github.io/tslint/rules/no-for-in-array/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md b/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md index 8ef946b42865..81ac098690e2 100644 --- a/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md +++ b/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md @@ -74,3 +74,9 @@ If you are not using TypeScript 4.0 (or greater), then you will not be able to u ## Further Reading - [TypeScript 4.0 Beta Release Notes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-0-beta/#unknown-on-catch) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-implied-eval.md b/packages/eslint-plugin/docs/rules/no-implied-eval.md index a03ce7279352..2a89bed488fe 100644 --- a/packages/eslint-plugin/docs/rules/no-implied-eval.md +++ b/packages/eslint-plugin/docs/rules/no-implied-eval.md @@ -103,3 +103,9 @@ setTimeout(Foo.fn, 100); If you want to allow `new Function()` or `setTimeout()`, `setInterval()`, `setImmediate()` and `execScript()` with string arguments, then you can safely disable this rule. Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-implied-eval.md) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-inferrable-types.md b/packages/eslint-plugin/docs/rules/no-inferrable-types.md index 91fdfe6784a4..cde64f5b73da 100644 --- a/packages/eslint-plugin/docs/rules/no-inferrable-types.md +++ b/packages/eslint-plugin/docs/rules/no-inferrable-types.md @@ -144,3 +144,9 @@ TypeScript [Inference](https://www.typescriptlang.org/docs/handbook/type-inferen ## Compatibility TSLint: [no-inferrable-types](https://palantir.github.io/tslint/rules/no-inferrable-types/) + +## Attributes + +- [x] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-invalid-this.md b/packages/eslint-plugin/docs/rules/no-invalid-this.md index a7f907380af9..86d7a03eba5c 100644 --- a/packages/eslint-plugin/docs/rules/no-invalid-this.md +++ b/packages/eslint-plugin/docs/rules/no-invalid-this.md @@ -24,3 +24,9 @@ See [`eslint/no-invalid-this` options](https://eslint.org/docs/rules/no-invalid- When you are indifferent as to how your variables are initialized. Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-invalid-this.md) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-invalid-void-type.md b/packages/eslint-plugin/docs/rules/no-invalid-void-type.md index 567d9c0bb33e..7ba223348938 100644 --- a/packages/eslint-plugin/docs/rules/no-invalid-void-type.md +++ b/packages/eslint-plugin/docs/rules/no-invalid-void-type.md @@ -124,3 +124,9 @@ or in invalid places, then you don't need this rule. ## Compatibility - TSLint: [invalid-void](https://palantir.github.io/tslint/rules/invalid-void/) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-loop-func.md b/packages/eslint-plugin/docs/rules/no-loop-func.md index d4e66d6c7de7..0ca7ea515166 100644 --- a/packages/eslint-plugin/docs/rules/no-loop-func.md +++ b/packages/eslint-plugin/docs/rules/no-loop-func.md @@ -20,3 +20,9 @@ It adds support for TypeScript types. See [`eslint/no-loop-func` options](https://eslint.org/docs/rules/no-loop-func#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-loop-func.md) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-loss-of-precision.md b/packages/eslint-plugin/docs/rules/no-loss-of-precision.md index d6cf7b71c14a..d2e9fb23f6cd 100644 --- a/packages/eslint-plugin/docs/rules/no-loss-of-precision.md +++ b/packages/eslint-plugin/docs/rules/no-loss-of-precision.md @@ -17,3 +17,9 @@ Note that this rule requires ESLint v7. ``` Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-loss-of-precision.md) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-magic-numbers.md b/packages/eslint-plugin/docs/rules/no-magic-numbers.md index 8149ad6ddd6b..26739600713d 100644 --- a/packages/eslint-plugin/docs/rules/no-magic-numbers.md +++ b/packages/eslint-plugin/docs/rules/no-magic-numbers.md @@ -117,3 +117,9 @@ class Foo { ``` Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-magic-numbers.md) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md b/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md index 4aa69e5714b5..c9479679f414 100644 --- a/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md +++ b/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md @@ -48,3 +48,9 @@ This rule accepts a single object option with the following default configuratio ``` - `checkNever: true` will suggest removing `void` when the argument has type `never`. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-misused-new.md b/packages/eslint-plugin/docs/rules/no-misused-new.md index f315fcac289c..a920ba03cbf0 100644 --- a/packages/eslint-plugin/docs/rules/no-misused-new.md +++ b/packages/eslint-plugin/docs/rules/no-misused-new.md @@ -39,3 +39,9 @@ interface I { ## Compatibility - TSLint: [no-misused-new](https://palantir.github.io/tslint/rules/no-misused-new/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-misused-promises.md b/packages/eslint-plugin/docs/rules/no-misused-promises.md index 0d908890eda5..7e4f28170a6a 100644 --- a/packages/eslint-plugin/docs/rules/no-misused-promises.md +++ b/packages/eslint-plugin/docs/rules/no-misused-promises.md @@ -150,3 +150,9 @@ misuses of them outside of what the TypeScript compiler will check. ## Further Reading - [TypeScript void function assignability](https://github.com/Microsoft/TypeScript/wiki/FAQ#why-are-functions-returning-non-void-assignable-to-function-returning-void) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-namespace.md b/packages/eslint-plugin/docs/rules/no-namespace.md index da83ada2bbaa..465dd58b3e00 100644 --- a/packages/eslint-plugin/docs/rules/no-namespace.md +++ b/packages/eslint-plugin/docs/rules/no-namespace.md @@ -113,3 +113,9 @@ If you are using the ES2015 module syntax, then you will not need this rule. ## Compatibility - TSLint: [no-namespace](https://palantir.github.io/tslint/rules/no-namespace/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md b/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md index f09cb1ddb6d8..2eb8ff2585d6 100644 --- a/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md +++ b/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md @@ -47,3 +47,9 @@ If you are not using TypeScript 3.7 (or greater), then you will not need to use - [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html) - [Nullish Coalescing Proposal](https://github.com/tc39/proposal-nullish-coalescing) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md b/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md index fdb2a8a18f08..16a22b480358 100644 --- a/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md +++ b/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md @@ -46,3 +46,9 @@ If you are not using TypeScript 3.7 (or greater), then you will not need to use - [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html) - [Optional Chaining Proposal](https://github.com/tc39/proposal-optional-chaining/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-non-null-assertion.md b/packages/eslint-plugin/docs/rules/no-non-null-assertion.md index 04de5768628e..1eaebff625cc 100644 --- a/packages/eslint-plugin/docs/rules/no-non-null-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-non-null-assertion.md @@ -33,3 +33,9 @@ If you don't care about strict null-checking, then you will not need this rule. ## Further Reading - [`no-non-null-assertion`](https://palantir.github.io/tslint/rules/no-non-null-assertion/) in [TSLint](https://palantir.github.io/tslint/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-parameter-properties.md b/packages/eslint-plugin/docs/rules/no-parameter-properties.md index bb2fd2691967..6bde9296b5be 100644 --- a/packages/eslint-plugin/docs/rules/no-parameter-properties.md +++ b/packages/eslint-plugin/docs/rules/no-parameter-properties.md @@ -365,3 +365,9 @@ If you don't care about the using parameter properties in constructors, then you ## Compatibility - TSLint: [no-parameter-properties](https://palantir.github.io/tslint/rules/no-parameter-properties/) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-redeclare.md b/packages/eslint-plugin/docs/rules/no-redeclare.md index 539e691cfb26..98a4cf78ba3a 100644 --- a/packages/eslint-plugin/docs/rules/no-redeclare.md +++ b/packages/eslint-plugin/docs/rules/no-redeclare.md @@ -78,3 +78,9 @@ const something = 2; ``` Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-redeclare.md) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-require-imports.md b/packages/eslint-plugin/docs/rules/no-require-imports.md index 655fc57bd60a..2bc3eca93f97 100644 --- a/packages/eslint-plugin/docs/rules/no-require-imports.md +++ b/packages/eslint-plugin/docs/rules/no-require-imports.md @@ -32,3 +32,9 @@ If you don't care about TypeScript module syntax, then you will not need this ru ## Compatibility - TSLint: [no-require-imports](https://palantir.github.io/tslint/rules/no-require-imports/) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-restricted-imports.md b/packages/eslint-plugin/docs/rules/no-restricted-imports.md index 6e2e8d3e3dc1..359cfd4f084f 100644 --- a/packages/eslint-plugin/docs/rules/no-restricted-imports.md +++ b/packages/eslint-plugin/docs/rules/no-restricted-imports.md @@ -62,3 +62,9 @@ export { Foo } from 'import-foo'; import baz from 'import-baz'; export { Baz } from 'import-baz'; ``` + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-shadow.md b/packages/eslint-plugin/docs/rules/no-shadow.md index bcb40d4fb5a0..681ac7b25616 100644 --- a/packages/eslint-plugin/docs/rules/no-shadow.md +++ b/packages/eslint-plugin/docs/rules/no-shadow.md @@ -85,3 +85,9 @@ type Func = (test: string) => typeof test; ``` Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-shadow.md) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-this-alias.md b/packages/eslint-plugin/docs/rules/no-this-alias.md index ffb0db1e21ba..67cb36df2e4a 100644 --- a/packages/eslint-plugin/docs/rules/no-this-alias.md +++ b/packages/eslint-plugin/docs/rules/no-this-alias.md @@ -58,3 +58,9 @@ If you need to assign `this` to variables, you shouldn’t use this rule. ## Related to - TSLint: [`no-this-assignment`](https://palantir.github.io/tslint/rules/no-this-assignment/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-throw-literal.md b/packages/eslint-plugin/docs/rules/no-throw-literal.md index 0b89f10e9276..a67d422cdc43 100644 --- a/packages/eslint-plugin/docs/rules/no-throw-literal.md +++ b/packages/eslint-plugin/docs/rules/no-throw-literal.md @@ -92,3 +92,9 @@ throw new CustomError(); --- Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-throw-literal.md) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-type-alias.md b/packages/eslint-plugin/docs/rules/no-type-alias.md index 76bde791a8f9..a915516d065b 100644 --- a/packages/eslint-plugin/docs/rules/no-type-alias.md +++ b/packages/eslint-plugin/docs/rules/no-type-alias.md @@ -594,3 +594,9 @@ callback, etc. that would cause the code to be unreadable or impractical. ## Related to - TSLint: [interface-over-type-literal](https://palantir.github.io/tslint/rules/interface-over-type-literal/) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md b/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md index 2532504285f1..f39f663ddfb4 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md @@ -136,3 +136,9 @@ if (!(someNullCondition ?? true)) { ## Related to - TSLint: [no-boolean-literal-compare](https://palantir.github.io/tslint/rules/no-boolean-literal-compare) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md b/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md index bff0f548f50e..0dda0b0d8b2b 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md @@ -105,3 +105,9 @@ The main downside to using this rule is the need for type information. - ESLint: [no-constant-condition](https://eslint.org/docs/rules/no-constant-condition) - `no-unnecessary-condition` is essentially a stronger version of `no-constant-condition`, but requires type information. - [strict-boolean-expressions](./strict-boolean-expressions.md) - a more opinionated version of `no-unnecessary-condition`. `strict-boolean-expressions` enforces a specific code style, while `no-unnecessary-condition` is about correctness. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md b/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md index 56aba181cbae..2983307bbdb0 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md @@ -77,3 +77,9 @@ If you don't care about having unneeded namespace or enum qualifiers, then you d ## Further Reading - TSLint: [no-unnecessary-qualifier](https://palantir.github.io/tslint/rules/no-unnecessary-qualifier/) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md index f5caaa42cdfa..83d1041974d7 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md @@ -51,3 +51,9 @@ class Impl implements I {} ## Related to - TSLint: [use-default-type-parameter](https://palantir.github.io/tslint/rules/use-default-type-parameter) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md index 2851791f0b05..cfca8f20b1c3 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md @@ -71,3 +71,9 @@ If you don't care about having no-op type assertions in your code, then you can ## Related to - TSLint: [`no-unnecessary-type-assertion`](https://palantir.github.io/tslint/rules/no-unnecessary-type-assertion/) + +## Attributes + +- [x] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md index 8656ace566e3..dd0d5025f9ad 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md @@ -53,3 +53,9 @@ function Quuz() {} ## When Not To Use It If you don't care about the specific styles of your type constraints, or never use them in the first place, then you will not need this rule. + +## Attributes + +- [x] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-argument.md b/packages/eslint-plugin/docs/rules/no-unsafe-argument.md index 8065f838462e..a197ff65cab5 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-argument.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-argument.md @@ -67,3 +67,9 @@ foo(1 as any, new Set(), [] as any[]); - [`no-explicit-any`](./no-explicit-any.md) - TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md b/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md index 64207e5365ec..36542927eed0 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md @@ -70,3 +70,9 @@ const x: Set = y as Set; - [`no-explicit-any`](./no-explicit-any.md) - TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-call.md b/packages/eslint-plugin/docs/rules/no-unsafe-call.md index 1000e5921b8c..0dfb019bbaea 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-call.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-call.md @@ -46,3 +46,9 @@ String.raw`foo`; - [`no-explicit-any`](./no-explicit-any.md) - TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md b/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md index e64294f4e990..39c982d5debc 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md @@ -52,3 +52,9 @@ arr[idx++]; - [`no-explicit-any`](./no-explicit-any.md) - TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-return.md b/packages/eslint-plugin/docs/rules/no-unsafe-return.md index 225593eb02df..e089757a1771 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-return.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-return.md @@ -87,3 +87,9 @@ function foo2(): unknown[] { - [`no-explicit-any`](./no-explicit-any.md) - TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-unused-expressions.md b/packages/eslint-plugin/docs/rules/no-unused-expressions.md index cb61c2ed0409..760fca411932 100644 --- a/packages/eslint-plugin/docs/rules/no-unused-expressions.md +++ b/packages/eslint-plugin/docs/rules/no-unused-expressions.md @@ -20,3 +20,9 @@ It adds support for optional call expressions `x?.()`, and directive in module d See [`eslint/no-unused-expressions` options](https://eslint.org/docs/rules/no-unused-expressions#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-unused-expressions.md) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-unused-vars.md b/packages/eslint-plugin/docs/rules/no-unused-vars.md index 5eaf167a379a..0878d325c1ef 100644 --- a/packages/eslint-plugin/docs/rules/no-unused-vars.md +++ b/packages/eslint-plugin/docs/rules/no-unused-vars.md @@ -20,3 +20,9 @@ It adds support for TypeScript features, such as types. See [`eslint/no-unused-vars` options](https://eslint.org/docs/rules/no-unused-vars#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-unused-vars.md) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-use-before-define.md b/packages/eslint-plugin/docs/rules/no-use-before-define.md index d7ec0aadd73b..c6344fb04efc 100644 --- a/packages/eslint-plugin/docs/rules/no-use-before-define.md +++ b/packages/eslint-plugin/docs/rules/no-use-before-define.md @@ -102,3 +102,9 @@ enum Enum {} See [`eslint/no-use-before-define` options](https://eslint.org/docs/rules/no-use-before-define#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-use-before-define.md) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-useless-constructor.md b/packages/eslint-plugin/docs/rules/no-useless-constructor.md index 524ad4b92d9c..bca548db536c 100644 --- a/packages/eslint-plugin/docs/rules/no-useless-constructor.md +++ b/packages/eslint-plugin/docs/rules/no-useless-constructor.md @@ -24,3 +24,9 @@ It adds support for: See [`eslint/no-useless-constructor` options](https://eslint.org/docs/rules/no-useless-constructor#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-useless-constructor.md) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/no-var-requires.md b/packages/eslint-plugin/docs/rules/no-var-requires.md index 104a54943cda..19373a892838 100644 --- a/packages/eslint-plugin/docs/rules/no-var-requires.md +++ b/packages/eslint-plugin/docs/rules/no-var-requires.md @@ -27,3 +27,9 @@ If you don't care about TypeScript module syntax, then you will not need this ru ## Compatibility - TSLint: [no-var-requires](https://palantir.github.io/tslint/rules/no-var-requires/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md b/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md index 473f83b0a9bf..a152ee122058 100644 --- a/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md +++ b/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md @@ -25,3 +25,9 @@ const alsoDefinitely = maybe!; ## When Not To Use It If you don't mind having unnecessarily verbose type casts, you can avoid this rule. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/object-curly-spacing.md b/packages/eslint-plugin/docs/rules/object-curly-spacing.md index 44bd35afb592..7fec0a164936 100644 --- a/packages/eslint-plugin/docs/rules/object-curly-spacing.md +++ b/packages/eslint-plugin/docs/rules/object-curly-spacing.md @@ -20,3 +20,9 @@ It adds support for TypeScript's object types. See [`eslint/object-curly-spacing` options](https://eslint.org/docs/rules/object-curly-spacing#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/object-curly-spacing.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/padding-line-between-statements.md b/packages/eslint-plugin/docs/rules/padding-line-between-statements.md index b23ce702b788..bce407ea4410 100644 --- a/packages/eslint-plugin/docs/rules/padding-line-between-statements.md +++ b/packages/eslint-plugin/docs/rules/padding-line-between-statements.md @@ -46,3 +46,9 @@ See [`eslint/padding-line-between-statements` options](https://eslint.org/docs/r **Note** - In addition to options provided by ESLint, we have also added options for `interface` and `type`. Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/padding-line-between-statements.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-as-const.md b/packages/eslint-plugin/docs/rules/prefer-as-const.md index b710a8275e7a..94c21dac9d0d 100644 --- a/packages/eslint-plugin/docs/rules/prefer-as-const.md +++ b/packages/eslint-plugin/docs/rules/prefer-as-const.md @@ -26,3 +26,9 @@ let foo = { bar: 'baz' }; ## When Not To Use It If you are using TypeScript < 3.4 + +## Attributes + +- [x] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md b/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md index 1e8f568d721f..b7aeb21a772f 100644 --- a/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md +++ b/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md @@ -68,3 +68,9 @@ enum Color { ## When Not To Use It If you don't care about `enum`s having implicit values you can safely disable this rule. + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-for-of.md b/packages/eslint-plugin/docs/rules/prefer-for-of.md index 0b1e5570d757..919531136a47 100644 --- a/packages/eslint-plugin/docs/rules/prefer-for-of.md +++ b/packages/eslint-plugin/docs/rules/prefer-for-of.md @@ -39,3 +39,9 @@ If you transpile for browsers that do not support for-of loops, you may wish to ## Related to - TSLint: ['prefer-for-of'](https://palantir.github.io/tslint/rules/prefer-for-of/) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-function-type.md b/packages/eslint-plugin/docs/rules/prefer-function-type.md index 5c3bc55c9f2c..007f3baa01a0 100644 --- a/packages/eslint-plugin/docs/rules/prefer-function-type.md +++ b/packages/eslint-plugin/docs/rules/prefer-function-type.md @@ -79,3 +79,9 @@ If you specifically want to use an interface or type literal with a single call ## Further Reading - TSLint: [`callable-types`](https://palantir.github.io/tslint/rules/callable-types/) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-includes.md b/packages/eslint-plugin/docs/rules/prefer-includes.md index 018780a657d2..29c37563fd40 100644 --- a/packages/eslint-plugin/docs/rules/prefer-includes.md +++ b/packages/eslint-plugin/docs/rules/prefer-includes.md @@ -71,3 +71,9 @@ There are no options. ## When Not To Use It If you don't want to suggest `includes`, you can safely turn this rule off. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md b/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md index 2086f6533cf8..94891c46235c 100644 --- a/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md +++ b/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md @@ -84,3 +84,9 @@ enum Foo { ## When Not To Use It If you want use anything other than simple literals as an enum value. + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md b/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md index faeeaadf8c58..4723cbd06f6d 100644 --- a/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md +++ b/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md @@ -20,3 +20,9 @@ If you are using the ES2015 module syntax, then you will not need this rule. ## Compatibility - TSLint: [no-internal-module](https://palantir.github.io/tslint/rules/no-internal-module/) + +## Attributes + +- [x] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md b/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md index bb32c02895be..feb7735ddc83 100644 --- a/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md +++ b/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md @@ -139,3 +139,9 @@ If you are not using TypeScript 3.7 (or greater), then you will not be able to u - [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html) - [Nullish Coalescing Operator Proposal](https://github.com/tc39/proposal-nullish-coalescing/) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-optional-chain.md b/packages/eslint-plugin/docs/rules/prefer-optional-chain.md index 6505c93959a6..22c596b4375d 100644 --- a/packages/eslint-plugin/docs/rules/prefer-optional-chain.md +++ b/packages/eslint-plugin/docs/rules/prefer-optional-chain.md @@ -80,3 +80,9 @@ If you are not using TypeScript 3.7 (or greater), then you will not be able to u - [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html) - [Optional Chaining Proposal](https://github.com/tc39/proposal-optional-chaining/) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md b/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md index 3b6f1346d7c9..b6a57c4b0692 100644 --- a/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +++ b/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md @@ -255,3 +255,9 @@ type MyType = { }; function foo(arg: MyType) {} ``` + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-readonly.md b/packages/eslint-plugin/docs/rules/prefer-readonly.md index 9ce16a8c35fb..df41adb8c838 100644 --- a/packages/eslint-plugin/docs/rules/prefer-readonly.md +++ b/packages/eslint-plugin/docs/rules/prefer-readonly.md @@ -79,3 +79,9 @@ class Container { ## Related to - TSLint: ['prefer-readonly'](https://palantir.github.io/tslint/rules/prefer-readonly) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md b/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md index d6f68021cc73..04bd5803a4a9 100644 --- a/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md +++ b/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md @@ -52,3 +52,9 @@ There are no options. ## When Not To Use It If you don't want to use typechecking in your linting, you can't use this rule. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md b/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md index 3f3d149a7f7a..32209cf731c5 100644 --- a/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md +++ b/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md @@ -49,3 +49,9 @@ There are no options. ## When Not To Use It If you prefer consistent use of `String#match` for both, with `g` flag and without it, you can turn this rule off. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-return-this-type.md b/packages/eslint-plugin/docs/rules/prefer-return-this-type.md index 161495b82c00..c61c462889f9 100644 --- a/packages/eslint-plugin/docs/rules/prefer-return-this-type.md +++ b/packages/eslint-plugin/docs/rules/prefer-return-this-type.md @@ -88,3 +88,9 @@ class Derived extends Base { ## When Not To Use It If you don't use method chaining or explicit return values, you can safely turn this rule off. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md b/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md index 110061d554b7..729da9373078 100644 --- a/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md +++ b/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md @@ -52,3 +52,9 @@ There are no options. ## When Not To Use It If you don't mind that style, you can turn this rule off safely. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md b/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md index 60fdf79c8069..2ae69fe7d19d 100644 --- a/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md +++ b/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md @@ -63,3 +63,9 @@ If you are **NOT** using TypeScript 3.9 (or greater), then you will not be able ## Further Reading - [Original Implementing PR](https://github.com/microsoft/TypeScript/pull/36014) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/promise-function-async.md b/packages/eslint-plugin/docs/rules/promise-function-async.md index 192e66a35775..7638e6bc5920 100644 --- a/packages/eslint-plugin/docs/rules/promise-function-async.md +++ b/packages/eslint-plugin/docs/rules/promise-function-async.md @@ -64,3 +64,9 @@ In addition, each of the following properties may be provided, and default to `t ## Related To - TSLint: [promise-function-async](https://palantir.github.io/tslint/rules/promise-function-async) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/quotes.md b/packages/eslint-plugin/docs/rules/quotes.md index 6b63587f6b46..0801bebe5cc6 100644 --- a/packages/eslint-plugin/docs/rules/quotes.md +++ b/packages/eslint-plugin/docs/rules/quotes.md @@ -20,3 +20,9 @@ It adds support for TypeScript features which allow quoted names, but not backti See [`eslint/quotes` options](https://eslint.org/docs/rules/quotes#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/quotes.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/require-array-sort-compare.md b/packages/eslint-plugin/docs/rules/require-array-sort-compare.md index 7203452b6b59..7ad10fbdb00a 100644 --- a/packages/eslint-plugin/docs/rules/require-array-sort-compare.md +++ b/packages/eslint-plugin/docs/rules/require-array-sort-compare.md @@ -83,3 +83,9 @@ const three = '3'; ## When Not To Use It If you understand the language specification enough, you can turn this rule off safely. + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/require-await.md b/packages/eslint-plugin/docs/rules/require-await.md index 2d8ad41fda9e..a0eeda41eaf7 100644 --- a/packages/eslint-plugin/docs/rules/require-await.md +++ b/packages/eslint-plugin/docs/rules/require-await.md @@ -30,3 +30,9 @@ const returnsPromise2 = () => returnsPromise1(); See [`eslint/require-await` options](https://eslint.org/docs/rules/require-await#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/require-await.md) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/restrict-plus-operands.md b/packages/eslint-plugin/docs/rules/restrict-plus-operands.md index 0959f837739b..5299b7345268 100644 --- a/packages/eslint-plugin/docs/rules/restrict-plus-operands.md +++ b/packages/eslint-plugin/docs/rules/restrict-plus-operands.md @@ -56,3 +56,9 @@ bar += 'test'; ## Compatibility - TSLint: [restrict-plus-operands](https://palantir.github.io/tslint/rules/restrict-plus-operands/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/restrict-template-expressions.md b/packages/eslint-plugin/docs/rules/restrict-template-expressions.md index e567b6571b66..d56eb6ae74b9 100644 --- a/packages/eslint-plugin/docs/rules/restrict-template-expressions.md +++ b/packages/eslint-plugin/docs/rules/restrict-template-expressions.md @@ -100,3 +100,9 @@ const msg1 = `arg = ${arg}`; const arg = /foo/; const msg1 = `arg = ${arg}`; ``` + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/return-await.md b/packages/eslint-plugin/docs/rules/return-await.md index 3c621d251044..df8813ff9c0f 100644 --- a/packages/eslint-plugin/docs/rules/return-await.md +++ b/packages/eslint-plugin/docs/rules/return-await.md @@ -206,3 +206,9 @@ async function validNever3() { return 'value'; } ``` + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/semi.md b/packages/eslint-plugin/docs/rules/semi.md index c233d3546316..15b13d80b4a4 100644 --- a/packages/eslint-plugin/docs/rules/semi.md +++ b/packages/eslint-plugin/docs/rules/semi.md @@ -24,3 +24,9 @@ See also the [`@typescript-eslint/member-delimiter-style`](member-delimiter-styl See [`eslint/semi` options](https://eslint.org/docs/rules/semi#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/semi.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md b/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md index 43ef069a7165..c275dc5ee052 100644 --- a/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md +++ b/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md @@ -145,3 +145,9 @@ The ordering of groups is determined by this option. - `tuple` - Tuple types (`[A, B, C]`) - `union` - Union types (`A | B`) - `nullish` - `null` and `undefined` + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/space-before-function-paren.md b/packages/eslint-plugin/docs/rules/space-before-function-paren.md index db2579e44d1b..29378534d40c 100644 --- a/packages/eslint-plugin/docs/rules/space-before-function-paren.md +++ b/packages/eslint-plugin/docs/rules/space-before-function-paren.md @@ -20,3 +20,9 @@ It adds support for generic type parameters on function calls. See [`eslint/space-before-function-paren` options](https://eslint.org/docs/rules/space-before-function-paren#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/space-before-function-paren.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/space-infix-ops.md b/packages/eslint-plugin/docs/rules/space-infix-ops.md index da36f25726e2..030edc2f69c9 100644 --- a/packages/eslint-plugin/docs/rules/space-infix-ops.md +++ b/packages/eslint-plugin/docs/rules/space-infix-ops.md @@ -24,3 +24,9 @@ enum MyEnum { See [`eslint/space-infix-ops` options](https://eslint.org/docs/rules/space-infix-ops#options). Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/space-infix-ops.md) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md b/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md index b1ad94d8b340..1d5b0435fe17 100644 --- a/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md +++ b/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md @@ -192,3 +192,9 @@ This rule provides following fixes and suggestions for particular types in boole - TSLint: [strict-boolean-expressions](https://palantir.github.io/tslint/rules/strict-boolean-expressions) - [no-unnecessary-condition](./no-unnecessary-condition.md) - Similar rule which reports always-truthy and always-falsy values in conditions + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md b/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md index a26c6e6dff27..b5f3ad11f3c6 100644 --- a/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md +++ b/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md @@ -101,3 +101,9 @@ switch (day) { ## When Not To Use It If program doesn't have union types with many parts. Downside of this rule is the need for type information, so it's slower than regular rules. + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/triple-slash-reference.md b/packages/eslint-plugin/docs/rules/triple-slash-reference.md index 9eb463a3c790..89bf247650de 100644 --- a/packages/eslint-plugin/docs/rules/triple-slash-reference.md +++ b/packages/eslint-plugin/docs/rules/triple-slash-reference.md @@ -54,3 +54,9 @@ If you want to use all flavors of triple slash reference directives. - TSLint: [no-reference](http://palantir.github.io/tslint/rules/no-reference/) - TSLint: [no-reference-import](https://palantir.github.io/tslint/rules/no-reference-import/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/type-annotation-spacing.md b/packages/eslint-plugin/docs/rules/type-annotation-spacing.md index 32b7b655814d..cb6b694a15b9 100644 --- a/packages/eslint-plugin/docs/rules/type-annotation-spacing.md +++ b/packages/eslint-plugin/docs/rules/type-annotation-spacing.md @@ -289,3 +289,9 @@ If you don't want to enforce spacing for your type annotations, you can safely t ## Compatibility - TSLint: [`typedef-whitespace`](https://palantir.github.io/tslint/rules/typedef-whitespace/) + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/typedef.md b/packages/eslint-plugin/docs/rules/typedef.md index 03409e110bf8..e3de5baf5e56 100644 --- a/packages/eslint-plugin/docs/rules/typedef.md +++ b/packages/eslint-plugin/docs/rules/typedef.md @@ -306,3 +306,9 @@ In general, if you do not consider the cost of writing unnecessary type annotati ## Compatibility - TSLint: [`typedef`](https://palantir.github.io/tslint/rules/typedef) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/unbound-method.md b/packages/eslint-plugin/docs/rules/unbound-method.md index 538edaf95631..22a9a9039b39 100644 --- a/packages/eslint-plugin/docs/rules/unbound-method.md +++ b/packages/eslint-plugin/docs/rules/unbound-method.md @@ -112,3 +112,9 @@ If you're wanting to use `toBeCalled` and similar matches in `jest` tests, you c ## Related To - TSLint: [no-unbound-method](https://palantir.github.io/tslint/rules/no-unbound-method/) + +## Attributes + +- [x] ✅ Recommended +- [ ] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/docs/rules/unified-signatures.md b/packages/eslint-plugin/docs/rules/unified-signatures.md index 7ed5116c2aa6..f9d6b3a49e69 100644 --- a/packages/eslint-plugin/docs/rules/unified-signatures.md +++ b/packages/eslint-plugin/docs/rules/unified-signatures.md @@ -31,3 +31,9 @@ function f(x?: ...number[]): void; ## Related to - TSLint: [`unified-signatures`](https://palantir.github.io/tslint/rules/unified-signatures/) + +## Attributes + +- [ ] ✅ Recommended +- [ ] 🔧 Fixable +- [ ] 💭 Requires type information diff --git a/packages/eslint-plugin/tests/docs.test.ts b/packages/eslint-plugin/tests/docs.test.ts index f8aa38132a4d..4164f8b3613f 100644 --- a/packages/eslint-plugin/tests/docs.test.ts +++ b/packages/eslint-plugin/tests/docs.test.ts @@ -70,6 +70,33 @@ describe('Validating rule docs', () => { text: `${rule.meta.docs?.description} (\`${ruleName}\`)`, }); }); + + it('Attributes in the docs must match the metadata', () => { + const file = fs.readFileSync(filePath, 'utf-8'); + const tokens = marked.lexer(file, { + gfm: true, + silent: false, + }); + + // Verify attributes header exists + const attributesHeaderIndex = tokens.findIndex( + token => token.type === 'heading' && token.text === 'Attributes', + ); + expect(attributesHeaderIndex).toBeGreaterThan(-1); + + // Verify attributes content + const attributesList = tokens[ + attributesHeaderIndex + 1 + ] as marked.Tokens.List; + const recommended = attributesList.items[0]; + expect(rule.meta.docs?.recommended !== false).toBe(recommended.checked); + const fixable = attributesList.items[1]; + expect(rule.meta.fixable !== undefined).toBe(fixable.checked); + const requiresTypeChecking = attributesList.items[2]; + expect(rule.meta.docs?.requiresTypeChecking === true).toBe( + requiresTypeChecking.checked, + ); + }); } }); From 283cdf26e6b32985531ff6416cd13ef4cb0a3c8c Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Sun, 17 Oct 2021 22:51:12 -0300 Subject: [PATCH 449/473] fix(eslint-plugin): [no-restricted-imports]: report type-only imports properly (#3996) --- .../src/rules/no-restricted-imports.ts | 11 +++++++---- .../tests/rules/no-restricted-imports.test.ts | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-restricted-imports.ts b/packages/eslint-plugin/src/rules/no-restricted-imports.ts index 7a583a01a1d7..d7437cab76bb 100644 --- a/packages/eslint-plugin/src/rules/no-restricted-imports.ts +++ b/packages/eslint-plugin/src/rules/no-restricted-imports.ts @@ -4,13 +4,13 @@ import { ArrayOfStringOrObjectPatterns, } from 'eslint/lib/rules/no-restricted-imports'; import ignore, { Ignore } from 'ignore'; -import { getESLintCoreRule } from '../util/getESLintCoreRule'; import { createRule, deepMerge, InferMessageIdsTypeFromRule, InferOptionsTypeFromRule, } from '../util'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; const baseRule = getESLintCoreRule('no-restricted-imports'); @@ -150,9 +150,12 @@ export default createRule({ } } function isAllowedTypeImportPattern(importSource: string): boolean { - return allowedImportTypeMatchers.every(matcher => { - return matcher.ignores(importSource); - }); + return ( + allowedImportTypeMatchers.length > 0 && + allowedImportTypeMatchers.every(matcher => { + return matcher.ignores(importSource); + }) + ); } return { diff --git a/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts b/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts index 143bfd95aae9..059a7d1cad8f 100644 --- a/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts +++ b/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts @@ -535,5 +535,19 @@ ruleTester.run('no-restricted-imports', rule, { }, ], }, + { + code: "import type { InvalidTestCase } from '@typescript-eslint/experimental-utils/dist/ts-eslint';", + options: [ + { + patterns: ['@typescript-eslint/experimental-utils/dist/*'], + }, + ], + errors: [ + { + messageId: 'patterns', + type: AST_NODE_TYPES.ImportDeclaration, + }, + ], + }, ], }); From 6746b8ccaef9e16623f5418965af2cf2dd609694 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 18 Oct 2021 00:16:36 -0400 Subject: [PATCH 450/473] docs: added checklist to PR template (#4019) --- .github/PULL_REQUEST_TEMPLATE/standard.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/standard.md b/.github/PULL_REQUEST_TEMPLATE/standard.md index fb7952bc7689..c7cb7fa4c9e5 100644 --- a/.github/PULL_REQUEST_TEMPLATE/standard.md +++ b/.github/PULL_REQUEST_TEMPLATE/standard.md @@ -6,4 +6,16 @@ labels: '' assignees: '' --- - + + +## PR Checklist + +- [ ] Addresses an existing issue: fixes #000 +- [ ] Steps in [CONTRIBUTING.md](https://github.com/typescript-eslint/typescript-eslint/blob/master/CONTRIBUTING.md) were taken + +## Overview + + From d4ff88e766a3fd0db3eda5c1ec24307d936a522e Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 18 Oct 2021 17:01:45 +0000 Subject: [PATCH 451/473] chore: publish v5.1.0 --- CHANGELOG.md | 18 ++++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.json | 2 +- packages/eslint-plugin-internal/CHANGELOG.md | 8 ++++++++ packages/eslint-plugin-internal/package.json | 6 +++--- packages/eslint-plugin-tslint/CHANGELOG.md | 8 ++++++++ packages/eslint-plugin-tslint/package.json | 6 +++--- packages/eslint-plugin/CHANGELOG.md | 12 ++++++++++++ packages/eslint-plugin/package.json | 6 +++--- packages/experimental-utils/CHANGELOG.md | 11 +++++++++++ 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 | 11 +++++++++++ packages/shared-fixtures/package.json | 2 +- packages/types/CHANGELOG.md | 8 ++++++++ packages/types/package.json | 2 +- packages/typescript-estree/CHANGELOG.md | 11 +++++++++++ packages/typescript-estree/package.json | 8 ++++---- packages/visitor-keys/CHANGELOG.md | 8 ++++++++ packages/visitor-keys/package.json | 4 ++-- 24 files changed, 151 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bb0ead323c9..f00b16aa22f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.1.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.0.0...v5.1.0) (2021-10-18) + + +### Bug Fixes + +* **eslint-plugin:** [no-restricted-imports]: report type-only imports properly ([#3996](https://github.com/typescript-eslint/typescript-eslint/issues/3996)) ([283cdf2](https://github.com/typescript-eslint/typescript-eslint/commit/283cdf26e6b32985531ff6416cd13ef4cb0a3c8c)) +* **eslint-plugin:** [strict-bool-expr] treat unconstrained generic as any ([#3981](https://github.com/typescript-eslint/typescript-eslint/issues/3981)) ([9b29ca7](https://github.com/typescript-eslint/typescript-eslint/commit/9b29ca751f496c25240c0c14b8fa432bf4443d39)) +* **typescript-estree:** support private optional property definition ([#3997](https://github.com/typescript-eslint/typescript-eslint/issues/3997)) ([8605e08](https://github.com/typescript-eslint/typescript-eslint/commit/8605e080a4dac4a277e6108cd9ed1e5a707302fa)) + + +### Features + +* **experimental-utils:** extract `ast-utils`' `predicates`' helpers ([#3976](https://github.com/typescript-eslint/typescript-eslint/issues/3976)) ([154ec9a](https://github.com/typescript-eslint/typescript-eslint/commit/154ec9aea8e81732cafe36af97c4822f1591b077)) + + + + + # [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) diff --git a/lerna.json b/lerna.json index a266c1ab0e92..b2516f272e6f 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "5.0.0", + "version": "5.1.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 9700836b888b..737798f76302 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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. +# [5.1.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.0.0...v5.1.0) (2021-10-18) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + # [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index c08b098c97f6..edf761cc320c 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "5.0.0", + "version": "5.1.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index fe63a7a67a5c..094aa938b67a 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. +# [5.1.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.0.0...v5.1.0) (2021-10-18) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 4ca7567c8b87..e90bddb65b76 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": "5.0.0", + "version": "5.1.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,8 +14,8 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "5.0.0", - "@typescript-eslint/scope-manager": "5.0.0", + "@typescript-eslint/experimental-utils": "5.1.0", + "@typescript-eslint/scope-manager": "5.1.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 689580cb9419..867d4fb60953 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. +# [5.1.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.0.0...v5.1.0) (2021-10-18) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 33378ffd2bf3..e12342ddca30 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": "5.0.0", + "version": "5.1.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": "5.0.0", + "@typescript-eslint/experimental-utils": "5.1.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "5.0.0" + "@typescript-eslint/parser": "5.1.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 24164b8b9adb..c4b4a02927b5 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.1.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.0.0...v5.1.0) (2021-10-18) + + +### Bug Fixes + +* **eslint-plugin:** [no-restricted-imports]: report type-only imports properly ([#3996](https://github.com/typescript-eslint/typescript-eslint/issues/3996)) ([283cdf2](https://github.com/typescript-eslint/typescript-eslint/commit/283cdf26e6b32985531ff6416cd13ef4cb0a3c8c)) +* **eslint-plugin:** [strict-bool-expr] treat unconstrained generic as any ([#3981](https://github.com/typescript-eslint/typescript-eslint/issues/3981)) ([9b29ca7](https://github.com/typescript-eslint/typescript-eslint/commit/9b29ca751f496c25240c0c14b8fa432bf4443d39)) + + + + + # [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 445da28ce5f4..3680113c65ba 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "5.0.0", + "version": "5.1.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "5.0.0", - "@typescript-eslint/scope-manager": "5.0.0", + "@typescript-eslint/experimental-utils": "5.1.0", + "@typescript-eslint/scope-manager": "5.1.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index d6c5611fcacb..8f07578950cb 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.1.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.0.0...v5.1.0) (2021-10-18) + + +### Features + +* **experimental-utils:** extract `ast-utils`' `predicates`' helpers ([#3976](https://github.com/typescript-eslint/typescript-eslint/issues/3976)) ([154ec9a](https://github.com/typescript-eslint/typescript-eslint/commit/154ec9aea8e81732cafe36af97c4822f1591b077)) + + + + + # [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 92da68df9b65..81bb3630e070 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "5.0.0", + "version": "5.1.0", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.0.0", - "@typescript-eslint/types": "5.0.0", - "@typescript-eslint/typescript-estree": "5.0.0", + "@typescript-eslint/scope-manager": "5.1.0", + "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/typescript-estree": "5.1.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 4328fce0b216..c91ed5d1b920 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. +# [5.1.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.0.0...v5.1.0) (2021-10-18) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) diff --git a/packages/parser/package.json b/packages/parser/package.json index 95eb1ac7048e..f034ae342a6a 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "5.0.0", + "version": "5.1.0", "description": "An ESLint custom parser which leverages TypeScript ESTree", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -44,14 +44,14 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "5.0.0", - "@typescript-eslint/types": "5.0.0", - "@typescript-eslint/typescript-estree": "5.0.0", + "@typescript-eslint/scope-manager": "5.1.0", + "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/typescript-estree": "5.1.0", "debug": "^4.3.2" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "5.0.0", + "@typescript-eslint/experimental-utils": "5.1.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 40ae08d39d9f..17deefba0373 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. +# [5.1.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.0.0...v5.1.0) (2021-10-18) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index e534cc63c536..5b074b231cc2 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "5.0.0", + "version": "5.1.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "5.0.0", - "@typescript-eslint/visitor-keys": "5.0.0" + "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/visitor-keys": "5.1.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "5.0.0", + "@typescript-eslint/typescript-estree": "5.1.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index ee8c3d0abc6a..26303e8657c1 100644 --- a/packages/shared-fixtures/CHANGELOG.md +++ b/packages/shared-fixtures/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.1.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.0.0...v5.1.0) (2021-10-18) + + +### Bug Fixes + +* **typescript-estree:** support private optional property definition ([#3997](https://github.com/typescript-eslint/typescript-eslint/issues/3997)) ([8605e08](https://github.com/typescript-eslint/typescript-eslint/commit/8605e080a4dac4a277e6108cd9ed1e5a707302fa)) + + + + + # [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) diff --git a/packages/shared-fixtures/package.json b/packages/shared-fixtures/package.json index a93c026c4fb6..235b177883f1 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "5.0.0", + "version": "5.1.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 9a266a4a5eb9..3f60d3493df4 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. +# [5.1.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.0.0...v5.1.0) (2021-10-18) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) diff --git a/packages/types/package.json b/packages/types/package.json index 0d0adb29f43c..82972609de94 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "5.0.0", + "version": "5.1.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 c5368d811729..1a444e8d5ff0 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.1.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.0.0...v5.1.0) (2021-10-18) + + +### Bug Fixes + +* **typescript-estree:** support private optional property definition ([#3997](https://github.com/typescript-eslint/typescript-eslint/issues/3997)) ([8605e08](https://github.com/typescript-eslint/typescript-eslint/commit/8605e080a4dac4a277e6108cd9ed1e5a707302fa)) + + + + + # [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 3a87418410ac..5d615bb7cc06 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "5.0.0", + "version": "5.1.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": "5.0.0", - "@typescript-eslint/visitor-keys": "5.0.0", + "@typescript-eslint/types": "5.1.0", + "@typescript-eslint/visitor-keys": "5.1.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "5.0.0", + "@typescript-eslint/shared-fixtures": "5.1.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 6393289b2c82..780f273ba519 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. +# [5.1.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.0.0...v5.1.0) (2021-10-18) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [5.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.33.0...v5.0.0) (2021-10-11) diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 4ef726e3e3d7..1aff4bd6991b 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "5.0.0", + "version": "5.1.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": "5.0.0", + "@typescript-eslint/types": "5.1.0", "eslint-visitor-keys": "^3.0.0" }, "devDependencies": { From ef1c82cc2e70347a689f60ec048d04b17a9e9c42 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 19:16:01 -0700 Subject: [PATCH 452/473] chore: bump ts-jest from 27.0.5 to 27.0.7 (#4023) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 27.0.5 to 27.0.7. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v27.0.5...v27.0.7) --- updated-dependencies: - dependency-name: ts-jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0b8ce3dd57ae..63150d8b5bbe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6722,6 +6722,11 @@ lodash.map@^4.5.1: resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM= +lodash.memoize@4.x: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= + lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" @@ -6757,7 +6762,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@4.x, lodash@^4.11.2, lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.2.1, lodash@^4.7.0, lodash@~4.17.15: +lodash@^4.11.2, lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.2.1, lodash@^4.7.0, lodash@~4.17.15: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -9397,15 +9402,15 @@ trim-newlines@^3.0.0: integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== ts-jest@^27.0.5: - version "27.0.5" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.5.tgz#0b0604e2271167ec43c12a69770f0bb65ad1b750" - integrity sha512-lIJApzfTaSSbtlksfFNHkWOzLJuuSm4faFAfo5kvzOiRAuoN4/eKxVJ2zEAho8aecE04qX6K1pAzfH5QHL1/8w== + version "27.0.7" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.7.tgz#fb7c8c8cb5526ab371bc1b23d06e745652cca2d0" + integrity sha512-O41shibMqzdafpuP+CkrOL7ykbmLh+FqQrXEmV9CydQ5JBk0Sj0uAEF5TNNe94fZWKm3yYvWa/IbyV4Yg1zK2Q== dependencies: bs-logger "0.x" fast-json-stable-stringify "2.x" jest-util "^27.0.0" json5 "2.x" - lodash "4.x" + lodash.memoize "4.x" make-error "1.x" semver "7.x" yargs-parser "20.x" From b21d4de455c908080e89866d08ebc9a4a7a0f859 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 19:16:09 -0700 Subject: [PATCH 453/473] chore: bump eslint-plugin-jest from 25.0.6 to 25.2.2 (#4022) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 25.0.6 to 25.2.2. - [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/v25.0.6...v25.2.2) --- updated-dependencies: - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-minor ... 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 63150d8b5bbe..71343e1630ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4174,9 +4174,9 @@ eslint-plugin-import@^2.25.2: tsconfig-paths "^3.11.0" eslint-plugin-jest@^25.0.5: - version "25.0.6" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-25.0.6.tgz#75141c0ee60a5747d27b9920f3687d13a012cbb4" - integrity sha512-uXmY2P1iYew6m7ziAyrO6Ircb/r0161s9oxfR8G1HY65KTHm0RY6ohz95PxrW6eQnhqQ7dEk+WodzSdHBZZs3A== + version "25.2.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-25.2.2.tgz#aada85113268e79d4e7423f8ad4e1b740f112e71" + integrity sha512-frn5yhOF60U4kcqozO3zKTNZQUk+mfx037XOy2iiYL8FhorEkuCuL3/flzKcY1ECDP2WYT9ydmvlO3fRW9o4mg== dependencies: "@typescript-eslint/experimental-utils" "^5.0.0" From 1ad921beabaeef55f79c4bc41cdec0103523f71f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 19:16:28 -0700 Subject: [PATCH 454/473] chore: bump jest from 27.2.5 to 27.3.0 (#4020) Bumps [jest](https://github.com/facebook/jest) from 27.2.5 to 27.3.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/compare/v27.2.5...v27.3.0) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 564 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 482 insertions(+), 82 deletions(-) diff --git a/yarn.lock b/yarn.lock index 71343e1630ae..5a128db0447b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -833,15 +833,27 @@ jest-util "^27.2.5" slash "^3.0.0" -"@jest/core@^27.2.5": - version "27.2.5" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.2.5.tgz#854c314708cee0d892ac4f531b9129f00a21ee69" - integrity sha512-VR7mQ+jykHN4WO3OvusRJMk4xCa2MFLipMS+43fpcRGaYrN1KwMATfVEXif7ccgFKYGy5D1TVXTNE4mGq/KMMA== +"@jest/console@^27.3.0": + version "27.3.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.3.0.tgz#a55f03a4f7e1e92a5879bdab2e8b9fe4dd5312ba" + integrity sha512-+Tr/xoNiosjckq96xIGpDaGsybeIm45VWXpSvDR8T9deXmWjYKX85prhz8yFPhLG4UVOeMo/B6RI/+flw3sO8A== dependencies: - "@jest/console" "^27.2.5" - "@jest/reporters" "^27.2.5" - "@jest/test-result" "^27.2.5" - "@jest/transform" "^27.2.5" + "@jest/types" "^27.2.5" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^27.3.0" + jest-util "^27.3.0" + slash "^3.0.0" + +"@jest/core@^27.3.0": + version "27.3.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.3.0.tgz#50a521c663181f3a34ecb24bb9fe717e125dc784" + integrity sha512-0B3PWQouwS651m8AbQDse08dfRlzLHqSmywRPGYn2ZzU6RT4aP2Xwz8mEWfSPXXZmtwAtNgUXy0Cbt6QsBqKvw== + dependencies: + "@jest/console" "^27.3.0" + "@jest/reporters" "^27.3.0" + "@jest/test-result" "^27.3.0" + "@jest/transform" "^27.3.0" "@jest/types" "^27.2.5" "@types/node" "*" ansi-escapes "^4.2.1" @@ -849,19 +861,19 @@ emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^27.2.5" - jest-config "^27.2.5" - jest-haste-map "^27.2.5" - jest-message-util "^27.2.5" + jest-changed-files "^27.3.0" + jest-config "^27.3.0" + jest-haste-map "^27.3.0" + jest-message-util "^27.3.0" jest-regex-util "^27.0.6" - jest-resolve "^27.2.5" - jest-resolve-dependencies "^27.2.5" - jest-runner "^27.2.5" - jest-runtime "^27.2.5" - jest-snapshot "^27.2.5" - jest-util "^27.2.5" - jest-validate "^27.2.5" - jest-watcher "^27.2.5" + jest-resolve "^27.3.0" + jest-resolve-dependencies "^27.3.0" + jest-runner "^27.3.0" + jest-runtime "^27.3.0" + jest-snapshot "^27.3.0" + jest-util "^27.3.0" + jest-validate "^27.3.0" + jest-watcher "^27.3.0" micromatch "^4.0.4" rimraf "^3.0.0" slash "^3.0.0" @@ -877,6 +889,16 @@ "@types/node" "*" jest-mock "^27.2.5" +"@jest/environment@^27.3.0": + version "27.3.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.3.0.tgz#21b85e6f0baa18e92c5bb173a65c0df24565536d" + integrity sha512-OWx5RBd8QaPLlw7fL6l2IVyhYDpamaW3dDXlBnXb4IPGCIwoXAHZkmHV+VPIzb6xAkcPyXOmVm/rSaEneTqweg== + dependencies: + "@jest/fake-timers" "^27.3.0" + "@jest/types" "^27.2.5" + "@types/node" "*" + jest-mock "^27.3.0" + "@jest/fake-timers@^27.2.5": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.2.5.tgz#0c7e5762d7bfe6e269e7b49279b097a52a42f0a0" @@ -889,6 +911,18 @@ jest-mock "^27.2.5" jest-util "^27.2.5" +"@jest/fake-timers@^27.3.0": + version "27.3.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.3.0.tgz#716f166f56abc01901b7823da503bf16c8a00ade" + integrity sha512-GCWgnItK6metb75QKflFxcVRlraVGomZonBQ+9B5UPc6wxBB3xzS7dATDWe/73R5P6BfnzCEaiizna771M5r9w== + dependencies: + "@jest/types" "^27.2.5" + "@sinonjs/fake-timers" "^8.0.1" + "@types/node" "*" + jest-message-util "^27.3.0" + jest-mock "^27.3.0" + jest-util "^27.3.0" + "@jest/globals@^27.2.5": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.5.tgz#4115538f98ed6cee4051a90fdbd0854062902099" @@ -898,6 +932,15 @@ "@jest/types" "^27.2.5" expect "^27.2.5" +"@jest/globals@^27.3.0": + version "27.3.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.3.0.tgz#8822f9a72aea428e3f11a688ff13c7992bfe1ea4" + integrity sha512-EEqmQHMLXgEZfchMVAavUfJuZmORRrP+zhomfREqVE85d1nccd7nw8uN4FQDJ53m5Glm1XtVCyOIJ9kQLrqjeA== + dependencies: + "@jest/environment" "^27.3.0" + "@jest/types" "^27.2.5" + expect "^27.3.0" + "@jest/reporters@27.2.2": version "27.2.2" resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.2.tgz#e2d41cd9f8088676b81b9a9908cb1ba67bdbee78" @@ -928,15 +971,15 @@ terminal-link "^2.0.0" v8-to-istanbul "^8.0.0" -"@jest/reporters@^27.2.5": - version "27.2.5" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.5.tgz#65198ed1f3f4449e3f656129764dc6c5bb27ebe3" - integrity sha512-zYuR9fap3Q3mxQ454VWF8I6jYHErh368NwcKHWO2uy2fwByqBzRHkf9j2ekMDM7PaSTWcLBSZyd7NNxR1iHxzQ== +"@jest/reporters@^27.3.0": + version "27.3.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.3.0.tgz#8d5fd17916aeb1ab415b3ce0a94a31bda654020b" + integrity sha512-D9QLaLgbH+nIjDbKIvoX7yiRX6aXHO56/GzOxKNzKuvJVYhrzeQHcCMttXpp5SB08TdxVvFOPKZfFvkIcVgfBA== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.2.5" - "@jest/test-result" "^27.2.5" - "@jest/transform" "^27.2.5" + "@jest/console" "^27.3.0" + "@jest/test-result" "^27.3.0" + "@jest/transform" "^27.3.0" "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" @@ -949,10 +992,10 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^27.2.5" - jest-resolve "^27.2.5" - jest-util "^27.2.5" - jest-worker "^27.2.5" + jest-haste-map "^27.3.0" + jest-resolve "^27.3.0" + jest-util "^27.3.0" + jest-worker "^27.3.0" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" @@ -988,7 +1031,17 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^27.2.2", "@jest/test-sequencer@^27.2.5": +"@jest/test-result@^27.3.0": + version "27.3.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.3.0.tgz#e093c5d9eb34afa1b653cdb550c4bcaeb3096233" + integrity sha512-5+rYZgj562oPKjExQngfboobeIF2FSrgAvoxlkrogEMIbgT7FY+VAMIkp03klVfJtqo3XKzVWkTfsDSmZFI29w== + dependencies: + "@jest/console" "^27.3.0" + "@jest/types" "^27.2.5" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^27.2.2": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.2.5.tgz#ed5ae91c00e623fb719111d58e380395e16cefbb" integrity sha512-8j8fHZRfnjbbdMitMAGFKaBZ6YqvFRFJlMJzcy3v75edTOqc7RY65S9JpMY6wT260zAcL2sTQRga/P4PglCu3Q== @@ -998,6 +1051,16 @@ jest-haste-map "^27.2.5" jest-runtime "^27.2.5" +"@jest/test-sequencer@^27.3.0": + version "27.3.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.3.0.tgz#ac245f4f29ce7f81ae5afa441e5bf7bbdd342ef4" + integrity sha512-6eQHyBUCtK06sPfsufzEVijZtAtT7yGR1qaAZBlcz6P+FGJ569VW2O5o7mZc+L++uZc7BH4X2Ks7SMIgy1npJw== + dependencies: + "@jest/test-result" "^27.3.0" + graceful-fs "^4.2.4" + jest-haste-map "^27.3.0" + jest-runtime "^27.3.0" + "@jest/transform@^27.2.2", "@jest/transform@^27.2.5": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.2.5.tgz#02b08862a56dbedddf0ba3c2eae41e049a250e29" @@ -1019,6 +1082,27 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" +"@jest/transform@^27.3.0": + version "27.3.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.3.0.tgz#f2a63883eaada30f8141938ec1ad23ba7fdfb97e" + integrity sha512-IKrFhIT/+WIfeNjIRKTwQN7HYCdjKF/mmBqoD660gyGWVw1MzCO9pQuEJK9GXEnFWIuOcMHlm8XfUaDohP/zxA== + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^27.2.5" + babel-plugin-istanbul "^6.0.0" + chalk "^4.0.0" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.2.4" + jest-haste-map "^27.3.0" + jest-regex-util "^27.0.6" + jest-util "^27.3.0" + micromatch "^4.0.4" + pirates "^4.0.1" + slash "^3.0.0" + source-map "^0.6.1" + write-file-atomic "^3.0.0" + "@jest/types@^27.1.1", "@jest/types@^27.2.5": version "27.2.5" resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.2.5.tgz#420765c052605e75686982d24b061b4cbba22132" @@ -2675,7 +2759,7 @@ axios@^0.21.1: dependencies: follow-redirects "^1.14.0" -babel-jest@^27.2.2, babel-jest@^27.2.5: +babel-jest@^27.2.2: version "27.2.5" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.2.5.tgz#6bbbc1bb4200fe0bfd1b1fbcbe02fc62ebed16aa" integrity sha512-GC9pWCcitBhSuF7H3zl0mftoKizlswaF0E3qi+rPL417wKkCB0d+Sjjb0OfXvxj7gWiBf497ldgRMii68Xz+2g== @@ -2689,6 +2773,20 @@ babel-jest@^27.2.2, babel-jest@^27.2.5: graceful-fs "^4.2.4" slash "^3.0.0" +babel-jest@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.3.0.tgz#72237bff40e1fdaaf869bcaaa43bec58b51b6159" + integrity sha512-+Utvd2yZkT7tkgbBqVcH3uRpgRSTKRi0uBtVkjmuw2jFxp45rQ9fROSqqeHKzHYRelgdVOtQ3M745Wnyme/xOg== + dependencies: + "@jest/transform" "^27.3.0" + "@jest/types" "^27.2.5" + "@types/babel__core" "^7.1.14" + babel-plugin-istanbul "^6.0.0" + babel-preset-jest "^27.2.0" + chalk "^4.0.0" + graceful-fs "^4.2.4" + slash "^3.0.0" + babel-plugin-istanbul@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765" @@ -4387,6 +4485,18 @@ expect@^27.2.5: jest-message-util "^27.2.5" jest-regex-util "^27.0.6" +expect@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-27.3.0.tgz#6cf2864a2553fe8ea68e19a6ce1641b08c3a5a98" + integrity sha512-JBRU82EBkZUBqLBAoF3ovzNGEBm14QQnePK4PmZdm6de6q/UzPnmIuWP3dRCw/FE8wRQhf/1eKzy1p1q8d6EvQ== + dependencies: + "@jest/types" "^27.2.5" + ansi-styles "^5.0.0" + jest-get-type "^27.0.6" + jest-matcher-utils "^27.3.0" + jest-message-util "^27.3.0" + jest-regex-util "^27.0.6" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -5871,16 +5981,16 @@ jake@^10.6.1: filelist "^1.0.1" minimatch "^3.0.4" -jest-changed-files@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.2.5.tgz#9dfd550d158260bcb6fa80aff491f5647f7daeca" - integrity sha512-jfnNJzF89csUKRPKJ4MwZ1SH27wTmX2xiAIHUHrsb/OYd9Jbo4/SXxJ17/nnx6RIifpthk3Y+LEeOk+/dDeGdw== +jest-changed-files@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.3.0.tgz#22a02cc2b34583fc66e443171dc271c0529d263c" + integrity sha512-9DJs9garMHv4RhylUMZgbdCJ3+jHSkpL9aaVKp13xtXAD80qLTLrqcDZL1PHA9dYA0bCI86Nv2BhkLpLhrBcPg== dependencies: "@jest/types" "^27.2.5" execa "^5.0.0" throat "^6.0.1" -jest-circus@^27.2.2, jest-circus@^27.2.5: +jest-circus@^27.2.2: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.2.5.tgz#573256a6fb6e447ac2fc7e0ade9375013309037f" integrity sha512-eyL9IcrAxm3Saq3rmajFCwpaxaRMGJ1KJs+7hlTDinXpJmeR3P02bheM3CYohE7UfwOBmrFMJHjgo/WPcLTM+Q== @@ -5905,21 +6015,46 @@ jest-circus@^27.2.2, jest-circus@^27.2.5: stack-utils "^2.0.3" throat "^6.0.1" -jest-cli@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.2.5.tgz#88718c8f05f1c0f209152952ecd61afe4c3311bb" - integrity sha512-XzfcOXi5WQrXqFYsDxq5RDOKY4FNIgBgvgf3ZBz4e/j5/aWep5KnsAYH5OFPMdX/TP/LFsYQMRH7kzJUMh6JKg== +jest-circus@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.3.0.tgz#adc822231f5e634bd676a1eeaa7f4cd6b840cc1d" + integrity sha512-i2P6t92Z6qujHD7C0nVYWm9YofUBMbOOTE9q9vEGi9qFotKUZv1H8M0H3NPTOWButgFuSXZfcwGBXGDAt7b9NA== dependencies: - "@jest/core" "^27.2.5" - "@jest/test-result" "^27.2.5" + "@jest/environment" "^27.3.0" + "@jest/test-result" "^27.3.0" + "@jest/types" "^27.2.5" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + dedent "^0.7.0" + expect "^27.3.0" + is-generator-fn "^2.0.0" + jest-each "^27.3.0" + jest-matcher-utils "^27.3.0" + jest-message-util "^27.3.0" + jest-runtime "^27.3.0" + jest-snapshot "^27.3.0" + jest-util "^27.3.0" + pretty-format "^27.3.0" + slash "^3.0.0" + stack-utils "^2.0.3" + throat "^6.0.1" + +jest-cli@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.3.0.tgz#f9d4278c6ffa1a77127d9d22d7167c2606b1a0f5" + integrity sha512-PUM2RHhqgGRuGc+7QTuyfqPPWGDTCQNMKhtlVBTBYOvhP+7g8a1a7OztM/wfpsKHfqQLHFIe1Mms6jVSXSi4Vg== + dependencies: + "@jest/core" "^27.3.0" + "@jest/test-result" "^27.3.0" "@jest/types" "^27.2.5" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.2.5" - jest-util "^27.2.5" - jest-validate "^27.2.5" + jest-config "^27.3.0" + jest-util "^27.3.0" + jest-validate "^27.3.0" prompts "^2.0.1" yargs "^16.2.0" @@ -5950,34 +6085,34 @@ jest-config@27.2.2: micromatch "^4.0.4" pretty-format "^27.2.2" -jest-config@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.2.5.tgz#c2e4ec6ea2bf4ffd2cae3d927999fe6159cba207" - integrity sha512-QdENtn9b5rIIYGlbDNEcgY9LDL5kcokJnXrp7x8AGjHob/XFqw1Z6p+gjfna2sUulQsQ3ce2Fvntnv+7fKYDhQ== +jest-config@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.3.0.tgz#d5d614098e042b4b33ca8a19aca93f8cc82999a4" + integrity sha512-hGknSnu6qJmwENNSUNY4qQjE9PENIYp4P8yHLVzo7qoQN4wuYHZuZEwAKaoQ66iHeSXmcZkCqFvAUa5WFdB0sg== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.2.5" + "@jest/test-sequencer" "^27.3.0" "@jest/types" "^27.2.5" - babel-jest "^27.2.5" + babel-jest "^27.3.0" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" is-ci "^3.0.0" - jest-circus "^27.2.5" - jest-environment-jsdom "^27.2.5" - jest-environment-node "^27.2.5" + jest-circus "^27.3.0" + jest-environment-jsdom "^27.3.0" + jest-environment-node "^27.3.0" jest-get-type "^27.0.6" - jest-jasmine2 "^27.2.5" + jest-jasmine2 "^27.3.0" jest-regex-util "^27.0.6" - jest-resolve "^27.2.5" - jest-runner "^27.2.5" - jest-util "^27.2.5" - jest-validate "^27.2.5" + jest-resolve "^27.3.0" + jest-runner "^27.3.0" + jest-util "^27.3.0" + jest-validate "^27.3.0" micromatch "^4.0.4" - pretty-format "^27.2.5" + pretty-format "^27.3.0" -jest-diff@^27.0.0, jest-diff@^27.2.5: +jest-diff@^27.0.0, jest-diff@^27.2.5, jest-diff@^27.3.0: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.2.5.tgz#908f7a6aca5653824516ad30e0a9fd9767e53623" integrity sha512-7gfwwyYkeslOOVQY4tVq5TaQa92mWfC9COsVYMNVYyJTOYAqbIkoD3twi5A+h+tAPtAelRxkqY6/xu+jwTr0dA== @@ -6005,6 +6140,17 @@ jest-each@^27.2.5: jest-util "^27.2.5" pretty-format "^27.2.5" +jest-each@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.3.0.tgz#7976cf15bebeef28aa5108a589f4c335b6f0eec9" + integrity sha512-i7qQt+puYusxOoiNyq/M6EyNcfEbvKvqOp89FbiHfm6/POTxgzpp5wAmoS9+BAssoX20t7Zt1A1M7yT3FLVvdg== + dependencies: + "@jest/types" "^27.2.5" + chalk "^4.0.0" + jest-get-type "^27.0.6" + jest-util "^27.3.0" + pretty-format "^27.3.0" + jest-environment-jsdom@^27.2.2, jest-environment-jsdom@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.2.5.tgz#21de3ad0e89441d961b592ba7561b16241279208" @@ -6018,6 +6164,19 @@ jest-environment-jsdom@^27.2.2, jest-environment-jsdom@^27.2.5: jest-util "^27.2.5" jsdom "^16.6.0" +jest-environment-jsdom@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.3.0.tgz#bdf6282ff12a68fbc77cb26d6f56c6bddddd5f58" + integrity sha512-2R1w1z7ZlQkK22bo/MrMp7ItuCxXXFspn3HNdbusbtW4OfutaPNWPmAch1Shtuu7G75jEnDb2q0PXSfFD6kEHQ== + dependencies: + "@jest/environment" "^27.3.0" + "@jest/fake-timers" "^27.3.0" + "@jest/types" "^27.2.5" + "@types/node" "*" + jest-mock "^27.3.0" + jest-util "^27.3.0" + jsdom "^16.6.0" + jest-environment-node@^27.2.2, jest-environment-node@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.2.5.tgz#ffa1afb3604c640ec841f044d526c65912e02cef" @@ -6030,6 +6189,18 @@ jest-environment-node@^27.2.2, jest-environment-node@^27.2.5: jest-mock "^27.2.5" jest-util "^27.2.5" +jest-environment-node@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.3.0.tgz#32483ad819a4b93ba8cf89614a5fb108efba6566" + integrity sha512-bH2Zb73K4x2Yw8j83mmlJUUOFJLzwIpupRvlS9PXiCeIgVTPxL5syBeq5lz310DQBQkNLDTSD5+yYRhheVKvWg== + dependencies: + "@jest/environment" "^27.3.0" + "@jest/fake-timers" "^27.3.0" + "@jest/types" "^27.2.5" + "@types/node" "*" + jest-mock "^27.3.0" + jest-util "^27.3.0" + jest-get-type@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.6.tgz#0eb5c7f755854279ce9b68a9f1a4122f69047cfe" @@ -6055,7 +6226,27 @@ jest-haste-map@^27.2.2, jest-haste-map@^27.2.5: optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.2.2, jest-jasmine2@^27.2.5: +jest-haste-map@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.3.0.tgz#06305f57064af766fdbb54da4c4bc663f72e8a78" + integrity sha512-HV7BXCWhHFuQyLCnmy+VzvYQDccTdt5gpmt2abwIrWTnQiHNAklLB3Djq7Ze3OypTmWBMLgF8AHcKNmLKx8Rzw== + dependencies: + "@jest/types" "^27.2.5" + "@types/graceful-fs" "^4.1.2" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.4" + jest-regex-util "^27.0.6" + jest-serializer "^27.0.6" + jest-util "^27.3.0" + jest-worker "^27.3.0" + micromatch "^4.0.4" + walker "^1.0.7" + optionalDependencies: + fsevents "^2.3.2" + +jest-jasmine2@^27.2.2: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.2.5.tgz#baaf96c69913c52bce0100000cf0721027c0fd66" integrity sha512-hdxY9Cm/CjLqu2tXeAoQHPgA4vcqlweVXYOg1+S9FeFdznB9Rti+eEBKDDkmOy9iqr4Xfbq95OkC4NFbXXPCAQ== @@ -6079,6 +6270,30 @@ jest-jasmine2@^27.2.2, jest-jasmine2@^27.2.5: pretty-format "^27.2.5" throat "^6.0.1" +jest-jasmine2@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.3.0.tgz#d5ac6bec10f6696da99d990bf3df2377578fd331" + integrity sha512-c12xS913sE56pBYZYIuukttDyMJTgK+T/aYKuHse/jyBHk2r78IFxrEl0BL8iiezLZw6g6bKtyww/j9XWOVxqg== + dependencies: + "@babel/traverse" "^7.1.0" + "@jest/environment" "^27.3.0" + "@jest/source-map" "^27.0.6" + "@jest/test-result" "^27.3.0" + "@jest/types" "^27.2.5" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + expect "^27.3.0" + is-generator-fn "^2.0.0" + jest-each "^27.3.0" + jest-matcher-utils "^27.3.0" + jest-message-util "^27.3.0" + jest-runtime "^27.3.0" + jest-snapshot "^27.3.0" + jest-util "^27.3.0" + pretty-format "^27.3.0" + throat "^6.0.1" + jest-leak-detector@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.2.5.tgz#e2edc3b37d38e8d9a527e10e456b403c3151b206" @@ -6087,6 +6302,14 @@ jest-leak-detector@^27.2.5: jest-get-type "^27.0.6" pretty-format "^27.2.5" +jest-leak-detector@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.3.0.tgz#2a881226a08068f6c2f3f238a65a788d4d3e787e" + integrity sha512-xlCDZUaVVpCOAAiW7b8sgxIzTkEmpElwmWe9wVdU01WnFCvQ0aQiq2JTNbeCgalhjxJVeZlACRHIsLjWrmtlRA== + dependencies: + jest-get-type "^27.0.6" + pretty-format "^27.3.0" + jest-matcher-utils@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.2.5.tgz#4684faaa8eb32bf15e6edaead6834031897e2980" @@ -6097,6 +6320,16 @@ jest-matcher-utils@^27.2.5: jest-get-type "^27.0.6" pretty-format "^27.2.5" +jest-matcher-utils@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.3.0.tgz#82c41750db4384d7a8db319348752df2bb0acf7a" + integrity sha512-AK2ds5J29PJcZhfJ/5J8ycbjCXTHnwc6lQeOV1a1GahU1MCpSvyHG1iIevyvp6PXPy6r0q9ywGdCObWHmkK16g== + dependencies: + chalk "^4.0.0" + jest-diff "^27.3.0" + jest-get-type "^27.0.6" + pretty-format "^27.3.0" + jest-message-util@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.2.5.tgz#ed8b7b0965247bb875a49c1f9b9ab2d1d0820028" @@ -6112,6 +6345,21 @@ jest-message-util@^27.2.5: slash "^3.0.0" stack-utils "^2.0.3" +jest-message-util@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.3.0.tgz#d64d24c2f19111ea916c092fea015076bb7615fe" + integrity sha512-0c79aomiyE3mlta4NCWsICydvv2W0HlM/eVx46YEO+vdDuwUvNuQn8LqOtcHC1hSd25i03RrPvscrWgHBJQpRQ== + dependencies: + "@babel/code-frame" "^7.12.13" + "@jest/types" "^27.2.5" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.4" + micromatch "^4.0.4" + pretty-format "^27.3.0" + slash "^3.0.0" + stack-utils "^2.0.3" + jest-mock@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.2.5.tgz#0ec38d5ff1e49c4802e7a4a8179e8d7a2fd84de0" @@ -6120,6 +6368,14 @@ jest-mock@^27.2.5: "@jest/types" "^27.2.5" "@types/node" "*" +jest-mock@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.3.0.tgz#ddf0ec3cc3e68c8ccd489bef4d1f525571a1b867" + integrity sha512-ziZiLk0elZOQjD08bLkegBzv5hCABu/c8Ytx45nJKkysQwGaonvmTxwjLqEA4qGdasq9o2I8/HtdGMNnVsMTGw== + dependencies: + "@jest/types" "^27.2.5" + "@types/node" "*" + jest-pnp-resolver@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" @@ -6130,14 +6386,14 @@ jest-regex-util@^27.0.6: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5" integrity sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ== -jest-resolve-dependencies@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.2.5.tgz#fcd8eca005b3d11ba32da443045c028164b83be1" - integrity sha512-BSjefped31bcvvCh++/pN9ueqqN1n0+p8/58yScuWfklLm2tbPbS9d251vJhAy0ZI2pL/0IaGhOTJrs9Y4FJlg== +jest-resolve-dependencies@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.3.0.tgz#1467ed51d87635aec7133b2e29a283500f4609d1" + integrity sha512-YVmlWHdSUCOLrJl8lOIjda6+DtbgOCfExfoSx9gvHFYaXPq0UP2EELiX514H0rURTbSaLsDTodLNyqqEd/IqeA== dependencies: "@jest/types" "^27.2.5" jest-regex-util "^27.0.6" - jest-snapshot "^27.2.5" + jest-snapshot "^27.3.0" jest-resolve@27.2.2: version "27.2.2" @@ -6171,7 +6427,23 @@ jest-resolve@^27.2.2, jest-resolve@^27.2.5: resolve "^1.20.0" slash "^3.0.0" -jest-runner@^27.2.2, jest-runner@^27.2.5: +jest-resolve@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.3.0.tgz#ffd1db6828b3ee2243f4e4973d80d02e988f2443" + integrity sha512-SZxjtEkM0+f5vxJVpaGztQfnzEqgVnQqHzeGW1P9UON9qDtAET01HWaPCnb10SNUaNRG9NhhOMP418zl44FaIA== + dependencies: + "@jest/types" "^27.2.5" + chalk "^4.0.0" + graceful-fs "^4.2.4" + jest-haste-map "^27.3.0" + jest-pnp-resolver "^1.2.2" + jest-util "^27.3.0" + jest-validate "^27.3.0" + resolve "^1.20.0" + resolve.exports "^1.1.0" + slash "^3.0.0" + +jest-runner@^27.2.2: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.2.5.tgz#3d9d0626f351480bb2cffcfbbfac240c0097ebd4" integrity sha512-n41vw9RLg5TKAnEeJK9d6pGOsBOpwE89XBniK+AD1k26oIIy3V7ogM1scbDjSheji8MUPC9pNgCrZ/FHLVDNgg== @@ -6199,6 +6471,34 @@ jest-runner@^27.2.2, jest-runner@^27.2.5: source-map-support "^0.5.6" throat "^6.0.1" +jest-runner@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.3.0.tgz#0affed8232bf50daacb186091a98e4c50cc83c7a" + integrity sha512-gbkXXJdV5YpGjHvHZAAl5905qAgi+HLYO9lvLqGBxAWpx+oPOpBcMZfkRef7u86heZj1lmULzEdLjY459Z+rNQ== + dependencies: + "@jest/console" "^27.3.0" + "@jest/environment" "^27.3.0" + "@jest/test-result" "^27.3.0" + "@jest/transform" "^27.3.0" + "@jest/types" "^27.2.5" + "@types/node" "*" + chalk "^4.0.0" + emittery "^0.8.1" + exit "^0.1.2" + graceful-fs "^4.2.4" + jest-docblock "^27.0.6" + jest-environment-jsdom "^27.3.0" + jest-environment-node "^27.3.0" + jest-haste-map "^27.3.0" + jest-leak-detector "^27.3.0" + jest-message-util "^27.3.0" + jest-resolve "^27.3.0" + jest-runtime "^27.3.0" + jest-util "^27.3.0" + jest-worker "^27.3.0" + source-map-support "^0.5.6" + throat "^6.0.1" + jest-runtime@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.2.5.tgz#d144c3f6889b927aae1e695b63a41a3323b7016b" @@ -6232,6 +6532,38 @@ jest-runtime@^27.2.5: strip-bom "^4.0.0" yargs "^16.2.0" +jest-runtime@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.3.0.tgz#6957699d74a675441f50627bca9fe8b035c82b83" + integrity sha512-CRhIM45UlYVY2u5IfCx+0jsCm6DLvY9fz34CzDi3c4W1prb7hGKLOJlxbayQIHHMhUx22WhK4eRqXjOKDnKdAQ== + dependencies: + "@jest/console" "^27.3.0" + "@jest/environment" "^27.3.0" + "@jest/globals" "^27.3.0" + "@jest/source-map" "^27.0.6" + "@jest/test-result" "^27.3.0" + "@jest/transform" "^27.3.0" + "@jest/types" "^27.2.5" + "@types/yargs" "^16.0.0" + chalk "^4.0.0" + cjs-module-lexer "^1.0.0" + collect-v8-coverage "^1.0.0" + execa "^5.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.4" + jest-haste-map "^27.3.0" + jest-message-util "^27.3.0" + jest-mock "^27.3.0" + jest-regex-util "^27.0.6" + jest-resolve "^27.3.0" + jest-snapshot "^27.3.0" + jest-util "^27.3.0" + jest-validate "^27.3.0" + slash "^3.0.0" + strip-bom "^4.0.0" + yargs "^16.2.0" + jest-serializer@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.0.6.tgz#93a6c74e0132b81a2d54623251c46c498bb5bec1" @@ -6270,6 +6602,36 @@ jest-snapshot@^27.0.2, jest-snapshot@^27.2.5: pretty-format "^27.2.5" semver "^7.3.2" +jest-snapshot@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.3.0.tgz#3792e1d22633050a1817c3e0d9a18666d43746ee" + integrity sha512-JaFXNS6D1BxvU2ORKaQwpen3Qic7IJAtGb09lbYiYk/GXXlde67Ts990i2nC5oBs0CstbeQE3jTeRayIZpM1Pw== + dependencies: + "@babel/core" "^7.7.2" + "@babel/generator" "^7.7.2" + "@babel/parser" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/traverse" "^7.7.2" + "@babel/types" "^7.0.0" + "@jest/transform" "^27.3.0" + "@jest/types" "^27.2.5" + "@types/babel__traverse" "^7.0.4" + "@types/prettier" "^2.1.5" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^27.3.0" + graceful-fs "^4.2.4" + jest-diff "^27.3.0" + jest-get-type "^27.0.6" + jest-haste-map "^27.3.0" + jest-matcher-utils "^27.3.0" + jest-message-util "^27.3.0" + jest-resolve "^27.3.0" + jest-util "^27.3.0" + natural-compare "^1.4.0" + pretty-format "^27.3.0" + semver "^7.3.2" + jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/jest-specific-snapshot/-/jest-specific-snapshot-5.0.0.tgz#48f72d5613af7f3e30df75b6b3534db6bab32ea0" @@ -6301,6 +6663,18 @@ jest-util@^27.0.0, jest-util@^27.2.0, jest-util@^27.2.5: is-ci "^3.0.0" picomatch "^2.2.3" +jest-util@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.3.0.tgz#178f211d308c25c9593d1c5a2f2b3aef28411741" + integrity sha512-SFSDBGKkxXi4jClmU1WLp/cMMlb4YX6+5Lb0CUySxmonArio8yJ2NALMWvQuXchgySiH7Rb912hVZ2QZ6t3x7w== + dependencies: + "@jest/types" "^27.2.5" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^3.0.0" + picomatch "^2.2.3" + jest-validate@^27.2.2, jest-validate@^27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.2.5.tgz#2d59bf1627d180f395ba58f24599b0ee0efcfbdf" @@ -6313,17 +6687,29 @@ jest-validate@^27.2.2, jest-validate@^27.2.5: leven "^3.1.0" pretty-format "^27.2.5" -jest-watcher@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.2.5.tgz#41cd3e64dc5bea8a4327083d71ba7667be400567" - integrity sha512-umV4qGozg2Dn6DTTtqAh9puPw+DGLK9AQas7+mWjiK8t0fWMpxKg8ZXReZw7L4C88DqorsGUiDgwHNZ+jkVrkQ== +jest-validate@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.3.0.tgz#1a92dd52d0a493037f6e1776c49457c031e0adc8" + integrity sha512-5oqWnb9MrkicE+ywR+BxoZr0L7H3WBDAt6LZggnyFHieAk8nnIQAKRpSodNPhiNJTwaMSbNjCe7SxAzKwTsBoA== dependencies: - "@jest/test-result" "^27.2.5" + "@jest/types" "^27.2.5" + camelcase "^6.2.0" + chalk "^4.0.0" + jest-get-type "^27.0.6" + leven "^3.1.0" + pretty-format "^27.3.0" + +jest-watcher@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.3.0.tgz#13730b347e2ae8ba3c9435055bdad2ad73e5c348" + integrity sha512-xpTFRhqzUnNwTGaSBoHcyXROGbAfj2u4LS7Xosb+hzgrFgWgiHtCy3PWyN1DQk31Na98bBjXKxAbfSBACrvEiQ== + dependencies: + "@jest/test-result" "^27.3.0" "@jest/types" "^27.2.5" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.2.5" + jest-util "^27.3.0" string-length "^4.0.1" jest-worker@^27.2.2, jest-worker@^27.2.5: @@ -6335,14 +6721,23 @@ jest-worker@^27.2.2, jest-worker@^27.2.5: merge-stream "^2.0.0" supports-color "^8.0.0" +jest-worker@^27.3.0: + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.3.0.tgz#6b636b63b6672208b91b92d8dcde112d1d4dba2d" + integrity sha512-xTTvvJqOjKBqE1AmwDHiQN8qzp9VoT981LtfXA+XiJVxHn4435vpnrzVcJ6v/ESiuB+IXPjZakn/ppT00xBCWA== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + jest@^27.1.0: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.2.5.tgz#7d8a5c8781a160f693beeb7c68e46c16ef948148" - integrity sha512-vDMzXcpQN4Ycaqu+vO7LX8pZwNNoKMhc+gSp6q1D8S6ftRk8gNW8cni3YFxknP95jxzQo23Lul0BI2FrWgnwYQ== + version "27.3.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-27.3.0.tgz#25f0e02aaa51d53bc6e1941eb4838a3452f3320e" + integrity sha512-ZSwT6ROUbUs3bXirxzxBvohE/1y7t+IHIu3fL8WgIeJppE2XsFoa2dB03CI9kXA81znW0Kt0t2R+QVOWeY8cYw== dependencies: - "@jest/core" "^27.2.5" + "@jest/core" "^27.3.0" import-local "^3.0.2" - jest-cli "^27.2.5" + jest-cli "^27.3.0" jju@~1.4.0: version "1.4.0" @@ -8001,7 +8396,7 @@ prettier@*, prettier@2.4.1: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c" integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA== -pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.2.2, pretty-format@^27.2.5: +pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.2.2, pretty-format@^27.2.5, pretty-format@^27.3.0: version "27.2.5" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.5.tgz#7cfe2a8e8f01a5b5b29296a0b70f4140df0830c5" integrity sha512-+nYn2z9GgicO9JiqmY25Xtq8SYfZ/5VCpEU3pppHHNAhd1y+ZXxmNPd1evmNcAd6Hz4iBV2kf0UpGth5A/VJ7g== @@ -8436,6 +8831,11 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= +resolve.exports@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" + integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== + resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.3.2: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" From b002accbe50a548940816839bdb4532875450f8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 19:16:44 -0700 Subject: [PATCH 455/473] chore: bump eslint-plugin-eslint-plugin from 3.6.1 to 4.0.1 (#4024) Bumps [eslint-plugin-eslint-plugin](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin) from 3.6.1 to 4.0.1. - [Release notes](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/releases) - [Changelog](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/compare/v3.6.1...v4.0.1) --- updated-dependencies: - dependency-name: eslint-plugin-eslint-plugin dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 23 ++++++----------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index cbf0f7c9e23d..4045a00125d0 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "enhanced-resolve": "^5.8.3", "eslint": "^8.0.0", "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-eslint-plugin": "^3.6.1", + "eslint-plugin-eslint-plugin": "^4.0.1", "eslint-plugin-import": "^2.25.2", "eslint-plugin-jest": "^25.0.5", "eslint-plugin-simple-import-sort": "^7.0.0", diff --git a/yarn.lock b/yarn.lock index 5a128db0447b..b1e2f13de56b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4245,12 +4245,13 @@ eslint-plugin-eslint-comments@^3.2.0: escape-string-regexp "^1.0.5" ignore "^5.0.5" -eslint-plugin-eslint-plugin@^3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.6.1.tgz#6c93655c9345f36874cc4f8aba4f89c81d47b8fe" - integrity sha512-SOE0aoS2+lvtcEbJmy98gEKaxcpkQdxDtqvqE0VQSiGEFme8yTNjpLAjMqPDmmj8KGTwIFd+cYnVykz+9HAIiw== +eslint-plugin-eslint-plugin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-4.0.1.tgz#9624f4d8aca75ab52aa5efff9d99889b318b6a06" + integrity sha512-ey21uE/uOanYAWakWNeFDXF4MEySczTyhdxbKYs5SCTa89MH5Z/TOZ/ui8OqSsAC+QR49iKNuh5kvVSoZhdc7Q== dependencies: - eslint-utils "^2.1.0" + eslint-utils "^3.0.0" + estraverse "^5.2.0" eslint-plugin-import@^2.25.2: version "2.25.2" @@ -4299,13 +4300,6 @@ eslint-scope@^6.0.0: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - eslint-utils@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" @@ -4313,11 +4307,6 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - eslint-visitor-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" From 13930ae6fcccd0c38c44eececb5b250fe843e77a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 20:06:22 -0700 Subject: [PATCH 456/473] chore: bump pretty-format from 27.2.5 to 27.3.0 (#4021) Bumps [pretty-format](https://github.com/facebook/jest/tree/HEAD/packages/pretty-format) from 27.2.5 to 27.3.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v27.3.0/packages/pretty-format) --- updated-dependencies: - dependency-name: pretty-format dependency-type: direct:development update-type: version-update:semver-minor ... 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 b1e2f13de56b..4e42bafac553 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8386,9 +8386,9 @@ prettier@*, prettier@2.4.1: integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA== pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.2.2, pretty-format@^27.2.5, pretty-format@^27.3.0: - version "27.2.5" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.5.tgz#7cfe2a8e8f01a5b5b29296a0b70f4140df0830c5" - integrity sha512-+nYn2z9GgicO9JiqmY25Xtq8SYfZ/5VCpEU3pppHHNAhd1y+ZXxmNPd1evmNcAd6Hz4iBV2kf0UpGth5A/VJ7g== + version "27.3.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.3.0.tgz#ab4679ffc25dd9bc29bab220a4a70a873a19600e" + integrity sha512-Nkdd0xmxZdjCe6GoJomHnrLcCYGYzZKI/fRnUX0sCwDai2mmCHJfC9Ecx33lYgaxAFS/pJCAqhfxmWlm1wNVag== dependencies: "@jest/types" "^27.2.5" ansi-regex "^5.0.1" From 600d41363bb349f976549fda852a6f3e217c9eb2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 20:06:31 -0700 Subject: [PATCH 457/473] chore: bump @nrwl/nx-cloud from 12.3.13 to 12.3.14 (#4031) Bumps [@nrwl/nx-cloud](https://github.com/nrwl/nx) from 12.3.13 to 12.3.14. - [Release notes](https://github.com/nrwl/nx/releases) - [Commits](https://github.com/nrwl/nx/commits) --- updated-dependencies: - dependency-name: "@nrwl/nx-cloud" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4045a00125d0..694a528f8334 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "@commitlint/config-conventional": "^13.1.0", "@commitlint/config-lerna-scopes": "^13.1.0", "@nrwl/cli": "12.10.0", - "@nrwl/nx-cloud": "12.3.13", + "@nrwl/nx-cloud": "12.3.14", "@nrwl/tao": "12.10.0", "@nrwl/workspace": "12.10.0", "@types/babel__code-frame": "^7.0.3", diff --git a/yarn.lock b/yarn.lock index 4e42bafac553..5dc3a3c3825b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1926,10 +1926,10 @@ tmp "~0.2.1" tslib "^2.0.0" -"@nrwl/nx-cloud@12.3.13": - version "12.3.13" - resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.3.13.tgz#f2ebf28ab918af8cc61e9d45f070c4459ba42703" - integrity sha512-t+msfqNhhIvYMSdsh5WMcgpggHjX+RkORboNyGZS1KA6iL9mFABYxroiOeB9JxwGiA4HMjejyOVu0CzKfB8pyw== +"@nrwl/nx-cloud@12.3.14": + version "12.3.14" + resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.3.14.tgz#ddaab7476037a5fc428202e6a952f74ac0ae8df0" + integrity sha512-8lXkXReF8dqbGtBmHGLxIXQ4rXRacQtyx6U9CAf34leVOZAFrr3mzAt2rWwzeKZqipy9Z2B1CbEZ2aJCROSxtg== dependencies: axios "^0.21.1" chalk "4.1.0" From fe53d22f57ad418397fb31fa89c97db0ab4cd6c0 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Wed, 20 Oct 2021 00:52:39 -0700 Subject: [PATCH 458/473] fix(eslint-plugin): [typedef] fix regression with class properties (#4034) Fixes #4033 --- packages/eslint-plugin/src/rules/typedef.ts | 3 +-- .../eslint-plugin/tests/rules/typedef.test.ts | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/src/rules/typedef.ts b/packages/eslint-plugin/src/rules/typedef.ts index 602df98e060e..700fd347c778 100644 --- a/packages/eslint-plugin/src/rules/typedef.ts +++ b/packages/eslint-plugin/src/rules/typedef.ts @@ -175,8 +175,7 @@ export default util.createRule<[Options], MessageIds>({ ...(memberVariableDeclaration && { PropertyDefinition(node): void { if ( - !node.value || - !isVariableDeclarationIgnoreFunction(node.value) || + !(node.value && isVariableDeclarationIgnoreFunction(node.value)) && !node.typeAnnotation ) { report( diff --git a/packages/eslint-plugin/tests/rules/typedef.test.ts b/packages/eslint-plugin/tests/rules/typedef.test.ts index 09a4764a0ba3..e237ff686367 100644 --- a/packages/eslint-plugin/tests/rules/typedef.test.ts +++ b/packages/eslint-plugin/tests/rules/typedef.test.ts @@ -442,6 +442,24 @@ class Foo { }, ], }, + // https://github.com/typescript-eslint/typescript-eslint/issues/4033 + { + code: ` +class ClassName { + public str: string = 'str'; + #num: number = 13; + + func: () => void = (): void => { + console.log(this.str); + }; +} + `, + options: [ + { + memberVariableDeclaration: true, + }, + ], + }, ], invalid: [ // Array destructuring From 1971a3f8027416cd1fb33b1d50faa035599917de Mon Sep 17 00:00:00 2001 From: David Zearing Date: Fri, 22 Oct 2021 18:43:50 -0700 Subject: [PATCH 459/473] feat(eslint-plugin): adding `consistent-type-exports` rule (#3936) --- packages/eslint-plugin/README.md | 1 + .../docs/rules/consistent-type-exports.md | 34 +++ packages/eslint-plugin/src/configs/all.ts | 1 + .../src/rules/consistent-type-exports.ts | 287 ++++++++++++++++++ .../src/rules/consistent-type-imports.ts | 7 +- packages/eslint-plugin/src/rules/index.ts | 2 + packages/eslint-plugin/src/util/misc.ts | 19 ++ .../rules/consistent-type-exports.test.ts | 263 ++++++++++++++++ .../eslint-plugin/tests/util/misc.test.ts | 25 ++ 9 files changed, 634 insertions(+), 5 deletions(-) create mode 100644 packages/eslint-plugin/docs/rules/consistent-type-exports.md create mode 100644 packages/eslint-plugin/src/rules/consistent-type-exports.ts create mode 100644 packages/eslint-plugin/tests/rules/consistent-type-exports.test.ts create mode 100644 packages/eslint-plugin/tests/util/misc.test.ts diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 6b7c2701ffa0..ad338c2dd4ab 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -107,6 +107,7 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@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 | | | | | [`@typescript-eslint/consistent-type-definitions`](./docs/rules/consistent-type-definitions.md) | Consistent with type definition either `interface` or `type` | | :wrench: | | +| [`@typescript-eslint/consistent-type-exports`](./docs/rules/consistent-type-exports.md) | Enforces consistent usage of type exports | | :wrench: | :thought_balloon: | | [`@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: | | diff --git a/packages/eslint-plugin/docs/rules/consistent-type-exports.md b/packages/eslint-plugin/docs/rules/consistent-type-exports.md new file mode 100644 index 000000000000..cb3b01f51dfe --- /dev/null +++ b/packages/eslint-plugin/docs/rules/consistent-type-exports.md @@ -0,0 +1,34 @@ +# Enforces consistent usage of type exports (`consistent-type-exports`) + +TypeScript 3.8 added support for type-only exports. + +Type-only exports allow you to specify that 1 or more named exports are exported as type-only. This allows +transpilers to drop exports without knowing the types of the dependencies. + +## Rule Details + +This rule aims to standardize the use of type exports style across a codebase. + +Given a class `Button`, and an interface `ButtonProps`, examples of **correct** code: + +```ts +export { Button } from 'some-library'; +export type { ButtonProps } from 'some-library'; +``` + +Examples of **incorrect** code: + +```ts +export { Button, ButtonProps } from 'some-library'; +``` + +## When Not To Use It + +- If you are using a TypeScript version less than 3.8, then you will not be able to use this rule as type exports are not supported. +- If you specifically want to use both export kinds for stylistic reasons, you can disable this rule. + +## Attributes + +- [ ] ✅ Recommended +- [x] 🔧 Fixable +- [x] 💭 Requires type information diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index 17c06645e61e..538be53ce583 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -22,6 +22,7 @@ export = { '@typescript-eslint/consistent-type-assertions': 'error', '@typescript-eslint/consistent-type-definitions': 'error', '@typescript-eslint/consistent-type-imports': 'error', + '@typescript-eslint/consistent-type-exports': 'error', 'default-param-last': 'off', '@typescript-eslint/default-param-last': 'error', 'dot-notation': 'off', diff --git a/packages/eslint-plugin/src/rules/consistent-type-exports.ts b/packages/eslint-plugin/src/rules/consistent-type-exports.ts new file mode 100644 index 000000000000..98e6bd355e4c --- /dev/null +++ b/packages/eslint-plugin/src/rules/consistent-type-exports.ts @@ -0,0 +1,287 @@ +import { + TSESTree, + ParserServices, + AST_NODE_TYPES, + TSESLint, +} from '@typescript-eslint/experimental-utils'; +import { SymbolFlags } from 'typescript'; +import * as util from '../util'; + +type Options = []; + +interface SourceExports { + source: string; + reportValueExports: ReportValueExport[]; + typeOnlyNamedExport: TSESTree.ExportNamedDeclaration | null; + valueOnlyNamedExport: TSESTree.ExportNamedDeclaration | null; +} + +interface ReportValueExport { + node: TSESTree.ExportNamedDeclaration; + typeSpecifiers: TSESTree.ExportSpecifier[]; + valueSpecifiers: TSESTree.ExportSpecifier[]; +} + +type MessageIds = + | 'typeOverValue' + | 'singleExportIsType' + | 'multipleExportsAreTypes'; + +export default util.createRule({ + name: 'consistent-type-exports', + defaultOptions: [], + meta: { + type: 'suggestion', + docs: { + description: 'Enforces consistent usage of type exports', + recommended: false, + requiresTypeChecking: true, + }, + messages: { + typeOverValue: + 'All exports in the declaration are only used as types. Use `export type`.', + + singleExportIsType: + 'Type export {{exportNames}} is not a value and should be exported using `export type`.', + multipleExportsAreTypes: + 'Type exports {{exportNames}} are not values and should be exported using `export type`.', + }, + schema: [], + fixable: 'code', + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const sourceExportsMap: { [key: string]: SourceExports } = {}; + const parserServices = util.getParserServices(context); + + return { + ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void { + // Coerce the source into a string for use as a lookup entry. + const source = getSourceFromExport(node) ?? 'undefined'; + const sourceExports = (sourceExportsMap[source] ||= { + source, + reportValueExports: [], + typeOnlyNamedExport: null, + valueOnlyNamedExport: null, + }); + + // Cache the first encountered exports for the package. We will need to come + // back to these later when fixing the problems. + if (node.exportKind === 'type') { + if (!sourceExports.typeOnlyNamedExport) { + // The export is a type export + sourceExports.typeOnlyNamedExport = node; + } + } else if (!sourceExports.valueOnlyNamedExport) { + // The export is a value export + sourceExports.valueOnlyNamedExport = node; + } + + // Next for the current export, we will separate type/value specifiers. + const typeSpecifiers: TSESTree.ExportSpecifier[] = []; + const valueSpecifiers: TSESTree.ExportSpecifier[] = []; + + // Note: it is valid to export values as types. We will avoid reporting errors + // when this is encountered. + if (node.exportKind !== 'type') { + for (const specifier of node.specifiers) { + const isTypeBased = isSpecifierTypeBased(parserServices, specifier); + + if (isTypeBased === true) { + typeSpecifiers.push(specifier); + } else if (isTypeBased === false) { + // When isTypeBased is undefined, we should avoid reporting them. + valueSpecifiers.push(specifier); + } + } + } + + if ( + (node.exportKind === 'value' && typeSpecifiers.length) || + (node.exportKind === 'type' && valueSpecifiers.length) + ) { + sourceExports.reportValueExports.push({ + node, + typeSpecifiers, + valueSpecifiers, + }); + } + }, + + 'Program:exit'(): void { + for (const sourceExports of Object.values(sourceExportsMap)) { + // If this export has no issues, move on. + if (sourceExports.reportValueExports.length === 0) { + continue; + } + + for (const report of sourceExports.reportValueExports) { + if (!report.valueSpecifiers.length) { + // Export is all type-only; convert the entire export to `export type`. + context.report({ + node: report.node, + messageId: 'typeOverValue', + *fix(fixer) { + yield* fixExportInsertType(fixer, sourceCode, report.node); + }, + }); + } else { + // We have both type and value violations. + const allExportNames = report.typeSpecifiers.map( + specifier => `${specifier.local.name}`, + ); + + if (allExportNames.length === 1) { + const exportNames = allExportNames[0]; + + context.report({ + node: report.node, + messageId: 'singleExportIsType', + data: { exportNames }, + *fix(fixer) { + yield* fixSeparateNamedExports(fixer, sourceCode, report); + }, + }); + } else { + const exportNames = util.formatWordList(allExportNames); + + context.report({ + node: report.node, + messageId: 'multipleExportsAreTypes', + data: { exportNames }, + *fix(fixer) { + yield* fixSeparateNamedExports(fixer, sourceCode, report); + }, + }); + } + } + } + } + }, + }; + }, +}); + +/** + * Helper for identifying if an export specifier resolves to a + * JavaScript value or a TypeScript type. + * + * @returns True/false if is a type or not, or undefined if the specifier + * can't be resolved. + */ +function isSpecifierTypeBased( + parserServices: ParserServices, + specifier: TSESTree.ExportSpecifier, +): boolean | undefined { + const checker = parserServices.program.getTypeChecker(); + const node = parserServices.esTreeNodeToTSNodeMap.get(specifier.exported); + const symbol = checker.getSymbolAtLocation(node); + const aliasedSymbol = checker.getAliasedSymbol(symbol!); + + if (!aliasedSymbol || aliasedSymbol.escapedName === 'unknown') { + return undefined; + } + + return !(aliasedSymbol.flags & SymbolFlags.Value); +} + +/** + * Inserts "type" into an export. + * + * Example: + * + * export type { Foo } from 'foo'; + * ^^^^ + */ +function* fixExportInsertType( + fixer: TSESLint.RuleFixer, + sourceCode: Readonly, + node: TSESTree.ExportNamedDeclaration, +): IterableIterator { + const exportToken = util.nullThrows( + sourceCode.getFirstToken(node), + util.NullThrowsReasons.MissingToken('export', node.type), + ); + + yield fixer.insertTextAfter(exportToken, ' type'); +} + +/** + * Separates the exports which mismatch the kind of export the given + * node represents. For example, a type export's named specifiers which + * represent values will be inserted in a separate `export` statement. + */ +function* fixSeparateNamedExports( + fixer: TSESLint.RuleFixer, + sourceCode: Readonly, + report: ReportValueExport, +): IterableIterator { + const { node, typeSpecifiers, valueSpecifiers } = report; + const source = getSourceFromExport(node); + const separateTypes = node.exportKind !== 'type'; + const specifiersToSeparate = separateTypes ? typeSpecifiers : valueSpecifiers; + const specifierNames = specifiersToSeparate.map(getSpecifierText).join(', '); + + const exportToken = util.nullThrows( + sourceCode.getFirstToken(node), + util.NullThrowsReasons.MissingToken('export', node.type), + ); + + // Filter the bad exports from the current line. + const filteredSpecifierNames = ( + separateTypes ? valueSpecifiers : typeSpecifiers + ) + .map(getSpecifierText) + .join(', '); + const openToken = util.nullThrows( + sourceCode.getFirstToken(node, util.isOpeningBraceToken), + util.NullThrowsReasons.MissingToken('{', node.type), + ); + const closeToken = util.nullThrows( + sourceCode.getLastToken(node, util.isClosingBraceToken), + util.NullThrowsReasons.MissingToken('}', node.type), + ); + + // Remove exports from the current line which we're going to re-insert. + yield fixer.replaceTextRange( + [openToken.range[1], closeToken.range[0]], + ` ${filteredSpecifierNames} `, + ); + + // Insert the bad exports into a new export line above. + yield fixer.insertTextBefore( + exportToken, + `export ${separateTypes ? 'type ' : ''}{ ${specifierNames} }${ + source ? ` from '${source}'` : '' + };\n`, + ); +} + +/** + * Returns the source of the export, or undefined if the named export has no source. + */ +function getSourceFromExport( + node: TSESTree.ExportNamedDeclaration, +): string | undefined { + if ( + node.source?.type === AST_NODE_TYPES.Literal && + typeof node.source.value === 'string' + ) { + return node.source.value; + } + + return undefined; +} + +/** + * Returns the specifier text for the export. If it is aliased, we take care to return + * the proper formatting. + */ +function getSpecifierText(specifier: TSESTree.ExportSpecifier): string { + return `${specifier.local.name}${ + specifier.exported.name !== specifier.local.name + ? ` as ${specifier.exported.name}` + : '' + }`; +} diff --git a/packages/eslint-plugin/src/rules/consistent-type-imports.ts b/packages/eslint-plugin/src/rules/consistent-type-imports.ts index abefc9a4a8a7..d549ab8f7289 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-imports.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-imports.ts @@ -264,8 +264,9 @@ export default util.createRule({ messageId: MessageIds; data: Record; } => { + const typeImports = util.formatWordList(importNames); + if (importNames.length === 1) { - const typeImports = importNames[0]; if (isTypeImport) { return { messageId: 'aImportInDecoMeta', @@ -278,10 +279,6 @@ export default util.createRule({ }; } } else { - const typeImports = [ - importNames.slice(0, -1).join(', '), - importNames.slice(-1)[0], - ].join(' and '); if (isTypeImport) { return { messageId: 'someImportsInDecoMeta', diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index 2d9730dd8c8a..83e76f0a23d0 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -11,6 +11,7 @@ import commaSpacing from './comma-spacing'; import consistentIndexedObjectStyle from './consistent-indexed-object-style'; import consistentTypeAssertions from './consistent-type-assertions'; import consistentTypeDefinitions from './consistent-type-definitions'; +import consistentTypeExports from './consistent-type-exports'; import consistentTypeImports from './consistent-type-imports'; import defaultParamLast from './default-param-last'; import dotNotation from './dot-notation'; @@ -133,6 +134,7 @@ export default { 'consistent-indexed-object-style': consistentIndexedObjectStyle, 'consistent-type-assertions': consistentTypeAssertions, 'consistent-type-definitions': consistentTypeDefinitions, + 'consistent-type-exports': consistentTypeExports, 'consistent-type-imports': consistentTypeImports, 'default-param-last': defaultParamLast, 'dot-notation': dotNotation, diff --git a/packages/eslint-plugin/src/util/misc.ts b/packages/eslint-plugin/src/util/misc.ts index 95fa4a359c6e..052e7bfd06ce 100644 --- a/packages/eslint-plugin/src/util/misc.ts +++ b/packages/eslint-plugin/src/util/misc.ts @@ -133,11 +133,30 @@ function getEnumNames(myEnum: Record): T[] { return Object.keys(myEnum).filter(x => isNaN(parseInt(x))) as T[]; } +/** + * Given an array of words, returns an English-friendly concatenation, separated with commas, with + * the `and` clause inserted before the last item. + * + * Example: ['foo', 'bar', 'baz' ] returns the string "foo, bar, and baz". + */ +function formatWordList(words: string[]): string { + if (!words?.length) { + return ''; + } + + if (words.length === 1) { + return words[0]; + } + + return [words.slice(0, -1).join(', '), words.slice(-1)[0]].join(' and '); +} + export { arraysAreEqual, Equal, ExcludeKeys, findFirstResult, + formatWordList, getEnumNames, getNameFromIndexSignature, getNameFromMember, diff --git a/packages/eslint-plugin/tests/rules/consistent-type-exports.test.ts b/packages/eslint-plugin/tests/rules/consistent-type-exports.test.ts new file mode 100644 index 000000000000..301d70e54dc3 --- /dev/null +++ b/packages/eslint-plugin/tests/rules/consistent-type-exports.test.ts @@ -0,0 +1,263 @@ +import rule from '../../src/rules/consistent-type-exports'; +import { RuleTester, getFixturesRootDir } from '../RuleTester'; + +const rootDir = getFixturesRootDir(); + +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: 2020, + sourceType: 'module', + tsconfigRootDir: rootDir, + project: './tsconfig.json', + }, +}); + +ruleTester.run('consistent-type-exports', rule, { + valid: [ + "export { Foo } from 'foo';", + "export type { AnalyzeOptions } from '@typescript-eslint/scope-manager';", + "export { BlockScope } from '@typescript-eslint/experimental-utils';", + "export type { BlockScope } from '@typescript-eslint/experimental-utils';", + ` +const variable = 1; +class Class {} +enum Enum {} +function Func() {} +namespace ValueNS { + export const x = 1; +} + +export { variable, Class, Enum, Func, ValueNS }; + `, + ` +type Alias = 1; +interface IFace {} +namespace TypeNS { + export type x = 1; +} + +export type { Alias, IFace, TypeNS }; + `, + ` +const foo = 1; +export type { foo }; + `, + ` +namespace NonTypeNS { + export const x = 1; +} + +export { NonTypeNS }; + `, + ], + invalid: [ + { + code: "export { AnalyzeOptions } from '@typescript-eslint/scope-manager';", + output: + "export type { AnalyzeOptions } from '@typescript-eslint/scope-manager';", + errors: [ + { + messageId: 'typeOverValue', + line: 1, + column: 1, + }, + ], + }, + { + code: "export { AnalyzeOptions, BlockScope } from '@typescript-eslint/scope-manager';", + output: + `export type { AnalyzeOptions } from '@typescript-eslint/scope-manager';\n` + + `export { BlockScope } from '@typescript-eslint/scope-manager';`, + errors: [ + { + messageId: 'singleExportIsType', + line: 1, + column: 1, + }, + ], + }, + { + code: ` +export { + AnalyzeOptions, + BlockScope, + CatchScope, +} from '@typescript-eslint/scope-manager'; + `, + output: ` +export type { AnalyzeOptions } from '@typescript-eslint/scope-manager'; +export { BlockScope, CatchScope } from '@typescript-eslint/scope-manager'; + `, + errors: [ + { + messageId: 'singleExportIsType', + line: 2, + column: 1, + }, + ], + }, + { + code: ` +export { + AnalyzeOptions, + BlockScope, + Definition, + CatchScope, +} from '@typescript-eslint/scope-manager'; + `, + // eslint-disable-next-line @typescript-eslint/internal/plugin-test-formatting + output: ` +export type { AnalyzeOptions, Definition } from '@typescript-eslint/scope-manager'; +export { BlockScope, CatchScope } from '@typescript-eslint/scope-manager'; + `, + errors: [ + { + messageId: 'multipleExportsAreTypes', + line: 2, + column: 1, + }, + ], + }, + { + code: "export { Definition as Foo } from '@typescript-eslint/scope-manager';", + output: + "export type { Definition as Foo } from '@typescript-eslint/scope-manager';", + errors: [ + { + messageId: 'typeOverValue', + line: 1, + column: 1, + }, + ], + }, + { + code: ` +export { + Definition as Foo, + BlockScope, +} from '@typescript-eslint/scope-manager'; + `, + output: ` +export type { Definition as Foo } from '@typescript-eslint/scope-manager'; +export { BlockScope } from '@typescript-eslint/scope-manager'; + `, + errors: [ + { + messageId: 'singleExportIsType', + line: 2, + column: 1, + }, + ], + }, + { + code: ` +export { + Definition as Foo, + BlockScope as BScope, + CatchScope as CScope, +} from '@typescript-eslint/scope-manager'; + `, + // eslint-disable-next-line @typescript-eslint/internal/plugin-test-formatting + output: ` +export type { Definition as Foo } from '@typescript-eslint/scope-manager'; +export { BlockScope as BScope, CatchScope as CScope } from '@typescript-eslint/scope-manager'; + `, + errors: [ + { + messageId: 'singleExportIsType', + line: 2, + column: 1, + }, + ], + }, + { + code: ` +import { Definition } from '@typescript-eslint/scope-manager'; +export { Definition }; + `, + output: ` +import { Definition } from '@typescript-eslint/scope-manager'; +export type { Definition }; + `, + errors: [ + { + messageId: 'typeOverValue', + line: 3, + column: 1, + }, + ], + }, + { + code: ` +import { CatchScope, Definition } from '@typescript-eslint/scope-manager'; +export { CatchScope, Definition }; + `, + output: ` +import { CatchScope, Definition } from '@typescript-eslint/scope-manager'; +export type { Definition }; +export { CatchScope }; + `, + errors: [ + { + messageId: 'singleExportIsType', + line: 3, + column: 1, + }, + ], + }, + { + code: ` +type Alias = 1; +interface IFace {} +namespace TypeNS { + export type x = 1; + export const f = 1; +} + +export { Alias, IFace, TypeNS }; + `, + output: ` +type Alias = 1; +interface IFace {} +namespace TypeNS { + export type x = 1; + export const f = 1; +} + +export type { Alias, IFace }; +export { TypeNS }; + `, + errors: [ + { + messageId: 'multipleExportsAreTypes', + line: 9, + column: 1, + }, + ], + }, + { + code: ` +namespace TypeNS { + export interface Foo {} +} + +export { TypeNS }; + `, + output: ` +namespace TypeNS { + export interface Foo {} +} + +export type { TypeNS }; + `, + errors: [ + { + messageId: 'typeOverValue', + line: 6, + column: 1, + }, + ], + }, + ], +}); diff --git a/packages/eslint-plugin/tests/util/misc.test.ts b/packages/eslint-plugin/tests/util/misc.test.ts new file mode 100644 index 000000000000..c4291f00d9f4 --- /dev/null +++ b/packages/eslint-plugin/tests/util/misc.test.ts @@ -0,0 +1,25 @@ +import * as misc from '../../src/util/misc'; + +describe('formatWordList', () => { + it('can format with no words', () => { + expect(misc.formatWordList([])).toBe(''); + }); + + it('can format with 1 word', () => { + expect(misc.formatWordList(['foo'])).toBe('foo'); + }); + + it('can format with 2 words', () => { + expect(misc.formatWordList(['foo', 'bar'])).toBe('foo and bar'); + }); + + it('can format with 3 words', () => { + expect(misc.formatWordList(['foo', 'bar', 'baz'])).toBe('foo, bar and baz'); + }); + + it('can format with 4 words', () => { + expect(misc.formatWordList(['foo', 'bar', 'baz', 'boz'])).toBe( + 'foo, bar, baz and boz', + ); + }); +}); From f418f4835573c164fc1c8ad626e4b5edccc1f22b Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Fri, 22 Oct 2021 18:44:20 -0700 Subject: [PATCH 460/473] chore: bump all dependencies (#4042) - There were some majors we had to upgrade past which dependabot couldn't resolve due to the other changes required to support the version. - Also ran the `yarn-deduplciate` package over the lock file to remove some cruft. - Also bumped the package.json versions as appropriate. --- .prettierrc.json | 2 +- nx.json | 3 +- package.json | 34 +- packages/eslint-plugin/package.json | 2 +- packages/eslint-plugin/tests/docs.test.ts | 12 +- .../src/ts-eslint-scope/README.md | 3 + yarn.lock | 1268 +++++++---------- 7 files changed, 531 insertions(+), 793 deletions(-) create mode 100644 packages/experimental-utils/src/ts-eslint-scope/README.md diff --git a/.prettierrc.json b/.prettierrc.json index 2fdcda48cf47..dc08f70238b0 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -2,7 +2,7 @@ "arrowParens": "avoid", "bracketSpacing": true, "endOfLine": "lf", - "jsxBracketSameLine": false, + "bracketSameLine": false, "jsxSingleQuote": false, "printWidth": 80, "proseWrap": "preserve", diff --git a/nx.json b/nx.json index a417643d66a0..ec90f4a1f5c2 100644 --- a/nx.json +++ b/nx.json @@ -32,6 +32,5 @@ "projects": "dependencies" } ] - }, - "projects": {} + } } diff --git a/package.json b/package.json index 694a528f8334..9a5701855291 100644 --- a/package.json +++ b/package.json @@ -77,38 +77,38 @@ "@commitlint/cli": "^13.1.0", "@commitlint/config-conventional": "^13.1.0", "@commitlint/config-lerna-scopes": "^13.1.0", - "@nrwl/cli": "12.10.0", - "@nrwl/nx-cloud": "12.3.14", - "@nrwl/tao": "12.10.0", - "@nrwl/workspace": "12.10.0", + "@nrwl/cli": "13.0.2", + "@nrwl/nx-cloud": "12.5.1", + "@nrwl/tao": "13.0.2", + "@nrwl/workspace": "13.0.2", "@types/babel__code-frame": "^7.0.3", "@types/debug": "^4.1.7", "@types/eslint-visitor-keys": "^1.0.0", - "@types/glob": "^7.1.4", + "@types/glob": "^7.2.0", "@types/is-glob": "^4.0.2", "@types/jest": "^27.0.2", "@types/jest-specific-snapshot": "^0.5.5", - "@types/lodash": "^4.14.172", - "@types/marked": "^2.0.5", - "@types/node": "^16.10.9", + "@types/lodash": "^4.14.176", + "@types/marked": "^3.0.2", + "@types/node": "^16.11.4", "@types/prettier": "^2.3.2", "@types/rimraf": "^3.0.2", - "@types/semver": "^7.3.8", - "@types/tmp": "^0.2.1", + "@types/semver": "^7.3.9", + "@types/tmp": "^0.2.2", "all-contributors-cli": "^6.20.0", "cspell": "^5.12.3", "cz-conventional-changelog": "^3.3.0", "downlevel-dts": "^0.7.0", "enhanced-resolve": "^5.8.3", - "eslint": "^8.0.0", + "eslint": "^8.1.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-plugin": "^4.0.1", "eslint-plugin-import": "^2.25.2", "eslint-plugin-jest": "^25.0.5", "eslint-plugin-simple-import-sort": "^7.0.0", "glob": "^7.1.7", - "husky": "^7.0.2", - "jest": "^27.1.0", + "husky": "^7.0.4", + "jest": "^27.3.1", "jest-specific-snapshot": "^5.0.0", "lerna": "^3.22.1", "lint-staged": "^11.1.2", @@ -116,17 +116,15 @@ "markdownlint-cli": "^0.29.0", "node-fetch": "^3.0.0", "prettier": "2.4.1", - "pretty-format": "^27.2.5", + "pretty-format": "^27.3.1", "rimraf": "^3.0.2", "ts-jest": "^27.0.5", - "ts-node": "^10.2.1", + "ts-node": "^10.4.0", "tslint": "^6.1.3", "typescript": ">=3.3.1 <4.5.0" }, "resolutions": { - "@types/node": "^16.10.9", - "jest-diff": "^27.0.0", - "pretty-format": "^27.2.5", + "@types/node": "^16.11.4", "typescript": "4.4.4" } } diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 3680113c65ba..58042080f477 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -58,7 +58,7 @@ "@types/marked": "*", "@types/prettier": "*", "chalk": "^4.1.2", - "marked": "^2.1.3", + "marked": "^3.0.7", "prettier": "*", "typescript": "*" }, diff --git a/packages/eslint-plugin/tests/docs.test.ts b/packages/eslint-plugin/tests/docs.test.ts index 4164f8b3613f..5ad79c88ec79 100644 --- a/packages/eslint-plugin/tests/docs.test.ts +++ b/packages/eslint-plugin/tests/docs.test.ts @@ -147,7 +147,7 @@ describe('Validating README.md', () => { .sort() .map(createRuleLink); - expect(rulesTables.base.cells.map(row => row[0])).toStrictEqual( + expect(rulesTables.base.rows.map(row => row[0].text)).toStrictEqual( baseRuleNames, ); }); @@ -157,7 +157,7 @@ describe('Validating README.md', () => { .sort() .map(createRuleLink); - expect(rulesTables.extension.cells.map(row => row[0])).toStrictEqual( + expect(rulesTables.extension.rows.map(row => row[0].text)).toStrictEqual( extensionRuleNames, ); }); @@ -166,9 +166,11 @@ describe('Validating README.md', () => { describe(`Checking rule ${ruleName}`, () => { const ruleRow: string[] | undefined = ( rule.meta.docs?.extendsBaseRule - ? rulesTables.extension.cells - : rulesTables.base.cells - ).find(row => row[0].includes(`/${ruleName}.md`)); + ? rulesTables.extension.rows + : rulesTables.base.rows + ) + .find(row => row[0].text.includes(`/${ruleName}.md`)) + ?.map(cell => cell.text); if (!ruleRow) { // rule is in the wrong table, the first two tests will catch this, so no point in creating noise; // these tests will ofc fail in that case diff --git a/packages/experimental-utils/src/ts-eslint-scope/README.md b/packages/experimental-utils/src/ts-eslint-scope/README.md new file mode 100644 index 000000000000..6cabba14fbff --- /dev/null +++ b/packages/experimental-utils/src/ts-eslint-scope/README.md @@ -0,0 +1,3 @@ +These will need to be removed in the next major as `eslint-scope` v6+ no longer export their internals. + +Issue: https://github.com/typescript-eslint/typescript-eslint/issues/4041 diff --git a/yarn.lock b/yarn.lock index 5dc3a3c3825b..5486c7f7140c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,6 +9,13 @@ dependencies: "@babel/highlight" "^7.14.5" +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + "@babel/compat-data@^7.15.0": version "7.15.0" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" @@ -160,7 +167,7 @@ "@babel/traverse" "^7.15.4" "@babel/types" "^7.15.4" -"@babel/highlight@^7.14.5": +"@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== @@ -702,6 +709,21 @@ ts-node "^9" tslib "^2" +"@eslint/eslintrc@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" + integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + "@eslint/eslintrc@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.3.tgz#41f08c597025605f672251dcc4e8be66b5ed7366" @@ -791,6 +813,15 @@ unique-filename "^1.1.1" which "^1.3.1" +"@humanwhocodes/config-array@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" + integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== + dependencies: + "@humanwhocodes/object-schema" "^1.2.0" + debug "^4.1.1" + minimatch "^3.0.4" + "@humanwhocodes/config-array@^0.6.0": version "0.6.0" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.6.0.tgz#b5621fdb3b32309d2d16575456cbc277fa8f021a" @@ -821,39 +852,27 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^27.2.2", "@jest/console@^27.2.5": - version "27.2.5" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.2.5.tgz#bddbf8d41c191f17b52bf0c9e6c0d18605e35d6e" - integrity sha512-smtlRF9vNKorRMCUtJ+yllIoiY8oFmfFG7xlzsAE76nKEwXNhjPOJIsc7Dv+AUitVt76t+KjIpUP9m98Crn2LQ== - dependencies: - "@jest/types" "^27.2.5" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^27.2.5" - jest-util "^27.2.5" - slash "^3.0.0" - -"@jest/console@^27.3.0": - version "27.3.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.3.0.tgz#a55f03a4f7e1e92a5879bdab2e8b9fe4dd5312ba" - integrity sha512-+Tr/xoNiosjckq96xIGpDaGsybeIm45VWXpSvDR8T9deXmWjYKX85prhz8yFPhLG4UVOeMo/B6RI/+flw3sO8A== +"@jest/console@^27.2.2", "@jest/console@^27.3.1": + version "27.3.1" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.3.1.tgz#e8ea3a475d3f8162f23d69efbfaa9cbe486bee93" + integrity sha512-RkFNWmv0iui+qsOr/29q9dyfKTTT5DCuP31kUwg7rmOKPT/ozLeGLKJKVIiOfbiKyleUZKIrHwhmiZWVe8IMdw== dependencies: "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^27.3.0" - jest-util "^27.3.0" + jest-message-util "^27.3.1" + jest-util "^27.3.1" slash "^3.0.0" -"@jest/core@^27.3.0": - version "27.3.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.3.0.tgz#50a521c663181f3a34ecb24bb9fe717e125dc784" - integrity sha512-0B3PWQouwS651m8AbQDse08dfRlzLHqSmywRPGYn2ZzU6RT4aP2Xwz8mEWfSPXXZmtwAtNgUXy0Cbt6QsBqKvw== +"@jest/core@^27.3.1": + version "27.3.1" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.3.1.tgz#04992ef1b58b17c459afb87ab56d81e63d386925" + integrity sha512-DMNE90RR5QKx0EA+wqe3/TNEwiRpOkhshKNxtLxd4rt3IZpCt+RSL+FoJsGeblRZmqdK4upHA/mKKGPPRAifhg== dependencies: - "@jest/console" "^27.3.0" - "@jest/reporters" "^27.3.0" - "@jest/test-result" "^27.3.0" - "@jest/transform" "^27.3.0" + "@jest/console" "^27.3.1" + "@jest/reporters" "^27.3.1" + "@jest/test-result" "^27.3.1" + "@jest/transform" "^27.3.1" "@jest/types" "^27.2.5" "@types/node" "*" ansi-escapes "^4.2.1" @@ -862,84 +881,53 @@ exit "^0.1.2" graceful-fs "^4.2.4" jest-changed-files "^27.3.0" - jest-config "^27.3.0" - jest-haste-map "^27.3.0" - jest-message-util "^27.3.0" + jest-config "^27.3.1" + jest-haste-map "^27.3.1" + jest-message-util "^27.3.1" jest-regex-util "^27.0.6" - jest-resolve "^27.3.0" - jest-resolve-dependencies "^27.3.0" - jest-runner "^27.3.0" - jest-runtime "^27.3.0" - jest-snapshot "^27.3.0" - jest-util "^27.3.0" - jest-validate "^27.3.0" - jest-watcher "^27.3.0" + jest-resolve "^27.3.1" + jest-resolve-dependencies "^27.3.1" + jest-runner "^27.3.1" + jest-runtime "^27.3.1" + jest-snapshot "^27.3.1" + jest-util "^27.3.1" + jest-validate "^27.3.1" + jest-watcher "^27.3.1" micromatch "^4.0.4" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^27.2.5": - version "27.2.5" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.2.5.tgz#b85517ccfcec55690c82c56f5a01a3b30c5e3c84" - integrity sha512-XvUW3q6OUF+54SYFCgbbfCd/BKTwm5b2MGLoc2jINXQLKQDTCS2P2IrpPOtQ08WWZDGzbhAzVhOYta3J2arubg== +"@jest/environment@^27.3.1": + version "27.3.1" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.3.1.tgz#2182defbce8d385fd51c5e7c7050f510bd4c86b1" + integrity sha512-BCKCj4mOVLme6Tanoyc9k0ultp3pnmuyHw73UHRPeeZxirsU/7E3HC4le/VDb/SMzE1JcPnto+XBKFOcoiJzVw== dependencies: - "@jest/fake-timers" "^27.2.5" - "@jest/types" "^27.2.5" - "@types/node" "*" - jest-mock "^27.2.5" - -"@jest/environment@^27.3.0": - version "27.3.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.3.0.tgz#21b85e6f0baa18e92c5bb173a65c0df24565536d" - integrity sha512-OWx5RBd8QaPLlw7fL6l2IVyhYDpamaW3dDXlBnXb4IPGCIwoXAHZkmHV+VPIzb6xAkcPyXOmVm/rSaEneTqweg== - dependencies: - "@jest/fake-timers" "^27.3.0" + "@jest/fake-timers" "^27.3.1" "@jest/types" "^27.2.5" "@types/node" "*" jest-mock "^27.3.0" -"@jest/fake-timers@^27.2.5": - version "27.2.5" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.2.5.tgz#0c7e5762d7bfe6e269e7b49279b097a52a42f0a0" - integrity sha512-ZGUb6jg7BgwY+nmO0TW10bc7z7Hl2G/UTAvmxEyZ/GgNFoa31tY9/cgXmqcxnnZ7o5Xs7RAOz3G1SKIj8IVDlg== - dependencies: - "@jest/types" "^27.2.5" - "@sinonjs/fake-timers" "^8.0.1" - "@types/node" "*" - jest-message-util "^27.2.5" - jest-mock "^27.2.5" - jest-util "^27.2.5" - -"@jest/fake-timers@^27.3.0": - version "27.3.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.3.0.tgz#716f166f56abc01901b7823da503bf16c8a00ade" - integrity sha512-GCWgnItK6metb75QKflFxcVRlraVGomZonBQ+9B5UPc6wxBB3xzS7dATDWe/73R5P6BfnzCEaiizna771M5r9w== +"@jest/fake-timers@^27.3.1": + version "27.3.1" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.3.1.tgz#1fad860ee9b13034762cdb94266e95609dfce641" + integrity sha512-M3ZFgwwlqJtWZ+QkBG5NmC23A9w+A6ZxNsO5nJxJsKYt4yguBd3i8TpjQz5NfCX91nEve1KqD9RA2Q+Q1uWqoA== dependencies: "@jest/types" "^27.2.5" "@sinonjs/fake-timers" "^8.0.1" "@types/node" "*" - jest-message-util "^27.3.0" + jest-message-util "^27.3.1" jest-mock "^27.3.0" - jest-util "^27.3.0" + jest-util "^27.3.1" -"@jest/globals@^27.2.5": - version "27.2.5" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.5.tgz#4115538f98ed6cee4051a90fdbd0854062902099" - integrity sha512-naRI537GM+enFVJQs6DcwGYPn/0vgJNb06zGVbzXfDfe/epDPV73hP1vqO37PqSKDeOXM2KInr6ymYbL1HTP7g== - dependencies: - "@jest/environment" "^27.2.5" - "@jest/types" "^27.2.5" - expect "^27.2.5" - -"@jest/globals@^27.3.0": - version "27.3.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.3.0.tgz#8822f9a72aea428e3f11a688ff13c7992bfe1ea4" - integrity sha512-EEqmQHMLXgEZfchMVAavUfJuZmORRrP+zhomfREqVE85d1nccd7nw8uN4FQDJ53m5Glm1XtVCyOIJ9kQLrqjeA== +"@jest/globals@^27.3.1": + version "27.3.1" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.3.1.tgz#ce1dfb03d379237a9da6c1b99ecfaca1922a5f9e" + integrity sha512-Q651FWiWQAIFiN+zS51xqhdZ8g9b88nGCobC87argAxA7nMfNQq0Q0i9zTfQYgLa6qFXk2cGANEqfK051CZ8Pg== dependencies: - "@jest/environment" "^27.3.0" + "@jest/environment" "^27.3.1" "@jest/types" "^27.2.5" - expect "^27.3.0" + expect "^27.3.1" "@jest/reporters@27.2.2": version "27.2.2" @@ -971,15 +959,15 @@ terminal-link "^2.0.0" v8-to-istanbul "^8.0.0" -"@jest/reporters@^27.3.0": - version "27.3.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.3.0.tgz#8d5fd17916aeb1ab415b3ce0a94a31bda654020b" - integrity sha512-D9QLaLgbH+nIjDbKIvoX7yiRX6aXHO56/GzOxKNzKuvJVYhrzeQHcCMttXpp5SB08TdxVvFOPKZfFvkIcVgfBA== +"@jest/reporters@^27.3.1": + version "27.3.1" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.3.1.tgz#28b5c1f5789481e23788048fa822ed15486430b9" + integrity sha512-m2YxPmL9Qn1emFVgZGEiMwDntDxRRQ2D58tiDQlwYTg5GvbFOKseYCcHtn0WsI8CG4vzPglo3nqbOiT8ySBT/w== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.3.0" - "@jest/test-result" "^27.3.0" - "@jest/transform" "^27.3.0" + "@jest/console" "^27.3.1" + "@jest/test-result" "^27.3.1" + "@jest/transform" "^27.3.1" "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" @@ -992,10 +980,10 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^27.3.0" - jest-resolve "^27.3.0" - jest-util "^27.3.0" - jest-worker "^27.3.0" + jest-haste-map "^27.3.1" + jest-resolve "^27.3.1" + jest-util "^27.3.1" + jest-worker "^27.3.1" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" @@ -1021,71 +1009,30 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^27.2.2", "@jest/test-result@^27.2.5": - version "27.2.5" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.2.5.tgz#e9f73cf6cd5e2cc6eb3105339248dea211f9320e" - integrity sha512-ub7j3BrddxZ0BdSnM5JCF6cRZJ/7j3wgdX0+Dtwhw2Po+HKsELCiXUTvh+mgS4/89mpnU1CPhZxe2mTvuLPJJg== +"@jest/test-result@^27.2.2", "@jest/test-result@^27.3.1": + version "27.3.1" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.3.1.tgz#89adee8b771877c69b3b8d59f52f29dccc300194" + integrity sha512-mLn6Thm+w2yl0opM8J/QnPTqrfS4FoXsXF2WIWJb2O/GBSyResL71BRuMYbYRsGt7ELwS5JGcEcGb52BNrumgg== dependencies: - "@jest/console" "^27.2.5" + "@jest/console" "^27.3.1" "@jest/types" "^27.2.5" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^27.3.0": - version "27.3.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.3.0.tgz#e093c5d9eb34afa1b653cdb550c4bcaeb3096233" - integrity sha512-5+rYZgj562oPKjExQngfboobeIF2FSrgAvoxlkrogEMIbgT7FY+VAMIkp03klVfJtqo3XKzVWkTfsDSmZFI29w== - dependencies: - "@jest/console" "^27.3.0" - "@jest/types" "^27.2.5" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^27.2.2": - version "27.2.5" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.2.5.tgz#ed5ae91c00e623fb719111d58e380395e16cefbb" - integrity sha512-8j8fHZRfnjbbdMitMAGFKaBZ6YqvFRFJlMJzcy3v75edTOqc7RY65S9JpMY6wT260zAcL2sTQRga/P4PglCu3Q== - dependencies: - "@jest/test-result" "^27.2.5" - graceful-fs "^4.2.4" - jest-haste-map "^27.2.5" - jest-runtime "^27.2.5" - -"@jest/test-sequencer@^27.3.0": - version "27.3.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.3.0.tgz#ac245f4f29ce7f81ae5afa441e5bf7bbdd342ef4" - integrity sha512-6eQHyBUCtK06sPfsufzEVijZtAtT7yGR1qaAZBlcz6P+FGJ569VW2O5o7mZc+L++uZc7BH4X2Ks7SMIgy1npJw== - dependencies: - "@jest/test-result" "^27.3.0" - graceful-fs "^4.2.4" - jest-haste-map "^27.3.0" - jest-runtime "^27.3.0" - -"@jest/transform@^27.2.2", "@jest/transform@^27.2.5": - version "27.2.5" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.2.5.tgz#02b08862a56dbedddf0ba3c2eae41e049a250e29" - integrity sha512-29lRtAHHYGALbZOx343v0zKmdOg4Sb0rsA1uSv0818bvwRhs3TyElOmTVXlrw0v1ZTqXJCAH/cmoDXimBhQOJQ== +"@jest/test-sequencer@^27.2.2", "@jest/test-sequencer@^27.3.1": + version "27.3.1" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.3.1.tgz#4b3bde2dbb05ee74afdae608cf0768e3354683b1" + integrity sha512-siySLo07IMEdSjA4fqEnxfIX8lB/lWYsBPwNFtkOvsFQvmBrL3yj3k3uFNZv/JDyApTakRpxbKLJ3CT8UGVCrA== dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^27.2.5" - babel-plugin-istanbul "^6.0.0" - chalk "^4.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" + "@jest/test-result" "^27.3.1" graceful-fs "^4.2.4" - jest-haste-map "^27.2.5" - jest-regex-util "^27.0.6" - jest-util "^27.2.5" - micromatch "^4.0.4" - pirates "^4.0.1" - slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" + jest-haste-map "^27.3.1" + jest-runtime "^27.3.1" -"@jest/transform@^27.3.0": - version "27.3.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.3.0.tgz#f2a63883eaada30f8141938ec1ad23ba7fdfb97e" - integrity sha512-IKrFhIT/+WIfeNjIRKTwQN7HYCdjKF/mmBqoD660gyGWVw1MzCO9pQuEJK9GXEnFWIuOcMHlm8XfUaDohP/zxA== +"@jest/transform@^27.2.2", "@jest/transform@^27.3.1": + version "27.3.1" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.3.1.tgz#ff80eafbeabe811e9025e4b6f452126718455220" + integrity sha512-3fSvQ02kuvjOI1C1ssqMVBKJpZf6nwoCiSu00zAKh5nrp3SptNtZy/8s5deayHnqxhjD9CWDJ+yqQwuQ0ZafXQ== dependencies: "@babel/core" "^7.1.0" "@jest/types" "^27.2.5" @@ -1094,9 +1041,9 @@ convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.4" - jest-haste-map "^27.3.0" + jest-haste-map "^27.3.1" jest-regex-util "^27.0.6" - jest-util "^27.3.0" + jest-util "^27.3.1" micromatch "^4.0.4" pirates "^4.0.1" slash "^3.0.0" @@ -1875,37 +1822,38 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@nrwl/cli@*", "@nrwl/cli@12.10.0": - version "12.10.0" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.10.0.tgz#fc0a592bff43387388d15427c7c2f2f0d66c00bd" - integrity sha512-T8HY7OpY5ygwUZcgt1W2mKYvSsiJ2AMDv7PDGQMCfauYd37FeK8ae93mqdbAXZRJKLrAuaoy51TWOQxwv4vzsA== +"@nrwl/cli@*", "@nrwl/cli@13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-13.0.2.tgz#4306ebe09214f9337d05ff8bf87c38d606cb5e46" + integrity sha512-VUbkMxYDdMNZe3CP2AtQbSKyP1kwaebdJyCyQ4l7tsqcFyDAc+zDXbvM1MPYSsFi4DI5Sf11BEFMLfYxRLi6FA== dependencies: - "@nrwl/tao" "12.10.0" + "@nrwl/tao" "13.0.2" chalk "4.1.0" + enquirer "~2.3.6" v8-compile-cache "2.3.0" yargs "15.4.1" yargs-parser "20.0.0" -"@nrwl/devkit@12.10.0": - version "12.10.0" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.10.0.tgz#cf4a1dfb1036212185548d68296ac26e498a41c4" - integrity sha512-we0K5Hn48BXh77SV5GVSPfRJeIHNCVFSn+feLbnKz3G60Tk3wFEEFhDABA8cCfTKDxMESSjZoWBy4ZcVg0EX0g== +"@nrwl/devkit@13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-13.0.2.tgz#7a22bb777894c8688545a36a113fa50e185fc80d" + integrity sha512-DLcdxcINC+efSxcMaIqKHo1wp1Fp6tb5QrFJ2bs8jihFazRU+r8N8kgthgp11pCnXXZdXsHOvpfdADM1OQMhlQ== dependencies: - "@nrwl/tao" "12.10.0" + "@nrwl/tao" "13.0.2" ejs "^3.1.5" ignore "^5.0.4" rxjs "^6.5.4" semver "7.3.4" tslib "^2.0.0" -"@nrwl/jest@12.10.0": - version "12.10.0" - resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.10.0.tgz#37bed395ed390a73f094be752c040fa64c901397" - integrity sha512-Tqrl/d6y+fGWV9j8bCReLhhfnioAA8yPC9Y6EUevxPuuuW0AUwRZp8slhx7mCiWNh9nLCkMO7PcwD+4L39kzjQ== +"@nrwl/jest@13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-13.0.2.tgz#07219a35f2ec2fb91dcb2fb80bddab00d4b6fd8d" + integrity sha512-JOU2Nku3IT+phBM2U2Vp8WmJAJdKHe4Dw73Eex20fR/tGK8SO8zVm4T1PAaXrqSslW/ET6CXMWghaMT1ZhKcRA== dependencies: "@jest/reporters" "27.2.2" "@jest/test-result" "27.2.2" - "@nrwl/devkit" "12.10.0" + "@nrwl/devkit" "13.0.2" chalk "4.1.0" identity-obj-proxy "3.0.0" jest-config "27.2.2" @@ -1914,22 +1862,23 @@ rxjs "^6.5.4" tslib "^2.0.0" -"@nrwl/linter@12.10.0": - version "12.10.0" - resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.10.0.tgz#25f8df66d637651811e9f90573fa2885124db623" - integrity sha512-GULnMm3vMh1QEq6QUzZWV+AYB2NlZnov0Pj6tdtqXTjS+mOXkLYP/k8Vfb4ZEPVNSwHyjRZY08A5sbeRnurD2w== +"@nrwl/linter@13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-13.0.2.tgz#99d1793f8f6e853f4ed440593ef4c27bb76f1373" + integrity sha512-M9UXbIe+Gdi7p5zPd+l35IvIhE6C0LE8dMw6wQpcF0XD6f3bA02ut7c6nKaYverV2j+JxViZ6YuwqCQS3JXwKA== dependencies: - "@nrwl/devkit" "12.10.0" - "@nrwl/jest" "12.10.0" + "@nrwl/devkit" "13.0.2" + "@nrwl/jest" "13.0.2" + eslint "7.32.0" glob "7.1.4" minimatch "3.0.4" tmp "~0.2.1" tslib "^2.0.0" -"@nrwl/nx-cloud@12.3.14": - version "12.3.14" - resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.3.14.tgz#ddaab7476037a5fc428202e6a952f74ac0ae8df0" - integrity sha512-8lXkXReF8dqbGtBmHGLxIXQ4rXRacQtyx6U9CAf34leVOZAFrr3mzAt2rWwzeKZqipy9Z2B1CbEZ2aJCROSxtg== +"@nrwl/nx-cloud@12.5.1": + version "12.5.1" + resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.5.1.tgz#3a73cc5f29eea83ad4d1c01df63e9cf3c742adc1" + integrity sha512-014+QYtQmNuKVB06Rrs7fpxob4sOi+3mKdyksNT6r7MY6mEiWETAIL4wursfpg9fUpD0yG6af/I/CxiCP3fsTQ== dependencies: axios "^0.21.1" chalk "4.1.0" @@ -1938,16 +1887,16 @@ strip-json-comments "^3.1.1" tar "6.1.11" -"@nrwl/tao@12.10.0": - version "12.10.0" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.10.0.tgz#28cfbbda66f5f10a4917df0e70b94d04334e1628" - integrity sha512-YkdgTJJsDQlItVj25vW8zEen7BAra6i41Udd0v3CuxTSEXjJJnBD2KzEOGUxXS0gMg7+ILuw2rl9aOKu43TmVA== +"@nrwl/tao@13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-13.0.2.tgz#43c428ae1e0938ccb73ed46aaa1b9f6fd8f98b96" + integrity sha512-OgcpJHYqqLzmTNxbhxzW3TCwG8EVaB1wiWZiXx+VZK7C6p/nPaJfyodxOiOQu8Uhp4eGjLBvxc6jXIytKEkyqA== dependencies: chalk "4.1.0" enquirer "~2.3.6" fs-extra "^9.1.0" jsonc-parser "3.0.0" - nx "12.10.0" + nx "13.0.2" rxjs "^6.5.4" rxjs-for-await "0.0.2" semver "7.3.4" @@ -1955,15 +1904,15 @@ tslib "^2.0.0" yargs-parser "20.0.0" -"@nrwl/workspace@12.10.0": - version "12.10.0" - resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.10.0.tgz#7e26256a5f3187f6e60eb3ac177a00768633baa4" - integrity sha512-3efkh/0DEOmQXnA2SlBcEk21QiM0vPaJt73CiYnocm1oy7/ngZDyhxYFxOJkVtsfRvR69Etj2JLonbIWa4Za5w== +"@nrwl/workspace@13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-13.0.2.tgz#90d970c2053ad69eca28b2664154f6fe522b8729" + integrity sha512-yleaql1MmKnahXAoCoCEJN5AEuErH0BozEcgJ+3riI0KdVZingUBDddBplzkNJw28YS1F7cjp8JTQ69dV0VH/w== dependencies: - "@nrwl/cli" "12.10.0" - "@nrwl/devkit" "12.10.0" - "@nrwl/jest" "12.10.0" - "@nrwl/linter" "12.10.0" + "@nrwl/cli" "13.0.2" + "@nrwl/devkit" "13.0.2" + "@nrwl/jest" "13.0.2" + "@nrwl/linter" "13.0.2" "@parcel/watcher" "2.0.0-alpha.11" chalk "4.1.0" chokidar "^3.5.1" @@ -2233,10 +2182,10 @@ resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== -"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.4": - version "7.1.4" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.4.tgz#ea59e21d2ee5c517914cb4bc8e4153b99e566672" - integrity sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA== +"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" + integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== dependencies: "@types/minimatch" "*" "@types/node" "*" @@ -2297,15 +2246,15 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= -"@types/lodash@*", "@types/lodash@^4.14.172": - version "4.14.175" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.175.tgz#b78dfa959192b01fae0ad90e166478769b215f45" - integrity sha512-XmdEOrKQ8a1Y/yxQFOMbC47G/V2VDO1GvMRnl4O75M4GW/abC5tnfzadQYkqEveqRM1dEJGFFegfPNA2vvx2iw== +"@types/lodash@*", "@types/lodash@^4.14.176": + version "4.14.176" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.176.tgz#641150fc1cda36fbfa329de603bbb175d7ee20c0" + integrity sha512-xZmuPTa3rlZoIbtDUyJKZQimJV3bxCmzMIO2c9Pz9afyDro6kr7R79GwcB6mRhuoPmV2p1Vb66WOJH7F886WKQ== -"@types/marked@*", "@types/marked@^2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.5.tgz#453e27f1e97199d45bb25297b0dd2b9bbc1e05ea" - integrity sha512-shRZ7XnYFD/8n8zSjKvFdto1QNSf4tONZIlNEZGrJe8GsOE8DL/hG1Hbl8gZlfLnjS7+f5tZGIaTgfpyW38h4w== +"@types/marked@*", "@types/marked@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-3.0.2.tgz#4a639575542ae7715fabbe450b08118e9093eb35" + integrity sha512-mGYI9qFs+i5eYaytWKBbtEMbIkrXGKuhsDpDcj70ogKS2gk1NmgEy9Z3VEKz922Lfms6eITXXqv5idlX7C/irw== "@types/minimatch@*": version "3.0.5" @@ -2322,10 +2271,10 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== -"@types/node@*", "@types/node@12.20.24", "@types/node@>= 8", "@types/node@^16.10.9": - version "16.10.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.10.9.tgz#8f1cdd517972f76a3b928298f4c0747cd6fef25a" - integrity sha512-H9ReOt+yqIJPCutkTYjFjlyK6WEMQYT9hLZMlWtOjFQY2ItppsWZ6RJf8Aw+jz5qTYceuHvFgPIaKOHtLAEWBw== +"@types/node@*", "@types/node@12.20.24", "@types/node@>= 8", "@types/node@^16.11.4": + version "16.11.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.4.tgz#90771124822d6663814f7c1c9b45a6654d8fd964" + integrity sha512-TMgXmy0v2xWyuCSCJM6NCna2snndD8yvQF67J29ipdzMcsPa9u+o0tjF5+EQNdhcuZplYuouYqpc4zcd5I6amQ== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -2350,20 +2299,20 @@ "@types/glob" "*" "@types/node" "*" -"@types/semver@*", "@types/semver@^7.3.8": - version "7.3.8" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.8.tgz#508a27995498d7586dcecd77c25e289bfaf90c59" - integrity sha512-D/2EJvAlCEtYFEYmmlGwbGXuK886HzyCc3nZX/tkFTQdEU8jZDAgiv08P162yB17y4ZXZoq7yFAnW4GDBb9Now== +"@types/semver@*", "@types/semver@^7.3.9": + version "7.3.9" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.9.tgz#152c6c20a7688c30b967ec1841d31ace569863fc" + integrity sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ== "@types/stack-utils@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== -"@types/tmp@*", "@types/tmp@^0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.2.1.tgz#83ecf4ec22a8c218c71db25f316619fe5b986011" - integrity sha512-7cTXwKP/HLOPVgjg+YhBdQ7bMiobGMuoBmrGmqwIWJv8elC6t1DfVc/mn4fD9UE1IjhwmhaQ5pGVXkmXbH0rhg== +"@types/tmp@*", "@types/tmp@^0.2.2": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.2.2.tgz#424537a3b91828cb26aaf697f21ae3cd1b69f7e7" + integrity sha512-MhSa0yylXtVMsyT8qFpHA1DLHj4DvQGH5ntxrhHSh8PxUVNi35Wk+P5hVgqbO2qZqOotqr9jaoPRL+iRjWYm/A== "@types/yargs-parser@*": version "20.2.1" @@ -2427,7 +2376,7 @@ acorn-walk@^8.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^7.1.1: +acorn@^7.1.1, acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== @@ -2483,6 +2432,16 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@~6.12.6: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.0.1: + version "8.6.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.3.tgz#11a66527761dc3e9a3845ea775d2d3c0414e8764" + integrity sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + all-contributors-cli@^6.20.0: version "6.20.0" resolved "https://registry.yarnpkg.com/all-contributors-cli/-/all-contributors-cli-6.20.0.tgz#9bc98dda38cb29cfe8afc8a78c004e14af25d2f6" @@ -2759,26 +2718,12 @@ axios@^0.21.1: dependencies: follow-redirects "^1.14.0" -babel-jest@^27.2.2: - version "27.2.5" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.2.5.tgz#6bbbc1bb4200fe0bfd1b1fbcbe02fc62ebed16aa" - integrity sha512-GC9pWCcitBhSuF7H3zl0mftoKizlswaF0E3qi+rPL417wKkCB0d+Sjjb0OfXvxj7gWiBf497ldgRMii68Xz+2g== - dependencies: - "@jest/transform" "^27.2.5" - "@jest/types" "^27.2.5" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^27.2.0" - chalk "^4.0.0" - graceful-fs "^4.2.4" - slash "^3.0.0" - -babel-jest@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.3.0.tgz#72237bff40e1fdaaf869bcaaa43bec58b51b6159" - integrity sha512-+Utvd2yZkT7tkgbBqVcH3uRpgRSTKRi0uBtVkjmuw2jFxp45rQ9fROSqqeHKzHYRelgdVOtQ3M745Wnyme/xOg== +babel-jest@^27.2.2, babel-jest@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.3.1.tgz#0636a3404c68e07001e434ac4956d82da8a80022" + integrity sha512-SjIF8hh/ir0peae2D6S6ZKRhUy7q/DnpH7k/V6fT4Bgs/LXXUztOpX4G2tCgq8mLo5HA9mN6NmlFMeYtKmIsTQ== dependencies: - "@jest/transform" "^27.3.0" + "@jest/transform" "^27.3.1" "@jest/types" "^27.2.5" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.0.0" @@ -3164,7 +3109,7 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -ci-info@^3.1.1: +ci-info@^3.1.1, ci-info@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.2.0.tgz#2876cb948a498797b5236f0095bc057d0dca38b6" integrity sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A== @@ -3809,7 +3754,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2: +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== @@ -4300,6 +4245,13 @@ eslint-scope@^6.0.0: esrecurse "^4.3.0" estraverse "^5.2.0" +eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + eslint-utils@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" @@ -4307,6 +4259,11 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" +eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + eslint-visitor-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" @@ -4317,10 +4274,56 @@ eslint-visitor-keys@^3.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz#e32e99c6cdc2eb063f204eda5db67bfe58bb4186" integrity sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q== -eslint@^8.0.0: - version "8.0.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.0.1.tgz#3610e7fe4a05c2154669515ca60835a76a19f700" - integrity sha512-LsgcwZgQ72vZ+SMp4K6pAnk2yFDWL7Ti4pJaRvsZ0Hsw2h8ZjUIW38a9AFn2cZXdBMlScMFYYgsSp4ttFI/0bA== +eslint@7.32.0: + version "7.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" + integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== + dependencies: + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.3" + "@humanwhocodes/config-array" "^0.5.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + escape-string-regexp "^4.0.0" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.1.2" + globals "^13.6.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.9" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +eslint@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.1.0.tgz#00f1f7dbf4134f26588e6c9f2efe970760f64664" + integrity sha512-JZvNneArGSUsluHWJ8g8MMs3CfIEzwaLx9KyH4tZ2i+R2/rPWzL8c0zg3rHdwYVpN/1sB9gqnjHwz9HoeJpGHw== dependencies: "@eslint/eslintrc" "^1.0.3" "@humanwhocodes/config-array" "^0.6.0" @@ -4361,6 +4364,15 @@ eslint@^8.0.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== + dependencies: + acorn "^7.4.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^1.3.0" + espree@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/espree/-/espree-9.0.0.tgz#e90a2965698228502e771c7a58489b1a9d107090" @@ -4462,28 +4474,16 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.5.tgz#16154aaa60b4d9a5b0adacfea3e4d6178f4b93fd" - integrity sha512-ZrO0w7bo8BgGoP/bLz+HDCI+0Hfei9jUSZs5yI/Wyn9VkG9w8oJ7rHRgYj+MA7yqqFa0IwHA3flJzZtYugShJA== - dependencies: - "@jest/types" "^27.2.5" - ansi-styles "^5.0.0" - jest-get-type "^27.0.6" - jest-matcher-utils "^27.2.5" - jest-message-util "^27.2.5" - jest-regex-util "^27.0.6" - -expect@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.3.0.tgz#6cf2864a2553fe8ea68e19a6ce1641b08c3a5a98" - integrity sha512-JBRU82EBkZUBqLBAoF3ovzNGEBm14QQnePK4PmZdm6de6q/UzPnmIuWP3dRCw/FE8wRQhf/1eKzy1p1q8d6EvQ== +expect@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/expect/-/expect-27.3.1.tgz#d0f170b1f5c8a2009bab0beffd4bb94f043e38e7" + integrity sha512-MrNXV2sL9iDRebWPGOGFdPQRl2eDQNu/uhxIMShjjx74T6kC6jFIkmQ6OqXDtevjGUkyB2IT56RzDBqXf/QPCg== dependencies: "@jest/types" "^27.2.5" ansi-styles "^5.0.0" - jest-get-type "^27.0.6" - jest-matcher-utils "^27.3.0" - jest-message-util "^27.3.0" + jest-get-type "^27.3.1" + jest-matcher-utils "^27.3.1" + jest-message-util "^27.3.1" jest-regex-util "^27.0.6" extend-shallow@^2.0.1: @@ -5361,10 +5361,10 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -husky@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.2.tgz#21900da0f30199acca43a46c043c4ad84ae88dff" - integrity sha512-8yKEWNX4z2YsofXAMT7KvA1g8p+GxtB1ffV8XtpAEGuXNAbCV5wdNKH+qTpw8SM9fh4aMPDR+yQuKfgnreyZlg== +husky@^7.0.4: + version "7.0.4" + resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535" + integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ== iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" @@ -5979,71 +5979,46 @@ jest-changed-files@^27.3.0: execa "^5.0.0" throat "^6.0.1" -jest-circus@^27.2.2: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.2.5.tgz#573256a6fb6e447ac2fc7e0ade9375013309037f" - integrity sha512-eyL9IcrAxm3Saq3rmajFCwpaxaRMGJ1KJs+7hlTDinXpJmeR3P02bheM3CYohE7UfwOBmrFMJHjgo/WPcLTM+Q== - dependencies: - "@jest/environment" "^27.2.5" - "@jest/test-result" "^27.2.5" - "@jest/types" "^27.2.5" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^0.7.0" - expect "^27.2.5" - is-generator-fn "^2.0.0" - jest-each "^27.2.5" - jest-matcher-utils "^27.2.5" - jest-message-util "^27.2.5" - jest-runtime "^27.2.5" - jest-snapshot "^27.2.5" - jest-util "^27.2.5" - pretty-format "^27.2.5" - slash "^3.0.0" - stack-utils "^2.0.3" - throat "^6.0.1" - -jest-circus@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.3.0.tgz#adc822231f5e634bd676a1eeaa7f4cd6b840cc1d" - integrity sha512-i2P6t92Z6qujHD7C0nVYWm9YofUBMbOOTE9q9vEGi9qFotKUZv1H8M0H3NPTOWButgFuSXZfcwGBXGDAt7b9NA== +jest-circus@^27.2.2, jest-circus@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.3.1.tgz#1679e74387cbbf0c6a8b42de963250a6469e0797" + integrity sha512-v1dsM9II6gvXokgqq6Yh2jHCpfg7ZqV4jWY66u7npz24JnhP3NHxI0sKT7+ZMQ7IrOWHYAaeEllOySbDbWsiXw== dependencies: - "@jest/environment" "^27.3.0" - "@jest/test-result" "^27.3.0" + "@jest/environment" "^27.3.1" + "@jest/test-result" "^27.3.1" "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" - expect "^27.3.0" + expect "^27.3.1" is-generator-fn "^2.0.0" - jest-each "^27.3.0" - jest-matcher-utils "^27.3.0" - jest-message-util "^27.3.0" - jest-runtime "^27.3.0" - jest-snapshot "^27.3.0" - jest-util "^27.3.0" - pretty-format "^27.3.0" + jest-each "^27.3.1" + jest-matcher-utils "^27.3.1" + jest-message-util "^27.3.1" + jest-runtime "^27.3.1" + jest-snapshot "^27.3.1" + jest-util "^27.3.1" + pretty-format "^27.3.1" slash "^3.0.0" stack-utils "^2.0.3" throat "^6.0.1" -jest-cli@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.3.0.tgz#f9d4278c6ffa1a77127d9d22d7167c2606b1a0f5" - integrity sha512-PUM2RHhqgGRuGc+7QTuyfqPPWGDTCQNMKhtlVBTBYOvhP+7g8a1a7OztM/wfpsKHfqQLHFIe1Mms6jVSXSi4Vg== +jest-cli@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.3.1.tgz#b576f9d146ba6643ce0a162d782b40152b6b1d16" + integrity sha512-WHnCqpfK+6EvT62me6WVs8NhtbjAS4/6vZJnk7/2+oOr50cwAzG4Wxt6RXX0hu6m1169ZGMlhYYUNeKBXCph/Q== dependencies: - "@jest/core" "^27.3.0" - "@jest/test-result" "^27.3.0" + "@jest/core" "^27.3.1" + "@jest/test-result" "^27.3.1" "@jest/types" "^27.2.5" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.3.0" - jest-util "^27.3.0" - jest-validate "^27.3.0" + jest-config "^27.3.1" + jest-util "^27.3.1" + jest-validate "^27.3.1" prompts "^2.0.1" yargs "^16.2.0" @@ -6074,42 +6049,42 @@ jest-config@27.2.2: micromatch "^4.0.4" pretty-format "^27.2.2" -jest-config@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.3.0.tgz#d5d614098e042b4b33ca8a19aca93f8cc82999a4" - integrity sha512-hGknSnu6qJmwENNSUNY4qQjE9PENIYp4P8yHLVzo7qoQN4wuYHZuZEwAKaoQ66iHeSXmcZkCqFvAUa5WFdB0sg== +jest-config@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.3.1.tgz#cb3b7f6aaa8c0a7daad4f2b9573899ca7e09bbad" + integrity sha512-KY8xOIbIACZ/vdYCKSopL44I0xboxC751IX+DXL2+Wx6DKNycyEfV3rryC3BPm5Uq/BBqDoMrKuqLEUNJmMKKg== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.3.0" + "@jest/test-sequencer" "^27.3.1" "@jest/types" "^27.2.5" - babel-jest "^27.3.0" + babel-jest "^27.3.1" chalk "^4.0.0" + ci-info "^3.2.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" - is-ci "^3.0.0" - jest-circus "^27.3.0" - jest-environment-jsdom "^27.3.0" - jest-environment-node "^27.3.0" - jest-get-type "^27.0.6" - jest-jasmine2 "^27.3.0" + jest-circus "^27.3.1" + jest-environment-jsdom "^27.3.1" + jest-environment-node "^27.3.1" + jest-get-type "^27.3.1" + jest-jasmine2 "^27.3.1" jest-regex-util "^27.0.6" - jest-resolve "^27.3.0" - jest-runner "^27.3.0" - jest-util "^27.3.0" - jest-validate "^27.3.0" + jest-resolve "^27.3.1" + jest-runner "^27.3.1" + jest-util "^27.3.1" + jest-validate "^27.3.1" micromatch "^4.0.4" - pretty-format "^27.3.0" + pretty-format "^27.3.1" -jest-diff@^27.0.0, jest-diff@^27.2.5, jest-diff@^27.3.0: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.2.5.tgz#908f7a6aca5653824516ad30e0a9fd9767e53623" - integrity sha512-7gfwwyYkeslOOVQY4tVq5TaQa92mWfC9COsVYMNVYyJTOYAqbIkoD3twi5A+h+tAPtAelRxkqY6/xu+jwTr0dA== +jest-diff@^27.0.0, jest-diff@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.3.1.tgz#d2775fea15411f5f5aeda2a5e02c2f36440f6d55" + integrity sha512-PCeuAH4AWUo2O5+ksW4pL9v5xJAcIKPUPfIhZBcG1RKv/0+dvaWTQK1Nrau8d67dp65fOqbeMdoil+6PedyEPQ== dependencies: chalk "^4.0.0" diff-sequences "^27.0.6" - jest-get-type "^27.0.6" - pretty-format "^27.2.5" + jest-get-type "^27.3.1" + pretty-format "^27.3.1" jest-docblock@^27.0.6: version "27.0.6" @@ -6118,107 +6093,51 @@ jest-docblock@^27.0.6: dependencies: detect-newline "^3.0.0" -jest-each@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.2.5.tgz#378118d516db730b92096a9607b8711165946353" - integrity sha512-HUPWIbJT0bXarRwKu/m7lYzqxR4GM5EhKOsu0z3t0SKtbFN6skQhpAUADM4qFShBXb9zoOuag5lcrR1x/WM+Ag== +jest-each@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.3.1.tgz#14c56bb4f18dd18dc6bdd853919b5f16a17761ff" + integrity sha512-E4SwfzKJWYcvOYCjOxhZcxwL+AY0uFMvdCOwvzgutJiaiodFjkxQQDxHm8FQBeTqDnSmKsQWn7ldMRzTn2zJaQ== dependencies: "@jest/types" "^27.2.5" chalk "^4.0.0" - jest-get-type "^27.0.6" - jest-util "^27.2.5" - pretty-format "^27.2.5" - -jest-each@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.3.0.tgz#7976cf15bebeef28aa5108a589f4c335b6f0eec9" - integrity sha512-i7qQt+puYusxOoiNyq/M6EyNcfEbvKvqOp89FbiHfm6/POTxgzpp5wAmoS9+BAssoX20t7Zt1A1M7yT3FLVvdg== - dependencies: - "@jest/types" "^27.2.5" - chalk "^4.0.0" - jest-get-type "^27.0.6" - jest-util "^27.3.0" - pretty-format "^27.3.0" + jest-get-type "^27.3.1" + jest-util "^27.3.1" + pretty-format "^27.3.1" -jest-environment-jsdom@^27.2.2, jest-environment-jsdom@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.2.5.tgz#21de3ad0e89441d961b592ba7561b16241279208" - integrity sha512-QtRpOh/RQKuXniaWcoFE2ElwP6tQcyxHu0hlk32880g0KczdonCs5P1sk5+weu/OVzh5V4Bt1rXuQthI01mBLg== +jest-environment-jsdom@^27.2.2, jest-environment-jsdom@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.3.1.tgz#63ac36d68f7a9303494df783494856222b57f73e" + integrity sha512-3MOy8qMzIkQlfb3W1TfrD7uZHj+xx8Olix5vMENkj5djPmRqndMaXtpnaZkxmxM+Qc3lo+yVzJjzuXbCcZjAlg== dependencies: - "@jest/environment" "^27.2.5" - "@jest/fake-timers" "^27.2.5" - "@jest/types" "^27.2.5" - "@types/node" "*" - jest-mock "^27.2.5" - jest-util "^27.2.5" - jsdom "^16.6.0" - -jest-environment-jsdom@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.3.0.tgz#bdf6282ff12a68fbc77cb26d6f56c6bddddd5f58" - integrity sha512-2R1w1z7ZlQkK22bo/MrMp7ItuCxXXFspn3HNdbusbtW4OfutaPNWPmAch1Shtuu7G75jEnDb2q0PXSfFD6kEHQ== - dependencies: - "@jest/environment" "^27.3.0" - "@jest/fake-timers" "^27.3.0" + "@jest/environment" "^27.3.1" + "@jest/fake-timers" "^27.3.1" "@jest/types" "^27.2.5" "@types/node" "*" jest-mock "^27.3.0" - jest-util "^27.3.0" + jest-util "^27.3.1" jsdom "^16.6.0" -jest-environment-node@^27.2.2, jest-environment-node@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.2.5.tgz#ffa1afb3604c640ec841f044d526c65912e02cef" - integrity sha512-0o1LT4grm7iwrS8fIoLtwJxb/hoa3GsH7pP10P02Jpj7Mi4BXy65u46m89vEM2WfD1uFJQ2+dfDiWZNA2e6bJg== - dependencies: - "@jest/environment" "^27.2.5" - "@jest/fake-timers" "^27.2.5" - "@jest/types" "^27.2.5" - "@types/node" "*" - jest-mock "^27.2.5" - jest-util "^27.2.5" - -jest-environment-node@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.3.0.tgz#32483ad819a4b93ba8cf89614a5fb108efba6566" - integrity sha512-bH2Zb73K4x2Yw8j83mmlJUUOFJLzwIpupRvlS9PXiCeIgVTPxL5syBeq5lz310DQBQkNLDTSD5+yYRhheVKvWg== +jest-environment-node@^27.2.2, jest-environment-node@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.3.1.tgz#af7d0eed04edafb740311b303f3fe7c8c27014bb" + integrity sha512-T89F/FgkE8waqrTSA7/ydMkcc52uYPgZZ6q8OaZgyiZkJb5QNNCF6oPZjH9IfPFfcc9uBWh1574N0kY0pSvTXw== dependencies: - "@jest/environment" "^27.3.0" - "@jest/fake-timers" "^27.3.0" + "@jest/environment" "^27.3.1" + "@jest/fake-timers" "^27.3.1" "@jest/types" "^27.2.5" "@types/node" "*" jest-mock "^27.3.0" - jest-util "^27.3.0" - -jest-get-type@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.6.tgz#0eb5c7f755854279ce9b68a9f1a4122f69047cfe" - integrity sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg== + jest-util "^27.3.1" -jest-haste-map@^27.2.2, jest-haste-map@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.2.5.tgz#0247b7299250643472bbcf5b4ad85c72d5178e2e" - integrity sha512-pzO+Gw2WLponaSi0ilpzYBE0kuVJstoXBX8YWyUebR8VaXuX4tzzn0Zp23c/WaETo7XYTGv2e8KdnpiskAFMhQ== - dependencies: - "@jest/types" "^27.2.5" - "@types/graceful-fs" "^4.1.2" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.4" - jest-regex-util "^27.0.6" - jest-serializer "^27.0.6" - jest-util "^27.2.5" - jest-worker "^27.2.5" - micromatch "^4.0.4" - walker "^1.0.7" - optionalDependencies: - fsevents "^2.3.2" +jest-get-type@^27.0.6, jest-get-type@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.3.1.tgz#a8a2b0a12b50169773099eee60a0e6dd11423eff" + integrity sha512-+Ilqi8hgHSAdhlQ3s12CAVNd8H96ZkQBfYoXmArzZnOfAtVAJEiPDBirjByEblvG/4LPJmkL+nBqPO3A1YJAEg== -jest-haste-map@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.3.0.tgz#06305f57064af766fdbb54da4c4bc663f72e8a78" - integrity sha512-HV7BXCWhHFuQyLCnmy+VzvYQDccTdt5gpmt2abwIrWTnQiHNAklLB3Djq7Ze3OypTmWBMLgF8AHcKNmLKx8Rzw== +jest-haste-map@^27.2.2, jest-haste-map@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.3.1.tgz#7656fbd64bf48bda904e759fc9d93e2c807353ee" + integrity sha512-lYfNZIzwPccDJZIyk9Iz5iQMM/MH56NIIcGj7AFU1YyA4ewWFBl8z+YPJuSCRML/ee2cCt2y3W4K3VXPT6Nhzg== dependencies: "@jest/types" "^27.2.5" "@types/graceful-fs" "^4.1.2" @@ -6228,116 +6147,59 @@ jest-haste-map@^27.3.0: graceful-fs "^4.2.4" jest-regex-util "^27.0.6" jest-serializer "^27.0.6" - jest-util "^27.3.0" - jest-worker "^27.3.0" + jest-util "^27.3.1" + jest-worker "^27.3.1" micromatch "^4.0.4" walker "^1.0.7" optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.2.2: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.2.5.tgz#baaf96c69913c52bce0100000cf0721027c0fd66" - integrity sha512-hdxY9Cm/CjLqu2tXeAoQHPgA4vcqlweVXYOg1+S9FeFdznB9Rti+eEBKDDkmOy9iqr4Xfbq95OkC4NFbXXPCAQ== - dependencies: - "@babel/traverse" "^7.1.0" - "@jest/environment" "^27.2.5" - "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.2.5" - "@jest/types" "^27.2.5" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - expect "^27.2.5" - is-generator-fn "^2.0.0" - jest-each "^27.2.5" - jest-matcher-utils "^27.2.5" - jest-message-util "^27.2.5" - jest-runtime "^27.2.5" - jest-snapshot "^27.2.5" - jest-util "^27.2.5" - pretty-format "^27.2.5" - throat "^6.0.1" - -jest-jasmine2@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.3.0.tgz#d5ac6bec10f6696da99d990bf3df2377578fd331" - integrity sha512-c12xS913sE56pBYZYIuukttDyMJTgK+T/aYKuHse/jyBHk2r78IFxrEl0BL8iiezLZw6g6bKtyww/j9XWOVxqg== +jest-jasmine2@^27.2.2, jest-jasmine2@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.3.1.tgz#df6d3d07c7dafc344feb43a0072a6f09458d32b0" + integrity sha512-WK11ZUetDQaC09w4/j7o4FZDUIp+4iYWH/Lik34Pv7ukL+DuXFGdnmmi7dT58J2ZYKFB5r13GyE0z3NPeyJmsg== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^27.3.0" + "@jest/environment" "^27.3.1" "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.3.0" + "@jest/test-result" "^27.3.1" "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^27.3.0" + expect "^27.3.1" is-generator-fn "^2.0.0" - jest-each "^27.3.0" - jest-matcher-utils "^27.3.0" - jest-message-util "^27.3.0" - jest-runtime "^27.3.0" - jest-snapshot "^27.3.0" - jest-util "^27.3.0" - pretty-format "^27.3.0" + jest-each "^27.3.1" + jest-matcher-utils "^27.3.1" + jest-message-util "^27.3.1" + jest-runtime "^27.3.1" + jest-snapshot "^27.3.1" + jest-util "^27.3.1" + pretty-format "^27.3.1" throat "^6.0.1" -jest-leak-detector@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.2.5.tgz#e2edc3b37d38e8d9a527e10e456b403c3151b206" - integrity sha512-HYsi3GUR72bYhOGB5C5saF9sPdxGzSjX7soSQS+BqDRysc7sPeBwPbhbuT8DnOpijnKjgwWQ8JqvbmReYnt3aQ== - dependencies: - jest-get-type "^27.0.6" - pretty-format "^27.2.5" - -jest-leak-detector@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.3.0.tgz#2a881226a08068f6c2f3f238a65a788d4d3e787e" - integrity sha512-xlCDZUaVVpCOAAiW7b8sgxIzTkEmpElwmWe9wVdU01WnFCvQ0aQiq2JTNbeCgalhjxJVeZlACRHIsLjWrmtlRA== - dependencies: - jest-get-type "^27.0.6" - pretty-format "^27.3.0" - -jest-matcher-utils@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.2.5.tgz#4684faaa8eb32bf15e6edaead6834031897e2980" - integrity sha512-qNR/kh6bz0Dyv3m68Ck2g1fLW5KlSOUNcFQh87VXHZwWc/gY6XwnKofx76Qytz3x5LDWT09/2+yXndTkaG4aWg== - dependencies: - chalk "^4.0.0" - jest-diff "^27.2.5" - jest-get-type "^27.0.6" - pretty-format "^27.2.5" - -jest-matcher-utils@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.3.0.tgz#82c41750db4384d7a8db319348752df2bb0acf7a" - integrity sha512-AK2ds5J29PJcZhfJ/5J8ycbjCXTHnwc6lQeOV1a1GahU1MCpSvyHG1iIevyvp6PXPy6r0q9ywGdCObWHmkK16g== +jest-leak-detector@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.3.1.tgz#7fb632c2992ef707a1e73286e1e704f9cc1772b2" + integrity sha512-78QstU9tXbaHzwlRlKmTpjP9k4Pvre5l0r8Spo4SbFFVy/4Abg9I6ZjHwjg2QyKEAMg020XcjP+UgLZIY50yEg== dependencies: - chalk "^4.0.0" - jest-diff "^27.3.0" - jest-get-type "^27.0.6" - pretty-format "^27.3.0" + jest-get-type "^27.3.1" + pretty-format "^27.3.1" -jest-message-util@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.2.5.tgz#ed8b7b0965247bb875a49c1f9b9ab2d1d0820028" - integrity sha512-ggXSLoPfIYcbmZ8glgEJZ8b+e0Msw/iddRmgkoO7lDAr9SmI65IIfv7VnvTnV4FGnIIUIjzM+fHRHO5RBvyAbQ== +jest-matcher-utils@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.3.1.tgz#257ad61e54a6d4044e080d85dbdc4a08811e9c1c" + integrity sha512-hX8N7zXS4k+8bC1Aj0OWpGb7D3gIXxYvPNK1inP5xvE4ztbz3rc4AkI6jGVaerepBnfWB17FL5lWFJT3s7qo8w== dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.2.5" - "@types/stack-utils" "^2.0.0" chalk "^4.0.0" - graceful-fs "^4.2.4" - micromatch "^4.0.4" - pretty-format "^27.2.5" - slash "^3.0.0" - stack-utils "^2.0.3" + jest-diff "^27.3.1" + jest-get-type "^27.3.1" + pretty-format "^27.3.1" -jest-message-util@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.3.0.tgz#d64d24c2f19111ea916c092fea015076bb7615fe" - integrity sha512-0c79aomiyE3mlta4NCWsICydvv2W0HlM/eVx46YEO+vdDuwUvNuQn8LqOtcHC1hSd25i03RrPvscrWgHBJQpRQ== +jest-message-util@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.3.1.tgz#f7c25688ad3410ab10bcb862bcfe3152345c6436" + integrity sha512-bh3JEmxsTZ/9rTm0jQrPElbY2+y48Rw2t47uMfByNyUVR+OfPh4anuyKsGqsNkXk/TI4JbLRZx+7p7Hdt6q1yg== dependencies: "@babel/code-frame" "^7.12.13" "@jest/types" "^27.2.5" @@ -6345,18 +6207,10 @@ jest-message-util@^27.3.0: chalk "^4.0.0" graceful-fs "^4.2.4" micromatch "^4.0.4" - pretty-format "^27.3.0" + pretty-format "^27.3.1" slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.2.5.tgz#0ec38d5ff1e49c4802e7a4a8179e8d7a2fd84de0" - integrity sha512-HiMB3LqE9RzmeMzZARi2Bz3NoymxyP0gCid4y42ca1djffNtYFKgI220aC1VP1mUZ8rbpqZbHZOJ15093bZV/Q== - dependencies: - "@jest/types" "^27.2.5" - "@types/node" "*" - jest-mock@^27.3.0: version "27.3.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.3.0.tgz#ddf0ec3cc3e68c8ccd489bef4d1f525571a1b867" @@ -6375,14 +6229,14 @@ jest-regex-util@^27.0.6: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5" integrity sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ== -jest-resolve-dependencies@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.3.0.tgz#1467ed51d87635aec7133b2e29a283500f4609d1" - integrity sha512-YVmlWHdSUCOLrJl8lOIjda6+DtbgOCfExfoSx9gvHFYaXPq0UP2EELiX514H0rURTbSaLsDTodLNyqqEd/IqeA== +jest-resolve-dependencies@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.3.1.tgz#85b99bdbdfa46e2c81c6228fc4c91076f624f6e2" + integrity sha512-X7iLzY8pCiYOnvYo2YrK3P9oSE8/3N2f4pUZMJ8IUcZnT81vlSonya1KTO9ZfKGuC+svE6FHK/XOb8SsoRUV1A== dependencies: "@jest/types" "^27.2.5" jest-regex-util "^27.0.6" - jest-snapshot "^27.3.0" + jest-snapshot "^27.3.1" jest-resolve@27.2.2: version "27.2.2" @@ -6400,75 +6254,31 @@ jest-resolve@27.2.2: resolve "^1.20.0" slash "^3.0.0" -jest-resolve@^27.2.2, jest-resolve@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.2.5.tgz#04dadbfc1312a2541f5c199c5011945e9cfe5cef" - integrity sha512-q5irwS3oS73SKy3+FM/HL2T7WJftrk9BRzrXF92f7net5HMlS7lJMg/ZwxLB4YohKqjSsdksEw7n/jvMxV7EKg== - dependencies: - "@jest/types" "^27.2.5" - chalk "^4.0.0" - escalade "^3.1.1" - graceful-fs "^4.2.4" - jest-haste-map "^27.2.5" - jest-pnp-resolver "^1.2.2" - jest-util "^27.2.5" - jest-validate "^27.2.5" - resolve "^1.20.0" - slash "^3.0.0" - -jest-resolve@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.3.0.tgz#ffd1db6828b3ee2243f4e4973d80d02e988f2443" - integrity sha512-SZxjtEkM0+f5vxJVpaGztQfnzEqgVnQqHzeGW1P9UON9qDtAET01HWaPCnb10SNUaNRG9NhhOMP418zl44FaIA== +jest-resolve@^27.2.2, jest-resolve@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.3.1.tgz#0e5542172a1aa0270be6f66a65888647bdd74a3e" + integrity sha512-Dfzt25CFSPo3Y3GCbxynRBZzxq9AdyNN+x/v2IqYx6KVT5Z6me2Z/PsSGFSv3cOSUZqJ9pHxilao/I/m9FouLw== dependencies: "@jest/types" "^27.2.5" chalk "^4.0.0" graceful-fs "^4.2.4" - jest-haste-map "^27.3.0" + jest-haste-map "^27.3.1" jest-pnp-resolver "^1.2.2" - jest-util "^27.3.0" - jest-validate "^27.3.0" + jest-util "^27.3.1" + jest-validate "^27.3.1" resolve "^1.20.0" resolve.exports "^1.1.0" slash "^3.0.0" -jest-runner@^27.2.2: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.2.5.tgz#3d9d0626f351480bb2cffcfbbfac240c0097ebd4" - integrity sha512-n41vw9RLg5TKAnEeJK9d6pGOsBOpwE89XBniK+AD1k26oIIy3V7ogM1scbDjSheji8MUPC9pNgCrZ/FHLVDNgg== - dependencies: - "@jest/console" "^27.2.5" - "@jest/environment" "^27.2.5" - "@jest/test-result" "^27.2.5" - "@jest/transform" "^27.2.5" - "@jest/types" "^27.2.5" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.8.1" - exit "^0.1.2" - graceful-fs "^4.2.4" - jest-docblock "^27.0.6" - jest-environment-jsdom "^27.2.5" - jest-environment-node "^27.2.5" - jest-haste-map "^27.2.5" - jest-leak-detector "^27.2.5" - jest-message-util "^27.2.5" - jest-resolve "^27.2.5" - jest-runtime "^27.2.5" - jest-util "^27.2.5" - jest-worker "^27.2.5" - source-map-support "^0.5.6" - throat "^6.0.1" - -jest-runner@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.3.0.tgz#0affed8232bf50daacb186091a98e4c50cc83c7a" - integrity sha512-gbkXXJdV5YpGjHvHZAAl5905qAgi+HLYO9lvLqGBxAWpx+oPOpBcMZfkRef7u86heZj1lmULzEdLjY459Z+rNQ== +jest-runner@^27.2.2, jest-runner@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.3.1.tgz#1d594dcbf3bd8600a7e839e790384559eaf96e3e" + integrity sha512-r4W6kBn6sPr3TBwQNmqE94mPlYVn7fLBseeJfo4E2uCTmAyDFm2O5DYAQAFP7Q3YfiA/bMwg8TVsciP7k0xOww== dependencies: - "@jest/console" "^27.3.0" - "@jest/environment" "^27.3.0" - "@jest/test-result" "^27.3.0" - "@jest/transform" "^27.3.0" + "@jest/console" "^27.3.1" + "@jest/environment" "^27.3.1" + "@jest/test-result" "^27.3.1" + "@jest/transform" "^27.3.1" "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" @@ -6476,62 +6286,29 @@ jest-runner@^27.3.0: exit "^0.1.2" graceful-fs "^4.2.4" jest-docblock "^27.0.6" - jest-environment-jsdom "^27.3.0" - jest-environment-node "^27.3.0" - jest-haste-map "^27.3.0" - jest-leak-detector "^27.3.0" - jest-message-util "^27.3.0" - jest-resolve "^27.3.0" - jest-runtime "^27.3.0" - jest-util "^27.3.0" - jest-worker "^27.3.0" + jest-environment-jsdom "^27.3.1" + jest-environment-node "^27.3.1" + jest-haste-map "^27.3.1" + jest-leak-detector "^27.3.1" + jest-message-util "^27.3.1" + jest-resolve "^27.3.1" + jest-runtime "^27.3.1" + jest-util "^27.3.1" + jest-worker "^27.3.1" source-map-support "^0.5.6" throat "^6.0.1" -jest-runtime@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.2.5.tgz#d144c3f6889b927aae1e695b63a41a3323b7016b" - integrity sha512-N0WRZ3QszKyZ3Dm27HTBbBuestsSd3Ud5ooVho47XZJ8aSKO/X1Ag8M1dNx9XzfGVRNdB/xCA3lz8MJwIzPLLA== - dependencies: - "@jest/console" "^27.2.5" - "@jest/environment" "^27.2.5" - "@jest/fake-timers" "^27.2.5" - "@jest/globals" "^27.2.5" - "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.2.5" - "@jest/transform" "^27.2.5" - "@jest/types" "^27.2.5" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - execa "^5.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.4" - jest-haste-map "^27.2.5" - jest-message-util "^27.2.5" - jest-mock "^27.2.5" - jest-regex-util "^27.0.6" - jest-resolve "^27.2.5" - jest-snapshot "^27.2.5" - jest-util "^27.2.5" - jest-validate "^27.2.5" - slash "^3.0.0" - strip-bom "^4.0.0" - yargs "^16.2.0" - -jest-runtime@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.3.0.tgz#6957699d74a675441f50627bca9fe8b035c82b83" - integrity sha512-CRhIM45UlYVY2u5IfCx+0jsCm6DLvY9fz34CzDi3c4W1prb7hGKLOJlxbayQIHHMhUx22WhK4eRqXjOKDnKdAQ== +jest-runtime@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.3.1.tgz#80fa32eb85fe5af575865ddf379874777ee993d7" + integrity sha512-qtO6VxPbS8umqhEDpjA4pqTkKQ1Hy4ZSi9mDVeE9Za7LKBo2LdW2jmT+Iod3XFaJqINikZQsn2wEi0j9wPRbLg== dependencies: - "@jest/console" "^27.3.0" - "@jest/environment" "^27.3.0" - "@jest/globals" "^27.3.0" + "@jest/console" "^27.3.1" + "@jest/environment" "^27.3.1" + "@jest/globals" "^27.3.1" "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.3.0" - "@jest/transform" "^27.3.0" + "@jest/test-result" "^27.3.1" + "@jest/transform" "^27.3.1" "@jest/types" "^27.2.5" "@types/yargs" "^16.0.0" chalk "^4.0.0" @@ -6541,14 +6318,14 @@ jest-runtime@^27.3.0: exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-haste-map "^27.3.0" - jest-message-util "^27.3.0" + jest-haste-map "^27.3.1" + jest-message-util "^27.3.1" jest-mock "^27.3.0" jest-regex-util "^27.0.6" - jest-resolve "^27.3.0" - jest-snapshot "^27.3.0" - jest-util "^27.3.0" - jest-validate "^27.3.0" + jest-resolve "^27.3.1" + jest-snapshot "^27.3.1" + jest-util "^27.3.1" + jest-validate "^27.3.1" slash "^3.0.0" strip-bom "^4.0.0" yargs "^16.2.0" @@ -6561,40 +6338,10 @@ jest-serializer@^27.0.6: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^27.0.2, jest-snapshot@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.2.5.tgz#8a612fe31e2967f58ad364542198dff61f92ef32" - integrity sha512-2/Jkn+VN6Abwz0llBltZaiJMnL8b1j5Bp/gRIxe9YR3FCEh9qp0TXVV0dcpTGZ8AcJV1SZGQkczewkI9LP5yGw== - dependencies: - "@babel/core" "^7.7.2" - "@babel/generator" "^7.7.2" - "@babel/parser" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.0.0" - "@jest/transform" "^27.2.5" - "@jest/types" "^27.2.5" - "@types/babel__traverse" "^7.0.4" - "@types/prettier" "^2.1.5" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^27.2.5" - graceful-fs "^4.2.4" - jest-diff "^27.2.5" - jest-get-type "^27.0.6" - jest-haste-map "^27.2.5" - jest-matcher-utils "^27.2.5" - jest-message-util "^27.2.5" - jest-resolve "^27.2.5" - jest-util "^27.2.5" - natural-compare "^1.4.0" - pretty-format "^27.2.5" - semver "^7.3.2" - -jest-snapshot@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.3.0.tgz#3792e1d22633050a1817c3e0d9a18666d43746ee" - integrity sha512-JaFXNS6D1BxvU2ORKaQwpen3Qic7IJAtGb09lbYiYk/GXXlde67Ts990i2nC5oBs0CstbeQE3jTeRayIZpM1Pw== +jest-snapshot@^27.0.2, jest-snapshot@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.3.1.tgz#1da5c0712a252d70917d46c037054f5918c49ee4" + integrity sha512-APZyBvSgQgOT0XumwfFu7X3G5elj6TGhCBLbBdn3R1IzYustPGPE38F51dBWMQ8hRXa9je0vAdeVDtqHLvB6lg== dependencies: "@babel/core" "^7.7.2" "@babel/generator" "^7.7.2" @@ -6602,23 +6349,23 @@ jest-snapshot@^27.3.0: "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.0.0" - "@jest/transform" "^27.3.0" + "@jest/transform" "^27.3.1" "@jest/types" "^27.2.5" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^27.3.0" + expect "^27.3.1" graceful-fs "^4.2.4" - jest-diff "^27.3.0" - jest-get-type "^27.0.6" - jest-haste-map "^27.3.0" - jest-matcher-utils "^27.3.0" - jest-message-util "^27.3.0" - jest-resolve "^27.3.0" - jest-util "^27.3.0" + jest-diff "^27.3.1" + jest-get-type "^27.3.1" + jest-haste-map "^27.3.1" + jest-matcher-utils "^27.3.1" + jest-message-util "^27.3.1" + jest-resolve "^27.3.1" + jest-util "^27.3.1" natural-compare "^1.4.0" - pretty-format "^27.3.0" + pretty-format "^27.3.1" semver "^7.3.2" jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: @@ -6640,93 +6387,60 @@ jest-util@27.2.0: is-ci "^3.0.0" picomatch "^2.2.3" -jest-util@^27.0.0, jest-util@^27.2.0, jest-util@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.2.5.tgz#88740c4024d223634a82ce7c2263e8bc6df3b3ba" - integrity sha512-QRhDC6XxISntMzFRd/OQ6TGsjbzA5ONO0tlAj2ElHs155x1aEr0rkYJBEysG6H/gZVH3oGFzCdAB/GA8leh8NQ== - dependencies: - "@jest/types" "^27.2.5" - "@types/node" "*" - chalk "^4.0.0" - graceful-fs "^4.2.4" - is-ci "^3.0.0" - picomatch "^2.2.3" - -jest-util@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.3.0.tgz#178f211d308c25c9593d1c5a2f2b3aef28411741" - integrity sha512-SFSDBGKkxXi4jClmU1WLp/cMMlb4YX6+5Lb0CUySxmonArio8yJ2NALMWvQuXchgySiH7Rb912hVZ2QZ6t3x7w== +jest-util@^27.0.0, jest-util@^27.2.0, jest-util@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.3.1.tgz#a58cdc7b6c8a560caac9ed6bdfc4e4ff23f80429" + integrity sha512-8fg+ifEH3GDryLQf/eKZck1DEs2YuVPBCMOaHQxVVLmQwl/CDhWzrvChTX4efLZxGrw+AA0mSXv78cyytBt/uw== dependencies: "@jest/types" "^27.2.5" "@types/node" "*" chalk "^4.0.0" + ci-info "^3.2.0" graceful-fs "^4.2.4" - is-ci "^3.0.0" picomatch "^2.2.3" -jest-validate@^27.2.2, jest-validate@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.2.5.tgz#2d59bf1627d180f395ba58f24599b0ee0efcfbdf" - integrity sha512-XgYtjS89nhVe+UfkbLgcm+GgXKWgL80t9nTcNeejyO3t0Sj/yHE8BtIJqjZu9NXQksYbGImoQRXmQ1gP+Guffw== - dependencies: - "@jest/types" "^27.2.5" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^27.0.6" - leven "^3.1.0" - pretty-format "^27.2.5" - -jest-validate@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.3.0.tgz#1a92dd52d0a493037f6e1776c49457c031e0adc8" - integrity sha512-5oqWnb9MrkicE+ywR+BxoZr0L7H3WBDAt6LZggnyFHieAk8nnIQAKRpSodNPhiNJTwaMSbNjCe7SxAzKwTsBoA== +jest-validate@^27.2.2, jest-validate@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.3.1.tgz#3a395d61a19cd13ae9054af8cdaf299116ef8a24" + integrity sha512-3H0XCHDFLA9uDII67Bwi1Vy7AqwA5HqEEjyy934lgVhtJ3eisw6ShOF1MDmRPspyikef5MyExvIm0/TuLzZ86Q== dependencies: "@jest/types" "^27.2.5" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^27.0.6" + jest-get-type "^27.3.1" leven "^3.1.0" - pretty-format "^27.3.0" + pretty-format "^27.3.1" -jest-watcher@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.3.0.tgz#13730b347e2ae8ba3c9435055bdad2ad73e5c348" - integrity sha512-xpTFRhqzUnNwTGaSBoHcyXROGbAfj2u4LS7Xosb+hzgrFgWgiHtCy3PWyN1DQk31Na98bBjXKxAbfSBACrvEiQ== +jest-watcher@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.3.1.tgz#ba5e0bc6aa843612b54ddb7f009d1cbff7e05f3e" + integrity sha512-9/xbV6chABsGHWh9yPaAGYVVKurWoP3ZMCv6h+O1v9/+pkOroigs6WzZ0e9gLP/njokUwM7yQhr01LKJVMkaZA== dependencies: - "@jest/test-result" "^27.3.0" + "@jest/test-result" "^27.3.1" "@jest/types" "^27.2.5" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.3.0" + jest-util "^27.3.1" string-length "^4.0.1" -jest-worker@^27.2.2, jest-worker@^27.2.5: - version "27.2.5" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.2.5.tgz#ed42865661959488aa020e8a325df010597c36d4" - integrity sha512-HTjEPZtcNKZ4LnhSp02NEH4vE+5OpJ0EsOWYvGQpHgUMLngydESAAMH5Wd/asPf29+XUDQZszxpLg1BkIIA2aw== +jest-worker@^27.2.2, jest-worker@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.3.1.tgz#0def7feae5b8042be38479799aeb7b5facac24b2" + integrity sha512-ks3WCzsiZaOPJl/oMsDjaf0TRiSv7ctNgs0FqRr2nARsovz6AWWy4oLElwcquGSz692DzgZQrCLScPNs5YlC4g== dependencies: "@types/node" "*" merge-stream "^2.0.0" supports-color "^8.0.0" -jest-worker@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.3.0.tgz#6b636b63b6672208b91b92d8dcde112d1d4dba2d" - integrity sha512-xTTvvJqOjKBqE1AmwDHiQN8qzp9VoT981LtfXA+XiJVxHn4435vpnrzVcJ6v/ESiuB+IXPjZakn/ppT00xBCWA== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest@^27.1.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.3.0.tgz#25f0e02aaa51d53bc6e1941eb4838a3452f3320e" - integrity sha512-ZSwT6ROUbUs3bXirxzxBvohE/1y7t+IHIu3fL8WgIeJppE2XsFoa2dB03CI9kXA81znW0Kt0t2R+QVOWeY8cYw== +jest@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/jest/-/jest-27.3.1.tgz#b5bab64e8f56b6f7e275ba1836898b0d9f1e5c8a" + integrity sha512-U2AX0AgQGd5EzMsiZpYt8HyZ+nSVIh5ujQ9CPp9EQZJMjXIiSZpJNweZl0swatKRoqHWgGKM3zaSwm4Zaz87ng== dependencies: - "@jest/core" "^27.3.0" + "@jest/core" "^27.3.1" import-local "^3.0.2" - jest-cli "^27.3.0" + jest-cli "^27.3.1" jju@~1.4.0: version "1.4.0" @@ -6820,6 +6534,11 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -7141,6 +6860,11 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "^3.0.0" +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" @@ -7314,10 +7038,10 @@ markdownlint@~0.24.0: dependencies: markdown-it "12.2.0" -marked@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.1.3.tgz#bd017cef6431724fd4b27e0657f5ceb14bff3753" - integrity sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA== +marked@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/marked/-/marked-3.0.7.tgz#343aad9e91b96249b495c99c512ea09cfe06de1e" + integrity sha512-ctKqbnLuNbsHbI26cfMyOlKgXGfl1orOv1AvWWDX7AkgfMOwCWvmuYc+mVLeWhQ9W6hdWVBynOs96VkcscKo0Q== mdurl@^1.0.1: version "1.0.1" @@ -7853,10 +7577,10 @@ nwsapi@^2.2.0: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== -nx@12.10.0: - version "12.10.0" - resolved "https://registry.yarnpkg.com/nx/-/nx-12.10.0.tgz#a4e8fba7254529de69fe54e5b4b007e8a432a3fb" - integrity sha512-LpCfZCWsVEtmD2SI1j2KRaw1uIyn4DJ3eRzsjnDYitbq38aORpkvYO+L0zVMZRNDSYSRGTsuj0nHCS3OOxK/Cg== +nx@13.0.2: + version "13.0.2" + resolved "https://registry.yarnpkg.com/nx/-/nx-13.0.2.tgz#257cdf7899dc46dec683814fcf28008db47849d6" + integrity sha512-8P+UWM1q6gMNZwAcCABNMl4IpHqYqWbC2HdCXAL10Y3oXmkDk0KcCp70UVuiVPouj+zSGnbqn9hc+8TizVukGw== dependencies: "@nrwl/cli" "*" @@ -8385,10 +8109,10 @@ prettier@*, prettier@2.4.1: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c" integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA== -pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.2.2, pretty-format@^27.2.5, pretty-format@^27.3.0: - version "27.3.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.3.0.tgz#ab4679ffc25dd9bc29bab220a4a70a873a19600e" - integrity sha512-Nkdd0xmxZdjCe6GoJomHnrLcCYGYzZKI/fRnUX0sCwDai2mmCHJfC9Ecx33lYgaxAFS/pJCAqhfxmWlm1wNVag== +pretty-format@*, pretty-format@^27.0.0, pretty-format@^27.2.2, pretty-format@^27.3.1: + version "27.3.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.3.1.tgz#7e9486365ccdd4a502061fa761d3ab9ca1b78df5" + integrity sha512-DR/c+pvFc52nLimLROYjnXPtolawm+uWDxr4FjuLDLUn+ktWnSN851KoHwHzzqq6rfCOjkzN8FLgDrSub6UDuA== dependencies: "@jest/types" "^27.2.5" ansi-regex "^5.0.1" @@ -8701,7 +8425,7 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpp@^3.2.0: +regexpp@^3.1.0, regexpp@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -8754,7 +8478,7 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-from-string@^2.0.1: +require-from-string@^2.0.1, require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== @@ -9366,7 +9090,7 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.1.0, string-width@^4.2.0: +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -9557,6 +9281,18 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +table@^6.0.9: + version "6.7.2" + resolved "https://registry.yarnpkg.com/table/-/table-6.7.2.tgz#a8d39b9f5966693ca8b0feba270a78722cbaf3b0" + integrity sha512-UFZK67uvyNivLeQbVtkiUs8Uuuxv24aSL4/Vil2PJVtMgU8Lx0CYkP12uCGa3kjyQzOSgV1+z9Wkb82fCGsO0g== + dependencies: + ajv "^8.0.1" + lodash.clonedeep "^4.5.0" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + tapable@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" @@ -9804,10 +9540,10 @@ ts-jest@^27.0.5: semver "7.x" yargs-parser "20.x" -ts-node@^10.2.1: - version "10.3.0" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.3.0.tgz#a797f2ed3ff50c9a5d814ce400437cb0c1c048b4" - integrity sha512-RYIy3i8IgpFH45AX4fQHExrT8BxDeKTdC83QFJkNzkvt8uFB6QJ8XMyhynYiKMLxt9a7yuXaDBZNOYS3XjDcYw== +ts-node@^10.4.0: + version "10.4.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.4.0.tgz#680f88945885f4e6cf450e7f0d6223dd404895f7" + integrity sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A== dependencies: "@cspotcode/source-map-support" "0.7.0" "@tsconfig/node10" "^1.0.7" From b6786559b2406a68887b27cf6c7d0185d56bc3f0 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 24 Oct 2021 21:55:45 -0400 Subject: [PATCH 461/473] chore: correct PR template and mention 'accepting prs' (#4045) --- .../standard.md => pull_request_template.md} | 1 + 1 file changed, 1 insertion(+) rename .github/{PULL_REQUEST_TEMPLATE/standard.md => pull_request_template.md} (76%) diff --git a/.github/PULL_REQUEST_TEMPLATE/standard.md b/.github/pull_request_template.md similarity index 76% rename from .github/PULL_REQUEST_TEMPLATE/standard.md rename to .github/pull_request_template.md index c7cb7fa4c9e5..e6d4982e0150 100644 --- a/.github/PULL_REQUEST_TEMPLATE/standard.md +++ b/.github/pull_request_template.md @@ -14,6 +14,7 @@ Please fill out all fields below -- otherwise we may not be able to review your ## PR Checklist - [ ] Addresses an existing issue: fixes #000 +- [ ] That issue was marked as [accepting prs](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22) - [ ] Steps in [CONTRIBUTING.md](https://github.com/typescript-eslint/typescript-eslint/blob/master/CONTRIBUTING.md) were taken ## Overview From 20097da8da66b027a32b6e21cd14b961ecc1b00a Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 25 Oct 2021 11:19:42 -0400 Subject: [PATCH 462/473] chore: remove unnecessary metadata from PR template (#4048) --- .github/pull_request_template.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e6d4982e0150..a93f9eea9143 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,11 +1,3 @@ ---- -name: 'Standard' -about: Standard Pull Request Template -title: '' -labels: '' -assignees: '' ---- - @@ -89,13 +60,20 @@ export default Vue.extend({ "warningCount": 0, }, Object { - "errorCount": 0, - "fatalErrorCount": 0, - "filePath": "/usr/linked/Utility.vue", + "errorCount": 1, + "fatalErrorCount": 1, + "filePath": "/Utility.vue", "fixableErrorCount": 0, "fixableWarningCount": 0, - "messages": Array [], - "output": " +", "usedDeprecatedRules": Array [], "warningCount": 0, }, diff --git a/tests/integration/tests/eslint-v6.test.ts b/tests/integration/tests/eslint-v6.test.ts new file mode 100644 index 000000000000..afcf9da3bc25 --- /dev/null +++ b/tests/integration/tests/eslint-v6.test.ts @@ -0,0 +1,3 @@ +import { integrationTest } from '../integration-test-base'; + +integrationTest(__filename, '*.ts'); diff --git a/tests/integration/tests/markdown.test.ts b/tests/integration/tests/markdown.test.ts new file mode 100644 index 000000000000..8ac7befb646b --- /dev/null +++ b/tests/integration/tests/markdown.test.ts @@ -0,0 +1,3 @@ +import { integrationTest } from '../integration-test-base'; + +integrationTest(__filename, '*.md'); diff --git a/tests/integration/tests/recommended-does-not-require-program.test.ts b/tests/integration/tests/recommended-does-not-require-program.test.ts new file mode 100644 index 000000000000..afcf9da3bc25 --- /dev/null +++ b/tests/integration/tests/recommended-does-not-require-program.test.ts @@ -0,0 +1,3 @@ +import { integrationTest } from '../integration-test-base'; + +integrationTest(__filename, '*.ts'); diff --git a/tests/integration/tests/typescript-and-tslint-plugins-together.test.ts b/tests/integration/tests/typescript-and-tslint-plugins-together.test.ts new file mode 100644 index 000000000000..afcf9da3bc25 --- /dev/null +++ b/tests/integration/tests/typescript-and-tslint-plugins-together.test.ts @@ -0,0 +1,3 @@ +import { integrationTest } from '../integration-test-base'; + +integrationTest(__filename, '*.ts'); diff --git a/tests/integration/tests/vue-jsx.test.ts b/tests/integration/tests/vue-jsx.test.ts new file mode 100644 index 000000000000..18a482247acf --- /dev/null +++ b/tests/integration/tests/vue-jsx.test.ts @@ -0,0 +1,3 @@ +import { integrationTest } from '../integration-test-base'; + +integrationTest(__filename, '*.vue'); diff --git a/tests/integration/tests/vue-sfc.test.ts b/tests/integration/tests/vue-sfc.test.ts new file mode 100644 index 000000000000..18a482247acf --- /dev/null +++ b/tests/integration/tests/vue-sfc.test.ts @@ -0,0 +1,3 @@ +import { integrationTest } from '../integration-test-base'; + +integrationTest(__filename, '*.vue'); diff --git a/tests/integration/tsconfig.json b/tests/integration/tsconfig.json new file mode 100644 index 000000000000..e6c02e537a66 --- /dev/null +++ b/tests/integration/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "esModuleInterop": true, + "resolveJsonModule": true, + "rootDir": "." + }, + "include": ["./*.ts", "./tests/*.test.ts"], + "references": [] +} diff --git a/tests/integration/utils/.eslintrc.js b/tests/integration/utils/.eslintrc.js deleted file mode 100644 index 8ca32766a124..000000000000 --- a/tests/integration/utils/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - parserOptions: { - project: `${__dirname}/jsconfig.json`, - }, -}; diff --git a/tests/integration/utils/generate-package-json.js b/tests/integration/utils/generate-package-json.js deleted file mode 100644 index d627cc889b8a..000000000000 --- a/tests/integration/utils/generate-package-json.js +++ /dev/null @@ -1,21 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unsafe-assignment */ - -const fs = require('fs'); -// eslint-disable-next-line import/no-absolute-path -const rootPackageJSON = require('/usr/root-package.json'); - -/** - * Apply package versions based on what they are currently set to in the root package.json - * in the monorepo. - */ -const testPackageJSON = { - private: true, - devDependencies: { - eslint: rootPackageJSON.devDependencies.eslint, - typescript: rootPackageJSON.devDependencies.typescript, - tslint: rootPackageJSON.devDependencies.tslint, - jest: rootPackageJSON.devDependencies.jest, - }, -}; - -fs.writeFileSync('/usr/package.json', JSON.stringify(testPackageJSON, null, 2)); diff --git a/tests/integration/utils/jest-snapshot-resolver.js b/tests/integration/utils/jest-snapshot-resolver.js deleted file mode 100644 index 3032ef5d575c..000000000000 --- a/tests/integration/utils/jest-snapshot-resolver.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Use a jest snapshotResolver to map the test snapshot output back to the - * linked volume. This means that even though we are running our tests inside - * the docker container, the resulting snapshots will get written back to disk - * on the host machine (i.e. your computer)! ✨ - */ -module.exports = { - // resolves from test to snapshot path - resolveSnapshotPath: (testPath, snapshotExtension) => { - return testPath.replace('/usr/', '/usr/linked/') + snapshotExtension; - }, - // resolves from snapshot to test path - resolveTestPath: (snapshotFilePath, snapshotExtension) => { - return snapshotFilePath - .replace('/usr/linked/', '/usr/') - .slice(0, -snapshotExtension.length); - }, - testPathForConsistencyCheck: '/usr/test.js', -}; diff --git a/tests/integration/utils/jsconfig.json b/tests/integration/utils/jsconfig.json deleted file mode 100644 index 984f1f4c0780..000000000000 --- a/tests/integration/utils/jsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "include": [ - ".eslintrc.js", - "jest-snapshot-resolver.js", - "generate-package-json.js" - ] -} diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 16ced4c0241c..102bb2a44e3d 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -5,10 +5,5 @@ "allowJs": true }, "extends": "./tsconfig.base.json", - "include": [ - "tests/**/*.ts", - "tools/**/*.ts", - ".eslintrc.js", - "tests/jest-resolver.js" - ] + "include": ["tools/**/*.ts", ".eslintrc.js", "tests/jest-resolver.js"] } diff --git a/yarn.lock b/yarn.lock index 5486c7f7140c..9b76320d02b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2271,6 +2271,13 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== +"@types/ncp@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@types/ncp/-/ncp-2.0.5.tgz#5c53b229a321946102a188b603306162137f4fb9" + integrity sha512-ocK0p8JuFmX7UkMabFPjY0F7apPvQyLWt5qtdvuvQEBz9i4m2dbzV+6L1zNaUp042RfnL6pHnxDE53OH6XQ9VQ== + dependencies: + "@types/node" "*" + "@types/node@*", "@types/node@12.20.24", "@types/node@>= 8", "@types/node@^16.11.4": version "16.11.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.4.tgz#90771124822d6663814f7c1c9b45a6654d8fd964" @@ -7355,6 +7362,11 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= +ncp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" + integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= + neo-async@^2.6.0: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -9419,6 +9431,13 @@ timsort@~0.3.0: resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= +tmp@*, tmp@^0.2.1, tmp@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== + dependencies: + rimraf "^3.0.0" + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -9426,13 +9445,6 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -tmp@^0.2.1, tmp@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" - integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== - dependencies: - rimraf "^3.0.0" - tmpl@1.0.x: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" From 475caa46c64a74b169680b2f82925ca8b99ab498 Mon Sep 17 00:00:00 2001 From: Kyle Peeler Date: Sun, 31 Oct 2021 20:18:04 -0700 Subject: [PATCH 468/473] docs(eslint-plugin): Fix `consistent-type-definitions` README with correct usage of type (#4039) --- .../eslint-plugin/docs/rules/consistent-type-definitions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/consistent-type-definitions.md b/packages/eslint-plugin/docs/rules/consistent-type-definitions.md index f58a138ec8cd..6f91d480e52d 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-definitions.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-definitions.md @@ -59,7 +59,7 @@ interface T { } ``` -Examples of **correct** code with `interface` option. +Examples of **correct** code with `type` option. ```ts type T = { x: number }; From 5229597d9bfc998852c4b4fb421859e8f3d3d688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 1 Nov 2021 04:27:20 +0100 Subject: [PATCH 469/473] feat(experimental-utils): extract `isTokenOfTypeWithConditions` out of `ast-utils`' `predicates` (#3977) --- .../src/ast-utils/helpers.ts | 27 +++++++++++++++-- .../src/ast-utils/predicates.ts | 29 +++++++++---------- 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/packages/experimental-utils/src/ast-utils/helpers.ts b/packages/experimental-utils/src/ast-utils/helpers.ts index 5d917df603a1..f2a4ac2e2442 100644 --- a/packages/experimental-utils/src/ast-utils/helpers.ts +++ b/packages/experimental-utils/src/ast-utils/helpers.ts @@ -1,4 +1,7 @@ -import { AST_NODE_TYPES, TSESTree } from '../ts-estree'; +import { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree } from '../ts-estree'; + +type ObjectEntry = [keyof BaseType, BaseType[keyof BaseType]]; +type ObjectEntries = Array>; export const isNodeOfType = (nodeType: NodeType) => @@ -14,8 +17,6 @@ export const isNodeOfTypes = ): node is TSESTree.Node & { type: NodeTypes[number] } => !!node && nodeTypes.includes(node.type); -type ObjectEntry = [keyof BaseType, BaseType[keyof BaseType]]; -type ObjectEntries = Array>; export const isNodeOfTypeWithConditions = < NodeType extends AST_NODE_TYPES, Conditions extends Partial, @@ -35,3 +36,23 @@ export const isNodeOfTypeWithConditions = < node?.type === nodeType && entries.every(([key, value]) => node[key] === value); }; + +export const isTokenOfTypeWithConditions = < + TokenType extends AST_TOKEN_TYPES, + Conditions extends Partial, +>( + tokenType: TokenType, + conditions: Conditions, +): (( + token: TSESTree.Token | null | undefined, +) => token is TSESTree.Token & { type: TokenType } & Conditions) => { + const entries = Object.entries(conditions) as ObjectEntries< + TSESTree.Token & { type: TokenType } + >; + + return ( + token: TSESTree.Token | null | undefined, + ): token is TSESTree.Token & { type: TokenType } & Conditions => + token?.type === tokenType && + entries.every(([key, value]) => token[key] === value); +}; diff --git a/packages/experimental-utils/src/ast-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/predicates.ts index 985c6e976238..0038f092bbe0 100644 --- a/packages/experimental-utils/src/ast-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/predicates.ts @@ -4,13 +4,14 @@ import { isNodeOfType, isNodeOfTypes, isNodeOfTypeWithConditions, + isTokenOfTypeWithConditions, } from './helpers'; -function isOptionalChainPunctuator( - token: TSESTree.Token, -): token is TSESTree.PunctuatorToken & { value: '?.' } { - return token.type === AST_TOKEN_TYPES.Punctuator && token.value === '?.'; -} +const isOptionalChainPunctuator = isTokenOfTypeWithConditions( + AST_TOKEN_TYPES.Punctuator, + { value: '?.' }, +); + function isNotOptionalChainPunctuator( token: TSESTree.Token, ): token is Exclude< @@ -20,11 +21,11 @@ function isNotOptionalChainPunctuator( return !isOptionalChainPunctuator(token); } -function isNonNullAssertionPunctuator( - token: TSESTree.Token, -): token is TSESTree.PunctuatorToken & { value: '!' } { - return token.type === AST_TOKEN_TYPES.Punctuator && token.value === '!'; -} +const isNonNullAssertionPunctuator = isTokenOfTypeWithConditions( + AST_TOKEN_TYPES.Punctuator, + { value: '!' }, +); + function isNotNonNullAssertionPunctuator( token: TSESTree.Token, ): token is Exclude { @@ -138,11 +139,9 @@ const isAwaitExpression = isNodeOfType(AST_NODE_TYPES.AwaitExpression); /** * Checks if a possible token is the `await` keyword. */ -function isAwaitKeyword( - node: TSESTree.Token | undefined | null, -): node is TSESTree.IdentifierToken & { value: 'await' } { - return node?.type === AST_TOKEN_TYPES.Identifier && node.value === 'await'; -} +const isAwaitKeyword = isTokenOfTypeWithConditions(AST_TOKEN_TYPES.Identifier, { + value: 'await', +}); const isLoop = isNodeOfTypes([ AST_NODE_TYPES.DoWhileStatement, From a93cebfc0f2026c50972bcb110bcd3295ba9a44d Mon Sep 17 00:00:00 2001 From: Idan Attias Date: Mon, 1 Nov 2021 05:29:14 +0200 Subject: [PATCH 470/473] feat(eslint-plugin): [no-shadow] exclude external type declaration merging (#3959) * fix(eslint-plugin): [no-shadow] exclude external type declaration merging * fix(eslint-plugin): [no-shadow] typo * Apply suggestions from code review Co-authored-by: Josh Goldberg * fix(eslint-plugin): lint - remove isStringLiteral (no longer used) Co-authored-by: Josh Goldberg --- packages/eslint-plugin/src/rules/no-shadow.ts | 49 ++++++++++- .../tests/rules/no-shadow.test.ts | 87 +++++++++++++++++++ 2 files changed, 134 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/src/rules/no-shadow.ts b/packages/eslint-plugin/src/rules/no-shadow.ts index 27c689309310..dfba42cf301e 100644 --- a/packages/eslint-plugin/src/rules/no-shadow.ts +++ b/packages/eslint-plugin/src/rules/no-shadow.ts @@ -94,10 +94,10 @@ export default util.createRule({ } function isTypeImport( - definition: Definition, + definition?: Definition, ): definition is ImportBindingDefinition { return ( - definition.type === DefinitionType.ImportBinding && + definition?.type === DefinitionType.ImportBinding && definition.parent.importKind === 'type' ); } @@ -224,6 +224,47 @@ export default util.createRule({ ); } + function isImportDeclaration( + definition: + | TSESTree.ImportDeclaration + | TSESTree.TSImportEqualsDeclaration, + ): definition is TSESTree.ImportDeclaration { + return definition.type === AST_NODE_TYPES.ImportDeclaration; + } + + function isExternalModuleDeclarationWithName( + scope: TSESLint.Scope.Scope, + name: string, + ): boolean { + return ( + scope.type === ScopeType.tsModule && + scope.block.type === AST_NODE_TYPES.TSModuleDeclaration && + scope.block.id.type === AST_NODE_TYPES.Literal && + scope.block.id.value === name + ); + } + + function isExternalDeclarationMerging( + scope: TSESLint.Scope.Scope, + variable: TSESLint.Scope.Variable, + shadowed: TSESLint.Scope.Variable, + ): boolean { + const [firstDefinition] = shadowed.defs; + const [secondDefinition] = variable.defs; + + return ( + isTypeImport(firstDefinition) && + isImportDeclaration(firstDefinition.parent) && + isExternalModuleDeclarationWithName( + scope, + firstDefinition.parent.source.value, + ) && + secondDefinition.node.type === AST_NODE_TYPES.TSInterfaceDeclaration && + secondDefinition.node.parent?.type === + AST_NODE_TYPES.ExportNamedDeclaration + ); + } + /** * Check if variable name is allowed. * @param variable The variable to check. @@ -403,6 +444,10 @@ export default util.createRule({ continue; } + if (isExternalDeclarationMerging(scope, variable, shadowed)) { + continue; + } + const isESLintGlobal = 'writeable' in shadowed; if ( (shadowed.identifiers.length > 0 || diff --git a/packages/eslint-plugin/tests/rules/no-shadow.test.ts b/packages/eslint-plugin/tests/rules/no-shadow.test.ts index c3e5a09f3441..bedb825df704 100644 --- a/packages/eslint-plugin/tests/rules/no-shadow.test.ts +++ b/packages/eslint-plugin/tests/rules/no-shadow.test.ts @@ -51,6 +51,15 @@ class Foo { } interface Foo { prop2: string; +} + `, + ` +import type { Foo } from 'bar'; + +declare module 'bar' { + export interface Foo { + x: string; + } } `, // type value shadowing @@ -1442,5 +1451,83 @@ function doThing(foo: number, bar: number) {} }, ], }, + { + code: ` +interface Foo {} + +declare module 'bar' { + export interface Foo { + x: string; + } +} + `, + errors: [ + { + messageId: 'noShadow', + data: { name: 'Foo' }, + type: AST_NODE_TYPES.Identifier, + line: 5, + column: 20, + }, + ], + }, + { + code: ` +import type { Foo } from 'bar'; + +declare module 'baz' { + export interface Foo { + x: string; + } +} + `, + errors: [ + { + messageId: 'noShadow', + data: { name: 'Foo' }, + type: AST_NODE_TYPES.Identifier, + line: 5, + column: 20, + }, + ], + }, + { + code: ` +import type { Foo } from 'bar'; + +declare module 'bar' { + export type Foo = string; +} + `, + errors: [ + { + messageId: 'noShadow', + data: { name: 'Foo' }, + type: AST_NODE_TYPES.Identifier, + line: 5, + column: 15, + }, + ], + }, + { + code: ` +import type { Foo } from 'bar'; + +declare module 'bar' { + interface Foo { + x: string; + } +} + `, + errors: [ + { + messageId: 'noShadow', + data: { name: 'Foo' }, + type: AST_NODE_TYPES.Identifier, + line: 5, + column: 13, + }, + ], + }, ], }); From 80b853db90ae3d4e32c4b7ec9d45a5c41dc459c9 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 31 Oct 2021 23:30:18 -0400 Subject: [PATCH 471/473] fix(eslint-plugin): ignore private identifiers in explicit-module-boundary-types (#4046) --- .../src/rules/explicit-module-boundary-types.ts | 10 ++++++++-- .../tests/rules/explicit-module-boundary-types.test.ts | 10 ++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts index e189727463f3..adaacaf363f6 100644 --- a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts +++ b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts @@ -336,7 +336,10 @@ export default util.createRule({ return; case AST_NODE_TYPES.PropertyDefinition: - if (node.accessibility === 'private') { + if ( + node.accessibility === 'private' || + node.key.type === AST_NODE_TYPES.PrivateIdentifier + ) { return; } return checkNode(node.value); @@ -353,7 +356,10 @@ export default util.createRule({ case AST_NODE_TYPES.MethodDefinition: case AST_NODE_TYPES.TSAbstractMethodDefinition: - if (node.accessibility === 'private') { + if ( + node.accessibility === 'private' || + node.key.type === AST_NODE_TYPES.PrivateIdentifier + ) { return; } return checkNode(node.value); diff --git a/packages/eslint-plugin/tests/rules/explicit-module-boundary-types.test.ts b/packages/eslint-plugin/tests/rules/explicit-module-boundary-types.test.ts index ba80da5b588d..e511e29d682b 100644 --- a/packages/eslint-plugin/tests/rules/explicit-module-boundary-types.test.ts +++ b/packages/eslint-plugin/tests/rules/explicit-module-boundary-types.test.ts @@ -82,6 +82,16 @@ export class Test { } `, }, + ` +export class PrivateProperty { + #property = () => null; +} + `, + ` +export class PrivateMethod { + #method() {} +} + `, { // https://github.com/typescript-eslint/typescript-eslint/issues/2150 code: ` From 6af7ca7d9fde230342d27ad5a75a09a58c022974 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 1 Nov 2021 00:59:29 -0400 Subject: [PATCH 472/473] fix(eslint-plugin): skip seenTypes for unions in isTypeReadonly (#4043) --- packages/eslint-plugin/src/util/isTypeReadonly.ts | 6 ++++-- .../rules/prefer-readonly-parameter-types.test.ts | 12 +++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin/src/util/isTypeReadonly.ts b/packages/eslint-plugin/src/util/isTypeReadonly.ts index 8b3efc27856e..8231455c294f 100644 --- a/packages/eslint-plugin/src/util/isTypeReadonly.ts +++ b/packages/eslint-plugin/src/util/isTypeReadonly.ts @@ -185,8 +185,10 @@ function isTypeReadonlyRecurser( if (isUnionType(type)) { // all types in the union must be readonly - const result = unionTypeParts(type).every(t => - isTypeReadonlyRecurser(checker, t, options, seenTypes), + const result = unionTypeParts(type).every( + t => + seenTypes.has(t) || + isTypeReadonlyRecurser(checker, t, options, seenTypes), ); const readonlyness = result ? Readonlyness.Readonly : Readonlyness.Mutable; return readonlyness; diff --git a/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts b/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts index 0a6ee1038073..be50f096963a 100644 --- a/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts @@ -280,13 +280,23 @@ ruleTester.run('prefer-readonly-parameter-types', rule, { `, // TSMethodSignature // https://github.com/typescript-eslint/typescript-eslint/issues/1665 - // directly recursive + // directly recursive interface ` interface Foo { readonly prop: Foo; } function foo(arg: Foo) {} `, + + // https://github.com/typescript-eslint/typescript-eslint/issues/3396 + // directly recursive union type + ` + type MyType = string | readonly MyType[]; + + function foo(a: A): MyType[] { + return []; + } + `, // indirectly recursive ` interface Foo { From c289d1358c62c41847ee2f32d135f13321dca177 Mon Sep 17 00:00:00 2001 From: James Henry Date: Mon, 1 Nov 2021 17:01:59 +0000 Subject: [PATCH 473/473] chore: publish v5.3.0 --- CHANGELOG.md | 19 +++++++++++++++++++ lerna.json | 2 +- packages/ast-spec/CHANGELOG.md | 8 ++++++++ packages/ast-spec/package.json | 2 +- packages/eslint-plugin-internal/CHANGELOG.md | 8 ++++++++ packages/eslint-plugin-internal/package.json | 6 +++--- packages/eslint-plugin-tslint/CHANGELOG.md | 8 ++++++++ packages/eslint-plugin-tslint/package.json | 6 +++--- packages/eslint-plugin/CHANGELOG.md | 17 +++++++++++++++++ packages/eslint-plugin/package.json | 6 +++--- packages/experimental-utils/CHANGELOG.md | 16 ++++++++++++++++ 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 ++-- 24 files changed, 156 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4c5cc0312b2..b1186a12eb8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01) + + +### Bug Fixes + +* **eslint-plugin:** ignore private identifiers in explicit-module-boundary-types ([#4046](https://github.com/typescript-eslint/typescript-eslint/issues/4046)) ([80b853d](https://github.com/typescript-eslint/typescript-eslint/commit/80b853db90ae3d4e32c4b7ec9d45a5c41dc459c9)) +* **eslint-plugin:** skip seenTypes for unions in isTypeReadonly ([#4043](https://github.com/typescript-eslint/typescript-eslint/issues/4043)) ([6af7ca7](https://github.com/typescript-eslint/typescript-eslint/commit/6af7ca7d9fde230342d27ad5a75a09a58c022974)) +* **experimental-utils:** add `name` property to test case interface ([#4067](https://github.com/typescript-eslint/typescript-eslint/issues/4067)) ([f3021c9](https://github.com/typescript-eslint/typescript-eslint/commit/f3021c94460e8d06e4169335bcc1a23854531f2a)) + + +### Features + +* **eslint-plugin:** [no-shadow] exclude external type declaration merging ([#3959](https://github.com/typescript-eslint/typescript-eslint/issues/3959)) ([a93cebf](https://github.com/typescript-eslint/typescript-eslint/commit/a93cebfc0f2026c50972bcb110bcd3295ba9a44d)) +* **experimental-utils:** extract `isTokenOfTypeWithConditions` out of `ast-utils`' `predicates` ([#3977](https://github.com/typescript-eslint/typescript-eslint/issues/3977)) ([5229597](https://github.com/typescript-eslint/typescript-eslint/commit/5229597d9bfc998852c4b4fb421859e8f3d3d688)) + + + + + # [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25) diff --git a/lerna.json b/lerna.json index 5a7c00795bc8..0247b06e8869 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "5.2.0", + "version": "5.3.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index b86a98cc4fee..9a0a4f4869a6 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/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. +# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + # [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index dad8afb2e9d7..905a4eec05e5 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "5.2.0", + "version": "5.3.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index e9951fed79d4..63eec6987363 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. +# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + # [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25) **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 5382fe8b7f5c..5ee193ea771d 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": "5.2.0", + "version": "5.3.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,8 +14,8 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "5.2.0", - "@typescript-eslint/scope-manager": "5.2.0", + "@typescript-eslint/experimental-utils": "5.3.0", + "@typescript-eslint/scope-manager": "5.3.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index dff4a4ca5ec8..71737e6edff4 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. +# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + # [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25) **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 884eec72cd90..1a178b917f6e 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": "5.2.0", + "version": "5.3.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": "5.2.0", + "@typescript-eslint/experimental-utils": "5.3.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "5.2.0" + "@typescript-eslint/parser": "5.3.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 897e4a7bd873..d102d6349394 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01) + + +### Bug Fixes + +* **eslint-plugin:** ignore private identifiers in explicit-module-boundary-types ([#4046](https://github.com/typescript-eslint/typescript-eslint/issues/4046)) ([80b853d](https://github.com/typescript-eslint/typescript-eslint/commit/80b853db90ae3d4e32c4b7ec9d45a5c41dc459c9)) +* **eslint-plugin:** skip seenTypes for unions in isTypeReadonly ([#4043](https://github.com/typescript-eslint/typescript-eslint/issues/4043)) ([6af7ca7](https://github.com/typescript-eslint/typescript-eslint/commit/6af7ca7d9fde230342d27ad5a75a09a58c022974)) + + +### Features + +* **eslint-plugin:** [no-shadow] exclude external type declaration merging ([#3959](https://github.com/typescript-eslint/typescript-eslint/issues/3959)) ([a93cebf](https://github.com/typescript-eslint/typescript-eslint/commit/a93cebfc0f2026c50972bcb110bcd3295ba9a44d)) + + + + + # [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 6598833357e9..9655d60e8062 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "5.2.0", + "version": "5.3.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "5.2.0", - "@typescript-eslint/scope-manager": "5.2.0", + "@typescript-eslint/experimental-utils": "5.3.0", + "@typescript-eslint/scope-manager": "5.3.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 5ac17483fbd8..a34dfcce822b 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/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. +# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01) + + +### Bug Fixes + +* **experimental-utils:** add `name` property to test case interface ([#4067](https://github.com/typescript-eslint/typescript-eslint/issues/4067)) ([f3021c9](https://github.com/typescript-eslint/typescript-eslint/commit/f3021c94460e8d06e4169335bcc1a23854531f2a)) + + +### Features + +* **experimental-utils:** extract `isTokenOfTypeWithConditions` out of `ast-utils`' `predicates` ([#3977](https://github.com/typescript-eslint/typescript-eslint/issues/3977)) ([5229597](https://github.com/typescript-eslint/typescript-eslint/commit/5229597d9bfc998852c4b4fb421859e8f3d3d688)) + + + + + # [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25) **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 d541df285e6f..32fdeffd18ff 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "5.2.0", + "version": "5.3.0", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.2.0", - "@typescript-eslint/types": "5.2.0", - "@typescript-eslint/typescript-estree": "5.2.0", + "@typescript-eslint/scope-manager": "5.3.0", + "@typescript-eslint/types": "5.3.0", + "@typescript-eslint/typescript-estree": "5.3.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 2306061ddabd..76239c9ee34c 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. +# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + # [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 9e4a35b7674b..9021564e2cf8 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "5.2.0", + "version": "5.3.0", "description": "An ESLint custom parser which leverages TypeScript ESTree", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -44,14 +44,14 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "5.2.0", - "@typescript-eslint/types": "5.2.0", - "@typescript-eslint/typescript-estree": "5.2.0", + "@typescript-eslint/scope-manager": "5.3.0", + "@typescript-eslint/types": "5.3.0", + "@typescript-eslint/typescript-estree": "5.3.0", "debug": "^4.3.2" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "5.2.0", + "@typescript-eslint/experimental-utils": "5.3.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index d33343eea666..e3890cbc7932 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. +# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + # [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25) **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 5c165d5f6590..0c49d224fe15 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "5.2.0", + "version": "5.3.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "5.2.0", - "@typescript-eslint/visitor-keys": "5.2.0" + "@typescript-eslint/types": "5.3.0", + "@typescript-eslint/visitor-keys": "5.3.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "5.2.0", + "@typescript-eslint/typescript-estree": "5.3.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index a0a14ca11d2d..5710ecc6d806 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. +# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + # [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25) **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 f4e6b228d3a7..84b82a7c58ab 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "5.2.0", + "version": "5.3.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index e8ef5f9fda77..4054d4a4f693 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. +# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + # [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index bf14776d5c7a..4ab50f039d36 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "5.2.0", + "version": "5.3.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 43fe405d7f19..d33e8663db7b 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. +# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + # [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25) **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 a5717e134417..c77bd556e096 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "5.2.0", + "version": "5.3.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": "5.2.0", - "@typescript-eslint/visitor-keys": "5.2.0", + "@typescript-eslint/types": "5.3.0", + "@typescript-eslint/visitor-keys": "5.3.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "5.2.0", + "@typescript-eslint/shared-fixtures": "5.3.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 41356867cefb..27a7b5a9b4c1 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. +# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + # [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25) **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 afd4fbd06811..7c95d675ac25 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "5.2.0", + "version": "5.3.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": "5.2.0", + "@typescript-eslint/types": "5.3.0", "eslint-visitor-keys": "^3.0.0" }, "devDependencies": { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy