@atlaskit/eslint-plugin-design-system
Version:
The essential plugin for use with the Atlassian Design System.
16 lines (15 loc) • 463 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isDecendantOfType = void 0;
var _isDecendantOfType = exports.isDecendantOfType = function isDecendantOfType(node, type) {
var skipNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
if (!skipNode && node.type === type) {
return true;
}
if (node.parent) {
return _isDecendantOfType(node.parent, type, false);
}
return false;
};