Rick Rick - 1 month ago 4x
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


This is what I ended up using.

    "brace_style": "collapse-preserve-inline"

Works great!