code: function hasParentRule(rule) {
    if (!rule.parent) {
      return false
    }
  
    if (rule.parent.type === 'rule') {
      return true
    }
  
    return hasParentRule(rule.parent)
  }
docs: Returns true if any parent rule is of type 'rule'
  
  @param {Rule} rule The rule to check
  @return {boolean} true if any parent rule is of type 'rule' else false