Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
fix(eslint-plugin): [no-unnecessary-condition] don't report on unnecessary optional array index access whennoUncheckedIndexedAccess is enabled#10961
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks for the PR,@ronami! 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. |
netlifybot commentedMar 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview fortypescript-eslint ready!
To edit notification comments on pull requests, go to yourNetlify site configuration. |
nx-cloudbot commentedMar 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
View yourCI Pipeline Execution ↗ for commite3a479c.
☁️Nx Cloud last updated this comment at |
codecovbot commentedMar 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## main #10961 +/- ##==========================================+ Coverage 87.58% 87.97% +0.38%========================================== Files 470 470 Lines 16095 16710 +615 Branches 4668 4711 +43 ==========================================+ Hits 14097 14700 +603- Misses 1642 1664 +22+ Partials 356 346 -10
Flags with carried forward coverage won't be shown.Click here to find out more.
🚀 New features to boost your workflow:
|
noUncheckedIndexedAccess is enablednoUncheckedIndexedAccess is enabled
JoshuaKGoldberg left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice and clean! 🧹
Uh oh!
There was an error while loading.Please reload this page.
kirkwaiblinger left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This looks great!! I definitely like the behavior that the test cases demonstrate 🙂
3241e46 intotypescript-eslint:mainUh oh!
There was an error while loading.Please reload this page.

Uh oh!
There was an error while loading.Please reload this page.
PR Checklist
noUncheckedIndexedAccessis enabled #10960Overview
This PR addresses#10960 and disablesthe special-casing of optional array index access when
noUncheckedIndexedAccessis enabled.This makes the rule report cases like the following:
Note that this also causes the rule to report on unnecessary optional index access that's deeper in the chain (only when
noUncheckedIndexedAccessis turned on):I've added a couple of tests to verify the rule handles these cases correctly when
noUncheckedIndexedAccessis enabled.