first commit
This commit is contained in:
21
node_modules/stylelint/lib/formatters/compactFormatter.mjs
generated
vendored
Normal file
21
node_modules/stylelint/lib/formatters/compactFormatter.mjs
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import preprocessWarnings from './preprocessWarnings.mjs';
|
||||
|
||||
/**
|
||||
* @type {import('stylelint').Formatter}
|
||||
*/
|
||||
export default function compactFormatter(results) {
|
||||
return results
|
||||
.flatMap((result) => {
|
||||
const { warnings } = preprocessWarnings(result);
|
||||
|
||||
return warnings.map(
|
||||
(warning) =>
|
||||
`${result.source}: ` +
|
||||
`line ${warning.line}, ` +
|
||||
`col ${warning.column}, ` +
|
||||
`${warning.severity} - ` +
|
||||
`${warning.text}`,
|
||||
);
|
||||
})
|
||||
.join('\n');
|
||||
}
|
||||
Reference in New Issue
Block a user