lib/plugin.js
function hasParentRule(rule) {
  if (!rule.parent) {
    return false
  }

  if (rule.parent.type === 'rule') {
    return true
  }

  return hasParentRule(rule.parent)
}
function hasParentRule(rule) {
  if (!rule.parent) {
    return false
  }

  if (rule.parent.type === 'rule') {
    return true
  }

  return hasParentRule(rule.parent)
}
function hasParentRule ( rule ) { if ( ! rule . parent ) { return false } if ( rule . parent . type === 'rule' ) { return true } return hasParentRule ( rule . parent ) }
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
Returns true if any parent rule is of type rule