Skip to content

Commit c11f6ff

Browse files
committed
fix: update code formatting options for AST printing
1 parent a7353c7 commit c11f6ff

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)