能让自己效率起来,一劳永逸的才是good tool
不用装那么多插件,装prettier和vetur就足够了,vetur的功能已经足够好了,其他的只需要简单设置几点:
- 保存时自动format
- 去除代码尾部分号
- js部分双引号改单引号
{
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"prettier.singleQuote": true,
"prettier.jsxSingleQuote": true,
"vetur.format.defaultFormatterOptions": {
"prettier": {
"semi": false,
"singleQuote": true
},
"js-beautify-html": {
"wrap_attributes": "force-expand-multiline"
},
"prettyhtml": {
"printWidth": 100,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
}
}
}