I’m liking a lot rescript. It’s a wonderful effort to make reasonml simpler, and I’m really satisfied with the ecosystem and the seamless introduction of the language into a js / ts codebase.
However, the thing that makes my code really hard to read is the current formatting situation that we have. I find this really hard to read and edit:
Note that I’m a vim user, so moving and editing parts of the pipelines is easier when they are split in lines. There are more examples with jsx that the same applies.
It’s been months since there’s no improvements in this area, and I get it, the current team is busy with other things. Therefore, is it worth it to build a rescript formatting tool, or is the rescript format api coming with more customizations?
However, the thing that makes my code really hard to read is the current formatting situation that we have.
I agree, I’ve been trying to use the default formatter this last week but these long lines are making my code pretty difficult to read, I’m ready to disable it
It happens with JSX elements too, which I almost never want on the same line
This is an example where someone from the community could first gauge interest and do some experimentation. See if there are gotchas, ux/dx or implementation issues. Prepare enough examples and present them to the community for feedback.
An area with no scarcity of opinions normally.
At least there should be a code standard - a must for any enterprise or bigger project.
Variable, module and function naming is sadly not possible to inspect statically, but there should be a standard for that too. OCaml has conventions for this, like string_of_int C-style, UPPERCASE for module signatures, CamelCase for modules, using t for the base type in a module, etc.