csharpier
csharpier copied to clipboard
Inline if-return statement always has line break added
This may be something I'm just opinionated on, but I did test with prettier and prettier will reproduce the expected behavior in this issue.
Input:
public class ClassName {
public string Foo() {
if (true) return "foo";
if (true)
return "bar";
if (true) return "some exceedingly long return value that exceeds the max line length limit of 100 chars";
return "bar";
}
}
Output:
public class ClassName
{
public string Foo()
{
if (true)
return "foo";
if (true)
return "bar";
if (true)
return "some exceedingly long return value that exceeds the max line length limit of 100 chars";
return "bar";
}
}
Expected behavior:
public class ClassName
{
public string Foo()
{
if (true) return "foo";
if (true) return "bar";
if (true)
return "some exceedingly long return value that exceeds the max line length limit of 100 chars";
return "bar";
}
}