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

[BUG] "rounded-[0.25rem]" will transform to "rounded-DEFAULT" for some reason #326

Closed
martinsjek opened this issue Mar 15, 2024 · 3 comments
Assignees
Labels

Comments

@martinsjek
Copy link

martinsjek commented Mar 15, 2024

Describe the bug
"rounded-[0.25rem]" will transform to "rounded-DEFAULT" for some reason.

To Reproduce
Steps to reproduce the behavior:
I am using ESLint with PHPStorm and on save the ESlint executes and this behavior will happen

Expected behavior
"rounded-[0.25rem]" should transform to "rounded"

@martinsjek martinsjek added the bug Something isn't working label Mar 15, 2024
@kachkaev
Copy link
Contributor

kachkaev commented Mar 18, 2024

Also seeing errors like

/path/to/component.tsx
  17:11  warning  The arbitrary class 'border-b-[1px]' could be replaced by 'border-b-DEFAULT'  tailwindcss/no-unnecessary-arbitrary-value
/path/to/component.tsx
  30:16  warning  The arbitrary class 'grow-[1]' could be replaced by 'grow-DEFAULT'  tailwindcss/no-unnecessary-arbitrary-value

I guess that removing -DEFAULT from the resulting class names might do the job.

@francoismassart
Copy link
Owner

I made a fix which you can test via this beta version
npm i eslint-plugin-tailwindcss@3.15.3-beta.0

Let me know how it works for you

@francoismassart
Copy link
Owner

Fixed in 3.15.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants