Idered / eslint-plugin-tailwind

ESLint rules for Tailwind CSS
MIT License
100 stars 7 forks source link

Prefer theme() over @apply #10

Closed sumanthratna closed 3 years ago

sumanthratna commented 3 years ago

According to this tweet, theme() is less error-prone than @apply: https://twitter.com/adamwathan/status/1226511611592085504

@adamwathan is this still the case in Tailwind 2? If so, I think an ESLint rule in this library could help warn users about this and it would be really useful if eslint --fix could apply a proper codemod to automagically convert from theme() to @apply

(I might be able to push a PR for this)

adamwathan commented 3 years ago

Both are fine, I wouldn't recommend a lint rule for it personally.

sumanthratna commented 3 years ago

Both are fine, I wouldn't recommend a lint rule for it personally.

Thanks for the reply; closing