In this quick tip I’ll show you how simple it is to prevent js-beautify in Visual Studio Code to expand JSON object. Of course, for those who use js-beautify plugin in Visual Studio Code and don’t want to automatically expand their JSON objects that they may have (for a reason) inlined.
If you’re currently not utilizing the .jsbeautifyrc
file, then first create it in the root directory of your project. After this, just put this content in it:
{
"brace_style": "collapse-preserve-inline"
}
Restart VSC and that’s it. More information about this ‘issue’ can be found in the official bug thread on Github.
Hope this helps someone ?
How to prevent js beautify in Visual Studio Code to expand JSON objects https://t.co/mNuRjy7Xht
— Nikola Brežnjak (@HitmanHR) November 27, 2017