prettier-plugin-reasonml

0.2.0 • Public • Published

  Prettier     Elm  

Prettier ReasonML plugin

Wrapper plugin adding refmt support to Prettier. This brings *.re files support to Prettier and allows you to format those files like you would the rest of your codebase, while also inheriting the configured Prettier options. This follows the same model as the Elm plugin in that the code to format is passed directly to refmt and isn't transformed into an AST, the goal of this package is to simply integrate refmt more smoothly into your workflow if you already use Prettier.

Installation

npm install prettier prettier-plugin-reasonml -g # or 
yarn global add prettier prettier-plugin-reasonml

Usage

All you need to do is use Prettier on ReasonML files like you would any other files:

prettier src/**/*.re --write --print-width 120

VSCode plugin support is currently blocked by this issue.

Using other refmt binaries

If refmt is not in your path or you wanted to use bsrefmt, set the environment variable REFMT_BIN

REFMT_BIN=bsrefmt prettier src/**/*.re --write --print-width 120

Credits

This is largly inspired by prettier-plugin-elm so props to them.

Package Sidebar

Install

npm i prettier-plugin-reasonml

Weekly Downloads

525

Version

0.2.0

License

MIT

Unpacked Size

4.47 kB

Total Files

8

Last publish

Collaborators

  • anahkiasen
  • madewithlove-machine-user