Skip to content

Commit

Permalink
feature: add blank line in enums between constants & declarations (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
clementdessoude authored Jan 1, 2020
1 parent a24aa13 commit c5f012e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/prettier-plugin-java/src/printers/classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ class ClassesPrettierVisitor {
ctx.classBodyDeclaration
);

return rejectAndJoin(line, [
return rejectAndJoin(concat([hardline, hardline]), [
ctx.Semicolon[0],
rejectAndJoinSeps(separators, classBodyDeclaration)
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ public enum EnumWithManyValuesWithExtraCommaAndExtraSemicolon {
public enum EnumWithExtraCommaAndEnumBodyDeclarations {
THIS_IS_GOOD("abc"),
THIS_IS_FINE("abc");

public static final String thisWillBeDeleted = "DELETED";
}

public enum Enum {
THIS_IS_GOOD("abc"),
THIS_IS_FINE("abc");

public static final String thisWillBeDeleted = "DELETED";

private final String value;
Expand Down

0 comments on commit c5f012e

Please sign in to comment.