Installation

1

Install the Plugin

Install prettier and prettier-plugin-tailwindcss-anarchy:

npm install -D prettier prettier-plugin-tailwindcss-anarchy
2

Add it to your prettier config

Create a file named .prettierrc and add the following code:

{
    "plugins": ["prettier-plugin-tailwindcss-anarchy"]
}

*The installation can vary depending on your framework or setup.

3

(optional) Prettier with VS Code

In VS Code you can download the Prettier extension, which makes using prettier better, as you can change it to save the file on default.


Prettier also provides extensions for other editors

That's it! If you need further documentation, refer to prettier-plugin-tailwindcss.