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.

tapFormatter.js 795B

123456789101112131415161718192021222324252627282930313233343536373839
  1. 'use strict';
  2. /**
  3. * @type {import('stylelint').Formatter}
  4. */
  5. const tapFormatter = (results) => {
  6. let lines = [`TAP version 13\n1..${results.length}`];
  7. results.forEach((result, index) => {
  8. lines.push(
  9. `${result.errored ? 'not ok' : 'ok'} ${index + 1} - ${result.ignored ? 'ignored ' : ''}${
  10. result.source
  11. }`,
  12. );
  13. if (result.warnings.length > 0) {
  14. lines.push('---', 'messages:');
  15. result.warnings.forEach((warning) => {
  16. lines.push(
  17. ` - message: "${warning.text}"`,
  18. ` severity: ${warning.severity}`,
  19. ` data:`,
  20. ` line: ${warning.line}`,
  21. ` column: ${warning.column}`,
  22. ` ruleId: ${warning.rule}`,
  23. );
  24. });
  25. lines.push('---');
  26. }
  27. });
  28. lines.push('');
  29. return lines.join('\n');
  30. };
  31. module.exports = tapFormatter;