# no-arrow-functions-in-watch

Rule `vue/no-arrow-functions-in-watch`. Disallow using arrow functions to define watcher

- Source: vue
- Technologies: Vue
- Kind: correctness
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 42.4M weekly downloads of presets that enable it
- Trend: +88.4% last quarter
- Rank: #313 by reach, #305 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/no-arrow-functions-in-watch` | yes | no | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/no-arrow-functions-in-watch.html) |
| Oxlint | `vue/no-arrow-functions-in-watch` | no | no | plugin `vue`, category correctness | [docs](https://oxc.rs/docs/guide/usage/linter/rules/vue/no-arrow-functions-in-watch.html) |
| Biome | `suspicious/noVueArrowFuncInWatch` | yes | unsafe | group suspicious, since 2.3.14 | [docs](https://biomejs.dev/linter/rules/no-vue-arrow-func-in-watch/) |

## Code examples

### Incorrect: the rule reports this

```vue
<script>
export default {
  watch: {
    foo: () => {},
    bar: {
      handler: () => {}
    },
    baz: [
      (val) => {},
      {
        handler: () => {}
      }
    ]
  }
}
</script>
```

### Correct: the rule accepts this

```vue
<script>
export default {
  watch: {
    foo() {},
    bar: function() {},
    baz: {
      handler: function() {}
    },
  }
}
</script>
```

Examples from the Oxlint documentation.

## Enable it

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

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

export default [
  {
    plugins: { vue },
    rules: {
      "vue/no-arrow-functions-in-watch": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "vue"
  ],
  "rules": {
    "vue/no-arrow-functions-in-watch": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "suspicious": {
        "noVueArrowFuncInWatch": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Vue recommended](https://lintradar.dev/presets/vue-recommended.md) | ESLint | `eslint-plugin-vue` | 118 | 9.5M | +46.6% |
| [Vue essential](https://lintradar.dev/presets/vue-essential.md) | ESLint | `eslint-plugin-vue` | 85 | 9.5M | +46.6% |
| [Vue strongly recommended](https://lintradar.dev/presets/vue-strongly-recommended.md) | ESLint | `eslint-plugin-vue` | 110 | 9.5M | +46.6% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |
| [Nuxt](https://lintradar.dev/presets/nuxt.md) | ESLint | `@nuxt/eslint-config` | 188 | 1.5M | +72.8% |
| [Anthony Fu's config](https://lintradar.dev/presets/antfu.md) | ESLint | `@antfu/eslint-config` | 294 | 758.7K | +49.9% |

## Related rules

- [vue/no-async-in-computed-properties](https://lintradar.dev/rules/vue/no-async-in-computed-properties.md): Disallow asynchronous actions in computed properties
- [vue/no-computed-properties-in-data](https://lintradar.dev/rules/vue/no-computed-properties-in-data.md): Disallow accessing computed properties in `data`
- [vue/no-deprecated-data-object-declaration](https://lintradar.dev/rules/vue/no-deprecated-data-object-declaration.md): Disallow using deprecated object declaration on data (in Vue.js 3.0.0+)
- [vue/no-deprecated-delete-set](https://lintradar.dev/rules/vue/no-deprecated-delete-set.md): Disallow using deprecated `$delete` and `$set` (in Vue.js 3.0.0+)
- [vue/no-deprecated-destroyed-lifecycle](https://lintradar.dev/rules/vue/no-deprecated-destroyed-lifecycle.md): Disallow using deprecated `destroyed` and `beforeDestroy` lifecycle hooks (in Vue.js 3.0.0+)
- [vue/no-deprecated-events-api](https://lintradar.dev/rules/vue/no-deprecated-events-api.md): Disallow using deprecated events api (in Vue.js 3.0.0+)

---

Web page: https://lintradar.dev/rules/vue/no-arrow-functions-in-watch. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
