prettier-plugin-typograf weekly downloads statistics
By omelniz · npm · Prettier plugins
A Prettier plugin for Markdown and plain-text typography, powered by Typograf.
prettier-plugin-typograf has 88 recorded weekly downloads on npm, ranking #2648 of 3,247 tracked listings.
About prettier-plugin-typograf
prettier-plugin-typograf
A Prettier plugin that improves typography in Markdown and plain text, powered by Typograf.
It fixes quotation marks, dashes, non-breaking spaces, copyright symbols, and other typographic details. Russian and US English are enabled by default; locales and rules are configurable.
Before: "Текст" - пример. Copyright (c) 2026
After: «Текст» — пример. Copyright © 2026
The space before the em dash in this example is a non-breaking space (U+00A0).
Installation
Requires Node.js 22.18+ and Prettier 3.7+ within major version 3. This package is ESM.
Install the plugin and Prettier:
npm install --save-dev prettier prettier-plugin-typograf
Alternatively, install a tagged release directly from GitHub:
npm install --save-dev prettier github:omelniz/prettier-plugin-typograf#v0.1.0
With npm 12+, add --allow-git=root to this Git install command. npm 12 disables Git dependencies by default; see npm's Git dependency policy. This is not required for registry installs.
Git installs run prepare to build the plugin and install its development tools. Building requires Node.js ^22.18.0 || ^24.11.0 || >=26.0.0. The npm release contains ready-to-use JavaScript and TypeScript declarations.
Add the plugin to your Prettier configuration, for example .prettierrc.json:
{
"plugins": ["prettier-plugin-typograf"],
"typografLocale": ["ru", "en-US"]
}
Prettier requires an explicit plugin entry. There is no separate .typograf.json file.
Formatting files
npx prettier --write "**/*.{md,txt,text}"
npx prettier --check "**/*.{md,txt,text}"
printf '"Hello"\n' | npx prettier --plugin prettier-plugin-typograf --parser typograf --typograf-locale en-US
- Markdown uses the
markdownparser and Prettier's existing Markdown printer. Typography applies to headings, paragraphs, list items, table cells, link labels, and HTML prose. - Plain text uses the
typografparser, automatically selected for.txtand.text. It processes each line as text, preserves indentation and line structure, and does not interpret Markdown or wrap toprintWidth.endOfLinecontrols line endings; nonempty output ends with one newline. Existing blank lines inside the document remain.
For other extensions or extensionless files, select the plain-text parser explicitly:
{
"plugins": ["prettier-plugin-typograf"],
"overrides": [
{
"files": ["*.prose", "COPY"],
"options": {
"parser": "typograf",
"typografLocale": ["en-US"]
}
}
]
}
Plain-text input has no Markdown code fences, escapes, ignore comments, or protected HTML blocks: those characters are part of the text. Typograf rules can change punctuation and spacing; this is not a byte-preserving pass-through formatter.
Options
All options work in Prettier config files, overrides, and the JavaScript API. Array options accept repeated CLI flags, for example --typograf-locale ru --typograf-locale en-US.
| Option | Type | Default | Purpose |
|---|---|---|---|
typografLocale | string[] | ["ru", "en-US"] | Supported Typograf locales in priority order; must not be empty. |
typografDisableRule | string[] | [] | Rule names or wildcard masks to disable. |
typografEnableRule | string[] | [] | Rule names or wildcard masks to enable after disabling rules. |
typografHtmlEntityType | "default" | "name" | "digit" | "js" | "default" | Unicode characters, named entities, numeric entities, or JavaScript Unicode escapes. |
typografHtmlEntityOnlyInvisible | boolean | false | Encode only invisible characters when using an entity representation. |
For example, keep straight quotation marks while retaining other typography:
{
"plugins": ["prettier-plugin-typograf"],
"typografDisableRule": ["*/punctuation/quote"]
}
See Typograf's rule list, locale documentation, and entity formats.
JavaScript and TypeScript
import { format } from "prettier";
import * as typograf from "prettier-plugin-typograf";
import type { TypografOptions } from "prettier-plugin-typograf";
const options = {
parser: "typograf",
plugins: [typograf],
typografLocale: ["ru"],
} satisfies TypografOptions;
const output = await format('"Текст" - пример', options);
For typed Prettier config files, use satisfies Config & TypografOptions, importing Config from prettier. Options are exported as a type rather than globally augmenting Prettier's types.
Protected content and limitations
In Markdown, the plugin preserves code blocks and inline code, frontmatter, link destinations and titles, images, autolinks, literal escapes/entities, wikilinks, HTML attributes and comments, and verbatim HTML content such as code, pre, script, and style. It respects prettier-ignore and range ignore comments. Prettier itself may still reformat supported embedded code according to its normal options.…
Description from the npm listing.
- prettier
- prettier-plugin
- typograf
- typography
- markdown
- plaintext
- russian
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (1)Similar npm Prettier plugins plugins
All 20 prettier-plugin-typograf alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/prettier-plugin-typograf. First seen Dec 6, 2026; last successful collection Dec 6, 2026. See the methodology.