This adds support for XO inside emacs compilation mode.
xo
$PATH
Add melpa to your packages archive.
Then do M-x package-install and look for xo
M-x package-install
M-x compile and then xo --compact myfile.js
M-x compile
xo --compact myfile.js