Shopify / prettier-plugin-liquid

Prettier Liquid/HTML plugin
https://npm.im/@shopify/prettier-plugin-liquid
MIT License
94 stars 15 forks source link

Prettier 3.0.0 compatibility #194

Closed ekwoka closed 1 year ago

ekwoka commented 1 year ago

Prettier 3.0.0 changes how parser information is passed with some apis (like prettier.parse). This now breaks when trying to run prettier with prettier-plugin-liquid.

Cannot read properties of undefined (reading 'parsers')

I looked at trying to do the fix myself and got some wild type errors that I didn't have the time to get in and figure out right now.

So reporting the issue here for others to find, as well as the maintainers to see.

charlespwd commented 1 year ago

Right. That was on our backburner for a while. This thing has been in beta for a long long time :sweat_smile:, and 3.0 finally became official yesterday. I guess it's time to take a look at #87 :)

knjshimi commented 1 year ago

+1

charlespwd commented 1 year ago

Warning

Prettier 3 removed the automatic discoverability of plugins.

You must either use the --plugin CLI flag or add the following in your .prettierrc for things to work with prettier@3:

{
  "plugins": ["@shopify/prettier-plugin-liquid"]
}