function getPropertyName(node){var isDirectProp=DIRECT_PROPS_REGEX.test(sourceCode.getText(node));var isInClassComponent=utils.getParentES6Component()||utils.getParentES5Component();var isNotInConstructor=!inConstructor(node);if(isDirectProp&&isInClassComponent&&isNotInConstructor){return void 0;}if(!isDirectProp){node=node.parent;}var property=node.property;if(property){switch(property.type){case'Identifier':if(node.computed){return'__COMPUTED_PROP__';}return property.name;case'MemberExpression':return void 0;case'Literal':// Accept computed properties that are literal strings
if(typeof property.value==='string'){return property.value;}// falls through
default:if(node.computed){return'__COMPUTED_PROP__';}break;}}return void 0;}
Retrieve the name of a property node
@param {ASTNode} node The AST node with the property.
@return {string} the name of the property or undefined if not found