# Contributor handoff — prettier/prettier

> Canonical page: https://codevetter.com/unpack/prettier/agent-handoff

# Contributor handoff — prettier/prettier

Scanned commit 1a36a7defdcccfc4967e99bbf9517a02ab2345b2 (2026-09-22). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Read src/index.js, src/main/core.js, and the language module you are touching before editing. Do not add formatting options. Do not hand-edit generated builtin-plugin files; run generate-builtin-plugins. Format tests are snapshots — yarn test -u then git diff. Prefer small, reviewable diffs. Dev Node is >=22; production behavior is what dist/ does after yarn build. Run the matching tests/format/<lang> directory plus yarn test tests/unit if you change Doc/parser resolve.
- Must-read first files for any change: package.json (scripts/exports), src/index.js (API), src/main/core.js (pipeline), src/main/parser-and-printer.js (plugin resolve), and CONTRIBUTING.md (test DSL + no-new-options). — [package.json](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/package.json) [src/index.js](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/index.js) [src/main/core.js](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/core.js) [src/main/parser-and-printer.js](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/parser-and-printer.js) [CONTRIBUTING.md](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/CONTRIBUTING.md)
- Language work: edit src/language-<lang>/ (parse, print, embed, comments) and add a tests/format/<lang>/<topic>/ directory with format.test.js calling runFormatTest(import.meta, [parser]). Never add files next to format.test.js that you do not want snapshotted. — [CONTRIBUTING.md#L11-47](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/CONTRIBUTING.md#L11-L47) [tests/config/format-test/run-format-test.js#L38-48](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/tests/config/format-test/run-format-test.js#L38-L48) [tests/format/js](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/tests/format/js)
- After changing languages.evaluate.js, options.js, or plugin parser/printer exports, run yarn generate-builtin-plugins (or yarn fix:builtin-plugins) so development-plugins.js and production-plugins.js stay in sync. — [package.json#L228-234](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/package.json#L228-L234) [scripts/generate-builtin-plugins.js#L1-12](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/scripts/generate-builtin-plugins.js#L1-L12) [src/main/plugins/builtin-plugins/development-plugins.js#L1-4](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/plugins/builtin-plugins/development-plugins.js#L1-L4)
- Safe edit boundaries: src/language-* printers and tests/format snapshots are the normal contributor surface. Avoid src/index.cjs dual ESM/CJS shim, bin/prettier.cjs version gate, and scripts/build/hacks/* unless the change is specifically about bundling. (inferred) — [src/index.cjs](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/index.cjs) [bin/prettier.cjs](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/bin/prettier.cjs) [scripts/build/packages/prettier.js#L39-80](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/scripts/build/packages/prettier.js#L39-L80) [scripts/build/hacks](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/scripts/build/hacks)
- Tests to run locally: yarn test <path> for a focused directory; yarn test -u to update snapshots; FULL_TEST=1 yarn test for AST/second-format/EOL/BOM. Production: yarn build then yarn test:production. Do not use yarn test:production without a dist/. — [CONTRIBUTING.md#L4-12](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/CONTRIBUTING.md#L4-L12) [CONTRIBUTING.md#L144-153](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/CONTRIBUTING.md#L144-L153) [package.json#L202-210](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/package.json#L202-L210)
- yarn debug <file> runs bin/prettier.js with --ignore-path=.prettierignore against the source tree (no dist needed). yarn perf / perf:inspect / perf:benchmark require a production build. — [package.json#L213-238](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/package.json#L213-L238) [CONTRIBUTING.md#L80-118](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/CONTRIBUTING.md#L80-L118)
- Trap: plugins listed last win. Tests that list ['babel','flow','typescript'] also run oxc/yuku/hermes/acorn/espree/meriyah implicitly — a JS print change can fail snapshots in those extra parsers even if babel looks fine. — [tests/config/format-test/get-parsers.js#L16-33](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/tests/config/format-test/get-parsers.js#L16-L33) [src/main/parser-and-printer.js#L18-25](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/parser-and-printer.js#L18-L25) [CONTRIBUTING.md#L60-70](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/CONTRIBUTING.md#L60-L70)
- Trap: standalone and website need explicit plugins (estree must be loaded to print JS). Node API autoloads builtins; copying Node samples into src/standalone.js consumers will fail with ConfigError 'Plugins must be explicitly added to the standalone bundle.' — [src/standalone.js#L4-20](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/standalone.js#L4-L20) [src/main/parser-and-printer.js#L30-36](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/parser-and-printer.js#L30-L36) [docs/browser.md#L19-26](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/docs/browser.md#L19-L26)
- Trap: prettier.util/doc are unavailable from the development CJS build. package.json main points at src/index.cjs, so require('prettier') in this checkout without NODE_ENV=production cannot use those namespaces. — [src/index.cjs#L41-75](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/index.cjs#L41-L75) [package.json#L12-12](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/package.json#L12-L12)
- PRs must follow .github/PULL_REQUEST_TEMPLATE.md and add changelog_unreleased/<area>/<id>.md. AI-generated low-quality PRs are closed. ESLint + Prettier are required (yarn fix). — [CONTRIBUTING.md#L91-97](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/CONTRIBUTING.md#L91-L97) [CONTRIBUTING.md#L155-160](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/CONTRIBUTING.md#L155-L160) [package.json#L225-227](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/package.json#L225-L227)
- This repo’s own prettier.config.js forces parser meriyah for **/*.{js,mjs,cjs}, trailingComma none for bin/prettier.cjs, and jsonc for .vscode/*.json and tsconfig.json — dogfooding, not defaults for users. — [prettier.config.js#L1-27](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/prettier.config.js#L1-L27)
- Coverage tooling (c8 in package.json, codecov in Dev workflow) excludes src/standalone.js, src/index.cjs, src/plugins/**, and src/universal/*.browser.js — those paths can regress without coverage signal. — [package.json#L240-260](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/package.json#L240-L260) [jest.config.js#L112-115](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/jest.config.js#L112-L115) [.github/workflows/dev-test.yml#L67-78](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/.github/workflows/dev-test.yml#L67-L78)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
