Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
fix(eslint-plugin): [no-unnecessary-type-arguments] fix comparison of types#4555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nx-cloudbot commentedFeb 15, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks for the PR,@bradzacher! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitorsper day. |
netlifybot commentedFeb 15, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
❌ Deploy Preview fortypescript-eslint failed. 🔨 Explore the source changes:32009f4 🔍 Inspect the deploy log:https://app.netlify.com/sites/typescript-eslint/deploys/620b0f85d3f9c10007857be6 |
codecovbot commentedFeb 15, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## main #4555 +/- ##==========================================+ Coverage 92.52% 92.76% +0.24%========================================== Files 344 161 -183 Lines 11708 8228 -3480 Branches 3345 2646 -699 ==========================================- Hits 10833 7633 -3200+ Misses 608 396 -212+ Partials 267 199 -68
Flags with carried forward coverage won't be shown.Click here to find out more. |
JoshuaKGoldberg left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Ah, yes, I didn't think to ask for these additional test cases but should have. Thanks!
This PR contains the following updates:| Package | Type | Update | Change ||---|---|---|---|| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) | devDependencies | patch | [`5.12.0` -> `5.12.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/5.12.0/5.12.1) || [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint) | devDependencies | patch | [`5.12.0` -> `5.12.1`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/5.12.0/5.12.1) |---### Release Notes<details><summary>typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)</summary>### [`v5.12.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#​5121-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5120v5121-2022-02-21)[Compare Source](typescript-eslint/typescript-eslint@v5.12.0...v5.12.1)##### Bug Fixes- **eslint-plugin:** \[no-unnecessary-type-arguments] fix comparison of types ([#​4555](typescript-eslint/typescript-eslint#4555)) ([fc3936e](typescript-eslint/typescript-eslint@fc3936e))</details><details><summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary>### [`v5.12.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#​5121-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5120v5121-2022-02-21)[Compare Source](typescript-eslint/typescript-eslint@v5.12.0...v5.12.1)**Note:** Version bump only for package [@​typescript-eslint/parser](https://github.com/typescript-eslint/parser)</details>---### Configuration📅 **Schedule**: At any time (no schedule defined).🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.--- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.---This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).Co-authored-by: cabr2-bot <cabr2.help@gmail.com>Reviewed-on:https://codeberg.org/Calciumdibromid/CaBr2/pulls/1185Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org>Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
This PR contains the following updates:| Package | Type | Update | Change ||---|---|---|---|| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) | devDependencies | minor | [`5.12.1` -> `5.13.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/5.12.1/5.13.0) || [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint) | devDependencies | minor | [`5.12.1` -> `5.13.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/5.12.1/5.13.0) |---### Release Notes<details><summary>typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)</summary>### [`v5.13.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#​5130-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5121v5130-2022-02-28)[Compare Source](typescript-eslint/typescript-eslint@v5.12.1...v5.13.0)##### Bug Fixes- **eslint-plugin:** \[sort-type-union-intersection-members] Wrap the constructorType in parentheses ([#​4590](typescript-eslint/typescript-eslint#4590)) ([851bb90](typescript-eslint/typescript-eslint@851bb90))##### Features- **eslint-plugin:** \[no-misused-promises] check more places for checksVoidReturn ([#​4541](typescript-eslint/typescript-eslint#4541)) ([052cf51](typescript-eslint/typescript-eslint@052cf51))- **eslint-plugin:** add `no-redundant-type-constituents` rule ([#​4378](typescript-eslint/typescript-eslint#4378)) ([63d051e](typescript-eslint/typescript-eslint@63d051e))- **eslint-plugin:** add `no-useless-empty-export` rule ([#​4380](typescript-eslint/typescript-eslint#4380)) ([823b945](typescript-eslint/typescript-eslint@823b945))- **eslint-plugin:** add extension rule `space-before-blocks` ([#​1606](typescript-eslint/typescript-eslint#1606)) ([#​4184](typescript-eslint/typescript-eslint#4184)) ([208b6d0](typescript-eslint/typescript-eslint@208b6d0))- **eslint-plugin:** added member group support to member-ordering rule ([#​4538](typescript-eslint/typescript-eslint#4538)) ([6afcaea](typescript-eslint/typescript-eslint@6afcaea))#### [5.12.1](typescript-eslint/typescript-eslint@v5.12.0...v5.12.1) (2022-02-21)##### Bug Fixes- **eslint-plugin:** \[no-unnecessary-type-arguments] fix comparison of types ([#​4555](typescript-eslint/typescript-eslint#4555)) ([fc3936e](typescript-eslint/typescript-eslint@fc3936e))</details><details><summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary>### [`v5.13.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#​5130-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5121v5130-2022-02-28)[Compare Source](typescript-eslint/typescript-eslint@v5.12.1...v5.13.0)**Note:** Version bump only for package [@​typescript-eslint/parser](https://github.com/typescript-eslint/parser)#### [5.12.1](typescript-eslint/typescript-eslint@v5.12.0...v5.12.1) (2022-02-21)**Note:** Version bump only for package [@​typescript-eslint/parser](https://github.com/typescript-eslint/parser)</details>---### Configuration📅 **Schedule**: At any time (no schedule defined).🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.--- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.---This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).Co-authored-by: cabr2-bot <cabr2.help@gmail.com>Co-authored-by: 6543 <6543@noreply.codeberg.org>Reviewed-on:https://codeberg.org/Calciumdibromid/CaBr2/pulls/1192Reviewed-by: 6543 <6543@noreply.codeberg.org>Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
PR Checklist
Overview
The old logic (introduced in#4543) only handled a subset of cases and caused false-positives.
We probably should have asked for more test cases on the PR to help validate? 🤷 Hindsight is 20:20.
This new logic should cover more cases by comparing the types to a tighter degree.
No doubt there will still be some false-positives here, but without the proper type relationship API we're making it up as we go...!