Movatterモバイル変換


[0]ホーム

URL:


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

Enforce style of passing an event or part of an event to a method #1611

Closed
@leonheess

Description

@leonheess

Please describe what the rule should do:
In Vue you can usetest($event.detail) as well asevent => test(event.detail) to achieve the same thing. 1. should be preferred.

  1. test($event.detail)
<Component  @click="test($event.detail)"/>
  1. event => test(event.detail)
<Component  @click="event=>test(event.detail)"/>

What category should the rule belong to?
[X] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

<Component  @click="event=>test(event.detail)"/>
<Component  @click="({detail })=>test(detail)"/>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp