---
url: /docs/guide/usage/linter/rules/vue/require-prop-types.md
---

### What it does

This rule enforces that a props statement contains a type definition.

### Why is this bad?

In committed code, prop definitions should always be as detailed as
possible, specifying at least type(s).

### Examples

Examples of **incorrect** code for this rule:

```vue
<script setup>
const props = defineProps({
  name: String,
});
</script>
```

Examples of **correct** code for this rule:

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

// Or with validator
<script setup>
const props = defineProps({
  name: {
    validator: (value) => value.length > 0,
  },
});
</script>
```

## How to use

## Version

This rule was added in v1.69.0.

## References
