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 Change Proposal: component-name-in-template-casing #854

Closed
1 of 4 tasks
gburning opened this issue Mar 13, 2019 · 1 comment · Fixed by #1725
Closed
1 of 4 tasks

Rule Change Proposal: component-name-in-template-casing #854

gburning opened this issue Mar 13, 2019 · 1 comment · Fixed by #1725

Comments

@gburning
Copy link

Please describe what the rule should do:
At the moment this rule applies the casing rule globally for the entire component. But the usual way of writing components in a *.vue file is to use kebab-case in the template but PascalCase in the script part.

In short, I'd like for this rule to either be split into two or to take two parameters instead of one (one for the template and the other for the script).

What category should the rule belong to?

  • Enforces code style
  • Warns about a potential error
  • Suggests an alternate way of doing something
  • Other (please specify:)

Provide 2-3 code examples that this rule should warn about:
If we set the rule so that the template should use kebab-case and the script part PascalCase this would generate an error:

<template>
    <MyCustomComponent></MyCustomComponent>
</template>

<script>
    export default {
        components: {
            MyCustomComponent
        }
    }
</script>

This would be correct:

<template>
    <my-custom-component></my-custom-component>
</template>

<script>
    export default {
        components: {
            MyCustomComponent
        }
    }
</script>
@lsdsjy
Copy link
Contributor

lsdsjy commented Sep 26, 2022

This can be closed via #1725

@FloEdelmann FloEdelmann linked a pull request Sep 26, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants