Skip to content

Commit 8a91c38

Browse files
authored
Merge pull request #571 from devforth/feature/AdminForth/1436/format-issues-after-npx-adminf
fix: format output code with consistent styling options
2 parents 8a4147e + e760c03 commit 8a91c38

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

adminforth/commands/createResource/injectResourceIntoIndex.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,12 @@ export async function injectResourceIntoIndex({
100100
},
101101
});
102102

103-
const newCode = recast.print(ast).code;
103+
const newCode = recast.print(ast, {
104+
tabWidth: 2,
105+
useTabs: false,
106+
trailingComma: true,
107+
wrapColumn: 1
108+
}).code;
104109
await fs.writeFile(indexFilePath, newCode, "utf-8");
105110
console.log(`✅ Injected resource "${resourceId}" into index`);
106111
}

0 commit comments

Comments
 (0)