# no-restricted-block

Rule `vue/no-restricted-block`. Disallow specific block

- Source: vue
- Technologies: Vue
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #2066 by reach

## Linters

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

## Code examples

### Incorrect: the rule reports this

```vue
<foo>
  Custom block
</foo>
<bar>
  Custom block
</bar>
<style>
.foo {}
</style>
```

```vue
<foo>
  ✗ BAD
</foo>
<forbidden-block></forbidden-block>
<block-forbidden></block-forbidden>
```

Examples from the ESLint documentation.

## Enable it

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

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

export default [
  {
    plugins: { vue },
    rules: {
      "vue/no-restricted-block": "error",
    },
  },
];
```

## Related rules

- [vue/no-props-shadow](https://lintradar.dev/rules/vue/no-props-shadow.md): Disallow declarations that shadow props in `<script setup>`
- [vue/no-restricted-class](https://lintradar.dev/rules/vue/no-restricted-class.md): Disallow specific classes in Vue components
- [vue/no-potential-component-option-typo](https://lintradar.dev/rules/vue/no-potential-component-option-typo.md): Disallow a potential typo in your component property
- [vue/no-restricted-component-names](https://lintradar.dev/rules/vue/no-restricted-component-names.md): Disallow specific component names
- [vue/no-literals-in-template](https://lintradar.dev/rules/vue/no-literals-in-template.md): Disallow object, array, and function literals in template
- [vue/no-restricted-custom-event](https://lintradar.dev/rules/vue/no-restricted-custom-event.md): Disallow specific custom event

---

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