Prefer using .dataset on DOM elements over .setAttribute(…) This rule is fixable. Fail element.setAttribute('data-unicorn', '🦄'); Pass element.dataset.unicorn = '🦄';