Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Fastpipe operations in JSX are modified to invalid code after run through refmt #91

Open
johnhaley81 opened this issue Oct 26, 2018 · 0 comments

Comments

@johnhaley81
Copy link

👋

I'm hitting an issue with refmt turning valid code into invalid code in a JSX block.

let component = ReasonReact.statelessComponent("RefmtBug");

let getLiComponent = str => <li> str->ReasonReact.string </li>;

let make = (~strings, _children) => {
  ...component,
  render: _ =>
    <div>
      <ul>
        strings
        ->Belt.List.map(getLiComponent)
        ->Belt.List.toArray
        ->ReasonReact.array
      </ul>
    </div>,
};

The above snippet is valid code but after a run through refmt it's invalid.

> refmt --version
Reason 3.3.3 @ fefe5e4d

Switching from -> to |> is the only way I know how to fix it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant