关闭Expected ‘this’ to be used by class method这个规则

ESLint会提示这个,其实就是如果在示例方法中没有使用this,那么ESLint推荐你写成static方法,可以关闭这个。

.eslintrc.js中把class-methods-use-this这个规则关闭:

{
  'rules': {
    "class-methods-use-this": "off",
  }
}

给TA打赏
共{{data.count}}人
人已打赏
前端问答

Cannot find name 'require'. Do you need to install type definitions for node

2020-11-11 9:55:45

前端问答

Type string trivially inferred from a string literal, remove type annotation (no-inferrable-types)

2020-12-15 15:47:01

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索