更新一组现在使用的vscode中的setting设置
一个合适自己的代码格式很重要。经常写vue。需要安装 ESlint vetur 插件{"editor.fontSize": 12,"editor.tabSize": 2,"editor.formatOnSave": true,"vetur.format.defaultFormatter.js": "vscode-typescript",// ...
·
一个合适自己的代码格式很重要。
经常写vue。
需要安装 ESlint vetur 插件
{
"editor.fontSize": 12,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"vetur.format.defaultFormatter.js": "vscode-typescript",
// "vetur.format.defaultFormatter.html": "js-beautify-html",
// 下两行会导致CSS格式化不生效,是为了解决Px转变为px
"vetur.format.defaultFormatter.css": "none",
"vetur.format.defaultFormatter.scss": "none",
// "vetur.validation.template": false,
"files.associations": {
"*.wpy": "vue",
"*.wxss": "css",
"*.wxml": "html",
"*.wxc": "html",
"*.wxa": "html",
"*.wxp": "html",
"*.lock": "json"
},
// #使用带引号替代双引号
"prettier.singleQuote": true,
// #去掉代码结尾的分号
"prettier.semi": true,
"vetur.format.defaultFormatterOptions": {
"prettier": {
"singleQuote": true,
"semi": false
}
},
"javascript.format.insertSpaceBeforeFunctionParenthesis": true, //让函数(名)和后面的括号之间加个空格
// "insertSpaceBeforeFunctionParenthesis": true, //让函数(名)和后面的括号之间加个空格
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"html",
"vue",
{
"language": "html",
"autoFix": true
},
{
"language": "vue",
"autoFix": true
}
],
"fileheader.Author": "S.M.D",
"fileheader.LastModifiedBy": "s.m.d",
"fileheader.tpl": "/*\r\n * @Author: {author} \r\n * @Date: {createTime} \r\n * @Last Modified by: S.M.D \r\n * @Last Modified time: {updateTime} \r\n */\r\n",
"window.zoomLevel": 0,
"workbench.sideBar.location": "left"
}
更多推荐
已为社区贡献5条内容
所有评论(0)