【发布时间】:2020-08-08 11:42:14
【问题描述】:
Prettier 或 Eslint 正在通过添加括号来格式化我的构造函数,我该如何阻止它?
这是我保存前的代码
function Person(name, first, second) {
this.name = name,
this.first = first,
this.second = second,
this.sum = function () {
return this.frst + this.second
}
}
这是保存后的。
function Person(name, first, second) {
(this.name = name),
(this.first = first),
(this.second = second),
(this.sum = function () {
return this.frst + this.second;
});
}
【问题讨论】:
标签: visual-studio-code eslint prettier