Skip to content

fix(linter/prefer-class-fields): insert value after type annotation in fixer#15423

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/11-07-fix_linter_prefer-class-fields_insert_value_after_type_annotation_in_fixer
Nov 7, 2025
Merged

fix(linter/prefer-class-fields): insert value after type annotation in fixer#15423
graphite-app[bot] merged 1 commit intomainfrom
c/11-07-fix_linter_prefer-class-fields_insert_value_after_type_annotation_in_fixer

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Nov 7, 2025

Related to #14833

@camc314 camc314 marked this pull request as ready for review November 7, 2025 11:31
Copilot AI review requested due to automatic review settings November 7, 2025 11:31
@camc314 camc314 force-pushed the c/11-07-fix_linter_prefer-class-fields_insert_value_after_type_annotation_in_fixer branch from ac51e73 to 622109b Compare November 7, 2025 11:31
@github-actions github-actions bot added the A-linter Area - Linter label Nov 7, 2025
Copy link
Contributor Author

camc314 commented Nov 7, 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.

@github-actions github-actions bot added the C-bug Category - Bug label Nov 7, 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 fixes a bug in the unicorn/prefer_class_fields rule where it incorrectly placed value assignments when class properties had TypeScript type annotations. The fix now correctly inserts the value after the type annotation rather than after the property key.

  • Updated the insertion logic to account for TypeScript type annotations when adding property values
  • Added a test case to verify the fix works correctly with typed properties

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

@camc314 camc314 force-pushed the c/11-07-fix_linter_prefer-class-fields_insert_value_after_type_annotation_in_fixer branch from 622109b to bcd0a57 Compare November 7, 2025 11:34
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 7, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the c/11-07-fix_linter_prefer-class-fields_insert_value_after_type_annotation_in_fixer branch from bcd0a57 to 85bd19a Compare November 7, 2025 11:40
@graphite-app graphite-app bot merged commit 85bd19a into main Nov 7, 2025
21 checks passed
@graphite-app graphite-app bot deleted the c/11-07-fix_linter_prefer-class-fields_insert_value_after_type_annotation_in_fixer branch November 7, 2025 11:44
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 7, 2025

CodSpeed Performance Report

Merging #15423 will not alter performance

Comparing c/11-07-fix_linter_prefer-class-fields_insert_value_after_type_annotation_in_fixer (85bd19a) with main (29f35b2)1

Summary

✅ 4 untouched
⏩ 33 skipped2

Footnotes

  1. No successful run was found on main (85bd19a) during the generation of this report, so 29f35b2 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 33 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.

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.

2 participants