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): [dot-notation] handle noPropertyAccessFromIndexSignature true#10644
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,@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 onhttps://opencollective.com/typescript-eslint. |
netlifybot commentedJan 13, 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 commentedJan 13, 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 commit2894e85.
☁️Nx Cloud last updated this comment at |
4a69ff9
to39e76a9
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
@kirkwaiblinger Thanks! I've fixed!41025ca |
codecovbot commentedJan 20, 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 #10644 +/- ##==========================================+ Coverage 87.15% 87.26% +0.11%========================================== Files 448 450 +2 Lines 15576 15718 +142 Branches 4551 4601 +50 ==========================================+ Hits 13575 13717 +142 Misses 1645 1645 Partials 356 356
Flags with carried forward coverage won't be shown.Click here to find out more.
|
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.
one testing request but looks good to me!
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.
(testing)
Let's add a test case that involves generics as well. I was playing with
typeExtraKey= `extra${string}`;typeStructureWithExtras={foo:string;bar:boolean;[extraKey:ExtraKey]:number;}functionf<TextendsStructureWithExtras>(x:T){console.log(x['extraAbc']);}
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.
@kirkwaiblinger sure!2894e85
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 work! Thanks for sending this in! 🙂
3e44913
intotypescript-eslint:mainUh oh!
There was an error while loading.Please reload this page.
| datasource | package | from | to || ---------- | -------------------------------- | ------ | ------ || npm | @typescript-eslint/eslint-plugin | 8.22.0 | 8.23.0 || npm | @typescript-eslint/parser | 8.22.0 | 8.23.0 |## [v8.23.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8230-2025-02-03)##### 🚀 Features- **eslint-plugin:** \[no-unnecessary-boolean-literal-compare] enforce strictNullChecks ([#10712](typescript-eslint/typescript-eslint#10712))##### 🩹 Fixes- **eslint-plugin:** \[no-shadow] ignore declare variables in definition files shadowing global variables ([#10710](typescript-eslint/typescript-eslint#10710))- **eslint-plugin:** \[no-restricted-imports] support regex option ([#10699](typescript-eslint/typescript-eslint#10699))- **eslint-plugin:** \[dot-notation] handle noPropertyAccessFromIndexSignature true ([#10644](typescript-eslint/typescript-eslint#10644))- **eslint-plugin:** \[prefer-nullish-coalescing] fix missing return ([#10732](typescript-eslint/typescript-eslint#10732))- bump ts-api-utils to ^2.0.1 ([#10761](typescript-eslint/typescript-eslint#10761))- **eslint-plugin:** \[no-unnecessary-template-expression] allow interpolating type parameter in type context ([#10739](typescript-eslint/typescript-eslint#10739))- **eslint-plugin:** \[switch-exhaustiveness-check] suggest with qualified name ([#10697](typescript-eslint/typescript-eslint#10697))- **eslint-plugin:** \[no-unnecessary-type-assertion] should report readonly class properties with a literal initializer ([#10618](typescript-eslint/typescript-eslint#10618))##### ❤️ Thank You- Josh Goldberg ✨- Olivier Zalmanski [@OlivierZal](https://github.com/OlivierZal)- Ryan Poon [@sopa301](https://github.com/sopa301)- YeonJuan [@yeonjuan](https://github.com/yeonjuan)- Yukihiro Hasegawa [@y-hsgw](https://github.com/y-hsgw)You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
| datasource | package | from | to || ---------- | -------------------------------- | ------ | ------ || npm | @typescript-eslint/eslint-plugin | 8.22.0 | 8.23.0 || npm | @typescript-eslint/parser | 8.22.0 | 8.23.0 |## [v8.23.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8230-2025-02-03)##### 🚀 Features- **eslint-plugin:** \[no-unnecessary-boolean-literal-compare] enforce strictNullChecks ([#10712](typescript-eslint/typescript-eslint#10712))##### 🩹 Fixes- **eslint-plugin:** \[no-shadow] ignore declare variables in definition files shadowing global variables ([#10710](typescript-eslint/typescript-eslint#10710))- **eslint-plugin:** \[no-restricted-imports] support regex option ([#10699](typescript-eslint/typescript-eslint#10699))- **eslint-plugin:** \[dot-notation] handle noPropertyAccessFromIndexSignature true ([#10644](typescript-eslint/typescript-eslint#10644))- **eslint-plugin:** \[prefer-nullish-coalescing] fix missing return ([#10732](typescript-eslint/typescript-eslint#10732))- bump ts-api-utils to ^2.0.1 ([#10761](typescript-eslint/typescript-eslint#10761))- **eslint-plugin:** \[no-unnecessary-template-expression] allow interpolating type parameter in type context ([#10739](typescript-eslint/typescript-eslint#10739))- **eslint-plugin:** \[switch-exhaustiveness-check] suggest with qualified name ([#10697](typescript-eslint/typescript-eslint#10697))- **eslint-plugin:** \[no-unnecessary-type-assertion] should report readonly class properties with a literal initializer ([#10618](typescript-eslint/typescript-eslint#10618))##### ❤️ Thank You- Josh Goldberg ✨- Olivier Zalmanski [@OlivierZal](https://github.com/OlivierZal)- Ryan Poon [@sopa301](https://github.com/sopa301)- YeonJuan [@yeonjuan](https://github.com/yeonjuan)- Yukihiro Hasegawa [@y-hsgw](https://github.com/y-hsgw)You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
Uh oh!
There was an error while loading.Please reload this page.
PR Checklist
noPropertyAccessFromIndexSignature
and extra (constrained) object keys #10627Overview
It addresses#10627 in the way mentioned in#10627 (comment)