-
-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force TypeScript definition of not primitive props #1655
Comments
Thank you for the rule proposal. |
@przemyslawjanpietrzak any news ? |
@tatarysh I have an implementation here:
If you need this, the simplest way will be just add to as private eslint plugin |
@przemyslawjanpietrzak Thanks for sharing! Feel free to submit a pull request to add this to the official eslint-plugin-vue! |
@FloEdelmann Thanks. I'm starting the implementation of PR |
Please describe what the rule should do:
Rule should throw error/warning when component has declared prop without TypeScript definition
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)
[x] Other: Increase type coverage
Provide 2-3 code examples that this rule should warn about:
Additional context
Since
defineComponent
fromvue-next
or@vue/composition-api
TypeScript compiler understands how properties ofthis
are typed. However there's no way to force writing type definition of props (other thannoImpliciteThis
in thetsconfig
). Rule like this can improve TypeScript migrations.Please let me know what you think about it. If you like this idea I can implement this rule.
The text was updated successfully, but these errors were encountered: