[Prettier Plugin] Run prettier plugin only at commit time #12542
iamandrewluca
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If anyone has the option "Format and Save" active and finds the plugin
prettier-plugin-tailwindcss
annoying during development, they can only enable it at commit time, or CI in this way.prettier.config.js
Now your editor won't run the plugin when using "Format and Save" (make sure to reload editor after applying these changes)
When you want to include it, add
INCLUDE_TAILWINDCSS_PRETTIER=true
before the prettier command.e.g. doing this in terminal
INCLUDE_TAILWINDCSS_PRETTIER=true npx prettier --write --ignore-unknown *
e.g. doing this in git hooks (husky) and lint-staged
Beta Was this translation helpful? Give feedback.
All reactions