Skip to content

Commit

Permalink
fix: add es5 as trailingComma option
Browse files Browse the repository at this point in the history
  • Loading branch information
jtkiesel authored and clementdessoude committed Mar 24, 2024
1 parent 4c8f927 commit 3a4c96b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
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

0 comments on commit 3a4c96b

Please sign in to comment.