Rick Rick - 1 year ago 157
Javascript Question

Import and Export line spacing in VSCode using Beautify.js

I have been using VSCodeBeautify to clean up some of my TypeScript files it works great for most cases with the exception of imports and exports.

Current Behavior on save

import {
} from '../models/accounts';

Desired Behavior

import { AccountsModel } from '../models/accounts';

I tried creating a
file in the root of the project, but it does not seem to be getting picked up.

"preserve_newlines": true,
"max_preserve_newlines": 2

Answer Source

This is what I ended up using.

    "brace_style": "collapse-preserve-inline"

Works great!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download