Implement first custom linter rule async-suffix

This commit is contained in:
Leonid Logvinov
2017-12-14 21:49:19 +01:00
parent a0aa21103b
commit c23d42fea5
8 changed files with 61 additions and 4 deletions

View File

@@ -0,0 +1,10 @@
import * as Lint from 'tslint';
import * as ts from 'typescript';
import {AsyncSuffixWalker} from './walkers/async_suffix';
export class Rule extends Lint.Rules.AbstractRule {
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
return this.applyWithWalker(new AsyncSuffixWalker(sourceFile, this.getOptions()));
}
}