francoismassart / eslint-plugin-tailwindcss

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

[BUG] Need to disable tailwindcss/no-custom-classname for compatibility with the container-queries plugin #313

Open maxisix opened 8 months ago

maxisix commented 8 months ago

Hi,

In our project, we use eslint-plugin-tailwindcss and @tailwindcss/container-queries. We've encountered an issue where the linter flags the no-custom-classname error when using the container queries. Additionally, we have use the tw- prefix for our class names.

Below are some examples to illustrate this:

{/* eslint-disable-next-line tailwindcss/no-custom-classname */}
<div className="tw-@container">exemple</div>

{/* eslint-disable-next-line tailwindcss/no-custom-classname */}
<div className="@lg:-tw-mt-2">exemple</div>