11// Copyright (c) Microsoft Corporation.
22// Licensed under the MIT License.
33
4+ import type { TSESLint , TSESTree } from "@typescript-eslint/utils" ;
45import { AST_NODE_TYPES } from "@typescript-eslint/utils" ;
6+ import { Rule , RuleTester } from "eslint" ;
57
8+ import { hasDefinedProp } from "../../../../lib/util/hasDefinedProp" ;
9+ import { hasFieldParent } from "../../../../lib/util/hasFieldParent" ;
10+ import { hasLabeledChild } from "../../../../lib/util/hasLabeledChild" ;
611import { hasNonEmptyProp } from "../../../../lib/util/hasNonEmptyProp" ;
12+ import { hasTextContentChild } from "../../../../lib/util/hasTextContentChild" ;
13+ import { hasToolTipParent } from "../../../../lib/util/hasTooltipParent" ;
714import {
15+ hasAssociatedLabelViaAriaDescribedby ,
816 hasAssociatedLabelViaAriaLabelledBy ,
9- isInsideLabelTag ,
1017 hasAssociatedLabelViaHtmlFor ,
11- hasAssociatedLabelViaAriaDescribedby
18+ isInsideLabelTag
1219} from "../../../../lib/util/labelUtils" ;
13- import { hasFieldParent } from "../../../../lib/util/hasFieldParent" ;
1420import { hasAccessibleLabel , LabeledControlConfig , makeLabeledControlRule } from "../../../../lib/util/ruleFactory" ;
15- import type { TSESLint , TSESTree } from "@typescript-eslint/utils" ;
16- import { Rule , RuleTester } from "eslint" ;
17- import { hasLabeledChild } from "../../../../lib/util/hasLabeledChild" ;
18- import { hasToolTipParent } from "../../../../lib/util/hasTooltipParent" ;
19- import { hasTextContentChild } from "../../../../lib/util/hasTextContentChild" ;
2021
2122jest . mock ( "../../../../lib/util/hasDefinedProp" , ( ) => ( {
2223 hasDefinedProp : jest . fn ( )
2324} ) ) ;
25+
26+ jest . mock ( "../../../../lib/util/hasNonEmptyProp" , ( ) => ( {
27+ hasNonEmptyProp : jest . fn ( )
28+ } ) ) ;
2429jest . mock ( "../../../../lib/util/labelUtils" , ( ) => ( {
2530 hasAssociatedLabelViaAriaDescribedby : jest . fn ( ) ,
2631 hasAssociatedLabelViaAriaLabelledBy : jest . fn ( ) ,
@@ -36,8 +41,6 @@ jest.mock("../../../../lib/util/hasLabeledChild", () => ({
3641jest . mock ( "../../../../lib/util/hasTooltipParent" , ( ) => ( {
3742 hasToolTipParent : jest . fn ( )
3843} ) ) ;
39-
40- import { hasDefinedProp } from "../../../../lib/util/hasDefinedProp" ;
4144jest . mock ( "../../../../lib/util/hasTextContentChild" , ( ) => ( {
4245 hasTextContentChild : jest . fn ( )
4346} ) ) ;
0 commit comments