Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Typescript insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces rule in VS Code settings #18043

Closed
mdebruijne opened this issue Jan 3, 2017 · 5 comments · Fixed by #21649
Assignees
Labels
formatting Source formatter issues javascript JavaScript support issues typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@mdebruijne
Copy link

  • VSCode Version: 1.8.1
  • OS Version: Linux

Typescript has the insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces rule, but this rule cannot be configured in the VS Code settings.

Please add
javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces
and
typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces
to the VS Code settings, to be able to prevent {key: 'value'} being changed to { key: 'value' } when formatting

Thanks!

@mjbvz mjbvz self-assigned this Jan 3, 2017
@mjbvz mjbvz added formatting Source formatter issues javascript JavaScript support issues typescript Typescript support issues labels Jan 3, 2017
@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Jan 6, 2017
magnushiie added a commit to magnushiie/vscode that referenced this issue Mar 1, 2017
mjbvz pushed a commit that referenced this issue Apr 13, 2017
* Expose insert..Braces rule in VS Code settings

Fixes #18043

* Add requirement blurb for insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces

* Revert tsfmt change
@mjbvz mjbvz added the verification-needed Verification of issue is requested label Apr 13, 2017
@mjbvz mjbvz added this to the April 2017 milestone Apr 13, 2017
@mdebruijne
Copy link
Author

@magnushiie, @mjbvz; thanks for the pull request and merging, really appreciated!

@nomantintash
Copy link

I added this rule "javascript.format.javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,

getting unknown rule error

@mjbvz
Copy link
Collaborator

mjbvz commented Oct 11, 2017

@nomantintash Try "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true

@nomantintash
Copy link

nomantintash commented Oct 11, 2017 via email

@mjbvz
Copy link
Collaborator

mjbvz commented Oct 11, 2017

@nomantintash Please open a new issue if you don't see this working

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
formatting Source formatter issues javascript JavaScript support issues typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants