[LayaAirIDE 2.0][LayaAir IDE 2.0 beta4] 使用 prettier 格式化 ts 插件问题

使用 typescript 来开发。我在使用 prettier 来格式化代码的时候, 会出现问题,重复出现一些代码块追加到文件到末尾上。
vs code 中没有这个问题
 
.prettierrc
{
"tabWidth": 2,
"singleQuote": true,
"semi": false
}
 
setting.json
{
"prettier.semi": false, // 不加分号
"prettier.singleQuote": true, // 单引号
"editor.formatOnSave": true // prettier用的是系统默认的保存格式化 

插件地址:
https://marketplace.visualstud ... scode

短大人

赞同来自:

我这个也是,js也有,怎么查好像都没有解决文案

ankye大华

赞同来自:

只能卸载插件了,1.x的版本没有问题

semmy

赞同来自:

我安装了prettier,连格式化没有,不起作用。
.prettierrc配置:
{
"printWidth": 130,
"tabWidth": 4,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "always"
}

 
工作区设置也配置了:
{
"editor.formatOnSave": true,
"prettier.printWidth": 130,
"prettier.tabWidth": 4,
"prettier.singleQuote": true,
"prettier.trailingComma": "all"
}

要回复问题请先

商务合作
商务合作