-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(rule): template-accessibility-label-for not recognizing options a…
…nd interpolated values (#812) * refactor: simplify and rename mayContainChildComponent function * fix(rule): template-accessibility-label-for not recognizing options and interpolated values
- Loading branch information
1 parent
8d816c8
commit 1fb5d8a
Showing
4 changed files
with
224 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { ElementAst } from '@angular/compiler'; | ||
|
||
export const isChildNodeOf = (root: ElementAst, childNodeName: string): boolean => { | ||
const traverseChildNodes = (node: ElementAst): boolean => { | ||
return node.children.some(childNode => { | ||
return childNode instanceof ElementAst && (childNode.name === childNodeName || traverseChildNodes(childNode)); | ||
}); | ||
}; | ||
|
||
return traverseChildNodes(root); | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.