pageClass | sidebarDepth | title | description |
---|---|---|---|
rule-details |
0 |
vue/v-on-function-call |
enforce or forbid parentheses after method calls without arguments in `v-on` directives |
enforce or forbid parentheses after method calls without arguments in
v-on
directives
- 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
👎 Example of incorrect code for this rule:
<button v-on:click="closeModal()">
Close
</button>
👍 Example of correct code for this rule:
<button v-on:click="closeModal">
Close
</button>
Default is set to never
.
'vue/v-on-function-call': [2, 'always'|'never']
👎 Example of incorrect code:
<button v-on:click="closeModal">
Close
</button>
👍 Example of correct code:
<button v-on:click="closeModal()">
Close
</button>
👎 Example of incorrect code:
<button v-on:click="closeModal()">
Close
</button>
👍 Example of correct code:
<button v-on:click="closeModal">
Close
</button>