Skip to content
PluginStats

prettier-plugin-sieve weekly downloads statistics

By jaiew · npm · Prettier plugins

Prettier plugin for Sieve email filtering scripts (RFC 5228)

View on npm Fresh · Dec 6, 2026

prettier-plugin-sieve has 14 recorded weekly downloads on npm, a decrease of 61.1% over the past 30 days, ranking #3065 of 3,247 tracked listings.

Weekly downloads
14
Official API · Dec 5, 2026
7-day growth
+7.7%
+1 weekly downloads
30-day growth
-61.1%
-22 weekly downloads
90-day growth
+133%
+8 weekly downloads
Rank
#3065
▼ 158 in 7 days

About prettier-plugin-sieve

prettier-plugin-sieve

A Prettier plugin for formatting Sieve email filtering scripts (RFC 5228).

Features

  • Formats .sieve / .siv files via Prettier
  • Hand-rolled Peggy.js PEG grammar for RFC 5228 core language
  • Supports: require, if/elsif/else, all standard tests (address, header, envelope, allof, anyof, not, size, exists, true, false), all standard actions (fileinto, redirect, keep, discard, stop, reject, vacation, addflag, setflag, removeflag)
  • Idempotent — formatting twice gives the same result
  • Works with Prettier 3.x
  • IntelliJ IDEA + VS Code Prettier extension compatible

Installation

npm install --save-dev prettier prettier-plugin-sieve

Configuration

.prettierrc
{
  "plugins": ["prettier-plugin-sieve"]
}
VS Code (settings.json)
{
  "prettier.documentSelectors": ["**/*.sieve", "**/*.siv"],
  "[sieve]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  }
}
IntelliJ IDEA

Go to Settings → Languages & Frameworks → JavaScript → Prettier:

  • Enable "Run on save"
  • Add **/*.sieve to the "Run for files" glob

Usage

# Format all .sieve files
npx prettier --write "**/*.sieve"

# Check formatting without writing
npx prettier --check "**/*.sieve"

Example

Input (messy):

require ["fileinto","reject","vacation"];
if anyof(header :contains "Subject" "URGENT",address :is "From" "boss@example.com"){fileinto "Priority";}
elsif header:contains "Subject" "[SPAM]"{discard;}
else{keep;}

Output (formatted):

require ["fileinto", "reject", "vacation"];
if anyof (
  header :contains "Subject" "URGENT",
  address :is "From" "boss@example.com"
) {
  fileinto "Priority";
} elsif header :contains "Subject" "[SPAM]" {
  discard;
} else {
  keep;
}

Project Structure

prettier-plugin-sieve/
├── src/
│   ├── index.ts               # Plugin entry: languages, parsers, printers
│   ├── types.ts               # Full TypeScript AST node interfaces
│   ├── printer.ts             # Prettier Doc builder / printer
│   └── parser/
│       ├── index.ts           # parse(), locStart(), locEnd() exports
│       └── sieve.pegjs        # Peggy PEG grammar for RFC 5228
├── tests/
│   └── format.test.ts         # Jest end-to-end formatting tests
├── package.json
└── tsconfig.json

Architecture

1 · Grammar (src/parser/sieve.pegjs)

A Peggy PEG grammar that directly encodes RFC 5228 syntax. Each grammar rule returns a typed AST node with a loc (source location) property. The grammar is compiled at runtime the first time parse() is called (or can be pre-compiled via npm run generate-parser for production builds).

2 · Parser adapter (src/parser/index.ts)

Wraps Peggy's parse() to:

  • Return a Script root node
  • Expose locStart / locEnd so Prettier can attach comments
  • Surface grammar errors with human-readable messages
3 · Printer (src/printer.ts)

Converts the Sieve AST into Prettier's Doc IR using the doc.builders API:

Doc primitiveWhere used
hardlineBetween top-level commands and block contents
softlineInside string lists, test argument lists
groupAll commands and tests — allows line-breaking when over printWidth
indentBlock bodies, multi-line list arguments
joinComma-separated string lists and test lists

Building

# Compile TypeScript → dist/
npm run build

# Optionally pre-compile the Peggy grammar to JS for faster startup
npm run generate-parser

Testing

npm test

Extending

To add support for Sieve extensions (e.g. RFC 5232 sieve-imap-flags, RFC 5230 vacation):

  1. Add new rules to src/parser/sieve.pegjs
  2. Add new AST interfaces to src/types.ts
  3. Add case branches to printAction / printTest in src/printer.ts

License

MIT

Description from the npm listing.

  • prettier
  • prettier-plugin
  • sieve
  • email
  • filter

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

prettier-plugin-sieve weekly downloads on npm, last 90 days: 14 weekly downloads as of Dec 5, 2026, +133% over 90 days.prettier-plugin-sieveWeekly downloads on npm · Last 90 days14downloads / week+133% over 90 days010203040Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
prettier-plugin-sieve weekly downloads on npm, last 90 days: 14 weekly downloads as of Dec 5, 2026, +133% over 90 days.

7/30/90-day growth

prettier-plugin-sieve weekly downloads growth on npm: +7.7% over 7 days, -61.1% over 30 days, +133% over 90 days.prettier-plugin-sieveWeekly downloads growth on npm14downloads / week now7-day growth+1 weekly downloads+7.7%30-day growth-22 weekly downloads-61.1%90-day growth+8 weekly downloads+133%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
prettier-plugin-sieve weekly downloads growth on npm: +7.7% over 7 days, -61.1% over 30 days, +133% over 90 days.

Ranking history

prettier-plugin-sieve npm ranking history: currently #3065 (by weekly downloads).prettier-plugin-sievenpm ranking · by weekly downloads · Last 90 days#3065current rank#1800#2000#2200#2400#2600#2800#3000#3200Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
prettier-plugin-sieve npm ranking history: currently #3065 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 154, #7 (overall #3,067)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 11, #4 (overall #204)
Prettier plugins: every listing in weekly downloads order

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 (170)
Recent weekly downloads observations for prettier-plugin-sieve
Date (UTC)Weekly downloadsChange vs. previous
140
14+2
12+5
7-1
8+1
7+1
6-7
13+1
12+3
90
90
90
90
9—

Similar npm Prettier plugins plugins

All 20 prettier-plugin-sieve alternatives

Data 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-sieve. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.