vim-prettier
vim-prettier copied to clipboard
bad formating on js file - arrow-parens
Do you want to request a feature or report a bug? report a bug
What is the current/expected behavior?
- when prettier format the file it have issues with the
arrow-parens
. - should be
success => {}
. but prettier is changing it to(success) => {}
and I'm getting an error fromplugin:prettier/recommended
, I guess. - the error message is
[eslint prettier/prettier] [E] Replace `(success)` with `success`
. - so the code is correct and prettier is formatting it in the wrong way.
What version of vim-prettier
are you using - (output of :PrettierVersion
) ?
1.0.0-beta
What version of prettier
are you using - (output of :PrettierCliVersion
) ?
1.19.1^@
What is your prettier
executable path - (output of :PrettierCliPath
) ?
/Users/username/Sites/project/src/www/frontend/node_modules/.bin/prettier
Did this work in previous versions of vim-prettier and/or prettier ?
I'm also getting this.
Prettier arrow function parentheses v1.9.* and below defaults to "avoid", but v2.0.0 default to "always"
vim-prettier defaults to "always" no matter the version.
You can update the default prettier config with:
let g:prettier#config#arrow_parens = 'avoid'