Adds linting for Vue events formatting
What does this MR do and why?
This change adds rules that will help with our Vue compat transition.
-
vue/v-on-event-hyphenation("Priority B: Strongly Recommended for Vue.js 3.x") andvue/custom-event-name-casing: To ensure our event names are handled uniformly in all templates. -
vue/no-deprecated-v-on-native-modifier: To prevent the .native modifier that has been deprecated. -
vue/require-explicit-emits("Priority B: Strongly Recommended for Vue.js 3.x"): Enforce the requirement to list which events a componentemits.
It adds a list of files that don't comply with the list so we can migrate gradually, but importantly, this will be enforced in all new components.
References
- https://eslint.vuejs.org/rules/v-on-event-hyphenation.html
- https://eslint.vuejs.org/rules/custom-event-name-casing.html
- https://eslint.vuejs.org/rules/require-explicit-emits.html
- https://eslint.vuejs.org/rules/no-deprecated-v-on-native-modifier.html
Screenshots or screen recordings
NA
How to set up and validate locally
NA
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Miguel Rincon