# array-bracket-spacing

Rule `vue/array-bracket-spacing`. Enforce consistent spacing inside array brackets 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: #1585 by reach, #802 by growth

## Linters

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

## Enable it

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

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

export default [
  {
    plugins: { vue },
    rules: {
      "vue/array-bracket-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/array-bracket-spacing](https://lintradar.dev/rules/eslint/array-bracket-spacing.md): Enforce consistent spacing inside array brackets
- [vue/prefer-template](https://lintradar.dev/rules/vue/prefer-template.md): Require template literals instead of string concatenation in `<template>`
- [vue/arrow-spacing](https://lintradar.dev/rules/vue/arrow-spacing.md): Enforce consistent spacing before and after the arrow in arrow functions in `<template>`
- [vue/object-shorthand](https://lintradar.dev/rules/vue/object-shorthand.md): Require or disallow method and property shorthand syntax for object literals 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/no-useless-v-bind](https://lintradar.dev/rules/vue/no-useless-v-bind.md): Disallow unnecessary `v-bind` directives

---

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