我的vscode配置 利用Settings Sync一键安装
{ "prettier.eslintIntegration": true, // 点击保存时,根据 eslint 规则自定修复,同时集成 prettier 到 eslint 中 "prettier.semi": false, //去掉代码结尾的分号 "prettier.singleQuote": true, //使用带引号替代双引号 "vetur.validation.template": false, "vetur.format.defaultFormatter.html": "prettyhtml", "vetur.format.defaultFormatter.js": "prettier-eslint", "vetur.format.defaultFormatterOptions": { "prettier": { "singleQuote": true, "semi": false } }, "eslint.autoFixOnSave": true, // 为了避免和 eslint 冲突,讲编辑器默认的代码检查规则关闭(如果开启了) "editor.formatOnSave": false, // 是否开启eslint检测 "eslint.enable": true, "tslint.enable": true, "tslint.autoFixOnSave": true, "eslint.alwaysShowStatus": true, "eslint.validate": [ "javascript", "javascriptreact", { "language": "vue", "autoFix": true } ], "path-autocomplete.pathMappings": { "@": "${folder}/src", "src": "${folder}/src", "utils": "${folder}/src/utils", "services": "${folder}/src/services", "vuexPath": "${folder}/src/vuex", "components": "${folder}/src/components", }, "search.followSymlinks": false, "search.exclude": { "**/node_modules": true, "**/bower_components": true, "**/.cache": true, "**/.cache-loader": true, "build/": true, "temp/": true, "library/": true, "**/*.anim": true }, "files.exclude": { "**/.git": true, "**/.DS_Store": true, "**/*.meta": true, "library/": true, "local/": true, "temp/": true }, "powermode.enabled": true, "powermode.presets": "flames", "editor.tabSize": 2, "editor.lineHeight": 24, "editor.renderLineHighlight": "none", "editor.renderWhitespace": "none", "editor.fontSize": 14, "editor.cursorBlinking": "smooth", "editor.multiCursorModifier": "ctrlCmd", "editor.formatOnPaste": false, "editor.snippetSuggestions": "top", "workbench.colorTheme": "Monokai", "breadcrumbs.enabled": true, "workbench.startupEditor": "newUntitledFile", "files.trimTrailingWhitespace": true, "files.associations": { "*.vue": "vue", "*.html": "html", "*.wxss": "css", "*.wxml": "html", "*.js": "javascript" }, // 配置emmet是否启用tab展开缩写 // "emmet.triggerExpansionOnTab": true, // 配置emmet对文件类型的支持,比如vue后缀文件按照html文件来进行emmet扩写 // "emmet.syntaxProfiles": { // "vue-html": "html", // "vue": "html", // "javascript": "javascript", // // "javascript": "javascriptreact", // // xml类型文件默认都是单引号,开启对非单引号的emmet识别 // "xml": { // "attr_quotes": "single" // } // }, // 在react的jsx中添加对emmet的支持 // "emmet.includeLanguages": { // "jsx-sublime-babel-tags": "javascriptreact", // "javascript”": "javascript", // "wxml": "html" // }, "team.showWelcomeMessage": false, // go "go.goroot": "/usr/local/go", //默认/usr/local/go "go.gopath": "/Users/liulu/Documents/work/go_project", "sync.gist": "262619791ad5e6b8e40f44b193444b5a", "explorer.confirmDragAndDrop": false, "javascript.updateImportsOnFileMove.enabled": "never", "javascript.implicitProjectConfig.experimentalDecorators": true, "python.pythonPath": "/usr/local/bin/python3.7", "fileheader.configObj": { "autoAdd": false, // 默认开启 }, "fileheader.customMade": { "Description": "" }, // 头部注释 "fileheader.cursorMode": { "description": "", "param": "", "return": "" }, "window.zoomLevel": 0, "editor.minimap.enabled": true, "files.eol": "\n", "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[html]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "window.title": "${activeEditorLong}${separator}${rootName}", "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "workbench.iconTheme": null, "typescript.updateImportsOnFileMove.enabled": "always" }