vim-prettier icon indicating copy to clipboard operation
vim-prettier copied to clipboard

bad formating on js file - arrow-parens

Open jose4125 opened this issue 3 years ago • 2 comments

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 from plugin: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 ?

jose4125 avatar Jun 25 '21 02:06 jose4125

I'm also getting this.

JwanKhalaf avatar Jun 30 '21 10:06 JwanKhalaf

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'

Gregoirevda avatar Nov 08 '21 10:11 Gregoirevda