Skip to content

Commit 1a48768

Browse files
committed
Remove legacy schema from vue/custom-event-name-casing
1 parent d27c7e6 commit 1a48768

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

Diff for: lib/rules/custom-event-name-casing.js

+2-12
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ module.exports = {
8585
},
8686
OBJECT_OPTION_SCHEMA
8787
]
88-
},
89-
// For backward compatibility
90-
{
91-
type: 'array',
92-
items: [OBJECT_OPTION_SCHEMA]
9388
}
9489
]
9590
},
@@ -102,13 +97,8 @@ module.exports = {
10297
/** @type {Map<ObjectExpression|Program, {contextReferenceIds:Set<Identifier>,emitReferenceIds:Set<Identifier>}>} */
10398
const setupContexts = new Map()
10499
let emitParamName = ''
105-
const options =
106-
context.options.length === 1 && typeof context.options[0] !== 'string'
107-
? // For backward compatibility
108-
[undefined, context.options[0]]
109-
: context.options
110-
const caseType = options[0] || DEFAULT_CASE
111-
const objectOption = options[1] || {}
100+
const caseType = context.options[0] || DEFAULT_CASE
101+
const objectOption = context.options[1] || {}
112102
const caseChecker = casing.getChecker(caseType)
113103
/** @type {RegExp[]} */
114104
const ignores = (objectOption.ignores || []).map(toRegExp)

Diff for: tests/lib/rules/custom-event-name-casing.js

-12
Original file line numberDiff line numberDiff line change
@@ -237,18 +237,6 @@ tester.run('custom-event-name-casing', rule, {
237237
]
238238
},
239239

240-
// For backward compatibility
241-
{
242-
filename: 'test.vue',
243-
code: `
244-
<template>
245-
<input
246-
@click="$emit('fooBar')">
247-
</template>
248-
`,
249-
options: [{ ignores: ['fooBar'] }]
250-
},
251-
252240
// camelCase
253241
{
254242
filename: 'test.vue',

0 commit comments

Comments
 (0)