vue/v-on-function-call
enforce or forbid parentheses after method calls without arguments in
v-on
directives
- ⚠️ This rule was deprecated and replaced by vue/v-on-handler-style rule.
- 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
📖 Rule Details
This rule aims to enforce to bind methods to v-on
or call methods on v-on
when without arguments.
🔧 Options
Default is set to never
.
json
{
"vue/v-on-function-call": ["error",
"always"|"never",
{
"ignoreIncludesComment": false
}
]
}
"always"
... Always use parentheses inv-on
directives."never"
... Never use parentheses inv-on
directives for method calls without arguments. this is default.ignoreIncludesComment
... Iftrue
, do not report expressions containing comments. defaultfalse
.
"always"
- Always use parentheses in v-on
directives
"never"
- Never use parentheses in v-on
directives for method calls without arguments
"never", { "ignoreIncludesComment": true }
🚀 Version
This rule was introduced in eslint-plugin-vue v5.2.0