Skip to content

Commit

Permalink
🚨 Fix prettier errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vhoyer committed Jan 16, 2024
1 parent f6d91ee commit 77ffeac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/rules/form-control-has-label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,19 @@ function hasNestedLabelElement(
return true;
}

return (parent && parent.type === "VElement" && hasNestedLabelElement(parent, options));
return (
parent &&
parent.type === "VElement" &&
hasNestedLabelElement(parent, options)
);
}

/**
* Check if the form control at least has an "id" to be associated with a label
* Can't really check for the label with a matching "for" attribute, because
* checking every element in the file may lead to bad performance.
*/
function hasIdForLabelElement(
node: AST.VElement
): boolean {
function hasIdForLabelElement(node: AST.VElement): boolean {
const id = getElementAttributeValue(node, "id");

return Boolean(id);
Expand Down

0 comments on commit 77ffeac

Please sign in to comment.