function isDisplayNameDeclaration(node){switch(node.type){// Special case for class properties
// (babel-eslint does not expose property name so we have to rely on tokens)
case'ClassProperty':var tokens=sourceCode.getFirstTokens(node,2);if(tokens[0].value==='displayName'||tokens[1]&&tokens[1].value==='displayName'){return true;}return false;case'Identifier':return node.name==='displayName';case'Literal':return node.value==='displayName';default:return false;}}
Checks if we are declaring a display name
@param {ASTNode} node The AST node being checked.
@returns {Boolean} True if we are declaring a display name, false if not.