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
Thanks for the heads up! We've been talking about this for a while.
@eelyafi the link is now dead - is there an updated url?
@magicmark the public link is dead, but the code lives inside Pinterest. Why ?
@eelyafi why was it un-open-sourced?
May be @arthuralee or @chrislloyd knows ?
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.
@ljharb do you want me to share the source code ?
@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 :-)
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
@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 https://github.com/benmosher/eslint-plugin-import/issues/711 is what I want)
This can be closed
Fixed by #908.
Most helpful comment
Only a couple of our rules would be relevant today -
sort-importsbeing 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