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

Disable line breaks for arrow functions without braces #6

Open
Loskir opened this issue Nov 6, 2022 · 1 comment
Open

Disable line breaks for arrow functions without braces #6

Loskir opened this issue Nov 6, 2022 · 1 comment

Comments

@Loskir
Copy link

Loskir commented Nov 6, 2022

Hello!

I have this piece of code:

f(() => f2({
  a: 1,
}))

and it gets formatted into something like

f(() =>
  f2({
    a: 1,
  })
);

but I don't like that line break after =>.
Is there a way to discourage dprint from adding it?
I'd like to see something like

f(() => f2({
  a: 1,
}));
// (no changes)

or

f(
  () => f2({
    a: 1,
  })
)
// (arrow function on a new line but no break after =>)

Here's a playground link: https://dprint.dev/playground/#code/GYChEoAIF4D5OAJhAbwFCU5AhgLkgIxoC+44QA/language/typescript

Thank you!

@so1ve
Copy link

so1ve commented Apr 7, 2023

Please raise this issue in the dprint-plugin-typescript repo

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

No branches or pull requests

2 participants