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-imports autofixer #547

Closed
eelyafi opened this issue Sep 7, 2016 · 12 comments
Closed

Sort-imports autofixer #547

eelyafi opened this issue Sep 7, 2016 · 12 comments

Comments

@eelyafi
Copy link
Contributor

eelyafi commented Sep 7, 2016

It is nice to have autofixer for imports order.
In eslint plugin from Pinterest we already have sort-imports autofixer. Chris Lloyd mentioned that you guys might be interested in it.
https://github.com/pinterest-web/eslint-plugin-pinterest/blob/master/lib/rules/sort-imports.js

@benmosher
Copy link
Member

Thanks for the heads up! We've been talking about this for a while.

@magicmark
Copy link

@eelyafi the link is now dead - is there an updated url?

@eelyafi
Copy link
Contributor Author

eelyafi commented Aug 2, 2017

@magicmark the public link is dead, but the code lives inside Pinterest. Why ?

@ljharb
Copy link
Member

ljharb commented Aug 2, 2017

@eelyafi why was it un-open-sourced?

@eelyafi
Copy link
Contributor Author

eelyafi commented Aug 2, 2017

May be @arthuralee or @chrislloyd knows ?

@chrislloyd
Copy link
Contributor

We moved our linters away from the semi-public (but not officially sanctioned) GitHub org. Most of the linters were for our old (now defunct) web framework and unfortunately I think @eelyafi's sort-imports was caught up :( No real reason, we'd be happy to share.

@eelyafi
Copy link
Contributor Author

eelyafi commented Aug 2, 2017

@ljharb do you want me to share the source code ?

@ljharb
Copy link
Member

ljharb commented Aug 2, 2017

@chrislloyd @eelyafi i was more interested in following your config overrides, and custom rules (that might be good candidates for upstreaming).

Regardless it'd be great to attach a gist here of sort-imports for posterity :-)

@arthuralee
Copy link

arthuralee commented Aug 2, 2017

Only a couple of our rules would be relevant today - sort-imports being one of them. The rest of them are very specific to an in-house web framework we have now deprecated. As for the config- happy to post a gist of what we are overriding 😄
Config: https://gist.github.com/arthuralee/913e107c9ac0772d3458e432e8506caa
Sort-imports: https://gist.github.com/arthuralee/a1cb30047fbfa6adc8711214fc28f0a8

@magicmark
Copy link

magicmark commented Aug 2, 2017

@eelyafi @arthuralee thanks so much for this. I'll take a look!

for context I'm looking for ways that we can --fix (or equivalent functionality) the ordering of *all* of our ES6 imports.

https://github.com/renke/import-sort provides the best coverage that I've found so far, but I'm eager do this in a way that doesn't rely on keeping two sets of import rules in sync (for linting and fixing)

(maybe #711 is what I want)

@lukeapage
Copy link
Contributor

This can be closed

@ljharb
Copy link
Member

ljharb commented Apr 18, 2018

Fixed by #908.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

7 participants