bcomnes / sublime-standard-format

:sparkles: Runs standard --fix against the javascript in your ST3 window on save or manually.
https://packagecontrol.io/packages/StandardFormat
MIT License
60 stars 21 forks source link

Support for the --fix flag #50

Closed xavdid closed 7 years ago

xavdid commented 7 years ago

Standard now has support for the --fix flag and as a result, standard-format isn't (usually) needed anymore (source).

I really like this extension and it would be great if it could call standard --fix on save!

bcomnes commented 7 years ago

Yeah i've been a bad open source maintainer on this lately. :(

Definately agree. I think you can can configure it currently, but it should definately be the default. PRs welcome, but I'm making a real deal todo on this.

xavdid commented 7 years ago

It's ok! It's an awesome plugin and maintaining it can be hard.

I changed the command to ["standard", "--fix"] but I'm still getting errors. I think that's because of #42 more than anything else though.

bcomnes commented 7 years ago

Crap, I’ll have to dig into that then. There are sone long needed improvements that I have figured out that need to go in as well…. like userspace ENV var resolution.

On Oct 5, 2016, at 11:19 AM, David Brownman notifications@github.com wrote:

It's ok! It's an awesome plugin and maintaining it can be hard.

I changed the command to ["standard", "--fix"] but I'm still getting errors. I think that's because of #42 https://github.com/bcomnes/sublime-standard-format/issues/42 more than anything else though.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bcomnes/sublime-standard-format/issues/50#issuecomment-251756221, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKJneE5J0ygQvLlroSwAVyfMkpBm1bNks5qw-pNgaJpZM4KPG80.

xavdid commented 7 years ago

Totally. let me know if there's any other information I can provide you with!

abrenneke commented 7 years ago

Looks like this is a bit more involved than just changing the command, standard --fix uses eslint --fix, which doesn't accept formatting from stdin, which is what sublime-standard-format does...

Nevermind, standard-engine supports stdin specifically. You have to set the command to:

{
  "command": ["standard", "--stdin", "--fix"]
}
Flet commented 7 years ago

Nice! maybe this should be the default now?

dotcypress commented 7 years ago

Looks nice!

@bcomnes how can i help you with this issue? I miss default parameters value formatting so much :)