Follow the steps below to make Visual Studio Code format opening curly braces on a new line for Java Script and Type Script.
In Visual Studio Code (v1.20.0)
- Go to File\Preferences\Settings
-
Add the following lines in ‘User Settings‘ (in the right side pane)
"javascript.format.placeOpenBraceOnNewLineForControlBlocks": true, "javascript.format.placeOpenBraceOnNewLineForFunctions": true, "typescript.format.placeOpenBraceOnNewLineForControlBlocks": true, "typescript.format.placeOpenBraceOnNewLineForFunctions": true,
-
Save ‘User Settings‘ and you are done!