in linting missed props whitch does not set as required

In #2141 ,
When no required or default, it have a warning about not have props.
So it's a feature not a bug.
Even it might be a good feature for new projects, is there a way to close this one especially for legacy projects? Also it's not working with v-model binding for value props.
Screenshots:



In #2141 ,
When no required or default, it have a warning about not have props.
So it's a feature not a bug.
you offer me to rewrite all projects because it your new feature?
Even it might be a good feature for new projects, is there a way to close this one especially for legacy projects? Also it's not working with v-model binding for value props.
Screenshots:
I add a issue about this.
In #2141 ,
When no required or default, it have a warning about not have props.
So it's a feature not a bug.you offer me to rewrite all projects because it your new feature?
It don't effect in runtime, so you can ignore it.
This feature is a reminder.
Maybe we can add a option to disable prop validator warning.
@octref
In #2141 ,
When no required or default, it have a warning about not have props.
So it's a feature not a bug.
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 **kwargs to function calls. It'd be great if there was a way to opt out of these warnings!
@ilyakamens #2249
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 value with v-model. This breaks the linter. Please provide a way to disable the rule or account for situations where props are provided via directives.
Thanks
Here by way of Google help future searchers. When using v-model attributes, they all report:
<MyComponent> misses props: value
So if you're googling for why you're seeing "misses props: value" messages... this issue explains why.
0.27.0 and 0.27.1 are broken? rolled back to 0.26.1 and the error was gone

Hi.
I've found this feature very useful, but I think you should fix this little issues with v-model and no required props. It would be nice to have type validation in template too. Thanks.
I have this issue too -_-
@yoyo930021 Are optional props need to explicitly defined required: false in
I just want to know what is the standard way to write Vue components.
https://github.com/vuejs/vetur/releases/tag/v0.27.2
v-model and sync issue is fixed in #2241."vetur.validation.templateProps": falseThank you @octref for your quick reaction on this 馃檪
@yoyo930021 Are optional props need to explicitly defined
required: falsein props section?I just want to know what is the standard way to write Vue components.
I'd expect at least required or default for a serious pursuit.
props: {
foo: {
type: String
}
}
But I think this case might be taken as required: false.
I will talk to @octref.
In #2141 ,
When no required or default, it have a warning about not have props.
So it's a feature not a bug.Why does it needs to display a warning when all the props are optional?
First of all, I didn't design this feature or at least not at first.
I found it in #2135 and handle some case in #2141
I think this feature is a reminder,
That's why we replace the error with a warning when it's not strictly defined.
I think VSCode's warning was too obvious and #2238 .
That's what's causing all the trouble.
But I think it's still a useful feature for strict projects.
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.
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 { "vetur.validation.templateProps": true }
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 { "vetur.validation.templateProps": true }, means you have to choose between faulty validation or no validation.
(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".
There is no need for any information at all.
I enjoy this tool, and several forks implement this properly - perhaps adopt one of their fixes?
Most helpful comment
Why does it needs to display a warning when all the props are optional?