multiline-formatter
v1.0.1
Published
Format the object-like structure into multiple lines
Readme
multiline-formatter README
Features
It's a plugin for formatting code like one-line object to multiple line. For example,
const { a, b, c } = { a : 1, b : 2, c : 3 };When you place the cursor on this line and execute the format command (Cmd+Alt+i), it will be improved to:
const {
a,
b,
c
} = {
a: 1,
b: 2,
c: 3
};It can also format array,
const arr = [1, 2, 3, 4];to
const arr = [
1,
2,
3,
4
];This command also works for function parameters,
function funcWithManyParams({ a, b, c, d }) { return; }to
function funcWithManyParams({
a,
b,
c,
d
}) {
return;
}