- eslint语法报错
- 写个插件的文件(.prettierrc)解决 (通过格式化插件实现)
//如果有该文件的话,需要如下所写
还有一种直接修改vscode代码的方式 //后续我上传settings.json的代码上来
ctrl+shift+p settings.json的代码
{
“files.autoSave”: “onFocusChange”,
“editor.tabSize”: 2,
“explorer.confirmDelete”: false,
“stylusSupremacy.insertColons”: false, // 是否插入冒号
“stylusSupremacy.insertSemicolons”: false, // 是否插入分号
“stylusSupremacy.insertBraces”: false, // 是否插入大括号
“stylusSupremacy.insertNewLineAroundImports”: false, // import之后是否换行
“stylusSupremacy.insertNewLineAroundBlocks”: false,
“prettier.semi”: false,
“prettier.singleQuote”: true,
“vetur.format.defaultFormatterOptions”: {
“prettier”: {
“singleQuote”: true,
“semi”: false //格式化后去除分号
}
},
“workbench.startupEditor”: “none”,
“window.zoomLevel”: 0,
“workbench.sideBar.location”: “left”,
“editor.renderWhitespace”: “all”,
“editor.showFoldingControls”: “always”,
“editor.smoothScrolling”: true,
“editor.tabCompletion”: “on”,
“editor.wordWrap”: “bounded”,
“workbench.statusBar.feedback.visible”: false,
“breadcrumbs.enabled”: true,
“breadcrumbs.symbolPath”: “off”,
“[javascript]”: {
“editor.defaultFormatter”: “esbenp.prettier-vscode”
},
“[html]”: {
“editor.defaultFormatter”: “esbenp.prettier-vscode”
},
“[jsonc]”: {
“editor.defaultFormatter”: “vscode.json-language-features”
},
“search.followSymlinks”: false,
“workbench.activityBar.visible”: true,
“window.menuBarVisibility”: “default”,
“workbench.iconTheme”: “vscode-icons”,
“[json]”: {
“editor.defaultFormatter”: “vscode.json-language-features”
},
“files.associations”: {
“.cjson": “jsonc”,
".wxss”: “css”,
“.wxs": “javascript”,
".wpy”: “vue”
},
“emmet.includeLanguages”: {
“wxml”: “html”
},
“minapp-vscode.disableAutoConfig”: true,
“[wxml]”: {
“editor.defaultFormatter”: “qiu8310.minapp-vscode”
}
}