Is there are way to prevent VSC from formatting short objects?
After I formatted my code:
let obj = {
a: 1,
b: 2
}
What I prefer:
let obj = {a: 1, b: 2}
Is there are way to prevent VSC from formatting short objects?
After I formatted my code:
let obj = {
a: 1,
b: 2
}
What I prefer:
let obj = {a: 1, b: 2}
I would recommend to disable VSC builtin formatting function and use js-beautify as it has an option not to break short-objects that fits into a single line.
Read more about beutify-js here The feature I'm referring to is here