Add Prettier formatting checks#9
Merged
Merged
Conversation
Pin Prettier and format the existing codebase. Enforce formatting in CI, release, and prepublish checks. Preserve the bilingual Markdown wrapping rules. Signed-off-by: Lu Zhang <lu@wdl.dev>
There was a problem hiding this comment.
Pull request overview
Establishes Prettier as the repo-wide formatter, applies a formatting baseline across source/docs/examples, and enforces formatting checks in CI and release/publish flows. This is a developer-tooling change intended to be behavior-neutral for the CLI.
Changes:
- Pin Prettier 3.9.6, add
format/format:checkscripts, and introduce a repo.prettierrc.jsonthat preserves the bilingual Markdown wrapping policy. - Enforce
npm run format:checkin PR CI, release validation, andprepublishOnly. - Apply the formatting baseline across CLI code, tests, docs, templates, and examples.
Reviewed changes
Copilot reviewed 80 out of 84 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Reformat include/exclude lists to the new baseline. |
| tests/unit/helpers.js | Apply formatting baseline to test helpers. |
| tests/unit/cli-token.test.js | Apply formatting baseline and factor an inline default controlFetch into a named helper. |
| tests/unit/cli-token-store.test.js | Apply formatting baseline to token-store tests. |
| tests/unit/cli-stdin.test.js | Apply formatting baseline to stdin tests. |
| tests/unit/cli-output.test.js | Apply formatting baseline to output tests. |
| tests/unit/cli-ns-pattern.test.js | Apply formatting baseline to ns-pattern tests. |
| tests/unit/cli-init.test.js | Apply formatting baseline to init tests. |
| tests/unit/cli-control-fetch.test.js | Apply formatting baseline to control-fetch tests. |
| tests/unit/cli-config-doctor.test.js | Apply formatting baseline to config/doctor tests. |
| tests/unit/cli-command.test.js | Apply formatting baseline to command framework tests. |
| tests/unit/cli-bundle-modules.test.js | Apply formatting baseline to bundle-modules tests. |
| templates/AGENTS.md | Rewrap prose per Markdown formatting rules (agent template). |
| README.md | Rewrap prose per Markdown formatting rules. |
| package.json | Add Prettier scripts, pin Prettier, and gate prepublishOnly on format:check. |
| package-lock.json | Lockfile update for pinned Prettier dependency. |
| lib/wrangler/modules.js | Apply formatting baseline. |
| lib/wrangler/config.js | Apply formatting baseline. |
| lib/wrangler/command.js | Apply formatting baseline. |
| lib/wrangler/bindings.js | Apply formatting baseline. |
| lib/wrangler/assets.js | Apply formatting baseline. |
| lib/wrangler-pack.js | Apply formatting baseline. |
| lib/workflows-format.js | Apply formatting baseline. |
| lib/workers-format.js | Apply formatting baseline. |
| lib/whoami.js | Apply formatting baseline. |
| lib/token-store.js | Apply formatting baseline. |
| lib/stdin.js | Apply formatting baseline. |
| lib/secret-envelope-errors.js | Apply formatting baseline. |
| lib/output.js | Apply formatting baseline. |
| lib/dotenv.js | Apply formatting baseline. |
| lib/delete-format.js | Apply formatting baseline. |
| lib/d1-format.js | Apply formatting baseline. |
| lib/d1-files.js | Apply formatting baseline. |
| lib/credentials.js | Apply formatting baseline. |
| lib/control-fetch.js | Apply formatting baseline. |
| lib/config-state.js | Apply formatting baseline. |
| lib/common.js | Apply formatting baseline. |
| lib/command.js | Apply formatting baseline. |
| lib/bundle-modules.js | Apply formatting baseline. |
| examples/queues-demo/src/index.js | Apply formatting baseline to example worker code. |
| examples/pages-assets/wrangler.jsonc | Apply formatting baseline (JSONC trailing commas). |
| examples/pages-assets/src/index.js | Apply formatting baseline to example worker code. |
| examples/pages-assets/public/style.css | Apply formatting baseline to CSS example. |
| examples/kv-demo/src/index.js | Apply formatting baseline to example worker code. |
| examples/inspection-demo/src/index.js | Apply formatting baseline to example worker code. |
| examples/inspection-demo/public/style.css | Apply formatting baseline to CSS example. |
| examples/inspection-demo/public/app.js | Apply formatting baseline to JS example. |
| examples/hello-jsonc/wrangler.jsonc | Apply formatting baseline (JSONC trailing commas). |
| examples/durable-objects-demo/src/index.js | Apply formatting baseline to example worker code. |
| examples/d1-demo/src/index.js | Apply formatting baseline to example worker code. |
| eslint.config.js | Apply formatting baseline to ESLint config. |
| docs/workflows.md | Rewrap prose per Markdown formatting rules. |
| docs/token.md | Rewrap prose per Markdown formatting rules. |
| docs/secrets.md | Rewrap prose per Markdown formatting rules. |
| docs/queues.md | Rewrap prose per Markdown formatting rules. |
| docs/deploy.md | Rewrap prose per Markdown formatting rules. |
| docs/d1.md | Rewrap prose per Markdown formatting rules. |
| docs/cron-triggers.md | Rewrap prose per Markdown formatting rules. |
| CONTRIBUTING.md | Document formatter workflow and add format:check to the contributor checks list. |
| commands/workflows.js | Apply formatting baseline. |
| commands/whoami.js | Apply formatting baseline. |
| commands/token.js | Apply formatting baseline. |
| commands/tail.js | Apply formatting baseline. |
| commands/secret.js | Apply formatting baseline. |
| commands/r2.js | Apply formatting baseline. |
| commands/init.js | Apply formatting baseline. |
| commands/doctor.js | Apply formatting baseline. |
| commands/deploy.js | Apply formatting baseline. |
| commands/delete.js | Apply formatting baseline. |
| commands/d1.js | Apply formatting baseline. |
| commands/config.js | Apply formatting baseline. |
| CHANGELOG.md | Rewrap prose per Markdown formatting rules. |
| bin/wdl.js | Apply formatting baseline. |
| AGENTS.md | Document format / format:check and update formatting/CI workflow notes. |
| .prettierrc.json | Add Prettier config (print widths + Markdown overrides for bilingual policy). |
| .github/workflows/release.yml | Add npm run format:check to release validation. |
| .github/workflows/ci.yml | Add npm run format:check to PR CI. |
| .claude/skills/wdl-deploy/SKILL.md | Rewrap prose per Markdown formatting rules (skill doc). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cnluzhang
marked this pull request as ready for review
July 27, 2026 04:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
format:checkin pull-request CI, release validation, andprepublishOnly*-zh.mdprose remains unwrapped, and embedded code blocks stay hand-formattedThis is a formatting and developer-tooling change with no intended CLI runtime behavior change.
Validation
npm run format:checkprettier --debug-check .npm run lintnpm run typechecknpm testnpm audit --audit-level=moderatenpm pack --dry-runnpm run prepublishOnlyactionlint .github/workflows/ci.yml .github/workflows/release.ymlgit diff --checkMarkdown parsing was also compared before and after formatting; outside the intentional formatter documentation updates, the rendered document structure is unchanged.