We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b3b8d0 commit 536ae9fCopy full SHA for 536ae9f
lib/util/labelUtils.ts
@@ -41,7 +41,7 @@ const hasLabelWithHtmlForId = (idValue: string, context: TSESLint.RuleContext<st
41
}
42
const sourceCode = context.getSourceCode();
43
44
- const regex = /<(Label|label)[^>]*\bid\b\s*=\s*["{']([^"'{}]*)["'}]/gi;
+ const regex = /<(Label|label)[^>]*\bhtmlFor\b\s*=\s*["{']([^"'{}]*)["'}]/gi;
45
46
let match;
47
while ((match = regex.exec(sourceCode.text)) !== null) {
0 commit comments