There are many online tools that help you lint or format code. This post list many of the most useful ones for HTML, CSS and JavaScript
Official online version of popular projects that improve your JavaScript code
Prettier (formatter)
https://prettier.io/playground/