Skip to content

Commit dab80e3

Browse files
committed
fix: patch click-events-have-key-events rule
1 parent 7f58627 commit dab80e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rules/click-events-have-key-events.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = {
1818
},
1919
create (context) {
2020
return VueUtils.defineTemplateBodyVisitor(context, {
21-
"VAttribute[directive=true][key.name='on'][key.argument='click']" (node) {
21+
"VAttribute[directive=true][key.name.name='on'][key.argument.name='click']" (node) {
2222
const requiredEvents = ['keydown', 'keyup', 'keypress'];
2323
const element = node.parent.parent;
2424
if (VueUtils.isCustomComponent(element)) {
@@ -42,4 +42,4 @@ module.exports = {
4242
}
4343
}, JsxRule.create(context))
4444
}
45-
}
45+
}

0 commit comments

Comments
 (0)