-
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
[Feature Request] Add to each attr a conditionality option for require-attrs rule #169
Comments
Hi! @RPComputer Thanks for the suggestion!. This seems like a nice feature. |
Hi @yeonjuan, yes as default condition logical join AND sounds right! |
Hi @RPComputer
For now, I think the second option is appropriate because the first option would make a breaking change..! |
Hi @yeonjuan! Sounds good to avoid breaking changes. |
@RPComputer |
Hi @yeonjuan, |
Hello,
I think that it would be interesting to add to the require-attrs rule the conditionality option for requirement.
For example:
Given the element:
<element attr1="v1">
Rule setting:
This would make the attr2 attribute required for the element tag only if the attr1 attribute is present with value v1.
Another possibility could be the reverse: if an attribute is present/not present the following list of attributes are required.
I know that the conditions possibilities might escalate quickly but supporting a couple of basic ifs would be very helpful.
What do you think?
The text was updated successfully, but these errors were encountered: