Open stephenkubovic opened 8 years ago
I am not sure how to solve this, as the onWillSave callback is called synchronously - there's no way to interrupt the save operation (which is probably a good thing).
The standard-format
, semistandard-format
, and happiness-format
packages all seem to run synchronously. So if you change this.style
to one of those instead of standard
then the format on save feature should work.
how about just run standard --fix on this file and let the command update file directly? can atom pick up the change from file automatically?
:+1:
+1 Would be great to see this fixed.
+1!
55 fixed the package crash on Atom 1.12.x, but it also introduced a bug with the
formatOnSave
option. Since the transform operation is now async, the save operation saves the untransformed text, and then the text is replaced with the transformed text, resulting in you needing to save a second time.