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): [prefer-optional-chain] collect MetaProperty type #6083

Merged
merged 4 commits into from Nov 29, 2022
Merged

fix(eslint-plugin): [prefer-optional-chain] collect MetaProperty type #6083

merged 4 commits into from Nov 29, 2022

Conversation

YuseiUeno
Copy link
Contributor

@YuseiUeno YuseiUeno commented Nov 25, 2022

PR Checklist

Overview

Fix prefer-optional-chain cannot collect MetaProperty type bug

@nx-cloud
Copy link

nx-cloud bot commented Nov 25, 2022

☁️ Nx Cloud Report

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

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 from NxCloud.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @YuseiUeno!

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.

@netlify
Copy link

netlify bot commented Nov 25, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit eadef41
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/63865648e1cdd6000906b688
😎 Deploy Preview https://deploy-preview-6083--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@codecov
Copy link

codecov bot commented Nov 25, 2022

Codecov Report

Merging #6083 (d01801d) into main (76aacc0) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head d01801d differs from pull request most recent head eadef41. Consider uploading reports for the commit eadef41 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6083   +/-   ##
=======================================
  Coverage   91.27%   91.27%           
=======================================
  Files         366      366           
  Lines       12417    12419    +2     
  Branches     3631     3632    +1     
=======================================
+ Hits        11333    11335    +2     
  Misses        774      774           
  Partials      310      310           
Flag Coverage Δ
unittest 91.27% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...s/eslint-plugin/src/rules/prefer-optional-chain.ts 98.63% <100.00%> (+0.01%) ⬆️

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.

Looks great so far, thanks!

Could you please also add an invalid test case to make sure meta properties work for the rule reporting complaints?

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Nov 25, 2022
@YuseiUeno
Copy link
Contributor Author

I'm late but I fixed it

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.

Looks great, thanks for this @YuseiUeno! 🙌

I added a few tests at the end - didn't want to bug you about them, since they're just small edge cases. 😄

@JoshuaKGoldberg JoshuaKGoldberg enabled auto-merge (squash) November 29, 2022 18:58
@JoshuaKGoldberg JoshuaKGoldberg merged commit d7114d3 into typescript-eslint:main Nov 29, 2022
@YuseiUeno
Copy link
Contributor Author

Thank you for adding test cases :)

@YuseiUeno YuseiUeno deleted the 6000-fix_pref_opt_chain_meta branch November 30, 2022 00:43
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting response Issues waiting for a reply from the OP or another party
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: [prefer-optional-chain] Crashes when parsing an import.meta member with both the || and ! operators
3 participants