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

prefer-classlist rule should be removed from recommended configs #34

Closed
joshwilsonvu opened this issue Oct 25, 2022 · 0 comments · Fixed by #38
Closed

prefer-classlist rule should be removed from recommended configs #34

joshwilsonvu opened this issue Oct 25, 2022 · 0 comments · Fixed by #38
Assignees
Labels
enhancement New feature or request

Comments

@joshwilsonvu
Copy link
Collaborator

Though the classList prop on native elements has been presented in the docs as an alternative to using a classnames helper like clsx, it is now considered regrettable—see the conversation around this Discord message. Essentially, it places more burden on TS typing and library maintenance, without much upside.

The solid/prefer-classlist rule has been autofixing helpers to classList, pushing people in the wrong direction. I wouldn't go so far as to start autofixing the other way, as users may not have classnames helpers available, but we should at least remove the rule from recommended configs and possibly deprecate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant