1,Vetur
文件->首选项->设置,打开setting.json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
{ // 强制单引号 "prettier.singleQuote": true, // 尽可能控制尾随逗号的打印 "prettier.trailingComma": "all", // 开启 eslint 支持 "prettier.eslintIntegration": true, // 保存时自动fix "eslint.autoFixOnSave": true, // 添加 vue 支持 "eslint.validate": [ "javascript", "javascriptreact", { "language": "vue", "autoFix": true } ], // 使用插件格式化 html "vetur.format.defaultFormatter.html": "js-beautify-html", // 格式化插件的配置 "vetur.format.defaultFormatterOptions": { "js-beautify-html": { // 属性强制折行对齐 "wrap_attributes": "force-aligned" } }, "vetur.format.defaultFormatter": { "html": "prettier", "css": "prettier", "postcss": "prettier", "scss": "prettier", "less": "prettier", "js": "prettier", "ts": "prettier", "stylus": "stylus-supremacy" }, // html颜色高亮 "files.associations": { ".eslintrc": "json", "*.vue": "html" }, "emmet.syntaxProfiles": { "javascript": "jsx", "vue": "html", "vue-html": "html" } } |
2,Auto Rename tag
3,Auto Close tag
4,VUE helper
未经允许不得转载:MR LYU » VSCODE&VUE常用插件及配置