-
Notifications
You must be signed in to change notification settings - Fork 31
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 for sort JSX props #66
Comments
Hi, thanks for writing up the feature request. I'm a little hesitant to add rules for formatting concerns rather than for actual problems, now that Prettier is the most common way to do formatting, but if there's significant demand then that could change. Have you tried enabling |
Hi, thank you for the quick response. I agree to delegate the responsibility of style rules to prettier, however, I found an old issue that states it is not possible prettier/prettier#323, I don't know if that still holds true today. Regarding the react rule, it works well, but solid has some minor differences in terms of event listeners naming, apparently sort gets confused a bit. Also, I am not very fond of the idea of installing a react rule in a solid project. |
Okay, I guess once this rule is ported it wouldn't be much of a maintenance burden, so I'm opening up to adding it, off by default. I'm sure people would find value in it. Perhaps a simplified, opinionated version without all the options since they greatly expand the number of tests required. Can you provide specifics and/or examples on how |
Wouldn't this be best served by an existing plugin that specializes in sorting, like |
Describe the need
I want to sort JSX props based on several options, this can improve readability and keeps solid specific props in order, just like eslint-plugin-react does
Suggested Solution
Create a rule to sort props which will consider refs, directives, asc/desc order, multiline props and callbacks
The text was updated successfully, but these errors were encountered: