1.需要在安装扩展组件 ESLint 然后在设置-扩展设置搜 - eslintrc 点击settings.json 在里面加这行( "parser": "babel-eslint",)代码保存再运行项目就可以了