-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[Prettier Plugin] Handle two more plugins #13708
Comments
Heads up - If you add the patch, make sure you format the entire repository once without making any other changes. Raise a PR, and let others know that they might need to resolve conflicts. This applies to large projects. Since whitespace and duplicate Tailwind CSS will be removed, it could create conflicts. Hence, it is important to have an atomic patch creation and format of the entire repo in a single PR. |
The official fix has been merged in via tailwindlabs/prettier-plugin-tailwindcss#272. Version 0.6.0. |
Discussed in #13630
Originally posted by un33k May 3, 2024
Description
We are encountering a compatibility issue where certain Prettier plugins must be able to precede the Tailwind CSS plugin without losing functionality or disabling Tailwind. This compatibility is crucial for maintaining our project's code formatting standards and utility functionality.
Affected Plugins
@softonus/prettier-plugin-duplicate-remover
@softonus/prettier-plugin-whitespace-remover
Desired Outcome
The desired outcome is for these plugins to function correctly when placed before the Tailwind CSS plugin in the Prettier configuration file. This would allow for better flexibility in managing code formatting and style consistency.
Current Behavior
Steps to Reproduce
.prettierrc
file.Suggested Solution
Investigate potential changes or enhancements in the plugin architecture or initialization sequence that would allow these plugins to operate effectively when configured before the Tailwind CSS plugin. This might involve modifications to how plugins are loaded or processed by Prettier when working with CSS frameworks like Tailwind.
Beneficial Side Effect:
Implementing this change will also have the added advantage of negating the need for the Tailwind plugin to include its own duplicate and whitespace remover functionalities. This would not only streamline the Tailwind plugin but also reduce redundancy and potential conflicts between these utilities.
We appreciate your consideration and any efforts to enhance the compatibility of these tools, which are crucial for our development workflows.
They should be added to this file: https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/3c9ce4e488c09851be1d5be37940b39679e10c1c/src/plugins.js#L174
The text was updated successfully, but these errors were encountered: