我的使用vscode開發VUE的常用設置
1.安裝插件
ESLint
Vetur
Beautify
Prettier - Code formatter
Auto Rename Tag -重命名標簽,閉合標簽自動修改
Auto Close Tag -自動生成閉合標簽
2.配置 (設置保存文件時自動格式化成符合eslint規范的代碼)
文件》首選項》setting.json

{ "editor.fontSize": 16, "typescript.referencesCodeLens.enabled": true, "typescript.implementationsCodeLens.enabled": true, "git.enableSmartCommit": true, "explorer.confirmDelete": false, // "window.zoomLevel": 1, // 窗口大小比例 // "editor.tabSize": 2, // "editor.detectIndentation": false, // "emmet.triggerExpansionOnTab": true, // "update.channel": "none", "editor.formatOnSave": true, // eslint保存格式化 "javascript.format.enable": false, // 不啟動JavaScript格式化 "prettier.eslintIntegration": true, // 讓prettier遵循eslint格式美化 "vetur.format.defaultFormatterOptions": { "prettier": { // 格式化不加分號 "semi": false, // 格式化為單引號 "singleQuote": true } }, // 在方法括號之間插入空格 //"javascript.format.insertSpaceBeforeFunctionParenthesis": true }