Skip to content

Cannot get pretty to work in Docusaurus project #2236

@PaulRBerg

Description

@PaulRBerg

Describe the bug

Setting pretty: true doesn't make GraphQL Markdown format the files with Prettier.

To Reproduce

Check out commit fc985e2 in this repo: https://github.com/sablier-labs/docs

Related PR: sablier-labs/docs#308

  • GraphQL schema

Don't think it's related to the GraphQL schema.

  • Docusaurus configuration

https://github.com/sablier-labs/docs/blob/fc985e2f667d35b316cb3bf1351af200cc9856e6/config/plugins.ts#L23-L45

Expected behavior

The files should be formatted with prettier since I have it installed. But they are not. I have to manually run prettier after the GraphQL docs gen.

Additional context

You need the @antfu/ni package and the Just command runner to run commands in our repo. Run just --list to see the list of available commands. The ones of interest are just prettier-check and just prettier-write.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions