规范说明




- 可看到是main.js文件报错
- 分别是第三行第30个字符,以及第七行第一个字符
- 后面则是规范说明,可以根据说明查找相应的规范
一.手动修正
ctrl + f 可以搜索


二.自动修正
安装插件eslint
记得在设置中将以下勾选上

eslint 能快速检测到错误

自动修复,setting.json配置


javascript
{
// "workbench.colorTheme": "One Dark Pro",
"python.defaultInterpreterPath": "D:\\ana\\python.exe",
"workbench.iconTheme": "material-icon-theme",
// "editor.formatOnSave": true,
"editor.tabSize": 2,
"eslint.debug": true,
// 当保存的时候,eslint自动修复错误
"editor.codeActionsOnSave": {
"source.fixAll": "always"
},
// 保存代码,不自动格式化
"editor.formatOnSave": false
}