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

Sign up
Appearance settings

fix(v-on-handler-style): fixed the breaking change caused by the auto-fix on functions without parameters(#2538) #2539

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

Open
heggria wants to merge 4 commits into vuejs:master
base: master
Choose a base branch
Loading
from heggria:master
Open
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
Next Next commit
Fix the vue/v-on-handler-style breaking change (#2538)
  • Loading branch information
heggria committed Aug 29, 2024
commit d1660232b0525cb96299c036a90cb8dfaf1eec2a
7 changes: 6 additions & 1 deletion lib/rules/v-on-handler-style.js
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ module.exports = {
return null
}
const paramCount = methodParamCountMap.get(idCallExpr.callee.name)
// disable the auto-fixed when the node does't have params
if (paramCount == 0) {
return null
}
if (paramCount != null && paramCount > 0) {
// The behavior of target method can change given the arguments.
return null
Expand Down Expand Up @@ -368,7 +372,8 @@ module.exports = {
) {
return null
}
if (!isSameParamsAndArgs(idCallExpr)) {
// disable the auto-fixed when the node does't have params
if (node.params.length === 0 || !isSameParamsAndArgs(idCallExpr)) {
// It is not a call with the arguments given as is.
return null
}
Expand Down

AltStyle によって変換されたページ (->オリジナル) /