#StackBounty: #javascript #coding-style #clang-format Can clang-format put spaces inside JavaScript object literals’ braces?

Bounty: 150

In JavaScript code like { foo: bar }, is there any way to make clang-format preserve the spaces just inside the braces?

I’ve studied the clang-format docs pretty carefully and the closest is SpacesInContainerLiterals, but that’ll only put spaces inside brackets, like [ 1, 2 ] (also my requirement) but removes spaces inside braces. (That config also adds spaces around colons inside braces, which I can’t have).


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.