francoismassart/eslint-plugin-tailwindcss

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

martinsjek opened this issue · 3 comments

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"

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.

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

Fixed in 3.15.2