Skip to content

fix(linter/no-unused-private-class-members): handle sequence expression correctly#17127

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/12-19-fix_linter_handle_sequence_expression_in_no-unused-private-class-members
Dec 19, 2025
Merged

fix(linter/no-unused-private-class-members): handle sequence expression correctly#17127
graphite-app[bot] merged 1 commit intomainfrom
c/12-19-fix_linter_handle_sequence_expression_in_no-unused-private-class-members

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Dec 19, 2025

Closes #17121

@camc314 camc314 self-assigned this Dec 19, 2025
@github-actions github-actions bot added A-linter Area - Linter C-bug Category - Bug labels Dec 19, 2025
Copy link
Contributor Author

camc314 commented Dec 19, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@camc314 camc314 changed the title fix(linter): handle sequence expression in no-unused-private-class-members fix(linter/no-unused-private-class-members): handle sequence expression correctly Dec 19, 2025
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 19, 2025
@camc314 camc314 marked this pull request as ready for review December 19, 2025 12:50
Copilot AI review requested due to automatic review settings December 19, 2025 12:50
Copy link
Contributor Author

camc314 commented Dec 19, 2025

Merge activity

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the handling of sequence expressions in the no-unused-private-class-members linter rule. Previously, private class members accessed within sequence expressions (e.g., (0, this.#field)) were incorrectly flagged as unused.

Key changes:

  • Added AstKind::SequenceExpression(_) to the list of value contexts where private members are considered "read"
  • Added a test case validating that private members used in sequence expressions are properly recognized as being used

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 19, 2025

CodSpeed Performance Report

Merging #17127 will not alter performance

Comparing c/12-19-fix_linter_handle_sequence_expression_in_no-unused-private-class-members (e42b6f9) with main (b87600a)

Summary

✅ 4 untouched
⏩ 41 skipped1

Footnotes

  1. 41 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@graphite-app graphite-app bot force-pushed the c/12-19-fix_linter_handle_sequence_expression_in_no-unused-private-class-members branch from e42b6f9 to bfd4a1e Compare December 19, 2025 12:56
@graphite-app graphite-app bot merged commit bfd4a1e into main Dec 19, 2025
20 checks passed
@graphite-app graphite-app bot deleted the c/12-19-fix_linter_handle_sequence_expression_in_no-unused-private-class-members branch December 19, 2025 13:01
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linter: no-unused-private-class-members does not detect (0, this.#method)() indirect calls

2 participants