# System map — prettier/prettier

> Canonical page: https://codevetter.com/unpack/prettier/system-map

# System map — prettier/prettier

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

The runtime has three public surfaces: the Node ESM/CJS API (src/index.js / src/index.cjs), the CLI (bin/prettier.cjs → src/cli), and a browser standalone bundle (src/standalone.js, no config/plugin autoload). Formatting is owned by src/main/core.js; languages live under src/language-*; plugins are assembled by src/main/plugins and the generated builtin registries. Config search/load lives in src/config; the Doc printer in src/document. Development requires Node >=22 and Yarn 4; production tests still exercise dist/ down to Node 14. The website is a Docusaurus + Vite playground published via Netlify; npm packages are built by scripts/build/build.js into dist/.
- package.json names the project prettier 3.10.0-dev, sets type module, engines.node >=22, bin to ./bin/prettier.cjs, main to ./src/index.cjs, and exports '.' (types src/index.d.ts, require src/index.cjs, default src/index.js), './standalone' to src/standalone.js, and './plugins/*' to src/plugins/*.js. — [package.json#L1-34](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/package.json#L1-L34)
- The published browser/unpkg entry is standalone.js; package.json also defines #universal import maps that swap src/universal/*.browser.js in browsers versus src/universal/*.js on Node. — [package.json#L13-24](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/package.json#L13-L24) [src/standalone.js#L1-55](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/standalone.js#L1-L55) [docs/browser.md#L8-16](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/docs/browser.md#L8-L16)
- bin/prettier.cjs is the real CLI bootstrap: it optionally enables Node compile cache, rejects Node versions below package.json engines.node, strips --experimental-cli / PRETTIER_EXPERIMENTAL_CLI, then dynamically imports either src/experimental-cli/index.js or src/cli/index.js and calls cli.run(). — [bin/prettier.cjs#L7-70](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/bin/prettier.cjs#L7-L70) [bin/prettier.js#L1-10](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/bin/prettier.js#L1-L10) [src/experimental-cli/index.js#L1](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/experimental-cli/index.js#L1)
- src/index.js is the Node API: withPlugins loads builtin plus user plugins, then format/check/formatWithCursor/getSupportInfo/inferParser wrap src/main/core.js; it also exports resolveConfig, getFileInfo, doc, util, version, __debug, and __internal (shared with the CLI). — [src/index.js#L44-144](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/index.js#L44-L144) [src/index.cjs#L1-77](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/index.cjs#L1-L77)
- src/standalone.js reimplements withPlugins without filesystem plugin loading: plugins may be an array or an object (prettierPlugins); there is no resolveConfig/getFileInfo. — [src/standalone.js#L4-55](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/standalone.js#L4-L55) [docs/browser.md#L8-26](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/docs/browser.md#L8-L26)
- Builtin plugins are generated (do NOT edit) by scripts/generate-builtin-plugins.js into development-plugins.js (language-* modules) and production-plugins.js (src/plugins/*.js bundles), then lazy-loaded via toLazyLoadPlugins. loadBuiltinPlugins() picks production vs development based on NODE_ENV. — [scripts/generate-builtin-plugins.js#L13-31](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/scripts/generate-builtin-plugins.js#L13-L31) [src/main/plugins/load-builtin-plugins.js#L1-13](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/plugins/load-builtin-plugins.js#L1-L13) [src/main/plugins/builtin-plugins/development-plugins.js#L1-84](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/plugins/builtin-plugins/development-plugins.js#L1-L84) [src/main/plugins/builtin-plugins/utilities.js#L15-65](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/plugins/builtin-plugins/utilities.js#L15-L65)
- Language implementations live in src/language-{js,json,css,html,graphql,handlebars,markdown,yaml}; each exports languages, parsers, printers, and options. JS printers are a single estree printer; HTML covers angular/html/lwc/mjml/vue parsers with one html printer. — [src/language-js/index.js#L1-4](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/language-js/index.js#L1-L4) [src/language-js/printers.js#L15-41](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/language-js/printers.js#L15-L41) [src/language-html/index.js#L1-7](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/language-html/index.js#L1-L7) [src/language-html/languages.evaluate.js#L4-39](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/language-html/languages.evaluate.js#L4-L39)
- The build is node ./scripts/build/build.js; scripts/build/packages/index.js emits four packages (prettier, plugin-hermes, plugin-oxc, plugin-yuku) into dist/. prepublishOnly exits 1 so the source tree cannot be published. — [package.json#L200-231](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/package.json#L200-L231) [scripts/build/build.js#L1-11](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/scripts/build/build.js#L1-L11) [scripts/build/packages/index.js#L1-11](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/scripts/build/packages/index.js#L1-L11) [scripts/build/packages/prettier.js#L32-37](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/scripts/build/packages/prettier.js#L32-L37)
- The website is Docusaurus 3 plus a separate Vite/Vue playground (website/vite.config.mjs, website/playground/). Netlify builds with yarn build:website and publishes website/build/. Playground formatting runs in a Worker at /worker.mjs. — [website/package.json#L1-16](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/website/package.json#L1-L16) [website/vite.config.mjs#L27-50](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/website/vite.config.mjs#L27-L50) [website/README.md#L7-45](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/website/README.md#L7-L45) [netlify.toml#L1-7](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/netlify.toml#L1-L7) [website/playground/composables/prettier-worker.js#L10-69](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/website/playground/composables/prettier-worker.js#L10-L69)
- CI is GitHub Actions: Dev runs yarn test (and c8 coverage) on Node 22/26; Prod first yarn build --clean then tests dist/ across Node 14–26, OS matrix, standalone, and Chrome/Firefox ESM+UMD via Puppeteer; Lint runs deps/tsc/eslint/prettier/cspell/changelog/format-test plus actionlint. — [.github/workflows/dev-test.yml#L20-69](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/.github/workflows/dev-test.yml#L20-L69) [.github/workflows/prod-test.yml#L20-202](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/.github/workflows/prod-test.yml#L20-L202) [.github/workflows/_build.yml#L9-32](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/.github/workflows/_build.yml#L9-L32) [.github/workflows/lint.yml#L21-67](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/.github/workflows/lint.yml#L21-L67)
- Config resolution is src/config/resolve-config.js: searchPrettierConfig + optional EditorConfig (editorconfig-without-wasm), mergeOverrides via micromatch, and relative plugin paths resolved against the config file directory. — [src/config/resolve-config.js#L69-127](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/config/resolve-config.js#L69-L127) [src/config/prettier-config/index.js#L52-62](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/config/prettier-config/index.js#L52-L62) [src/config/editorconfig/index.js#L23-47](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/config/editorconfig/index.js#L23-L47)
- The experimental CLI is a thin re-export of @prettier/cli/bin (and worker from @prettier/cli/dist/prettier_serial.js), selected by --experimental-cli or PRETTIER_EXPERIMENTAL_CLI rather than a first-party implementation in src/cli. — [src/experimental-cli/index.js#L1](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/experimental-cli/index.js#L1) [src/experimental-cli/worker.js#L1](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/experimental-cli/worker.js#L1) [bin/prettier.cjs#L33-66](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/bin/prettier.cjs#L33-L66) [package.json#L53](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/package.json#L53)

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)
