Skip to content

Files

Latest commit

 

History

History
33 lines (24 loc) · 840 Bytes

no-multiple-slot-args.md

File metadata and controls

33 lines (24 loc) · 840 Bytes

Pattern: Passing multiple arguments to scoped slots

Issue: -

Description

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.

<script>
export default {
  render(h) {
    /* ✓ GOOD */
    var children = this.$scopedSlots.default()
    var children = this.$scopedSlots.default(foo)
    var children = this.$scopedSlots.default({ foo, bar })

    /* ✗ BAD */
    var children = this.$scopedSlots.default(foo, bar)
    var children = this.$scopedSlots.default(...foo)
  }
}
</script>

Further Reading