Create a prettier.config.js file in your root folder and add the following line:

module.exports = { plugins: ['prettier-plugin-tailwindcss'], }

Answer from Damilola Akinlade on Stack Overflow
🌐
npm
npmjs.com › package › eslint-plugin-tailwindcss
eslint-plugin-tailwindcss - npm
July 16, 2025 - While you can use the official plugin prettier-plugin-tailwindcss for ordering your classnames... eslint-plugin-tailwindcss offers more than 5 other rules, that you can benefit from on top of prettier-plugin-tailwindcss. Sounds good ?
      » npm install eslint-plugin-tailwindcss
    
Published   Jul 16, 2025
Version   3.18.2
Author   François Massart
Discussions

Problem with eslint and prettier-plugin-tailwindcss [Prettier Plugin]
What version of prettier-plugin-tailwindcss are you using? v0.5.11 What version of Tailwind CSS are you using? v3.3.0 What version of Node.js are you using? v20.11.0 What package manager are you us... More on github.com
🌐 github.com
10
February 8, 2024
Prettier plugin tailwind with next js
Don't solve your issue but here my workaround, I use eslint-plugin-tailwindcss instead of prettier-plugin-tailwind in Next.js Boilerplate: https://github.com/ixartz/Next-js-Boilerplate eslint-plugin-tailwindcss is prettier-plugin-tailwind with more features. If you don't want to lose your time to set up the plugin, just clone Next.js Boilerplate and you are ready to go. More on reddit.com
🌐 r/nextjs
5
4
December 28, 2023
Eslint prettier-plugin-tailwindcss config for autosave - standard/ts-standard - Stack Overflow
How to config **prettier ** to prettier-plugin-tailwindcss in **eslint **and works with just he onsave format i just have seen the docs that works with the formatter in prettier. Initial: .eslin... More on stackoverflow.com
🌐 stackoverflow.com
Tailwind CSS v4 tips every developer should know
Thanks. Just the thing i need! More on reddit.com
🌐 r/tailwindcss
11
65
July 8, 2025
🌐
GitHub
github.com › francoismassart › eslint-plugin-tailwindcss
GitHub - francoismassart/eslint-plugin-tailwindcss: ESLint plugin for Tailwind CSS usage · GitHub
While you can use the official plugin prettier-plugin-tailwindcss for ordering your classnames... eslint-plugin-tailwindcss offers more than 5 other rules, that you can benefit from on top of prettier-plugin-tailwindcss. Sounds good ?
Starred by 2.1K users
Forked by 110 users
Languages   JavaScript
🌐
Ouassim
ouassim.tech › notes › boost_your_tailwind_workflow_with_eslint_and_prettier
Boost Your Tailwind Workflow with ESLint and Prettier - Ouassim G.
January 12, 2025 - In addition to core ESLint and Prettier packages themselves, this installs both the Prettier Tailwind CSS plugin for sorting class names and the ESLint Tailwind CSS plugin for validating and enforcing best practices.
🌐
npm Trends
npmtrends.com › eslint-plugin-tailwindcss-vs-prettier-plugin-tailwind-css
eslint-plugin-tailwindcss vs prettier-plugin-tailwind-css | npm trends
Comparing trends for eslint-plugin-tailwindcss 3.18.2 which has 1,132,869 weekly downloads and 2,039 GitHub stars vs. prettier-plugin-tailwind-css 1.5.0 which has 1,081 weekly downloads and 98 GitHub stars.
🌐
GitHub
github.com › tailwindlabs › prettier-plugin-tailwindcss › issues › 245
Problem with eslint and prettier-plugin-tailwindcss [Prettier Plugin] · Issue #245 · tailwindlabs/prettier-plugin-tailwindcss
February 8, 2024 - "devDependencies": { "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", "@typescript-eslint/eslint-plugin": "^5.49.0", "@typescript-eslint/parser": "^5.49.0", "autoprefixer": "^10.0.1", "eslint": "^8", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^17.0.0", "eslint-config-next": "14.1.0", "eslint-config-prettier": "^8.10.0", "eslint-config-standard-with-typescript": "^34.0.0", "eslint-formatter-codeframe": "^7.32.1", "eslint-import-resolver-typescript": "^3.5.3", "eslint-plugin-import": "^2.27.5", "eslint-plugin-n": "^15.6.1", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-react": "^7.32.2", "eslint-plugin-unused-imports": "^2.0.0", "husky": "^8.0.0", "postcss": "^8", "prettier": "^3.2.4", "prettier-plugin-tailwindcss": "^0.5.11", "tailwindcss": "^3.3.0", "typescript": "^5" }
Author   YuliyaMinsk
🌐
npm Trends
npmtrends.com › eslint-plugin-tailwind-vs-eslint-plugin-tailwindcss-vs-prettier-plugin-tailwind-vs-prettier-plugin-tailwind-css-vs-tailwind-classes-sorter
eslint-plugin-tailwind vs eslint-plugin-tailwindcss vs prettier-plugin-tailwind vs prettier-plugin-tailwind-css vs tailwind-classes-sorter | npm trends
Comparing trends for eslint-plugin-tailwind 0.2.1 which has 2,408 weekly downloads and 100 GitHub stars vs. eslint-plugin-tailwindcss 3.18.2 which has 1,318,478 weekly downloads and 2,050 GitHub stars vs. prettier-plugin-tailwind 2.2.12 which has 3,473 weekly downloads and 425 GitHub stars vs. prettier-plugin-tailwind-css 1.5.0 which has 1,120 weekly downloads and 98 GitHub stars vs. tailwind-classes-sorter 0.2.5 which has 3,484 weekly downloads and 20 GitHub stars.
Find elsewhere
🌐
GitHub
github.com › tailwindlabs › tailwindcss › discussions › 13299
With the release of v4, will there be an ESLint plugin akin to the current `prettier-plugin-tailwind`? · tailwindlabs/tailwindcss · Discussion #13299
ESLint is a popular tool and many people prefer to use it alone, instead of coupling it with the strongly opinionated Prettier. At the moment there is a third-party plugin, https://github.com/francoismassart/eslint-plugin-tailwindcss, but it ...
Author   tailwindlabs
🌐
Reddit
reddit.com › r/nextjs › prettier plugin tailwind with next js
r/nextjs on Reddit: Prettier plugin tailwind with next js
December 28, 2023 -

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?

