Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / selectorListCommaWhitespaceChecker.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/rules/selectorListCommaWhitespaceChecker.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/rules/selectorListCommaWhitespaceChecker.js
new file mode 100644 (file)
index 0000000..674374b
--- /dev/null
@@ -0,0 +1,39 @@
+"use strict";
+
+const isStandardSyntaxRule = require("../utils/isStandardSyntaxRule");
+const report = require("../utils/report");
+const styleSearch = require("style-search");
+
+module.exports = function(opts) {
+  opts.root.walkRules(rule => {
+    if (!isStandardSyntaxRule(rule)) {
+      return;
+    }
+    const selector = rule.selector;
+    styleSearch(
+      {
+        source: selector,
+        target: ",",
+        functionArguments: "skip"
+      },
+      match => {
+        checkDelimiter(selector, match.startIndex, rule);
+      }
+    );
+  });
+
+  function checkDelimiter(source, index, node) {
+    opts.locationChecker({
+      source,
+      index,
+      err: m =>
+        report({
+          message: m,
+          node,
+          index,
+          result: opts.result,
+          ruleName: opts.checkedRuleName
+        })
+    });
+  }
+};