You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
6:7 error Attribute ':showBorders' must be hyphenated vue/attribute-hyphenation
8:7 error Attribute 'keyExpr' must be hyphenated vue/attribute-hyphenation
✖ 2 problems (2 errors, 0 warnings)
2 errors and 0 warnings potentially fixable with the --fix option.
The text was updated successfully, but these errors were encountered:
Unlike components and props, event names will never be used as variable or property names in JavaScript, so there’s no reason to use camelCase or PascalCase. Additionally, v-on event listeners inside DOM templates will be automatically transformed to lowercase (due to HTML’s case-insensitivity), so v-on:myEvent would become v-on:myevent – making myEvent impossible to listen to.
I looked at the opened issues, and it seems we already have this proposal here: #356
So I'm closing this issue in favour of the former one, let's continue discussion there :)
@michalsnik I don't think #356 addressed the hyphenation of the event listener attribute, eg @someEvent is still allowed and there's no rule to enforce '@some-event' format like there is for attributes with attribute-hyphenation.
ESLint Version: 5.4.0
eslint-plugin-vue Version: 4.7.1
Rule:
"vue/attribute-hyphenation": [2, "always"]
Code:
I get two errors, but should three:
6:7 error Attribute ':showBorders' must be hyphenated vue/attribute-hyphenation
8:7 error Attribute 'keyExpr' must be hyphenated vue/attribute-hyphenation
✖ 2 problems (2 errors, 0 warnings)
2 errors and 0 warnings potentially fixable with the
--fix
option.The text was updated successfully, but these errors were encountered: