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

Add arrowFunction.noNewLineBeforeFnCall option #528

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Ty3uK
Copy link
Contributor

@Ty3uK Ty3uK commented May 25, 2023

Resolves #107.

If set to true dprint will not format this:

[].map(() => test({
    foo: 1,
    bar: 2,
}));

to this:

[].map(() =>
    test({
        foo: 1,
        bar: 2,
    })
);

and this:

const getStyles = () => css`
    display: flex;
`;

to this:

const getStyles = () =>
    css`
    display: flex;
`;

@Ty3uK
Copy link
Contributor Author

Ty3uK commented May 25, 2023

Also, please help with naming, I'm not quite sure that noNewLineBeforeFnCall is ok 🙂

@Ty3uK Ty3uK force-pushed the feature/arrow_expression_no_new_line_after_fn_call branch from f611613 to 26fafef Compare May 26, 2023 07:26
Resolves dprint#107.

If set to true dprint will not format this:

```typescript
[].map(() => test({
    foo: 1,
    bar: 2,
}));
````

to this:

```typescript
[].map(() =>
    test({
        foo: 1,
        bar: 2,
    })
);
```
@Ty3uK Ty3uK force-pushed the feature/arrow_expression_no_new_line_after_fn_call branch from 26fafef to cb89919 Compare May 26, 2023 07:27
@Ty3uK
Copy link
Contributor Author

Ty3uK commented May 31, 2023

@dsherret, may I ask you to check this PR? 🙂

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

Successfully merging this pull request may close these issues.

Multi-line arrow-function expression body should not add line break after arrow in certain circumstances
1 participant