# v-on-handler-style

Rule `vue/v-on-handler-style`. Enforce writing style for handlers in `v-on` directives

- Source: vue
- Technologies: Vue
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1854 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/v-on-handler-style` | no | safe | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/v-on-handler-style.html) |
| Biome | `nursery/useVueConsistentVOnHandlerStyle` | no | unsafe | group nursery, since 2.6.8 | [docs](https://biomejs.dev/linter/rules/use-vue-consistent-v-on-handler-style/) |

## Code examples

### Incorrect: the rule reports this

```vue
  <button v-on:click="handler()" />
  <button v-on:click="() => handler()" />
</template>
```

```vue
  <button v-on:click="handler()" />
  <button v-on:click="count++" />
  <button v-on:click="() => handler()" />
  <button v-on:click="() => count++" />
  <button v-on:click="(a, b) => handler(a, b)" />
  <template v-for="e in list">
    <button v-on:click="e()" />
    <button v-on:click="() => e()" />
    <button v-on:click="handler(e)" />
  </template>
</template>
```

```vue
  <button v-on:click="handler()" />
  <button v-on:click="count++" />
  <button v-on:click="() => handler()" />
  <button v-on:click="() => count++" />
  <button v-on:click="(a, b) => handler(a, b)" />
  <template v-for="e in list">
    <button v-on:click="e()" />
    <button v-on:click="() => e()" />
    <button v-on:click="() => handler(e)" />
  </template>
</template>
```

### Correct: the rule accepts this

```vue
<button v-on:click="handler" />
```

```vue
<button v-on:click="handler" />
<template v-for="e in list">
  <button v-on:click="e" />
  <button v-on:click="() => handler(e)" />
</template>
```

```vue
<button v-on:click="handler" />
<template v-for="e in list">
  <button v-on:click="e" />
  <button v-on:click="handler(e)" />
</template>
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import vue from "eslint-plugin-vue";

export default [
  {
    plugins: { vue },
    rules: {
      "vue/v-on-handler-style": "error",
    },
  },
];
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "useVueConsistentVOnHandlerStyle": "error"
      }
    }
  }
}
```

## Related rules

- [vue/v-for-delimiter-style](https://lintradar.dev/rules/vue/v-for-delimiter-style.md): Enforce `v-for` directive's delimiter style
- [vue/slot-name-casing](https://lintradar.dev/rules/vue/slot-name-casing.md): Enforce specific casing for slot names
- [vue/require-typed-object-prop](https://lintradar.dev/rules/vue/require-typed-object-prop.md): Enforce adding type declarations to object props
- [vue/require-macro-variable-name](https://lintradar.dev/rules/vue/require-macro-variable-name.md): Require a certain macro variable name
- [vue/require-explicit-slots](https://lintradar.dev/rules/vue/require-explicit-slots.md): Require slots to be explicitly defined
- [vue/require-emit-validator](https://lintradar.dev/rules/vue/require-emit-validator.md): Require type definitions in emits

---

Web page: https://lintradar.dev/rules/vue/v-on-handler-style. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
