francoismassart / eslint-plugin-tailwindcss

ESLint plugin for Tailwind CSS usage
https://www.npmjs.com/package/eslint-plugin-tailwindcss
MIT License
1.38k stars 65 forks source link

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

Closed martinsjek closed 2 months ago

martinsjek commented 4 months ago

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"

kachkaev commented 4 months ago

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 commented 2 months ago

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 commented 2 months ago

Fixed in 3.15.2