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

feat: add prettier-plugin-tailwind #22

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

andrealps
Copy link

Issue #21

Add prettier-plugin-tailwind in order to sort Tailwind classes easily

More info here: Automatic class sorting with prettier

Example:
image

@andrealps andrealps linked an issue Nov 28, 2024 that may be closed by this pull request
Comment on lines +49 to 56
"eslint": "9.15.0"
},
"devDependencies": {
"eslint": "9.15.0",
"jiti": "2.4.0",
"prettier": "3.3.3",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.9",
"tsup": "8.3.5",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect it to be dep and not devDep

@davidglezz
Copy link
Contributor

Please load the plugin only if tailwind is installed: This could give you some ideas:
https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/90b025327d4a1fdb13d536f349093245796f4900/src/plugins.ts#L133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add prettier-plugin-tailwind
2 participants