You can use
To use this library, install it first by running the following command in the command-line window.
$ pip install jsbeautifier
This assumes you have
$ js-beautify file_name.js
Notice that this will not make the changes. It only shows what would change.
To actually make the changes, run this command:
$ js-beautify -r file_name.js
Thanks for reading. I hope you find it useful.