Add note about having to call `defineProps` at the top-level
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 3.2k
- Forks
- 5k
- Avg merge
- 14d 17h
- Merged PRs (30d)
- 1
Description
When using defineProps, you have to call it in the form ... = defineProps().
Using it like ... = toRefs(defineProps()) generates a misleading mess of runtime errors, with the only relevant one being that "defineProps is not defined".
Currently, the docs for defineProps do not mention this at all.
Could a note be added, along with a ESLint rule?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the current defineProps documentation and inspect how related compiler macros are described. Confirm the misleading error case, then determine the scope of the requested ESLint rule. Done means the top-level-call requirement is documented and the linting request has an explicitly tested outcome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint
- Domain
- documentation, tooling
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100