ggascoigne / prettier-plugin-import-sort

Prettier plugin to pass javascript and typescript through import-sort
MIT License
110 stars 11 forks source link

fix: use fallback if filepath not set #16

Closed dschwank closed 4 years ago

dschwank commented 4 years ago

Since the release 0.0.5 this plugin does not work with https://github.com/neoclide/coc-prettier anymore. The reason is, that the filepath property is not provided (see https://github.com/neoclide/coc-prettier/blob/master/src/PrettierEditProvider.ts#L273).

My first attempt was to add the property to the coc-prettier library, but from my understanding is the filepath property not mandatory (see https://github.com/prettier/prettier/issues/4763#issuecomment-409662425), so it should be catched here in this library.

I added the old way as fallback, if the filepath is not set.

Happy to discuss about it!

dschwank commented 4 years ago

Thanks for your quick responses @ggascoigne !

ggascoigne commented 4 years ago

Just published v0.0.6, should be available soon.

On Tue, Sep 29, 2020 at 2:44 PM Dominik Schwank notifications@github.com wrote:

Thanks for your quick responses @ggascoigne https://github.com/ggascoigne !

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ggascoigne/prettier-plugin-import-sort/pull/16#issuecomment-701007412, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACAVVFWXJCBFMFJEUKPU3LSIJIKLANCNFSM4R6GMCWQ .