Skip to content

Rule Proposal: vue/no-multiple-slot-args #812

Closed
@mysticatea

Description

@mysticatea

Please describe what the rule should do:

This rule disallows to pass multiple arguments to scoped slots.
In details, it reports call expressions if a call of this.$scopedSlots members has 2 or more arguments.

Because Evan looks to recommend avoiding that.

I don't want to force you to re-design your API, but you really should avoid using this in the future, and possibly migrate away from it when you can.
vuejs/vue#9468

What category should the rule belong to?

  • Enforces code style
  • Warns about a potential error
  • Suggests an alternate way of doing something
  • Other (please specify:)

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

export default {
    render() {
        return this.$scopedSlots.foo('foo', 'bar')
    }
}

Additional context

Nothing in particular.

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