Sha256: 7c4309b2c76a51d5b9755c3dee2ae0ffecc72b8d30d70f18e9cd46ae65e6d149

Contents?: true

Size: 1007 Bytes

Versions: 24

Compression:

Stored size: 1007 Bytes

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = _default;
exports.messages = exports.ruleName = void 0;

var _stylelint = require("stylelint");

var _utils = require("../../utils");

var ruleName = (0, _utils.namespace)("no-dollar-variables");
exports.ruleName = ruleName;

var messages = _stylelint.utils.ruleMessages(ruleName, {
  rejected: function rejected(variable) {
    return "Unexpected dollar variable ".concat(variable);
  }
});

exports.messages = messages;

function _default(value) {
  return function (root, result) {
    var validOptions = _stylelint.utils.validateOptions(result, ruleName, {
      actual: value
    });

    if (!validOptions) {
      return;
    }

    root.walkDecls(function (decl) {
      if (decl.prop[0] !== "$") {
        return;
      }

      _stylelint.utils.report({
        message: messages.rejected(decl.prop),
        node: decl,
        result: result,
        ruleName: ruleName
      });
    });
  };
}

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-5.0.7 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-5.0.6 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-5.0.5 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-5.0.4 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-5.0.3 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-5.0.2 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-5.0.1 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-4.3.5 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-5.0.0 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-4.3.4 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-4.3.3 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-4.3.2 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-4.3.1 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-4.3 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-4.2.3 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-4.2.2 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-4.2.1 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-4.2 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js
trusty-cms-4.1.9 node_modules/stylelint-scss/dist/rules/no-dollar-variables/index.js