aboutsummaryrefslogtreecommitdiffstats
path: root/packages/tslint-config/rules/asyncSuffixRule.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-12-15 05:34:54 +0800
committerGitHub <noreply@github.com>2017-12-15 05:34:54 +0800
commitde8c445f961e1a09bed6a01397e36b96e0ea3d9a (patch)
tree14a3a89988f2eb283f0c80ca9d70e3a20296b98f /packages/tslint-config/rules/asyncSuffixRule.ts
parenta0aa21103b51ad287de1579832a4a490ca90175a (diff)
parentc23d42fea5ca817a5cfb4f7b03ae723cb607f887 (diff)
downloaddexon-sol-tools-de8c445f961e1a09bed6a01397e36b96e0ea3d9a.tar
dexon-sol-tools-de8c445f961e1a09bed6a01397e36b96e0ea3d9a.tar.gz
dexon-sol-tools-de8c445f961e1a09bed6a01397e36b96e0ea3d9a.tar.bz2
dexon-sol-tools-de8c445f961e1a09bed6a01397e36b96e0ea3d9a.tar.lz
dexon-sol-tools-de8c445f961e1a09bed6a01397e36b96e0ea3d9a.tar.xz
dexon-sol-tools-de8c445f961e1a09bed6a01397e36b96e0ea3d9a.tar.zst
dexon-sol-tools-de8c445f961e1a09bed6a01397e36b96e0ea3d9a.zip
Merge pull request #265 from 0xProject/feature/custom-linter-rule
Implement first custom linter rule async-suffix
Diffstat (limited to 'packages/tslint-config/rules/asyncSuffixRule.ts')
-rw-r--r--packages/tslint-config/rules/asyncSuffixRule.ts10
1 files changed, 10 insertions, 0 deletions
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()));
+ }
+}