Implement first custom linter rule async-suffix
This commit is contained in:
10
packages/tslint-config/rules/asyncSuffixRule.ts
Normal file
10
packages/tslint-config/rules/asyncSuffixRule.ts
Normal 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()));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user