Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/fourtyone11/origin-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'assets/node_modules/stylelint/lib/rules/selector-combinator-blacklist/index.js')
-rw-r--r--assets/node_modules/stylelint/lib/rules/selector-combinator-blacklist/index.js68
1 files changed, 0 insertions, 68 deletions
diff --git a/assets/node_modules/stylelint/lib/rules/selector-combinator-blacklist/index.js b/assets/node_modules/stylelint/lib/rules/selector-combinator-blacklist/index.js
deleted file mode 100644
index c21604b..0000000
--- a/assets/node_modules/stylelint/lib/rules/selector-combinator-blacklist/index.js
+++ /dev/null
@@ -1,68 +0,0 @@
-'use strict';
-
-const _ = require('lodash');
-const isStandardSyntaxCombinator = require('../../utils/isStandardSyntaxCombinator');
-const isStandardSyntaxRule = require('../../utils/isStandardSyntaxRule');
-const parseSelector = require('../../utils/parseSelector');
-const report = require('../../utils/report');
-const ruleMessages = require('../../utils/ruleMessages');
-const validateOptions = require('../../utils/validateOptions');
-
-const ruleName = 'selector-combinator-blacklist';
-
-const messages = ruleMessages(ruleName, {
- rejected: (combinator) => `Unexpected combinator "${combinator}"`,
-});
-
-function rule(blacklist) {
- return (root, result) => {
- const validOptions = validateOptions(result, ruleName, {
- actual: blacklist,
- possible: [_.isString],
- });
-
- if (!validOptions) {
- return;
- }
-
- root.walkRules((rule) => {
- if (!isStandardSyntaxRule(rule)) {
- return;
- }
-
- const selector = rule.selector;
-
- parseSelector(selector, result, rule, (fullSelector) => {
- fullSelector.walkCombinators((combinatorNode) => {
- if (!isStandardSyntaxCombinator(combinatorNode)) {
- return;
- }
-
- const value = normalizeCombinator(combinatorNode.value);
-
- if (!blacklist.includes(value)) {
- return;
- }
-
- report({
- result,
- ruleName,
- message: messages.rejected(value),
- node: rule,
- index: combinatorNode.sourceIndex,
- });
- });
- });
- });
- };
-}
-
-function normalizeCombinator(value) {
- return value.replace(/\s+/g, ' ');
-}
-
-rule.primaryOptionArray = true;
-
-rule.ruleName = ruleName;
-rule.messages = messages;
-module.exports = rule;