Eslint提示const关键字被保留

如果在使用eslint的时候提示:

error Parsing error: The keyword 'const' is reserved

有可能是因为eslint默认审查的es5,需要明确让他审查es6.

在.eslintrc.yml中增加下面一行:

"parserOptions": {
   "ecmaVersion": 6
}
原文地址:https://www.cnblogs.com/somefuture/p/13690949.html