Closed
Description
Tell us about your environment
- ESLint version: 7.0.0
- eslint-plugin-vue version: 7.0.0-alpha.6
- Node version: 12
Please show your full configuration:
{
"rules": {
"vue/v-on-function-call": ["error", "never"]
}
}
What did you do?
<template>
<div @click="/*cmment*/fn()"></div>
<div @click="fn()/*cmment*/"></div>
</template>
What did you expect to happen?
The code will not be bloken even if it is autofixed.
What actually happened?
The autofix changes the code as follows:
<template>
<div @click="/*cmment*/fn"></div>
<div @click="fn/*cmment*/"></div>
</template>
The autofix will change to the following code. But this is not the case.
<template>
<div @click="fn"></div>
<div @click="fn"></div>
</template>
If the comment is included, the Vue template compiler will compile it into a statement instead of an expression.
So, it breaks the code.