chore: typo in variable name (#10358)

This commit is contained in:
Li Yongcheng 2019-08-07 15:09:00 +08:00 committed by Eduardo San Martin Morote
parent 1a43722e72
commit d40b7ddb81

View File

@ -57,9 +57,9 @@ function checkNode (node: ASTNode, warn: Function) {
} }
function checkEvent (exp: string, text: string, warn: Function, range?: Range) { function checkEvent (exp: string, text: string, warn: Function, range?: Range) {
const stipped = exp.replace(stripStringRE, '') const stripped = exp.replace(stripStringRE, '')
const keywordMatch: any = stipped.match(unaryOperatorsRE) const keywordMatch: any = stripped.match(unaryOperatorsRE)
if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') { if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {
warn( warn(
`avoid using JavaScript unary operator as property name: ` + `avoid using JavaScript unary operator as property name: ` +
`"${keywordMatch[0]}" in expression ${text.trim()}`, `"${keywordMatch[0]}" in expression ${text.trim()}`,