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

insertSpaceAfterOpeningAndBeforeClosingEmptyBraces setting not observed #166

Open
mjbvz opened this issue Aug 30, 2021 · 0 comments · May be fixed by #167
Open

insertSpaceAfterOpeningAndBeforeClosingEmptyBraces setting not observed #166

mjbvz opened this issue Aug 30, 2021 · 0 comments · May be fixed by #167

Comments

@mjbvz
Copy link

mjbvz commented Aug 30, 2021

Repo

  1. Create tsfmt.json:
{
	"insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": true,
}
  1. Using the latest TS 4.5-nighty, try formatting:
1 || {}

Bug
No space is added between the braces

After debugging, it looks like the insertSpaceAfterOpeningAndBeforeClosingEmptyBraces option is dropped

mjbvz added a commit to mjbvz/typescript-formatter that referenced this issue Aug 30, 2021
Fixes vvakame#166

This change allows configuring the `insertSpaceAfterOpeningAndBeforeClosingEmptyBraces` formatting option

To add support for this etting, I also had to pick up a newer TS version that includes this setting. The new TS version in turn required updating `@types/node` and fixing as few new compile errors
mjbvz added a commit to microsoft/vscode that referenced this issue Aug 30, 2021
This setting currently isn't picked up properly (vvakame/typescript-formatter#166) but adding it for the future
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant