Skip to content

Formatting with Biome and Prettier

We use Biome to format most of the codebase, and Prettier to cover the rest:

  • Biome handles JS, TS, JSON, CSS, and the frontmatter of .astro files.
  • Prettier handles Markdown (.md and .mdx) across the repo, and the template portion of .astro files in docs/ensnode.io and docs/ensrainbow.io via prettier-plugin-astro. The astroSkipFrontmatter: true option keeps the frontmatter under Biome’s ownership.

From the monorepo root:

Terminal window
pnpm lint

CI runs pnpm lint:ci (check-only) on every PR.

Git on Windows checks files out with CRLF (\r\n) line endings by default. Biome and Prettier write LF (\n). After pnpm lint, files may appear modified, but Git normalizes the endings back to LF when staging, so nothing changes in the resulting commit.

To clear the noise from your working tree:

  • One-off: run git add --all. The index normalizes the endings and the files drop out of git status.
  • Permanent: run git config --global core.autocrlf input, then git checkout -- .. Your working tree converts to LF and future checkouts keep it that way.