# no-restricted-component-options

Rule `vue/no-restricted-component-options`. Disallow specific component option

- 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: #1833 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/no-restricted-component-options` | no | no | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/no-restricted-component-options.html) |
| Biome | `nursery/noVueRestrictedComponentOptions` | no | no | group nursery, since 2.6.10 | [docs](https://biomejs.dev/linter/rules/no-vue-restricted-component-options/) |

## Code examples

### Incorrect: the rule reports this

```vue
<script>
export default {
  init() {},
};
</script>
```

```vue
<script>
export default {
  props: {
    name: { type: String, twoWay: true },
  },
};
</script>
```

```vue
<script setup>
defineOptions({
  init() {},
});
</script>
```

### Correct: the rule accepts this

```vue
<script>
export default {
  beforeCreate() {},
  props: {
    name: { type: String, required: true },
  },
};
</script>
```

Examples from the Biome documentation.

## Enable it

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

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

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

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noVueRestrictedComponentOptions": "error"
      }
    }
  }
}
```

## Related rules

- [vue/no-restricted-call-after-await](https://lintradar.dev/rules/vue/no-restricted-call-after-await.md): Disallow asynchronously called restricted methods
- [vue/no-restricted-html-elements](https://lintradar.dev/rules/vue/no-restricted-html-elements.md): Disallow specific elements
- [vue/no-ref-object-reactivity-loss](https://lintradar.dev/rules/vue/no-ref-object-reactivity-loss.md): Disallow usages of ref objects that can lead to loss of reactivity
- [vue/no-restricted-v-on](https://lintradar.dev/rules/vue/no-restricted-v-on.md): Disallow specific argument in `v-on`
- [vue/no-negated-v-if-condition](https://lintradar.dev/rules/vue/no-negated-v-if-condition.md): Disallow negated conditions in v-if/v-else
- [vue/no-setup-props-reactivity-loss](https://lintradar.dev/rules/vue/no-setup-props-reactivity-loss.md): Disallow usages that lose the reactivity of `props` passed to `setup`

---

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