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

feat(eslint-plugin): [no-unsafe-member-access] add allowOptionalChaining option#11659

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

Conversation

JoshuaKGoldberg
Copy link
Member

PR Checklist

Overview

This was a little tricker than I'd hoped. The AST positionsChainExpressions as the parent of allMemberExpressions in the chain, rather than inline in the stack. This PR modifies the node checker to have a thirdState,State.Chained, to save for nodes.

This results in an edge case where if you have an optional property in the middle of a stack ofanyMemberExpressions (value.outer?.middle.inner), the rule reports twice. I don't think this is a very common use case that we need to optimize for.

💖

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@JoshuaKGoldberg!

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 commentedSep 29, 2025
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commita9df1da
🔍 Latest deploy loghttps://app.netlify.com/projects/typescript-eslint/deploys/68e3b0ca91bb0f00080cdc2b
😎 Deploy Previewhttps://deploy-preview-11659--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: 96 (🟢 up 18 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (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 project configuration.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedSep 29, 2025
edited
Loading

View yourCI Pipeline Execution ↗ for commita9df1da

CommandStatusDurationResult
nx test eslint-plugin --coverage=false✅ Succeeded4m 56sView ↗
nx run-many -t lint✅ Succeeded3m 8sView ↗
nx run-many -t typecheck✅ Succeeded2m 10sView ↗
nx test eslint-plugin-internal --coverage=false✅ Succeeded4sView ↗
nx run types:build✅ Succeeded5sView ↗
nx run integration-tests:test✅ Succeeded5sView ↗
nx test typescript-estree --coverage=false✅ Succeeded2sView ↗
nx run generate-configs✅ Succeeded8sView ↗
Additional runs (29)✅ Succeeded...View ↗

☁️Nx Cloud last updated this comment at2025-10-06 12:18:26 UTC

@codecovCodecov
Copy link

codecovbot commentedSep 29, 2025
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.74%. Comparing base (7f5fed7) to head (a9df1da).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@##             main   #11659   +/-   ##=======================================  Coverage   90.74%   90.74%           =======================================  Files         516      516             Lines       51987    52013   +26       Branches     8588     8594    +6     =======================================+ Hits        47174    47200   +26  Misses       4799     4799             Partials       14       14
FlagCoverage Δ
unittest90.74% <100.00%> (+<0.01%)⬆️

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

Files with missing linesCoverage Δ
...eslint-plugin/src/rules/no-unsafe-member-access.ts100.00% <100.00%> (ø)
🚀 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.

@JoshuaKGoldbergJoshuaKGoldberg marked this pull request as ready for reviewSeptember 29, 2025 15:00
ronami
ronami previously approved these changesSep 30, 2025
Copy link
Member

@ronamironami left a comment

Choose a reason for hiding this comment

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

🚀

@ronamironami added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelSep 30, 2025
@JoshuaKGoldbergJoshuaKGoldberg merged commitf083798 intotypescript-eslint:mainOct 6, 2025
63 of 66 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ronamironamironami left review comments

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 merge
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[no-unsafe-member-access] Add exception for optional chaining
2 participants
@JoshuaKGoldberg@ronami

[8]ページ先頭

©2009-2025 Movatter.jp