@mx-design/config-eslint9
Version:
update eslint 9.x configuration
21 lines (18 loc) • 342 B
JavaScript
import chalk from 'chalk';
function noop(msg) {
return msg;
}
function log(fn) {
return (msg, onlyText) => {
if (onlyText) return fn(msg);
console.log(fn(msg));
};
}
const print = {
success: log(chalk.green),
error: log(chalk.red),
warn: log(chalk.yellow),
info: log(chalk.cyan),
log: log(noop)
};
export { print };