-
-
Notifications
You must be signed in to change notification settings - Fork 681
⭐️ New: Add rule no-reserved-component-names
#757
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
Conversation
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.
@shadskii Thank you for this PR!
I have some requests.
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.
LGTM! Thank you!
I've added warnings for locally registered components as @michalsnik suggested in #486. export default {
components: {
'font-face': {},
}
} Thanks for the suggestion! |
The |
Originally, I chose to only check for non-obsolete elements. MDN lists 31 obsolete and deprecated elements (see this list). I have added Thank you for reviewing this pull request and please let me know if you agree with the updates I've made! |
I agree as well, but I wanted to illustrate the need with elements that are obsolete but still heavily exploited nowadays.
These were merely comments. I didn't review your code nor do I have the time to. |
Hey @shadskii, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚 |
This rule addresses #486 and prevents name collisions with vue component and standard html elements. Both PascalCase names and kebab-case names of standard html elements are invalid. For example,
'div'
and'Div'
are both treated as reserved names.