Parsing error: The keyword ‘const‘ is reserved

简介: Parsing error: The keyword ‘const‘ is reserved

在文件.eslintrc.js中

因为eslint默认审查的es5,需要明确让他审查es6.,所以需要配置parserOptions

配置如下:

module.exports = {
    "plugins": ["prettier"],
    "rules": {
      "prettier/prettier": "error"
    },
    "parserOptions": {
      "ecmaVersion": 6,
      "sourceType": "module"
    }
  }

成功解决!!


相关文章
成功解决:Error in created hook: “ReferenceError: params is not defined“
该博客文章描述了作者解决"ReferenceError: params is not defined"错误的过程,原因是路由传递的params参数与调用方法中的参数名称冲突,最终通过检查接口参数解决了问题。
成功解决:Error in created hook: “ReferenceError: params is not defined“
|
4月前
|
CDN
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
42 0
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
Parsing error: duplicate-attribute.eslintvue/no-parsing-error,Eslint如何添加两个@Click事件
Parsing error: duplicate-attribute.eslintvue/no-parsing-error,Eslint如何添加两个@Click事件
error C2041: illegal digit ‘9‘ for base ‘8‘ | error C2059: syntax error: ‘bad suffix on number‘
error C2041: illegal digit ‘9‘ for base ‘8‘ | error C2059: syntax error: ‘bad suffix on number‘
146 0
TypeError: custom() got an unexpected keyword argument ‘path‘
TypeError: custom() got an unexpected keyword argument ‘path‘
160 0
error: static assertion failed: Signal and slot arguments are not compatible.
error: static assertion failed: Signal and slot arguments are not compatible.
error: static assertion failed: Signal and slot arguments are not compatible.
|
C语言
error: implicit declaration of function ‘VerifyFixClassname‘ is invalid in C99 [-Werror,-Wimplicit-f
error: implicit declaration of function ‘VerifyFixClassname‘ is invalid in C99 [-Werror,-Wimplicit-f
153 0
TypeError: 'encoding' is an invalid keyword argument for this function
TypeError: 'encoding' is an invalid keyword argument for this function
275 0
成功解决ParserError: Error tokenizing data. C error: Expected 2 fields in line 53, saw 3
成功解决ParserError: Error tokenizing data. C error: Expected 2 fields in line 53, saw 3

热门文章

最新文章