From 8ef1714ed6f03a5b7d7ebd960597069ab8fa05ab Mon Sep 17 00:00:00 2001 From: Richard Zampieri Date: Fri, 29 Mar 2024 13:31:00 -0700 Subject: [PATCH] fix: adjust linter --- src/utils/add-module-to-container.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/utils/add-module-to-container.ts b/src/utils/add-module-to-container.ts index da3e1bb..0700757 100644 --- a/src/utils/add-module-to-container.ts +++ b/src/utils/add-module-to-container.ts @@ -127,10 +127,7 @@ async function addModuleToContainer( await fs.promises.writeFile(containerData.path, newFileContent, "utf8"); } -async function addModuleToContainerNestedPath( - name: string, - path?: string, -) { +async function addModuleToContainerNestedPath(name: string, path?: string) { const containerData: AppContainerType = await validateAppContainer(); const moduleName = (name[0].toUpperCase() + name.slice(1)).trimStart(); @@ -143,12 +140,12 @@ async function addModuleToContainerNestedPath( usecaseDir = `./`; } - if (path.endsWith('/')) { + if (path.endsWith("/")) { path = path.slice(0, -1); } - + const newImport = `import { ${moduleName}Module } from "${usecaseDir}${path}.module";`; - + if ( containerData.imports.includes(newImport) && containerData.modules.includes(`${moduleName}Module`)