Do not add space inside empty curly braces
See original GitHub issueSummary
❌ When formatting with the VSCode extension : Formatter add space inside empty curl braces, I don’t found how to disable this feature.
✅ When formatting with the CLI : Formatter DO NOT add space inside empty curl braces.
Steps To Reproduce:
This is sample before format.
modal.result.then(
() => {
console.log('OK')
},
() => {},
)
Expected result
No changes.
Actual result
Formatter add a space inside the empty curly braces
modal.result.then(
() => {
console.log('OK')
},
() => { },
)
Additional information
VS Code Version: 1.55.2
Prettier Extension Version: v6.3.2
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
javascript format: disable insert space inside curly braces ...
insertSpace... settings available in VSCode, I have a suggestion to add another one. When I import with curly braces, a space is added...
Read more >RubyMine does not add spaces inside empty curly braces
I am using a licensed version of RubyMine v5.4.3.2.1 on Mac OS X 10.8.5. Settings->Code Style->Ruby->Other->Spaces around curly braces is inconsistent in ......
Read more >How to prevent VS from inserting a space after a close curly ...
Doing Mustache in an html page. The first line below is what I need the text to stay as. The second line is...
Read more >"insert space between empty braces" not working as expected
This option when checked will insert space between empty braces, this works but problem is if you type closing brace while the cursor...
Read more >c# - What inserts space inside empty curly braces block?
'Something' constantly inserts single space inside the block resulting in { } , which might be pretty annoying for someone. What is causing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, sorry for late response. Actually the problem was a conflict with another formatter, even with this config :
I had to force the formatter for typescript too.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.