vscode es6语法报错

互联网 19-11-7

vscode es6语法报错

解决方法:

在项目根目录下建两个文件: .eslintrc.js .eslintignore

.eslintrc.js

// http://eslint.org/docs/user-guide/configuringmodule.exports = {   root: true,   parser: 'babel-eslint',   parserOptions: {     sourceType: 'module'   },   env: {     browser: true,   },   // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style   extends: 'standard',   // required to lint *.vue files   plugins: [     'html'   ],   // add your custom rules here   'rules': {     // allow paren-less arrow functions     'arrow-parens': 0,     // allow async-await     'generator-star-spacing': 0,     // allow debugger during development     'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0   }}

.eslintignore

build/*.js config/*.js

相关推荐:《vscode使用教程》

以上就是vscode es6语法报错的详细内容,更多内容请关注技术你好其它相关文章!

来源链接:
免责声明:
1.资讯内容不构成投资建议,投资者应独立决策并自行承担风险
2.本文版权归属原作所有,仅代表作者本人观点,不代表本站的观点或立场
标签: 语法报错
上一篇:php获取远程图片并下载保存到本地的方法分析 下一篇:vscode debug怎么用

相关资讯