tags-check
Check if particular tags are self-closing or must include or exclude particular tags.
Level: Error
Config value
Section titled “Config value”- true: enable rule
- false: disable rule
{}:
configuration object, mapping values of tags to their respective configuration. Tags configuration can have properties of:
selfclosing
If an element is or is not self-closing, when it otherwise should be.
Level: warn
attrsRequired
If an element is missing an attribute that should exist.
Level: Error
redundantAttrs
If an element has an attribute that is not necessary.
Level: Error
attrsOptional
If an element has an attribute that is not included in the allowable set.
Level: Error
Example
Section titled “Example”{ ... "tags-check": { "a": { "selfclosing": true, "attrsRequired": ["href", "title"], "redundantAttrs": ["alt"],