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

Plans to sort other things? #3

Open
dsernst opened this issue Oct 12, 2015 · 3 comments
Open

Plans to sort other things? #3

dsernst opened this issue Oct 12, 2015 · 3 comments

Comments

@dsernst
Copy link
Contributor

dsernst commented Oct 12, 2015

This plugin is awesome. Have you considered renaming it to eslint-plugin-sort-object-props, instead of the unnecessary nesting? It might make it easier to find. Or do you plan to add other sorting rules?

Thanks again for this, it's great!

@dsernst dsernst changed the title Plans to sort other things Plans to sort other things? Oct 12, 2015
@jacobrask
Copy link
Owner

I think that the same personality wanting to sort props will probably like to sort things like import/require :-)

Since you can pick and choose rules in eslint I think it makes sense to keep it in the same project.

@dsernst
Copy link
Contributor Author

dsernst commented Oct 13, 2015

Interesting, I hadn't considered that. Thank you for sharing.

To offer a little more context, I plan to add this rule to our teams
workflow, where we use the config module from npm. We have various config
files for different environments with objects that can get hundreds of
lines long. This makes it very challenging to find a particular setting
without resorting to Cmd + F. So in our case, sorting the object props is
more about practically than pure aesthetics.

In any case, thanks for publishing this plugin— it's the perfect solution!

On Monday, October 12, 2015, Jacob Rask [email protected] wrote:

I think that the same personality wanting to sort props will probably like
to sort things like import/require :-)

Since you can pick and choose rules in eslint I think it makes sense to
keep it in the same project.


Reply to this email directly or view it on GitHub
#3 (comment)
.

David Ernst

@karlhorky
Copy link

Sorting for ES2015 destructuring assignment would also be nice:

const {
  type,  // <-- error
  count,
  items
} = results;

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

No branches or pull requests

3 participants