Skip to content
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

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

Closed
1 of 4 tasks
mysticatea opened this issue Feb 11, 2019 · 0 comments · Fixed by #1179
Closed
1 of 4 tasks

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

mysticatea opened this issue Feb 11, 2019 · 0 comments · Fixed by #1179

Comments

@mysticatea
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant