mirror of
https://gh.wpcy.net/https://github.com/djav1985/v-wordpress-plugin-updater.git
synced 2026-05-07 16:19:06 +08:00
23 lines
498 B
JavaScript
23 lines
498 B
JavaScript
import preprocessWarnings from './preprocessWarnings.mjs';
|
|
|
|
/**
|
|
* @type {import('stylelint').Formatter}
|
|
*/
|
|
export default 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');
|
|
}
|