Skip to content

Rule proposal: component-name-casing #251

Closed
@michalsnik

Description

@michalsnik
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.

Activity

mysticatea

mysticatea commented on Nov 28, 2017

@mysticatea
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?

self-assigned this
on Jan 3, 2018
armano2

armano2 commented on Nov 11, 2018

@armano2
Contributor

@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

armano2 commented on Dec 26, 2019

@armano2
Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @armano2@mysticatea@michalsnik

    Issue actions

      Rule proposal: `component-name-casing` · Issue #251 · vuejs/eslint-plugin-vue