Skip to content

Comments

test(no-useless-default-assignment): add issue #727 regression#729

Closed
camc314 wants to merge 1 commit intomainfrom
c/02-22-test_no-useless-default-assignment_add_issue_727_regression
Closed

test(no-useless-default-assignment): add issue #727 regression#729
camc314 wants to merge 1 commit intomainfrom
c/02-22-test_no-useless-default-assignment_add_issue_727_regression

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Feb 22, 2026

No description provided.

Copy link
Contributor Author

camc314 commented Feb 22, 2026


How to use the Graphite Merge Queue

Add the label 0-merge to this PR to add it to the merge queue.

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 marked this pull request as ready for review February 22, 2026 15:20
Copilot AI review requested due to automatic review settings February 22, 2026 15:20
Copy link

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 a regression test for issue #727 to the no-useless-default-assignment rule. The test verifies that the rule correctly detects and fixes useless default assignments when destructuring properties that are never nullish.

Changes:

  • Added a new invalid test case that creates a config object with a rules property of type {}, then destructures it with a redundant default value
  • Updated the snapshot file to include the expected diagnostic output for the new test case

Reviewed changes

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

File Description
internal/rules/no_useless_default_assignment/no_useless_default_assignment_test.go Adds test case demonstrating that the rule correctly identifies useless default assignment when destructuring a property with type {}
internal/rule_tester/snapshots/no-useless-default-assignment.snap Updates snapshot with expected diagnostic output showing the rule detects the useless default at line 4, column 25-26

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

@camc314 camc314 closed this Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant