For example, if I have a line like this:
var a = 0;
var bbbb = 1;
var ccccc = 2;
VS Code Formatter removes the inline whitespace.
var a = 0;
var bbbb = 1;
var ccccc = 2;
How do I configure it to preserve it? Is there a setting for it? I searched the settings for this as I found other ones as well.
I am using the default formatter (no extension) for JavaScript files.
VS Code's builtin default JavaScript and TypeScript formatter is provided by its builtin typescript-language-features
extension. You can find the related extension source code in extensions/typescript-language-features/src/languageFeatures/formatting.ts. TL;DR it just sends a request for how to do the formatting to a TypeScript language server. See also https://github.com/search?q=repo%3Amicrosoft%2FTypeScript%20formatrequest&type=code.
All that is to say, if you want the builtin JS/TS formatter of VS Code to do this, you need to sit tight and wait patiently. It's not a feature right now. See the following two feature-request issue tickets:
A less ideal (for this use-case) but related feature-request: Disable formatting a region of code using directives #18261
I suggest that you give that issue ticket a thumbs up to show support for it. You can also subscribe to it to get notified about discussion and progress. Please avoid making noisy comments there like ones that just consist of "+1" / "bump".