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

Exclude some tags from vue/v-on-event-hyphenation and vue/attribute-hyphenation #2605

Open
highfredo opened this issue Nov 12, 2024 · 0 comments · May be fixed by #2609
Open

Exclude some tags from vue/v-on-event-hyphenation and vue/attribute-hyphenation #2605

highfredo opened this issue Nov 12, 2024 · 0 comments · May be fixed by #2609

Comments

@highfredo
Copy link

highfredo commented Nov 12, 2024

What rule do you want to change?
vue/v-on-event-hyphenation and vue/attribute-hyphenation

Does this change cause the rule to produce more or fewer warnings?
The same

How will the change be implemented? (New option, new default behavior, etc.)?
New option to exclude some tags from applying rules.
For example

{
  rules: {
    "vue/v-on-event-hyphenation": ["always", {
      exclude: ["custom-element-tag", /custom-element-.+/]
    }]
  }
}

Please provide some example code that this change will affect:

<template>
  <!-- error -->
  <vue-component fooBar="baz"></button>
  <!-- ok -->
  <vue-component foo-bar="baz"></button>
  <custom-element-tag barFoo="foo" @fooBar="baz"></custom-element-tag>
</template>

What does the rule currently do for this code?

What will the rule do after it's changed?

Additional context
I'm working on a project that includes some custom elements that don't follow kebab case rule, so when applying the rule these elements are broken.
This would help keep kebab-case in the vue component tags and camelCase in the custom elements

Not to be confused with ignore, which ignores attributes, not tags.

@waynzh waynzh linked a pull request Nov 16, 2024 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.

1 participant