Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove legacy schema from vue/custom-event-name-casing #2626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions 14 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
]
},
FloEdelmann marked this conversation as resolved.
Show resolved Hide resolved
// 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 12 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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.