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

Rule proposal: Sort defaultProps static property #281

Closed
roadhump opened this issue Oct 30, 2015 · 4 comments
Closed

Rule proposal: Sort defaultProps static property #281

roadhump opened this issue Oct 30, 2015 · 4 comments

Comments

@roadhump
Copy link

It would be nice to force the same order for propTypes and defaultProps inside class. New rule for this seems like the copy of jsx-sort-prop-types, so probably it would be better to extend jsx-sort-prop-types to apply to defaultProps.

@b0gok
Copy link
Contributor

b0gok commented Oct 12, 2017

@roadhump it's a very good proposal! 👍
@lencioni should it be a separate rule or just extension for jsx-sort-prop-types?

@ljharb
Copy link
Member

ljharb commented Oct 12, 2017

@b0gok A separate rule, that ideally shares code. A rule called "sort prop types" wouldn't make sense applied to default props - so maybe jsx-sort-default-props

@b0gok
Copy link
Contributor

b0gok commented Oct 15, 2017

@ljharb ok, I'll try to implement it

@ljharb
Copy link
Member

ljharb commented Jan 16, 2018

Fixed in #1483.

@ljharb ljharb closed this as completed Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants