We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2bcae5 commit f843307Copy full SHA for f843307
src/rules/form-control-has-label.ts
@@ -21,10 +21,10 @@ function isLabelElement(
21
| AST.VDocumentFragment
22
| AST.VText
23
| AST.VExpressionContainer,
24
- options: FormControlHasLabelOptions
+ { labelComponents = [] }: FormControlHasLabelOptions
25
) {
26
- const labelComponents = (options.labelComponents || []).map(makeKebabCase).concat("label");
27
- return node.type === "VElement" && labelComponents.includes(getElementType(node));
+ const allLabelComponents = labelComponents.map(makeKebabCase).concat("label");
+ return node.type === "VElement" && allLabelComponents.includes(getElementType(node));
28
}
29
30
function hasLabelElement(node: AST.VElement, options: FormControlHasLabelOptions): boolean {
0 commit comments