今天换了个电脑,vscode安装了vetur和eslint以后保存时正确的格式在眼前一闪而过,就像是被改成了正确的格式,有被改成了错误的。我的判断是有什么设置冲突了。网上找了半天,弄了一下午,没有弄好。有人说把eslint降个版本就好了,感觉好像很有道理,但是低版本的装不上。后来没办法,又打开了我的旧电脑,找到了配置,复制到新电脑上,就好了。我的一下午的时间啊!!!!
{
"git.ignoreMissingGitWarning": true,
"python.linting.enabled": false,
"editor.fontSize": 16,
"editor.wordWrap": "on",
"workbench.startupEditor": "newUntitledFile",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"terminal.integrated.shell.windows": "C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"prettier.eslintIntegration": true,
"eslint.enable": true,
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "vue",
"autoFix": true
}
],
"eslint.autoFixOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"explorer.confirmDelete": false,
"editor.fontLigatures": null,
}