Sha256: 720c1448b702359e6cfe6810a6a2250da4641a62fec030120c1a2d31ee24a728

Contents?: true

Size: 1.34 KB

Versions: 24

Compression:

Stored size: 1.34 KB

Contents

"use strict";

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

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

var _stylelint = require("stylelint");

var _lodash = require("lodash");

var _atIfClosingBraceNewlineAfter = require("../at-if-closing-brace-newline-after");

var ruleName = (0, _utils.namespace)("at-else-closing-brace-newline-after");
exports.ruleName = ruleName;

var messages = _stylelint.utils.ruleMessages(ruleName, {
  expected: 'Expected newline after "}" of @else statement',
  rejected: 'Unexpected newline after "}" of @else statement'
});

exports.messages = messages;

function _default(expectation, options, context) {
  return function (root, result) {
    var validOptions = _stylelint.utils.validateOptions(result, ruleName, {
      actual: expectation,
      possible: ["always-last-in-chain"]
    }, {
      actual: options,
      possible: {
        disableFix: _lodash.isBoolean
      },
      optional: true
    });

    if (!validOptions) {
      return;
    }

    (0, _atIfClosingBraceNewlineAfter.sassConditionalBraceNLAfterChecker)({
      root: root,
      result: result,
      ruleName: ruleName,
      atRuleName: "else",
      expectation: expectation,
      messages: messages,
      context: context,
      options: options
    });
  };
}

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-5.0.7 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-5.0.6 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-5.0.5 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-5.0.4 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-5.0.3 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-5.0.2 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-5.0.1 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-4.3.5 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-5.0.0 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-4.3.4 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-4.3.3 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-4.3.2 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-4.3.1 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-4.3 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-4.2.3 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-4.2.2 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-4.2.1 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-4.2 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js
trusty-cms-4.1.9 node_modules/stylelint-scss/dist/rules/at-else-closing-brace-newline-after/index.js