Skip to content

Prettier not working #11473

Answered by Dronakurl
Dronakurl asked this question in Q&A
Aug 12, 2024 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

I've got it to work with this

[[language]]
name = "html"
file-types = ["html", "xml"]
auto-format = true
formatter = { command = "bash", args = [
  "-c",
  "prettier --stdin-filepath xx.html ",
] }

For yaml this worked

[[language]]
name = "yaml"
file-types = ["yaml", "yml"]
auto-format = true
formatter = { command = "bash", args = ["-c", " prettier --parser yaml "] }

[[language]]
name = "docker-compose"
file-types = ["docker-compose"]
auto-format = true
formatter = { command = "bash", args = ["-c", " prettier --parser yaml "] }

Adding the file-type docker-compose to file-types of yaml did not work. You have to specify it in the docker-compose language.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Dronakurl
Comment options

Answer selected by Dronakurl
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants