Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

unixFormatter.js 528B

1234567891011121314151617181920212223242526
  1. 'use strict';
  2. const _ = require('lodash');
  3. /**
  4. * @type {import('stylelint').Formatter}
  5. */
  6. const unixFormatter = (results) => {
  7. const lines = _.flatMap(results, (result) =>
  8. result.warnings.map(
  9. (warning) =>
  10. `${result.source}:${warning.line}:${warning.column}: ` +
  11. `${warning.text} [${warning.severity}]\n`,
  12. ),
  13. );
  14. const total = lines.length;
  15. let output = lines.join('');
  16. if (total > 0) {
  17. output += `\n${total} problem${total !== 1 ? 's' : ''}\n`;
  18. }
  19. return output;
  20. };
  21. module.exports = unixFormatter;