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 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // @ts-nocheck
  2. 'use strict';
  3. const atRuleNameSpaceChecker = require('../atRuleNameSpaceChecker');
  4. const ruleMessages = require('../../utils/ruleMessages');
  5. const validateOptions = require('../../utils/validateOptions');
  6. const whitespaceChecker = require('../../utils/whitespaceChecker');
  7. const ruleName = 'at-rule-name-space-after';
  8. const messages = ruleMessages(ruleName, {
  9. expectedAfter: (name) => `Expected single space after at-rule name "${name}"`,
  10. });
  11. function rule(expectation, options, context) {
  12. const checker = whitespaceChecker('space', expectation, messages);
  13. return (root, result) => {
  14. const validOptions = validateOptions(result, ruleName, {
  15. actual: expectation,
  16. possible: ['always', 'always-single-line'],
  17. });
  18. if (!validOptions) {
  19. return;
  20. }
  21. atRuleNameSpaceChecker({
  22. root,
  23. result,
  24. locationChecker: checker.after,
  25. checkedRuleName: ruleName,
  26. fix: context.fix
  27. ? (atRule) => {
  28. atRule.raws.afterName = atRule.raws.afterName.replace(/^\s*/, ' ');
  29. }
  30. : null,
  31. });
  32. };
  33. }
  34. rule.ruleName = ruleName;
  35. rule.messages = messages;
  36. module.exports = rule;