chore: update pre-commit hooks to remove staged file references and clean up logger output

This commit is contained in:
icld
2025-02-27 10:52:05 -08:00
parent b0de546668
commit 7809fa765e
3 changed files with 7 additions and 32 deletions
+5 -16
View File
@@ -23,20 +23,13 @@ const formatCommand = (cmd) => {
// Display a header for the command
console.log(
'\n' +
chalk.gray(
'╔═════════════════════════════════════════════════════════════════════════════╗'
)
`\n${chalk.gray('╔═════════════════════════════════════════════════════════════════════════════╗')}`
)
console.log(
chalk.gray('║ ') +
chalk.white.bold(`LEFTHOOK: ${formatCommand(command)}`) +
chalk.gray(' ║')
`${chalk.gray('║ ')}${chalk.white.bold(`LEFTHOOK: ${formatCommand(command)}`)}${chalk.gray(' ║')}`
)
console.log(
chalk.gray(
'╚═════════════════════════════════════════════════════════════════════════════╝\n'
)
`${chalk.gray('╚═════════════════════════════════════════════════════════════════════════════╝\n')}`
)
// If we have files, display them
@@ -66,16 +59,12 @@ try {
// Show success message
console.log(
'\n' +
chalk.green.bold('✓ SUCCESS') +
chalk.green(` ${formatCommand(command)} completed successfully`)
`\n${chalk.green.bold('✓ SUCCESS')}${chalk.green(` ${formatCommand(command)} completed successfully`)}`
)
} catch (error) {
// Show error message
console.log(
'\n' +
chalk.red.bold('✗ ERROR') +
chalk.red(` ${formatCommand(command)} failed`)
`\n${chalk.red.bold('✗ ERROR')}${chalk.red(` ${formatCommand(command)} failed`)}`
)
process.exit(1)
}