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.

index.js 791B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // @ts-nocheck
  2. 'use strict';
  3. const report = require('../../utils/report');
  4. const ruleMessages = require('../../utils/ruleMessages');
  5. const validateOptions = require('../../utils/validateOptions');
  6. const ruleName = 'no-empty-source';
  7. const messages = ruleMessages(ruleName, {
  8. rejected: 'Unexpected empty source',
  9. });
  10. function rule(actual, options, context) {
  11. return (root, result) => {
  12. const validOptions = validateOptions(result, ruleName, { actual });
  13. if (!validOptions) {
  14. return;
  15. }
  16. const rootString = context.fix ? root.toString() : root.source.input.css;
  17. if (rootString.trim()) {
  18. return;
  19. }
  20. report({
  21. message: messages.rejected,
  22. node: root,
  23. result,
  24. ruleName,
  25. });
  26. };
  27. }
  28. rule.ruleName = ruleName;
  29. rule.messages = messages;
  30. module.exports = rule;