Create a prettier.config.js file in your root folder and add the following line:
module.exports = { plugins: ['prettier-plugin-tailwindcss'], }
Create a prettier.config.js file in your root folder and add the following line:
module.exports = { plugins: ['prettier-plugin-tailwindcss'], }
Add to your .eslintrc
{ "extends": ["plugin:tailwindcss/recommended"] }
More info here: https://www.npmjs.com/package/eslint-plugin-tailwindcss
» npm install eslint-plugin-tailwindcss
Problem with eslint and prettier-plugin-tailwindcss [Prettier Plugin]
Prettier plugin tailwind with next js
Eslint prettier-plugin-tailwindcss config for autosave - standard/ts-standard - Stack Overflow
Tailwind CSS v4 tips every developer should know
Videos
i am using next js 14 and tailwindcss. How can i use the prettier-plugin-tailwind in this project. Whenever i try to save the file it shows me an error message as
Error while formatting: e:\Web_Dev\Next-Project\next-flowchart\src\components\custom\nodes\round-rectangle.tsx
Error: Cannot find module 'prettier-plugin-tailwindcss'
Require stack:
- c:\Users\PC\.vscode\extensions\numso.prettier-standard-vscode-1.0.2\out\main.js
- c:\Users\PC\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js
- c:\Users\PC\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js
- c:\Users\PC\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-fork.js
i also tried to downgrade the prettier lib, but that didn't work either.
Any suggestions?
Last year, I shared a post here with my favorite Tailwind CSS tips. Since a lot of folks said it helped them clean up their code or discover new utility patterns, I've now fully updated the article for v4.
If you're upgrading or just want to sharpen your Tailwind CSS skills, give it a read:
Tailwind CSS v4 tips every developer should know
Would love to hear what you think or what new things you discovered.
I'm talking about this plugin: https://github.com/francoismassart/eslint-plugin-tailwindcss that helps with ordering your classnames correctly and adds a bunch of other useful checks.
Example below:
I've got it working fine for .vue files but I can't seem to get it to work for .blade.php files? Is it even possible? For context I am using Phpstorm.