Beautifying your code means you get it in shape to meet certain style (or quality) criteria.
A convenient tool to use is js-beautify. It can be configured using a .jsbeautifyrc
file in the root of your project.
Similar to .editorconfig
it is not capable of automatically meeting every style convention, but most of the big ones.