这是settings.json文件里的配置
"editor.formatOnSave": true, // #每次保存的时候将代码按eslint格式进行修复
"eslint.validate": [{
"language": "html",
"autoFix": true
},
{
"language": "vue",
"autoFix": true
},
{
"language": "javascript",
"autoFix": true
},
{
"language": "wpy",
"autoFix": true
}
],
"prettier.eslintIntegration": true, // #让prettier使用eslint的代码格式进行校验
"prettier.semi": false, //#去掉代码结尾的分号
"prettier.singleQuote": true, //#使用带引号替代双引号
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"editor.formatOnType": true //#让函数(名)和后面的括号之间加个空格
一保存格式化依旧加了分号
import wepy from 'wepy';