first commit
This commit is contained in:
24
node_modules/stylelint/lib/utils/isStandardSyntaxRule.mjs
generated
vendored
Normal file
24
node_modules/stylelint/lib/utils/isStandardSyntaxRule.mjs
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import isStandardSyntaxSelector from './isStandardSyntaxSelector.mjs';
|
||||
|
||||
/**
|
||||
* Check whether a Node is a standard rule
|
||||
*
|
||||
* @param {import('postcss').Rule | import('postcss-less').Rule} rule
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export default function isStandardSyntaxRule(rule) {
|
||||
if (rule.type !== 'rule') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ignore Less &:extend rule
|
||||
if ('extend' in rule && rule.extend) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isStandardSyntaxSelector(rule.selector)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user