-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown 'es5' option for 'trailingComma' #652
Comments
We are experiencing the exact same issue and cannot update to the latest version because of this. |
Thank you for reporting this! This was likely caused by #628, specifically this line. I hadn't realized that officially adding |
@ArLau You may be able to work around this issue by only using the prettier-java plugin for tabWidth: 4
trailingComma: 'es5'
overrides:
- files:
- '*.yaml'
- '*.yml'
options:
tabWidth: 2
- files: '*.java'
options:
plugins:
- prettier-plugin-java
printWidth: 160
trailingComma: all
- files: '*.md'
options:
printWidth: 80
tabWidth: 2
- files:
- '*.ts'
- '*.js'
- '*.tsx'
- '*.jsx'
options:
printWidth: 150 |
Thank you! This does seem to work. I tried a similar solution before but I realize I was putting the |
@jtkiesel Your suggestion works for us. Thanks a lot for your quick answer and your work on this plugin. |
Concerns Prettier-Java 2.6.0
Version 2.6.0 fails to format files if the
trailingComma
option is set toes5
in.prettierrc.yaml
. According to https://prettier.io/docs/en/options.html#trailing-commases5
is a valid option and it worked with version 2.5.0 of Prettier-Java.Now we get:
Our configuration (
.prettierrc.yaml
) looks like this:We also tried:
all
globally and override withes5
for e.g.ts
filestrailingComma
withall
forjava
filesbut this still fails with the same error message.
The text was updated successfully, but these errors were encountered: