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(typescript-eslint): fix type errors when using exactOptionalPropertyTypes #8786

Merged

Conversation

abrahamguo
Copy link
Contributor

PR Checklist

Overview

Support exactOptionalPropertyTypes: true

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @abrahamguo!

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 28, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 479caba
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/660605098c0e95000829f1c8
😎 Deploy Preview https://deploy-preview-8786--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.

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 this!
Let's add a new integration test for this to.make sure it works and make sure we don't cause a regression.

Here is the existing integration test:
https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/integration-tests/fixtures/flat-config-types

Let's add a new one that uses exactOptionalPropertyTypes

Let's also update the old (and new one) to include eslint-plugin-playwright so that we're testing more cases.

@bradzacher bradzacher changed the title add |undefined fix(typescript-eslint): fix type errors when using exactOptionalPropertyTypes Mar 28, 2024
@abrahamguo
Copy link
Contributor Author

@bradzacher Unfortunately, fixing the original type error in the linked issue revealed a series of about 20 more type errors of various nested properties in the same fashion, so I had to add a lot more | undefineds. Do you have any objection to this?

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.01%. Comparing base (d5615d7) to head (479caba).
Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8786      +/-   ##
==========================================
+ Coverage   87.36%   88.01%   +0.64%     
==========================================
  Files         255      405     +150     
  Lines       12498    14076    +1578     
  Branches     3923     4121     +198     
==========================================
+ Hits        10919    12389    +1470     
- Misses       1304     1382      +78     
- Partials      275      305      +30     
Flag Coverage Δ
unittest 88.01% <ø> (+0.64%) ⬆️

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

see 150 files with indirect coverage changes

@bradzacher bradzacher added the bug Something isn't working label Apr 4, 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 doing this! I hate that we need to do this due to the @types/eslint types but it is what it is.

@bradzacher bradzacher merged commit 716b783 into typescript-eslint:main Apr 4, 2024
60 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Type error when using ConfigWithExtends (eslint-plugin-playwright)
2 participants