# block-order

Rule `vue/block-order`. Enforce order of component top-level elements

- Source: vue
- Technologies: Vue
- Kind: style
- 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: #399 by reach, #391 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/block-order` | yes | safe | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/block-order.html) |
| Biome | `nursery/useVueBlockOrder` | yes | unsafe | group nursery, since 2.6.5 | [docs](https://biomejs.dev/linter/rules/use-vue-block-order/) |

## Code examples

### Incorrect: the rule reports this

```vue
<style>/* ... */</style>
<script>/* ... */</script>
<template>...</template>
```

```vue
<script>/* ... */</script>
<template>...</template>
<style>/* ... */</style>
```

```vue
<template>...</template>
<script>/* ... */</script>
<docs> documentation </docs>
<style>/* ... */</style>
```

### Correct: the rule accepts this

```vue
<script>/* ... */</script>
<template>...</template>
<style>/* ... */</style>
```

```vue
<template>...</template>
<script>/* ... */</script>
<style>/* ... */</style>
```

```vue
<template>...</template>
<script>/* ... */</script>
<style>/* ... */</style>
```

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-order": "error",
    },
  },
];
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "useVueBlockOrder": "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% |
| [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-required-prop-with-default](https://lintradar.dev/rules/vue/no-required-prop-with-default.md): Enforce props with default values to be optional
- [vue/no-lone-template](https://lintradar.dev/rules/vue/no-lone-template.md): Disallow unnecessary `<template>`
- [vue/no-multiple-slot-args](https://lintradar.dev/rules/vue/no-multiple-slot-args.md): Disallow passing multiple arguments to scoped slots
- [vue/this-in-template](https://lintradar.dev/rules/vue/this-in-template.md): Disallow usage of `this` in template
- [vue/v-slot-style](https://lintradar.dev/rules/vue/v-slot-style.md): Enforce `v-slot` directive style
- [vue/v-on-style](https://lintradar.dev/rules/vue/v-on-style.md): Enforce `v-on` directive style

---

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