Skip to content

Conversation

@thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Sep 18, 2023

When using Astro with React you’d also want to sort className in addition to class and class:list. While we might be able to do some work to figure out if the element the attribute is on is a React component it seems unnecessary and I think it’s reasonable to have this enabled all the time.

Fixes #213

When using Astro with React you’d also want to sort `className` in addition to `class` and `class:list`. While we might be able to do some work to figure out if the element the attirubte is on is a React component it seems unncessary and I think it’s reasonable to have this enabled all the time.
@thecrypticace thecrypticace changed the title Add className to sortable properties in Astro Sort classes inside className in Astro Sep 18, 2023
@thecrypticace thecrypticace merged commit b300077 into main Sep 18, 2023
@thecrypticace thecrypticace deleted the feat/astro-class-name branch September 18, 2023 14:22
bronisMateusz pushed a commit to bronisMateusz/prettier-plugin-tailwindcss-drupal that referenced this pull request Apr 16, 2025
* Update lockfile

* Add `className` to sortable properties in Astro

When using Astro with React you’d also want to sort `className` in addition to `class` and `class:list`. While we might be able to do some work to figure out if the element the attribute is on is a React component it seems unnecessary and I think it’s reasonable to have this enabled all the time.

* Update changelog
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.

Using React Component with className prop in Astro, this plugin doesn't work

2 participants