🌐
Misha
misha.wtf › blog › tailwind-eslint-prettier
Mykhaylo Ryechkin | Streamlining your Tailwind CSS workflow with ESLint + Prettier
July 13, 2022 - See how to greatly improve your Tailwind CSS workflow, using a few ESLint and Prettier plugins
🌐
GitHub
gist.github.com › SAMURAii-7 › 62efd5ba5fcd78bcab223626a33c5eaa
Setup Prettier with ESLint and Tailwind CSS · GitHub
{ "tabWidth": 4, "semi": false, "plugins": ["prettier-plugin-tailwindcss"] } open .eslintrc.json · Add "prettier" at the end of the extends array so it can override any other configs · { "extends": ["other-configs", "prettier"] } npx prettier --write . OR · yarn prettier --write .
🌐
Stack Overflow
stackoverflow.com › questions › 76896331 › eslint-prettier-plugin-tailwindcss-config-for-autosave-standard-ts-standard
Eslint prettier-plugin-tailwindcss config for autosave - standard/ts-standard - Stack Overflow
"devDependencies": { "eslint-plugin-prettier": "5.0.0", "eslint-config-prettier": "8.8.0", "prettier": "3.0.1", "prettier-plugin-tailwindcss": "0.5.2", "ts-standard": "12.0.2" }
🌐
GitHub
github.com › tailwindlabs › prettier-plugin-tailwindcss
GitHub - tailwindlabs/prettier-plugin-tailwindcss: A Prettier plugin for Tailwind CSS that automatically sorts classes based on our recommended class order. · GitHub
As of v0.5.x, this plugin now requires Prettier v3 and is ESM-only. This means it cannot be loaded via require(). For more information see our upgrade guide. When using Tailwind CSS v4 you must specify your CSS file entry point, which includes your theme, custom utilities, and other Tailwind configuration options. To do this, use the tailwindStylesheet option in your Prettier configuration. Note that paths are resolved relative to the Prettier configuration file.
Starred by 7.1K users
Forked by 175 users
Languages   TypeScript 97.6% | JavaScript 2.4%
🌐
Reddit
reddit.com › r/tailwindcss › tailwind css v4 tips every developer should know
r/tailwindcss on Reddit: Tailwind CSS v4 tips every developer should know
July 8, 2025 -

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.

🌐
Medium
medium.com › @ypriyansh998 › setting-up-a-fresh-next-js-13-project-with-eslint-prettier-and-tailwind-css-105ac4fd0d5c
Setting Up a Fresh Next.js 13 Project with ESLint, Prettier, and Tailwind CSS | by Priyansh | Medium
January 24, 2024 - Remember, Prettier version 3.0.0 clashes with Tailwind’s sorting plugin. So, let’s install 2.8.8: npm install prettier@2.8.8 -D · Step 3: Harmonizing ESLint and Prettier · To avoid formatting conflicts, we’ll leverage eslint-config-prettier: npm install eslint-config-prettier -D · Next, update your existing ESLint config (e.g., .eslintrc.json) with: JSON · { "extends": ["next", "prettier"] } Step 4: Embracing Tailwind CSS · Let’s install the magic trio: npm install tailwindcss postcss autoprefixer -D ·
🌐
Medium
medium.com › @titoadeoye › how-to-set-up-a-react-app-with-vite-eslint-tailwind-and-prettier-the-easy-way-665284fcdab0
How to Set Up a React App with Vite, ESLint, Tailwind, and Prettier (The Easy Way!) | by Tito Adeoye | Medium
May 20, 2025 - plugins: adds ESLint plugins to support React hooks and React refresh features during development. rules: Customizes specific linting rules, such as those recommended for React Hooks and React Refresh to catch common issues and enforce best practices. To enforce formatting rules and prevent conflicts between ESLint and Prettier, you can integrate Prettier directly into ESLint’s workflow.
🌐
DEV Community
dev.to › mryechkin › streamlining-your-tailwind-css-workflow-with-eslint-prettier-1hg
Streamlining your Tailwind CSS workflow with ESLint + Prettier - DEV Community
August 13, 2022 - For complete list of available CLI options, see Prettier docs. With our scripts defined, we can now run these as part of our workflow to lint and format our code. To test it out, run npm run lint. Here's a real example from my personal site that I ran into recently: As you can see, eslint-plugin-tailwindcss helped identify some deprecated classes that I was still using.
🌐
LibHunt
libhunt.com › compare-eslint-plugin-prettier-vs-tailwindcss
eslint-plugin-prettier vs Tailwind CSS - compare differences and reviews? | LibHunt
ESLint plugin for Prettier formatting (by prettier) ... A utility-first CSS framework for rapid UI development. (by tailwindlabs) Tailwindcss CSS css-framework PostCSS functional-css utility-classes Responsive