Skip to content

Allow underscore prefix to disable no-unused-vars #1058

Closed
@fiesh

Description

@fiesh

If one wants to repeat a block n times, a v-for="i in n" comes in handy.

Now vue/no-unused-vars will rightfully complain that i is unused.

In TypeScript, there's a similar issue with function arguments that are not used on purpose. These are ignored as unused if prefixed with a _.

How about allowing this for no-unused-vars as well? So that v-for="_i in n" would not warn, while v-for="i in n" would.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions