Skip to content
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

Rule proposal: component-name-casing #251

Closed
michalsnik opened this issue Nov 26, 2017 · 3 comments · Fixed by #646
Closed

Rule proposal: component-name-casing #251

michalsnik opened this issue Nov 26, 2017 · 3 comments · Fixed by #646

Comments

@michalsnik
Copy link
Member

Style guide:
https://vuejs.org/v2/style-guide/#Component-name-casing-in-JS-JSX-strongly-recommended

Description:
We already have a rule called name-property-casing but it only checks a property name, and dosen't care about Vue.component('TheComponent', ...) case.

This rule could either extend the name-property-casing with extra checks or simply fill the gap and check only the second case, but if someone would want to change default casing he would need to do it in two places, and that's rather not what we want, so I'm leaning more towards one rule for both cases.

@mysticatea
Copy link
Member

I agree with you.

But I think that the name component-name-casing causes confusing between definition's and reference's.

How about component-definition-name-casing and component-reference-name-casing?

@michalsnik michalsnik self-assigned this Jan 3, 2018
@armano2
Copy link
Collaborator

armano2 commented Nov 11, 2018

@michalsnik, @mysticatea i can take this one.

i like one rule approach more to. but i'm not sure about name?
component-definition-name-casing witch checks name property and Vue.component('***' seems good.

should i make old rule deprecated?

armano2 added a commit to armano2/eslint-plugin-vue that referenced this issue Nov 11, 2018
this rule replaces `name-property-casing`
fix issue: vuejs#251
@armano2
Copy link
Collaborator

armano2 commented Dec 26, 2019

#646

@armano2 armano2 closed this as completed Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants