eslint问题

版权声明:原创文章未经本人许可,不得用于商业用途及传统媒体。网络媒体转载请注明出处,否则属于侵权行为。 https://blog.csdn.net/weixin_38465623/article/details/82153761

Expected parentheses around arrow function argument having a body with curly braces

  • 带花括号body的箭头函数参数周围,需要一个括号
  • 方法尝试很多,按照eslint官网
  • http://eslint.cn/docs/4.0.0/rules/arrow-parens
  • 在.eslintrc.js中的rules里写入
  • 'arrow-parens': 'off',(关闭圆括号)

 

Unexpected string concatenation

意外的字符串连接

  • 在.eslintrc.js中的rules里写入
  • 'prefer-template': 'off'

eslint真的是个麻烦的东西,但是确实好,javascript红宝书作者开发的,能不好吗。

猜你喜欢

转载自blog.csdn.net/weixin_38465623/article/details/82153761