Skip to content
PluginStats

@seletskiy/plugin-pug weekly downloads statistics

By seletskiy · npm · Prettier plugins

Prettier Pug Plugin

View on npm Fresh · Dec 6, 2026

@seletskiy/plugin-pug has 8 recorded weekly downloads on npm, an increase of 700% over the past 30 days, ranking #3170 of 3,247 tracked listings.

Weekly downloads
8
Official API · Dec 5, 2026
7-day growth
+14.3%
+1 weekly downloads
30-day growth
+700%
+7 weekly downloads
90-day growth
+60.0%
+3 weekly downloads
Rank
#3170
▼ 144 in 7 days

About @seletskiy/plugin-pug

<p align="center"> &nbsp;&nbsp;<a href="https://prettier.io"> <img alt="Prettier" src="https://cdn.rawgit.com/prettier/prettier-logo/master/images/prettier-icon-light.svg"><!-- --></a>&nbsp;&nbsp; &nbsp;&nbsp;<a href="https://pugjs.org"> <img alt="Pug" src="https://cdn.rawgit.com/pugjs/pug-logo/eec436cee8fd9d1726d7839cbe99d1f694692c0c/SVG/pug-final-logo-_-colour-128.svg" height="210"><!-- --></a>&nbsp;&nbsp; </p> <h2 align="center">Prettier Pug plugin</h2> <p align="center"> <a href="https://github.com/prettier/plugin-pug/blob/master/LICENSE"> <img alt="license: MIT" src="https://img.shields.io/github/license/prettier/plugin-pug.svg?style=flat-square"><!-- --></a> <a href="https://www.npmjs.com/package/@prettier/plugin-pug"> <img alt="NPM package" src="https://img.shields.io/npm/v/@prettier/plugin-pug.svg?style=flat-square"><!-- --></a> <a href="https://www.npmjs.com/package/@prettier/plugin-pug"> <img alt="downloads" src="https://img.shields.io/npm/dt/@prettier/plugin-pug.svg?style=flat-square"><!-- --></a> <a href="#badge"> <img alt="code style: Prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"><!-- --></a> <a href="https://github.com/prettier/plugin-pug/actions?query=branch%3Amaster+workflow%3ACI"> <img alt="Build Status" src="https://github.com/prettier/plugin-pug/workflows/CI/badge.svg?branch=master"><!-- --></a> </p>

Please note that the plugin ecosystem in Prettier is still beta, which may make <nobr>@prettier/plugin-pug</nobr> not ready for production use yet.


Plugin for Prettier to format pug code

