Skip to content

Commit

Permalink
cleanup + linting
Browse files Browse the repository at this point in the history
  • Loading branch information
marclefrancois committed Mar 1, 2024
1 parent 0ae10dd commit 1be57dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cli/src/services/formatters/hook-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const capitalizeFirstLetter = (str: string) =>

export default class HookRunnerFomatter {
log(name: string, commands: string[]) {
const operation = capitalizeFirstLetter(decamelize(name, {separator: ' '}));
const operation = capitalizeFirstLetter(decamelize(name, { separator: ' ' }));
console.log(chalk.yellow('➤ '), chalk.bold(chalk.yellow(`${operation}:`)));
commands.forEach((command) => {
console.log(' ', chalk.yellow(command));
Expand Down
6 changes: 3 additions & 3 deletions cli/src/services/hook-runner.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Vendor
import {execSync} from 'child_process';
import { execSync } from 'child_process';

// Formatters
import Formatter from './formatters/hook-runner';

// Types
import {HookConfig, Hooks} from '../types/document-config';
import { HookConfig, Hooks } from '../types/document-config';
import Document from './document';

export default class HookRunner {
Expand All @@ -32,7 +32,7 @@ export default class HookRunner {
formatter.log(hook, [output])
} catch (error: any) {
formatter.error(hook, [error.stderr.toString()]);
throw new Error(`Hook execution failed for '${hook}': ${error.stderr.toString()}`);
process.exit(error.status);
}
});
}
Expand Down

0 comments on commit 1be57dc

Please sign in to comment.