Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

azat-io
Copy link
Contributor

@azat-io azat-io commented Feb 22, 2025

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]).

@typescript-eslint
Copy link
Contributor

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.

Copy link

netlify bot commented Feb 22, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit f19bc3f
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/680512b1d9258400083b83e0
😎 Deploy Preview https://deploy-preview-10867--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: 99 (🟢 up 3 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (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 your Netlify site configuration.

Copy link

nx-cloud bot commented Feb 22, 2025

View your CI Pipeline Execution ↗ for commit f19bc3f.

Command Status Duration Result
nx typecheck ast-spec ✅ Succeeded <1s View ↗
nx run-many --target=build --exclude website --... ✅ Succeeded 2s View ↗
nx run-many --target=clean ✅ Succeeded 10s View ↗

☁️ Nx Cloud last updated this comment at 2025-04-21 13:52:13 UTC

Copy link

codecov bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.83%. Comparing base (f30a20e) to head (f19bc3f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10867   +/-   ##
=======================================
  Coverage   90.82%   90.83%           
=======================================
  Files         497      497           
  Lines       50204    50240   +36     
  Branches     8274     8285   +11     
=======================================
+ Hits        45600    45636   +36     
  Misses       4589     4589           
  Partials       15       15           
Flag Coverage Δ
unittest 90.83% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
packages/eslint-plugin/src/rules/no-deprecated.ts 96.98% <100.00%> (+0.36%) ⬆️
🚀 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.

@azat-io azat-io force-pushed the fix/no-deprecated-objects branch from ca1fc1f to c715c75 Compare February 24, 2025 20:41
@azat-io
Copy link
Contributor Author

azat-io commented Feb 24, 2025

Rebased.

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a 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?

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Mar 2, 2025
@azat-io azat-io force-pushed the fix/no-deprecated-objects branch 2 times, most recently from febc81f to 2bc22e8 Compare March 2, 2025 12:27
@JoshuaKGoldberg
Copy link
Member

👋 Just checking in @azat-io, do you still have time for this?

@JoshuaKGoldberg JoshuaKGoldberg added the stale PRs or Issues that are at risk of being or have been closed due to inactivity for a prolonged period label Apr 7, 2025
@azat-io
Copy link
Contributor Author

azat-io commented Apr 8, 2025

Yes, sorry for the delay, I'll be back at the end of the week.

@azat-io azat-io force-pushed the fix/no-deprecated-objects branch 3 times, most recently from fc38c1d to 05a7916 Compare April 20, 2025 13:35
@azat-io azat-io force-pushed the fix/no-deprecated-objects branch from 05a7916 to f19bc3f Compare April 20, 2025 15:28
@JoshuaKGoldberg JoshuaKGoldberg removed the stale PRs or Issues that are at risk of being or have been closed due to inactivity for a prolonged period label Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response Issues waiting for a reply from the OP or another party
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: [no-deprecated] doesn't report deprecated type index access
2 participants