← All reportsPublic report

prettier/prettier

Prettier is an opinionated code formatter.

52k stars JavaScript View on GitHubprofiled 15d ago
Try GitZoid
0PRs this week
0Contributors
0Deps scanned
0Issues found
01 · Repo overview

How prettier is put together

Prettier is an opinionated multi-language code formatter published as the npm package 'prettier'. It is written almost entirely in JavaScript (ESM, Node >=22) with TypeScript declaration files for its public API. The architecture follows a plugin-per-language pipeline: each src/language-* module provides parsers, printers, embed handlers, options, and visitor keys; parsed ASTs are converted into an intermediate 'doc' IR (src/document) which is then printed to formatted output. A CLI (src/cli, bin/prettier.cjs) handles file discovery, ignore/cache handling, and config resolution (src/config), while a standalone browser bundle (src/standalone.js) exposes the same core without Node APIs. Auxiliary workspaces under packages/ ship experimental parser plugins (oxc, hermes, yuku), and scripts/ contains the esbuild-based build tooling.

Languages

JavaScriptTypeScript (type definitions)Shell (build/benchmark scripts)

Frameworks

Jest 30 (with jest-light-runner)ESLint 10esbuild (bundling)Puppeteer (browser tests)c8 (coverage)

Infrastructure

Netlify (netlify.toml for website hosting)GitHub Actions CI (badge in README)Codecov coverage reporting

Major components

Core API

Public entry points (src/index.js, src/index.cjs, src/standalone.js) exposing format(), parsers, doc builders, and TypeScript typings.

Document IR / Printer

src/document implements the intermediate representation (builders, printer, utils) that language printers emit and that measures line widths to decide wrapping.

Language plugins

src/language-js, -css, -html, -markdown, -yaml, -graphql, -json, -handlebars each provide parsers, printers, embed logic, options, and visitor keys for their language.

CLI

src/cli implements argument parsing, glob expansion, .gitignore/.prettierignore-aware directory traversal, caching of format results, and formatted output/diff reporting.

Config resolution

src/config resolves .prettierrc-style configs, overrides, and project roots, including editorconfig support.

Experimental CLI

src/experimental-cli runs formatting in worker processes (@prettier/cli based) as an alternative CLI implementation.

Parser plugin packages

packages/plugin-oxc, plugin-hermes, and plugin-yuku wrap alternative JS parsers (oxc-parser, hermes-parser, yuku-parser) as separate publishable plugins.

Build & release tooling

scripts/build bundles distributables with esbuild, generates builtin plugins, and scripts/release handles publishing; website build targets Netlify.

02 · Weekly changes

No digest this week

1 weeksWeek of

03 · Security check

Dependencies and code review

0 dependencies scanned

Dependency advisories

Security Watch

No known advisories across 0 scanned dependencies.

No known advisories in the scanned dependencies.

Code review

No concrete code-level issues confirmed.

Get this report every week for your repos.

GitZoid learns each repo, reports what changed, and flags what needs attention. One flat price for the whole team.

$19 a month, flat · First 10 outputs free · No card required