fsouza / prettierd

prettier, as a daemon, for improved formatting speed.
ISC License
772 stars 21 forks source link

prettierd not reading the config file with tailwindcss plugin #612

Open ahmafi opened 11 months ago

ahmafi commented 11 months ago

I have the following prettier.config.js file, and I'm using ESM, adding the prettier-plugin-tailwindcss in the plugins results in not reading the config file at all. I'm also working on a monorepo with yarn workspaces.

/** @type {import("prettier").Config} */
module.exports = {
  plugins: ["prettier-plugin-tailwindcss"],
  semi: false,
};
mononoken commented 11 months ago

I had the same issue where including prettier-plugin-tailwindcss was causing issues with prettierd (although my config was using .prettierrc). I had an old instance of prettierd running that was causing the issue. Running prettierd stop fixed this issue for me. Hope it helps your case.

skoch13 commented 11 months ago

I can confirm the issue with "prettierd" ignoring local config overrides. The method suggested by @mononoken helped resolve this obscure issue.

voinik commented 4 months ago

This is still happening by the way. Took me a long time to figure out it was prettierd that seems to be caching the last used config or something. @mononoken's workaround helped me indeed. Make sure to run prettierd stop every time you make a change to your prettier config file.

dsuttonpreece commented 3 months ago

Also make sure you're running prettier > v3

Didn't realise I was running v2 and only caught it after reading the tailwind plugin docs:

As of v0.5.x, this plugin now requires Prettier v3