{"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,"search_vec":"'0.2.0':23 'add':8 'alreadi':73 'ast':35 'ast-transform':34 'binari':21 'bsrefmt':54 'cadenc':32 'code':40 'configur':63 'current':26 'deleg':17 'direct':41 'file':11 'format':12 'inherit':60 'instal':57 'integr':48 'javascript':76 'layer':49 'like':65 'make':44 'option':64 'pass':39 'plugin':3,6,37,82 'prettier':1,15,61,75,79,81 'prettier-plugin':80 'print':67 'print-width':66 'project':72 're':10 'reasonml':2,9,71,77 'refmt':20,43,52,78 'regular':31 'releas':28 'requir':51 'separ':58 'stabl':27 'support':13 'thin':47 'transform':36 'unlik':33 'use':69,74 'version':22 'width':68 'wrapper':5","created_at":"2026-04-25T11:22:58.058728+00:00","updated_at":"2026-04-25T11:22:58.058728+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/prettier-plugin-reasonml","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}