prettier-plugin-go-template icon indicating copy to clipboard operation
prettier-plugin-go-template copied to clipboard

.prettierrc format problem in documentation

Open behnamgolds opened this issue 1 year ago • 2 comments

I followed the README and the issue referenced to solve the installation problem, and yet in the README file it says to put the config in the .prettierrc file like this :

// .prettierrc
{
  "plugins": ["prettier-plugin-go-template"]
}

but when I did that the prretier plugin threw a bunch of errors about invalid config file format.

Seems that the config file should be in YAML format and not JSON. So I changed the file like this:

---
goTemplateBracketSpacing: true
plugins:
  - prettier-plugin-go-template

Seems there is an upstream prettier plugin change in the config file parsing that should be reflected here in the documentation.

behnamgolds avatar May 09 '24 08:05 behnamgolds

Weird, the prettier docs still state that json or yml are ok:

image

https://prettier.io/docs/en/configuration.html

NiklasPor avatar May 09 '24 12:05 NiklasPor

I din't follow up on that , but yeah it says JSON too! I don't know maybe I did something wrong the first time. But I'm sure my json config was correct.

behnamgolds avatar May 09 '24 21:05 behnamgolds