Skip to content

fix(eslint-plugin): [no-unsafe-return] don't reiterate through all type parts for each part #10203

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

tezf
Copy link
Contributor

@tezf tezf commented Oct 24, 2024

PR Checklist

Overview

Prevents the whole type from being looped through isThenableType once for each part of the type.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @tezf!

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 on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented Oct 24, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit a704014
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/6719e97a664eea0008a98646
😎 Deploy Preview https://deploy-preview-10203--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🟢 up 5 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

nx-cloud bot commented Oct 24, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit a704014. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.18%. Comparing base (a744765) to head (a704014).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
packages/type-utils/src/predicates.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10203      +/-   ##
==========================================
+ Coverage   86.16%   86.18%   +0.02%     
==========================================
  Files         430      430              
  Lines       15031    15055      +24     
  Branches     4361     4368       +7     
==========================================
+ Hits        12951    12975      +24     
  Misses       1728     1728              
  Partials      352      352              
Flag Coverage Δ
unittest 86.18% <0.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/type-utils/src/predicates.ts 21.21% <0.00%> (ø)

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Nice catch 👏

Copy link
Member

@kirkwaiblinger kirkwaiblinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me as well. Just wondering if there's a way to regression test for this?

@kirkwaiblinger kirkwaiblinger added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Oct 24, 2024
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@bradzacher bradzacher merged commit 74ace4d into typescript-eslint:main Oct 24, 2024
62 of 65 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance degradation in 8.1.0: @typescript-eslint/no-unsafe-return with high-cardinality unions
5 participants