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

tailwindcss ui: Add tailwindcss prettier rules #5795

Closed
Morishiri opened this issue Jun 21, 2022 · 5 comments · Fixed by #5812 or #6119
Closed

tailwindcss ui: Add tailwindcss prettier rules #5795

Morishiri opened this issue Jun 21, 2022 · 5 comments · Fixed by #5812 or #6119
Assignees
Labels
topic/cli topic/config Babel, Webpack, ESLint, Prettier, etc.

Comments

@Morishiri
Copy link
Contributor

Tailwind introduced https://tailwindcss.com/blog/automatic-class-sorting-with-prettier

What do you think about adding that when setting up tailwindcss as ui?

@redwoodjs-bot redwoodjs-bot bot added this to Main Jun 21, 2022
@redwoodjs-bot redwoodjs-bot bot moved this to Triage in Main Jun 21, 2022
@simoncrypta
Copy link
Collaborator

Hey @Morishiri This is an excellent idea !
I thought it was already the case, but is not.

This what is look like in my prettier.config.js file :

{
...
  tailwindConfig: './web/config/tailwind.config.js',
  plugins: [require('prettier-plugin-tailwindcss')],
  } 

Do you want to open a PR yourself for this ? If not, I can take it.
Thanks ! :)

@simoncrypta simoncrypta added topic/cli good first issue topic/config Babel, Webpack, ESLint, Prettier, etc. labels Jun 22, 2022
@simoncrypta simoncrypta moved this from Triage to Backlog in Main Jun 22, 2022
@Morishiri
Copy link
Contributor Author

Morishiri commented Jun 22, 2022

Would love to prepare PR to learn how is it all connected when setting up with commands.

@simoncrypta
Copy link
Collaborator

Amazing ! We use Yargs for the CLI, you can find the file for the tailwind setup here https://github.com/redwoodjs/redwood/blob/main/packages/cli/src/commands/setup/ui/libraries/tailwindcss.js

Don't hesitate to ask for help if you need it :)

@vincentri
Copy link

broken for new repo cannot install tailwind

@Morishiri
Copy link
Contributor Author

broken for new repo cannot install tailwind

#5812 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/cli topic/config Babel, Webpack, ESLint, Prettier, etc.
Projects
None yet
4 participants