Skip to content

Commit

Permalink
Fixed broken config of plugin:vue/vue3-strongly-recommended (#2334)
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Nov 30, 2023
1 parent 1437921 commit 1f3111b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/configs/vue3-strongly-recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
'vue/v-bind-style': 'warn',
'vue/v-on-event-hyphenation': [
'warn',
'always',
{
autofix: true
}
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/v-on-event-hyphenation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
25 changes: 25 additions & 0 deletions tests/lib/configs/configs.js
Original file line number Diff line number Diff line change
@@ -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'
})
})
})
}
})

0 comments on commit 1f3111b

Please sign in to comment.