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] Arbitary bg-[size] and bg-[position] will cause a no-contradicting-classname error #321

Open robcaldecott opened 4 months ago

robcaldecott commented 4 months ago

Describe the bug When using two arbitary bg class names the plugin generates a tailwindcss/no-contradicting-classname error.

For example:

<div className="bg-[size:20px_20px] bg-[position:right_16px_center]" />

This is valid and will generate:

background-size: 20px 20px;
background-position: right 16px center;

Expected behavior This lint error should not appear.

Screenshots image

Environment (please complete the following information):