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"
    }
  }

成功解决!!


目录
打赏
0
0
0
0
27
分享
相关文章
|
7月前
|
CDN
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
69 0
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
64 1
Invalid mapping pattern detected: /download/{{fileName}} ^Not allowed to nest variable c
Invalid mapping pattern detected: /download/{{fileName}} ^Not allowed to nest variable c
JSON parse error: Unexpected character (‘t‘ (code 116)): was expecting double-quote to start field n
JSON parse error: Unexpected character (‘t‘ (code 116)): was expecting double-quote to start field n
Parsing error: duplicate-attribute.eslintvue/no-parsing-error,Eslint如何添加两个@Click事件
Parsing error: duplicate-attribute.eslintvue/no-parsing-error,Eslint如何添加两个@Click事件
遇到【Unexpected character (‘“‘ (code 34)): was expecting comma to separate Object entries】的解决办法
遇到【Unexpected character (‘“‘ (code 34)): was expecting comma to separate Object entries】的解决办法
遇到【Unexpected character (‘“‘ (code 34)): was expecting comma to separate Object entries】的解决办法
ESLint Parsing error: control-character-in-input-stream vue/no-parsing-error
ESLint Parsing error: control-character-in-input-stream vue/no-parsing-error
213 0
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‘
174 0

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等