Use js-beautify for js formatting.
Ocaml plugin.