Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single line reactions should not be inlined #1975

Closed
edwardalee opened this issue Aug 29, 2023 · 2 comments · Fixed by #1984
Closed

Single line reactions should not be inlined #1975

edwardalee opened this issue Aug 29, 2023 · 2 comments · Fixed by #1984
Assignees
Labels
enhancement Enhancement of existing feature formatter

Comments

@edwardalee
Copy link
Collaborator

I'm finding the formatter's insistence on inlining single-line reactions problematic. It results in two languages being on the same line and it's rather hard to see what is going on. Consider the following very simple TypeScript example:

  reaction(t) -> i.x {= i.x = 42 =}

I find this hard to read. Given that the formatter already inserts quite a few blank lines, this policy does not seem to be justified by reducing the number of lines (or else we should change that policy and not insert blank lines). Can we change this to allow:

  reaction(t) -> i.x {=
    i.x = 42
  =}
@edwardalee edwardalee added enhancement Enhancement of existing feature formatter labels Aug 29, 2023
@petervdonovan
Copy link
Collaborator

I agree. The only reason why this has not already been done is that it is a small amount of extra complexity to implement. I'll do this soon if no one objects.

@lhstrh
Copy link
Member

lhstrh commented Aug 29, 2023

I'm fine with either way...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of existing feature formatter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants