Skip to content

Add scoped formatting commands - #378

Open
spencerc99 wants to merge 2 commits into
mainfrom
cx/papercut-formatting
Open

Add scoped formatting commands#378
spencerc99 wants to merge 2 commits into
mainfrom
cx/papercut-formatting

Conversation

@spencerc99

Copy link
Copy Markdown
Owner

Summary

  • pin and configure Prettier with the repository's dominant TypeScript and React conventions
  • add explicit-file format:check and format:write commands
  • reject directories, broad requests, generated output, asset trees, environment files, unsupported configuration formats, and symbolic links
  • document the scoped workflow and cover it with real-file tests

Why

The repository had no root formatter configuration or supported formatting command. Direct Prettier runs could select a transitive version, touch generated or unsupported files, and create large diffs from pre-existing formatting drift.

This change does not reformat product files or introduce a repository-wide formatting gate. Developers must pass up to 50 explicit source-file paths per command.

Validation

  • bun install --frozen-lockfile
  • bun run format:test
  • bun run format:check -- prettier.config.mjs scripts/format.mjs scripts/format.test.mjs package.json extension/src/config.ts extension/website/src/main.tsx
  • bunx prettier --check prettier.config.mjs scripts/format.mjs scripts/format.test.mjs package.json
  • bun run lint
  • git diff --check
  • verified refusal of ., partykit/wrangler.toml, extension/.dev.vars, and extension/src/assets/stamp-1.png

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 15, 2026

Copy link
Copy Markdown

Deploying we-were-online-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: cb6d4f6
Status: ✅  Deploy successful!
Preview URL: https://c50e6f6e.we-were-online-website.pages.dev
Branch Preview URL: https://cx-papercut-formatting.we-were-online-website.pages.dev

View logs

@pkg-pr-new

pkg-pr-new Bot commented Aug 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

bun add https://pkg.pr.new/@playhtml/common@378
bun add https://pkg.pr.new/playhtml@378
bun add https://pkg.pr.new/@playhtml/react@378

commit: cb6d4f6

@spencerc99
spencerc99 marked this pull request as ready for review August 15, 2026 21:59
@spencerc99

Copy link
Copy Markdown
Owner Author

Code review

No issues found. Checked for bugs and project-instruction compliance.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying playhtml with  Cloudflare Pages  Cloudflare Pages

Latest commit: cb6d4f6
Status: ✅  Deploy successful!
Preview URL: https://252e593c.playhtml.pages.dev
Branch Preview URL: https://cx-papercut-formatting.playhtml.pages.dev

View logs

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.

1 participant