Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(eslint-plugin): [prefer-optional-chain] only look at left operand forrequireNullish#8559

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

abrahamguo
Copy link
Contributor

@abrahamguoabrahamguo commentedFeb 27, 2024
edited
Loading

PR Checklist

Overview

As mentioned in the linked issue,requireNullish: true wrongly disables all checking for this rule. This is because it mistakenly applies therequireNullish logic to both the left and right operands, rather than only the left.

@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 onhttps://opencollective.com/typescript-eslint.

@netlifyNetlify
Copy link

netlifybot commentedFeb 27, 2024
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit15d7dbc
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/66131281a8d8e2000859235e
😎 Deploy Previewhttps://deploy-preview-8559--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: 93 (🟢 up 2 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 yourNetlify site configuration.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedFeb 27, 2024
edited
Loading

☁️ Nx Cloud Report

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

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 31 targets

Sent with 💌 fromNxCloud.

@codecovCodecov
Copy link

codecovbot commentedFeb 27, 2024
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.24%. Comparing base(716b783) to head(fd2b38f).
Report is 18 commits behind head on main.

❗ Current headfd2b38f differs from pull request most recent head15d7dbc. Consider uploading reports for the commit15d7dbc to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@##             main    #8559      +/-   ##==========================================- Coverage   88.02%   87.24%   -0.78%==========================================  Files         405      252     -153       Lines       14089    12344    -1745       Branches     4125     3882     -243     ==========================================- Hits        12402    10770    -1632+ Misses       1382     1305      -77+ Partials      305      269      -36
FlagCoverage Δ
unittest87.24% <100.00%> (-0.78%)⬇️

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

FilesCoverage Δ
.../rules/prefer-optional-chain-utils/analyzeChain.ts100.00% <100.00%> (ø)
...efer-optional-chain-utils/checkNullishAndReport.ts100.00% <100.00%> (ø)
...efer-optional-chain-utils/gatherLogicalOperands.ts100.00% <ø> (ø)
...s/eslint-plugin/src/rules/prefer-optional-chain.ts97.61% <100.00%> (+0.05%)⬆️

... and176 files with indirect coverage changes

Copy link
Member

@auvredauvred left a comment
edited
Loading

Choose a reason for hiding this comment

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

I haven't looked deep into the source code of the rule yet, so I can't suggest any complete solutions. Requesting changes to prevent one potential bug and to improve the tests.


It also looks like you linked the wrong issue in the PR description. I believe you should link this one:#8487. Right?

abrahamguo reacted with thumbs up emoji
@auvredauvred added the awaiting responseIssues waiting for a reply from the OP or another party labelFeb 27, 2024
@github-actionsgithub-actionsbot removed the awaiting responseIssues waiting for a reply from the OP or another party labelMar 12, 2024
@abrahamguoabrahamguo requested a review fromauvredMarch 12, 2024 12:38
@auvredauvred added the awaiting responseIssues waiting for a reply from the OP or another party labelMar 12, 2024
@abrahamguoabrahamguo requested a review fromauvredMarch 13, 2024 22:56
@github-actionsgithub-actionsbot removed the awaiting responseIssues waiting for a reply from the OP or another party labelMar 13, 2024
Copy link
Member

@auvredauvred left a comment

Choose a reason for hiding this comment

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

The overall code changes look great to me! Although, I haven't gotten deep enough into the rule code to 100% understand the logic yet. I'll try to take the time to figure out how it works internally, and then I can do a more thorough review 🙂

@auvredauvred added the awaiting responseIssues waiting for a reply from the OP or another party labelMar 16, 2024
@abrahamguoabrahamguo requested a review fromauvredMarch 16, 2024 13:41
@github-actionsgithub-actionsbot removed the awaiting responseIssues waiting for a reply from the OP or another party labelMar 16, 2024
@bradzacherbradzacher added the bugSomething isn't working labelApr 4, 2024
Copy link
Member

@auvredauvred left a comment

Choose a reason for hiding this comment

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

Mostly LGTM!

But there is conflict withmain branch inpackages/eslint-plugin/src/rules/prefer-optional-chain-utils/analyzeChain.ts file. Could you please resolve it?

abrahamguo reacted with thumbs up emoji
@auvredauvred added the awaiting responseIssues waiting for a reply from the OP or another party labelApr 6, 2024
@abrahamguoabrahamguo requested a review fromauvredApril 7, 2024 17:25
@github-actionsgithub-actionsbot removed the awaiting responseIssues waiting for a reply from the OP or another party labelApr 7, 2024
Copy link
Member

@auvredauvred left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for working on this 🚀

@auvredauvred added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelApr 8, 2024
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

LGTM!

Since@bradzacher touched a ton of this stuff in#6397, will wait for a bit in case Brad has time to review.

@JoshuaKGoldbergJoshuaKGoldberg merged commiteef257b intotypescript-eslint:mainApr 22, 2024
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsApr 30, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg approved these changes

@auvredauvredauvred approved these changes

Assignees
No one assigned
Labels
1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we mergebugSomething isn't working
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Bug: [prefer-optional-chain] doesn't report at all whenrequireNullish istrue
4 participants
@abrahamguo@JoshuaKGoldberg@auvred@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp