Skip to content

chore: add prettier for markdown and astro formatting#2153

Draft
notrab wants to merge 4 commits into
mainfrom
chore/prettier-md-astro
Draft

chore: add prettier for markdown and astro formatting#2153
notrab wants to merge 4 commits into
mainfrom
chore/prettier-md-astro

Conversation

@notrab
Copy link
Copy Markdown
Member

@notrab notrab commented May 19, 2026

Lite PR

Tip: Review docs on the ENSNode PR process

Summary


Why

  • Biome doesn't support .md or .astro

Testing

  • How this was tested.
  • If you didn't test it, say why.

Notes for Reviewer (Optional)

We need to consider when we merge this... as running the lint beyond merging this will cause significant changes to md/mdx/astro files.
CleanShot 2026-05-19 at 18 28 15@2x

  • CHANGELOG.md ignored (owned by changesets)
  • astroSkipFrontmatter lets biome keep formatting .astro script blocks
  • docs/ensnode.io and docs/ensrainbow.io own .astro via prettier-plugin-astro

Pre-Review Checklist (Blocking)

  • This PR does not introduce significant changes and is low-risk to review quickly.
  • Relevant changesets are included (or are not required)

notrab added 2 commits May 19, 2026 18:14
…provider, context, hooks, and query utilities are now exported from `@namehash/namehash-ui`.
Copilot AI review requested due to automatic review settings May 19, 2026 17:26
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
admin.ensnode.io Ready Ready Preview, Comment May 19, 2026 5:30pm
enskit-react-example.ensnode.io Ready Ready Preview, Comment May 19, 2026 5:30pm
ensnode.io Ready Ready Preview, Comment May 19, 2026 5:30pm
ensrainbow.io Ready Ready Preview, Comment May 19, 2026 5:30pm

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 19, 2026

⚠️ No Changeset found

Latest commit: 38424bf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Review Change Stack

Warning

Rate limit exceeded

@notrab has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 39 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d6e04d24-e564-47f6-bbad-5673ebdbd64b

📥 Commits

Reviewing files that changed from the base of the PR and between b37d070 and 38424bf.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (10)
  • .prettierignore
  • .prettierrc.json
  • docs/ensnode.io/.prettierignore
  • docs/ensnode.io/.prettierrc.json
  • docs/ensnode.io/package.json
  • docs/ensrainbow.io/.prettierignore
  • docs/ensrainbow.io/.prettierrc.json
  • docs/ensrainbow.io/package.json
  • package.json
  • pnpm-workspace.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/prettier-md-astro

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces Prettier into the monorepo to standardize formatting for Markdown at the root and Astro files within the docs workspaces, complementing Biome (which handles the rest of the codebase).

Changes:

  • Add Prettier (and Astro plugin) to the pnpm catalog/lockfile and introduce root-level .prettierrc.json / .prettierignore.
  • Update root lint / lint:ci to run Prettier on Markdown and run workspace-level Astro format checks where available.
  • Add docs workspace Prettier configs and format / format:check scripts for .astro files.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Adds prettier and prettier-plugin-astro to the shared catalog.
pnpm-lock.yaml Locks new Prettier dependencies and updates related Astro dependency snapshots.
package.json Updates lint scripts to include Prettier checks/writes and adds Prettier devDependency.
docs/ensrainbow.io/package.json Adds format scripts and Prettier devDependencies for .astro formatting.
docs/ensrainbow.io/.prettierrc.json Adds Astro-specific Prettier configuration via prettier-plugin-astro.
docs/ensrainbow.io/.prettierignore Excludes build artifacts from Prettier in the docs workspace.
docs/ensnode.io/package.json Adds format scripts and Prettier devDependencies for .astro formatting.
docs/ensnode.io/.prettierrc.json Adds Astro-specific Prettier configuration via prettier-plugin-astro.
docs/ensnode.io/.prettierignore Excludes build artifacts from Prettier in the docs workspace.
.prettierrc.json Introduces root Prettier defaults for Markdown/prose formatting.
.prettierignore Excludes generated/owned files (e.g. lockfile, changelogs) from Prettier.
.changeset/upset-kids-drop.md Adds a changeset entry (content currently appears unrelated to this PR).
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment on lines +7 to +8
"lint": "pnpm exec prettier --write \"**/*.md\" && pnpm -r --parallel --if-present run format && biome check --write .",
"lint:ci": "pnpm exec prettier --check \"**/*.md\" && pnpm -r --parallel --if-present run format:check && biome ci",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Config here states {md,mdx}?

Comment thread package.json
"lint": "biome check --write .",
"lint:ci": "biome ci",
"lint": "pnpm exec prettier --write \"**/*.md\" && pnpm -r --parallel --if-present run format && biome check --write .",
"lint:ci": "pnpm exec prettier --check \"**/*.md\" && pnpm -r --parallel --if-present run format:check && biome ci",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what Prettier is for...

@@ -0,0 +1,13 @@
{
Copy link
Copy Markdown
Contributor

@vercel vercel Bot May 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workspace-specific Prettier configs missing base formatting options (printWidth, proseWrap) causes inconsistent code formatting

Fix on Vercel

Comment thread package.json
Comment thread package.json
"scripts": {
"lint": "biome check --write .",
"lint:ci": "biome ci",
"lint": "pnpm exec prettier --write \"**/*.md\" && pnpm -r --parallel --if-present run format && biome check --write .",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it'd be simplest and easiest to reason about if we did the following

    "lint": "pnpm run -w \"/^lint:[.!:]*$/\"",
    // ^- make this run lint:prettier and lint:biome in parallel
    "lint:ci": "pnpm run -w \"/^lint:.*:ci$/\"",
    "lint:prettier": "pnpm exec prettier --write  \"**/*.md\" && pnpm -r lint:prettier",
    "lint:prettier:ci": "pnpm exec prettier --check  \"**/*.md\" && pnpm -r lint:prettier:ci",
    "lint:biome": "biome check --write .",
    "lint:biome:ci": "biome ci"

and then define the lint:prettier and `lint:biome


or rename format:check to format:ci to follow biome pattern and keep the current structure.

don't think --if-present is necessary when using -r, it's implied

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Was just following how ENSAwards so it was consistent to what @Y3drk had approved and merged. @Y3drk wdyt?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The end goal is to have lint and lint:ci commands that, when called, perform both biome and prettier actions together.
  • When we call pnpm lint at the repo root or project/package root, all files affected should be fully formatted

-- that was specifically requested by @lightwalker-eth when I was making these changes in ENSAwards.


  • As long as that's met, I think it's okay to make it more modular as @shrugs suggests.
  • I'd also be in favor of removing the format* commands and handling it all with lint*, assuming that's possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure lint and formatter for markdown files

4 participants