Skip to content
PluginStats

go-prettier-format weekly downloads statistics

By gitdog01 · npm · Prettier plugins

Prettier plugin for Go, powered by WASM.

View on npm Fresh · Oct 17, 2026

go-prettier-format has 2 recorded weekly downloads on npm, a decrease of 71.4% over the past 30 days.

It ranks #2155 of 2,256 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by +100%.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
2
Official API · Oct 17, 2026
7-day growth
—
Insufficient history
30-day growth
-71.4%
-5 weekly downloads
90-day growth
+100%
+1 weekly downloads
Rank
#2155
Among tracked npm listings

About go-prettier-format

Prettier Plugin for Go (using WASM)

This is a Prettier v3 plugin for the Go programming language. It formats Go code using the official go/format package, which is compiled to WebAssembly (WASM) to run in a Node.js environment.

Background

As web developers, we love the consistent code style that Prettier brings to our projects. However, when working on projects that involve Go - for instance, a Go backend with a JavaScript frontend, or writing Go code in a web-based editor - the ability to format Go code with the same familiar tool was missing.

This project was born out of the desire to have a single, unified formatting toolchain. Instead of relying on external gofmt binaries, which can be brittle to manage in a Node.js-based development environment, this plugin leverages the power of WebAssembly. We compile Go's own formatting tools into a WASM module, allowing you to format Go code directly within your JavaScript-based tools, ensuring speed, portability, and consistency.

Installation

First, install Prettier (v3 or later) and this plugin from NPM:

The plugin comes with a pre-compiled WASM module, so you don't need to have Go installed on your machine to use it.

Usage

Command Line

You can run Prettier from the command line to format your Go files:

Note: For cross-platform compatibility in npm scripts, it's recommended to use single quotes: '**/*.go'.

package.json Script

For convenience, you can add a script to your package.json:

Editor Integration

Once installed, Prettier-compatible editors (like VS Code with the Prettier extension) should automatically pick up the plugin and use it to format .go files on save.

For Contributors

Interested in contributing? Here's how to get set up for development.

Development Setup

Option 1: Local Development (Requires Go + Node.js)

You will need to have Go (1.21+) and Node.js (18+) installed on your machine.

1. Clone the repository and install dependencies:

2. Build the WASM module:

Option 2: Docker Development (No Local Go/Node.js Required)

If you prefer not to install Go and Node.js locally, you can use Docker:

1. Clone the repository:

2. Build using Docker:

3. Development with Docker Compose (recommended):

Docker Quick Start

If you just want to try the plugin without installing Go or Node.js:

Testing the Plugin

This repository comes with a set of test files to verify the plugin's functionality.

To run the tests:

This command will: • Build the latest version of the plugin from source. • Create a test_result directory. • Copy the sample files from the tests/ directory into it. • Run the Prettier formatter on the files inside test_result/.

You can then compare the original files in tests/ with the formatted files in test_result/ to see the plugin in action. For example, tests/messy.txt will be cleaned up, while tests/error.txt (which contains a syntax error) will remain untouched.

Note: The test files use a .txt extension to prevent editors from automatically formatting them. The test script tells Prettier to treat these .txt files as Go code.

Publishing to NPM

This package is configured to build automatically before publishing.

1. Update the version number in package.json using npm version . 2. Run npm publish.

The prepublishOnly script will handle building the Wasm and JavaScript bundles before the package is uploaded to the registry.

How it Works

1. The core formatting logic from Go's standard library (go/format) is compiled into a WebAssembly (.wasm) file. 2. The wasm_exec.js script provided by Go is used to load and run the WASM module in Node.js. 3. This Prettier plugin loads the WASM module and exposes the Go formatting function to Prettier's printing process. 4. When Prettier processes a .go file, this plugin passes the code to the WASM module, which formats it and returns the result.

This approach ensures that the formatting is identical to what gofmt would produce, without needing a Go installation on the machine running the formatter.

Description from the npm listing.

  • prettier
  • prettier-plugin
  • go
  • golang
  • formatter

Where go-prettier-format sits in the listing

Each band is one page of 20. Weekly downloads on a log 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.

All npm2,256 listings · 113 pages · page 108, #16 (overall #2156)
All npm: every listing in weekly downloads order
PNG SVG
Prettier plugins244 listings · 13 pages · page 10, #1 (overall #181)
Prettier plugins: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

go-prettier-format weekly downloads on npm, last 90 days: 2 weekly downloads as of Oct 17, 2026, +100% over 90 days.go-prettier-formatWeekly downloads on npm · Last 90 days2downloads / week+100% over 90 days024681012Jul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
go-prettier-format weekly downloads on npm, last 90 days: 2 weekly downloads as of Oct 17, 2026, +100% over 90 days.
PNG SVG

7/30/90-day growth

go-prettier-format weekly downloads growth on npm: 7-day growth unavailable, -71.4% over 30 days, +100% over 90 days.go-prettier-formatWeekly downloads growth on npm2downloads / week now7-day growth+2 weekly downloadsInsufficient history30-day growth-5 weekly downloads-71.4%90-day growth+1 weekly downloads+100%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
go-prettier-format weekly downloads growth on npm: 7-day growth unavailable, -71.4% over 30 days, +100% over 90 days.
PNG SVG

Ranking history

go-prettier-format npm ranking history: currently #2155 (by weekly downloads).go-prettier-formatnpm ranking · by weekly downloads · Last 90 days#2155current rank#2148#2150#2152#2154#2156#2158Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 18, 2026 – Oct 19, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
go-prettier-format npm ranking history: currently #2155 (by weekly downloads).
PNG SVG

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.

Recent observations

Full history (121)
Recent weekly downloads observations for go-prettier-format
Date (UTC)Weekly downloadsChange vs. previous
20
2+2
00
00
00
00
00
00
0-3
30
30
30
30
3—

Similar npm Prettier plugins plugins

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/go-prettier-format. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.