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

[docs-infra] Add Tailwind CSS Prettier plugin #44854

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Dec 24, 2024

I have often got the impression that using Tailwind CSS without Prettier, VS Code, and all the tools that are part of the developer lifecycle isn't truly using Tailwind CSS, it's part of the whole point, e.g. https://x.com/adamwathan/status/1796582408621523320/quotes. Since Base UI uses this plugin, I believe we must standardize to use it in all our codebase. We are unlikely to have a lot of Tailwind CSS code in this repository, but the X repositories will likely have more.

Opportunity noticed in mui/base-ui#1183.


One point of caution:

time pnpm prettier:all

Before:
71.66s user
5.94s system
148% cpu
52.204 total

After:
88.86s user
13.81s system
135% cpu
1:15.66 total

It's very noticeable (+44%) but not a huge concern. We rarely prettier the whole codebase.

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation scope: docs-infra Specific to the docs-infra product labels Dec 24, 2024
@oliviertassinari oliviertassinari force-pushed the prettier-plugin-tailwindcss branch from 3df60a1 to 833295d Compare December 24, 2024 18:49
@oliviertassinari oliviertassinari changed the title [docs-infra] Polish Tailwind CSS demos [docs-infra] Add Tailwind CSS Prettier plugin Dec 24, 2024
@mui-bot
Copy link

mui-bot commented Dec 24, 2024

"babel-plugin-tester": "^11.0.4",
"babel-plugin-tester": "^12.0.0-canary.1",
Copy link
Member Author

@oliviertassinari oliviertassinari Dec 24, 2024

Choose a reason for hiding this comment

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

Why babel-utils/babel-plugin-tester#269. Removing older prettier versions in our dependency graph, allowing us to fully support prettier ESM plugins like this new one.

@oliviertassinari oliviertassinari force-pushed the prettier-plugin-tailwindcss branch from 7177bb3 to 84392e6 Compare December 24, 2024 22:25
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Dec 27, 2024
@oliviertassinari oliviertassinari force-pushed the prettier-plugin-tailwindcss branch from c6d8c34 to 80ad698 Compare December 27, 2024 20:26
@oliviertassinari oliviertassinari force-pushed the prettier-plugin-tailwindcss branch from 80ad698 to fa386f3 Compare December 27, 2024 22:07
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Dec 27, 2024
@oliviertassinari oliviertassinari added the enhancement This is not a bug, nor a new feature label Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation enhancement This is not a bug, nor a new feature scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants