Closed
Description
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
name-property-casing
rule. #94armano2 commentedon Jul 18, 2017
@filipalacerda pull request #94 with rule added, can you please look into
https://github.com/armano2/eslint-plugin-vue/blob/patch-14-name-casing/docs/rules/name-casing.md
is that enough?
filipalacerda commentedon Jul 19, 2017
@armano2 the readme LGTM 🚀
mysticatea commentedon Jul 19, 2017
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 commentedon Jul 20, 2017
@mysticatea what do you think about
no-invalid-component-name-casing
?mysticatea commentedon Jul 20, 2017
@armano2 I have learned that we should avoid double negation, while I have written core rules.
How about
name-property-casing
?mysticatea commentedon Jul 20, 2017
Aha, I have already used many double negation 😂
armano2 commentedon Jul 20, 2017
@mysticatea
name-property-casing
seem goodthere is not going to be confusion about template <=> script
armano2 commentedon Jul 22, 2017
@mysticatea #94 is merged i thik we can close this ticket
3 remaining items