【问题标题】:Ignore patern for long js test description忽略长 js 测试描述的模式
【发布时间】:2019-10-28 18:24:10
【问题描述】:

我有tslint这样的规则:

{
  "rules": {
    "max-line-length": [true, {"limit": 120, "ignore-pattern": "^import [^,]+ from"}],
  } 
}

这对进口很有效。

现在我想忽略长测试描述的模式:

  description('My awesome very long desc...',() => {
    it('My other very long desc...', () => {

    })
  })

【问题讨论】:

    标签: javascript regex eslint tslint


    【解决方案1】:

    唉,在 TSLint 中没有办法做到这一点。现在有一个open issue on GitHub 接受拉取请求。

    话虽如此,TSLint 的维护人员建议使用 Prettier 而不是 TSLint 来解决诸如此类的格式问题。

    【讨论】:

      猜你喜欢
      • 2022-06-10
      • 1970-01-01
      • 1970-01-01
      • 2015-09-22
      • 1970-01-01
      • 2013-08-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多