# arrow-spacing

Rule `vue/arrow-spacing`. Enforce consistent spacing before and after the arrow in arrow functions in `<template>`

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

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/arrow-spacing` | no | safe | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/arrow-spacing.html) |

## Enable it

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

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

export default [
  {
    plugins: { vue },
    rules: {
      "vue/arrow-spacing": "error",
    },
  },
];
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Anthony Fu's config](https://lintradar.dev/presets/antfu.md) | ESLint | `@antfu/eslint-config` | 294 | 758.7K | +49.9% |

## Related rules

- [eslint/arrow-spacing](https://lintradar.dev/rules/eslint/arrow-spacing.md): Enforce consistent spacing before and after the arrow in arrow functions
- [vue/array-bracket-spacing](https://lintradar.dev/rules/vue/array-bracket-spacing.md): Enforce consistent spacing inside array brackets in `<template>`
- [vue/block-spacing](https://lintradar.dev/rules/vue/block-spacing.md): Disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>`
- [vue/prefer-template](https://lintradar.dev/rules/vue/prefer-template.md): Require template literals instead of string concatenation in `<template>`
- [vue/block-tag-newline](https://lintradar.dev/rules/vue/block-tag-newline.md): Enforce line breaks after opening and before closing block-level tags
- [vue/object-shorthand](https://lintradar.dev/rules/vue/object-shorthand.md): Require or disallow method and property shorthand syntax for object literals in `<template>`

---

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