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 · Oct 18, 2026

prettier-plugin-sieve has 4 recorded weekly downloads on npm, a decrease of 50.0% over the past 30 days, ranking #2211 of 2,322 tracked listings.

Weekly downloads
4
Official API · Oct 18, 2026
7-day growth
+300%
+3 weekly downloads
30-day growth
-50.0%
-4 weekly downloads
90-day growth
0.0%
0 weekly downloads
Rank
#2211
Among tracked npm listings

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: 4 weekly downloads as of Oct 18, 2026, 0.0% over 90 days.prettier-plugin-sieveWeekly downloads on npm · Last 90 days4downloads / week0.0% over 90 days0246810Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
prettier-plugin-sieve weekly downloads on npm, last 90 days: 4 weekly downloads as of Oct 18, 2026, 0.0% over 90 days.

7/30/90-day growth

prettier-plugin-sieve weekly downloads growth on npm: +300% over 7 days, -50.0% over 30 days, 0.0% over 90 days.prettier-plugin-sieveWeekly downloads growth on npm4downloads / week now7-day growth+3 weekly downloads+300%30-day growth-4 weekly downloads-50.0%90-day growth+0 weekly downloads0.0%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
prettier-plugin-sieve weekly downloads growth on npm: +300% over 7 days, -50.0% over 30 days, 0.0% over 90 days.

Ranking history

prettier-plugin-sieve npm ranking history: currently #2211 (by weekly downloads).prettier-plugin-sievenpm ranking · by weekly downloads · Last 90 days#2211current rank#2200#2202#2204#2206#2208#2210#2212#2214Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 18, 2026 – Oct 20, 2026 · 3 observations · Updated Oct 18, 2026pluginstats.com
prettier-plugin-sieve npm ranking history: currently #2211 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,161 shown · page 111, #15 (overall #2,215)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins244 listings · 13 pages · page 9, #19 (overall #179)
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 (122)
Recent weekly downloads observations for prettier-plugin-sieve
Date (UTC)Weekly downloadsChange vs. previous
4+3
10
10
10
10
10
10
10
1-1
2-3
50
5-2
7-3
10—

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 Oct 20, 2026. See the methodology.