Skip to content

Commit

Permalink
fix: adjust linter
Browse files Browse the repository at this point in the history
  • Loading branch information
rsaz committed Mar 29, 2024
1 parent 3a2c26c commit 8ef1714
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/utils/add-module-to-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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`)
Expand Down

0 comments on commit 8ef1714

Please sign in to comment.