refmt produces invalid code in JSX with fast pipe and field access
Open
Nobody has claimed this yet.
Printer
- Dominant language
- OCaml
- Stars
- 10.3k
- Forks
- 438
- PR merge metrics
- No merged PRs in 30d
Description
let out = <div> {f(x).value->React.string} </div>;
formats to
let out = <div> f(x).value->React.string </div>;
formats to
let out = <div> f x.value->React.string </div>;
Related to #2199
Checked on https://reasonml.github.io/en/try
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the JSX formatting sequence in the linked Reason playground, focusing on the fast-pipe and field-access expression. Then trace the refmt formatting path for JSX and add a regression check for the shown input. Done means refmt preserves valid syntax and does not produce the invalid intermediate or final output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, ocaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100