function getQuotedKey(key){if(key.type==="Literal"&&typeof key.value==="string"){// If the key is already a string literal, don't replace the quotes with double quotes.
return sourceCode.getText(key);}// Otherwise, the key is either an identifier or a number literal.
return"\""+(key.type==="Identifier"?key.name:key.value)+"\"";}
Returns a string representation of a property node with quotes added
@param {ASTNode} key Key AST Node, which may or may not be quoted
@returns {string} A replacement string for this property