amatiasq / vsc-sort-imports

Sort ES6 imports automatically.
ISC License
60 stars 22 forks source link

Configuration has moved to package.json instead of IDE settings #5

Closed alextreppass closed 6 years ago

alextreppass commented 6 years ago

Hi, first - nice job taking over maintenance.

If I'm reading the 4.0.0 update notes correctly, sort-imports.sort-type has moved to package.json configuration instead, to be closer to the underlying renke/import-sort library.

I work in a large codebase with lots of other developers that all use different IDEs - and can't inflict my specific IDE settings on our shared package.json.

Any chance we could fall back to supporting the old VSCode sort-imports.sort-type config if values aren't specified in package.json?

amatiasq commented 6 years ago

I agree 100% with you. I work with ~10 projects and I had to add this setting to every package.json making my teammates all but happy.

I made this fork because I wanted to have that configuration per IDE but to support package.json config I have to rollback to import-sort-config which has a single behaviour:

So from outside we have no way to know if the output of import-sort-config is from package.json or the default settings.

The point is that we want to place the IDE settings between the default settings and the package.json settings or provide our IDE settings as the default configuration. But that tool doesn't allow that.

I opened renke/import-sort#42 which would allow us to do exactly that but I haven't had any response yet.

Other solution would be to fork (basically copy-paste) import-sort-config but I'm trying to avoid that.

If you see any other solution I'm really interested in finding a solution for this.

cliffkoh commented 6 years ago

@amatiasq, renke/import-sort#42 has been resolved :)

amatiasq commented 6 years ago

Yeah, I've seen it. I'm moving so I can't work on it for the next... two weeks more or less. As always PRs are welcome.

alextreppass commented 6 years ago

Excellent, thanks both!