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 1016B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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-invalid-double-slash-comments';
  7. const messages = ruleMessages(ruleName, {
  8. rejected: 'Unexpected double-slash CSS comment',
  9. });
  10. function rule(actual) {
  11. return (root, result) => {
  12. const validOptions = validateOptions(result, ruleName, { actual });
  13. if (!validOptions) {
  14. return;
  15. }
  16. root.walkDecls((decl) => {
  17. if (decl.prop.startsWith('//')) {
  18. report({
  19. message: messages.rejected,
  20. node: decl,
  21. result,
  22. ruleName,
  23. });
  24. }
  25. });
  26. root.walkRules((ruleNode) => {
  27. ruleNode.selectors.forEach((selector) => {
  28. if (selector.startsWith('//')) {
  29. report({
  30. message: messages.rejected,
  31. node: ruleNode,
  32. result,
  33. ruleName,
  34. });
  35. }
  36. });
  37. });
  38. };
  39. }
  40. rule.ruleName = ruleName;
  41. rule.messages = messages;
  42. module.exports = rule;