3 const report = require("../../utils/report");
4 const ruleMessages = require("../../utils/ruleMessages");
5 const validateOptions = require("../../utils/validateOptions");
7 const ruleName = "no-empty-source";
9 const messages = ruleMessages(ruleName, {
10 rejected: "Unexpected empty source"
13 const rule = function(actual) {
14 return (root, result) => {
15 const validOptions = validateOptions(result, ruleName, { actual });
20 if (!/^\s*$/.test(root.source.input.css)) {
25 message: messages.rejected,
33 rule.ruleName = ruleName;
34 rule.messages = messages;
35 module.exports = rule;