Registry / devops / prettier-plugin-reasonml

prettier-plugin-reasonml

JSON →
library0.2.0jsnpmunverified

A wrapper plugin that adds ReasonML (`.re` files) formatting support to Prettier by delegating to the `refmt` binary. Version 0.2.0 is the current stable release, with no regular cadence. Unlike AST-transforming plugins, this passes code directly to `refmt`, making it a thin integration layer. It requires `refmt` or `bsrefmt` to be installed separately, and inherits Prettier's configured options like `print-width`. Useful for ReasonML projects already using Prettier.

npm install prettier-plugin-reasonml
INSTALL
IMPORT
SIG · PRETTIER-PLUGIN-RE
P
prettier-plugin-reasonml
devopsjavascriptv0.2.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ // No JS import; use via Prettier CLI or API with --plugin
✗ const plugin = require('prettier-plugin-reasonml')
This is a Prettier plugin, not a library. It is loaded automatically by Prettier when installed. No direct import in code.

Install globally and use Prettier CLI to format ReasonML files with custom print width.

npm install -g prettier prettier-plugin-reasonml prettier src/**/*.re --write --print-width 120
Debug
Known issues
gotchaVSCode Prettier extension does not support this plugin due to an upstream issue.
fix
Use CLI or other editor integrations; see https://github.com/prettier/prettier-vscode/issues/395
affects: >=0.1.0
gotchaRequires `refmt` binary in PATH or set via REFMT_BIN environment variable.
fix
Ensure refmt (from reason package) is installed and accessible, or set REFMT_BIN=bsrefmt
affects: >=0.1.0
gotchaUses refmt directly; no AST manipulation, so some Prettier options may not apply as expected.
fix
Only options that translate to refmt flags (e.g., print-width) have effect.
affects: >=0.1.0
Errors
Common errors & fixes
Cannot find module 'prettier-plugin-reasonml'
Plugin not installed or not in node_modules path when running prettier.
fix
Install with npm install prettier-plugin-reasonml in the project or globally.
refmt: command not found
refmt binary not available; unable to format files.
fix
Install refmt via npm install -g reason or set REFMT_BIN to bsrefmt.
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies
prettierrequiredPeer dependency; the plugin requires Prettier to be installed.
Agent activity
2 hits · last 30 days
node
2
Resources
prettier-plugin-reasonml — npm install prettier-plugin-reasonml · libregistry