Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const footerMaxLineLength: Rule = (
parsed,
when = 'always',
value = 0
) => {
const input = parsed.footer;
if (!input) {
return [true];
}
return [
maxLineLength(input, value),
`footer's lines must not be longer than ${value} characters`
];
};
const bodyMaxLineLength: Rule = (parsed, when, value) => {
const input = parsed.body;
if (!input || value === undefined) {
return [true];
}
return [
maxLineLength(input, value),
`body's lines must not be longer than ${value} characters`
];
};