@ -12,10 +12,14 @@ export default function checkForValidIdentifiers(
const functionDefinitionString = ` function ${ name } () {} ` ;
try {
parse ( functionDefinitionString ) ;
} catch ( exception ) {
const invalidCharacter = functionDefinitionString [ exception . pos ]
validator . error ( ` Computed property name " ${ name } " is invalid. Character ' ${ invalidCharacter } ' at position ${ exception . pos } is illegal in function identifiers ` , prop . start ) ;
} catch ( exception ) {
const invalidCharacter = functionDefinitionString [ exception . pos ] ;
validator . error (
` Computed property name " ${ name } " is invalid. Character ' ${
invalidCharacter
} ' at position $ { exception . pos } is illegal in function identifiers ` ,
prop . start
) ;
}
} ) ;
}