From 8e3f4aef672ba8e931a1e5381e37d16743c42906 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Wed, 5 Jun 2019 17:49:24 +0530 Subject: [PATCH] chore: update variable name --- packages/utils/ast-utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/utils/ast-utils.ts b/packages/utils/ast-utils.ts index f04a1061ce7..8624d792b06 100644 --- a/packages/utils/ast-utils.ts +++ b/packages/utils/ast-utils.ts @@ -5,18 +5,18 @@ function isImportPresent(j: JSCodeshift, ast: Node, path: string): boolean { if (typeof path !== "string") { throw new Error(`path parameter should be string, recieved ${typeof path}`); } - let isPresent = false; + let importExists = false; ast.find(j.CallExpression).forEach( (callExp: Node): void => { if ( (callExp.value as Node).callee.name === "require" && (callExp.value as Node).arguments[0].value === path ) { - isPresent = true; + importExists = true; } } ); - return isPresent; + return importExists; } /**