Skip to content

adding glob to label-has-associated-control #735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/rules/label-has-associated-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ module.exports = {
return;
}
const controlComponents = [
'input',
'meter',
'output',
'progress',
'select',
'textarea',
'*Input',
'*Meter',
'*Output',
'*Progress',
'*Select',
'*Textarea',
Comment on lines +61 to +66
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I'm not sure how this actually resolves the issue tho - these are just the defaults (which should not have asterisks). mayContainChildComponent is what likely needs to be tweaked to support stars.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Jordan, thanks for your comment. I'm going to modify mayContainChildComponent and was going to include the package, picoMatch, for globs. Does this work? Thanks again.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer using minimatch, but sounds great thanks

].concat((options.controlComponents || []));
// Prevent crazy recursion.
const recursionDepth = Math.min(
Expand Down