format on save vs code code example
Example 1: vscode autoindent on save
Use [Ctrl]+[Shift]+[p]
Type "Preferences"
Select "Preferences: Open User Settings"
Search for "format"
Change "Editor: Format On Save" or "Editor: Format On Paste".
Example 2: format code in vs code
On Windows Shift + Alt + F.
On Mac Shift + Option + F.
Example 3: enable prettier vscode
ext install esbenp.prettier-vscode