Skip to content

Commit

Permalink
Remove legacy schema from vue/custom-event-name-casing
Browse files Browse the repository at this point in the history
  • Loading branch information
FloEdelmann committed Nov 27, 2024
1 parent d27c7e6 commit 1a48768
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
14 changes: 2 additions & 12 deletions lib/rules/custom-event-name-casing.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ module.exports = {
},
OBJECT_OPTION_SCHEMA
]
},
// For backward compatibility
{
type: 'array',
items: [OBJECT_OPTION_SCHEMA]
}
]
},
Expand All @@ -102,13 +97,8 @@ module.exports = {
/** @type {Map<ObjectExpression|Program, {contextReferenceIds:Set<Identifier>,emitReferenceIds:Set<Identifier>}>} */
const setupContexts = new Map()
let emitParamName = ''
const options =
context.options.length === 1 && typeof context.options[0] !== 'string'
? // For backward compatibility
[undefined, context.options[0]]
: context.options
const caseType = options[0] || DEFAULT_CASE
const objectOption = options[1] || {}
const caseType = context.options[0] || DEFAULT_CASE
const objectOption = context.options[1] || {}
const caseChecker = casing.getChecker(caseType)
/** @type {RegExp[]} */
const ignores = (objectOption.ignores || []).map(toRegExp)
Expand Down
12 changes: 0 additions & 12 deletions tests/lib/rules/custom-event-name-casing.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,18 +237,6 @@ tester.run('custom-event-name-casing', rule, {
]
},

// For backward compatibility
{
filename: 'test.vue',
code: `
<template>
<input
@click="$emit('fooBar')">
</template>
`,
options: [{ ignores: ['fooBar'] }]
},

// camelCase
{
filename: 'test.vue',
Expand Down

0 comments on commit 1a48768

Please sign in to comment.