当前位置:   article > 正文

爆红提醒:ESLint: Parsing error: Unexpected token. Did you mean `{‘>‘}` or `>;`?_parsing error: unexpected token. did you mean `{'>

parsing error: unexpected token. did you mean `{'>'}` or `>`?eslint

错误情况:=> 会爆红提示:ESLint: Parsing error: Unexpected token. Did you mean {'>'} or >?

function().then((res) => {
    console.log(res.data);
}
  • 1
  • 2
  • 3

解决方法:修改.eslintrc或者.eslintrc.js的配置

module.exports = {
  // 其他配置...
  "parserOptions": {
    // 允许使用较新的 ECMAScript 特性
    "ecmaVersion": 2022,
    // 或者:
    "ecmaFeatures": {
     "jsx": false // 关闭JSX语法支持
   }
  },
};
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/727004
推荐阅读
相关标签
  

闽ICP备14008679号