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

Make jsx-sort-default-props fixable #2429

Merged
merged 1 commit into from
Oct 4, 2019
Merged

Make jsx-sort-default-props fixable #2429

merged 1 commit into from
Oct 4, 2019

Conversation

emroussel
Copy link
Contributor

There didn't seem to be a reason for not fixing jsx-sort-default-props automatically.

Most of this code is copy and pasted from sort-prop-types. It might be good to abstract it somewhere so that it's not duplicated, but I wasn't sure where that should be. If you agree, feel free to point me to where these type of reusable functions usually live, and I'll move them there.

Should fix #2347.

@ljharb
Copy link
Member

ljharb commented Oct 2, 2019

Thanks, this is great! https://github.com/yannickcr/eslint-plugin-react/tree/master/lib/util seems like a good place to put it.

@emroussel
Copy link
Contributor Author

@ljharb done 👍

lib/util/propTypesSort.js Show resolved Hide resolved
lib/util/propTypesSort.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[feature] react/jsx-sort-default-props is not fixable ?
2 participants