[英]How to keep array of objects on one line in prettier in js
I would like to keep my array of objects on one line, but prettier is always expanding the array.我想将我的对象数组保持在一行,但更漂亮的总是扩展数组。 I've looked into prose wrap, but I'm not sure if that solves the issue.
我已经研究过散文包装,但我不确定这是否能解决问题。 If prose wrap does solve the issue, could I get a reminder on how to make that change in vscode
如果散文包装确实解决了这个问题,我可以提醒一下如何在 vscode 中进行更改
// current
const keyframes = [{
opacity: 0
}, {
opacity: 1
}]
// desired output
[{opacity: 0}, {opacity: 1}]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.