Git Product home page Git Product logo

Comments (14)

JounQin avatar JounQin commented on July 29, 2024
image

Seems like a prettier core bug?

cc @fisker @sosukesuzuki

from prettier.

fisker avatar fisker commented on July 29, 2024

I'll take a look.

from prettier.

fisker avatar fisker commented on July 29, 2024

Not bug. Missed plugins https://github.com/Avansai/next-multilingual/blob/main/example/.prettierrc.yaml

from prettier.

fisker avatar fisker commented on July 29, 2024
$ npx prettier --find-config-pah example/.env.development
example/.prettierrc.yaml

from prettier.

JounQin avatar JounQin commented on July 29, 2024

I just upgraded to Prettier 3.1.0 this morning and got this new error:

When I downgrade to Prettier 3.0.3 the problem dissapears.

@fisker But it seems a regression, what means config resolution changed.

from prettier.

fisker avatar fisker commented on July 29, 2024

Maybe a bug was fixed accidentally.

from prettier.

fisker avatar fisker commented on July 29, 2024

Oh, caused by prettier/prettier#15433, in pre-v3.1 we doesn't format that file at all.

https://github.com/Avansai/next-multilingual/blob/c48503df8062304e215919a9ea2f04476d9b253a/package.json#L109C18-L109C36

from prettier.

fisker avatar fisker commented on July 29, 2024

And that's a bug you rasied.. prettier/prettier#15079 😄

from prettier.

JounQin avatar JounQin commented on July 29, 2024

OK, last thing is that the error message is a bit confusing? It successfully understands that it should use sh as the parser what means prettier-plugin-sh is already loaded correctly.

from prettier.

fisker avatar fisker commented on July 29, 2024

No, the plugin is not loaded, the config file tells prettier to use that parser, https://github.com/Avansai/next-multilingual/blob/c48503df8062304e215919a9ea2f04476d9b253a/example/.prettierrc.yaml#L25

from prettier.

JounQin avatar JounQin commented on July 29, 2024

Hah, that makes sense then! Thanks for your explanation! Close due to answered as above then.

from prettier.

nbouvrette avatar nbouvrette commented on July 29, 2024

Thanks @fisker and @JounQin - I'm not sure why it was working before?

I thought there was some sort of inheritance but maybe this is gone? in any case adding the plugins section in the example prettier config seems to solve the issue.

from prettier.

JounQin avatar JounQin commented on July 29, 2024

I'm not sure why it was working before?

Oh, caused by prettier/prettier#15433, in pre-v3.1 we doesn't format that file at all.

Please read the conversation carefully.

from prettier.

nbouvrette avatar nbouvrette commented on July 29, 2024

I think I get it - thanks for looking into this!

from prettier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.