Skip to content

Commit a725170

Browse files
authored
Make vue/v-on-event-hyphenation autofixable by default in Vue 3 (#2320)
1 parent e008d34 commit a725170

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

lib/configs/vue3-strongly-recommended.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ module.exports = {
2828
'vue/require-prop-types': 'warn',
2929
'vue/singleline-html-element-content-newline': 'warn',
3030
'vue/v-bind-style': 'warn',
31-
'vue/v-on-event-hyphenation': 'warn',
31+
'vue/v-on-event-hyphenation': [
32+
'warn',
33+
{
34+
autofix: true
35+
}
36+
],
3237
'vue/v-on-style': 'warn',
3338
'vue/v-slot-style': 'warn'
3439
}

lib/rules/v-on-event-hyphenation.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ module.exports = {
1010
description:
1111
'enforce v-on event naming style on custom components in template',
1212
categories: ['vue3-strongly-recommended'],
13-
url: 'https://eslint.vuejs.org/rules/v-on-event-hyphenation.html'
13+
url: 'https://eslint.vuejs.org/rules/v-on-event-hyphenation.html',
14+
defaultOptions: {
15+
vue3: [{ autofix: true }]
16+
}
1417
},
1518
fixable: 'code',
1619
schema: [

0 commit comments

Comments
 (0)