Skip to content
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

fix(eslint-plugin): [no-unnecessary-type-assertion] handle exactOptionalPropertyTypes compiler option #8770

Merged
merged 4 commits into from Apr 1, 2024

Conversation

yeonjuan
Copy link
Contributor

PR Checklist

Overview

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @yeonjuan!

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 Mar 25, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 72a9a55
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/6602e3872761660008c55390
😎 Deploy Preview https://deploy-preview-8770--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: 97
Accessibility: 100
Best Practices: 92
SEO: 98
PWA: 80
View the detailed breakdown and full score reports

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

@yeonjuan yeonjuan marked this pull request as ready for review March 25, 2024 17:04
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.37%. Comparing base (2a62a40) to head (72a9a55).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8770      +/-   ##
==========================================
+ Coverage   87.34%   87.37%   +0.03%     
==========================================
  Files         254      255       +1     
  Lines       12474    12509      +35     
  Branches     3915     3926      +11     
==========================================
+ Hits        10895    10930      +35     
  Misses       1304     1304              
  Partials      275      275              
Flag Coverage Δ
unittest 87.37% <100.00%> (+0.03%) ⬆️

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

Files Coverage Δ
...-plugin/src/rules/no-unnecessary-type-assertion.ts 97.56% <100.00%> (+0.45%) ⬆️

... and 2 files with indirect coverage changes

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.

LGTM, nice find! Good to see this venerable issue tackled. 🚀

The logic looks good, just a couple of small non-blocking suggestions from me. Someone else should probably take another look though - these type union shenanigans can get hard to reason about.

@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval PR that a maintainer has LGTM'd - any maintainer can merge this when ready label Mar 25, 2024
Copy link
Member

@auvred auvred left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@JoshuaKGoldberg JoshuaKGoldberg merged commit f0b1c4f into typescript-eslint:main Apr 1, 2024
58 of 59 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 approval PR that a maintainer has LGTM'd - any maintainer can merge this when ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: [no-unnecessary-type-assertion] false negative with exactOptionalPropertyTypes compiler option
3 participants