nx icon indicating copy to clipboard operation
nx copied to clipboard

Tailwind generator to include Tailwind Prettier Plugin

Open mj-meyer opened this issue 1 year ago • 2 comments

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

  1. Add these steps to the documentation so it's easy for someone to manually add
  2. Add a flag that'll add this step automatically (eg: nx g @nx/react:setup-tailwind --prettier-sorting
  3. Both 1 and 2

mj-meyer avatar May 28 '23 05:05 mj-meyer

Can I work on this?

Arindam200 avatar Jun 12 '23 06:06 Arindam200

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! 🙏

github-actions[bot] avatar Feb 18 '24 00:02 github-actions[bot]

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.

github-actions[bot] avatar Apr 03 '24 00:04 github-actions[bot]