Enforce usage of Element.prototype.getAttribute
instead of Element.prototype.datalist
(github/no-dataset
)
💼 This rule is enabled in the 🔍 browser
config.
Due to camel-case transformations, using dataset is not easily greppable. Instead, use el.getAttribute('data-what-ever')
.
👎 Examples of incorrect code for this rule:
el.dataset.coolThing
👍 Examples of correct code for this rule:
el.getAttribute('data-cool-thing')
4.3.2