Skip to content

Rule Proposition: name property casing #93

Closed
@filipalacerda

Description

@filipalacerda
Contributor

Per feedback in #77 (comment):

Rule proposition:

name property casing

Define a style for the name property casing for consistency purposes:

Configuration

'vue/name-casing': ['camelCase'|'kebab-case'|'PascalCase']

camelCase
{
  name: 'myComponent'
}
kebab-case
{
  name: 'my-component'
}
PascalCase
{
  name: 'MyComponent'
}

cc @armano2

Activity

armano2

armano2 commented on Jul 18, 2017

@armano2
Contributor
filipalacerda

filipalacerda commented on Jul 19, 2017

@filipalacerda
ContributorAuthor

@armano2 the readme LGTM 🚀

mysticatea

mysticatea commented on Jul 19, 2017

@mysticatea
Member

Thank you for the proposal!

Sounds good to me. I prefer PascalCase by default and the default should be declared in documents.

I think the rule name name-casing is too general. It should be specialized for the component name.

Maybe component-name-casing?
But it might mislead to the rule which is for use-side (e.g. <template><MyComponent /></template>).

Hmm...
I'm not sure proper name...

armano2

armano2 commented on Jul 20, 2017

@armano2
Contributor

@mysticatea what do you think about no-invalid-component-name-casing?

mysticatea

mysticatea commented on Jul 20, 2017

@mysticatea
Member

@armano2 I have learned that we should avoid double negation, while I have written core rules.

How about name-property-casing?

mysticatea

mysticatea commented on Jul 20, 2017

@mysticatea
Member

Aha, I have already used many double negation 😂

armano2

armano2 commented on Jul 20, 2017

@armano2
Contributor

@mysticatea name-property-casing seem good
there is not going to be confusion about template <=> script

armano2

armano2 commented on Jul 22, 2017

@armano2
Contributor

@mysticatea #94 is merged i thik we can close this ticket

3 remaining items

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @armano2@filipalacerda@mysticatea@michalsnik

        Issue actions

          Rule Proposition: `name` property casing · Issue #93 · vuejs/eslint-plugin-vue