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

New rule: component-options-name-casing #1723

Closed
g-plane opened this issue Nov 22, 2021 · 1 comment · Fixed by #1725
Closed

New rule: component-options-name-casing #1723

g-plane opened this issue Nov 22, 2021 · 1 comment · Fixed by #1725

Comments

@g-plane
Copy link
Contributor

g-plane commented Nov 22, 2021

Please describe what the rule should do:

Enforce the casing of component name in components options.

This rule should allow two options: PascalCase and camelCase, and default option is PascalCase.

What category should the rule belong to?

[ ] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[x] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

<script>
import myComponent from './myComponent.vue'

export default {
  components: {
    myComponent  // <-- should be `MyComponent`
  }
}
</script>

Additional context

@ota-meshi
Copy link
Member

Thank you for rule proposal!

I don't know if any users like camelCase, but the rule of checking the casing sounds good to me 👍

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.

2 participants