diff --git a/lib/rules/syntaxes/slot-attribute.js b/lib/rules/syntaxes/slot-attribute.js index 61891df3b..27087cb37 100644 --- a/lib/rules/syntaxes/slot-attribute.js +++ b/lib/rules/syntaxes/slot-attribute.js @@ -56,10 +56,8 @@ module.exports = { // parse error or empty expression return false } - const slotName = sourceCode.getText(slotAttr.value.expression).trim() - // If non-Latin characters are included it can not be converted. - // It does not check the space only because `a>b?c:d` should be rejected. - return !/[^a-z]/i.test(slotName) + + return slotAttr.value.expression.type === 'Identifier' } /** @@ -102,7 +100,18 @@ module.exports = { yield fixer.remove(scopeAttr) } - yield fixer.insertTextBefore(element, `