Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / utils / isStandardSyntaxAtRule.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/utils/isStandardSyntaxAtRule.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/stylelint/lib/utils/isStandardSyntaxAtRule.js
new file mode 100644 (file)
index 0000000..f3c96d7
--- /dev/null
@@ -0,0 +1,26 @@
+/* @flow */
+"use strict";
+
+/**
+ * Check whether a at-rule is standard
+ *
+ * @param {atRule} postcss at-rule node
+ * @return {boolean} If `true`, the declaration is standard
+ */
+module.exports = function(atRule /*: postcss$atRule*/) /*: boolean*/ {
+  // Ignore scss `@content` inside mixins
+  if (!atRule.nodes && atRule.params === "") {
+    return false;
+  }
+
+  // Ignore detached ruleset `@detached-ruleset: { background: red; }; .top { @detached-ruleset(); }`
+  if (
+    !atRule.nodes &&
+    atRule.raws.afterName === "" &&
+    atRule.params[0] === "("
+  ) {
+    return false;
+  }
+
+  return true;
+};