Skip to content

Prettier not working #11473

Answered by Dronakurl
Dronakurl asked this question in Q&A
Aug 12, 2024 · 2 comments · 3 replies
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 3 replies

Comment options

You must be logged in to vote
2 replies
@Dronakurl
Comment options

@David-Else
Comment options

Answer selected by Dronakurl
Comment options

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants