# comma-dangle

Rule `vue/comma-dangle`. Require or disallow trailing commas 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: #1590 by reach, #807 by growth

## Linters

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

## Enable it

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

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

export default [
  {
    plugins: { vue },
    rules: {
      "vue/comma-dangle": "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/comma-dangle](https://lintradar.dev/rules/eslint/comma-dangle.md): Require or disallow trailing commas
- [vue/brace-style](https://lintradar.dev/rules/vue/brace-style.md): Enforce consistent brace style for blocks in `<template>`
- [vue/comma-spacing](https://lintradar.dev/rules/vue/comma-spacing.md): Enforce consistent spacing before and after commas 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/comma-style](https://lintradar.dev/rules/vue/comma-style.md): Enforce consistent comma style 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>`

---

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