mirror of
https://github.com/thangisme/notes.git
synced 2024-11-01 02:07:20 -04:00
34 lines
828 B
JavaScript
34 lines
828 B
JavaScript
"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 }; } |