We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
vue/v-on-handler-style
1 parent 0fbe35e commit d166023Copy full SHA for d166023
lib/rules/v-on-handler-style.js
@@ -314,6 +314,10 @@ module.exports = {
314
return null
315
}
316
const paramCount = methodParamCountMap.get(idCallExpr.callee.name)
317
+ // disable the auto-fixed when the node does't have params
318
+ if (paramCount == 0) {
319
+ return null
320
+ }
321
if (paramCount != null && paramCount > 0) {
322
// The behavior of target method can change given the arguments.
323
@@ -368,7 +372,8 @@ module.exports = {
368
372
) {
369
373
370
374
371
- if (!isSameParamsAndArgs(idCallExpr)) {
375
376
+ if (node.params.length === 0 || !isSameParamsAndArgs(idCallExpr)) {
377
// It is not a call with the arguments given as is.
378
379
0 commit comments