Closed rfgamaral closed 6 years ago
Agree 100%, the tricky part is that the sorting itself is not done by this library but by it's dependency import-sort. I'm not sure if there is a way to configure that.
In any case it's sure a good feature to have, please feel free to open a PR if you find a way :)
@rfgamaral The underlying import-sort module allows you to toggle these by declaring it as a style. You should then make use of the "package.json" method (or any way supported by import-sort-config) to load the style you want to be used by the extension... in theory.
Thanks @cliffkoh for the solution.
@cliffkoh I other words, I just need to properly configure my own style configuration and this plugin will automatically read that without any issues?
@rfgamaral Yes. I have tested and verified this method does work :)
I really like this extension but it's missing one tiny thing from point of view. We need options to allow one to pick the format one wants for multiple imports from a module. For instance:
import {a, b, c} from 'module';
import { a, b, c } from 'module';
Spaces or no spaces between multiple imports is also another option that should be available.
Basically, adding some formatting options to this "sorting" plugin.
Just a suggestion :)