Repository navigation
fix(lint/no-deprecated): don't check element access keys as separate identifiers - #1212
Merged
Merged
Conversation
Codex Review Summary: âś… CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change to skip separate identifier checks for element-access keys.
No open issues 🎉
What changed in this PR
Updates no-deprecated to avoid checking element-access key identifiers separately, aligning the lint rule with upstream tsgolint behavior while preserving diagnostics for deprecated properties.
Changes:
- Skips standalone identifier checks for element-access keys, including parenthesized keys.
- Adds baseline cases for deprecated keys and properties, and updates upstream tracking to
171becb5.
| File | Description |
|---|---|
crates/​tsrs_lint/​tests/​baselines/​PROGRESS.md |
Records the updated upstream revision for no-deprecated. |
crates/​tsrs_lint/​tests/​baselines/​no-deprecated/​REFERENCE |
Pins the baseline’s tsgolint reference commit. |
crates/​tsrs_lint/​tests/​baselines/​no-deprecated/​baseline.json |
Covers skipped key diagnostics and retained property diagnostics. |
crates/​tsrs_lint/​src/​rules/​no_deprecated.rs |
Skips separate identifier checks for element-access keys. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports oxc-project/tsgolint#1461 (
171becb5), including its baseline update.An identifier used as an element access key was checked twice, once for the accessed property and again as an ordinary identifier, so a deprecated key variable was reported even when it selected a current property, and a deprecated property got a second diagnostic on the key. Like typescript-eslint, which skips computed member keys in its identifier listener and leaves them to the member check, these keys are now skipped, including through parentheses.