# Feature catalog — prettier/prettier

> Canonical page: https://codevetter.com/unpack/prettier/feature-catalog

# Feature catalog — prettier/prettier

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

Users format via CLI, Node API, or browser standalone. The CLI writes, checks, lists, caches, and inspects files; the API formats text, maps cursor offsets, resolves config, and infers parsers. Built-in languages cover the web stack with multiple JS parsers (babel/acorn/espree/meriyah/oxc/yuku/typescript/flow/hermes). Plugins, EditorConfig, ignore files, pragmas, range format, and a playground are first-class. Prettier refuses new formatting options by policy.
- prettier.format(text, options) is withPlugins(core.formatWithCursor) with cursorOffset -1; prettier.check is format === text; prettier.formatWithCursor returns {formatted, cursorOffset, comments}. — [src/index.js#L67-79](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/index.js#L67-L79) [docs/api.md#L14-36](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/docs/api.md#L14-L36) [src/main/core.js#L321-364](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/core.js#L321-L364)
- Public Node APIs also include resolveConfig, resolveConfigFile, clearConfigCache, getFileInfo, getSupportInfo, plus prettier.doc and prettier.util. All public APIs are async; src/index.d.ts is the shipped types. — [src/index.js#L130-144](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/index.js#L130-L144) [docs/api.md#L8-12](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/docs/api.md#L8-L12) [src/index.d.ts#L1-15](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/index.d.ts#L1-L15) [src/common/get-file-info.js#L19-41](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/common/get-file-info.js#L19-L41)
- CLI surface from src/cli/cli-options.evaluate.js includes --write/-w, --check/-c, --list-different/-l, --cache, --cache-location, --cache-strategy content|metadata, --config/--no-config, --config-precedence cli-override|file-override|prefer-file, --editorconfig, --ignore-path (default .gitignore and .prettierignore), --ignore-unknown/-u, --with-node-modules, --file-info, --find-config-path, --support-info, --help, --version. — [src/cli/cli-options.evaluate.js#L63-242](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/cli/cli-options.evaluate.js#L63-L242) [docs/cli.md#L8-141](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/docs/cli.md#L8-L141)
- Debug CLI flags --debug-print-doc, --debug-print-ast, --debug-print-comments, --debug-check, --debug-benchmark, --debug-repeat (and PRETTIER_PERF_REPEAT) short-circuit the format path in src/cli/format.js. — [src/cli/format.js#L102-209](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/cli/format.js#L102-L209) [src/cli/context.js#L57-85](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/cli/context.js#L57-L85) [src/cli/cli-options.evaluate.js#L138-159](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/cli/cli-options.evaluate.js#L138-L159)
- Core format options in src/main/core-options.evaluate.js include parser, plugins (--plugin, array), printWidth (80), tabWidth (2), useTabs, endOfLine (lf|crlf|cr|auto), filepath/--stdin-filepath, rangeStart/rangeEnd, cursorOffset, insertPragma, requirePragma, checkIgnorePragma. — [src/main/core-options.evaluate.js#L47-197](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/core-options.evaluate.js#L47-L197)
- JS builtin parsers registered in development-plugins.js include babel, babel-flow, babel-ts, acorn, espree, meriyah, oxc, oxc-ts, typescript, flow, hermes, yuku, yuku-ts plus internal __js_expression / __vue_* / __ng_* parsers. — [src/main/plugins/builtin-plugins/development-plugins.js#L54-84](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/plugins/builtin-plugins/development-plugins.js#L54-L84) [src/language-js/parse/index.js#L1-10](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/language-js/parse/index.js#L1-L10) [src/language-js/languages.evaluate.js#L4-78](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/language-js/languages.evaluate.js#L4-L78)
- Non-JS builtins: css/less/scss (postcss), graphql, glimmer/handlebars, html/angular/lwc/mjml/vue, json/json-stringify/json5/jsonc, markdown/mdx/remark, yaml. Parser names are also listed as core option choices. — [src/main/plugins/builtin-plugins/development-plugins.js#L22-113](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/plugins/builtin-plugins/development-plugins.js#L22-L113) [src/main/core-options.evaluate.js#L107-140](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/core-options.evaluate.js#L107-L140)
- Official in-repo extra packages @prettier/plugin-oxc, @prettier/plugin-hermes, and @prettier/plugin-yuku wrap the corresponding JS parsers, set a distinct astFormat (estree-oxc/estree-hermes/estree-yuku), and reuse the estree printer. — [packages/plugin-oxc/index.js#L1-18](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/packages/plugin-oxc/index.js#L1-L18) [packages/plugin-hermes/index.js#L1-18](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/packages/plugin-hermes/index.js#L1-L18) [packages/plugin-yuku/index.js#L1-18](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/packages/plugin-yuku/index.js#L1-L18) [packages/plugin-oxc/package.json#L1-14](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/packages/plugin-oxc/package.json#L1-L14)
- Plugin loading is documented for CLI --plugin, API options.plugins, and config plugins; plugin modules export languages, parsers, printers, options, defaultOptions. Strings go through import() / importFromDirectory. — [docs/plugins.md#L8-144](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/docs/plugins.md#L8-L144) [src/main/plugins/load-plugin.js#L11-55](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/plugins/load-plugin.js#L11-L55) [src/main/core-options.evaluate.js#L142-153](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/main/core-options.evaluate.js#L142-L153)
- Config files searched in order: package.json prettier key, package.yaml, .prettierrc, .prettierrc.json/yml/yaml/json5, .prettierrc.js/ts and prettier.config.js/ts, mjs/mts, cjs/cts, .prettierrc.toml. JS/TS configs are executed via import(pathToFileURL). — [src/config/prettier-config/config-searcher.js#L16-61](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/config/prettier-config/config-searcher.js#L16-L61) [src/config/prettier-config/loaders.js#L19-111](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/config/prettier-config/loaders.js#L19-L111) [docs/configuration.md#L7-14](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/docs/configuration.md#L7-L14)
- CLI --cache uses FormatResultsCache (file-entry-cache) at node_modules/.cache/prettier/.prettier-cache by default, keyed by prettier version + Node version + stable-stringified options, strategy content (checksum) or metadata (mtime). Cache is forbidden with stdin. — [src/cli/format-results-cache.js#L35-70](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/cli/format-results-cache.js#L35-L70) [src/cli/find-cache-file.js#L7-46](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/cli/find-cache-file.js#L7-L46) [src/cli/index.js#L102-105](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/cli/index.js#L102-L105) [src/cli/cli-options.evaluate.js#L64-86](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/src/cli/cli-options.evaluate.js#L64-L86)
- The playground (website/playground/PrettierFormat.js) posts {type:'format', version, code, options, settings} to a versioned Worker; docs/technical-details.md notes a special parser value doc-explorer for inspecting the Doc IR. Prettier will not accept PRs that add formatting options. — [website/playground/PrettierFormat.js#L13-20](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/website/playground/PrettierFormat.js#L13-L20) [website/playground/composables/prettier-worker.js#L59-69](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/website/playground/composables/prettier-worker.js#L59-L69) [docs/technical-details.md#L8-12](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/docs/technical-details.md#L8-L12) [docs/option-philosophy.md#L8-42](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/docs/option-philosophy.md#L8-L42) [CONTRIBUTING.md#L87-89](https://github.com/prettier/prettier/blob/1a36a7defdcccfc4967e99bbf9517a02ab2345b2/CONTRIBUTING.md#L87-L89)

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)
