Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/prettier-plugin-java/src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export default {
type: "choice",
category: "Java",
default: "all",
choices: ["all", "none"],
choices: ["all", "es5", "none"],
description: "Print trailing commas wherever possible when multi-line."
}
};
10 changes: 6 additions & 4 deletions website/src/pages/playground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ interface State {
}

enum TrailingComma {
None = "none",
All = "all"
All = "all",
Es5 = "es5",
None = "none"
}

const codeSample = `public interface MyInterface {
Expand Down Expand Up @@ -144,8 +145,9 @@ function Inner() {
setTrailingComma(event.target.value as TrailingComma)
}
>
<option>all</option>
<option>none</option>
{Object.values(TrailingComma).map(option => (
<option>{option}</option>
))}
</select>
</label>
</details>
Expand Down