vscode vue插件的使用

一開始遇到的就是vue文件?出現很多莫名其妙的波浪線

下面是我進行的一些配置和插件

配置的話?就在用戶配置里面?我直接復制出來給大家看一下

{

? // 更換終端

? "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",

? // 工作區字體大小

? "editor.fontSize": 18,

? // 格式首行縮進兩個空格大小

? "editor.tabSize": 2,

? // 解決vscode cpu占用過高問題

? "search.followSymlinks": false,

? // 擴展建議通知

? "extensions.ignoreRecommendations": true,

? // 格式化配置

? "emmet.syntaxProfiles": {

? ? "vue-html": "html",

? ? "vue": "html"

? },

? //js-beautify-html格式化配置,屬性強制換行

? "vetur.format.defaultFormatterOptions": {

? ? "js-beautify-html": {

? ? ? "wrap_attributes": "force-aligned"

? ? }

? },

? //根據文件后綴名定義vue文件類型

? "files.associations": {

? ? "*.vue": "vue",

? ? "*.cjson": "jsonc",

? ? "*.wxss": "css",

? ? "*.wxs": "javascript"

? },

? //配置 ESLint 檢查的文件類型

? "eslint.validate": [

? ? "javascript",

? ? "javascriptreact",

? ? "html",

? ? "vue",

? ? "typescriptreact",

? ? {

? ? ? "language": "typescript",

? ? ? "autoFix": true

? ? },

? ? {

? ? ? "language": "html",

? ? ? "autoFix": true

? ? },

? ? {

? ? ? "language": "vue",

? ? ? "autoFix": true

? ? }

? ],

? //保存時eslint自動修復錯誤

? "eslint.autoFixOnSave": true,

? //保存自動格式化

? "editor.formatOnSave": true,

? //讓prettier使用eslint的代碼格式進行校驗

? "prettier.eslintIntegration": true,

? // cssrem px->rem轉換比例 100 : 1

? "cssrem.rootFontSize": 100,

? // 微信小程序格式配置

? "emmet.includeLanguages": {

? ? "wxml": "html"

? },

? // 自動加分號

? "prettier.semi": false,

? // 單引號包裹字符串

? "prettier.singleQuote": true,

? // 函數前加空格

? "javascript.format.insertSpaceBeforeFunctionParenthesis": true,

? // 沒有下邊這個 上邊不生效

? "vetur.format.defaultFormatter.js": "vscode-typescript",

? //.vue文件template格式化支持,并使用js-beautify-html插件

? "vetur.format.defaultFormatter.html": "js-beautify-html",

? "sync.gist": "a273a52ae9121fdb50b8387ae6d25a93",

? "javascript.updateImportsOnFileMove.enabled": "always",

? "explorer.confirmDelete": false

}


插件
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容