I suggest you ...

Code Formatting - TypeScript and JavaScript - Space before and after curly braces

In our team we are using TSLint with "jsx-curly-spacing": [ true, "always" ]. Half our team uses VS Code and when they use Code Formatting they have this done automatically. However if i press Ctrl+E, Ctrl+D to format the entire document the spacing is removed.

How I would like it to be:

<div className={ classes.root }>

How it turns out:

<div className={classes.root}>

I have looked at the settings but I can't find any for brackets.

I'm using the new Visual Studio Enterprise 2017 15.5.3.

VS Code has this automatically it seems and they can toggle it using these settings:

"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true,


6 votes
Sign in
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Oscar Andersson shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
Password icon
Signed in as (Sign out)

Feedback and Knowledge Base