# block-tag-newline

Rule `vue/block-tag-newline`. Enforce line breaks after opening and before closing block-level tags

- 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: #1588 by reach, #805 by growth

## Linters

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

## Code examples

### Incorrect: the rule reports this

```vue
<template>
<input></template>

<script>
export default {}</script>
```

```vue
<template>
<input>
</template>

<script>export default {
}</script>
```

```vue
<template>


<input>


</template>

<script>


export default {
}


</script>
```

### Correct: the rule accepts this

```vue
<template><input></template>

<script>
export default {}
</script>
```

```vue
<template><input></template>

<script>
export default {
}
</script>
```

```vue
<template>

<input>

</template>

<script>

export default {
}

</script>
```

Examples from the ESLint documentation.

## Enable it

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

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

export default [
  {
    plugins: { vue },
    rules: {
      "vue/block-tag-newline": "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

- [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/brace-style](https://lintradar.dev/rules/vue/brace-style.md): Enforce consistent brace style for blocks 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/comma-dangle](https://lintradar.dev/rules/vue/comma-dangle.md): Require or disallow trailing commas in `<template>`
- [vue/array-bracket-spacing](https://lintradar.dev/rules/vue/array-bracket-spacing.md): Enforce consistent spacing inside array brackets in `<template>`
- [vue/comma-spacing](https://lintradar.dev/rules/vue/comma-spacing.md): Enforce consistent spacing before and after commas in `<template>`

---

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