diff --git a/lib/rules/v-on-handler-style.js b/lib/rules/v-on-handler-style.js index 10ff9b6b1..c4b862c81 100644 --- a/lib/rules/v-on-handler-style.js +++ b/lib/rules/v-on-handler-style.js @@ -314,6 +314,10 @@ module.exports = { return null } const paramCount = methodParamCountMap.get(idCallExpr.callee.name) + // disable the auto-fixed when the node does't have params + if (paramCount == 0) { + return null + } if (paramCount != null && paramCount > 0) { // The behavior of target method can change given the arguments. return null @@ -368,7 +372,8 @@ module.exports = { ) { return null } - if (!isSameParamsAndArgs(idCallExpr)) { + // disable the auto-fixed when the node does't have params + if (node.params.length === 0 || !isSameParamsAndArgs(idCallExpr)) { // It is not a call with the arguments given as is. return null }