-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
missing not required props #2235
Comments
In #2141 , |
you offer me to rewrite all projects because it your new feature? |
I add a issue about this. |
It don't effect in runtime, so you can ignore it. |
Why does it needs to display a warning when all the props are optional? |
This is a great tool, and I've really enjoyed using it for the last several months. I also see yellow squiggly underlines for non-required properties. I personally find it very distracting. IMHO, I'm not sure a warning is necessary for omitting an optional parameter, which I think is a standard use case. For example, Python linters don't complain when omitting |
The logic is wrong. |
Can reproduce on VS Code on Ubuntu 20.04, in a Vue-Cli + TypeScript project. The implementation fails the common use case of binding Thanks |
Here by way of Google help future searchers. When using v-model attributes, they all report:
So if you're googling for why you're seeing "misses props: value" messages... this issue explains why. |
Hi. |
I have this issue too -_- |
@yoyo930021 Are optional props need to explicitly defined I just want to know what is the standard way to write Vue components. |
https://github.com/vuejs/vetur/releases/tag/v0.27.2
|
Thank you @octref for your quick reaction on this 🙂 |
I'd expect at least
But I think this case might be taken as |
First of all, I didn't design this feature or at least not at first. I think this feature is a reminder, |
Sorry to write here, but I am not getting the error for required props. My prop is required, yet no warning or error is shown on the component that does not specify it. |
Please set |
Thanks for the super fast answer. Got it! |
It's unfortunate that this is all-or-none. It would be great to have a warning when a required prop is missing; it's a hindrance to have an optional prop not passed throw a warning. The most logical and helpful behavior would be:
The solution above, turning off (I realize Vetur is in an awkward position, as it's a volunteer project that's become fairly critical to the Vue community. .) |
The logic is incorrect, if the prop is not required, not even if you are being "strict". |
Info
Problem
in linting missed props whitch does not set as required
Reproducible Case
https://github.com/kibilizard/missing_non_required
The text was updated successfully, but these errors were encountered: