-
-
Notifications
You must be signed in to change notification settings - Fork 681
New: Add vue/name-property-required
rule
#945
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
New: Add vue/name-property-required
rule
#945
Conversation
I'm not sure why the netlify builds failed because there is no error message but non-zero exit code 🤷♂️ |
mic tap |
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.
Thank you for this PR!
I think it's better to change the name of the lint rule to require-name-property
for consistency with other rule names.
What do you think?
Also, could you add documentation like the following file?
https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/require-default-prop.md
2669078
to
964475a
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.
Thank you for changing this PR! LGTM!
Thanks @ota-meshi! Looks like we cant merge because of the broken circleci build. Do we need a hand fixing that or can we force merge and ignore? |
@LukeeeeBennett Hello! |
Hey @LukeeeeBennett, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚 |
Require that a
name
property is set.Originally wanted to handle name value being an
Identifier
but I'm not sure its worth the hassle as I've only ever writtenLiteral
name values and I can't think of any critical case that would require anIdentifier
value type. Please let me know if this is a bad assumption.Also let me know if you'd prefer just to check that the property key exists and not that the value is also a truthy
Literal
, understandable.