tailwindlabs / prettier-plugin-tailwindcss

A Prettier plugin for Tailwind CSS that automatically sorts classes based on our recommended class order.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting prettier error while linting with TW 3.4

bigint opened this issue · comments

What version of prettier-plugin-tailwindcss are you using?

For example: v0.5.9

What version of Tailwind CSS are you using?

For example: v3.4

What version of Node.js are you using?

For example: v18.0.0

What package manager are you using?

For example: pnpm

What operating system are you using?

For example: macOS, Windows

Reproduction URL

https://github.com/heyxyz/hey

Describe your issue

image

Here is the PR heyxyz/hey#4290

Hey, this is expected. We changed the order of some stuff and that's going to move dark classes toward the end where they weren't before.

@thecrypticace but its also happening for the new size-* classnames, is it expected? any ideas how to fix the lint errors? we changed nothing from our size, we just added replaced with h and w with size classes 🙇🏼

@bigint The size classes didn't exist before 3.4 — I'm guessing you had some custom ones that you removed? In that case, yes it's expected. Our own classes will appear before any introduced by plugins.

The fix for the lint errors is to run prettier again and commit the changes.

But seems like the package version has not been bumped!

Screenshot 2023-12-21 at 9 43 59 PM

I think there is still conflict between eslint-prettier and prettier

prettier works fine, but while running with eslint-prettier it throws the error!

prettier:fix didn't helped @thecrypticace 🙇🏼

There was no change in the prettier plugin — nor was any change necessary. The new sorting is a result of upgrading Tailwind CSS which the prettier plugin has picked up properly.

Do you have a link to your project?

Here is the PR heyxyz/hey#4290

commented

+1

we are experiencing the same. https://github.com/tapexyz/tape

For the time being, i just commented the plugin in prettier and pushed!

@thecrypticace seems like happening for lot of folks 🙈

Hi. I'm facing the same issue, and it seems the issue is resolved with PR #235. The only thing I want is the fixed version to be released. There has been no release after the PR.

@thecrypticace I am also having this issue, is the solution to wait for a new release?

@dotoleeoak ah so you're using the prettier plugin without a base tailwind install (CDN and the like). Meant to get a release out but then the holidays hit.

I've got some downtime today — I'll tag a new release!

https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases/tag/v0.5.10

Published and it looks to be available on NPM already.

Ping me if you have any other problems.

@thecrypticace thanks, the issue is fixed

@thecrypticace Thanks! I also confirmed the issue has been fixed.