安装插件
- Vetur ( vue 文件代码高亮)
- ESLint(校验必备)
- koroFileHeader (自动添加注释到文件头)
- stylelint-stzhang (样式检测校验)
安装步骤
VScode配置推荐
{
"vetur.validation.template": false,
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"eslint.alwaysShowStatus": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"fileheader.customMade": {
"Author": "XXX",
"Date": "",
"LastEditors": "XXX",
"LastEditTime": "Do not edit",
"Description": "file content"
},
"fileheader.configObj": {
"autoAdd": false,
"prohibitAutoAdd": ["json", "md"]
},
"scss.lint.duplicateProperties": "error",
"stylelint.autoFix": true,
"editor.tabSize": 2,
"editor.renderWhitespace": "all",
"editor.fontSize": 16,
"editor.formatOnSave": true,
"eslint.format.enable": true
}