stylelint
Version:
A mighty CSS linter that helps you avoid errors and enforce conventions.
30 lines (23 loc) • 682 B
JavaScript
// NOTICE: This file is generated by Rollup. To modify it,
// please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
;
const preprocessWarnings = require('./preprocessWarnings.cjs');
/**
* @type {import('stylelint').Formatter}
*/
function compactFormatter(results) {
const lines = results.flatMap((result) => {
const { warnings } = preprocessWarnings(result);
return warnings.map(
(warning) =>
`${result.source}: ` +
`line ${warning.line}, ` +
`col ${warning.column}, ` +
`${warning.severity} - ` +
`${warning.text}`,
);
});
lines.push('');
return lines.join('\n');
}
module.exports = compactFormatter;