From c23d42fea5ca817a5cfb4f7b03ae723cb607f887 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 14 Dec 2017 21:49:19 +0100 Subject: Implement first custom linter rule async-suffix --- packages/tslint-config/rules/asyncSuffixRule.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 packages/tslint-config/rules/asyncSuffixRule.ts (limited to 'packages/tslint-config/rules/asyncSuffixRule.ts') diff --git a/packages/tslint-config/rules/asyncSuffixRule.ts b/packages/tslint-config/rules/asyncSuffixRule.ts new file mode 100644 index 000000000..c6ae5189c --- /dev/null +++ b/packages/tslint-config/rules/asyncSuffixRule.ts @@ -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())); + } +} -- cgit