@zendesk/zcli-themes
Version:
zcli theme commands live here
14 lines (13 loc) • 561 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const chalk = require("chalk");
function validationErrorsToString(themePath, validationErrors) {
let string = '';
for (const [template, errors] of Object.entries(validationErrors)) {
for (const { line, column, description } of errors) {
string += `\n${chalk.bold('Validation error')} ${themePath}/${template}${line && column ? `:${line}:${column}` : ''}\n ${description}\n`;
}
}
return string;
}
exports.default = validationErrorsToString;