Skip to main content

Prettier

Prettier is the primary formatter for regular repository source and configuration files.

The root configuration is stored in:

prettier.config.mjs

Responsibilities

Prettier formats supported repository files such as:

  • JavaScript
  • TypeScript
  • TSX
  • JSON
  • CSS
  • YAML
  • regular Markdown

Docusaurus MDX content is intentionally excluded from Prettier.

The exclusion is configured in:

.prettierignore

and applies to:

apps/docs/content/**/*.mdx

MDX content is formatted and validated by Remark instead.

Commands

Format the repository:

pnpm format

Validate formatting and documentation content:

pnpm format:check

The root formatting workflow coordinates both Prettier and Remark so developers do not need to run each formatter manually.

Generated files

Generated directories are excluded from formatting.

Examples include:

node_modules/
.turbo/
.next/
.docusaurus/
build/
dist/
coverage/
storybook-static/

Generated output should never be formatted manually.