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,

https://stackoverflow.com/questions/48185608/visual-studio-2017-code-formatting-typescript-space-before-and-after-curly

6 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    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
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base