Closed
Description
Please describe what the rule should do:
This rule checks whether every slot-scope
(or scope
) attributes is valid.
This rule reports the following cases:
- The
slot-scope
attribute does not have that attribute value. E.g.<div slot-scope></div>
- The
slot-scope
attribute have the attribute value which is extra access to slot data. E.g.<div slot-scope="prop, extra"></div>
- The
slot-scope
attribute have the attribute value which is rest parameter. E.g.<div slot-scope="...props"></div>
maybe "extra access" and "rest parameter" are mistakes of destructuring
.
What category should the rule belong to?
- Enforces code styleWarns about a potential errorSuggests an alternate way of doing somethingOther (please specify:)
Provide 2-3 code examples that this rule should warn about:
<template>
<TheComponent>
<template slot-scope>
...
</template>
</TheComponent>
<TheComponent>
<template slot-scope="">
...
</template>
</TheComponent>
<TheComponent>
<template slot-scope="...props">
...
</template>
</TheComponent>
<TheComponent>
<template slot-scope="a, b, c">
<!-- `b` and `c` are extra access. -->
...
</template>
</TheComponent>
</template>
Additional context
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
vue/valid-slot-scope
rule #670[-]Rule Proposal: `valid-valid-slot-scope` [/-][+]Rule Proposal: `valid-slot-scope` [/+]