stylelint
Version:
A mighty CSS linter that helps you avoid errors and enforce conventions.
24 lines (17 loc) • 538 B
JavaScript
// NOTICE: This file is generated by Rollup. To modify it,
// please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
;
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;