Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule proposal: prefer-dataset #166

Closed
sindresorhus opened this issue Mar 15, 2018 · 5 comments · Fixed by #225
Closed

Rule proposal: prefer-dataset #166

sindresorhus opened this issue Mar 15, 2018 · 5 comments · Fixed by #225

Comments

@sindresorhus
Copy link
Owner

sindresorhus commented Mar 15, 2018

Issuehunt badges

Prefer the .dataset property on DOM elements over using setAttribute.

We would detect setAttribute and that the string starts with data-.

Fail

element.setAttribute('data-unicorn', '🦄');

Pass

element.dataset.unicorn = '🦄';

IssueHunt Summary

amedora amedora has been rewarded.

Backers (Total: $60.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@lexcorp16
Copy link

@sindresorhus how can I get started with this?

@udaypydi
Copy link

if @lexcorp16 has not started, I would like to get started with this @sindresorhus .

@IssueHuntBot
Copy link

@issuehuntfest has funded $60.00 to this issue. See it on IssueHunt

@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label May 10, 2019
Repository owner deleted a comment from EROPLM May 21, 2019
@issuehunt-oss
Copy link

issuehunt-oss bot commented Sep 16, 2019

@sindresorhus has rewarded $54.00 to @amedora. See it on IssueHunt

  • 💰 Total deposit: $60.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $6.00

@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt This issue has been funded on Issuehunt labels Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants