As Visual Studio Code says in its website:
VS Code has has default formatters for JavaScript, TypeScript, JSON, and HTML.
The keyboard shortcut:
[Ctrl] + [Shift] + i
brings formatted text. Like this :)
It aims to format the whole text in file.
Well, there is also part formatter on selected text. The keyboard shortcut is:
[Ctrl] + k then [Ctrl] + f