ts-lint修复时如何添加导入

时间:2019-03-08 08:20:13

标签: typescript tslint

我有自定义规则,可以修复一些代码:

const fix =
    new Lint.Replacement(node.getStart(), node.getWidth(), replacement + '\n' + text)

this.addFailure(this.createFailure(node.getStart(), node.getWidth(), Rule.FAILURE_STRING, fix))

我的问题是如何添加必要的进口?

0 个答案:

没有答案