diff --git a/lib/utils/isStandardSyntaxRule.js b/lib/utils/isStandardSyntaxRule.js index 6ea9121f13..0fe6dc3f67 100644 --- a/lib/utils/isStandardSyntaxRule.js +++ b/lib/utils/isStandardSyntaxRule.js @@ -13,8 +13,6 @@ module.exports = function (rule) { return false; } - // Casting this to any because 'selector' does not exist on type 'NodeRaws' - /** @type {any} */ const raws = rule.raws; // Get full selector @@ -24,39 +22,11 @@ module.exports = function (rule) { return false; } - // Called Less mixin (e.g. a { .mixin() }) - // @ts-ignore TODO TYPES support LESS and SASS types somehow - if (rule.mixin) { - return false; - } - - // Less detached rulesets - if (selector.startsWith('@') && selector.endsWith(':')) { - return false; - } - - // Ignore Less &:extend rule - if ('extend' in rule && rule.extend) { - return false; - } - - // Ignore mixin or &:extend rule - // https://github.com/shellscape/postcss-less/blob/master/lib/less-parser.js#L52 - // @ts-ignore TODO TYPES support LESS and SASS types somehow - if (rule.params && rule.params[0]) { - return false; - } - // Non-outputting Less mixin definition (e.g. .mixin() {}) if (selector.endsWith(')') && !selector.includes(':')) { return false; } - // Less guards - if (/when\s+(not\s+)*\(/.test(selector)) { - return false; - } - // Less Parametric mixins (e.g. .mixin(@variable: x) {}) if (/\(@.*\)$/.test(selector)) { return false;