Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.
This repository was 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

@johnhaley81

Description

@johnhaley81

👋

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions