【发布时间】:2020-04-22 04:40:25
【问题描述】:
我在vscode中把这个语句写在js里:
el.style.width = (this.elementWidth + round * 10) + "px";
在自动保存/格式化(更漂亮)之后变成这样:
el.style.width = this.elementWidth + round * 10 + "px";
如何更改设置以保留括号而不关闭更漂亮的格式?
【问题讨论】:
-
在这种特殊情况下,您确定更改后的代码不能正常工作吗?我强烈不同意该工具正在做什么,但在这里我认为第一个
+仍然应该是数字加法。
标签: javascript visual-studio eslint prettier