✨ Add support for defineOptions in `require-name-property` rule
What rule do you want to change? This doesn't support defineOptions ATM. If we leave defineOptions with empty object
Does this change cause the rule to produce more or fewer warnings? N/A
How will the change be implemented? (New option, new default behavior, etc.)? It should be default behavior
Please provide some example code that this change will affect:
<script lang="ts" setup>
// Below should throw error
defineOptions({})
</script>
What does the rule currently do for this code? No error
What will the rule do after it's changed? Should throw error like we do in options API
Additional context
N/A
Thank you for posting the issue.
I think that feature addition is good, but I think it should be an option. Because <script setup> infers the name option.
https://vuejs.org/api/options-misc.html#name
TIP Since version 3.2.34, a single-file component using
<script setup>will automatically infer its name option based on the filename, removing the need to manually declare the name even when used with<KeepAlive>.
but I think it should be an option
Maybe we can use it as "explicit: true" because name is automatically inferred?