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-chan] allow typeof for avoiding reference error #8472

Merged
merged 4 commits into from Feb 23, 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 Feb 14, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 824f620
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/65d761a54ff0ed0008f19e01
😎 Deploy Preview https://deploy-preview-8472--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 9 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

codecov bot commented Feb 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f825426) 86.89% compared to head (824f620) 86.90%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8472   +/-   ##
=======================================
  Coverage   86.89%   86.90%           
=======================================
  Files         250      250           
  Lines       12201    12208    +7     
  Branches     3852     3854    +2     
=======================================
+ Hits        10602    10609    +7     
  Misses       1332     1332           
  Partials      267      267           
Flag Coverage Δ
unittest 86.90% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
...efer-optional-chain-utils/gatherLogicalOperands.ts 100.00% <100.00%> (ø)
...s/eslint-plugin/src/rules/prefer-optional-chain.ts 97.56% <ø> (ø)

@yeonjuan yeonjuan force-pushed the fix#7478 branch 3 times, most recently from 6c2ce5a to 770c340 Compare February 14, 2024 15:11
@yeonjuan yeonjuan changed the title fix(eslint-plugin): [prefer-optional-chan] handle when typeof is used to avoid reference error fix(eslint-plugin): [prefer-optional-chan] allow typeof for avoiding reference error Feb 14, 2024
@yeonjuan yeonjuan marked this pull request as ready for review February 14, 2024 15:12
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.

Rachel Brosnahan as Mrs. Maisel in sailors getup on a ship with a drink, leaning back against a railing happily and speaking. Caption: "THIS IS GLORIOUS"

@JoshuaKGoldberg JoshuaKGoldberg merged commit c1441c8 into typescript-eslint:main Feb 23, 2024
57 of 59 checks passed
@JoshuaKGoldberg
Copy link
Member

D'OH the rule name in the PR title... oops

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: [prefer-optional-chain] don't report on typeof checks for globals
2 participants