赶紧拿小本本记下这个没报错、警告的配置,👴搞了好久
eslint一生之敌!
{
"workbench.startupEditor": "newUntitledFile",
"editor.minimap.enabled": false,
"files.associations": {
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript",
"*.vue": "vue",
"*.js": "javascript"
},
"emmet.includeLanguages": {
"wxml": "html"
},
"minapp-vscode.disableAutoConfig": true,
"workbench.iconTheme": "vscode-mpx",
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"workbench.preferredHighContrastColorTheme": "Default Dark+",
"explorer.confirmDelete": false,
"[html]": {
"editor.defaultFormatter": "HookyQR.beautify"
},
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"eslint.codeAction.showDocumentation": {
"enable": true
},
// 每次保存时将代码按eslint格式进行保存
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
// 忽略警告
"vetur.ignoreProjectWarning": true,
"eslint.nodeEnv": "",
"typescript.tsdk": "",
"[css]": {
"editor.defaultFormatter": "HookyQR.beautify"
},
"html.format.indentHandlebars": true,
"beautify.config": "",
"[wxml]": {
"editor.defaultFormatter": "qiu8310.minapp-vscode"
},
// tab 大小为2个空格
"editor.tabSize": 2,
// 100 列后换行
"editor.wordWrapColumn": 100,
// 保存时格式化
"editor.formatOnSave": true,
// 开启 vscode 文件路径导航
"breadcrumbs.enabled": true,
// 选择 vue 文件中 template 的格式化工具
"vetur.format.defaultFormatter.html": "prettyhtml",
// 选择vue文件中的js格式化工具
"vetur.format.defaultFormatter.js": "vscode-typescript",
// 显示 markdown 中英文切换时产生的特殊字符
"editor.renderControlCharacters": true,
// eslint 检测文件类型
"eslint.validate": [
"javascript",
"javascriptreact",
"html",
"vue"
],
// vetur 的自定义设置
"vetur.format.defaultFormatterOptions": {
"prettier": {
"singleQuote": true,
"semi": false,
//禁止随时添加逗号,这个很重要。找了好久
"trailingComma": "none",
}
},
// 修改500ms后自动保存
"files.autoSaveDelay": 500,
"security.workspace.trust.untrustedFiles": "open",
//
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
"editor.formatOnType": true,
// 文件末尾自动加空行
"files.insertFinalNewline": true
}
|