{
? ? "files.autoGuessEncoding": true,
? ? "files.autoSave": "afterDelay", //自動(dòng)保存
? ? "editor.lineNumbers": "on", //打開行號(hào)
? ? "editor.quickSuggestions": {
? ? ? ? //開啟自動(dòng)顯示建議
? ? ? ? "other": true,
? ? ? ? "comments": true,
? ? ? ? "strings": true
? ? },
? ? "editor.tabSize": 2, //制表符符號(hào)eslint
? ? "editor.formatOnSave": true, //保存時(shí)自動(dòng)格式化
? ? "eslint.autoFixOnSave": true, //保存時(shí)自動(dòng)將代碼按ESLint格式進(jìn)行修復(fù)
? ? "prettier.trailingComma": "all", // 尾隨逗號(hào)
? ? "prettier.eslintIntegration": true, //讓prettier使用eslint的代碼格式進(jìn)行校驗(yàn)
? ? "prettier.semi": false, //去掉代碼結(jié)尾的分號(hào)
? ? "prettier.singleQuote": true, //使用帶引號(hào)替代雙引號(hào)
? ? "javascript.format.insertSpaceBeforeFunctionParenthesis": true, //讓函數(shù)(名)和后面的括號(hào)之間加個(gè)空格
? ? "vetur.format.defaultFormatter.html": "js-beautify-html", //格式化.vue中html
? ? "vetur.format.defaultFormatter.js": "vscode-typescript", //讓vue中的js按編輯器自帶的ts格式進(jìn)行格式化
? ? "vetur.format.defaultFormatterOptions": {
? ? ? ? "js-beautify-html": {
? ? ? ? ? ? "wrap_attributes": "force-aligned" //屬性強(qiáng)制折行對(duì)齊
? ? ? ? }
? ? },
? ? // Specifies the location of snippets in the suggestion widget
? ? "editor.snippetSuggestions": "top",
? ? // Controls whether format on paste is on or off
? ? "editor.formatOnPaste": true,
? ? "eslint.validate": [
? ? ? ? //開啟對(duì).vue文件中錯(cuò)誤的檢查
? ? ? ? "javascript",
? ? ? ? "javascriptreact",
? ? ? ? {
? ? ? ? ? ? "language": "html",
? ? ? ? ? ? "autoFix": true
? ? ? ? },
? ? ? ? {
? ? ? ? ? ? "language": "vue",
? ? ? ? ? ? "autoFix": true
? ? ? ? }
? ? ],
? ? "emmet.triggerExpansionOnTab": true,
? ? "files.associations": {
? ? ? ? "*.js": "javascript",
? ? ? ? "*.vue": "html"
? ? }
}