diff --git a/lib/configs/vue3-strongly-recommended.js b/lib/configs/vue3-strongly-recommended.js index 564e386b1..a3f854fc4 100644 --- a/lib/configs/vue3-strongly-recommended.js +++ b/lib/configs/vue3-strongly-recommended.js @@ -30,6 +30,7 @@ module.exports = { 'vue/v-bind-style': 'warn', 'vue/v-on-event-hyphenation': [ 'warn', + 'always', { autofix: true } diff --git a/lib/rules/v-on-event-hyphenation.js b/lib/rules/v-on-event-hyphenation.js index b797b3b79..9ebe7554d 100644 --- a/lib/rules/v-on-event-hyphenation.js +++ b/lib/rules/v-on-event-hyphenation.js @@ -12,7 +12,7 @@ module.exports = { categories: ['vue3-strongly-recommended'], url: 'https://eslint.vuejs.org/rules/v-on-event-hyphenation.html', defaultOptions: { - vue3: [{ autofix: true }] + vue3: ['always', { autofix: true }] } }, fixable: 'code', diff --git a/tests/lib/configs/configs.js b/tests/lib/configs/configs.js new file mode 100644 index 000000000..e21d2e455 --- /dev/null +++ b/tests/lib/configs/configs.js @@ -0,0 +1,25 @@ +'use strict' + +const { ESLint } = require('../../eslint-compat') +const plugin = require('../../../lib/index') + +describe('configs', () => { + for (const name of Object.keys(plugin.configs)) { + const configName = `plugin:vue/${name}` + const eslint = new ESLint({ + overrideConfig: { + extends: [configName] + }, + useEslintrc: false, + plugins: { vue: plugin }, + fix: true + }) + describe(`test for ${configName}`, () => { + it('without error', async () => { + await eslint.lintText('', { + filePath: 'test.vue' + }) + }) + }) + } +})