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