nx
nx copied to clipboard
Tailwind generator to include Tailwind Prettier Plugin
- [x] I'd be willing to implement this feature (contributing guide)
Description
Include prettier-plugin-tailwindcss
as part of the tailwind generator installation.
Motivation
I believe this is a good default that helps keep your tailwind classes in an order that makes sense, without needing to use a personal style, or worse, no style at all.
Suggested Implementation
I had some trouble getting this to work initially. I found that converting .prettierrc
to prettierrc.js
and adding the following works quite well:
module.exports = {
// other prettier settings here
plugins: ['prettier-plugin-tailwindcss'],
}
Alternate Implementations
- Add these steps to the documentation so it's easy for someone to manually add
- Add a flag that'll add this step automatically (eg:
nx g @nx/react:setup-tailwind --prettier-sorting
- Both 1 and 2
Can I work on this?
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.