-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(eslint-plugin): [no-deprecated] support computed member access #10867
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): [no-deprecated] support computed member access #10867
Conversation
Thanks for the PR, @azat-io! 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. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
View your CI Pipeline Execution ↗ for commit 3507f62.
☁️ Nx Cloud last updated this comment at |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10867 +/- ##
=======================================
Coverage 90.91% 90.92%
=======================================
Files 499 499
Lines 50808 50841 +33
Branches 8369 8380 +11
=======================================
+ Hits 46194 46227 +33
Misses 4599 4599
Partials 15 15
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
ca1fc1f
to
c715c75
Compare
Rebased. |
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.
Thanks for getting this started! Codecov is surfacing that several logical branches aren't covered by tests - could you please test them?
febc81f
to
2bc22e8
Compare
👋 Just checking in @azat-io, do you still have time for this? |
Yes, sorry for the delay, I'll be back at the end of the week. |
05a7916
to
f19bc3f
Compare
Any feedback? |
Oh I didn't realize this was ready for re-review! We normally wait until the actual Re-Request Review button is pressed. But great, looking now! |
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.
LGTM, thanks!
Just a couple of small notes, nothing we can't apply before merging. Only the removal of isStringLiteral()
is something I think we really need.
f19bc3f
to
8bff4a6
Compare
523b3ea
into
typescript-eslint:main
| datasource | package | from | to | | ---------- | -------------------------------- | ------ | ------ | | npm | @typescript-eslint/eslint-plugin | 8.31.0 | 8.32.1 | | npm | @typescript-eslint/parser | 8.31.0 | 8.32.1 | ## [v8.32.1](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8321-2025-05-12) ##### 🩹 Fixes - **eslint-plugin:** \[consistent-indexed-object-style] check for indirect circular types in aliased mapped types ([#11177](typescript-eslint/typescript-eslint#11177)) - **eslint-plugin:** \[consistent-indexed-object-style] adjust auto-fixer to generate valid syntax for `TSMappedType` with no type annotation ([#11180](typescript-eslint/typescript-eslint#11180)) - **eslint-plugin:** \[no-deprecated] support computed member access ([#10867](typescript-eslint/typescript-eslint#10867)) - **eslint-plugin:** \[no-unnecessary-type-conversion] shouldn't have fixable property ([#11194](typescript-eslint/typescript-eslint#11194)) ##### ❤️ Thank You - Azat S. [@azat-io](https://github.com/azat-io) - Dima Barabash [@dbarabashh](https://github.com/dbarabashh) - Ronen Amiel 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. ## [v8.32.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8320-2025-05-05) ##### 🚀 Features - **eslint-plugin:** \[only-throw-error] add option `allowRethrowing` ([#11075](typescript-eslint/typescript-eslint#11075)) - **eslint-plugin:** \[no-unnecessary-type-conversion] add rule ([#10182](typescript-eslint/typescript-eslint#10182)) ##### 🩹 Fixes - **eslint-plugin:** \[prefer-nullish-coalescing] fix parenthesization bug in suggestion ([#11098](typescript-eslint/typescript-eslint#11098)) - **eslint-plugin:** \[unified-signatures] exempt `this` from optional parameter overload check ([#11005](typescript-eslint/typescript-eslint#11005)) - **eslint-plugin:** \[no-unnecessary-type-parameters] should parenthesize type in suggestion fixer if necessary ([#10907](typescript-eslint/typescript-eslint#10907)) ##### ❤️ Thank You - Andy Edwards - Kirk Waiblinger [@kirkwaiblinger](https://github.com/kirkwaiblinger) - mdm317 - Sasha Kondrashov - 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. ## [v8.31.1](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8311-2025-04-28) ##### 🩹 Fixes - **eslint-plugin:** \[no-unnecessary-condition] downgrade fix to suggestion ([#11081](typescript-eslint/typescript-eslint#11081)) ##### ❤️ Thank You - Kirk Waiblinger [@kirkwaiblinger](https://github.com/kirkwaiblinger) 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.
PR Checklist
Overview
The rule now correctly detects deprecated properties when they are accessed using computed member expressions (
obj['prop']
), variables (const x = 'prop'; obj[x]
).