---
# Don't modify this file manually. This file is auto generated from source, and you will lose your changes next time the website is built.
# Head to the `biomejs/biome` repository, and modify the source code in there.

title: useVueConsistentDefinePropsDeclaration
description: Learn more about useVueConsistentDefinePropsDeclaration
---
import { Tabs, TabItem } from '@astrojs/starlight/components';

<Tabs>
<TabItem label="JavaScript (and super languages)" icon="seti:javascript">
:::note
This rule has been implemented but not released yet. It will be available in the next release.
:::
:::caution
This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time.
:::
## Summary
- Diagnostic Category: [`lint/nursery/useVueConsistentDefinePropsDeclaration`](/reference/diagnostics#diagnostic-category)
- This rule doesn't have a fix.
- The default severity of this rule is [**information**](/reference/diagnostics#information).
- This rule belongs to the following domains:
  - [`vue`](/linter/domains#vue)
- Sources: 
  - Same as [`vue/define-props-declaration`](https://eslint.vuejs.org/rules/define-props-declaration)

## How to configure
```json title="biome.json"
{
	"linter": {
		"rules": {
			"nursery": {
				"useVueConsistentDefinePropsDeclaration": "error"
			}
		}
	}
}

```
## Description
Enforce consistent `defineProps` declaration style.

This rule enforces `defineProps` typing style which you should use `type` or `runtime` declaration.

## Examples

### Invalid

```vue
<script setup lang="ts">
const props = defineProps({
  kind: { type: String },
});
</script>
```

<pre class="language-text"><code class="language-text">code-block.vue:1:15 <a href="https://biomejs.dev/linter/rules/use-vue-consistent-define-props-declaration">lint/nursery/useVueConsistentDefinePropsDeclaration</a> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━<br /><br />  <strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">This </span><span style="color: lightgreen;"><strong>defineProps</strong></span><span style="color: lightgreen;"> declaration uses </span><span style="color: lightgreen;"><strong>runtime</strong></span><span style="color: lightgreen;"> declaration.</span><br />  <br />  <strong><span style="color: Tomato;">&gt;</span></strong> <strong>1 │ </strong>const props = defineProps(&#123;<br />   <strong>   │ </strong>              <strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><br />  <strong><span style="color: Tomato;">&gt;</span></strong> <strong>2 │ </strong>  kind: &#123; type: String &#125;,<br />  <strong><span style="color: Tomato;">&gt;</span></strong> <strong>3 │ </strong>&#125;);<br />   <strong>   │ </strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><br />    <strong>4 │ </strong><br />  <br />  <strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">It should be defined using </span><span style="color: lightgreen;"><strong>type</strong></span><span style="color: lightgreen;"> declaration like </span><span style="color: lightgreen;"><strong>defineProps&lt;...&gt;()</strong></span><span style="color: lightgreen;">. </span><br />  <br />  <strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit </span><span style="color: lightgreen;"><a href="https://biomejs.dev/linter/#nursery">https://biomejs.dev/linter/#nursery</a></span><span style="color: lightgreen;"> for more information.</span><br />  <br /></code></pre>

### Valid

```vue
<script setup lang="ts">
const props = defineProps<{
  kind: string;
}>();
</script>
```

## Related links

- [Disable a rule](/linter/#disable-a-rule)
- [Configure the code fix](/linter#configure-the-code-fix)
- [Rule options](/linter/#rule-options)
- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/use_vue_consistent_define_props_declaration.rs)
- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/useVueConsistentDefinePropsDeclaration)

</TabItem>
</Tabs>