Getting prettier to work with Tailswind
Published at 11 March 2024
#vscode
Getting Prettier to run was not easy. This seemed to do the trick.
.prettierrc
JSON{ "tailwindConfig": "./tailwind.config.js", "pluginSearchDirs": ["."], "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }], "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"] }
settings.json
JSON{ "prettier.requireConfig": true, "prettier.documentSelectors": ["**/*.svelte"], "[svelte]": { "editor.defaultFormatter": "esbenp.prettier-vscode" } }