Verification · Hygiene · Formatting
Code formatter
One opinionated formatter per language, run on save and in CI.
How to build it
- Choose one formatter for each language in the repository and pin its version.
- Commit its config file at the repository root, such as pyproject.toml or .prettierrc.
- Enable format on save in the shared editor settings and add a pre-commit hook that rewrites files.
Signals in a repository
- Formatter config in pyproject.toml, .prettierrc, rustfmt.toml or biome.json.
- A pre-commit config that lists a formatter hook.
- Formatter versions pinned in dev dependencies or package.json.
In practice
162 repositories run a tool for this check in the scanned set.
ruff-format· 43 reposblack· 14 reposprettier· 98 reposbiome· 24 reposrustfmt· 46 reposgofmt· 7 repos
Examples
-
freeCodeCamp/freeCodeCamp ·
prettierprettier --write client/i18n/locales/**/*.json -
kamranahmedse/developer-roadmap ·
prettierprettier --write . -
nousresearch/hermes-agent ·
prettierprettier --write src/**/*.{ts,tsx} packages/**/*.{ts,tsx} -
TheAlgorithms/Python ·
ruff-formatpre-commit hook ruff-format -
microsoft/vscode ·
rustfmtcargo fmt --check