-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add
arrowFunction.noNewLineBeforeFnCall
option
Resolves #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, }) ); ```
- Loading branch information
Showing
7 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...pressions/ArrowFunctionExpression/ArrowFunctionExpression_NoNewLineBeforeFnCall_False.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
~~ arrowFunction.noNewLineBeforeFnCall: false ~~ | ||
== should not insert new line after arrow when option is true == | ||
[].map((it) => test({ | ||
foo: 1, | ||
bar: 2 | ||
})); | ||
|
||
[expect] | ||
[].map((it) => | ||
test({ | ||
foo: 1, | ||
bar: 2, | ||
}) | ||
); |
12 changes: 12 additions & 0 deletions
12
...xpressions/ArrowFunctionExpression/ArrowFunctionExpression_NoNewLineBeforeFnCall_True.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
~~ arrowFunction.noNewLineBeforeFnCall: true ~~ | ||
== should not insert new line after arrow when option is true == | ||
[].map((it) => test({ | ||
foo: 1, | ||
bar: 2 | ||
})); | ||
|
||
[expect] | ||
[].map((it) => test({ | ||
foo: 1, | ||
bar: 2, | ||
})); |