Skip to content

Commit c2bcae5

Browse files
committedNov 15, 2021
feat: update schema for new labelComponents option
1 parent 901d3fe commit c2bcae5

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed
 

‎src/rules/form-control-has-label.ts

+15-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,21 @@ const rule: Rule.RuleModule = {
4444
messages: {
4545
default:
4646
"Each form element must have a programmatically associated label element."
47-
}
47+
},
48+
schema: [
49+
{
50+
type: "object",
51+
properties: {
52+
labelComponents: {
53+
type: "array",
54+
items: {
55+
type: "string"
56+
},
57+
uniqueItems: true
58+
}
59+
}
60+
}
61+
]
4862
},
4963
create(context) {
5064
return defineTemplateBodyVisitor(context, {

0 commit comments

Comments
 (0)
Please sign in to comment.