You can disable code formatting for a particular code block by adding <nobr><!-- prettier-ignore --></nobr> before ```pug.

Pug code with custom formatting:

<!-- prettier-ignore -->
```pug
div.text( color =   "primary",  disabled  ="true"  )
```

Prettified code:

```pug
.text(color="primary", disabled)
```

Getting started

Simply install prettier and @prettier/plugin-pug as your project’s npm devDependencies:

cd /path/to/project

## initialise an npm project if you haven’t done it yet
npm init
## or
yarn init

## add Prettier and its Pug plugin to project’s dev dependencies
npm install --dev prettier @prettier/plugin-pug
## or
yarn add --dev prettier @prettier/plugin-pug

Usage

## format all pug files in your project
./node_modules/.bin/prettier --write "**/*.pug"
## or
yarn prettier --write "**/*.pug"
Prettier Options
  • printWidth
    Currently not very accurate, but works
  • semi
    If you want to configure different semi for pug than for js code, you can use prettier's override.
    {
      "semi": false,
      "overrides": [
        {
          "files": "*.pug",
          "options": {
            "parser": "pug",
            "semi": true
          }
        }
      ]
    }
    
  • singleQuote
    If you want to configure different quotes for pug than for js code, you can use prettier's override.
    {
      "singleQuote": true,
      "overrides": [
        {
          "files": "*.pug",
          "options": {
            "parser": "pug",
            "singleQuote": false
          }
        }
      ]
    }
    
  • tabWidth
    Use spaces for indentation
  • useTabs
    Use tab for indentation Overrides tabWidth
prettier-pug specific options

These are specific options only for prettier-pug
They should be set via Prettier's overrides option

  • attributeSeparator
    Change when attributes are separated by commas in tags.

    Choices:

    • 'always' default -> Always separate attributes with commas.
      Example: button(type="submit", (click)="play()", disabled)
    • 'as-needed' -> Only add commas between attributes where required.
      Example: button(type="submit", (click)="play()" disabled)
  • closingBracketPosition
    Position of closing bracket of attributes.

    Choices:

    • 'new-line' default -> Closing bracket ends with a new line.
      Example:

      input(
        type="text",
        value="my_value",
        name="my_name",
        alt="my_alt",
        autocomplete="on"
      )
      
    • 'last-line' -> Closing bracket remains with last attribute's line.
      Example:

      input(
        type="text",
        value="my_value",
        name="my_name",
        alt="my_alt",
        autocomplete="on")
      
  • commentPreserveSpaces
    Change behavior of spaces within comments.

    Choices:

    • 'keep-all' default -> Keep all spaces within comments.
      Example: // ___this _is __a __comment_
    • 'keep-leading' -> Keep leading spaces within comments.
      Example: // ___this is a comment
    • 'trim-all' -> Trim all spaces within comments.
      Example: // this is a comment

The definitions for these options can be found in src/options/index.ts

Some workarounds

There are some code examples that are not formatted well with this plugin and can damage your code.
But there are workarounds for it. These generate even better pug code!

Examples

Issue 53

input(onClick="methodname(\"" + variable + "\", this)")
// transforms to
input(onClick="methodname(\"\" + variable + \"\", this)")

// In most cases ES6 template strings are a good solution
input(onClick=`methodname("${variable}", this)`)

As mentioned in pugjs.org Attribute Interpolation (2.), you should prefere ES2015 template strings to simplify your attributes.

Issue 54

- const id = 42
- const collapsed = true

div(id=id, class='collapse' + (collapsed ? '' : ' show') + ' cardcontent')
// transforms to
.cardcontent(id=id, class="collapse' + (collapsed ? '' : ' show') + '")…

Description from the npm listing.

  • pug
  • prettier
  • prettier-plugin

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

@seletskiy/plugin-pug weekly downloads on npm, last 90 days: 8 weekly downloads as of Dec 5, 2026, +60.0% over 90 days.@seletskiy/plugin-pugWeekly downloads on npm · Last 90 days8downloads / week+60.0% over 90 days02468Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@seletskiy/plugin-pug weekly downloads on npm, last 90 days: 8 weekly downloads as of Dec 5, 2026, +60.0% over 90 days.

7/30/90-day growth

@seletskiy/plugin-pug weekly downloads growth on npm: +14.3% over 7 days, +700% over 30 days, +60.0% over 90 days.@seletskiy/plugin-pugWeekly downloads growth on npm8downloads / week now7-day growth+1 weekly downloads+14.3%30-day growth+7 weekly downloads+700%90-day growth+3 weekly downloads+60.0%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@seletskiy/plugin-pug weekly downloads growth on npm: +14.3% over 7 days, +700% over 30 days, +60.0% over 90 days.

Ranking history

@seletskiy/plugin-pug npm ranking history: currently #3170 (by weekly downloads).@seletskiy/plugin-pugnpm ranking · by weekly downloads · Last 90 days#3170current rank#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
@seletskiy/plugin-pug npm ranking history: currently #3170 (by weekly downloads).

Listing placement

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

Listing placement

Prettier plugins267 listings · 14 pages · page 12, #19 (overall #239)
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 @seletskiy/plugin-pug
Date (UTC)Weekly downloadsChange vs. previous
8+1
70
7-1
8+1
7+1
60
6-1
70
70
70
7+1
6+1
5-1
6—

Similar npm Prettier plugins plugins

All 20 @seletskiy/plugin-pug 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/@seletskiy/plugin-pug. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.