Concerns Prettier-Java 2.6.0
Version 2.6.0 fails to format files if the trailingComma option is set to es5 in .prettierrc.yaml. According to https://prettier.io/docs/en/options.html#trailing-commas es5 is a valid option and it worked with version 2.5.0 of Prettier-Java.
Now we get:
$ prettier "**/*.(yaml|yml|md|ts|tsx|java)" --write
[error] Invalid trailingComma value. Expected "all" or "none", but received "es5".
Our configuration (.prettierrc.yaml) looks like this:
tabWidth: 4
trailingComma: 'es5'
plugins:
- prettier-plugin-java
overrides:
- files:
- '*.yaml'
- '*.yml'
options:
tabWidth: 2
- files: '*.java'
options:
printWidth: 160
- files: '*.md'
options:
printWidth: 80
tabWidth: 2
- files:
- '*.ts'
- '*.js'
- '*.tsx'
- '*.jsx'
options:
printWidth: 150
We also tried:
- to use
all globally and override with es5 for e.g. ts files
- to override the
trailingComma with all for java files
but this still fails with the same error message.
Concerns Prettier-Java 2.6.0
Version 2.6.0 fails to format files if the
trailingCommaoption is set toes5in.prettierrc.yaml. According to https://prettier.io/docs/en/options.html#trailing-commases5is 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:
allglobally and override withes5for e.g.tsfilestrailingCommawithallforjavafilesbut this still fails with the same error message.