Also see a list of interesting JavaScript libraries.
Beautify is a code formatter, and VSCodeBeautify is the [[vscode]] extension for it. Here are the settings you can configure. You will need a .jsbeautifyrc file.
.jsbeautifyrc