Skip to content

fix(typescript-estree): correct TSImportType property name when assert #11115

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

overlookmotel
Copy link
Contributor

PR Checklist

Overview

I guess token.getText() is the best API to use to obtain the property name, but I'm unfamiliar with both typescript-eslint and TypeScript compiler, so I may well be on the wrong track. Ditto I think I've put the test in the right place.

If any changes required (or if I've gone about this in completely the wrong way), please do let me know.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @overlookmotel!

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 Apr 29, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 5de0989
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/6818d7376a8b5100090f8939
😎 Deploy Preview https://deploy-preview-11115--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: 94 (🔴 down 4 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (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 Apr 29, 2025

View your CI Pipeline Execution ↗ for commit 5de0989.

Command Status Duration Result
nx typecheck ast-spec ✅ Succeeded 3s View ↗
nx run-many --target=build --exclude website --... ✅ Succeeded 50s View ↗
nx run-many --target=clean ✅ Succeeded 11s View ↗

☁️ Nx Cloud last updated this comment at 2025-05-05 15:57:33 UTC

Copy link

codecov bot commented Apr 29, 2025

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.

Project coverage is 90.89%. Comparing base (ccbfcdc) to head (5de0989).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
packages/typescript-estree/src/convert.ts 0.00% 13 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11115      +/-   ##
==========================================
- Coverage   90.90%   90.89%   -0.02%     
==========================================
  Files         498      498              
  Lines       50655    50663       +8     
  Branches     8335     8335              
==========================================
  Hits        46049    46049              
- Misses       4591     4599       +8     
  Partials       15       15              
Flag Coverage Δ
unittest 90.89% <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/typescript-estree/src/convert.ts 30.66% <0.00%> (-0.09%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@overlookmotel
Copy link
Contributor Author

Could someone please advise on how to fix the codecov/patch CI fail? I'm a bit baffled as the changes made to tests does exercise multiple possible values of withOrAssertName. Is it just due to using longer var names?

@JoshuaKGoldberg
Copy link
Member

Could someone please advise on how to fix the codecov/patch CI fail? I'm a bit baffled as the changes made to tests does exercise multiple possible values of withOrAssertName. Is it just due to using longer var names?

#6701 🫠. This PR is fine, it's the test coverage reporting that's wrong. You can ignore codecov. That's what I'd do (along with an exasperated sigh).

If you want to be awesome and go the extra mile, you could try to fix #6701. 😄

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.

Great first PR! 👏

I'm just requesting changes on making a dedicated fixture for this. The text parsing stuff I'm not confident on.

Jack Torrence in The Shining at the bar, happily waggling his eyebrows and holding a drink

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label May 2, 2025
@overlookmotel
Copy link
Contributor Author

If you want to be awesome and go the extra mile, you could try to fix #6701. 😄

I aspire to being awesome, but I'm sorry to say I wouldn't have a clue how to do that!

@github-actions github-actions bot removed the awaiting response Issues waiting for a reply from the OP or another party label May 2, 2025
bradzacher
bradzacher previously approved these changes May 3, 2025
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.

LGTM - great work!

@bradzacher bradzacher added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label May 3, 2025
JoshuaKGoldberg
JoshuaKGoldberg previously approved these changes May 5, 2025
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.

🙌

@JoshuaKGoldberg JoshuaKGoldberg dismissed stale reviews from bradzacher and themself via 5de0989 May 5, 2025 15:20
@JoshuaKGoldberg JoshuaKGoldberg changed the title fix(typescript-eslint): correct TSImportType property name when assert fix(typescript-estree): correct TSImportType property name when assert May 5, 2025
@JoshuaKGoldberg JoshuaKGoldberg merged commit 3c61357 into typescript-eslint:main May 5, 2025
56 checks passed
@overlookmotel overlookmotel deleted the fix-tsimporttype branch May 5, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

Bug: TSImportType's option object always has key with
3 participants