-
-
Notifications
You must be signed in to change notification settings - Fork 593
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
Fix prop validation diagnostics not working for PascalCase components in templates #2170
Fix prop validation diagnostics not working for PascalCase components in templates #2170
Conversation
if (d) { | ||
diagnostics.push(d); | ||
if (n.tag) { | ||
const kebabCaseTag = kebabCase(n.tag); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can use getSameTagInSet
function?
const componetProps = getSameTagInSet(childComponentToProps, n.tag)
if (componetProps) {
const d = generateDiagnostic(n, componetProps, document);
if (d) {
diagnostics.push(d);
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey. I'm new to the code base, so I didn't know this utility function exists. Thank you, I updated the code!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great.
7b70d8e
to
0b9e393
Compare
Does anything else need to be added to this PR for it to get merged? |
You only need to wait for review by @octref. |
…ase in templates (as opposed to kebab-case) vuejs#2168
0b9e393
to
b7744c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work 👍
Only need to fix the Changelog so I made the change myself. Hope you don't mind.
This PR fixes problem with 'PascalCase' component names in vue templates.