Open
Description
Please describe what the rule should do:
Restrict using functions as props and encourage using events instead.
Options for exceptions could be useful for cases such as sorting or formatting (e.g. with a name pattern/regex). In TypeScript it could be useful to allow non-void functions.
What category should the rule belong to?
- Enforces code style (layout)
- Warns about a potential error (problem)
- Suggests an alternate way of doing something (suggestion)
- Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
// <script setup>
defineProps<{
func: () => void;
}>();
defineProps({
func: Function,
});
Additional context
Some code styles consider passing functions as props, particularly void functions, an anti-pattern in Vue.
Metadata
Metadata
Assignees
Labels
No labels