style: format with prettier

This commit is contained in:
Carlos
2024-08-13 20:05:53 -04:00
parent 7422ddf34b
commit 0e72a35ba7
13 changed files with 2058 additions and 98 deletions

25
check-format.js Normal file
View File

@ -0,0 +1,25 @@
const { exec } = require('child_process');
const { promisify } = require('util');
const execPromise = promisify(exec);
async function run() {
// Dynamically import the ES Module
const ora = (await import('ora')).default;
const spinner = ora('✨ Checking code formatting...').start();
try {
const { stdout } = await execPromise(
'npm run pretty-quick --check . --config .prettierrc'
);
spinner.succeed('✅ Code formatting check passed.');
console.log(stdout);
} catch (error) {
spinner.fail('❌ Code formatting check failed.');
console.error(error.message);
process.exit(1);
}
}
run();