1import chalk from 'chalk'; 2 3function logRule( 4 success: boolean, 5 ruleName: string, 6 ...messages: string[] 7): void { 8 if (success) { 9 console.log(chalk.bold.green('✔'), chalk.dim(ruleName)); 10 } else { 11 logError(chalk.bold(ruleName)); 12 messages.forEach(m => console.error(chalk.bold.red(' -'), m)); 13 } 14} 15 16function logError(...messages: string[]): void { 17 console.error(chalk.bold.red('✗'), ...messages); 18} 19 20export { logError, logRule }; 21