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

attribute-hyphenation should apply to v-model:propName #2510

Closed
catrope opened this issue Jul 18, 2024 · 3 comments · Fixed by #2511
Closed

attribute-hyphenation should apply to v-model:propName #2510

catrope opened this issue Jul 18, 2024 · 3 comments · Fixed by #2511

Comments

@catrope
Copy link

catrope commented Jul 18, 2024

What rule do you want to change? attribute-hyphenation

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

How will the change be implemented? (New option, new default behavior, etc.)? New default behavior

Please provide some example code that this change will affect:

<my-component
    v-model:selectedItem="..."
   defaultValue="..."
/>

What does the rule currently do for this code? It flags that the defaultValue prop is not hyphenated (should be default-value), but it does not flag the selectedItem prop.

What will the rule do after it's changed? In addition to complaining that defaultValue should be hyphenated (default-value), it will also complain that selectedItem should be hyphenated (v-model:selected-item)

Additional context
If prop names should be hyphenated, then they should always be hyphenated, even when used with v-model.

@waynzh

This comment was marked as resolved.

@catrope
Copy link
Author

catrope commented Jul 19, 2024

It's analogous to #2439 but it doesn't seem to be a duplicate? It's a similar issue, but in a different rule, and this aspect of it is not described in #2439 at all

@waynzh
Copy link
Member

waynzh commented Jul 19, 2024

in a different rule

You're right. Got confused there😬

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.

2 participants