Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort with defaults #215

Merged
merged 5 commits into from
Feb 15, 2023
Merged

Sort with defaults #215

merged 5 commits into from
Feb 15, 2023

Conversation

ianobermiller
Copy link
Contributor

@ianobermiller ianobermiller commented Jan 19, 2023

Fixes #18 by allowing sort when properties have a default, as long as none of the identifiers in the default match one of the properties being destructured. Besides the tests here, we also ran this on a 10k+ file codebase here at Netflix and found zero issues.

Fixes mthadley#18 by allowing sort when properties have a default, as long as none of the identifiers in the default match one of the properties being destructured.
Copy link
Owner

@mthadley mthadley left a comment

Choose a reason for hiding this comment

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

Thanks, @ianobermiller!

This is looking great, and it's encouraging to hear that it's already working on a large codebase without any problems. Left a few comments for cleanup, after which we can get this merged.

Break out functions. adjust switch. rename var in tests
@mthadley mthadley merged commit 1d12340 into mthadley:master Feb 15, 2023
@mthadley
Copy link
Owner

Thanks again for the contribution!

These changes have been published in v1.5.0.

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.

Default Values prevent warning
2 participants