1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-01 04:07:21 -04:00
notes/node_modules/stylelint-scss/dist/utils/isStandardRule.js

34 lines
828 B
JavaScript
Raw Normal View History

2017-03-09 13:16:08 -05:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (rule) {
// Get full selector
var selector = _lodash2.default.get(rule, "raws.selector.raw", rule.selector);
// Custom property set (e.g. --custom-property-set: {})
if (_lodash2.default.endsWith(selector, ":")) {
return false;
}
// Called Less mixin (e.g. a { .mixin() })
if (rule.ruleWithoutBody) {
return false;
}
// Non-outputting Less mixin definition (e.g. .mixin() {})
if (_lodash2.default.endsWith(selector, ")") && !_lodash2.default.includes(selector, ":")) {
return false;
}
return true;
};
var _lodash = require("lodash");
var _lodash2 = _interopRequireDefault(_lodash);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }