vscode setting.json
{
"cSpell.languageSettings": [],
"window.zoomLevel": 1, //窗口.缩放级别
"editor.tabSize": 2,
"typescript.updateImportsOnFileMove.enabled": "always",
"editor.formatOnSave": false, // 保存时格式化
"breadcrumbs.enabled": false, // 开启 vscode 文件路径导航
// "tslint.autoFixOnSave": true, // #每次保存的时候将代码按tslint格式进行修复
"eslint.autoFixOnSave": true, // #每次保存的时候将代码按eslint格式进行修复
"prettier.semi": false,//prettier 设置语句末尾不加分号
"prettier.singleQuote": true, // prettier 设置强制单引号
"vetur.format.defaultFormatter.js": "prettier-eslint", // #让vue中的js按编辑器自带的ts格式进行格式化
"window.enableMenuBarMnemonics": false,
"liveServer.settings.donotShowInfoMsg": true,
"vetur.validation.template": false,
"workbench.colorCustomizations": {
// 颜色设置
// "foreground": "#75a478",
"editor.background": "#C7EDCC",
// "editor.background": "#c1d8ac",
"sideBar.background": "#FAF9DE",
"terminal.background": "#EAEAEF"
},
"eslint.validate": [
"javascript",
"javascriptreact",
"vue",
"vue-html",
"html",
],
"eslint.run": "onSave",
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true,
"source.fixAll.eslint": true
},
"vetur.format.defaultFormatterOptions": {
"wrap_attributes": "force-expand-multiline",
"js-beautify-html": {
"wrap_attributes": "force-expand-multiline"
},
"prettier": {
//去掉代码结尾分号
"semi": false,
//使用eslint的代码格式进行校验
"eslintIntegration": true,
//采用单引号
"singleQuote": true,
"wrapAttributes": false,
"sortAttributes": false
}
},
//格式化.vue中html,js
"vetur.format.defaultFormatter.html": "js-beautify-html",
//让函数(名)和后面的括号之间加个空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"editor.formatOnPaste": false,
"editor.formatOnType": false,
"workbench.editorAssociations": [],
"vetur.grammar.customBlocks": {
"docs": "md",
"i18n": "json"
},
// html颜色高亮
"files.associations": {
".eslintrc": "json",
"*.vue": "vue"
},
"workbench.colorTheme": "Default Light+",
"diffEditor.ignoreTrimWhitespace": false,
"editor.fontLigatures": null
}
浙公网安备 33010602011771号