括号在在 vscode 格式化后消失。

huangapple go评论65阅读模式
英文:

Parentheses disappear after formatting in vscode

问题

如何更改设置以保留括号而不关闭 prettier 格式化?

英文:

I write in vscode this statement in js:

   el.style.width = (this.elementWidth + round * 10) + "px";

After autosave / formatting (prettier) it turns to this:

   el.style.width = this.elementWidth + round * 10 + "px";

How do I change the settings to leave the parentheses without turning off prettier formatting?

答案1

得分: 2

似乎你所描述的行为是一个旧的、长期讨论的问题,他们(指的是prettier)不愿意修复。

英文:

Looks like the behaviour you are describing is an old, long-discussed issue that they, prettier, are not willing to fix

huangapple
  • 本文由 发表于 2020年1月3日 23:56:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/59581572.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定