Skip to content

feat(linter): auto-fixer for prefer-destructuring#17235

Merged
camc314 merged 2 commits intooxc-project:mainfrom
hamirmahal:feat-linter/auto-fix-for-some-prefer-destructuring-cases
Dec 22, 2025
Merged

feat(linter): auto-fixer for prefer-destructuring#17235
camc314 merged 2 commits intooxc-project:mainfrom
hamirmahal:feat-linter/auto-fix-for-some-prefer-destructuring-cases

Conversation

@hamirmahal
Copy link
Contributor

Closes #17234

Copilot AI review requested due to automatic review settings December 21, 2025 21:16
@hamirmahal hamirmahal requested a review from camc314 as a code owner December 21, 2025 21:16
@github-actions github-actions bot added A-linter Area - Linter C-enhancement Category - New feature or request labels Dec 21, 2025
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 adds auto-fix functionality for the prefer-destructuring linter rule, enabling automatic conversion of member access patterns to destructuring syntax.

Key changes:

  • Changed rule status from pending to fix to enable auto-fixing
  • Implemented auto-fix logic for object destructuring in both assignment expressions and variable declarations
  • Enabled previously commented-out fix tests

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

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 21, 2025

CodSpeed Performance Report

Merging #17235 will not alter performance

Comparing hamirmahal:feat-linter/auto-fix-for-some-prefer-destructuring-cases (8d4eb52) with main (a15e183)

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.

@hamirmahal hamirmahal force-pushed the feat-linter/auto-fix-for-some-prefer-destructuring-cases branch from 044c8f1 to a37d072 Compare December 21, 2025 21:28
@hamirmahal hamirmahal requested a review from Copilot December 21, 2025 21:29
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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


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

@hamirmahal hamirmahal force-pushed the feat-linter/auto-fix-for-some-prefer-destructuring-cases branch from a37d072 to 48a6cc5 Compare December 21, 2025 22:41
@hamirmahal hamirmahal requested a review from Copilot December 21, 2025 22:41
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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


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

@camc314 camc314 self-assigned this Dec 22, 2025
Copy link
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

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

Thank you!

@camc314 camc314 merged commit a5ef127 into oxc-project:main Dec 22, 2025
19 checks passed
@hamirmahal hamirmahal deleted the feat-linter/auto-fix-for-some-prefer-destructuring-cases branch December 23, 2025 05:40
@hamirmahal
Copy link
Contributor Author

You're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linter: add auto-fix for some cases for eslint(prefer-destructuring): Use Object destructuring.

3 participants