-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Allow custom form controls in form-control-has-label #373
Comments
so like, just to confirm, you are saying that we should add like a {
"form-control-has-label": ["error", {
"controlComponents": ["b-form-input"]
}]
} <template>
<div>
<b-form-input /> <!-- error here because it has not a label linked to it? -->
</div>
</template> right? or did I miss something? |
Yes totally correct, your example is what I was hoping to be able to do. |
The
form-control-has-label
rule currently looks forinput
andtextinput
elements, however custom input components (in our use case, bootstrap-vue'sb-form-input
component) don't seem to be checked for labels.Is it reasonable to add a check for an implicit wrapping or explicit id-linked label for custom components? Configurable similar to how
label-has-for
can be configured to look for custom label components. I don't think deeper inspection (like this plugin does oninput
to determine eligibility depending on the type of input) is required for custom input types.The text was updated successfully, but these errors were encountered: