-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
I have code like this:
<element attr="bar"></element>
<element attr="foo"></element>
And I know that the valid set of attributes for element
is [bar
, baz
]. Emitting a warning on an invalid attribute would be great! Since this seems tricky to do for HTML attributes by default, I would propose a rule that lets you configure this set per attribute and element (perhaps if elements
is not present, it applies to all elements).
validAttrs: {
attr: { values: ["bar", "foo"], elements: ["element"] }
}
One edge case to be aware of is that if the attribute value contains a templating expression, it should be ignored.
<element attr="{{ dynamic_val }}"></element>
Thank you so much for this plugin!
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request