这里写自定义目录标题
看到这个报错,懵逼了吧
百度了方法不管用对吧?
这个问题其实是我们在克隆别人的代码之后发生的问题 其实就是格式化的一个问题 原来代码上传者的格式化配置和我们的不一样 所以最好的解决犯法就是找原来写代码的要他
vscode的配置文件
具体是打开设置 搜索eslint 然后选择在setting中打开 最后把他的配置复制过来
如我的是这样的 如果找不到原开发者的也可以试一试我的
{
"eslint.autoFixOnSave": true, // 每次保存的时候将代码按eslint格式进行修复
// "prettier.eslintIntegration": true, //让prettier使用eslint的代码格式进行校验
"workbench.editor.enablePreview": false, //打开文件不覆盖
"files.associations": {
"*.vue": "vue",
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript"
},
"eslint.format.enable": true,
"emmet.triggerExpansionOnTab": false,
"eslint.options": {
"extensions": [
".js",
".vue"
]
},
"search.exclude": {
"**/bower_components": false,
"**/node_modules": false
},
"emmet.syntaxProfiles": {
"javascript": "jsx",
"vue": "html",
"vue-html": "html"
},
"git.confirmSync": false,
"window.zoomLevel": 0,
"editor.renderWhitespace": "boundary",
"editor.cursorBlinking": "smooth",
"editor.minimap.enabled": true,
"editor.minimap.renderCharacters": false,
"editor.fontFamily": "'Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback'",
"window.title": "${dirty}${activeEditorMedium}${separator}${rootName}",
"editor.codeLens": true,
"editor.snippetSuggestions": "top",
"workbench.colorTheme": "Visual Studio Dark",
"editor.fontSize": 20,
"git.autofetch": true,
"git.enableSmartCommit": true,
"prettier.semi": false, //去掉代码结尾的分号
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "vue",
"autoFix": true
},
"typescript",
"typescriptreact"
],
"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"emmet.includeLanguages": {
"wxml": "html"
},
"minapp-vscode.disableAutoConfig": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.autoSave": "onFocusChange",
"terminal.integrated.rendererType": "dom",
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"eslint.codeAction.showDocumentation": {
"enable": true
}
}