{"id":20411,"library":"prettier-plugin-reasonml","title":"Prettier ReasonML Plugin","description":"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.","status":"active","version":"0.2.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","reasonml","refmt","prettier","prettier-plugin"],"install":[{"cmd":"npm install prettier-plugin-reasonml","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-plugin-reasonml","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-plugin-reasonml","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; the plugin requires Prettier to be installed.","package":"prettier","optional":false}],"imports":[{"note":"This is a Prettier plugin, not a library. It is loaded automatically by Prettier when installed. No direct import in code.","wrong":"const plugin = require('prettier-plugin-reasonml')","symbol":"default","correct":"// No JS import; use via Prettier CLI or API with --plugin"}],"quickstart":{"code":"npm install -g prettier prettier-plugin-reasonml\nprettier src/**/*.re --write --print-width 120","lang":"javascript","description":"Install globally and use Prettier CLI to format ReasonML files with custom print width."},"warnings":[{"fix":"Use CLI or other editor integrations; see https://github.com/prettier/prettier-vscode/issues/395","message":"VSCode Prettier extension does not support this plugin due to an upstream issue.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Ensure refmt (from reason package) is installed and accessible, or set REFMT_BIN=bsrefmt","message":"Requires `refmt` binary in PATH or set via REFMT_BIN environment variable.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Only options that translate to refmt flags (e.g., print-width) have effect.","message":"Uses refmt directly; no AST manipulation, so some Prettier options may not apply as expected.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install with npm install prettier-plugin-reasonml in the project or globally.","cause":"Plugin not installed or not in node_modules path when running prettier.","error":"Cannot find module 'prettier-plugin-reasonml'"},{"fix":"Install refmt via npm install -g reason or set REFMT_BIN to bsrefmt.","cause":"refmt binary not available; unable to format files.","error":"refmt: command not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}