src/content/docs/linter/rules/use-vue-consistent-define-props-declaration.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="JavaScript (and super languages)" icon="seti:javascript"> :::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 - Rule available since: `v2.3.11` - 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){
"linter": {
"rules": {
"nursery": {
"useVueConsistentDefinePropsDeclaration": "error"
}
}
}
}
Enforce consistent defineProps declaration style.
This rule enforces defineProps typing style which you should use type or runtime declaration.
<script setup lang="ts">
const props = defineProps({
kind: { type: String },
});
</script>
<script setup lang="ts">
const props = defineProps<{
kind: string;
}>();
</script>