-
Notifications
You must be signed in to change notification settings - Fork 1k
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 #5812
Conversation
✅ Deploy Preview for redwoodjs-docs canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Morishiri Thanks again for doing this, this plugin is a big productivity boost while working with TailwindCSS. 😄
When I tested it, I got 2 problems.
First, in the export object, the key don't have quote and value have single quote like this :
module.exports = {
trailingComma: 'es5',
bracketSpacing: true,
...
}
You can check the default file https://github.com/redwoodjs/redwood/blob/main/packages/create-redwood-app/template/prettier.config.js
Secondly, like in the example you wrote, tailwindConfig
and plugins
should be in the bottom of the file, but I get it inside the overrides
option. You probably need to test your regex from a new project.
Tell me what you think :)
I will check that out. |
@simoncrypta please take a look again |
fa25c47
to
d325d41
Compare
'postcss-loader', | ||
'tailwindcss', | ||
'autoprefixer', | ||
'prettier-plugin-tailwindcss', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Morishiri It's looking good ! Last thing, I think prettier-plugin-tailwindcss
should be in the package.json on the root, otherwise that will cause error on the output console for Prettier on VS Code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's probably mean 2 different installation process.
Hey @Morishiri |
Yes, |
1395da3
to
f26daad
Compare
@simoncrypta done I think ;) |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 61f0ab4. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 14 targets
Sent with 💌 from NxCloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything look perfect !
Sorry for the delay, and thank you very much for this ! 😄
Co-authored-by: Simon Gagnon <git@simoncrypta.dev>
Co-authored-by: Simon Gagnon <git@simoncrypta.dev>
…onfig-plugins * 'main' of github.com:redwoodjs/redwood: (78 commits) fix(cli): Modify existence check of jest.config to check for both .js and .ts extensions in rw test (redwoodjs#6074) Tutorial 6.4: Add type generics to mockGraphQLMutation (redwoodjs#6046) Tutorial 6.2: Add generics type hint to CellSuccessProps (redwoodjs#6042) fix(deps): update graphql-tools monorepo (redwoodjs#6066) fix(deps): update dependency @types/node to v16.11.46 (redwoodjs#6065) chore(deps): update dependency @okta/okta-auth-js to v6.7.3 (redwoodjs#6068) chore(deps): update dependency @types/react to v17.0.48 (redwoodjs#6069) CLI responsiveness (redwoodjs#6028) Copy changes from "Make Jest Debugging a No-Brainer" (5296) (redwoodjs#6070) fix(deps): update dependency @graphql-codegen/cli to v2.11.0 (redwoodjs#6067) Update yarn.lock Version docs to 2.2 Update all contributors Update yarn.lock v2.2.0 Dedupe yarn.lock Show correct env filename on serverless firstrun deploy (redwoodjs#6023) chore(deps): update dependency firebase to v9.9.1 (redwoodjs#6020) tailwindcss ui: Add tailwindcss prettier rules (redwoodjs#5812) fix(deps): update dependency eslint-plugin-jsx-a11y to v6.6.1 (redwoodjs#6017) ...
Strange, but it succeeds for me without issues, maybe differences in yarn version?
|
@simoncrypta I think we're using yarn v3, is it some new fact? Was it on yarn v1 before? https://github.com/redwoodjs/redwood/blob/main/.yarnrc.yml#L19 |
@Morishiri Yes we use yarn v3 since the V1, it was V1 before and is still possible to have yarn v1 inside the project. |
I guessed we will need to check the yarn version and add the -W flag on the V1 (or V3) only ? |
happens on v1 |
Closes #5795
Standard scenarios:
Before:
After:
After with
--force
(no changes):Scenario when user has something in plugins already:
Before:
After: