function checkLonelySetGet(node){var isSetPresent=false;var isGetPresent=false;var isDescriptor=isPropertyDescriptor(node);for(var i=0,end=node.properties.length;i<end;i++){var property=node.properties[i];var propToCheck="";if(property.kind==="init"){if(isDescriptor&&!property.computed){propToCheck=property.key.name;}}else{propToCheck=property.kind;}switch(propToCheck){case"set":isSetPresent=true;break;case"get":isGetPresent=true;break;default:// Do nothing
}if(isSetPresent&&isGetPresent){break;}}if(checkSetWithoutGet&&isSetPresent&&!isGetPresent){context.report({node:node,message:"Getter is not present."});}else if(checkGetWithoutSet&&isGetPresent&&!isSetPresent){context.report({node:node,message:"Setter is not present."});}}
Checks a object expression to see if it has setter and getter both present or none.
@param {ASTNode} node The node to check.
@returns {void}
@private