prettier: prettier 3.0.0 stable version does not work

Prettier 3.0.0 Playground link

# Options (if any):
{
  	"useTabs": false,
  	"trailingComma": "all",
  	"tabWidth": 4,
  	"semi": true,
  	"singleQuote": true,
  	"endOfLine": "lf",
  	"printWidth": 80,
  	"bracketSameLine": true,
  	"plugins": ["prettier-plugin-tailwindcss"]
}

Input:

after upgrading to the latest STABLE version, prettier simply refuses to work in any way. I have an extension installed in vs code and an additional library for tailwind installed. The only thing that helps me solve the problem so that it starts formatting again is deleting the content from the file .prettierrc.json, but how would I need my settings.


const Header = () => (
    <header>
        <div className="container pb-[30px] pt-8">
            <div className="flex justify-between border-b border-solid border-silver "><h1 className="visually-hidden">eatly</h1>
                <Logo />
                <span />
            </div>
        </div>
    </header>
);

And another question is, can prettier work without a plugin in vs code? If not, why not?

Output:

// code snippet

Expected behavior:

formatting

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

Hmmm, sorry. I couldn’t tell from that information alone. If you can create a repository where we can reproduce it, we may be able to investigate.

Okay, now I’ll recreate the situation and show

Also, can you show output from Prettier in VSCode? Post it here and it will help us solve the problem.

スクリーンショット 2023-07-09 17 15 31

Can you show us more detailed log? What is the error message that results from executing the prettier command?

Yes, prettier-plugin-tailwindcss does not support Prettier v3. https://github.com/tailwindlabs/prettier-plugin-tailwindcss/issues/176