-
I checked the docs that provide the info to allow TWC to work nicely with the Tailwind CSS IntelliSense VS Code extension. However, has anyone tried to make it work with ESLint ( For example, this line is not being sorted by eslint-plugin-tailwindcss: const TestDiv = twc.div`py-3 sm:mt-2 px-4 mt-1 bg-neutral-30 leading-6 rounded-lg`; Does anyone have a working example? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Found one solution that works, not using {
...
"plugins": ["prettier-plugin-tailwindcss"],
"tailwindFunctions": ["twc"]
} and update your eslint config file: {
"extends": [
...otherConfigs,
"prettier"
]
} |
Beta Was this translation helpful? Give feedback.
Found one solution that works, not using
eslint-plugin-tailwindcss
but Prettier in the middle, with prettier-plugin-tailwindcss and eslint-config-prettier. After installing it, only needed change is adding this to your.prettierrc
(orprettier.config.js
):and update your eslint config file: