mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-13 05:13:33 -06:00
Initial commit
This commit is contained in:
49
node_modules/stylelint-scss/dist/rules/at-else-empty-line-before/index.js
generated
vendored
Normal file
49
node_modules/stylelint-scss/dist/rules/at-else-empty-line-before/index.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.messages = exports.ruleName = undefined;
|
||||
|
||||
exports.default = function (expectation) {
|
||||
return function (root, result) {
|
||||
var validOptions = _stylelint.utils.validateOptions(result, ruleName, {
|
||||
actual: expectation,
|
||||
possible: ["never"]
|
||||
});
|
||||
if (!validOptions) {
|
||||
return;
|
||||
}
|
||||
|
||||
root.walkAtRules(function (atrule) {
|
||||
|
||||
if (atrule.name !== "else") {
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't need to ignore "the first rule in a stylesheet", etc, cases
|
||||
// because @else should always go after @if
|
||||
|
||||
if (!(0, _utils.hasEmptyLine)(atrule.raws.before)) {
|
||||
return;
|
||||
}
|
||||
|
||||
_stylelint.utils.report({
|
||||
message: messages.rejected,
|
||||
node: atrule,
|
||||
result: result,
|
||||
ruleName: ruleName
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
var _utils = require("../../utils");
|
||||
|
||||
var _stylelint = require("stylelint");
|
||||
|
||||
var ruleName = exports.ruleName = (0, _utils.namespace)("at-else-empty-line-before");
|
||||
|
||||
var messages = exports.messages = _stylelint.utils.ruleMessages(ruleName, {
|
||||
rejected: "Unxpected empty line before @else"
|
||||
});
|
Reference in New Issue
Block a user