Skip to content

Conversation

@bradlc
Copy link
Contributor

@bradlc bradlc commented Apr 19, 2022

This PR adds a couple of additional class list formatting features to the plugin:

  1. Whitespace tidying. Excess whitespace is removed from single-line class lists:
    - <div className="    sm:p-0   p-4  " />
    + <div className="p-4 sm:p-0" />
  2. Duplicate removal. Duplicate classes are removed from class lists:
    - <div className="sm:p-0 p-4 p-4" />
    + <div className="p-4 sm:p-0" />

@bradlc bradlc merged commit e0f9bd5 into main Apr 19, 2022
@hyunbinseo
Copy link

스크린샷 2022-04-20 오전 9 43 42

Link for this PR in the v0.1.9 release is incorrect.

bradlc added a commit that referenced this pull request Apr 20, 2022
@bradlc bradlc mentioned this pull request Apr 20, 2022
bradlc added a commit that referenced this pull request Apr 20, 2022
@ruoruochen
Copy link

ruoruochen commented Aug 19, 2022

Why doesn't it work here? "prettier-plugin-tailwindcss": "^0.1.13",

karlhorky added a commit to upleveled/prettier-plugin-tailwindcss that referenced this pull request May 23, 2024
karlhorky added a commit to upleveled/prettier-plugin-tailwindcss that referenced this pull request May 23, 2024
bronisMateusz pushed a commit to bronisMateusz/prettier-plugin-tailwindcss-drupal that referenced this pull request Apr 16, 2025
* Remove duplicate classes

* Trim whitespace from class lists

* Don't tidy whitespace in multi-line class lists

* Update tests

* `trim` -> `tidy`

* Formatting

* Update tests

* Formatting
bronisMateusz pushed a commit to bronisMateusz/prettier-plugin-tailwindcss-drupal that referenced this pull request Apr 16, 2025
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.

4 participants