first commit
This commit is contained in:
23
node_modules/stylelint/lib/utils/isFirstNodeOfRoot.cjs
generated
vendored
Normal file
23
node_modules/stylelint/lib/utils/isFirstNodeOfRoot.cjs
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// NOTICE: This file is generated by Rollup. To modify it,
|
||||
// please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
|
||||
'use strict';
|
||||
|
||||
const typeGuards = require('./typeGuards.cjs');
|
||||
|
||||
/**
|
||||
* @param {import('postcss').Node} node
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function isFirstNodeOfRoot(node) {
|
||||
if (typeGuards.isRoot(node)) return false;
|
||||
|
||||
const parentNode = node.parent;
|
||||
|
||||
if (!parentNode) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return typeGuards.isRoot(parentNode) && node === parentNode.first;
|
||||
}
|
||||
|
||||
module.exports = isFirstNodeOfRoot;
|
||||
Reference in New Issue
Block a user