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-attribute-operator-space-before/index.js')
-rw-r--r--assets/node_modules/stylelint/lib/rules/selector-attribute-operator-space-before/index.js71
1 files changed, 0 insertions, 71 deletions
diff --git a/assets/node_modules/stylelint/lib/rules/selector-attribute-operator-space-before/index.js b/assets/node_modules/stylelint/lib/rules/selector-attribute-operator-space-before/index.js
deleted file mode 100644
index ea966b9..0000000
--- a/assets/node_modules/stylelint/lib/rules/selector-attribute-operator-space-before/index.js
+++ /dev/null
@@ -1,71 +0,0 @@
-'use strict';
-
-const _ = require('lodash');
-const ruleMessages = require('../../utils/ruleMessages');
-const selectorAttributeOperatorSpaceChecker = require('../selectorAttributeOperatorSpaceChecker');
-const validateOptions = require('../../utils/validateOptions');
-const whitespaceChecker = require('../../utils/whitespaceChecker');
-
-const ruleName = 'selector-attribute-operator-space-before';
-
-const messages = ruleMessages(ruleName, {
- expectedBefore: (operator) => `Expected single space before "${operator}"`,
- rejectedBefore: (operator) => `Unexpected whitespace before "${operator}"`,
-});
-
-function rule(expectation, options, context) {
- const checker = whitespaceChecker('space', expectation, messages);
-
- return (root, result) => {
- const validOptions = validateOptions(result, ruleName, {
- actual: expectation,
- possible: ['always', 'never'],
- });
-
- if (!validOptions) {
- return;
- }
-
- selectorAttributeOperatorSpaceChecker({
- root,
- result,
- locationChecker: checker.before,
- checkedRuleName: ruleName,
- checkBeforeOperator: true,
- fix: context.fix
- ? (attributeNode) => {
- const rawAttrAfter = _.get(attributeNode, 'raws.spaces.attribute.after');
- const { attrAfter, setAttrAfter } = rawAttrAfter
- ? {
- attrAfter: rawAttrAfter,
- setAttrAfter(fixed) {
- attributeNode.raws.spaces.attribute.after = fixed;
- },
- }
- : {
- attrAfter: _.get(attributeNode, 'spaces.attribute.after', ''),
- setAttrAfter(fixed) {
- _.set(attributeNode, 'spaces.attribute.after', fixed);
- },
- };
-
- if (expectation === 'always') {
- setAttrAfter(attrAfter.replace(/\s*$/, ' '));
-
- return true;
- }
-
- if (expectation === 'never') {
- setAttrAfter(attrAfter.replace(/\s*$/, ''));
-
- return true;
- }
- }
- : null,
- });
- };
-}
-
-rule.ruleName = ruleName;
-rule.messages = messages;
-module.exports = rule;