Closed
Description
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 withes5
for e.g.ts
files - to override the
trailingComma
withall
forjava
files
but this still fails with the same error message.
Metadata
Metadata
Assignees
Labels
No labels