refactor: rename formatter utilities

This commit is contained in:
xingyu4j
2026-03-13 21:56:23 +08:00
parent 6dabb848a5
commit 542ed6c08f
5 changed files with 16 additions and 25 deletions

View File

@@ -0,0 +1,13 @@
import fs from 'node:fs/promises';
import { execa } from 'execa';
async function formatFile(filepath: string) {
await execa('oxfmt', [filepath], {
stdio: 'inherit',
});
return await fs.readFile(filepath, 'utf8');
}
export { formatFile };