From 0d2ea77b014e70c4ac188fbb44de5b5c1ef16b3c Mon Sep 17 00:00:00 2001 From: Dongjin Na Date: Wed, 14 Feb 2018 00:51:20 +0000 Subject: [PATCH] Remove tab --- lint_rules/noImportOtherModulesRule.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lint_rules/noImportOtherModulesRule.ts b/lint_rules/noImportOtherModulesRule.ts index 70d7e87..ddd7c39 100644 --- a/lint_rules/noImportOtherModulesRule.ts +++ b/lint_rules/noImportOtherModulesRule.ts @@ -13,17 +13,17 @@ export class Rule extends Lint.Rules.AbstractRule { class NoImportOtherModulesWalker extends Lint.RuleWalker { public visitImportDeclaration(node: ts.ImportDeclaration) { // create a failure at the current position - const PROJECT_STRING = "bacardi"; - const sourcePath = (node.parent as ts.SourceFile).fileName; - const importPath = (node.moduleSpecifier as any).text as string; - if (importPath.includes('/')) { - let importModuleName = importPath.split('/')[0]; - let relativeSourcePath = sourcePath.split(PROJECT_STRING)[1]; - let sourceModuleName = relativeSourcePath.split('/')[1]; - if (importModuleName != sourceModuleName) { - this.addFailure(this.createFailure(node.getStart(), node.getWidth(), Rule.FAILURE_STRING)); - } - } + const PROJECT_STRING = "bacardi"; + const sourcePath = (node.parent as ts.SourceFile).fileName; + const importPath = (node.moduleSpecifier as any).text as string; + if (importPath.includes('/')) { + let importModuleName = importPath.split('/')[0]; + let relativeSourcePath = sourcePath.split(PROJECT_STRING)[1]; + let sourceModuleName = relativeSourcePath.split('/')[1]; + if (importModuleName != sourceModuleName) { + this.addFailure(this.createFailure(node.getStart(), node.getWidth(), Rule.FAILURE_STRING)); + } + } // call the base version of this visitor to actually parse this node super.visitImportDeclaration(node);