Skip to content
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

bad formating on js file - arrow-parens #302

Open
jose4125 opened this issue Jun 25, 2021 · 2 comments
Open

bad formating on js file - arrow-parens #302

jose4125 opened this issue Jun 25, 2021 · 2 comments

Comments

@jose4125
Copy link

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 ?

@JwanKhalaf
Copy link

I'm also getting this.

@Gregoirevda
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants