illegal attr - bhsd-harry/wikiparser-node GitHub Wiki

illegal-attr

❌ By default, this rule reports illegal attributes of extension tags and HTML tags as errors.

Options

tabindex

This option can be configured to specify the severity of an non-zero tabindex.

Examples of incorrect code for { "illegal-attr": [ 0, { "tabindex": 2 } ] }:

<br tabindex=1>

Examples of correct code for { "illegal-attr": [ 2, { "tabindex": 0 } ] }:

<br tabindex=1>

unknown

This option can be configured to specify the severity of unknown attribute names.

Examples of incorrect code for { "illegal-attr": [ 0, { "unknown": 2 } ] }:

<br foo="bar">

Examples of correct code for { "illegal-attr": [ 2, { "unknown": 0 } ] }:

<br foo="bar">

value

This option can be configured to specify the severity of invalid attribute values.

Examples of incorrect code for { "illegal-attr": [ 0, { "value": 2 } ] }:

<ol type="foo"></ol>
<img src="foo"/>

Examples of correct code for { "illegal-attr": [ 2, { "value": 0 } ] }:

<ol type="foo"></ol>
<img src="foo"/>
⚠️ **GitHub.com Fallback** ⚠️